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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
This patch adds multipe firmware dump template and segments support for
ISP27XX/28XX.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8203 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch fixes reported speed for min_link and max_supported speed. Also
rename sysfs nodes link_speed and max_supported to be consistent with
{min|max}_suuported_speed.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8201 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch adds sysfs node for serdes_version and also cleans up port_speed
display.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8200 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch adds PCI device ID ISP28XX for Gen7 support. Also signature
determination for primary/secondary flash image for ISP27XX/28XX is added as
part of Gen7 support.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8199 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch removes FW default template as there will never be case where
the default template would be invoked.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8197 d57e44dd-8a1f-0410-8b47-8ef2f437770f