Commit Graph

928 Commits

Author SHA1 Message Date
Alexander Motin
4599b54219 Remove remnant of r315163.
MFC after:	13 days
2017-03-14 06:57:55 +00:00
Alexander Motin
c44f58fce9 Remove strange config_intrhook_establish() magic.
Interrupts are enabled as part of chip reset just during driver attach.
Later "enabling" of already enabled interrupts is useless.

MFC after:	2 weeks
2017-03-12 16:55:18 +00:00
Alexander Motin
ab23521a49 Try to slight untangle I/O and loop status handling.
MFC after:	2 weeks
2017-03-12 15:36:07 +00:00
Alexander Motin
229203af68 Remove code for unsupported FreeBSD versions.
MFC after:	2 weeks
2017-03-12 14:17:57 +00:00
Alexander Motin
3f072d6948 Send TERMINATE to firmware when aborting active ATIO.
MFC after:	2 weeks
2017-02-27 08:20:28 +00:00
Alexander Motin
2d4a5bcccb Return better error code in case of too long CDB.
Its more important for SPI HBAs, as they don't support CDBs above 12 bytes.
The new error code makes CAM to fall back to alternative commands.

MFC after:	2 weeks
2017-02-26 14:29:09 +00:00
Alexander Motin
a6036a44fd Fix residual length reporting in target mode.
This allows to properly handle cases when target wants to receive or send
more data then initiator wants to send or receive.  Previously in such
cases isp(4) returned CAM_DATA_RUN_ERR, while now it returns resid > 0.

MFC after:	2 weeks
2017-02-26 12:52:44 +00:00
Alexander Motin
87de303c4a Respecting r314204 tighten ATIO cleanup requirements.
Every ATIO must complete with either successfully sent status or XPT_ABORT.

MFC after:	2 weeks
2017-02-24 14:48:17 +00:00
Alexander Motin
5c0b756a9a Fix missing xpt_done() for ATIO/INOT on missing LUN.
MFC after:	2 weeks
2017-02-24 12:11:17 +00:00
Alexander Motin
cfbeb41ccf Slightly polish isp_dump_atpd().
MFC after:	2 weeks
2017-02-22 07:12:20 +00:00
Alexander Motin
8290ea90be Fix multiple problems around LUN disable under load.
- Move private data about ATIOs/INOTs from per-LUN to per-channel data.
This allows active commands to continue operation after LUN destruction.
This also simplifies lookup of the data by tag in some situations.
 - Unify three restart_queue processing implementations.
 - Complete all ATIOs from restart_queue on LUN disable.
 - Delete ATIO private data when command completed or aborted, not depending
on the ATIO being requeued, that was ugly hack and could never happen.  CAM
should always call ether XPT_CONT_TARGET_IO with status or XPT_ABORT.
 - Implement XPT_ABORT for queued ATIOs/INOTs to allow CAM do graceful
shutdown, not depending on LUN disable, as it is done in ahd(4)/targ(4).
 - Unify isp_endcmd() arguments to make it more usable in generic code.
 - Remove never really used LUN state reference counter.

MFC after:	2 weeks
2017-02-22 06:43:49 +00:00
Alexander Motin
26719198a7 Remove duplicate INOT allocation.
For some reason isp_handle_platform_notify_fc() allocated INOT just
before calling isp_handle_platform_target_tmf(), which also allocates
INOT.  It seems to be a braino introduced in r196008.

MFC after:	2 weeks
2017-02-21 14:31:58 +00:00
Alexander Motin
069f5ef977 Remove ancient __FreeBSD_version checks.
MFC after:	2 weeks
2017-02-21 12:29:07 +00:00
Pedro F. Giffuni
4d24901ac9 sys/dev: Replace zero with NULL for pointers.
Makes things easier to read, plus architectures may set NULL to something
different than zero.

Found with:	devel/coccinelle
MFC after:	3 weeks
2017-02-20 03:43:12 +00:00
Alexander Motin
91d226ca26 Remove broken remnants of obsolete INOT API.
MFC after:	2 weeks
2017-02-19 16:40:03 +00:00
Alexander Motin
0d96562989 Missed addition to r313936.
CTIO waitq present only in ISP_TARGET_MODE.

MFC after:	2 weeks
2017-02-19 05:29:06 +00:00
Alexander Motin
09ddc7ad7d Move CTIO waitq from per-LUN to per-channel.
All resources lack of which may put CTIO into the queue are either
per-channel or potentially per-queue, but none of them are per-LUN.

