James Smart [Tue, 7 Apr 2015 19:07:29 +0000 (15:07 -0400)]
lpfc: Update version to 10.5.0.0 for upstream patch set
Update version to 10.5.0.0 for upstream patch set
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
James Smart [Tue, 7 Apr 2015 19:07:28 +0000 (15:07 -0400)]
lpfc: Update copyright to 2015
Update copyright to 2015
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
James Smart [Tue, 7 Apr 2015 19:07:27 +0000 (15:07 -0400)]
lpfc: Fix for lun discovery issue with saturn adapter.
FCP_CMD payload was not always properly initialized on SLI-3 devices.
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
James Smart [Tue, 7 Apr 2015 19:07:26 +0000 (15:07 -0400)]
lpfc: Fix crash in device reset handler.
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
James Smart [Tue, 7 Apr 2015 19:07:25 +0000 (15:07 -0400)]
lpfc: Fix OS crash when running loopback test in applications
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
James Smart [Tue, 7 Apr 2015 19:07:23 +0000 (15:07 -0400)]
lpfc: Fix internal loopback failure.
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
James Smart [Tue, 7 Apr 2015 19:07:22 +0000 (15:07 -0400)]
lpfc: Fix premature release of rpi bit in bitmask
Currently, the driver plays off the fact that older sli4 adapters have a
different rpi access pattern that allowed for the rpi reference to be
released earlier in the teardown sequence, allowing the driver to recycle
the rpi value sooner. Newer sli4 adapters have a different access pattern that
requires us to wait for a later mailbox completion. This changes the put
call location on the newer sli4 adapters.
Symptoms of the error are "0110 ELS" and the "0372 iotag" errors.
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
James Smart [Tue, 7 Apr 2015 19:07:21 +0000 (15:07 -0400)]
lpfc: Initiator sends wrong BBCredit value for either FLOGI or FLOGI_ACC
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
James Smart [Tue, 7 Apr 2015 19:07:20 +0000 (15:07 -0400)]
lpfc: Fix null ndlp dereference in target_reset_handler
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
James Smart [Tue, 7 Apr 2015 19:07:19 +0000 (15:07 -0400)]
lpfc: Fix FDMI Fabric support in driver for Brocade
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
James Smart [Tue, 7 Apr 2015 19:07:18 +0000 (15:07 -0400)]
lpfc: Fix provide host name and OS name in RSNN-NN FC-GS command
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
James Smart [Tue, 7 Apr 2015 19:07:17 +0000 (15:07 -0400)]
lpfc: Parse the new 20G, 25G and 40G link speeds in the lpfc driver
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
James Smart [Tue, 7 Apr 2015 19:07:16 +0000 (15:07 -0400)]
lpfc: Add support for reporting option_rom_version on newer adapters
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
James Smart [Tue, 7 Apr 2015 19:07:15 +0000 (15:07 -0400)]
lpfc: Fix setting of EQ (interrupt) delay Multiplier
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
James Smart [Tue, 7 Apr 2015 19:07:13 +0000 (15:07 -0400)]
lpfc: Fix host reset escalation killing all IOs.
Fix host reset escalation killing all IOs.
SLI-3 adapters will use a new host template. The template differs
from SLI-4 adapters in that it does not have an eh_host_reset_handler.
Lpfc has traditionally never had a host_reset. The host reset
handler was added when we ran into a stuck hardware condition on a
SLI-4 adapter. The host_reset will reset and reinit the pci function,
clearing the hardware condition.
Unfortunately, the host reset handler uses attach/detach code paths,
which makes scsi_add_host() and scsi_remove_host() calls. Meaning, a
host_reset will completely remove the scsi_host from the system. As a
new call to scsi_add_host() is made, the shost# changes, which results
in completely new scsi_devices and device names. All the older scsi
devices on the old shost# are now orphaned and unrecoverable.
We realize we need to re-implement the host_reset_handler so the scsi_host
stays registered across the host_reset, but that will be a rather
lengthy effort. In the short term, we had an immediate need to restore
the SLI-3 devices to their working behavior, with the easiest path being
to remove their host_reset handler.
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
James Smart [Tue, 7 Apr 2015 19:07:12 +0000 (15:07 -0400)]
lpfc: Linux lpfc driver doesn't re-establish the link after a cable pull on LPe12002
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
James Smart [Tue, 7 Apr 2015 19:07:11 +0000 (15:07 -0400)]
lpfc: Fix to handle PLOGI when already logged in
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
James Smart [Tue, 7 Apr 2015 19:07:10 +0000 (15:07 -0400)]
lpfc: Add new mbx cmd recognition
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
James Smart [Tue, 7 Apr 2015 19:07:09 +0000 (15:07 -0400)]
lpfc: Add Lancer Temperature Event support to the lpfc driver
This will detect and send an async event if overtemp is detected
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
James Smart [Tue, 7 Apr 2015 19:07:08 +0000 (15:07 -0400)]
lpfc: Fix the iteration count to match the 30 sec comment in the routine lpfc_pci_function_reset
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
James Smart [Thu, 2 Apr 2015 19:50:52 +0000 (15:50 -0400)]
scsi_transport_fc: Add support for 25Gbit speed
Signed-off-by: James Smart <james.smart@emulex.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:57 +0000 (23:11 +0100)]
aha1542: remove loop from aha1542_outb
The loop in aha1542_outb with double-check is no longer needed, remove it.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:56 +0000 (23:11 +0100)]
aha1542: Fix bus reset
Bus reset always fails because aha1542_reset waits for the controller to assert
the INIT bit (Mailbox Initialization Required) which it never does. This bit is
asserted only after host reset.
Remove the requirement for INIT bit (we really need only the IDLE bit).
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:55 +0000 (23:11 +0100)]
aha1542: rework locking
Remove aha1542_lock and use host_lock instead.
Remove interrupt and queuecommand function wrappers.
Remove locking from lowlevel _out and _in functions, they now can
onle be called (at runtime) with host_lock being held.
Remove ssleep(4) in aha1542_reset as we can't sleep while holding a spinlock.
It's useless anyway as wait_mask will wait until the controller is idle and
kernel waits for 10 seconds (HOST_RESET_SETTLE_TIME) after that.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:54 +0000 (23:11 +0100)]
aha1542: Don't reduce functionality with DEBUG enabled
Enabling DEBUG disables write commands and devices with ID > 1.
Remove this "feature" to allow real debugging.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:53 +0000 (23:11 +0100)]
aha1542: Use print_hex_dump_bytes in debug code
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:52 +0000 (23:11 +0100)]
aha1542: remove DEB macro and simplify debug code
Remove DEB macro and join ifdef DEBUG blocks
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:51 +0000 (23:11 +0100)]
aha1542: Use shost_printk instead of printk
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:50 +0000 (23:11 +0100)]
aha1542: Change aha1542_set_bus_times parameters
Pass struct Scsi_Host *sh and dma parameters instead of index to
aha1542_set_bus_times.
This is required for printk conversion.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:49 +0000 (23:11 +0100)]
aha1542: Pass struct Scsi_Host * to functions
Pass struct Scsi_Host * to functions instead of base address.
This reduces the number of parameters and is also required for printk
conversion.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:48 +0000 (23:11 +0100)]
aha1542: cleanup includes
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:47 +0000 (23:11 +0100)]
aha1542: remove useless changelog
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:46 +0000 (23:11 +0100)]
aha1542: fix include guard and remove useless changelog
Fix include guard in header file and remove useless changelog
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:45 +0000 (23:11 +0100)]
aha1542: Always name Scsi_Host variables sh
Make Scsi_Host variable names consistent - use sh everywhere.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:44 +0000 (23:11 +0100)]
aha1524: Use struct scsi_cmnd
Use struct scsi_cmnd instead of Scsi_Cmnd and also rename the variables
to get rid of SC prefix
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:43 +0000 (23:11 +0100)]
aha1542: clean up cmd variables
Make sure that there's no variable named cmd
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:42 +0000 (23:11 +0100)]
aha1542: Simplify aha1542_biosparam
Simplify aha1542_biosparam, use sector_div, remove unused BIOS_TRANSLATION_1632.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:41 +0000 (23:11 +0100)]
aha1542: rework configuration parameters
Remove __setup and introduce separate io, bus_on, bus_off and dma_speed
module parameters.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:40 +0000 (23:11 +0100)]
aha1542: rework hw_init
Cleanup hw_init, use goto for error handling.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:39 +0000 (23:11 +0100)]
aha1542: Call wait_mask from aha1542_out
aha1542_out call is always followed by wait_mask.
Move the call into aha1542_out to simplify code.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:38 +0000 (23:11 +0100)]
aha1542: split out code from aha1542_hw_init
Split out bus times related block of aha1542_hw_init into separate function
aha1542_set_bus_times.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:37 +0000 (23:11 +0100)]
aha1542: Merge aha1542_host_reset and aha1542_bus_reset
aha1542_host_reset and aha1542_bus_reset are almost same, merge them
into aha1542_reset
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:36 +0000 (23:11 +0100)]
aha1542: Remove aha1542_restart
aha1542_restart does nothing (except useless printk), remove it
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:35 +0000 (23:11 +0100)]
aha1542: remove useless code from aha1542_test_port
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:34 +0000 (23:11 +0100)]
aha1542: Remove unneeded gotos
Remove gotos that are no longer needed.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:33 +0000 (23:11 +0100)]
aha1542: Split aha1542_out
aha1542_out are in fact two separate functions.
Split them into aha1542_out and aha1542_outb to simplify the code.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:32 +0000 (23:11 +0100)]
aha1542: Unify aha1542_in and aha1542_in1
Unify aha1542_in and aha1542_in1 functions, they differ only in timeout
and printk.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:31 +0000 (23:11 +0100)]
aha1542: Remove WAIT and WAITd macros
Convert the ugly WAIT and WAITd macros into wait_mask function.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:30 +0000 (23:11 +0100)]
aha1542: Use BIT() macro
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:29 +0000 (23:11 +0100)]
aha1542: remove empty aha1542_stat
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:28 +0000 (23:11 +0100)]
aha1542: Reorder functions to remove forward declarations
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:27 +0000 (23:11 +0100)]
aha1542: Use u8 instead of unchar
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:26 +0000 (23:11 +0100)]
aha1542: Convert aha1542_intr_reset to function
Convert aha1542_intr_reset macro to inline function
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:25 +0000 (23:11 +0100)]
aha1542: Remove HOSTDATA macro
Remove HOSTDATA macro and use shost_priv instead
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:24 +0000 (23:11 +0100)]
aha1542: Remove SCSI_BUF_PA, SCSI_SG_PA, AHA1542_SCATTER and AHA1542_CMDLUN
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:23 +0000 (23:11 +0100)]
aha1542: remove dead code
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Ondrej Zary [Fri, 6 Feb 2015 22:11:22 +0000 (23:11 +0100)]
aha1542: Stop using scsi_module.c
Convert aha1542 to use scsi_add_host instead of scsi_module.c
Use pnp_driver and isa_driver to manage cards.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
After getting the platform shutdown command "VM_CloseAll" response from the
firmware, driver was getting configuration IOCTL request from the upper layers
and it sends down to firmware. This causes firmware assert issue.
This patch fixes the firmware assert issue. During the shutdown, if driver
gets commands from the upper layer, driver sends error code to the upper
layers.
Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Murthy Bhat <Murthy.Bhat@pmcs.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
This patch fixes the IOP_RESET issue. Sending IOP_RESET command need to wait
for only 10 sec instead of 5 minutes in case of firmware does not response
IOP_RESET command. Disable interrupt before setup interrupt routine to
prevent spurious interrupts.
Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Murthy Bhat <Murthy.Bhat@pmcs.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
The Linux aacriad driver fails to detect the case of SG list count=0 on IOCTL
pass-through command and cause intermittent fault. The result is the Linux
aacriad driver send down IOCTL pass-through command with one not initialized
SG list to firmware when receiving SG list count =0 on pass-through command.
Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Murthy Bhat <Murthy.Bhat@pmcs.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Wen Xiong [Thu, 26 Mar 2015 16:23:58 +0000 (11:23 -0500)]
ipr: AF DASD raw mode implementation in ipr driver
This patch implements raw mode support for AF DASD in ipr driver
which allows for tools to send commands directly to physical
devices which are members of RAID arrays when enabled in the firmware.
[jejb: fix up whitespace] Signed-off-by: Wen Xiong<wenxiong@linux.vnet.ibm.com> Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Reviewed-by: Daniel Kreling <kreling@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Brian King [Thu, 26 Mar 2015 16:23:56 +0000 (11:23 -0500)]
ipr: Re-enable write same
Re-enable write same support for ipr RAID adapters.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Reviewed-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Reviewed-by: Daniel Kreling <kreling@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Brian King [Thu, 26 Mar 2015 16:23:55 +0000 (11:23 -0500)]
ipr: Fix possible error path oops during initialization
Fixes a possible oops during adapter initialization in some
memory allocation failure error paths scenarios.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Reviewed-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Reviewed-by: Daniel Kreling <kreling@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Brian King [Thu, 26 Mar 2015 16:23:52 +0000 (11:23 -0500)]
ipr: Reset in task context
The pci_set_pcie_reset_state has changed semantics to not be callable
from interrupt context, so change ipr's usage of the API to comply with
this change by ensuring this occurs from a workqueue.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Reviewed-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Reviewed-by: Daniel Kreling <kreling@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Brian King [Thu, 26 Mar 2015 16:23:50 +0000 (11:23 -0500)]
ipr: Reboot speed improvements
Currently when performing a reboot with an ipr adapter,
the adapter gets shutdown completely, flushing all write
cache, as well as performing a full hardware reset of the card
during the shutdown phase of the old kernel. This ensures
the adapter is in a fully quiesced state across the reboot.
There are scenarios, however, such as when performing
kexec, where this full adapter shutdown is not required
and not desired, since it can make the reboot process take
noticeably longer.
This patch adds a module parameter to allow for skipping the
full shutdown during reboot. Rather than performing a full
adapter shutdown and reset, we simply cancel any outstanding
error buffers, place the adapter into a state where it has no
memory of any DMA addresses from the old kernel, then disable
the device. This significantly speeds up kexec boot, particularly
in configurations with multiple ipr adapters.
Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Reviewed-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Reviewed-by: Daniel Kreling <kreling@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
K. Y. Srinivasan [Fri, 27 Mar 2015 07:27:20 +0000 (00:27 -0700)]
scsi: storvsc: Set the tablesize based on the information given by the host
Set the tablesize based on the information given by the host.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Long Li <longli@microsoft.com> Tested-by: Long Li <longli@microsoft.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
K. Y. Srinivasan [Fri, 27 Mar 2015 07:27:18 +0000 (00:27 -0700)]
scsi: storvsc: Fix a bug in copy_from_bounce_buffer()
We may exit this function without properly freeing up the maapings
we may have acquired. Fix the bug.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Long Li <longli@microsoft.com> Cc: <stable@vger.kernel.org> Signed-off-by: James Bottomley <JBottomley@Odin.com>
K. Y. Srinivasan [Fri, 27 Mar 2015 07:27:16 +0000 (00:27 -0700)]
scsi: storvsc: Always send on the selected outgoing channel
The current code always sent packets without data on the primary channel.
Properly distribute sending of packets with no data amongst all available
channels. I would like to thank Long Li for noticing this problem.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Long Li <longli@microsoft.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
This replaces kmalloc + memset by a call to kzalloc
This also fixes one checkpatch.pl issue in the process.
This improvement was suggested by "make coccicheck"
Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
scsi: proper state checking and module refcount handling in scsi_device_get
This effectively reverts commits 85b6c7 ("[SCSI] sd: fix cache flushing on
module removal (and individual device removal)" and dc4515ea ("scsi: always
increment reference count").
We now never call scsi_device_get from the shutdown path, and the fact
that we started grabbing reference there in commit 85b6c7 turned out
turned out to create more problems than it solves, and required
workarounds for workarounds for workarounds. Move back to properly checking
the device state and carefully handle module refcounting.
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
sd: don't grab a device references from driver methods
The device model already takes care of races between ->remove and
->shutdown vs its other methods, and we now take care about locking
them out for ->rescan as well.
This is a partial revert of commit 39b7f1 ("[SCSI] sd: Fix refcounting").
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Lock the device embedded in the scsi_device to protect against
concurrent calls to ->remove.
Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Alan Stern <stern@rowland.harvard.edu> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
ncr5380: Harmonize jiffies conversion with msecs_to_jiffies
Instances of var * HZ / 1000 are replaced by msecs_to_jiffies(var).
In addition some timing constants that assumed HZ 100 were adjusted
to HZ independent settings based on review comments from Michael Schmitz
<schmitzmic@gmail.com> and review of the original drivers in 1.0.31 and
2.2.16.
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Acked-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Wolfram Sang [Thu, 29 Jan 2015 06:54:46 +0000 (17:54 +1100)]
ncr5380: Drop owner assignment from platform_drivers
This platform_driver does not need to set an owner, it will be populated by
the driver core.
Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: James Bottomley <JBottomley@Parallels.com>