Commit Graph

6109 Commits

Author SHA1 Message Date
Bart Van Assche
2f0fbe66ff qla2x00t*: Simplify Makefiles
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8254 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-18 01:52:39 +00:00
Bart Van Assche
9355501156 qla2x00t-32gbit, target: Fix sqa_on_hw_pending_cmd_timeout()
Only call scst_tgt_cmd_done() for the QLA_TGT_STATE_PROCESSED state.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8253 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-18 01:51:22 +00:00
Bart Van Assche
87bb163e77 qla2x00t-32gbit, target: Fix handling of aborted commands
Ignore the return value of qlt_abort_cmd().


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8252 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-18 01:48:50 +00:00
Bart Van Assche
44f22b266f qla2x00t-32gbit, target: Adjust indentation
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8251 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-18 01:43:27 +00:00
Bart Van Assche
c5b658b8dd qla2x00t-32gbit, target: Remove unused code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8250 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-18 01:41:25 +00:00
Bart Van Assche
6575db6571 qla2x00t-32gbit, target: Inline sqa_free_sesess()
Improve code readability by inlining a single-line function.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8249 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-18 01:40:17 +00:00
Bart Van Assche
408b925f1f qla2x00t-32gbit, target: Remove superfluous casts
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8248 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-18 01:37:55 +00:00
Bart Van Assche
20b25ccd3f qla2x00t-32gbit: Declare qla_tgt_cmd.cdb const
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8247 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-18 01:35:52 +00:00
Bart Van Assche
4d1878443d qla2x00t-32gbit, target: Suppress a Coverity use-after-free complaint
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8246 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-18 01:33:59 +00:00
Bart Van Assche
3e0dbd0756 qla2x00t-32gbit, target: Fix a memory leak in an error path
Detected by Coverity.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8245 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-18 01:31:56 +00:00
Bart Van Assche
ff068db717 scst: Always check scst_suspend_activity() return value
This patch suppresses a Coverity complaint.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8244 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-18 01:29:18 +00:00
Bart Van Assche
9fb058542b nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8243 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-17 15:51:04 +00:00
Bart Van Assche
7c734399bd Update Subversion ignore lists
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8242 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-17 15:27:11 +00:00
Bart Van Assche
ce51f2981e qla2x00t-32gbit/Makefile_in-tree: Fix the target driver build rules
Reported-by: Sietse van Zanen <sietse@wizdom.nu>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8241 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-17 14:53:55 +00:00
Bart Van Assche
07f0bef684 qla2x00t-32gbit: Fix race conditions in the abort handling code
In the *_done() functions, instead of returning early if sp->ref_count >= 2,
only decrement sp->ref_count. In qla2xxx_eh_abort(), instead of deciding
what to do based on the value of sp->ref_count, decide which action to take
depending on the completion status of the firmware abort.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8240 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 20:11:31 +00:00
Bart Van Assche
a545bbc2ef qla2x00t-32gbit: Use an on-stack completion in qla24xx_control_vp()
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8239 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 20:08:20 +00:00
Bart Van Assche
86c69ab494 scst/include/backport.h: Remove the wait_event_lock_irq_timeout() backport
Due to the previous patch this backport is no longer needed. Note: the
wait_event_lock_irq_timeout() needs more work.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8238 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 16:25:46 +00:00
Bart Van Assche
acba3a9a6d qla2x00t-32gbit: Revert r8226
Since r8226 is not a full solution and since it relies on
wait_event_lock_irq_timeout(), revert it.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8237 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 16:20:11 +00:00
Bart Van Assche
338d9d7611 qla2xxx: Unregister resources in the opposite order of the registration order
Make sure that resources are only unregistered after the users of these
resources have been unregistered. Only unregister the character device if
registration of it succeeded.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8236 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:35:43 +00:00
Bart Van Assche
bfefaa0180 qla2xxx: Unregister chrdev if module initialization fails
If module initialization fails after the character device has been
registered, unregister the character device. Additionally, avoid
duplicating error path code.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8235 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:34:50 +00:00
Bart Van Assche
0f7639a9a2 qla2xxx: Use get/put_unaligned where appropriate
This patch makes the code easier to read but does not change any
functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8234 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:34:26 +00:00
Bart Van Assche
5da65c0be7 qla2xxx: Make qla2x00_process_response_queue() easier to read
Make qla2x00_process_response_queue() easier to read by splitting this
function. This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8233 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:30:27 +00:00
Bart Van Assche
8eb2cd5104 qla2xxx: Declare local symbols static
This patch avoids that sparse complains that a declaration is missing.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8232 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:29:58 +00:00
Bart Van Assche
9696dfb235 qla2xxx: Use ARRAY_SIZE() in the definition of QLA_LAST_SPEED
Make the code easier to read by avoiding to use a hard-coded constant. This
patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8231 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:29:34 +00:00
Bart Van Assche
674a38d006 qla2xxx: Change a stack variable into a static const variable
Make qla2x00_get_host_fabric_name() slightly faster by changing a stack
array into a static array. Declare that array const now that the
wwn_to_u64() argument pointer has been declared const.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8230 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:29:07 +00:00
Bart Van Assche
22af9c7653 qla2xxx: Fix spelling mistake "alredy" -> "already"
There is a spelling mistake in a ql_log message. Fix it.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8229 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:28:40 +00:00
Bart Van Assche
5892ed7ed1 qla2xxx: Remove useless memset()
The memory return by kzalloc() has already be set to zero, so remove
useless memset(0).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8228 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:28:05 +00:00
Bart Van Assche
3548f0998a qla2xxx: Update driver version to 10.01.00.16-k
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8227 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:27:20 +00:00
Bart Van Assche
371c5d00e3 qla2xxx: Change abort wait_loop from msleep to wait_event_timeout
This patch converts driver wait time from using msleep to
wair_event_timeout to prevent race condition.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8226 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:26:57 +00:00
Bart Van Assche
16f7d633dd qla2xxx: Fix driver unload when FC-NVMe LUNs are connected
This patch allows driver to unload using "modprobe -r" when FC-NVMe LUNs
are connected.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8225 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:26:34 +00:00
Bart Van Assche
1e7c4b0d9b qla2xxx: Remove redundant qla2x00_abort_all_cmds during unload
This patch removes redundant qla2x00_abort_all_cmds() during driver unload.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8224 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:26:12 +00:00
Bart Van Assche
c4e0fbce6f qla2xxx: Cleanup fcport memory to prevent leak
Clean up fcport list and loopid in one place and iterate through for loop.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8223 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:25:48 +00:00
Bart Van Assche
a32be9e6d2 qla2xxx: Protect qla2x00_sysfs_read_fw_dump() with a mutex
Add mutex protection to prevent driver from freeing the FW dump buffer
while the extraction is in progress.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8222 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:25:24 +00:00
Bart Van Assche
81a25cb3e0 qla2xxx: Fix fw dump corruption
If fw dump buffer size changes and there is an existing fw dump, then save
the old dump in the newly allocated buffer.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8221 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:24:43 +00:00
Bart Van Assche
b93f3b4b8c qla2xxx: Further limit FLASH region write access from SysFS
Recent ISPs have larger and more complex flash-write semantics
(secure-access and signing). The BSG interfaces support these semantics for
all ISPs and is exclusively used by QLogic user-space tools. Limit
flash-write operations to ISPs <= 25xx.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8220 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:24:17 +00:00
Bart Van Assche
10505579af qla2xxx: Fix incorrect region-size setting in optrom SYSFS routines
Commit e6f77540c067 ("scsi: qla2xxx: Fix an integer overflow in sysfs
code") incorrectly set 'optrom_region_size' to 'start+size', which can
overflow option-rom boundaries when 'start' is non-zero.  Continue setting
optrom_region_size to the proper adjusted value of 'size'.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8219 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:23:55 +00:00
Bart Van Assche
a686180c77 qla2xxx: Disable T10-DIF feature with FC-NVMe during probe
With FC-NVMe enabled, driver does not support T10 DIF/DIX. This patch
disables T10-PI information when ql2xnvmeenable is set.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8218 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:23:33 +00:00
Bart Van Assche
e1ae689531 qla2xxx: Increase max_sgl_segments to 1024
This patch increases max_sgl_segments from 128 to the maximum supported
which is 1024. Increasing max_sgl_segments allows the driver to support
larger I/O sizes.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8217 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:23:00 +00:00
Bart Van Assche
32324e46de qla2xxx: Reset the FCF_ASYNC_{SENT|ACTIVE} flags
Driver maintains state machine for processing and completing switch
commands. This patch resets FCF_ASYNC_{SENT|ACTIVE} flag to indicate if the
previous command is active or sent, in order for next GPSC command to
advance the state machine.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8216 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:22:14 +00:00
Bart Van Assche
03427baae1 qla2xxx: Set the qpair in SRB to NULL when SRB is released
This patch sets QPair pointer to NULL to prevent abort command racing ahead
of normal command completion handling during scsi_done call.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8215 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:21:34 +00:00
Bart Van Assche
eb4388978e qla2xxx: Set the SCSI command result before calling the command done
This patch tries to address race condition between abort handler and
completion handler. When scsi command result is set by both abort and
completion handler, scsi_done() is only called after refcount on SRB
structure goes to zero. The abort handler sets this result prematurely even
when the refcount is non-zero value. Fix this by setting SCSI cmd->result
before scsi_done() is called.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8214 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:21:01 +00:00
Bart Van Assche
6093c63ba1 qla2xxx: Simplify conditional check again
Clang warns when it sees a logical not on the left side of a conditional
statement because it thinks the logical not should be applied to the whole
statement, not just the left side:

drivers/scsi/qla2xxx/qla_nx.c:3703:7: warning: logical not is only
applied to the left hand side of this comparison
[-Wlogical-not-parentheses]

This particular instance was already fixed by commit 0bfe7d3cae58 ("scsi:
qla2xxx: Simplify conditional check") upstream but it was reintroduced by
commit 3695310e37b4 ("scsi: qla2xxx: Update flash read/write routine") in
the 5.2/scsi-queue.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8213 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:20:36 +00:00
Bart Van Assche
c93f1c41ab qla2xxx: Fix a small typo in qla_bsg.c
Fixed a typo for 'iiDMA' cmd in qla_bsg.c.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8212 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:20:10 +00:00
Bart Van Assche
176993a766 qla2xxx: Fix comment alignment in qla_bsg.c
Fix a minor formatting issue with comment section in qla_bsg.c.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8211 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:19:48 +00:00
Bart Van Assche
de350a3ca4 qla2xxx: Update driver version to 10.01.00.15-k
This version includes support for ISP28XX.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8210 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:19:21 +00:00
Bart Van Assche
3e397c0d71 qla2xxx: Secure flash update support for ISP28XX
This patch adds support for Secure flash update with ISP28xx.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8209 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:18:59 +00:00
Bart Van Assche
e273f3dedb qla2xxx: Add 28xx flash primary/secondary status/image mechanism
Includes the following:
- correction to 27xx image status struct;
- factoring of 27xx image status validating routines to make common;
- image status generation compare that works across zero wrap;
- bsg interface to report current active images (as loaded by driver).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8208 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:18:36 +00:00
Bart Van Assche
386626802f qla2xxx: Simplify register address used in qla_tmpl.c
Reduce stack space on each fwdt routine by eliminating local variable reg.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8207 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:18:11 +00:00
Bart Van Assche
f6fc5d8484 qla2xxx: Correction and improvement to fwdt processing
This patch cleans up and fixes firmware dump template processing. These
changes are added to support newer features for ISP27XX/ISP28XX.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8206 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:17:21 +00:00
Bart Van Assche
cfe8d10222 qla2xxx: Update flash read/write routine
This patch makes following changes to flash access routines:

- update return type for read_optrom
- use void instead of uint32_t * for buffer parameter in read
  and write optrom routines
- fix flash/nvram addressing


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8205 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-04-14 01:16:52 +00:00