Commit Graph

832 Commits

Author SHA1 Message Date
Warner Losh
a2531862b8 Move to new value for XPT_GET_SIM_KNOB to avoid clash with XPT_ATA_IO. 2016-03-10 06:25:05 +00:00
Alexander Motin
5d084976cb Allocate separate scratch space for scanner purposes.
This space does not require DMA syncing. It reduces lock scope of the DMA
scratch space.  It allows whole DMA scratch space to be used to I/O, so now
we can fetch up to ~1000 ports from SNS.

Due to the last fact, increase maximal number of ports from 256 to 1024.
2015-12-27 06:28:31 +00:00
Alexander Motin
14849e2c85 Split DMA buffers for request, response and ATIO queues. 2015-12-27 06:16:02 +00:00
Alexander Motin
7d191fdb97 Use single DMA tag for scratch areas of all virtual ports. 2015-12-26 09:16:05 +00:00
Alexander Motin
9d8b002160 Make port logins asynchronous, following r292739 logic.
This is even more important since it involves more network operations and
more prone to delays and timeouts.
2015-12-26 06:13:01 +00:00
Alexander Motin
66e979f15c Make virtual ports control asynchronous.
Before this change virtual ports control IOCBs were executed synchronously
via Execute IOCB mailbox command.  It required exclusive use of scratch
space of driver and mailbox registers of the hardware.  Because of that
shared resources use this code could not really sleep, having to spin for
completion, blocking any other operation.

This change introduces new asynchronous design, sending the IOCBs directly
on request queue and gracefully waiting for their return on response queue.
Returned IOCBs are identified with unified handle space from r292725.
2015-12-26 04:26:32 +00:00
Alexander Motin
970ceb2fd5 Unify handles allocation for initiator and target IOCBs.
I am not sure why this was split long ago, but I see no reason for it.
At this point this unification just slightly reduces memory usage, but
as next step I plan to reuse shared handle space for other IOCB types.
2015-12-25 13:03:18 +00:00
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
d876d6c34a Add MSI-X support for 26XX cards.
Unlike previous, this generation does not support regular MSIs any more.
2015-12-15 04:51:50 +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
67eeadd2bd Add PCI ID for 16G QLogic chips in FCoE mode.
I haven't tested FCoE really yet, but the driver attaches fine.
2015-12-09 22:52:37 +00:00
Alexander Motin
8a30def363 There is no priority request queue on 16Gig chips. 2015-12-05 22:07:02 +00:00
Alexander Motin
a193dc4b82 Rework WWNs generation to make cards without NVRAM more useful. 2015-12-05 21:38:04 +00:00
Alexander Motin
cd201b7b55 Make 16Gig chips to use new queue pointer registers.
While 24xx-style ATIO and reply queue registers seems like still working,
request queue doesn't.  So instead of that use registers from PCI BAR(4).
2015-12-04 19:46:49 +00:00
Alexander Motin
829dfec04f Update isp_put_icb_2400() for new structure fields. 2015-12-04 01:28:48 +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
e096498a0c Remove residual functions declaration left after r291365. 2015-11-26 18:56:21 +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
e3a0bc583b Remove "disable" hint, which duplicates system-wide "disabled". 2015-11-23 20:44: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
45b9ad7a24 Generate fake ISPASYNC_CHANGE_PDB on fake login on pre-24xx.
This makes port scanner fix absent port ID for added initiator.
2015-11-22 16:55:43 +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
ffe6ea0581 Increase maximal value of vports tunable to 254.
I am not sure this value is really viable yet, but that is what chips
officially support in NPIV mode (in loop mode maximum is 125).
2015-11-21 21:44:11 +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
21daf914a1 Fix/improve CRN tracking. 2015-11-14 19:47:17 +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