OSDN Git Service
Chad Dupuis [Thu, 25 Sep 2014 09:17:01 +0000 (05:17 -0400)]
qla2xxx: Mark port lost when we receive an RSCN for it.
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>
Himanshu Madhani [Thu, 25 Sep 2014 09:17:00 +0000 (05:17 -0400)]
qla2xxx: Restore WWPN in case of Loop Dead.
For FA-WWPN capable device, ISP2031 and ISP27XX, when loop
dead is detected by a driver, restore WWPN from NVRAM.
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Chad Dupuis [Thu, 25 Sep 2014 09:16:59 +0000 (05:16 -0400)]
qla2xxx: Honor FCP_RSP retry delay timer field.
Parse the retry delay timer field from the FCP response data and if:
- It is not zero
- The SCSI status is busy or queue full
return SCSI_MLQUEUE_TARGET_BUSY for the number of milliseconds specified
in the retry delay timer field.
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>
Alex Vechersky [Thu, 25 Sep 2014 09:16:58 +0000 (05:16 -0400)]
qla2xxx: Add missing ISP27xx checks to optrom code.
Signed-off-by: Alex Vechersky <alex.vechersky@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Chad Dupuis [Thu, 25 Sep 2014 09:16:57 +0000 (05:16 -0400)]
qla2xxx: Force use of mailbox interface for flash access commands for ISP27xx.
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>
Nigel Kirkland [Thu, 25 Sep 2014 09:16:56 +0000 (05:16 -0400)]
qla2xxx: Free sysfs attributes for ISP27xx.
Signed-off-by: Nigel Kirkland <nigel.kirkland@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Himanshu Madhani [Thu, 25 Sep 2014 09:16:55 +0000 (05:16 -0400)]
qla2xxx: Disable laser for ISP2031 while unloading driver.
Nameserver data on FC switch is not refreshed when
qla2xxx driver is unloaded. Disabling laser for
ISP2031 will force FC switch to rescan ports and
clear fdmi entries from Nameserver.
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Himanshu Madhani [Thu, 25 Sep 2014 09:16:54 +0000 (05:16 -0400)]
qla2xxx: Enable diagnostic port using NVRAM parameters.
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Quinn Tran [Thu, 25 Sep 2014 09:16:53 +0000 (05:16 -0400)]
qla2xxx: Declaration error cause stack corruption.
Declaration error of mb array in qla2x00_iidma_fcport cause data
to be written beyond the array. This ends up causing stack corruption.
Signed-off-by: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sawan Chandak [Thu, 25 Sep 2014 09:16:52 +0000 (05:16 -0400)]
qla2xxx: Add fix in driver unload for pending activity.
Signed-off-by: Sawan Chandak <sawan.chandak@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Arun Easi [Thu, 25 Sep 2014 09:16:51 +0000 (05:16 -0400)]
qla2xxx: Unload of qla2xxx driver crashes the machine.
Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Himanshu Madhani [Thu, 25 Sep 2014 09:16:50 +0000 (05:16 -0400)]
qla2xxx: Allow user to change ql2xfdmienable value.
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Himanshu Madhani [Thu, 25 Sep 2014 09:16:49 +0000 (05:16 -0400)]
qla2xxx: Fix driver version string message.
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Joe Carnuccio [Thu, 25 Sep 2014 09:16:48 +0000 (05:16 -0400)]
qla2xxx: Add diagnostic port functionality.
Add support for the D-port (diagnostic port) fabric switch feature.
(Fabric Switch initiates loopback style port testing)
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Joe Carnuccio [Thu, 25 Sep 2014 09:16:47 +0000 (05:16 -0400)]
qla2xxx: Add FA-WWN functionality.
Add support for the FA-WWN (fabric assigned wwn) fabric switch feature.
(Fabric Assigned World Wide Port Name)
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Himanshu Madhani [Thu, 25 Sep 2014 09:16:46 +0000 (05:16 -0400)]
qla2xxx: Add FDMI-2 functionality.
Add support for the FDMI-2 fabric switch feature.
Since FDMI-2 uses code from FDMI-1, some of the existing code
needed to be repaired to prevent fields from being overflowed.
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Jan Kulich [Thu, 25 Sep 2014 09:16:45 +0000 (05:16 -0400)]
qla2xxx: ISPFx00 unexpected resets during adapter boot sequence.
Signed-off-by: Jan Kulich <jan.kulich@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Joe Carnuccio [Thu, 25 Sep 2014 09:16:44 +0000 (05:16 -0400)]
qla2xxx: Incorrect linked list semantic in qlafx00_get_fcport().
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Joe Carnuccio [Thu, 25 Sep 2014 09:16:43 +0000 (05:16 -0400)]
qla2xxx: Incorrect debug level on mailbox command print 0x1111.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Joe Carnuccio [Thu, 25 Sep 2014 09:16:42 +0000 (05:16 -0400)]
qla2xxx: ISPFX00 avoid writing semaphore register in request_irqs().
Semaphore register does not exist for ISPFx00.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Joe Carnuccio [Thu, 25 Sep 2014 09:16:41 +0000 (05:16 -0400)]
qla2xxx: Fix potential return count bug in qla2xxx_get_vpd_field().
Call scnprintf() instead of snprintf() since the latter may return
an incorrect count in cases where the write is truncated to fit.
scnprintf() returns the count of what was actually written;
snprintf() returns the count of what would have been written.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Joe Carnuccio [Thu, 25 Sep 2014 09:16:40 +0000 (05:16 -0400)]
qla2xxx: ISP27xx fwdump template error print simplification.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Joe Carnuccio [Thu, 25 Sep 2014 09:16:39 +0000 (05:16 -0400)]
qla2xxx: ISP25xx multiqueue shadow register crash fix.
When creating request/response queues from qla25xx_setup_mode(),
the shadow index register pointers were not being initialized
to point at the registers.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Joe Carnuccio [Thu, 25 Sep 2014 09:16:38 +0000 (05:16 -0400)]
qla2xxx: Add endianizer to max_payload_size modifier.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Chad Dupuis [Thu, 25 Sep 2014 09:16:37 +0000 (05:16 -0400)]
qla2xxx: Enable fast flash access for ISP83xx.
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>
Joe Carnuccio [Thu, 25 Sep 2014 09:16:36 +0000 (05:16 -0400)]
qla2xxx: Add ISP27xx fwdump template entry T275 (insert buffer).
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Joe Carnuccio [Thu, 25 Sep 2014 09:16:35 +0000 (05:16 -0400)]
qla2xxx: ISP27xx fwdump template fix insertbuf() routine.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Joe Carnuccio [Thu, 25 Sep 2014 09:16:34 +0000 (05:16 -0400)]
qla2xxx: ISP27xx fwdump template remove high frequency debug logs.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Joe Carnuccio [Thu, 25 Sep 2014 09:16:33 +0000 (05:16 -0400)]
qla2xxx: ISP27xx optimize fwdump entry table lookup.
Since the entry call array is sorted in order of entry type opcode,
the search can be terminated as soon as the search key is exceeded.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Joe Carnuccio [Thu, 25 Sep 2014 09:16:32 +0000 (05:16 -0400)]
qla2xxx: ISP27xx add tests for incomplete template.
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Chris J Arges [Tue, 23 Sep 2014 14:22:25 +0000 (09:22 -0500)]
mptfusion: enable no_write_same for vmware scsi disks
When using a virtual SCSI disk in a VMWare VM if blkdev_issue_zeroout is used
data can be improperly zeroed out using the mptfusion driver. This patch
disables write_same for this driver and the vmware subsystem_vendor which
ensures that manual zeroing out is used instead.
Cc: stable@vger.kernel.org
BugLink: http://bugs.launchpad.net/bugs/1371591
Reported-by: Bruce Lucas <bruce.lucas@mongodb.com>
Tested-by: Chris J Arges <chris.j.arges@canonical.com>
Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tomas Henzl [Fri, 12 Sep 2014 12:44:15 +0000 (14:44 +0200)]
hpsa: add missing pci_set_master in kdump path
Add a call to pci_set_master(...) missing in the previous
patch "hpsa: refine the pci enable/disable handling".
Found thanks to Rob Elliot.
Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Reviewed-by: Robert Elliott <elliott@hp.com>
Tested-by: Robert Elliott <elliott@hp.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Ching Huang [Wed, 24 Sep 2014 09:33:34 +0000 (17:33 +0800)]
arcmsr: simplify ioctl data read/write
Signed-off-by: Ching Huang <ching 2048@areca.com.tw>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
wenxiong@linux.vnet.ibm.com [Wed, 24 Sep 2014 21:25:47 +0000 (16:25 -0500)]
ipr: don't log error messages when applications issues illegal requests
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>
Anish Bhatt [Tue, 16 Sep 2014 00:44:18 +0000 (17:44 -0700)]
cxgb4i: avoid holding mutex in interrupt context
cxgbi_inet6addr_handler() can be called in interrupt context, so use rcu
protected list while finding netdev
Applies on top of core-for-3.18
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: Karen Xie <kxie@chelsio.com>
Fixes:
fc8d0590d914 ("libcxgbi: Add ipv6 api to driver")
Fixes:
759a0cc5a3e1 ("cxgb4i: Add ipv6 code to driver, call into libcxgbi ipv6
api")
Signed-off-by: Christoph Hellwig <hch@lst.de>
K. Y. Srinivasan [Tue, 2 Sep 2014 23:43:16 +0000 (16:43 -0700)]
storvsc: get rid of overly verbose warning messages
Get rid of the warning messages since they will clutter up various system logs
and are of questionable value to the end user. For debugging purposes, this
information can be gotten by setting the scsi log level appropriately.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sreekanth Reddy [Fri, 19 Sep 2014 06:47:27 +0000 (12:17 +0530)]
mpt2sas: fix undefined reference to `__udivdi3' compilation errors
This patch will fix the below compilation errors on i386 ARCH
drivers/built-in.o: In function `_scsih_qcmd':
mpt2sas_scsih.c:(.text+0x1e7b56): undefined reference to `__udivdi3'
mpt2sas_scsih.c:(.text+0x1e7b8a): undefined reference to `__umoddi3'
Used sector_div() API to fix above compilation errors.
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Ching Huang [Mon, 15 Sep 2014 11:05:33 +0000 (19:05 +0800)]
arcmsr: simplify of updating doneq_index and postq_index
Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Ching Huang [Tue, 19 Aug 2014 07:28:36 +0000 (15:28 +0800)]
arcmsr: call scsi_scan_host at the end of host initialization
Call scsi_scan_host at the end of host initialization and fix and error path
to free allocated resource.
Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Ching Huang [Tue, 19 Aug 2014 07:25:22 +0000 (15:25 +0800)]
arcmsr: add support new adapter ARC12x4 series
Add code to support the new Areca Raid ARC12x4 series adapters.
Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Ching Huang [Tue, 19 Aug 2014 07:22:45 +0000 (15:22 +0800)]
arcmsr: modify some character strings
Revise comment and some character strings.
Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Ching Huang [Tue, 19 Aug 2014 07:20:31 +0000 (15:20 +0800)]
arcmsr: fix sparse warnings and errors
Fix sparse utility checking errors and warnings.
Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Ching Huang [Tue, 19 Aug 2014 07:17:45 +0000 (15:17 +0800)]
arcmsr: fix ioctl data read/write error for adapter type C
Rewrite ioctl entry and its relate function. This patch fix ioctl data
read/write error and change data I/O access from byte to Dword.
Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Ching Huang [Tue, 19 Aug 2014 07:14:14 +0000 (15:14 +0800)]
arcmsr: revise allocation of second dma_coherent_handle for type B
This modification is for consistency with upcoming adapter type D.
Both adapter type B and D have similar H/W and S/W structure.
Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Ching Huang [Tue, 19 Aug 2014 07:10:12 +0000 (15:10 +0800)]
arcmsr: rename functions and variables
Rename some variable and function names for readability and consistency.
Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Ching Huang [Tue, 19 Aug 2014 07:07:35 +0000 (15:07 +0800)]
arcmsr: clear outbound doorbell buffer completely
Clear outbound doorbell buffer completely for adapter type C. This is to
prevent getting bad data input from IOP before ioctl command processing
starts.
Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Ching Huang [Tue, 19 Aug 2014 07:03:55 +0000 (15:03 +0800)]
arcmsr: modify printing adapter model number and F/W messages
Adjust printing order of adapter model name and firmware version.
Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Ching Huang [Tue, 19 Aug 2014 07:01:28 +0000 (15:01 +0800)]
arcmsr: remove calling arcmsr_hbb_enable_driver_mode
Remove calling arcmsr_hbb_enable_driver_mode by in-lining the code into
the caller.
Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Ching Huang [Tue, 19 Aug 2014 06:59:00 +0000 (14:59 +0800)]
arcmsr: revise message_isr_bh_fn to remove duplicate code
Revise message_isr_bh_fn to remove the duplicate code for each adapter type.
Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Ching Huang [Tue, 19 Aug 2014 06:55:57 +0000 (14:55 +0800)]
arcmsr: store adapter type in PCI id table
Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Ching Huang [Tue, 19 Aug 2014 06:47:16 +0000 (14:47 +0800)]
arcmsr: return status of abort command
This patch fixes the wrong return status of abort command.
Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Ching Huang [Tue, 19 Aug 2014 06:29:41 +0000 (14:29 +0800)]
arcmsr: limit max. number of SCSI command request
This patch limits the max. number of SCSI commmand request to avoid command
overflow.
Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Ching Huang [Tue, 19 Aug 2014 06:26:09 +0000 (14:26 +0800)]
arcmsr: add code to support hibernation
This patch adds code to support system hibernation.
Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Ching Huang [Tue, 19 Aug 2014 06:23:31 +0000 (14:23 +0800)]
arcmsr: add code to support MSI-X and MSI interrupt
This patch adds code to support MSI and MSI-X interrupt.
Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Ching Huang [Tue, 19 Aug 2014 06:18:24 +0000 (14:18 +0800)]
arcmsr: fix command timeout under heavy load
This patch rewrites the interrupt service routine relate function to fix
a command timeout under heavy controller load.
Signed-off-by: Ching Huang <ching2048@areca.com.tw>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sumit.Saxena@avagotech.com [Fri, 12 Sep 2014 13:28:03 +0000 (18:58 +0530)]
megaraid_sas : Driver version update
Resending the patch. Addressed the review comments by Tomas Henzl.
Driver version upgrade patch.
Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sumit.Saxena@avagotech.com [Fri, 12 Sep 2014 13:27:58 +0000 (18:57 +0530)]
megaraid_sas : MFI MPT linked list corruption fix
Resending the patch. Addressed the review comments from Tomas Henzl.
Added comment for to-do work.
Problem statement:
MFI link list in megaraid_sas driver is used from mfi-mpt pass-through commands.
This list can be corrupted due to many possible race conditions in driver and
eventually we may see kernel panic.
One example -
MFI frame is freed from calling process as driver send command via polling method and interrupt
for that command comes after driver free mfi frame (actually even after some other context reuse
the mfi frame). When driver receive MPT frame in ISR, driver will be using the index of MFI and
access that MFI frame and finally in-used MFI frame’s list will be corrupted.
High level description of new solution -
Free MFI and MPT command from same context.
Free both the command either from process (from where mfi-mpt pass-through was called) or from
ISR context. Do not split freeing of MFI and MPT, because it creates the race condition which
will do MFI/MPT list corruption.
Renamed the cmd_pool_lock which is used in instance as well as fusion with below name.
mfi_pool_lock and mpt_pool_lock to add more code readability.
Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sumit.Saxena@avagotech.com [Fri, 12 Sep 2014 13:27:53 +0000 (18:57 +0530)]
megaraid_sas : N-drive primary raid level 1 load balancing
Resending the patch. Addressed the review comments from Tomas Henzl.
Current driver does fast path read load balancing between arm and mirror disk
for two Drive Raid-1 configuration only.
Now, Driver support fast path read load balancing for all (any number of disk) Raid-1 configuration.
Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sumit.Saxena@avagotech.com [Fri, 12 Sep 2014 13:27:48 +0000 (18:57 +0530)]
megaraid_sas : Add module parameter to disable IRQ-CPU affinity hint
Resending the patch. Addressed the review comments from Tomas Henzl.
For certain deployment, we may need to disable irq cpu affinity hint.
This module parameter provides option for use to disable irq cpu affinity hint
and allow irqbalancer to handle the rest.
Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sumit.Saxena@avagotech.com [Fri, 12 Sep 2014 13:27:43 +0000 (18:57 +0530)]
megaraid_sas : Round down max sge supported by controller to power of two
Resending the patch. Addressed the review comments from Tomas Henzl.
Round down the max sge to power of two.
Earlier max sge limit is 70 SGE, which will allow block layer to send 280K IO frame.
It is optimal to provide max IO size aligned to the smallest possible stripe size.
E.a
Consider that we have configured RAID Volumes which does not allow Fast Path across the stripe.
Raid volume with stripe size = 256K, will have peformance hit if we get io frame of size 280K.
Driver will not send IO frame large than stripe size to the Fast Path.
Also, FW will convert 280K frame into 256K + 24K. This is an additional overhead.
Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sumit.Saxena@avagotech.com [Fri, 12 Sep 2014 13:27:38 +0000 (18:57 +0530)]
megaraid_sas : Host lock less mode to enabled asynchronous IO submission
Resending the patch. Addressed the review comments from Tomas Henzl.
Megaraid_sas driver can now work in host lock less mode.
Remove host lock less as megaraid_sas driver will have safer access to raid map as described in earlier patch.
We now keep Driver Raid map copy, which will make sure
that driver will always have old or new map
Driver raid map will be replaced safely in MR_PopulateDrvRaidMap(), so there is no issue
even if IO is continue from the scsi mid layer.
There is a plan to remove "host_lock" and "hba_lock" usage from megaraid_sas in future.
Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sumit.Saxena@avagotech.com [Fri, 12 Sep 2014 13:27:33 +0000 (18:57 +0530)]
megaraid_sas : Extended VD support
Resending the patch. Addressed the review comments from Tomas Henzl.
reserved1 field(part of union) of Raid map struct was not required so it is removed.
Current MegaRAID firmware and hence the driver only supported 64VDs.
E.g: If the user wants to create more than 64VD on a controller,
it is not possible on current firmware/driver.
New feature and requirement to support upto 256VD, firmware/driver/apps need changes.
In addition to that there must be a backward compatibility of the new driver with the
older firmware and vice versa.
RAID map is the interface between Driver and FW to fetch all required
fields(attributes) for each Virtual Drives.
In the earlier design driver was using the FW copy of RAID map where as
in the new design the Driver will keep the RAID map copy of its own; on which
it will operate for any raid map access in fast path.
Local driver raid map copy will provide ease of access through out the code
and provide generic interface for future FW raid map changes.
For the backward compatibility driver will notify FW that it supports 256VD
to the FW in driver capability field.
Based on the controller properly returned by the FW, the Driver will know
whether it supports 256VD or not and will copy the RAID map accordingly.
At any given time, driver will always have old or new Raid map.
So with this changes, driver can also work in host lock less mode. Please
see next patch which enable host lock less mode for megaraid_sas driver.
Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sumit.Saxena@avagotech.com [Fri, 12 Sep 2014 13:27:28 +0000 (18:57 +0530)]
megaraid_sas : Firmware crash dump feature support
Resending the patch. Addressed the review comments from Tomas Henzl.
Move buff_offset inside spinlock, corrected loop at crash dump buffer free,
reset_devices check is added to disable fw crash dump feature in kdump kernel.
This feature will provide similar interface as kernel crash dump feature.
When megaraid firmware encounter any crash, driver will collect the firmware raw image and
dump it into pre-configured location.
Driver will allocate two different segment of memory.
#1 Non-DMA able large buffer (will be allocated on demand) to capture actual FW crash dump.
#2 DMA buffer (persistence allocation) just to do a arbitrator job.
Firmware will keep writing Crash dump data in chucks of DMA buffer size into #2,
which will be copy back by driver to the host memory as described in #1.
Driver-Firmware interface:
==================
A.) Host driver can allocate maximum 512MB Host memory to store crash dump data.
This memory will be internal to the host and will not be exposed to the Firmware.
Driver may not be able to allocate 512 MB. In that case, driver will do possible memory
(available at run time) allocation to store crash dump data.
Let’s call this buffer as Host Crash Buffer.
Host Crash buffer will not be contigious as a whole, but it will have multiple chunk of contigious memory.
This will be internal to driver and firmware/application are unaware of it.
Partial allocation of Host Crash buffer may have valid information to debug depending upon
what was collected in that buffer and depending on nature of failure.
Complete Crash dump is the best case, but we do want to capture partial buffer just to grab something rather than nothing.
Host Crash buffer will be allocated only when FW Crash dump data is available,
and will be deallocated once application copy Host Crash buffer to the file.
Host Crash buffer size can be anything between 1MB to 512MB. (It will be multiple of 1MBs)
B.) Irrespective of underlying Firmware capability of crash dump support,
driver will allocate DMA buffer at start of the day for each MR controllers.
Let’s call this buffer as “DMA Crash Buffer”.
For this feature, size of DMA crash buffer will be 1MB.
(We will not gain much even if DMA buffer size is increased.)
C.) Driver will now read Controller Info sending existing dcmd “MR_DCMD_CTRL_GET_INFO”.
Driver should extract the information from ctrl info provided by firmware and
figure out if firmware support crash dump feature or not.
Driver will enable crash dump feature only if
“Firmware support Crash dump” +
“Driver was able to create DMA Crash Buffer”.
If either one from above is not set, Crash dump feature should be disable in driver.
Firmware will enable crash dump feature only if “Driver Send DCMD- MR_DCMD_SET_CRASH_BUF_PARA with MR_CRASH_BUF_TURN_ON”
Helper application/script should use sysfs parameter fw_crash_xxx to actually copy data from
host memory to the filesystem.
Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sumit.Saxena@avagotech.com [Fri, 12 Sep 2014 13:27:23 +0000 (18:57 +0530)]
megaraid_sas : Update threshold based reply post host index register
Resending the patch. Addressed the review comments from Tomas Henzl.
Current driver updates reply post host index to let firmware know that replies are processed,
while returning from ISR function, only if there is no oustanding replies in reply queue.
Driver will free the request frame immediately from ISR but reply post host index is not yet updated.
It means freed request can be used by submission path and there may be a tight loop in request/reply
path. In such condition, firmware may crash when it tries to post reply and there is no free
reply post descriptor.
Eventually two things needs to be change to avoid this issue.
Increase reply queue depth (double than request queue) to accommodate worst case scenario.
Update reply post host index to firmware once it reach to some pre-defined threshold value.
This change will make sure that firmware will always have some buffer of reply descriptor and
will never find empty reply descriptor in completion path.
Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sumit.Saxena@avagotech.com [Fri, 12 Sep 2014 13:27:18 +0000 (18:57 +0530)]
megaraid_sas : Use writeq for 64bit pci write to avoid spinlock overhead
Resending the patch. Addressed the review comments from Tomas Henzl.
Reduce the assingment for u64 req_data variable.
Use writeq() for 64bit PCI write instead of writel() to avoid additional lock overhead.
Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sumit.Saxena@avagotech.com [Fri, 12 Sep 2014 13:27:13 +0000 (18:57 +0530)]
megaraid_sas : Do not scan non syspd drives
Resending the patch. Addressed the review comments from Tomas Henzl.
Current driver allow device scan for all the devices on channel 0 and 1.
E.a If we have two single drive raid volumes, we may see prints like below.
First two prints are for physical device which are used to form VD.
Prints like this creates confusion as it is really not required to scan any
hidden physical devices.
scsi1 : LSI SAS based MegaRAID driver
scsi 1:0:0:0: Direct-Access LSI MR9361-8i 4.21 PQ: 0 ANSI: 5
scsi 1:0:1:0: Direct-Access LSI MR9361-8i 4.21 PQ: 0 ANSI: 5
scsi 1:2:0:0: Direct-Access LSI MR9361-8i 4.21 PQ: 0 ANSI: 5
scsi 1:2:1:0: Direct-Access LSI MR9361-8i 4.21 PQ: 0 ANSI: 5
When slave_alloc called, sdev-type will not be set, so current code will always
return "0" in slave_alloc callback.
This patch make sure that driver return "-ENXIO" for non-syspd devices.
After this patch, we will see prints in syslog only for devices which are exposed.
For current example, below print will be available in syslog.
scsi1 : LSI SAS based MegaRAID driver
scsi 1:2:0:0: Direct-Access LSI MR9361-8i 4.21 PQ: 0 ANSI: 5
scsi 1:2:1:0: Direct-Access LSI MR9361-8i 4.21 PQ: 0 ANSI: 5
Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com>
Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sreekanth Reddy [Fri, 12 Sep 2014 10:05:33 +0000 (15:35 +0530)]
mpt3sas, mpt2sas: fix scsi_add_host error handling problems in _scsih_probe
In _scsih_probe, propagate the return value from scsi_add_host.
In mpt3sas, avoid calling list_del twice if that returns an
error, which causes list_del corruption warnings if an error
is returned.
Tested with blk-mq and scsi-mq patches to properly cleanup
from and propagate blk_mq_init_rq_map errors.
Signed-off-by: Robert Elliott <elliott@hp.com>
Acked-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sreekanth Reddy [Fri, 12 Sep 2014 10:05:32 +0000 (15:35 +0530)]
mpt3sas: Bump mpt3sas driver version to 04.100.00.00
Bump mpt3sas driver version to 04.100.00.00.
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sreekanth Reddy [Fri, 12 Sep 2014 10:05:31 +0000 (15:35 +0530)]
mpt3sas: Added Reply Descriptor Post Queue (RDPQ) Array support
Up to now, Driver allocates a single contiguous block of memory
pool for all reply queues and passes down a single address in the
ReplyDescriptorPostQueueAddress field of the IOC Init Request
Message to the firmware.
When firmware receives this address, it will program each of the
Reply Descriptor Post Queue registers, as each reply queue has its
own register. Thus the firmware, starting from a base address it
determines the starting address of the subsequent reply queues
through some simple arithmetic calculations.
The size of this contiguous block of memory pool is directly proportional
to number of MSI-X vectors and the HBA queue depth. For example higher
MSIX vectors requires larger contiguous block of memory pool.
But some of the OS kernels are unable to allocate this larger
contiguous block of memory pool.
So, the proposal is to allocate memory independently for each
Reply Queue and pass down all of the addresses to the firmware.
Then the firmware will just take each address and program the value
into the correct register.
When HBAs with older firmware(i.e. without RDPQ capability) is used
with this new driver then the max_msix_vectors value would be set
to 8 by default.
Change set in v1:
1. Declared the _base_get_ioc_facts() functions at the beginning of the mpt3sas_base.c file
instead of moving all these functions before mpt3sas_base_map_resources() function
a. _base_wait_for_doorbell_int()
b. _base_wait_for_doorbell_ack()
c. _base_wait_for_doorbell_not_used()
d. _base_handshake_req_reply_wait()
e. _base_get_ioc_facts()
2. Initially set the consistent DMA mask to 32 bit and then change it to 64 bit mask
after allocating RDPQ pools by calling the function _base_change_consistent_dma_mask.
This is to ensure that all the upper 32 bits of RDPQ entries's base address to be same.
3. Reduced the redundancy between the RDPQ and non-RDPQ support in these following functions
a. _base_release_memory_pools()
b. _base_allocate_memory_pools()
c. _base_send_ioc_init()
d. _base_make_ioc_operational()
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sreekanth Reddy [Fri, 12 Sep 2014 10:05:30 +0000 (15:35 +0530)]
mpt3sas: Added OEM branding Strings
Added following branding Strings for Intel custom HBAs support.
Driver String: Vendor ID Device ID SubSystemVendor ID SubSystemDevice ID
Intel(R) Integrated RAID Module RMS3JC080 0x1000 0x0097 0x8086 0x3521
Intel(R) RAID Controller RS3GC008 0x1000 0x0097 0x8086 0x3522
Intel(R) RAID Controller RS3FC044 0x1000 0x0097 0x8086 0x3523
Intel(R) RAID Controller RS3UC080 0x1000 0x0097 0x8086 0x3524
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sreekanth Reddy [Fri, 12 Sep 2014 10:05:29 +0000 (15:35 +0530)]
mpt3sas: Copyright in driver sources is updated for year the 2014.
Copyright in driver sources is updated for year the 2014.
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sreekanth Reddy [Fri, 12 Sep 2014 10:05:28 +0000 (15:35 +0530)]
mpt3sas: MPI2.5 Rev H (2.5.3) specifications
Below is the change set in MPI2.5 Rev H specification and 2.00.32 header files
1) Added reserved fields to IO Unit Page 7 for future use.
2) Added optional functionality to IOCInit Request so that
the host may specify a separate base address for each
Reply Descriptor Post Queue. IOC support for this is
indicated using a new IOCCapabilities bit in the IOCFacts Reply.
3) Added Toolbox Console Text Display Tool
The host uses the Console Text Display Tool to send a string to
IOC's Console using different console types (eg: UART serial terminal or Ethernet terminal).
4) Firmware images can now be signed using an encrypted hash.
5) Added MPI2_SAS_OP_TRANSMIT_PORT_SELECT_SIGNAL
6) Added more details about configuration page restrictions when Host Based Discovery is enabled
Enabling host based discovery affects the availability of some configuration pages and events.
The SAS Expander, SAS Device, and SAS Enclosure configuration pages are not available from the IOC.
The IOC returns an error status to any Configuration Request message attempting to access these pages.
The IOC does not send the SAS Discovery Event, the SAS Topology Change List Event, or
the SAS Enclosure Device Status Change Event when host based discovery is enabled.
7) Bit 13 of the SAS IO Unit Page 1 ControlFlags field is now obsolete.
It was used to enable limiting direct attached SATA maximum link rate to 1.5 Gbps.
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sreekanth Reddy [Fri, 12 Sep 2014 10:05:27 +0000 (15:35 +0530)]
mpt3sas: Bump mpt3sas driver version to 03.100.00.00
Bump mpt3sas driver version to 03.100.00.00.
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sreekanth Reddy [Fri, 12 Sep 2014 10:05:26 +0000 (15:35 +0530)]
mpt3sas: Clear PFA Status on SGPIO when PFA Drive is Removed or Replaced
Added code to send an SEP message that turns off the Predictive
Failure LED when a drive is removed (if Predictive Failure LED was turned on).
Added a new flag 'pfa_led_on' per device that tracks the status of Predictive
Failure LED. When the drive is removed, this flag is checked and
sends an SEP message to turn off the respective Predictive Failure LED.
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sreekanth Reddy [Fri, 12 Sep 2014 10:05:25 +0000 (15:35 +0530)]
mpt3sas: MPI2.5 Rev G (2.5.2) specifications
Below is the change set in MPI2.5 Rev G specification and 2.00.31 header files
1) Added SCSIStatusQualifier to SCSI IO Error Reply message.
2) Added ATA Security Freeze Lock to IO Unit Page 1 Flags field.
3) Added Allow Protection Information bit for IR Volume Create.
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sreekanth Reddy [Fri, 12 Sep 2014 10:05:24 +0000 (15:35 +0530)]
mpt2sas: Bump mpt2sas driver version to 18.100.00.00
Bump mpt2sas driver version to 18.100.00.00.
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sreekanth Reddy [Fri, 12 Sep 2014 10:05:23 +0000 (15:35 +0530)]
mpt2sas: Get IOC_FACTS information using handshake protocol only after HBA card gets into READY or Operational state.
Driver initialization fails if driver tries to send IOC facts request message when the IOC is in reset or in a fault state.
This patch will make sure that
1.Driver to send IOC facts request message only if HBA is in operational or ready state.
2.If IOC is in fault state, a diagnostic reset would be issued.
3.If IOC is in reset state then driver will wait for 10 seconds to exit out of reset state.
If the HBA continues to be in reset state, then the HBA wouldn't be claimed by the driver.
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sreekanth Reddy [Fri, 12 Sep 2014 10:05:22 +0000 (15:35 +0530)]
mpt2sas: Added Reply Descriptor Post Queue (RDPQ) Array support
Up to now, Driver allocates a single contiguous block of memory
pool for all reply queues and passes down a single address in the
ReplyDescriptorPostQueueAddress field of the IOC Init Request
Message to the firmware.
When firmware receives this address, it will program each of the
Reply Descriptor Post Queue registers, as each reply queue has its
own register. Thus the firmware, starting from a base address it
determines the starting address of the subsequent reply queues
through some simple arithmetic calculations.
The size of this contiguous block of memory pool is directly proportional
to number of MSI-X vectors and the HBA queue depth. For example higher
MSIX vectors requires larger contiguous block of memory pool.
But some of the OS kernels are unable to allocate this larger
contiguous block of memory pool.
So, the proposal is to allocate memory independently for each
Reply Queue and pass down all of the addresses to the firmware.
Then the firmware will just take each address and program the value
into the correct register.
When HBAs with older firmware(i.e. without RDPQ capability) is used
with this new driver then the max_msix_vectors value would be set
to 8 by default.
Change_set in v1:
1. Declared _base_get_ioc_facts() function at the beginning of the mpt2sas_base.c
file instead of moving all these functions before mpt2sas_base_map_resources() function
a. _base_wait_for_doorbell_int()
b. _base_wait_for_doorbell_ack()
c. _base_wait_for_doorbell_not_used()
d. _base_handshake_req_reply_wait()
e. _base_get_ioc_facts()
2. Initially set the consistent DMA mask to 32 bit and then change it to 64 bit mask
after allocating RDPQ pools by calling the function _base_change_consistent_dma_mask.
This is to ensure that all the upper 32 bits of RDPQ entries's base address to be same.
3. Reduced the redundancy between the RDPQ and non-RDPQ support in these following functions
a. _base_release_memory_pools()
b. _base_allocate_memory_pools()
c. _base_send_ioc_init()
d. _base_make_ioc_operational()
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sreekanth Reddy [Fri, 12 Sep 2014 10:05:21 +0000 (15:35 +0530)]
mpt2sas: Avoid type casting for direct I/O commands
A type casting error caused the max volume LBA to be truncated from 64
to 32 bits. The virtual LBA would also get truncated to 32 bits in the
case of a 16-byte READ/WRITE command.
Rewrite entire function to get rid of code duplication and type casts.
Use get/put_unaligned wrappers to extract and replace the LBA field in
the MPI request CDB.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Tested-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sreekanth Reddy [Fri, 12 Sep 2014 10:05:20 +0000 (15:35 +0530)]
mpt2sas: Bump mpt2sas driver version to 17.100.00.00
Bump mpt2sas driver version to 17.100.00.00
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sreekanth Reddy [Fri, 12 Sep 2014 10:05:19 +0000 (15:35 +0530)]
mpt2sas: Clear PFA Status on SGPIO when PFA Drive is Removed or Replaced
Added code to send a SEP message that turns off the Predictive
Failure LED when a drive is removed (if Predictive Failure LED was turned on).
Added a new flag 'pfa_led_on' per device that tracks the status of Predictive
Failure LED. When the drive is removed, this flag is checked and
sends the SEP message to turn off the respective Predictive Failure LED.
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sreekanth Reddy [Fri, 12 Sep 2014 10:05:18 +0000 (15:35 +0530)]
mpt2sas: Copyright in driver sources is updated for year the 2014
Copyright in driver sources is updated for year the 2014.
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sreekanth Reddy [Fri, 12 Sep 2014 10:05:17 +0000 (15:35 +0530)]
mpt2sas: MPI2 Rev Y (2.00.17) and Rev Z (2.00.18) specifications
Below is the change set in MPI2 Rev Y specification and in 2.00.17 header files
1) Added SCSIStatusQualifier to SCSI IO Error Reply message.
2) Added ATA Security Freeze Lock to IO Unit Page 1 Flags field.
Below is the change set in MPI2 Rev Z specification and in 2.00.19 header files
1) Added reserved fields to IO Unit Page 7 for future use.
2) Added optional functionality to IOCInit Request so that
the host may specify a separate base address for each
Reply Descriptor Post Queue. IOC support for this is
indicated using a new IOCCapabilities bit in the IOCFacts Reply.
3) Added Toolbox Console Text Display Tool
The host uses the Console Text Display Tool to send a string to
IOC's Console using different console types (eg: UART serial terminal or Ethernet terminal).
The copyright in the mpi files is updated for year 2014
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Sreekanth Reddy [Fri, 12 Sep 2014 10:05:16 +0000 (15:35 +0530)]
mpt2sas: Added driver module parameter max_msix_vectors
Added driver module parameter max_msix_vectors. Using this
module parameter the maximum number of MSI-X vectors could be set.
The number of MSI-X vectors used would be the minimum of MSI-X vectors
supported by the HBA, the number of CPU cores and the value set to
max_msix_vectors module parameters.
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Tej Parkash [Mon, 19 May 2014 11:32:13 +0000 (07:32 -0400)]
bnx2i: Make boot_nic entry visible in the sysfs session objects
Signed-off-by: Tej Parkash <tej.parkash@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Chad Dupuis [Tue, 2 Sep 2014 18:34:58 +0000 (14:34 -0400)]
bnx2fc: fix incorrect DMA memory mapping in bnx2fc_unmap_sg_list()
This patch is based on a problem and solution from Maurizio Lombardi
where bnx2fc isn't consistent in which device struct we using for DMA
map and unmap operations. Make them consistent by using dma_sg_unmap
in bnx2fc_unmap_sg_list like bnx2fc_map_sg.
Reviewed-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
James Smart [Wed, 3 Sep 2014 16:58:23 +0000 (12:58 -0400)]
lpfc: update lpfc version to driver version 10.4.8000.0
Update lpfc version to driver version 10.4.8000.0
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
James Smart [Wed, 3 Sep 2014 16:58:16 +0000 (12:58 -0400)]
lpfc: fix for handling unmapped ndlp in target reset handler
Fix for handling unmapped ndlp in target reset handler
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
James Smart [Wed, 3 Sep 2014 16:58:06 +0000 (12:58 -0400)]
lpfc: fix low priority issues from fortify source code scan
Fixed Low priority issues from lpfc given by fortify source code scan.
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
James Smart [Wed, 3 Sep 2014 16:57:55 +0000 (12:57 -0400)]
lpfc: fix high priority issues from fortify source code scan
Fixed High priority issues from lpfc given by fortify source code scan.
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
James Smart [Wed, 3 Sep 2014 16:57:43 +0000 (12:57 -0400)]
lpfc: fix crash from page fault caused by use after rport delete
Fix crash from page fault caused by use after rport delete.
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
James Smart [Wed, 3 Sep 2014 16:57:30 +0000 (12:57 -0400)]
lpfc: fix locking issues with abort data paths
Fix locking issues with abort data paths
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
James Smart [Wed, 3 Sep 2014 16:57:19 +0000 (12:57 -0400)]
lpfc: fix race between LOGO/PLOGI handling causing NULL pointer
Fix race between LOGO/PLOGI handling causing NULL pointer
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
James Smart [Wed, 3 Sep 2014 16:57:08 +0000 (12:57 -0400)]
lpfc: fix IP Reset processing - wait for RDY before proceeding
Fix IP Reset processing - wait for RDY before proceeding
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
James Smart [Wed, 3 Sep 2014 16:56:48 +0000 (12:56 -0400)]
lpfc: fix quarantined XRI recovery qualifier state in link bounce
Fix quarantined XRI recovery qualifier state in link bounce
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
James Smart [Wed, 3 Sep 2014 16:56:40 +0000 (12:56 -0400)]
lpfc: fix discovery timeout during nameserver login
Fix discovery timeout during nameserver login
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Alexander Gordeev [Wed, 3 Sep 2014 16:56:29 +0000 (12:56 -0400)]
lpfc: Use pci_enable_msix_range() instead of pci_enable_msix()
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() or pci_enable_msi_exact()
and pci_enable_msix_range() or pci_enable_msix_exact()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Reviewed-by: James Smart <james.smart@emulex.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Daniel Borkmann [Wed, 3 Sep 2014 16:56:20 +0000 (12:56 -0400)]
lpfc: do not feed jiffies as random seed from lpfc driver
In prandom we have already reseeding mechanisms that trigger
periodically from a much better entropy source than just
feeding in jiffies through lpfc_mbx_cmpl_fcf_scan_read_fcf_rec()
[what a function name 8-)]. Therefore, just remove this.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Reviewed-by: James Smart <james.smart@emulex.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Manuel Schölling [Wed, 3 Sep 2014 16:55:58 +0000 (12:55 -0400)]
lpfc: use time_after()
To be future-proof and for better readability the time comparisons
are modified to use time_after() instead of plain, error-prone math.
Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de>
Reviewed-by: James Smart <james.smart@emulex.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Joe Perches [Wed, 3 Sep 2014 16:56:12 +0000 (12:56 -0400)]
lpfc: use dma_zalloc_coherent
Use the zeroing function instead of dma_alloc_coherent & memset(,0,)
Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: James Smart <james.smart@emulex.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>