aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/src.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-05-21treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 18Thomas Gleixner1-15/+1
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program see the file copying if not write to the free software foundation 675 mass ave cambridge ma 02139 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 52 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Jilayne Lovejoy <opensource@jilayne.com> Reviewed-by: Steve Winslow <swinslow@gmail.com> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190519154042.342335923@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-04scsi: aacraid: clean up some indentation and formatting issuesColin Ian King1-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>
2018-12-12scsi: aacraid: change event_wait to a completionArnd Bergmann1-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>
2018-06-26scsi: aacraid: stop using deprated get_seconds()Arnd Bergmann1-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>
2018-04-05Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsiLinus Torvalds1-12/+193
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 ...
2018-03-27treewide: Fix typos in printkMasanari Iida1-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>
2018-02-13scsi: aacraid: Auto detect INTx or MSIx mode during sync cmd processingRaghava Aditya Renukunta1-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>
2018-02-13scsi: aacraid: Preserve MSIX mode in the OMR registerRaghava Aditya Renukunta1-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>
2018-02-13scsi: aacraid: Implement DropIO sync commandRaghava Aditya Renukunta1-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>
2017-11-20scsi: aacraid: Perform initialization reset only onceGuilherme G. Piccoli1-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>
2017-09-27scsi: aacraid: Add a small delay after IOP resetGuilherme G. Piccoli1-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>
2017-06-12scsi: aacraid: Add reset debugging statementsRaghava Aditya Renukunta1-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>
2017-06-12scsi: aacraid: Rework aac_src_restartRaghava Aditya Renukunta1-22/+12
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>
2017-06-12scsi: aacraid: Rework SOFT reset codeRaghava Aditya Renukunta1-20/+18
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>
2017-06-12scsi: aacraid: Add periodic checks to see IOP reset statusRaghava Aditya Renukunta1-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>
2017-06-12scsi: aacraid: Rework IOP resetRaghava Aditya Renukunta1-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>
2017-06-12scsi: aacraid: Using single reset mask for IOP resetRaghava Aditya Renukunta1-14/+2
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>
2017-03-06scsi: aacraid: Fix typo in blink statusRaghava Aditya Renukunta1-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>
2017-02-22scsi: aacraid: Save adapter fib log before an IOP resetRaghava Aditya Renukunta1-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>
2017-02-22scsi: aacraid: Reorder Adapter status checkRaghava Aditya Renukunta1-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>
2017-02-22scsi: aacraid: Skip IOP reset on controller panic(SMART Family)Raghava Aditya Renukunta1-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>
2017-02-22scsi: aacraid: Fix sync fibs time out on controller resetRaghava Aditya Renukunta1-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>
2017-02-22scsi: aacraid: Fix camel caseRaghava Aditya Renukunta1-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>
2017-02-07scsi: aacraid: avoid open-coded upper_32_bitsArnd Bergmann1-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>
2017-02-03scsi: aacraid: Update copyrightsRaghava Aditya Renukunta1-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>
2017-02-03scsi: aacraid: Added new IWBR resetRaghava Aditya Renukunta1-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>
2017-02-03scsi: aacraid: Added support to abort cmd and reset lunRaghava Aditya Renukunta1-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>
2017-02-03scsi: aacraid: Include HBA direct interfaceRaghava Aditya Renukunta1-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>
2017-02-03scsi: aacraid: Added support for response pathRaghava Aditya Renukunta1-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>
2017-02-03scsi: aacraid: added support for init_struct_8Raghava Aditya Renukunta1-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>
2016-09-09scsi: aacraid: mark aac_src_select_comm() staticBaoyou Xie1-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>
2016-04-29aacraid: Log firmware AIF messagesRaghava Aditya Renukunta1-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>
2016-02-23aacraid: Fix RRQ overloadRaghava Aditya Renukunta1-23/+7
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>
2015-11-09aacraid: Reset irq affinity hintsMahesh Rajashekhara1-44/+4
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>
2015-11-09aacraid: Enable 64bit write to controller registerMahesh Rajashekhara1-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>
2015-11-09aacraid: Change interrupt mode to MSI for Series 6Mahesh Rajashekhara1-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>
2015-11-09aacraid: Add Power Management supportMahesh Rajashekhara1-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>
2015-05-25aacraid: aac_src_intr_message() can be statickbuild test robot1-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>
2015-04-09aacraid: performance improvement changesMahesh Rajashekhara1-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>
2015-04-09aacraid: IOP RESET command handling changesMahesh Rajashekhara1-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>
2015-04-09aacraid: MSI-x supportMahesh Rajashekhara1-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>
2014-03-19[SCSI] remove deprecated IRQF_DISABLED from SCSIMichael Opdenacker1-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>
2013-06-26[SCSI] aacraid: Fix for arrays are going offline in the system. System hangsMahesh Rajashekhara1-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>
2013-04-10[SCSI] aacraid: Dual firmware image supportMahesh Rajashekhara1-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>
2013-02-24[SCSI] aacraid: suppress two GCC warningsPaul Bolle1-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>
2012-07-20[SCSI] aacraid: Series 7 Async. (performance) mode supportMahesh Rajashekhara1-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>
2012-07-20[SCSI] aacraid: Fix endian issues in core and SRC portions of driverBen Collins1-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>
2012-07-20[SCSI] aacraid: Use resource_size_t for IO mem pointers and offsetsBen Collins1-4/+3
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>
2012-04-23[SCSI] aacraid: add an iounmap call to aac_src_ioremapTomas Henzl1-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>
2012-02-19[SCSI] aacraid: Added Sync.mode to support series 7/8/9 controllersMahesh Rajashekhara1-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>