aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ipr.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-01-19ipr: wait for aborted command responsesBrian King1-0/+1
Fixes a race condition in abort handling that was injected when multiple interrupt support was added. When only a single interrupt is present, the adapter guarantees it will send responses for aborted commands prior to the response for the abort command itself. With multiple interrupts, these responses generally come back on different interrupts, so we need to ensure the abort thread waits until the aborted command is complete so we don't perform a double completion. This race condition was being hit frequently in environments which were triggering command timeouts, which was resulting in a double completion causing a kernel oops. Cc: <stable@vger.kernel.org> Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Reviewed-by: Wendy Xiong <wenxiong@linux.vnet.ibm.com> Tested-by: Wendy Xiong <wenxiong@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-12-15ipr: add support for async scanning to speed up bootBrian King1-3/+1
Switch device scanning logic in the ipr driver to use the async scan API. This speeds up boot times, particularly on large systems. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Reviewed-by: Wen Xiong<wenxiong@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-11-12ipr: convert to generic DMA APIAnton Blanchard1-1/+1
Even though the ipr driver is only used on PCI, convert it to use the generic DMA API. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-09-26ipr: fix compile failureChristoph Hellwig1-1/+1
Fix a typo in the IPR_IOASC_HW_CMD_FAILED declaration. Based on a patch from Wen Xiong <wenxiong@linux.vnet.ibm.com>. Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-09-25ipr: don't log error messages when applications issues illegal requestswenxiong@linux.vnet.ibm.com1-0/+1
Failing Device information are logged when IOA firmware detected these illegal request such as IOA firmware doesn't support inquiry with page code 2. The patch fixes the issue. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Tested-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2014-03-19[SCSI] ipr: Add new CCIN definition for Grand Canyon supportWendy Xiong1-0/+3
Add the appropriate definition and table entry for new hardware support. Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2014-03-19[SCSI] ipr: Format HCAM overlay ID 0x21Wendy Xiong1-0/+14
This patch adds formatting error overlay 0x21 to improve debug capabilities. [jejb: checkpatch fixes] Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2014-03-19[SCSI] ipr: Handle early EEHBrian King1-0/+3
If, when the ipr driver loads, the adapter is in an EEH error state, it will currently oops and not be able to recover, as it attempts to access memory that has not yet been allocated. We've seen this occur in some kexec scenarios. The following patch fixes the oops and also allows the driver to recover from these probe time EEH errors. [jejb: checkpatch fix] Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2014-03-19[SCSI] ipr: Add new CCIN definition for new hardware supportWendy Xiong1-0/+1
Add the appropriate definition and table entry for new hardware support. Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2014-03-19[SCSI] ipr: Remove extended delay bit on GSCSI reads/writes opsWendy Xiong1-0/+1
This patch removes extended delay bit on GSCSI reads/writes ops, the performance will be significanly better. Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-12-19[SCSI] ipr: increase dump size in ipr driverwenxiong@linux.vnet.ibm.com1-1/+1
To help debugging several new SAS controllers, increase the dump size in ipr driver to 80MB. Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-12-19[SCSI] ipr: Increase msi-x interrupt vectors to 16wenxiong@linux.vnet.ibm.com1-1/+1
Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-08-26[SCSI] ipr: Add sereral new CCIN definitions for new adapters supportwenxiong@linux.vnet.ibm.com1-0/+7
Add the appropriate definitions and table entries for new adapter support. Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-05-12[SCSI] ipr: Avoid target_destroy accessing memory after it was freedwenxiong@linux.vnet.ibm.com1-3/+3
Defined target_ids,array_ids and vsets_ids as unsigned long to avoid target_destroy accessing memory after it was freed. Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-05-02[SCSI] ipr: SATA DVD probing failed with 64bit adapterwenxiong@linux.vnet.ibm.com1-1/+1
Driver passed the wrong IOADL address to IOA adapter. The patch fixes the issue. Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-02-24[SCSI] ipr: Fix oops while resetting an ipr adapterBrian King1-0/+1
When resetting an ipr adapter, we use scsi_block_requests to block any new commands from scsi core, and then unblock after the reset. When hotplug removing an adapter, we shut it down and go through this same code, but we've seen issues with scsi_unblock_requests running after the adapter's memory has been freed. There is really no need to block/unblock when the adapter is being removed, so this patch skips the block/unblock and will immediately fail any commands that happen to make it to queuecommand while the adapter is being shutdown. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-01-30[SCSI] ipr: Driver version 2.6.0wenxiong@linux.vnet.ibm.com1-2/+2
Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-01-30[SCSI] ipr: Implement block iopollwenxiong@linux.vnet.ibm.com1-0/+6
This patch implements blk iopoll in ipr driver for performance improvement. Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-01-30[SCSI] ipr: Reduce lock contentionwenxiong@linux.vnet.ibm.com1-9/+12
This patch reduces lock contention while implementing distributed completion processing. Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-01-30[SCSI] ipr: Add support for MSI-X and distributed completionwenxiong@linux.vnet.ibm.com1-25/+45
The new generation IBM SAS Controllers will support MSI-X interrupts and Distributed Completion Processing features. This patch add these support in ipr device driver. Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-01-30[SCSI] ipr: Resource path error logging cleanupBrian King1-2/+3
The resource path as displayed by the ipr driver is the location string identifying a location on the SAS fabric. This patch adds the SCSI host number such that error logs can be more easily correlated in multiple adapter configurations. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-01-30[SCSI] ipr: Add sereral new CCIN definitions for new adapters supportwenxiong@linux.vnet.ibm.com1-0/+5
Add the appropriate definitions and table entries for new adapter support. Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-08-24[SCSI] ipr: Driver version 2.5.4Brian King1-2/+2
Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-08-24[SCSI] ipr: Reduce interrupt lock timeBrian King1-0/+1
Reduce the amount of time the host lock is held in the interrupt handler for improved performance. [jejb: fix up checkpatch noise] Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-28[SCSI] ipr: Driver version 2.5.3Brian King1-2/+2
Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-28[SCSI] ipr: Increase max concurrent oustanding commandsBrian King1-4/+6
Increase the total number of max concurrent outstanding commands for the most recent family of adapters in order to improve overall adapter performance. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-03-28[SCSI] ipr: Remove unnecessary interrupt clearing on new adaptersBrian King1-0/+2
The latest ipr hardware no longer requires the driver to issue any MMIOs to clear the interrupt so remove this to optimize performance. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-02-29[SCSI] ipr: update PCI ID definitions for new adaptersWayne Boyer1-2/+2
This patch updates some PCI ID definitions for new adapters based on the next generation 64 bit IOA PCI interface chip. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-01-06PCI: Rework config space blocking servicesJan Kiszka1-0/+1
pci_block_user_cfg_access was designed for the use case that a single context, the IPR driver, temporarily delays user space accesses to the config space via sysfs. This assumption became invalid by the time pci_dev_reset was added as locking instance. Today, if you run two loops in parallel that reset the same device via sysfs, you end up with a kernel BUG as pci_block_user_cfg_access detect the broken assumption. This reworks the pci_block_user_cfg_access to a sleeping service pci_cfg_access_lock and an atomic-compatible variant called pci_cfg_access_trylock. The former not only blocks user space access as before but also waits if access was already locked. The latter service just returns false in this case, allowing the caller to resolve the conflict instead of raising a BUG. Adaptions of the ipr driver were originally written by Brian King. Acked-by: Brian King <brking@linux.vnet.ibm.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-10-31[SCSI] ipr: add definitions for additional adapterWayne Boyer1-0/+1
Add the appropriate definition and table entry for an additional adapter. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-20[SCSI] ipr: Fix BUG on adapter dump timeoutBrian King1-0/+1
If an adapter dump times out, the ipr driver will abort the dump and proceed to reset and recover the adapter. When an adapter dump completes, the work thread which is reading the adapter dump will initiate an adapter reset to recover the adapter. However, when the adapter dump gets aborted, the work thread should not initiate an adapter reset, since an adapter reset is already in progress. This fixes a case of calling pci_block_user_cfg_access overlapped, which results in a BUG. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-10-16[SCSI] ipr: Add support to flash FPGA and flash back DRAM imagesWayne Boyer1-1/+1
The write buffer command is used to download and burn new IOA FW images. The same interface can now be used to flash FPGA and flash back DRAM images. To download and flash the new images takes more than 15 minutes, so increase the write buffer command timeout to 30 minutes. The FPGA and flash back DRAM images don't have the same card_type as the IOA FW image. So, remove the sanity checking from the driver. The adapter has sanity checking and will only accept a valid image. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-09-22[SCSI] ipr: Stop reading adapter dump prematurelyBrian King1-0/+1
When the ipr driver decides to dump the adapter, it changes the sdt_state to GET_DUMP, then prepares the adapter so that the dump can be read. However, if the ipr worker thread wakes up for some reason before the driver has put the adapter in a state where it can succesfully dump the adapter, the driver will start dumping the adapter too early, which can potentially trigger a BUG check in the pci config blocking API. Fix this by adding a new sdt_state to differentiate between the ipr driver wanting to dump the adapter in the near future and wanting to dump the adapter now. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2011-05-01[SCSI] ipr: Driver version 2.5.2Kleber Sacilotto de Souza1-2/+2
Bump the driver version. Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] ipr: increase the dump size for 64 bit adaptersKleber Sacilotto de Souza1-6/+10
Currently the size of the dump generated by the driver is limited in 4MB, which is insufficient to gather much useful data from the new 64 bit adapters. This patch makes the needed changes to increase the dump limit for the 64 bit adapters to 32MB, or even to a bigger value in the future, but keeping the current limitations for the legacy 32 bit adapters. Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2011-05-01[SCSI] ipr: fix synchronous request flags for better performanceWayne Boyer1-1/+1
In testing it was noticed that Extended Delay after Reset flag was being set for gscsi and volume set devices. This had a negative effect on performance for volume sets. The fix is to only set the flag for gscsi devices. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-12-21[SCSI] ipr: fix mailbox register definition and add a delay before readingWayne Boyer1-0/+2
The definition for the mailbox register for new adapters was incorrect. The value has been updated to the correct offset. After an adapter reset, the mailbox register on the new adapters takes a number of seconds to stabilize. A delay has been added before reading the register. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-10-25[SCSI] ipr: add definitions for a new adapterWayne Boyer1-0/+1
There was an addition to the hardware roadmap that includes a new adapter. This patch adds the new definitions for the adapter. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-10-07[SCSI] ipr: fix array error loggingWayne Boyer1-2/+7
The structure definitions for reporting array errors did not have the correct size for the Array WWID field. This patch fixes those definitions. It also fixes part of the output formatting that did not have newlines and fixes size calculations. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-09-05[SCSI] ipr: Driver version 2.5.1Wayne Boyer1-2/+2
Bump the driver version. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-09-05[SCSI] ipr: fix resource address formatting and add attribute for device IDWayne Boyer1-1/+3
This patch fixes a resource address formatting problem where the first byte was being zeroed out. Also, the device ID is now made available as a sysfs attribute. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] ipr: change endian swap key to match hardware spec changeWayne Boyer1-1/+1
The value used to change the endian representation on the new adapters has changed. This patch updates that value. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] ipr: add support for new Obsidian-E embedded adapterWayne Boyer1-4/+5
This patch allows the driver to recognize a new Obsidian-E based adapter that uses a new subsystem ID. This patch also fixes a few tab/space problems. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] ipr: add MMIO write to perform BIST for 64 bit adaptersWayne Boyer1-0/+4
The 64 bit chip used in new adapters does not properly support the BIST register in PCI config space. This patch implements an alternative MMIO write reset method. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] ipr: add writeq definition if neededWayne Boyer1-0/+8
Compiling the driver will fail on 32 bit powerpc and other architectures where writeq is not defined. This patch adds a definition for writeq. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-27[SCSI] ipr: add endian swap enablement for 64 bit adaptersWayne Boyer1-2/+7
A change in the hardware design of the chip for the new adapters changes the default endianness of MMIO operations. This patch adds a register definition which when written to with a predefined value will change the endianness back to what the driver expects. This patch also fixes two problems found during testing. First, the first reserved field in the ipr_hostrcb64_fabirc_desc structure only reserved one byte. The correct amount to reserve is 2 bytes. Second, the reserved field of the ipr_hostrcb64_error structure only reserved 2 bytes. The correct amount to reserve is 16 bytes. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-07-21[SCSI] ipr: fix resource path display and formattingWayne Boyer1-2/+3
It was possible to overflow the buffer used to print out the formatted version of the resource path. The fix is to limit the number of bytes that get formatted. This patch also updates the ipr_show_resource_path function to display the resource address for devices that are attached to adapters that don't support resource paths. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-24[SCSI] ipr: fix a register read to use the correct address for 64 bit adaptersWayne Boyer1-1/+1
Fix ipr_reset_enable_ioa() to read the correct IOA to host interrupt register address for 64 bit adapters. We need to read the lower 32 bits, not the upper 32 bits. Also change the write of the 64 bit mask value to a single writeq instead of two writel calls. Finally, use the correct u8 type for the type field in the ipr_resource_entry structure. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-24[SCSI] ipr: include the resource path in the IOA status area structureWayne Boyer1-2/+24
The IOA status area now includes the new resource path field for 64 bit adapters. This patch changes the driver to fix the ioasa structure and to use the correct structure definition based on the type of adatper. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-05-24[SCSI] ipr: implement fixes for 64 bit adapter supportWayne Boyer1-1/+2
Implement some small fixes for 64 bit support that were preventing the adapter from becoming operational. Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com> Acked-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>