Commit Graph

237 Commits

Author SHA1 Message Date
Alexander Motin
a4f43c01c0 Clear virtual port's port database when disabling it.
Previously it was done only on full chip reinit, that caused old ports
resurrect in case of virtual port reenabling.
2015-12-25 03:44:29 +00:00
Alexander Motin
a46709e2ab Some polishing for command timeouts handling. 2015-12-24 14:53:29 +00:00
Alexander Motin
b7200a19e6 Fix speed setting by NVRAM for 24xx and above chips. 2015-12-22 17:01:30 +00:00
Alexander Motin
c7a771a0b5 Guess NVRAM address for 16Gbps Qlogic cards.
I have feeling this approach is wrong, but it works for me so far and
it is better then nothing.
2015-12-10 01:17:30 +00:00
Alexander Motin
8a30def363 There is no priority request queue on 16Gig chips. 2015-12-05 22:07:02 +00:00
Alexander Motin
7bd4b42414 Enable interrupt handshake for 16Gig chips.
We don't support MSI-X so far, so it is always required.
2015-12-03 22:55:40 +00:00
Alexander Motin
218be0b2ee Add initial support for 16Gbps FC QLogic chips.
I still don't know how to read NVRAM there, so WWNs and other parameters
are incorrect, but other then that driver seems like attaching normally.
2015-12-02 20:22:50 +00:00
Alexander Motin
e561aa79fb One more round of port scanner rewrite.
- Make scan aborted by event restart immediately and infinitely.
 - Improve handling of some loop events from firmware.
 - Remove loop down timer, adding its functionality to scanner thread.
 - Some more unification and simplification.
2015-11-26 13:04:58 +00:00
Alexander Motin
e2929f5f91 Rename ASYNC_LIP_F8 to ASYNC_LIP_NOS_OLS_RECV.
New name better repsents its meaning for modern chips.
2015-11-24 19:20:49 +00:00
Alexander Motin
a4ccb5d682 Fix target mode support for Qlogic 2200 FC adapters.
Now target mode works for all supported FC adapters except ancient 2100,
which is not tested.
2015-11-23 15:49:50 +00:00
Alexander Motin
3e6deb330e Rip off target mode support for parallel SCSI QLogic adapters.
Hacks to enable target mode there complicated code, while didn't really
work.  And for outdated hardware fixing it is not really interesting.

Initiator mode tested with Qlogic 1080 adapter is still working fine.
2015-11-23 10:06:19 +00:00
Alexander Motin
1575756978 Explicitly call SEND CHANGE REQUEST for pre-24xx chips in target mode.
While later firmware always registers for RSCN requests, older one does
it only in initiator mode.  But in target mode there RSCN can be the only
way to detect gone intiator.
2015-11-22 17:03:38 +00:00
Alexander Motin
88912b29b6 Gracefully stop firmware before resetting chip when changing role. 2015-11-22 15:57:54 +00:00
Alexander Motin
4e432bf678 Add some more asynchronous event status codes. 2015-11-22 11:44:30 +00:00
Alexander Motin
ec6d4d0f5d Add mode mailbox command codes. 2015-11-22 11:13:09 +00:00
Alexander Motin
4187a96543 Fix target mode with fabric for pre-24xx chips.
For those chips we are not receiving login events, adding initiators
based on ATIO requests.  But there is no port ID in that structure, so
in fabric mode we have to explicitly fetch it from firmware to be able
to do normal scan after that.
2015-11-21 21:01:00 +00:00
Alexander Motin
1fd7e8637c Some cosmetics for ancient cards. 2015-11-20 14:20:24 +00:00
Alexander Motin
1e0e8c83b5 Optimize SNS_GID_FT request scratch memory usage.
Now with present 4K of scratch we can fetch up to 508 ports (16 more).
2015-11-20 08:54:19 +00:00
Alexander Motin
eea52482f9 Another round of port scanner rewrite.
This change simplifies and unifies port adding/updating for loop and
fabric scanners.  It also fixes problems with scanning restarts due to
concurrent port databases changes.  It also fixes many cosmetic issues.
2015-11-19 17:43:47 +00:00
Alexander Motin
c61fdcb93c Simplify fabric tasting code.
Except cosmetic changes this removes fabric ports from our port database.
It is always firmware duty to manage them, so driver don't need to worry.
2015-11-18 12:39:20 +00:00
Alexander Motin
c5fd36edc7 Remove some confusions between loopid and nphdl.
Modern cards in most cases operate abstract port handles, that have no
any relation to real loop IDs.  Leave loopid used only where it really
goes about local loop IDs.