This is a first step to fix live LUN disabling.  Before this change
any CTIOs held in a queue in time of disabling were just leaked.

MFC after:	2 weeks
2017-02-19 05:07:02 +00:00
Kenneth D. Merry
28ef82eb7b Change the isp(4) driver to not adjust the tag type for REQUEST SENSE.
The isp(4) driver was changing the tag type for REQUEST SENSE
commands to Head of Queue, when the CAM CCB flag
CAM_TAG_ACTION_VALID was NOT set.  CAM_TAG_ACTION_VALID is set
when the tag action in the XPT_SCSI_IO is not CAM_TAG_ACTION_NONE
and when the target has tagged queueing turned on.

In most cases when CAM_TAG_ACTION_VALID is not set, it is because
the target is not doing tagged queueing.  In those cases, trying to
send a Head of Queue tag may cause problems.  Instead, default to
sending a simple tag.

IBM tape drives claim to support tagged queueing in their standard
Inquiry data, but have the DQue bit set in the control mode page
(mode page 10).  CAM correctly detects that these drives do not
support tagged queueing, and clears the CAM_TAG_ACTION_VALID flag
on CCBs sent down to the drives.

This caused the isp(4) driver to go down the path of setting the
tag action to a default value, and for Request Sense commands only,
set the tag action to Head of Queue.

If an IBM tape drive does get a Head of Queue tag, it rejects it with
Invalid Message Error (0x49,0x00).  (The Qlogic firmware translates that
to a Transport Error, which the driver translates to an Unrecoverable
HBA Error, or CAM_UNREC_HBA_ERROR.) So, by default, it wasn't possible
to get a good response from a REQUEST SENSE to an FC-attached IBM
tape drive with the isp(4) driver.

IBM tape drives (tested on an LTO-5 with G9N1 firmware and a TS1150
with 4470 firmware) also have a bug in that sending a command with a
non-simple tag attribute breaks the tape drive's Command Reference
Number (CRN) accounting and causes it to ignore all subsequent
commands because it and the initiator disagree about the next
expected CRN.  The drives do reject the initial command with a head
of queue tag with an Invalid Message Error (0x49,0x00), but after that
they ignore any subsequent commands.  IBM confirmed that it is a bug,
and sent me test firmware that fixes the bug.  However tape drives in
the field will still exhibit the bug until they are upgraded.

Request Sense is not often sent to targets because most errors are
reported automatically through autosense in Fibre Channel and other
modern transports.  ("Modern" meaning post SCSI-2.)  So this is not
an error that would crop up frequently.  But Request Sense is useful on
tape devices to report status information, aside from error reporting.

This problem is less serious without FC-Tape features turned on,
specifically precise delivery of commands (which enables Command
Reference Numbers), enabled on the target and initiator.  Without
FC-Tape features turned on, the target would return an error and
things would continue on.

And it also does not cause problems for targets that do tagged
queueing, because in those cases the isp(4) driver just uses the
tag type that is specified in the CCB, assuming the
CAM_TAG_ACTION_VALID flag is set, and defaults to sending a Simple
tag action if it isn't an ordered or head of queue tag.

sys/dev/isp/isp.c:
	In isp_start(), don't try to send Request Sense commands
	with the Head of Queue tag attribute if the CCB doesn't
	have a valid tag action.  The tag action likely isn't valid
	because the target doesn't support tagged queueing.

Sponsored by:	Spectra Logic
MFC after:	3 days
2017-02-10 22:02:45 +00:00
Conrad Meyer
db4fcadf52 "Buses" is the preferred plural of "bus"
Replace archaic "busses" with modern form "buses."

Intentionally excluded:
* Old/random drivers I didn't recognize
  * Old hardware in general
* Use of "busses" in code as identifiers

No functional change.

http://grammarist.com/spelling/buses-busses/

PR:		216099
Reported by:	bltsrc at mail.ru
Sponsored by:	Dell EMC Isilon
2017-01-15 17:54:01 +00:00
Alan Somers
4195c7de24 Always null-terminate ccb_pathinq.(sim_vid|hba_vid|dev_name)
The sim_vid, hba_vid, and dev_name fields of struct ccb_pathinq are
fixed-length strings. AFAICT the only place they're read is in
sbin/camcontrol/camcontrol.c, which assumes they'll be null-terminated.
However, the kernel doesn't null-terminate them. A bunch of copy-pasted code
uses strncpy to write them, and doesn't guarantee null-termination. For at
least 4 drivers (mpr, mps, ciss, and hyperv), the hba_vid field actually
overflows. You can see the result by doing "camcontrol negotiate da0 -v".

