summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/src.c
Commit message (Collapse)AuthorAgeFilesLines
* scsi: aacraid: clean up some indentation and formatting issuesColin Ian King2019-02-051-1/+1
| | | | | | | | | There are several issues with badly indented statements. Fix these and clean up the formatting. Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Mahesh Rajashekhara <mahesh.rajashekhara@microchip.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: change event_wait to a completionArnd Bergmann2018-12-131-1/+1
| | | | | | | | | | | The event_wait semaphore has completion semantics, so we can change it over to the completion interface for clarity without changing the behavior. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Dave Carroll <david.carroll@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: stop using deprated get_seconds()Arnd Bergmann2018-06-261-2/+4
| | | | | | | | | | | | | | | | get_seconds() can overflow on 32-bit architectures and is deprecated because of that. The use in the aacraid driver has the same problem due to a limited firmware interface, it also overflows in the year 2106. This changes all calls to get_seconds() to the non-deprecated ktime_get_real_seconds(), which unfortunately doesn't solve that problem but gets rid of one user of the deprecated interface. [mkp: checkpatch] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* Merge tag 'scsi-for-linus' of ↵Linus Torvalds2018-04-061-12/+193
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "This is mostly updates of the usual drivers: arcmsr, qla2xx, lpfc, ufs, mpt3sas, hisi_sas. In addition we have removed several really old drivers: sym53c416, NCR53c406a, fdomain, fdomain_cs and removed the old scsi_module.c initialization from all remaining drivers. Plus an assortment of bug fixes, initialization errors and other minor fixes" * tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (168 commits) scsi: ufs: Add support for Auto-Hibernate Idle Timer scsi: ufs: sysfs: reworking of the rpm_lvl and spm_lvl entries scsi: qla2xxx: fx00 copypaste typo scsi: qla2xxx: fix error message on <qla2400 scsi: smartpqi: update driver version scsi: smartpqi: workaround fw bug for oq deletion scsi: arcmsr: Change driver version to v1.40.00.05-20180309 scsi: arcmsr: Sleep to avoid CPU stuck too long for waiting adapter ready scsi: arcmsr: Handle adapter removed due to thunderbolt cable disconnection. scsi: arcmsr: Rename ACB_F_BUS_HANG_ON to ACB_F_ADAPTER_REMOVED for adapter hot-plug scsi: qla2xxx: Update driver version to 10.00.00.06-k scsi: qla2xxx: Fix Async GPN_FT for FCP and FC-NVMe scan scsi: qla2xxx: Cleanup code to improve FC-NVMe error handling scsi: qla2xxx: Fix FC-NVMe IO abort during driver reset scsi: qla2xxx: Fix retry for PRLI RJT with reason of BUSY scsi: qla2xxx: Remove nvme_done_list scsi: qla2xxx: Return busy if rport going away scsi: qla2xxx: Fix n2n_ae flag to prevent dev_loss on PDB change scsi: qla2xxx: Add FC-NVMe abort processing scsi: qla2xxx: Add changes for devloss timeout in driver ...
| * scsi: aacraid: Auto detect INTx or MSIx mode during sync cmd processingRaghava Aditya Renukunta2018-02-141-6/+16
| | | | | | | | | | | | | | | | | | | | | | During sync command processing, if legacy INTx status indicates command is not completed, sample the MSIx register and check if it indicates command completion, set controller MSIx enabled flag. Signed-off-by: Prasad B Munirathnam <prasad.munirathnam@microsemi.com> Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Reviewed-by: Dave Carroll <david.carroll@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: aacraid: Preserve MSIX mode in the OMR registerRaghava Aditya Renukunta2018-02-141-0/+22
| | | | | | | | | | | | | | | | | | | | Preserve the current MSIX mode value in the OMR before rewriting the OMR to initiate the IOP or Soft Reset. Signed-off-by: Prasad B Munirathnam <prasad.munirathnam@microsemi.com> Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Reviewed-by: Dave Carroll <david.carroll@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
| * scsi: aacraid: Implement DropIO sync commandRaghava Aditya Renukunta2018-02-141-6/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IOP_RESET takes a long time to complete. If controller is in a state where we can bring it back with init struct, send a DropIO sync command instead. - If controller is faulted perform standard IOP_RESET in aac_srcv_init. - If controller is not faulted get adapter properties and extended properties. - Update the sa_firmware variable and determine if DropIO request is supported. - Issue DropIO request, and get the number of outstanding commands. - If all commands are complete with success (CT_OK), consider IOP_RESET is complete. - If any commands timeout, Perform the IOP_RESET. Signed-off-by: Prasad B Munirathnam <prasad.munirathnam@microsemi.com> Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Reviewed-by: Dave Carroll <david.carroll@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* | treewide: Fix typos in printkMasanari Iida2018-03-271-2/+2
|/ | | | | | | | This patch fixes spelling typos found in printk. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* scsi: aacraid: Perform initialization reset only onceGuilherme G. Piccoli2017-11-211-6/+14
| | | | | | | | | | | | | | | | | | | | | Currently the driver accepts two ways of requesting an initialization reset on the adapter: by passing aac_reset_devices module parameter, or the generic kernel parameter reset_devices. It's working as intended...but if we end up reaching a scsi hang and the scsi EH mechanism takes place, aacraid performs resets as part of the scsi error recovery procedure. These EH routines might reinitialize the device, and if we have provided some of the reset parameters in the kernel command-line, we again perform an "initialization" reset. So, to avoid this duplication of resets in case of scsi EH path, this patch adds a field to aac_dev struct to keep per-adapter track of the init reset request - once it's done, we set it to false and don't proactively reset anymore in case of reinitializations. Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com> Reviewed-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: Add a small delay after IOP resetGuilherme G. Piccoli2017-09-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 0e9973ed3382 ("scsi: aacraid: Add periodic checks to see IOP reset status") changed the way driver checks if a reset succeeded. Now, after an IOP reset, aacraid immediately start polling a register to verify the reset is complete. This behavior cause regressions on the reset path in PowerPC (at least). Since the delay after the IOP reset was removed by the aforementioned patch, the fact driver just starts to read a register instantly after the reset was issued (by writing in another register) "corrupts" the reset procedure, which ends up failing all the time. The issue highly impacted kdump on PowerPC, since on kdump path we proactively issue a reset in adapter (through the reset_devices kernel parameter). This patch (re-)adds a delay right after IOP reset is issued. Empirically we measured that 3 seconds is enough, but for safety reasons we delay for 5s (and since it was 30s before, 5s is still a small amount). For reference, without this patch we observe the following messages on kdump kernel boot process: [ 76.294] aacraid 0003:01:00.0: IOP reset failed [ 76.294] aacraid 0003:01:00.0: ARC Reset attempt failed [ 86.524] aacraid 0003:01:00.0: adapter kernel panic'd ff. [ 86.524] aacraid 0003:01:00.0: Controller reset type is 3 [ 86.524] aacraid 0003:01:00.0: Issuing IOP reset [146.534] aacraid 0003:01:00.0: IOP reset failed [146.534] aacraid 0003:01:00.0: ARC Reset attempt failed Fixes: 0e9973ed3382 ("scsi: aacraid: Add periodic checks to see IOP reset status") Cc: stable@vger.kernel.org # v4.13+ Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com> Acked-by: Dave Carroll <david.carroll@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: Add reset debugging statementsRaghava Aditya Renukunta2017-06-131-4/+11
| | | | | | | | | Added info and error messages in controller reset function to log information about the status of the IOP/SOFT reset. Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Reviewed-by: David Carroll <david.carroll@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: Rework aac_src_restartRaghava Aditya Renukunta2017-06-131-22/+12Star
| | | | | | | | | Removed switch case and replaced with if mask checks. Moved KERNEL_PANIC check to when bled is less than 0. Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Reviewed-by: David Carroll <david.carroll@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: Rework SOFT reset codeRaghava Aditya Renukunta2017-06-131-20/+18Star
| | | | | | | | | | | Now the driver issues a soft reset and waits for the controller to be up and running by periodically checking on the status of the controller health registers. Also prevents ARC adapters from issuing soft reset if IOP resets failed. Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Reviewed-by: David Carroll <david.carroll@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: Add periodic checks to see IOP reset statusRaghava Aditya Renukunta2017-06-131-2/+43
| | | | | | | | | | Added function that waits with a timeout for the ctrl to be up and running after triggering an IOP reset. Also removed 30 sec sleep as it is not needed. Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Reviewed-by: David Carroll <david.carroll@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: Rework IOP resetRaghava Aditya Renukunta2017-06-131-7/+9
| | | | | | | | | Reworked IOP reset to remove unneeded variable and created a helper function to notify fw of an imminent IOP reset. Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Reviewed-by: David Carroll <david.carroll@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: Using single reset mask for IOP resetRaghava Aditya Renukunta2017-06-131-14/+2Star
| | | | | | | | | The driver can now trigger IOP reset with a single reset mask. Removed code that retrieves a reset_mask from the firmware. Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Reviewed-by: David Carroll <david.carroll@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: Fix typo in blink statusRaghava Aditya Renukunta2017-03-071-1/+1
| | | | | | | | | | | The return status of the adapter check on KERNEL_PANIC is supposed to be the upper 16 bits of the OMR status register. Fixes: c421530bf848604e (scsi: aacraid: Reorder Adpater status check) Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Reviewed-by: Dave Carroll <david.carroll@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: Save adapter fib log before an IOP resetRaghava Aditya Renukunta2017-02-231-0/+17
| | | | | | | | | | | | | | Currently the adapter firmware does not save outstanding I/O's log information when an IOP reset is triggered. This is problematic when trying to root cause and debug issues. Fixed by adding sync command to trigger I/O log file save in the adapter firmware before issuing an IOP reset. Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Reviewed-by: David Carroll <David.Carroll@microsemi.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: Reorder Adapter status checkRaghava Aditya Renukunta2017-02-231-4/+17
| | | | | | | | | | | | | | | | | | The driver currently checks the SELF_TEST_FAILED first and then KERNEL_PANIC next. Under error conditions(boot code failure) both SELF_TEST_FAILED and KERNEL_PANIC can be set at the same time. The driver has the capability to reset the controller on an KERNEL_PANIC, but not on SELF_TEST_FAILED. Fixed by first checking KERNEL_PANIC and then the others. Cc: stable@vger.kernel.org Fixes: e8b12f0fb835223752 ([SCSI] aacraid: Add new code for PMC-Sierra's SRC base controller family) Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Reviewed-by: David Carroll <David.Carroll@microsemi.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: Skip IOP reset on controller panic(SMART Family)Raghava Aditya Renukunta2017-02-231-0/+6
| | | | | | | | | | When the SMART family of controller panic (KERNEL_PANIC) , they do not honor IOP resets. So better to skip it and directly perform a IWBR reset. Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Reviewed-by: David Carroll <David.Carroll@microsemi.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: Fix sync fibs time out on controller resetRaghava Aditya Renukunta2017-02-231-1/+1
| | | | | | | | | | | | | | After controller shutdown, all sync fibs time out due to not knowing about the switch to INT-x mode Fixed by replacing aac_src_access_devreg() to aac_set_intx_mode() call. Cc: stable@vger.kernel.org Fixes: 495c021767bd78c998 (aacraid: MSI-x support) Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Reviewed-by: David Carroll <David.Carroll@microsemi.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: Fix camel caseRaghava Aditya Renukunta2017-02-231-1/+1
| | | | | | | | | | Replaced camel case with snake case for init supported options. Suggested-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Reviewed-by: David Carroll <David.Carroll@microsemi.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: avoid open-coded upper_32_bitsArnd Bergmann2017-02-071-3/+3
| | | | | | | | | | | | | | | | | | Shifting a dma_addr_t right by 32 bits causes a compile-time warning when that type is only 32 bit wide: drivers/scsi/aacraid/src.c: In function 'aac_src_start_adapter': drivers/scsi/aacraid/src.c:414:29: error: right shift count >= width of type [-Werror=shift-count-overflow] This changes the driver to use the predefined macros consistently, including one correct but open-coded upper_32_bits() instance. Fixes: d1ef4da8487f ("scsi: aacraid: added support for init_struct_8") Fixes: 423400e64d37 ("scsi: aacraid: Include HBA direct interface") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: Update copyrightsRaghava Aditya Renukunta2017-02-031-1/+2
| | | | | | | | | Added new copyright messages Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Dave Carroll <David.Carroll@microsemi.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: Added new IWBR resetRaghava Aditya Renukunta2017-02-031-35/+94
| | | | | | | | | | Added a new IWBR soft reset type, reworked the IOP reset interface for a bit. Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Dave Carroll <David.Carroll@microsemi.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: Added support to abort cmd and reset lunRaghava Aditya Renukunta2017-02-031-4/+29
| | | | | | | | | | Added task management command support to abort any timed out commands in case of a eh_abort call and to reset lun's in case of eh_reset call. Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Dave Carroll <David.Carroll@microsemi.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: Include HBA direct interfaceRaghava Aditya Renukunta2017-02-031-40/+78
| | | | | | | | | | Added support to send direct pasthru srb commands from management utilty to the controller. Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Dave Carroll <David.Carroll@microsemi.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: Added support for response pathRaghava Aditya Renukunta2017-02-031-9/+29
| | | | | | | | | | This patch enables the driver to actually process the I/O, or srb replies from adapter. In addition to any HBA1000 or SmartIOC2000 adapter events. Signed-off-by: Raghava Aditya Renukunta <raghavaaditya.renukunta@microsemi.com> Signed-off-by: Dave Carroll <David.Carroll@microsemi.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: added support for init_struct_8Raghava Aditya Renukunta2017-02-031-7/+20
| | | | | | | | | | | | This patch lays the groundwork for supporting the new HBA-1000 controller family.A new INIT structure INIT_STRUCT_8 has been added which allows for a variable size for MSI-x vectors among other things, and is used for both Series-8, HBA-1000 and SmartIOC-2000. Signed-off-by: Raghava Aditya Renukunta <raghavaaditya.renukunta@microsemi.com> Signed-off-by: Dave Carroll <David.Carroll@microsemi.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* scsi: aacraid: mark aac_src_select_comm() staticBaoyou Xie2016-09-091-1/+1
| | | | | | | | | | | | | | We get 1 warning when building kernel with W=1: drivers/scsi/aacraid/src.c:616:5: warning: no previous prototype for 'aac_src_select_comm' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. so this patch marks this function with 'static'. Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Dave Carroll <david.carroll@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* aacraid: Log firmware AIF messagesRaghava Aditya Renukunta2016-04-301-1/+2
| | | | | | | | | | Firmware AIF messages about cache loss and data recovery are being missed by the driver since currently they are not captured but rather let go. This patch to capture those messages and log them for the user. Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* aacraid: Fix RRQ overloadRaghava Aditya Renukunta2016-02-241-23/+7Star
| | | | | | | | | | | | | | | | | | | | | | | The driver utilizes an array of atomic variables to keep track of IO submissions to each vector. To submit an IO multiple threads iterate through the array to find a vector which has empty slots to send an IO. The reading and updating of the variable is not atomic, causing race conditions when a thread uses a full vector to submit an IO. Fixed by mapping each FIB to a vector, the submission path then uses said vector to submit IO thereby removing the possibly of a race condition.The vector assignment is started from 1 since vector 0 is reserved for the use of AIF management FIBS.If the number of MSIx vectors is 1 (MSI or INTx mode) then all the fibs are allocated to vector 0. Fixes: 495c0217 "aacraid: MSI-x support" Cc: stable@vger.kernel.org # v4.1 Signed-off-by: Raghava Aditya Renukunta <raghavaaditya.renukunta@pmcs.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
* aacraid: Reset irq affinity hintsMahesh Rajashekhara2015-11-101-44/+4Star
| | | | | | | | | | | Reset irq affinity hints before releasing IRQ. Removed duplicate code of IRQ acquire/release. Reviewed-by: Tomas Henzl <thenzl@redhat.com> Reviewed-by: Murthy Bhat <Murthy.Bhat@pmcs.com> Reviewed-by: Karthikeya Sunkesula <Karthikeya.Sunkesula@pmcs.com> Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* aacraid: Enable 64bit write to controller registerMahesh Rajashekhara2015-11-101-2/+10
| | | | | | | | | | If writeq() not supported, then do atomic two 32bit write Reviewed-by: Tomas Henzl <thenzl@redhat.com> Reviewed-by: Murthy Bhat <Murthy.Bhat@pmcs.com> Reviewed-by: Karthikeya Sunkesula <Karthikeya.Sunkesula@pmcs.com> Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* aacraid: Change interrupt mode to MSI for Series 6Mahesh Rajashekhara2015-11-101-1/+1
| | | | | | | | | | This change always sets MSI interrupt mode for series-6 controller. Reviewed-by: Tomas Henzl <thenzl@redhat.com> Reviewed-by: Murthy Bhat <Murthy.Bhat@pmcs.com> Reviewed-by: Karthikeya Sunkesula <Karthikeya.Sunkesula@pmcs.com> Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* aacraid: Add Power Management supportMahesh Rajashekhara2015-11-101-0/+2
| | | | | | | | | | | | * .suspend() and .resume() routines implemented in the driver * aac_release_resources() initiates firmware shutdown * aac_acquire_resources re-initializes the host interface Reviewed-by: Tomas Henzl <thenzl@redhat.com> Reviewed-by: Murthy Bhat <Murthy.Bhat@pmcs.com> Reviewed-by: Karthikeya Sunkesula <Karthikeya.Sunkesula@pmcs.com> Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* aacraid: aac_src_intr_message() can be statickbuild test robot2015-05-251-1/+1
| | | | | | Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Acked-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
* aacraid: performance improvement changesMahesh Rajashekhara2015-04-101-4/+10
| | | | | | | 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>
* aacraid: IOP RESET command handling changesMahesh Rajashekhara2015-04-101-9/+27
| | | | | | | | | | | | 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>
* aacraid: MSI-x supportMahesh Rajashekhara2015-04-101-91/+297
| | | | | | | 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>
* [SCSI] remove deprecated IRQF_DISABLED from SCSIMichael Opdenacker2014-03-191-2/+2
| | | | | | | | It's a NOOP since 2.6.35 and it will be removed one day. [jejb: remove from missed arm scsi drivers] Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] aacraid: Fix for arrays are going offline in the system. System hangsMahesh Rajashekhara2013-06-271-0/+3
| | | | | | | | | | | | | | | | | One of the customer had reported that the set of raid logical arrays will become unavailable (I/O offline) after a long hours of IO stress test. The OS wouldn`t be accessible afterwards and require a hard reset. This driver patch has a fix for race condition between the doorbell and the circular buffer. The driver is modified to do an extra read after clearing the doorbell in case there had been a completion posted during the small timing window. With this fix, we ran IO stress for ~13 days. There were no IO failures. Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com> Cc: <stable@vger.kernel.org> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] aacraid: Dual firmware image supportMahesh Rajashekhara2013-04-101-1/+25
| | | | | | | | | This patch adds dual flash firmware support for Series 7 and above controllers. [thenzl: used ssleep(10) instead udelay] Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] aacraid: suppress two GCC warningsPaul Bolle2013-02-241-2/+2
| | | | | | | | | | | | | | Building src.o for a 32 bit system triggers two GCC warnings: drivers/scsi/aacraid/src.c: In function ‘aac_src_deliver_message’: drivers/scsi/aacraid/src.c:410:3: warning: right shift count >= width of type [enabled by default] drivers/scsi/aacraid/src.c:434:2: warning: right shift count >= width of type [enabled by default] These warnings are caused by a right shift of 32. Use upper_32_bits() to suppress them. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Cc: Mahesh Rajashekhara <Mahesh_Rajashekhara@pmc-sierra.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] aacraid: Series 7 Async. (performance) mode supportMahesh Rajashekhara2012-07-201-38/+47
| | | | | | | | | | | | | | - Series 7 Async. (performance) mode support added - New scatter/gather list format for Series 7 - Driver converts s/g list to a firmware suitable list for best performance on Series 7, this can be disabled with driver parameter "aac_convert_sgl" for testing purposes - New container read/write command structure for Series 7 - Fast response support for the SCSI pass-through path added - Async. status response buffer changes Signed-off-by: Mahesh Rajashekhara <Mahesh_Rajashekhara@pmc-sierra.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] aacraid: Fix endian issues in core and SRC portions of driverBen Collins2012-07-201-17/+29
| | | | | | | | | | | This may not fix all endian issues in this driver, but it does get the driver working on PowerPC for a PMC SRC card. So it should at least fix all the problems in the core and in the SRC support. [jejb: fix >> 32 breakage reported by Fengguang Wu] Signed-off-by: Ben Collins <bcollins@ubuntu.com> Acked-by: Achim Leubner <Achim_Leubner@pmc-sierra.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] aacraid: Use resource_size_t for IO mem pointers and offsetsBen Collins2012-07-201-4/+3Star
| | | | | | | | | | | | This also stops using the "legacy crap" in Scsi_Host (shost->base is an unsigned long). This affected 32-bit systems that have 64-bit resource sizes, causing the IO address to be truncated. Signed-off-by: Ben Collins <bcollins@ubuntu.com> Acked-by: Achim Leubner <Achim_Leubner@pmc-sierra.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] aacraid: add an iounmap call to aac_src_ioremapTomas Henzl2012-04-231-0/+2
| | | | | | | | | | | | | | | The patch 116046127d1a3bad2853d02781ad9fee33f05e5a "[SCSI] aacraid: Added Sync.mode to support series 7/8/9 controllers" removed an iounmap call from aac_src_ioremap. Before that, the iounmap has been called twice with the same value (dev->base and dev->regs.src.bar0) and the iounmap complained about it (iounmap: bad address ...). The proper solution is a change the paremeter from bar0 to bar1. Fix this by adding a an iounmap(dev->regs.src.bar1) call. Signed-off-by: Tomas Henzl <thenzl@redhat.com> Acked-by: Achim Leubner <achim_leubner@pmc-sierra.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* [SCSI] aacraid: Added Sync.mode to support series 7/8/9 controllersMahesh Rajashekhara2012-02-191-51/+242
| | | | | | | | | | Added Sync. mode to support Series 7/8/9 controller families: This is a compatibility mode for all these controller families. The Async. (Performance) mode can be changed in the future. First Async. mode version added for Series 7; Controller parameter aac_sync_mode added Signed-off-by: Mahesh Rajashekhara <aacraid@pmc-sierra.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
* Remove unneeded version.h includes from drivers/scsi/Jesper Juhl2011-09-151-1/+0Star
| | | | | | | | | It was pointed out by 'make versioncheck' that some includes of linux/version.h are not needed in drivers/scsi/. This patch removes them. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>