While there, fix few more cases where LUNs were still printed in decimal.
2015-11-18 11:14:59 +00:00
Alexander Motin
92056a05e5 Register our FC4 Features in SNS. 2015-11-17 19:57:49 +00:00
Alexander Motin
955d53eedc Cosmetic addition to r290993. 2015-11-17 16:46:05 +00:00
Alexander Motin
b6bd5f7fc1 Unify and cleanup FC ports scan. 2015-11-17 16:33:46 +00:00
Alexander Motin
6955aeb2c3 Off-by-one correctiont to r290980. 2015-11-17 14:22:56 +00:00
Alexander Motin
53c0eee354 Make firmware handle virtual ports SNS logins for us. 2015-11-17 14:13:55 +00:00
Alexander Motin
6d53b0a7aa Add real initial support for RQSTYPE_RPT_ID_ACQ. 2015-11-17 13:02:44 +00:00
Alexander Motin
277911a38e Rework r290504. 2015-11-07 19:33:57 +00:00
Alexander Motin
7b6371ca7c Specify VP when sending a marker. 2015-11-07 19:03:47 +00:00
Alexander Motin
c261189f26 Make ISP_SLEEP() really sleep instead of spinning.
While there, simplify the wait logic.
2015-11-07 18:26:02 +00:00
Alexander Motin
2626fa27ad Remove some unneeded code. 2015-10-29 20:43:13 +00:00
Alexander Motin
030eb8d0f2 Remove reset delays for which I see neither explanation nor need. 2015-10-29 20:34:01 +00:00
Alexander Motin
2e6beaf19e Fix and improve error masking and reporting. 2015-10-29 16:48:12 +00:00
Alexander Motin
668c0ec64f Change the way how target mode is enabled on 23xx chips.
Without docs I am not completely sure about this, but on my tests new
method works better then previous, at least with our latest firmware.
2015-10-28 19:08:51 +00:00
Alexander Motin
b6983e5fc8 Improve/fix loop scanning routine.
For the most of chips (except anscient ones) port handlers have no relation
to port IDs.  In such situation old code scanning first 125 handlers was
quite naive.  Instead of doing that, send to chip single request to get full
list of port handlers available on specific virtual port and scan only them.

Old code had problems with case of several virtual ports enabled, when port
handlers allocated from global address space could easily go above 125.
This change was successfully tested on 23xx, 24xx and 25xx chips in loop
mode with 4 virtual initiator ports, each seing 50 virtual target ports.
2015-10-28 12:34:59 +00:00
Alexander Motin
62560a0b75 Reimplement next port handle generation.
For some reason port handles should be allocated from HBA-global space,
while old code was not very specific, mixing per-HBA and per-VP logic.
2015-10-27 18:32:03 +00:00
Alexander Motin
86a1e16def Reimplement enable and implement disable of virtual ports.
Now on 24xx and above chips it is really possible to simulate several
virtual FC ports with single physical one.  For example, it allows to
configure several targets in ctl.conf, assign each of them to separate
virtual port, and let user to control access to them with switch zoning.

I still doubt that all problems are solved there, but at now it passes
at least basic tests.
2015-10-26 18:14:15 +00:00
Alexander Motin
affa9cbb4f Rework r289933 using already existing macro. 2015-10-25 17:24:37 +00:00
Alexander Motin
1fc04cc0d3 Try to keep Loop IDs persistent across chip reinits. 2015-10-25 16:04:31 +00:00
Alexander Motin
b5d5037b6c Improve Port Database Changed handling and reporting. 2015-10-25 14:34:07 +00:00
Alexander Motin
dfd246496a Formalize/unify chip (re-)inits. 2015-10-25 10:49:05 +00:00
Alexander Motin
5b355b1259 Skip reserved IP Broadcast handle from using. 2015-10-24 19:47:54 +00:00
Alexander Motin
6af11b82c0 Add PIM_EXTLUNS support to isp(4) driver.
Now 24xx and above chips support full 8-byte LUN address space.
Older FC chips may support up to 16K LUNs when firmware allows.
Tested in both initiator and target modes for 23xx, 24xx and 25xx.
2015-10-24 17:34:40 +00:00
Alexander Motin
7846391fd7 Decode few more response info codes.
Though CAM still does not send any requests that would require those.
2015-10-24 10:01:04 +00:00
Alexander Motin
6ce548a105 Some polishing and unification in ISR code. 2015-10-23 08:26:45 +00:00
Alexander Motin
b5024bfde9 Some more defines and polishing for INIT_FIRMWARE. 2015-10-21 08:23:19 +00:00
Alexander Motin
b363245a31 Zero mbox[0] for INIT_FIRMWARE to fix version 7.3 firmware.
While there, add new fields to isp_icb_2400_t structure.
2015-10-20 10:16:03 +00:00
Alexander Motin
261286a787 Decode more firmware attributes. 2015-10-20 08:29:30 +00:00
Alexander Motin
7dbe8f175b MULTI_ID supported does not mean it is used. 2015-07-15 12:04:12 +00:00
Alexander Motin
e68eef1442 Unify port database use for target and initiator roles.
Aside from cleaner and more consistent code, this allows ports to be both
target and initiator same time, and easily switch from any role to any.

Sponsored by:	iXsystems, Inc.
2015-07-13 15:11:05 +00:00