This change null-terminates those fields everywhere they're set in the
kernel. It also shortens a few strings to ensure they'll fit within the
16-character field.

PR:		215474
Reported by:	Coverity
CID:		1009997 1010000 1010001 1010002 1010003 1010004 1010005
CID:		1331519 1010006 1215097 1010007 1288967 1010008 1306000
CID:		1211924 1010009 1010010 1010011 1010012 1010013 1010014
CID:		1147190 1010017 1010016 1010018 1216435 1010020 1010021
CID:		1010022 1009666 1018185 1010023 1010025 1010026 1010027
CID:		1010028 1010029 1010030 1010031 1010033 1018186 1018187
CID:		1010035 1010036 1010042 1010041 1010040 1010039
Reviewed by:	imp, sephe, slm
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D9037
Differential Revision:	https://reviews.freebsd.org/D9038
2017-01-04 20:26:42 +00:00
Kenneth D. Merry
08167db8d6 Turn on FC-Tape by default in the isp(4) driver.
FC-Tape provides additional link level error recovery, and is
highly recommended for tape devices.  It will only be turned on for
a given target if the target supports it.

Without this setting, we default to whatever FC-Tape setting is in
NVRAM on the card.

This can be overridden by setting the following loader tunable, for
example for isp0:

hint.isp.0.nofctape=1

sys/conf/options:
	Add a new kernel config option, ISP_FCTAPE_OFF, that
	defaults the FC-Tape configuration to off.

sys/dev/isp/isp_pci.c:
	If ISP_FCTAPE_OFF is defined, turn off FC-Tape.  Otherwise,
	turn it on if the card supports it.

share/man/man4/isp.4:
	Add a description of FC-Tape to the isp(4) man page.

	Add descriptions of the fctape and nofctape options, as well as the
	ISP_FCTAPE_OFF kernel configuration option.

	Add the ispfw module and kernel drivers to the suggested
	configurations at the top of the man page so that users are less
	likely to leave it out.  The driver works well with the included
	firmware, but may not work at all with whatever firmware the user
	has flashed on their card.

MFC after:	3 days
Sponsored by:	Spectra Logic
2016-12-20 21:17:07 +00:00
Alexander Motin
873b0260d4 Pass proper for 23xx arguments to isp_endcmd(). 2016-05-20 11:56:16 +00:00
Alexander Motin
96b5475b7a Pass task management response information from CTL through CAM to isp(4),
utilizing previously unused arg field of struct ccb_notify_acknowledge.

This makes new QUERY TASK, QUERY TASK SET and QUERY ASYNC EVENT requests
really functional for CAM target mode drivers.
2016-05-20 10:26:12 +00:00
Alexander Motin
514a71eba7 Fix delaying requests to unknown virtual ports 2s after init.
This code was originally implemented 7 years ago, but never really worked
due to trivial error.  I think this functionality may be not required.
Initiators supporting optional periodic command status checks detected
those terminated commands and retried them 3 seconds later.  But thinking
about less featured initiators and the fact that it is our race makes
virtual ports "unknown" it may be good to have this feature.
2016-05-19 17:48:56 +00:00
Alexander Motin
352427b341 Add proper reporting for early task management errors.
This covers unknown requests and requests to unknown virtual ports.
Previously it "worked" only because of timeout handling on initiator.
2016-05-19 17:02:33 +00:00
Alexander Motin
0bd83292ef Add IOCB debugging for ISPCTL_RESET_DEV and ISPCTL_ABORT_CMD. 2016-05-19 16:53:53 +00:00
Alexander Motin
93d07b9a26 Unify Multi ID target code by reusing isp_find_chan_by_did(). 2016-05-18 16:15:09 +00:00
Alexander Motin
3a82d79d30 Make RQCS_PORT_LOGGED_OUT for ZOMBIE ports retriable.
It is normal for ZOMBIE ports to be logged out.  This status is not really
an error until Gone Device Timeout expires, so make CAM retry after delay.

MFC after:	1 week
2016-05-17 15:12:57 +00:00
Alexander Motin
5fa351ed89 Completely remove broken now autologin port flag.
Firmware automatically logs in only to local loop ports, and those ports
can be easily identified without extra flag by zero domain and area IDs.

