aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-09-07Merge branch 'fixes' into miscJames Bottomley2-39/+33
2017-08-30scsi: aacraid: report -ENOMEM to upper layer from aac_convert_sgraw2()Nikola Pajkovsky1-3/+7
aac_convert_sgraw2() kmalloc memory and return -1 on error, which should be -ENOMEM. However, nobody is checking return value, so with this change, -ENOMEM is propagated to upper layer. Signed-off-by: Nikola Pajkovsky <npajkovsky@suse.cz> Reviewed-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-08-30scsi: aacraid: get rid of one level of indentationNikola Pajkovsky1-136/+131
unsigned long byte_count = 0; nseg = scsi_dma_map(scsicmd); if (nseg < 0) return nseg; if (nseg) { ... } return byte_count; is equal to unsigned long byte_count = 0; nseg = scsi_dma_map(scsicmd); if (nseg <= 0) return nseg; ... return byte_count; No other code has changed. [mkp: fix checkpatch complaints] Signed-off-by: Nikola Pajkovsky <npajkovsky@suse.cz> Reviewed-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-08-30scsi: aacraid: fix indentation errorsNikola Pajkovsky2-4/+4
fix stupid indent error, no rocket science here. Signed-off-by: Nikola Pajkovsky <npajkovsky@suse.cz> Reviewed-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-08-29scsi: aacraid: Fix command send race conditionBrian King1-33/+21
This fixes a potential race condition observed on Power systems. Several places throughout the aacraid driver call aac_fib_send or similar to send a command to the aacraid adapter, then check the return code to determine if the command was actually sent to the adapter, then update the phase field in the scsi command scratch pad area to track that the firmware now owns this command. However, there is nothing that ensures that by the time the aac_fib_send function returns and we go to write to the scsi command, that the command hasn't already completed and the scsi command has been freed. This was causing random crashes in the TCP stack which was tracked down to be caused by memory that had been a struct request + scsi_cmnd being now used for an skbuff. Memory poisoning was enabled in the kernel to debug this which showed that the last owner of the memory that had been freed was aacraid and that it was a struct request. The memory that was corrupted was the exact data pattern of AAC_OWNER_FIRMWARE and it was at the same offset that aacraid writes, which is scsicmd->SCp.phase. The patch below resolves this issue. Cc: <stable@vger.kernel.org> Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Tested-by: Wen Xiong <wenxiong@linux.vnet.ibm.com> Reviewed-by: Dave Carroll <david.carroll@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-08-16scsi: aacraid: Fix out of bounds in aac_get_name_respRaghava Aditya Renukunta2-3/+8
We terminate the aac_get_name_resp on a byte that is outside the bounds of the structure. Extend the return response by one byte to remove the out of bounds reference. Fixes: b836439faf04 ("aacraid: 4KB sector support") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David Carroll <david.carroll@microsemi.com> Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-08-07scsi: aacraid: complete all commands during bus resetHannes Reinecke1-14/+20
When issuing a bus reset we should complete all commands, not just the command triggering the reset. Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-08-07scsi: aacraid: add fib flag to mark scsi command callbackHannes Reinecke2-0/+2
To correctly identify which fib has a scsi command callback this patch implements a flag FIB_CONTEXT_FLAG_SCSI_CMD. Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-08-07scsi: aacraid: enable sending of TMFs from aac_hba_send()Hannes Reinecke1-1/+1
aac_hba_send() will return FAILED for any non-SCSI command requests, failing any TMFs. This patch updates the check to allow TMFs. Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-08-07scsi: aacraid: use aac_tmf_callback for reset fibHannes Reinecke1-25/+74
When sending a reset fib we shouldn't rely on the scsi command, but rather set the TMF status in the map_info->reset_state variable. That allows us to send a TMF independent on a scsi command. Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-08-07scsi: aacraid: split off device, target, and bus resetHannes Reinecke1-39/+102
Split off device, target, and bus reset functionality into individual functions. Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-08-07scsi: aacraid: split off host resetHannes Reinecke1-11/+22
Split off the host reset parts of aac_eh_reset() into a separate host reset function. Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-08-07scsi: aacraid: split off functions to generate reset FIBHannes Reinecke1-33/+50
Split off reset FIB generation into separate functions. Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-07-26scsi: aacraid: reading out of boundsDan Carpenter1-3/+4
"qd.id" comes directly from the copy_from_user() on the line before so we should verify that it's within bounds. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-06-26scsi: aacraid: Don't copy uninitialized stack memory to userspaceSeth Forshee1-0/+2
Both aac_send_raw_srb() and aac_get_hba_info() may copy stack allocated structs to userspace without initializing all members of these structs. Clear out this memory to prevent information leaks. Fixes: 423400e64d377 ("scsi: aacraid: Include HBA direct interface") Fixes: c799d519bf088 ("scsi: aacraid: Retrieve HBA host information ioctl") Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-06-26scsi: aacraid: fix leak of data from stack back to userspaceColin Ian King1-0/+2
The fields sense_data_size and sense_data are unitialized garbage from the stack and are being copied back to userspace. Fix this leak of stack information by ensuring they are zero'd. Detected by CoverityScan, CID#1435473 ("Uninitialized scalar variable") Fixes: 423400e64d377 ("scsi: aacraid: Include HBA direct interface") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Dave Carroll <david.carroll@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-06-12scsi: aacraid: Update driver version to 50834Raghava Aditya Renukunta1-1/+1
Update the driver version to 50834 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: Remove reference to Series-9Raghava Aditya Renukunta4-26/+19
Remove reference to Series-9 HBA and created arc ctrl check function. Signed-off-by: Prasad B Munirathnam <prasad.munirathnam@microsemi.com> 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 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: Enable ctrl reset for both hba and arcRaghava Aditya Renukunta1-37/+40
Make sure that IOP and SOFT reset are enabled for both for both arc and hba1000 controllers. 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: Make sure ioctl returns on controller resetRaghava Aditya Renukunta1-7/+18
Made sure that ioctl commands return in case of a controller reset. 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-06-12scsi: aacraid: Use correct function to get ctrl healthRaghava Aditya Renukunta1-2/+2
The command thread checks the ctrl health periodically before sending updates to the controller. The function that it uses is aac_check_health which does more than get the health status. 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 Renukunta2-2/+44
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 Renukunta2-15/+6
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-06-12scsi: aacraid: Print ctrl status before eh resetRaghava Aditya Renukunta1-0/+9
Log the status of the controller before issuing a 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: Log count info of scsi cmds before resetRaghava Aditya Renukunta1-37/+53
Log the location of the scsi cmds before triggering a reset. This information is useful for debugging. 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: Change wait time for fib completionRaghava Aditya Renukunta1-4/+4
Change the completion wait time for the fibs in the reset and abort callback from 2 minutes to 15 seconds. 2 minutes is too long for waiting for completion. 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: Remove reset support from check_healthRaghava Aditya Renukunta1-15/+0
Check health does not need to reset the ctrl but just return the controller health status. 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: Set correct Queue Depth for HBA1000 RAW disksRaghava Aditya Renukunta1-8/+20
The default queue depth for non NATIVE RAW disks is calculated from the number of fibs and number of disks or a max of 256. This causes poor disk IO performance. The fix is to set default qd based on the type of disks (SATA -32 and SAS -64) 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: Added 32 and 64 queue depth for arc nativesRaghava Aditya Renukunta2-0/+12
The qd for ARC Native disks is calculated by dividing the max IO 1024 by the number of disks or 256 which ever is lower. This causes poor disk IO performance. The fix is set the qd based on the type of disk (SAS - 64 and SATA - 32). 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: Fix DMAR issues with iommu=ptRaghava Aditya Renukunta3-35/+43
The driver changed the DMA consistent map after consistent memory was allocated, this invalidated the IOMMU identity mapping. The fix was to make sure that we set the DMA consistent mask setting once depending on the controller card. 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-06-12scsi: aacraid: Remove __GFP_DMA for raw srb memoryRaghava Aditya Renukunta1-8/+7
The raw srb commands do not requires memory that in the ZONE_DMA memory space. For 32bit srb commands use GFP_DMA32 to limit the memory to 32bit memory range (4GB). 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-05-04Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsiLinus Torvalds6-31/+35
Pull SCSI updates from James Bottomley: "This update includes the usual round of major driver updates (hisi_sas, ufs, fnic, cxlflash, be2iscsi, ipr, stex). There's also the usual amount of cosmetic and spelling stuff" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (155 commits) scsi: qla4xxx: fix spelling mistake: "Tempalate" -> "Template" scsi: stex: make S6flag static scsi: mac_esp: fix to pass correct device identity to free_irq() scsi: aacraid: pci_alloc_consistent() failures on ARM64 scsi: ufs: make ufshcd_get_lists_status() register operation obvious scsi: ufs: use MASK_EE_STATUS scsi: mac_esp: Replace bogus memory barrier with spinlock scsi: fcoe: make fcoe_e_d_tov and fcoe_r_a_tov static scsi: sd_zbc: Do not write lock zones for reset scsi: sd_zbc: Remove superfluous assignments scsi: sd: sd_zbc: Rename sd_zbc_setup_write_cmnd scsi: Improve scsi_get_sense_info_fld scsi: sd: Cleanup sd_done sense data handling scsi: sd: Improve sd_completed_bytes scsi: sd: Fix function descriptions scsi: mpt3sas: remove redundant wmb scsi: mpt: Move scsi_remove_host() out of mptscsih_remove_host() scsi: sg: reset 'res_in_use' after unlinking reserved array scsi: mvumi: remove code handling zero scsi_sg_count(scmd) case scsi: fusion: fix spelling mistake: "Persistancy" -> "Persistency" ...
2017-04-26scsi: aacraid: pci_alloc_consistent() failures on ARM64Mahesh Rajashekhara6-31/+35
There were pci_alloc_consistent() failures on ARM64 platform. Use dma_alloc_coherent() with GFP_KERNEL flag DMA memory allocations. Signed-off-by: Mahesh Rajashekhara <mahesh.rajashekhara@microsemi.com> [hch: tweaked indentation, removed memsets] Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Dave Carroll <david.carroll@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-04-12Merge remote-tracking branch 'mkp-scsi/4.11/scsi-fixes' into fixesJames Bottomley2-4/+10
2017-04-11scsi: aacraid: fix PCI error recovery pathGuilherme G. Piccoli2-4/+10
During a PCI error recovery, if aac_check_health() is not aware that a PCI error happened and we have an offline PCI channel, it might trigger some errors (like NULL pointer dereference) and inhibit the error recovery process to complete. This patch makes the health check procedure aware of PCI channel issues, and in case of error recovery process, the function aac_adapter_check_health() returns -1 and let the recovery process to complete successfully. This patch was tested on upstream kernel v4.11-rc5 in PowerPC ppc64le architecture with adapter 9005:028d (VID:DID) - the error recovery procedure was able to recover fine. Fixes: 5c63f7f710bd ("aacraid: Added EEH support") Cc: stable@vger.kernel.org # v4.6+ Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com> Reviewed-by: Dave Carroll <david.carroll@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-03-29Merge remote-tracking branch 'mkp-scsi/4.11/scsi-fixes' into fixesJames Bottomley1-8/+6
2017-03-15scsi: aacraid: Fix potential null accessRaghava Aditya Renukunta1-8/+6
Currently, command threads fails to return ioctls commands for older controller versions, since it returns when all the fibs have been allocated. Another issue is even all the fibs have not been allocated, the correct allocated fibs is not updated nor freed. Fixes: 113156bcea9ef1e6 (scsi: aacraid: Reworked aac_command_thread) Reported-by: Tomas Henzl <thenzl@redhat.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-03-07Merge remote-tracking branch 'mkp-scsi/fixes' into fixesJames Bottomley1-1/+1
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-03-03Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsiLinus Torvalds8-129/+256
Pull more SCSI updates from James Bottomley: "This is the set of stuff that didn't quite make the initial pull and a set of fixes for stuff which did. The new stuff is basically lpfc (nvme), qedi and aacraid. The fixes cover a lot of previously submitted stuff, the most important of which probably covers some of the failing irq vectors allocation and other fallout from having the SCSI command allocated as part of the block allocation functions" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (59 commits) scsi: qedi: Fix memory leak in tmf response processing. scsi: aacraid: remove redundant zero check on ret scsi: lpfc: use proper format string for dma_addr_t scsi: lpfc: use div_u64 for 64-bit division scsi: mac_scsi: Fix MAC_SCSI=m option when SCSI=m scsi: cciss: correct check map error. scsi: qla2xxx: fix spelling mistake: "seperator" -> "separator" scsi: aacraid: Fixed expander hotplug for SMART family scsi: mpt3sas: switch to pci_alloc_irq_vectors scsi: qedf: fixup compilation warning about atomic_t usage scsi: remove scsi_execute_req_flags scsi: merge __scsi_execute into scsi_execute scsi: simplify scsi_execute_req_flags scsi: make the sense header argument to scsi_test_unit_ready mandatory scsi: sd: improve TUR handling in sd_check_events scsi: always zero sshdr in scsi_normalize_sense scsi: scsi_dh_emc: return success in clariion_std_inquiry() scsi: fix memory leak of sdpk on when gd fails to allocate scsi: sd: make sd_devt_release() static scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework. ...
2017-02-27scsi: aacraid: remove redundant zero check on retColin Ian King1-5/+1
The check for ret being zero is redundant as a few statements earlier we break out of the while loop if ret is non-zero. Thus we can remove the zero check and also the dead-code non-zero case too. Detected by CoverityScan, CID#1411632 ("Logically Dead Code") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Dave Carroll <david.carroll@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-02-27scripts/spelling.txt: add "therfore" pattern and fix typo instancesMasahiro Yamada1-1/+1
Fix typos and add the following to the scripts/spelling.txt: therfore||therefore Besides, tidy up comment blocks for 80-col wrapping. Link: http://lkml.kernel.org/r/1481573103-11329-31-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-23scsi: aacraid: Fixed expander hotplug for SMART familyRaghava Aditya Renukunta1-4/+1
Current driver Hotplug processing code skips over Enclosure channel, therefore any addition/removal of expander enclosure is not processed. Additionally device addition code relies on older device type, which prevents the hotplug of adapter expanders. Fixed by removing code that skips over Enclosure channels and using the latest device type for addition or removal or enclosure expanders. Fixes: 6223a39fe6fbbeef (scsi: aacraid: Added support for hotplug) 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: Update driver versionRaghava Aditya Renukunta1-1/+1
Updated driver version to 50792 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 a potential spinlock double unlock bugRaghava Aditya Renukunta1-1/+1
The driver does not unlock the reply queue spin lock after handling SMART adapter events. Instead it might attempt to unlock an already unlocked spin lock. Fixed by making sure the driver locks the spin lock before freeing it. Thank you dan for finding this issue out. Fixes: 6223a39fe6fbbeef (scsi: aacraid: Added support for hotplug) Reported-by: Dan Carpenter <dan.carpenter@oracle.com> 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: Save adapter fib log before an IOP resetRaghava Aditya Renukunta3-0/+27
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>