Commit Graph

831 Commits

Author SHA1 Message Date
mav
d428361db1 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
mav
712ac6cc55 Split DMA buffers for request, response and ATIO queues. 2015-12-27 06:16:02 +00:00
mav
ddfeb0533d Use single DMA tag for scratch areas of all virtual ports. 2015-12-26 09:16:05 +00:00
mav
069b2b75f3 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
mav
05fd02b62d 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
mav
8bdaa8168b 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
mav
e576ab0310 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
mav
3458fe02da Some polishing for command timeouts handling. 2015-12-24 14:53:29 +00:00
mav
61dcb56e93 Fix speed setting by NVRAM for 24xx and above chips. 2015-12-22 17:01:30 +00:00
mav
2278607d5f 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
mav
888d655aa4 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
mav
954f05bb14 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
mav
82cb9bcc30 There is no priority request queue on 16Gig chips. 2015-12-05 22:07:02 +00:00
mav
20e04de48a Rework WWNs generation to make cards without NVRAM more useful. 2015-12-05 21:38:04 +00:00
mav
fcabb159f2 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
mav
13c181b8ff Update isp_put_icb_2400() for new structure fields. 2015-12-04 01:28:48 +00:00
mav
e055fa5159 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
mav
7a42e48a34 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
mav
53cab85992 Remove residual functions declaration left after r291365. 2015-11-26 18:56:21 +00:00
mav
155e1e1885 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
mav
059f0faf5e 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
mav
28a1692666 Remove "disable" hint, which duplicates system-wide "disabled". 2015-11-23 20:44:49 +00:00
mav
baa220781b 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
mav
d449451c38 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
mav
145522c381 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
mav
689450eed1 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
mav
256f656982 Gracefully stop firmware before resetting chip when changing role. 2015-11-22 15:57:54 +00:00
mav
b52366383b Add some more asynchronous event status codes. 2015-11-22 11:44:30 +00:00
mav
d3438d277b Add mode mailbox command codes. 2015-11-22 11:13:09 +00:00
mav
c5fd633b07 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
mav
4bb25e2c29 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
mav
4e1c872b52 Some cosmetics for ancient cards. 2015-11-20 14:20:24 +00:00
mav
5c93d425cc 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
mav
b481f11ed7 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
mav
a765e77195 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
mav
1aa7b8ca20 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
mav
f7cc799685 Register our FC4 Features in SNS. 2015-11-17 19:57:49 +00:00
mav
00f2346cc5 Cosmetic addition to r290993. 2015-11-17 16:46:05 +00:00
mav
fcc51d543f Unify and cleanup FC ports scan. 2015-11-17 16:33:46 +00:00
mav
c0501d5b01 Off-by-one correctiont to r290980. 2015-11-17 14:22:56 +00:00
mav
1c01f2a884 Make firmware handle virtual ports SNS logins for us. 2015-11-17 14:13:55 +00:00
mav
d3dc28086b Add real initial support for RQSTYPE_RPT_ID_ACQ. 2015-11-17 13:02:44 +00:00
mav
331f938c43 Fix/improve CRN tracking. 2015-11-14 19:47:17 +00:00
mav
82a6376e2a Rework r290504. 2015-11-07 19:33:57 +00:00
mav
f8767e9255 Specify VP when sending a marker. 2015-11-07 19:03:47 +00:00
mav
0108c7a6e0 Make ISP_SLEEP() really sleep instead of spinning.
While there, simplify the wait logic.
2015-11-07 18:26:02 +00:00
mav
db507b23f5 Remove some unneeded code. 2015-10-29 20:43:13 +00:00
mav
299c4c1e5d Remove reset delays for which I see neither explanation nor need. 2015-10-29 20:34:01 +00:00
mav
c844b56ea5 Fix and improve error masking and reporting. 2015-10-29 16:48:12 +00:00
mav
cd70a0a54f 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