MFC after:	1 week
2016-05-17 13:18:57 +00:00
Alexander Motin
daa0dffb21 Reduce verbosity of "now sending synthesized status" message.
MFC after:	1 week
2016-05-16 17:18:26 +00:00
Alexander Motin
b2699a1bae No need to check login status for ZOMBIE ports.
ZOMBIE ports are always logged out, and so initiator may try to relogin.

MFC after:	1 weeks
2016-05-16 16:44:34 +00:00
Edward Tomasz Napierala
dd49c93695 Remove NULL checks after M_WAITOK allocations from isp(4).
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-05-15 08:36:12 +00:00
Alexander Motin
d2a2ccbc65 Fix FCP_CMD LENGTH mask in ATIO7 IOCB.
This caused "long IU length (16384) ignored" errors following by others.

MFC after:	2 weeks
2016-05-13 18:55:03 +00:00
Pedro F. Giffuni
453130d9bf sys/dev: minor spelling fixes.
Most affect comments, very few have user-visible effects.
2016-05-03 03:41:25 +00:00
Alexander Motin
50f2c01d32 Simplify memory allocation for NS requests.
Since we no longer need additional buffers for request and response IOCBs,
we can increase receive space by 192 bytes, that is enough for fetching 48
more ports.  The new limit is 1020 fabric ports per virtual port.

MFC after:	1 month
2016-04-16 06:36:56 +00:00
Alexander Motin
212fad7469 Extract virtual port address from RQSTYPE_RPT_ID_ACQ.
This should close the race between request arriving on new target mode
virtual port and its scanner thread finally fetch its address for request
routing.
2016-04-14 20:49:01 +00:00
Alexander Motin
ace7039eaa Filter Port Database Changed notifications.
For some reason firmware sends Port Database Changed notifications in case
of explicit login requests from the driver when target port is unavailabe.
Those notifications don't give driver any new information, but only cause
infinite scan loop.
2016-04-13 10:35:17 +00:00
Alexander Motin
5f2638dabb Respect NVRAM topology settings on 24xx and above chips. 2016-04-13 07:04:04 +00:00
Alexander Motin
1521935737 Make all CT Pass-Through (name server requests) asynchronous.
Previously we had to do it synchronously because we could not drop the lock
due to potential scratch memory use conflicts.  Previous commits fixed that
collision, so here it goes -- slower and less reliable external requests
are executed asynchronously without spinning in tight loop and with more
safe timeout handling.
2016-04-12 18:50:37 +00:00
Alexander Motin
e3188c2f31 Switch isp_getpdb() to synchronous IOCB DMA area.
While technically it is not IOCB, it is synchronous and can be called from
different places, so calling FC_SCRATCH_ACQUIRE() here is inconvenient.
2016-04-12 14:43:17 +00:00
Alexander Motin
4ff970c462 Allocate separate DMA area for synchronous IOCB execution.
Usually IOCBs should be put on queue for asynchronous processing and should
not require additional DMA memory.  But there are some cases like aborts and
resets that for external reasons has to be synchronous.  Give those cases
separate 2*64 byte DMA area to decouple them from other DMA scratch area
users, using it for asynchronous requests.
2016-04-12 14:19:19 +00:00
Alexander Motin
53791a95a4 Reimplement ISP_TSK_MGMT IOCTL via asynchronous request.
I am not sure this code is not completely dead, but it used DMA scratch
are without good reason and asked to be refactored.
2016-04-12 12:31:41 +00:00
Alexander Motin
003c82d713 Add couple missing memory barriers. 2016-04-12 11:48:50 +00:00
Alexander Motin
5e3e6a8241 Polish debugging IOCB dumping.
Add few more missing cases, unify byte order.

MFC after:	1 month
2016-04-11 10:48:26 +00:00
Alexander Motin
7e53e7accc Register symbolic port/node names in FC name server.
This is cosmetics that simplifies identification of new ports on FC switch.

It would be good to use target name from CTL here instead of hostname, but
it is not passed here through CAM now.

MFC after:	2 weeks
2016-04-09 14:50:47 +00:00
Alexander Motin
06c5618335 Reduce code duplication when executing Passthrough IOCB.
MFC after:	2 weeks
2016-04-09 11:54:09 +00:00
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
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
e6a86de218 Fix error code that looks like wrong. 2015-10-27 09:33:47 +00:00