The fields "major", "max_outstanding", and "usage_count"
of struct ctlr_info were not used for anything.
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Reviewed-by: Mike Miller <michael.miller@canonical.com> Reviewed-by: Webb Scales <webb.scales@hp.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Ben Hutchings [Wed, 19 Feb 2014 01:06:42 +0000 (01:06 +0000)]
mvsas: Recognise device/subsystem 9485/9485 as 88SE9485
Matt Taggart reported that mvsas didn't bind to the Marvell
SAS controller on a Supermicro AOC-SAS2LP-MV8 board.
lspci reports it as:
01:00.0 RAID bus controller [0104]: Marvell Technology Group Ltd. Device [1b4b:9485] (rev 03)
Subsystem: Marvell Technology Group Ltd. Device [1b4b:9485]
[...]
Add it to the device table as chip_9485.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Reported-by: Matt Taggart <taggart@debian.org> Tested-by: Matt Taggart <taggart@debian.org> Acked-By: Jan "Yenya" Kasprzak <kas@fi.muni.cz> Signed-off-by: Christoph Hellwig <hch@lst.de>
Tomas Henzl [Wed, 28 May 2014 16:04:20 +0000 (18:04 +0200)]
mptfusion: fix msgContext in mptctl_hp_hostinfo
Hi,
without this patch the istwiRWRequest->MsgContext is always set to zero,
this patch saves the MsgContext in a msgcontext variable and then restores
the value.
Thanks to David Jeffery who found the issue and did the analysis.
Signed-off-by: Tomas Henzl <thenzl@redhat.com> Acked-by: Desai, Kashyap <Kashyap.Desai@lsi.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Paul Bolle [Sat, 24 May 2014 10:13:53 +0000 (12:13 +0200)]
acornscsi: remove linked command support
The acornscsi driver was added in v2.1.88. It has always #undef-ed
CONFIG_SCSI_ACORNSCSI_LINK near the top of acornscsi.c. And, just to be
sure, it has also always triggered a preprocessor error if
CONFIG_SCSI_ACORNSCSI_LINK was still defined. But, as far as I can see,
it has never even been possible to set SCSI_ACORNSCSI_LINK through
kconfig, or its predecessors, in the first place.
Let's remove the code involved.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
Finn Thain [Wed, 28 May 2014 14:43:43 +0000 (00:43 +1000)]
scsi/NCR5380: dprintk macro
This is the delta between the two submissions:
[PATCH 00/12] scsi/NCR5380: fix debugging macros and #include structure
and
[PATCH v2 00/12] scsi/NCR5380: fix debugging macros and #include structure
The macro definition changes were discussed on the mailing list during
review. The idea is to get the compiler to check the parameters of
disabled printk() calls so that the debugging code doesn't rot again.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Christoph Hellwig <hch@lst.de>
Matthew Wilcox [Thu, 27 Mar 2014 20:40:35 +0000 (16:40 -0400)]
fusion: Add free msg frames to the head, not tail of list
Reusing a msg frame quickly means it's still cache-hot. This yields
a small but noticable performance improvement in a well-known database
benchmark. This improvement is already present in the mpt3sas driver.
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com> Reviewed-by: Nicholas Bellinger <nab@linux-iscsi.org> Reviewed-by: Praveen Krishnamoorthy <Praveen.krishnamoorthy@lsi.com> Acked-by: Sreekanth Reddy <Sreekanth.reddy@lsi.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Matthew Wilcox [Thu, 27 Mar 2014 20:40:34 +0000 (16:40 -0400)]
mpt2sas: Add free smids to the head, not tail of list
Reusing a smid quickly means it's still cache-hot. This yields a small
but noticable performance improvement in a well-known database benchmark.
This improvement is already present in the mpt3sas driver.
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com> Reviewed-by: Nicholas Bellinger <nab@linux-iscsi.org> Reviewed-by: Praveen Krishnamoorthy <Praveen.krishnamoorthy@lsi.com> Acked-by: Sreekanth Reddy <Sreekanth.reddy@lsi.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Matthew Wilcox [Thu, 27 Mar 2014 20:40:32 +0000 (16:40 -0400)]
mpt2sas: Remove uses of serial_number
The mpt2sas_scsih_issue_tm() function does not use the 'serial_number'
argument passed to it. Removing it removes the last vestiges of the
scsi_cmnd's serial_number field from this driver.
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com> Reviewed-by: Nicholas Bellinger <nab@linux-iscsi.org> Reviewed-by: Praveen Krishnamoorthy <Praveen.krishnamoorthy@lsi.com> Acked-by: Sreekanth Reddy <Sreekanth.reddy@lsi.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Matthew Wilcox [Thu, 27 Mar 2014 20:40:30 +0000 (16:40 -0400)]
mpt3sas: Remove uses of serial_number
The mpt3sas_scsih_issue_tm() function does not use the 'serial_number'
argument passed to it. Removing it removes the last vestiges of the
scsi_cmnd's serial_number field from this driver.
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com> Reviewed-by: Nicholas Bellinger <nab@linux-iscsi.org> Reviewed-by: Praveen Krishnamoorthy <Praveen.krishnamoorthy@lsi.com> Acked-by: Sreekanth Reddy <Sreekanth.reddy@lsi.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
be2iscsi: Fix processing cqe for cxn whose endpoint is freed
During heavy IO in multipath environment with many active sessions
and port-bouncing happening, there is a race condition because of
which beiscsi_prcess_cqe() gets called for a connection whose
endpoint is freed.
Checking endpoint reference for a connection before processing in
beiscsi_process_cq().
Signed-off-by: Minh Tran <minhduc.tran@emulex.com> Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
be2iscsi: Fix destroy MCC-CQ before MCC-EQ is destroyed
EQ teardown should happen only after all CQ are destroyed.
In some FW config, adapter goes into a freeze state. This
fix moves teardown of MCC-Q before the EQ teardown happens.
Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
Sent: Friday, March 28, 2014 1:42 AM
Subject: re: [SCSI] be2iscsi: Fix handling timed out MBX completion from FW
Hello Jayamohan Kallickal,
The patch 1957aa7f6246: "[SCSI] be2iscsi: Fix handling timed out MBX completion from FW" from Jan 29, 2014, leads to the following static checker warning:
drivers/scsi/be2iscsi/be_main.c:5581 beiscsi_dev_probe()
error: memset() '&phba->ctrl.ptag_state[i]->tag_mem_state' too small (24 vs 32)
drivers/scsi/be2iscsi/be_main.c
5576 for (i = 0; i < MAX_MCC_CMD; i++) {
5577 init_waitqueue_head(&phba->ctrl.mcc_wait[i + 1]);
5578 phba->ctrl.mcc_tag[i] = i + 1;
5579 phba->ctrl.mcc_numtag[i + 1] = 0;
5580 phba->ctrl.mcc_tag_available++;
5581 memset(&phba->ctrl.ptag_state[i].tag_mem_state, 0,
5582 sizeof(struct beiscsi_mcc_tag_state));
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Probably this this be change to sizeof(struct be_dma_mem struct)? It looks like we are corrupting memory a bit here.
5583 }
regards,
dan carpenter
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
be2iscsi: Fix TCP parameters while connection offloading.
SKH-R adapter, TCP Window Size/Scale parameters are passed
in TCP Connection Offload Mbx Command.
Signed-off-by: Minh Tran <minhduc.tran@emulex.com> Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Minh Tran <minhduc.tran@emulex.com> Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
be2iscsi: Fix exposing Host in sysfs after adapter initialization is complete
Before probe for function was completed, iSCSI Daemon had initiated login
to target while OS was coming up. The targets which had node.startup=automatic,
login process was initiated.Since function specific initialization was still in
progress this lead to kernel panic.
Fixed the issue by moving iscsi_host_add() call after adapter initialization
is done.
Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
be2iscsi: Fix retrieving MCCQ_WRB in non-embedded Mbox path
Getting WRB for MCCQ posting was done before looking if tag is
available or not. This lead to increase phba->ctrl.mcc_obj.q.used
variable and the WARN_ON message was coming from wrb_from_mccq().
Moved getting wrb from mccq after checking for the tag.
In wrb_from_mccq(), memset is done before returning wrb ptr.
Removed memset of mccq wrb from all other functions.
Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Error handling in UFS driver is broken and resets the host controller
for fatal errors without re-initialization. Correct the fatal error
handling sequence according to UFS Host Controller Interface (HCI)
v1.1 specification.
o Processed requests which are completed w/wo error are reported to
SCSI layer and any pending commands that are not started are aborted
in the controller and re-queued into scsi mid-layer queue.
o Upon determining fatal error condition the host controller may hang
forever until a reset is applied. Block SCSI layer for sending new
requests and apply reset in a separate error handling work.
o SCSI is informed about the expected Unit-Attention exception from the
device for the immediate command after a reset so that the SCSI layer
take necessary steps to establish communication with the device.
As of now SCSI initiated error handling is broken because,
the reset APIs don't try to bring back the device initialized and
ready for further transfers.
In case of timeouts, the scsi error handler takes care of handling aborts
and resets. Improve the error handling in such scenario by resetting the
device and host and re-initializing them in proper manner.
scsi: ufs: Fix hardware race conditions while aborting a command
There is a possible race condition in the hardware when the abort
command is issued to terminate the ongoing SCSI command as described
below:
- A bit in the door-bell register is set in the controller for a
new SCSI command.
- In some rare situations, before controller get a chance to issue
the command to the device, the software issued an abort command.
- If the device recieves abort command first then it returns success
because the command itself is not present.
- Now if the controller commits the command to device it will be
processed.
- Software thinks that command is aborted and proceed while still
the device is processing it.
- The software, controller and device may go out of sync because of
this race condition.
To avoid this, query task presence in the device before sending abort
task command so that after the abort operation, the command is guaranteed
to be non-existent in both controller and the device.
Currently, sending Task Management (TM) command to the card might
be broken in some scenarios as listed below:
Problem: If there are more than 8 TM commands the implementation
returns error to the caller.
Fix: Wait for one of the slots to be emptied and send the command.
Problem: Sometimes it is necessary for the caller to know the TM service
response code to determine the task status.
Fix: Propogate the service response to the caller.
Problem: If the TM command times out no proper error recovery is
implemented.
Fix: Clear the command in the controller door-bell register, so that
further commands for the same slot don't fail.
Problem: While preparing the TM command descriptor, the task tag used
should be unique across SCSI/NOP/QUERY/TM commands and not the
task tag of the command which the TM command is trying to manage.
Fix: Use a unique task tag instead of task tag of SCSI command.
Problem: Since the TM command involves H/W communication, abruptly ending
the request on kill interrupt signal might cause h/w malfunction.
Fix: Wait for hardware completion interrupt with TASK_UNINTERRUPTIBLE
set.
Fix many warnings with incorrect endian assumptions
which makes the code unportable to new architectures.
The UFS specification defines the byte order as big-endian
for UPIU structure and little-endian for the host controller
transfer/task management descriptors.
Joe Handzik [Wed, 21 May 2014 16:16:01 +0000 (11:16 -0500)]
hpsa: fix bad comparison of signed with unsigned in hpsa_update_scsi_devices
rescan_hba_mode was defined as a u8 so could never be less than zero:
rescan_hba_mode = hpsa_hba_mode_enabled(h);
if (rescan_hba_mode < 0)
goto out;
Signed-off-by: Joe Handzik <joseph.t.handzik@hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Finn Thain [Tue, 18 Mar 2014 00:42:24 +0000 (11:42 +1100)]
scsi/NCR5380: merge sun3_scsi_vme.c into sun3_scsi.c
The sun3 drivers suffer from a whole bunch of duplicated code. Fix this
by following the g_NCR5380_mmio example. (Notionally, sun3_scsi relates to
sun3_scsi_vme in the same way that g_NCR5380 relates to g_NCR5380_mmio.)
Dead code is also removed: we now have working debug macros so
SUN3_SCSI_DEBUG is undesirable. Dead code within #ifdef OLD_DMA is also
dropped, consistent with sun3_scsi_vme.c.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Acked-by: Sam Creasey <sammy@sammy.net> Signed-off-by: Christoph Hellwig <hch@lst.de>
Finn Thain [Tue, 18 Mar 2014 00:42:22 +0000 (11:42 +1100)]
scsi/NCR5380: remove unused macro definitions
Remove the unused (and divergent) debugging macro definitions from
the sun3_NCR5380 and atari_NCR5380 drivers. These drivers have been
converted to use the common macros in NCR5380.h.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Acked-by: Sam Creasey <sammy@sammy.net> Acked-by: Michael Schmitz <schmitz@debian.org> Signed-off-by: Christoph Hellwig <hch@lst.de>
Move all of the NDEBUG_ABORT, NDEBUG_TAGS and NDEBUG_MERGING macro
definitions into NCR5380.h where all the other NDEBUG macros live.
Also, incorrect "#ifdef NDEBUG" becomes "#if NDEBUG" to fix the warning:
drivers/scsi/mac_scsi.c: At top level:
drivers/scsi/NCR5380.c:418: warning: 'NCR5380_print' defined but not used
drivers/scsi/NCR5380.c:459: warning: 'NCR5380_print_phase' defined but not used
The debugging code is now enabled when NDEBUG != 0.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Acked-by: Sam Creasey <sammy@sammy.net> Signed-off-by: Christoph Hellwig <hch@lst.de>
Finn Thain [Tue, 18 Mar 2014 00:42:20 +0000 (11:42 +1100)]
scsi/NCR5380: adopt dprintk()
All NCR5380 drivers already include the NCR5380.h header. Better to
adopt those macros rather than have three variations on them.
Moreover, the macros in NCR5380.h are preferable because the atari_NCR5380
and sun3_NCR5380 versions are inflexible. For example, they can't accomodate
dprintk(NDEBUG_MAIN | NDEBUG_QUEUES, ...)
Replace the *_PRINTK macros from atari_NCR5380.h and sun3_NCR5380.h with
the equivalent macros from NCR5380.h.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Acked-by: Sam Creasey <sammy@sammy.net> Acked-by: Michael Schmitz <schmitz@debian.org> Signed-off-by: Christoph Hellwig <hch@lst.de>
Finn Thain [Tue, 18 Mar 2014 00:42:19 +0000 (11:42 +1100)]
scsi/NCR5380: adopt NCR5380_dprint() and NCR5380_dprint_phase()
All NCR5380 drivers already include the NCR5380.h header. Better to
adopt those macros rather than have three variations on them.
Moreover, the macros in NCR5380.h are preferable anyway: the atari_NCR5380
and sun3_NCR5380 versions are inflexible. For example, they can't accomodate
NCR5380_dprint(NDEBUG_MAIN | NDEBUG_QUEUES, ...)
Replace the NCR_PRINT* macros from atari_NCR5380.h and sun3_NCR5380.h with
the equivalent macros from NCR5380.h.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Acked-by: Sam Creasey <sammy@sammy.net> Acked-by: Michael Schmitz <schmitz@debian.org> Signed-off-by: Christoph Hellwig <hch@lst.de>
Finn Thain [Tue, 18 Mar 2014 00:42:18 +0000 (11:42 +1100)]
scsi/NCR5380: fix dprintk macro usage and definition
There are three implementations of the core NCR5380 driver and three sets
of debugging macro definitions. And all three implementations use the
NCR5380.h header as well.
Two of the definitions of the dprintk macro accept a variable argument list
whereas the third does not. Standardize on the variable argument list.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Acked-by: Sam Creasey <sammy@sammy.net> Signed-off-by: Christoph Hellwig <hch@lst.de>
Finn Thain [Tue, 18 Mar 2014 00:42:17 +0000 (11:42 +1100)]
scsi/NCR5380: fix build failures when debugging is enabled
The change from cmd->target to cmd->device->id was apparently the purpose of
commit a7f251228390e87d86c5e3846f99a455517fdd8e in
kernel/git/tglx/history.git but some instances have been missed.
Also fix the "NDEBUG_LAST_WRITE_SENT" and "NDEBUG_ALL" typo's.
Also fix some format strings (%ul becomes %lu) that caused compiler warnings.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Acked-by: Sam Creasey <sammy@sammy.net> Signed-off-by: Christoph Hellwig <hch@lst.de>
Finn Thain [Tue, 18 Mar 2014 00:42:16 +0000 (11:42 +1100)]
scsi/NCR5380: use NCR5380_dprint() instead of NCR5380_print()
Only the NCR5380_dprint() macro should invoke the NCR5380_print() function.
That's why NCR5380.c only defines the function #if NDEBUG. Use the standard
macro.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Acked-by: Sam Creasey <sammy@sammy.net> Signed-off-by: Christoph Hellwig <hch@lst.de>
bnx2fc: fix memory leak and potential NULL pointer dereference.
If bnx2fc_allocate_hash_table() for some reasons fails, it is possible that the
hash_tbl_segments or the hash_tbl_pbl pointers are NULL.
In this case bnx2fc_free_hash_table() will panic the system.
this patch also fixes a memory leak, the hash_tbl_segments pointer was never
freed.
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com> Acked-by: Eddie Wai <eddie.wai@broadcom.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Joe Handzik [Thu, 15 May 2014 20:44:47 +0000 (15:44 -0500)]
hpsa: do not ignore failure of sense controller parameters command
Signed-off-by: Joe Handzik <joseph.t.handzik@hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Joe Handzik [Thu, 15 May 2014 20:44:42 +0000 (15:44 -0500)]
hpsa: fix memory leak in hpsa_hba_mode_enabled
And while we're at it fix a magic number
Signed-off-by: Joe Handzik <joseph.t.handzik@hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Joe Handzik [Thu, 8 May 2014 19:27:24 +0000 (14:27 -0500)]
hpsa: add new Smart Array PCI IDs (May 2014)
Signed-off-by: Scott Teel <scott.teel@hp.com> Signed-off-by: Joe Handzik <joseph.t.handzik@hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Cc: stable@vger.kernel.org Signed-off-by: Christoph Hellwig <hch@lst.de>
pm80xx : Fix missing NULL pointer checks and memory leaks
Checking return value for the memory allocattion and freeing it
while exiting the function
Signed-off-by: Viswas G <Viswas.G@pmcs.com> Signed-off-by: Suresh Thiagarajan <Suresh.Thiagarajan@pmcs.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Acked-by: Jack Wang <xjtuwjp@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Ming Lei [Thu, 8 May 2014 07:23:45 +0000 (15:23 +0800)]
virtio_scsi: remove ACCESS_ONCE() and smp_read_barrier_depends()
Access to tgt->req_vq is strictly serialized by spin_lock
of tgt->tgt_lock, so the ACCESS_ONCE() isn't necessary.
smp_read_barrier_depends() in virtscsi_req_done was introduced
to order reading req_vq and decreasing tgt->reqs, but it isn't
needed now because req_vq is read from
scsi->req_vqs[vq->index - VIRTIO_SCSI_VQ_BASE] instead of
tgt->req_vq, so remove the unnecessary barrier.
Also remove related comment about the barrier.
Signed-off-by: Ming Lei <tom.leiming@gmail.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
James Smart [Wed, 7 May 2014 21:16:46 +0000 (17:16 -0400)]
lpfc: Add iotag memory barrier
Add a memory barrier to ensure the valid bit is read before
any of the cqe payload is read. This fixes an issue seen
on Power where the cqe payload was getting loaded before
the valid bit. When this occurred, we saw an iotag out of
range error when a command completed, but since the iotag
looked invalid the command didn't get completed to scsi core.
Later we hit the command timeout, attempted to abort the command,
then waited for the aborted command to get returned. Since the
adapter already returned the command, we timeout waiting,
and end up escalating EEH all the way to host reset. This
patch fixes this issue.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Smart <james.smart@emulex.com>
---
[Resend of earlier patch - added equivalent changes to sun3 NCR5380 code]
The abort/reset lowlevel return codes had changed with the new
error SCSI handling - update Atari and Sun3 NCR5380 drivers to reflect this.
Change reset handling for Atari to clear queues only, do not attempt
to call done() on each command aborted by the reset. The EH code
should do that for us. Queues _must_ be cleared, otherwise
atari_scsi_bus_reset will not release the ST-DMA lock, deadlocking
further error recovery.
Update the Sun3 NCR5380 driver as well - the Sun3 driver was
derived from the Atari one. Kudos to Finn Thain for the Sun3 part
and cleaning up the header files. After the header cleanup, the
initio.h include (!) can be dropped from sun3_scsi.h now.
Signed-off-by: Michael Schmitz <schmitz@debian.org> Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Acked-by: Sam Creasey <sammy@sammy.net> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: James E.J. Bottomley <JBottomley@parallels.com> Cc: linux-scsi@vger.kernel.org Signed-off-by: Christoph Hellwig <hch@lst.de>
Marek Vasut [Tue, 22 Apr 2014 18:23:39 +0000 (20:23 +0200)]
esas2r: Fix comment
Minor fix for a message in the driver so that it matches the function name.
Signed-off-by: Marek Vasut <marex@denx.de> Cc: James Bottomley <JBottomley@Parallels.com> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Acked-by: Bradley Grove <bgrove@attotech.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
bfa: allocate memory with GFP_ATOMIC in spinlock context
bfa_fcb_pbc_vport_create() is called only from bfa_fcs_pbc_vport_init(),
that is called only from bfad_drv_start() with bfad_lock spinlock held.
So the patch replaces GFP_KERNEL with GFP_ATOMIC to avoid
sleeping in atomic spinlock context.
Found by Linux Driver Verification project (linuxtesting.org).
qla4xxx: Fix smatch warning in func qla4xxx_get_ep_param
Fix following smatch warning:-
drivers/scsi/qla4xxx/ql4_os.c:1752 qla4xxx_get_ep_param() warn: variable dereferenced before check 'qla_ep' (see line 1745)
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Christoph Hellwig <hch@lst.de>
Issue:
modprobe qla4xxx is killed by systemd due to timeout.
Solution:
The exporting of sysfs DDBs from qla4xxx_probe_adapter added delay of
approximately 15s due to which system-udevd killed the modprobe of the
driver. Added fix to export the sysfs DDBs from the DPC handler.
Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Christoph Hellwig <hch@lst.de>
Update Maintainers for IBM Power 842, vscsi, and vfc drivers
Update the MAINTAINERS file to indicate the current maintainers
for the IBM Power 842 Compression driver, IBM Power Virtual SCSI
driver and the IBM Power Virtual FC Driver.
Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Acked-by: Robert Jennings <rob@pochix.net> Signed-off-by: Christoph Hellwig <hch@lst.de>
Shlomo Pongratz [Sun, 30 Mar 2014 12:26:29 +0000 (15:26 +0300)]
scsi/libiscsi: Fix static checker warning on bh locking
Commit 659743b "[SCSI] libiscsi: Reduce locking contention in fast path" introduced a
new smatch warning on libiscsi.c "iscsi_xmit_task() warn: inconsistent returns
bottom_half:: locked (1410 [(-61)]) unlocked (1425 [0], 1425 [s32min-(-1),1-s32max])",
which we can eliminate by using non bh locking on the nested spin_lock call.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Christoph Hellwig <hch@lst.de>
Hiral Shah [Fri, 18 Apr 2014 19:28:19 +0000 (12:28 -0700)]
fnic: fnic Control Path Trace Utility
Fnic Ctlr Path Trace utility is a tracing functionality built directly into fnic
driver to trace the control path frames like discovery, FLOGI request/reply,
PLOGI request/reply, link event etc. It will be one trace file for all fnics.
It will help us to debug and resolve the discovery and initialization related
issues in more convenient way. This trace information includes time stamp,
Host Number, Frame type, Frame Length and Frame. By default,64 pages are
allocated but we can change the number of allocated pages by module parameter
fnic_fc_trace_max_page. Each entry is of 256 byte and available entries are
depends on allocated number of pages. We can turn on or off the fnic control
path trace functionality by module paramter fc_trace_enable and/or reset the
trace contain by module paramter fc_trace_clear.
Signed-off-by: Hiral Shah <hishah@cisco.com> Signed-off-by: Sesidhar Baddela <sebaddel@cisco.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Hiral Shah [Fri, 18 Apr 2014 19:28:18 +0000 (12:28 -0700)]
fnic: Failing to queue aborts due to Q full cause terminate driver timeout
In fnic abort handler, abort queuing can be failed when hardware queue is full.
The command state is left as abort queued. The command with abort queued state
will never be queued next time for abort or termiantion.
Fix restores the command state in above case.
Signed-off-by: Hiral Shah <hishah@cisco.com> Signed-off-by: Sesidhar Baddela <sebaddel@cisco.com> Signed-off-by: Narsimhulu Musini <nmusini@cisco.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Hiral Shah [Fri, 18 Apr 2014 19:28:17 +0000 (12:28 -0700)]
fnic: NoFIP solicitation frame in NONFIP mode and changed IO Throttle count
This patch contains following three minor fixes.
1) During Probe, fnic was sending FIP solicitation in Non FIP mode which is not
expected, setting the internal fip state to Non FIP mode explicitly, avoids
sending FIP frame.
2) When target goes offline, all outstanding IOs belong to the target will be
terminated by driver, If the termination count is high, then it influences
firmware responsiveness. To improve the responsiveness, default IO throttle
count is reduced to 256.
3) Accessing Virtual Fabric Id (vfid) and fc_map of Fibre-Channel Forwarder(FCF)
is invalid in fnic driver when Clear Virtual Link(CVL) is received prior to
receiving flogi reject from switch. As CVL clears all FCFs.
Signed-off-by: Hiral Shah <hishah@cisco.com> Signed-off-by: Sesidhar Baddela <sebaddel@cisco.com> Signed-off-by: Narsimhulu Musini <nmusini@cisco.com> Signed-off-by: Anantha Tungarakodi <atungara@cisco.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Chad Dupuis [Fri, 11 Apr 2014 20:54:46 +0000 (16:54 -0400)]
qla2xxx: Remove wait for online from host reset handler.
This can block progress of the SCSI error handler thread and cause long I/O
outages. Instead just fail immediately if another reset is going on or we are
accessing flash memory.
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Chad Dupuis [Fri, 11 Apr 2014 20:54:45 +0000 (16:54 -0400)]
qla2xxx: Do logins from a chip reset in DPC thread instead of the error handler thread.
Attempting to do any logins from the SCSI reset handler can lead to a deadlock
scenario if a rport times out and the FC transport layer. Move doing any port
logins to the DPC thread so as not to impede the progress of the SCSI error
handler thread and avoid deadlock situations.
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Fix double free problem within qla2xxx driver where
current code prematurely free qla_tgt_cmd while firmware
still has the command. When firmware release the command
after abort, the code attempt a second free as part of
command completion processing.
When TCM start the free process, NULL pointer was hit.
Add support for T10-Dif for Target Mode to qla driver.
The driver will look for firmware attribute that support
this feature. When the feature is present, the capabilities
will be report to TCM layer.
Add CTIO CRC2 iocb to build T10-Dif commands.
Add support routines to process good & error cases.
Signed-off-by: Quinn Tran <quinn.tran@qlogic.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Chad Dupuis [Fri, 11 Apr 2014 20:54:31 +0000 (16:54 -0400)]
qla2xxx: Avoid escalating the SCSI error handler if the command is not found in firmware.
If the firmware cannot find the command specified then return SUCCESS to the
error handler so as not to needlessly escalate. Also cleanup the resources for
the command since we cannot expect the original command to returned in
interrupt context.
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>