aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-02-02hpsa: get rid of cmd_special_alloc and cmd_special_freeStephen Cameron
We have commands reserved for internal use. This is laying the groundwork for removing the internal queue of commands from the driver so that the locks that protect that queue may be removed. Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02hpsa: reserve some commands for use by driverStephen Cameron
We need to reserve some commands for device rescans, aborts, and the pass through ioctls, etc. so we cannot give them all to the scsi mid layer. This is in preparation for removing cmd_special_alloc and cmd_special_free so that we can stop queuing commands internally in the driver so that we can remove the locks thta protect the queue that we will no longer have. Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02hpsa: avoid unneccesary calls to resource freeing functionsRobert Elliott
If hpsa_allocate_cmd_pool failed, we were calling two functions unnecessarily: hpsa_free_sg_chain_blocks(h); hpsa_free_cmd_pool(h); This didn't cause any problem, as those functions can tolerate being called when what they free hasn't been allocated (relevant pointers would be NULL) but it is potentially confusing. Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02hpsa: fix memory leak in hpsa_alloc_cmd_poolRobert Elliott
Partial allocation failure wasn't handled correctly Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02hpsa: report allocation failures while allocating SG chain blocksRobert Elliott
Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02hpsa: pass error from pci_set_consistent_dma_mask from hpsa_messageRobert Elliott
Return the actual error code instead of a generic error code. Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02hpsa: rename hpsa_request_irq to hpsa_request_irqsRobert Elliott
Make the function name more descriptive. We use more than one interrupt. Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02hpsa: report failure to ioremap config tableRobert Elliott
Enhance error reporting. Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02hpsa: trivial message and comment clean upsStephen Cameron
Cleanup comments to be more specific. Make messages more informational. Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02hpsa: refactor hpsa_find_board_params() to encapsulate legacy testWebb Scales
Encapsulate the conditional predicate which tests for legacy controllers in a separate function and rework the code comments. Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Webb Scales <webbnh@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02hpsa: downgrade the Waiting for no-op print to dev_infoRobert Elliott
There is nothing worrisome about the "Waiting for controller to respond to no-op" print, so use dev_info rather than dev_warn. Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02hpsa: propagate return value from board ID lookupRobert Elliott
If the board ID lookup function fails, return the return code rather than return -ENODEV. The only board ID failure reason right now is -ENODEV, so this just provides more informative prints in kdump and adapts to future changes. Tested with error injection while booting with reset_devices on the kernel command line: [ 62.804324] injecting error in inj_hpsa_lookup_board_id: 1 11 [ 62.804423] hpsa 0000:04:00.0: Board ID not found (the pci probe layer does not print an additional message if -ENODEV is the reason) Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02hpsa: propagate hard_reset failures in reset_devices modeRobert Elliott
Return the real reason for kdump_hard_reset failure rather than change them all to -ENODEV. Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02hpsa: remove 0x from queue depth print which is in decimalRobert Elliott
The queue depth printed at startup is in decimal, so shouldn't have a 0x prefix. Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02hpsa: notice all request_irq errorsRobert Elliott
In MSI and MSI-X mode, where hpsa asks for more than one interrupt, hpsa_request_irqs forgets if the first request_irq call failed if later ones succeed. It needs to exit the loop on any failure rather than continue, freeing all irqs that were requested until that point. Also, it needs to clear out the q numbers up to MAX_REPLY_QUEUES. The same is true for the general hpsa_free_irqs function. Tested with error injection of -ENOSYS on the 4th call: [ 9.277691] injecting error in inj_request_irq: 1 4 [ 9.277780] hpsa 0000:02:00.0: failed to get irq 35 for hpsa1 [ 10.711623] scsi host1: Error handler scsi_eh_1 exiting [ 10.739170] hpsa: probe of 0000:02:00.0 failed with error -38 Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02hpsa: Fix -Wunused-but-set-variable warningFabian Frederick
Remove unused variable in hpsa_free_cmd_pool. Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Fabian Frederick <fabf@skynet.be> Acked-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02hpsa: rename free_irqs to hpsa_free_irqsRobert Elliott
Change the function names to have hpsa prefix. Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02hpsa: adjust RAID-1, RAID-1ADM, and RAID-6 namesRobert Elliott
HP now uses RAID-6 rather than RAID-ADG (Advanced Data Guarding) as the marketing name for our implementation of RAID-6. The driver considers RAID-1 and RAID-1+0 to be the same level, and considers RAID-1ADM and RAID-1+0ADM to be the same level. Parenthesis can be used to reflect the optional +0 portion of both those RAID levels. Rename: RAID-ADG to RAID-6 RAID-1(1+0) to RAID-1(+0) RAID-1(ADM) to RAID-1(+0)ADM Also, add another const after the pointer type as suggested by checkpatch.pl so the array is: static const char * const raid_label[] Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Robert Elliott <elliott@hp.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02hpsa: correct change_queue_depthDon Brace
We change drive queue depths to match drive reported queue depths. The name of the SML function was changed from scsi_adjust_queue_depth changed to scsi_change_queue_depth. Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02hpsa: change how SA controllers are resetDon Brace
Change how SA controllers are reset by changing PCI power levels. The hpsa driver was finding the PCI_PM_CTRL_STATE_MASK offset then reading/writing a bitmask to change the power state. There are kernel functions that do the same operations. Better to use the kernel functions. Signed-off-by: Don Brace <don.brace@pmcs.com> Reviewed-by: Scott Teel <scott.teel@pmcs.com> Reviewed-by: Webb Scales <webbnh@hp.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02hpsa: turn off interrupts when kdump startsTomas Henzl
Sometimes when the card is restarted it may cause - "irq 16: nobody cared (try booting with the "irqpoll" option)" that is likely caused so, that the card, after the hard reset finishes, pulls on the irq. Disabling the ints before or after the hpsa_kdump_hard_reset_controller fixes it. At this point we can't know in which state the card is, so using SA5_INTR_OFF + SA5_REPLY_INTR_MASK_OFFSET defines directly, instead of the function the drivers provides, seems to be apropriate. Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02hpsa: fix memory leak in kdump hard resetTomas Henzl
There is a potential memory leak in hpsa_kdump_hard_reset_controller. Reviewed-by: Don Brace <don.brace@pmcs.com> Reviewed-by: Scott Teel <scott.teel@pmcs.com> Signed-off-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Don Brace <don.brace@pmcs.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-02-02hpsa: correct endian sparse warningsDon Brace
Correct endiness issues reported by sparse. SA controllers are little endian. This patch ensures endiness correctness. Signed-off-by: Don Brace <don.brace@pmcs.com> Reviewed-by: Scott Teel <scott.teel@pmcs.com> Reviewed-by: Webb Scales <webbnh@hp.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-01-20ufs-qcom: add support for Qualcomm Technologies Inc platformsYaniv Gardi
This change adds support for Qualcomm Technologies Inc platforms that use UFS driver. for example, it adds : - PM specific operations during hibern8, suspend, resume, clock setup - qcom-ufs generic phy driver initialization, calibration, power-on/off sequence, etc. - UFS Controller specific configuration - Rate, Gear, Mode negotiation between device and controller Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org> Reviewed-by: Dov Levenglick <dovl@codeaurora.org> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-01-20phy: qcom-ufs: add support for 14nm phyYaniv Gardi
This change adds a support for a 14nm qcom-ufs phy that is required in platforms that use ufs-qcom controller. Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org> Reviewed-by: Dov Levenglick <dovl@codeaurora.org> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-01-20phy: qcom-ufs: add support for 20nm phyYaniv Gardi
This change adds a support for a 20nm qcom-ufs phy that is required in platforms that use ufs-qcom controller. Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org> Reviewed-by: Dov Levenglick <dovl@codeaurora.org> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-01-20phy: qcom-ufs: add support for QUALCOMM Technologies UFS PHY driversYaniv Gardi
This change adds a generic and common API support for ufs phy QUALCOMM Technologies. This support provides common code and also points to specific phy callbacks to differentiate between different behaviors of frequent use-cases (like power on, power off, phy calibration etc). Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org> Reviewed-by: Dov Levenglick <dovl@codeaurora.org> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-01-20sr: reduce debug noise in sr_do_ioctlChristoph Hellwig
The midlayer scsi logging already logs the command and sense code if the logging level is high enough, no need to duplicate that in the sr driver. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: James Bottomley <JBottomley@Parallels.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.de>
2015-01-20ch: remove debug noise in ch_do_scsiChristoph Hellwig
The midlayer logging already prints the cdb details if the logging level is high enough, no need to duplicate this in the ch driver. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: James Bottomley <JBottomley@Parallels.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.de>
2015-01-20scsi: always use format argumets for dev_printkChristoph Hellwig
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: James Bottomley <JBottomley@Parallels.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.de>
2015-01-20scsi: annotate sdev_prefix_printk and scmd_printk as printf-likeChristoph Hellwig
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: James Bottomley <JBottomley@Parallels.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.de>
2015-01-20libata: fixup oops in ata_eh_link_report()Hannes Reinecke
We should only try to evaluate the cdb if this is an ATAPI device, for any other device the 'cdb' field and the cdb_len has no meaning. Fixes: cbba5b0ee4c6c2fc8b78a21d0900099d480cf2e9 Reported-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Tejun Heo <tj@kernel.org> Tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-01-13mpt2sas: Bump driver version to 20.100.00.00Sreekanth Reddy
Bump mpt2sas driver version to 20.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>
2015-01-13mpt2sas, mpt3sas: set cpu affinity for each MSIX vectorsSreekanth Reddy
Added a support to set cpu affinity mask for each MSIX vector enabled by the HBA. So that, running the irqbalancer will balance interrupts among the cpus. Change_set: 1. Added affinity_hint varable of type cpumask_var_t in adapter_reply_queue structure. And allocated a memory for this varable by calling alloc_cpumask_var. 2. Call the API irq_set_affinity_hint for each MSIx vector to affiniate it with calculated cpus at driver inilization time. 3. While freeing the MSIX vector, call this same API to release the cpu affinity mask for each MSIx vector by providing the NULL value in cpumask argument. 4. then call the free_cpumask_var API to free the memory allocated in step 2. 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>
2015-01-13mpt2sas, mpt3sas: Update attribution language to AvagoSreekanth Reddy
Copyright, Trademark & Confidentiality legal statements throughout the source code changed from LSI to Avago. 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>
2015-01-13mpt2sas: map log_info value 0x0x32010081 to DID_RESETSreekanth Reddy
For any SCSI command, if the driver receives IOC status = SCSI_IOC_TERMINATED and log info = 0x32010081 then that command will be completed with DID_RESET host status. The definition of this log info value is "Virtual IO has failed and has to be retried". Firmware will provide this log info value with IOC Status "SCSI_IOC_TERMINATED", whenever a drive (with is a part of a volume) is pulled and pushed back within some minimal delay. With this log info value, firmware informs the driver to retry the failed IO command infinite times, so to provide some time for the firmware to discover the reinserted drive successfully instated of just retrying failed command for five times( doesn't giving enough time for firmware to complete the drive discovery) and failing the IO permanently even though drive came back successfully. 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>
2015-01-13mpt2sas, mpt3sas: fix upper bound for the module parameter max_sgl_entriesSreekanth Reddy
Change Set: 1. Extended the upper boundary restriction for the module parameter max_sgl_entries. Earlier, the max_sgl_entries was capped at the SCSI_MAX_SG_SEGMENTS kernel definition. With this change, the user would be able to set the max_sgl_entries to any value which is greater than SCSI_MAX_SG_SEGMENTS and less than the minimum of SCSI_MAX_SG_CHAIN_SEGMENTS & hardware limit (Calculated using IOCFacts's MaxChainDepth). 2. Added a print for the message log whenever the user sets the max_sgl_entries to a value greater than SCSI_MAX_SG_SEGMENTS to warn about the kernel definition overriding. 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>
2015-01-13mpt2sas: MPI2 Rev BB (2.00.20) specification and 2.00.35 header filesSreekanth Reddy
Change List in this MPI2 specification, 1. Added SSUTimeout field to MPI2_CONFIG_PAGE_BIOS_1, and more defines for the BiosOptions field. 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>
2015-01-13mpt2sas: Bump driver version to 19.100.00.00Sreekanth Reddy
Bump driver version to 19.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>
2015-01-13mpt2sas, mpt3sas: Fail the host reset initiated due to discovery related I/O ↵Sreekanth Reddy
timeouts at driver load time When a flaky disk is there in a topology then during driver load, discovery related I/O times out; which results in SCSI error recovery initiating host reset and then the controller won't see any disk. In this patch, The driver would return FAILED status to the host reset initiated due to discovery related I/O timeout if ioc->is_driver_loading is set. This flag would be set until we exit out of scsih_scan_finished(). i.e. During device discovery if one of the disk is flaky (which responds to some discovery commands and doesn't respond to some) the driver wouldn't perform host reset for discovery related I/O timeout. Instead it would return Failure for the host reset resulting in the flaky disk getting removed by the SCSI Mid layer, so other disks would be added correctly. 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>
2015-01-13mpt2sas, mpt3sas: log exceeded temperature thresholdsSreekanth Reddy
This patch will log a message when driver receives "Temperature Threshold exceeded" event from any temperature sensor. The message will look similar to like: mpt3sas0: Temperature Threshold flags a b c d exceeded for Sensor: x !!! mpt3sas0: Current Temp In Celsius: y where a b c d are threshold flags 0 1 2 3 Change_set: 1. Get the number of sensor count of this IOC by reading IO Unit page 8 at driver initialization time. 2. Also unmask the Temperature Threshold Event at driver initialization time 3. Whenever a MPI2_EVENT_TEMP_THRESHOLD event is received from the firmware, then print the sensor number, the maximum threshold number it has exceed and the current temperature of this sensor. 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>
2015-01-12mpt2sas: MPI2 Rev AA (2.00.19) specificationsSreekanth Reddy
Below is the changeset from the MPI specification and 2.00.34 header files: 1) Defined additional bits in the BiosOptions field of BIOS Page 1 to allow for finer control of X86 BIOS and UEFI BSD. 2) For the Clean Tool, reserved bit 26 of the Flags field for product specific use. 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>
2015-01-09megaraid_sas: driver version updateSumit.Saxena@avagotech.com
Update megaraid_sas driver version. Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-01-09megaraid_sas: remove redundant memset callSumit.Saxena@avagotech.com
struct fusion_context *fusion is already memset to '0', so remove a redundant call to memmset "fusion->load_balance_info" to '0'. Signed-off-by: Chaitra Basappa <chaitra.basappa@avagotech.com> Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-01-09megaraid_sas: reserve commands for IOCTLs and internal DCMDsSumit.Saxena@avagotech.com
1) For fusion adapters, limit reserved frames for non SCSI commands to 8 (3 for parallel IOCTLs + 5 for driver's internal DCMDs). Earlier reserved commands for non SCSI IO frames was set to 32, so with this implementation, increased per controller "can_queue". Behavior of MFI controllers will remain unchanged. 2) Optimize the code related to per controller's 'can_queue' setting. Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com> Signed-off-by: Chaitra Basappa <chaitra.basappa@avagotech.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-01-09megaraid_sas: complete outstanding IOCTLs before killing adapterSumit.Saxena@avagotech.com
Driver calls megasas_complete_cmd() to call wake_up() for each MFI frame that was issued through the ioctl() interface prior to the kill adapter. This ensures userspace ioctl() system calls issued just before a kill adapter don't get stuck in wait state and IOCTLs are returned to the application. Cc: <stable@vger.kernel.org> Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com> Signed-off-by: Chaitra Basappa <chaitra.basappa@avagotech.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-01-09megaraid_sas: disable interrupt_mask before enabling hardware interruptsSumit.Saxena@avagotech.com
Update driver "mask_interrupts" before enable/disable hardware interrupt in order to avoid missing interrupts because of "mask_interrupts" still set to 1 and hardware interrupts are enabled. Cc: <stable@vger.kernel.org> Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com> Signed-off-by: Chaitra Basappa <chaitra.basappa@avagotech.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-01-09megaraid_sas: fix the problem of non-existing VD exposed to hostSumit.Saxena@avagotech.com
This patch will address the issue of SCSI device created at OS level for non existing VD. ldTgtIdtoLd[] array has size 256 for Extended VD firmware and 128 for legacy firmware. Accessing indices beyond array size (OS will send TUR, INQUIRY.. commands upto device index 255), may return valid LD value and that particular SCSI command will be SUCCESS and creating SCSI device for non existing target(VD). For legacy firmware (64 VD firmware), invalidates LD (by setting LD value to 0xff) in LdTgtIdtoLd[] array for device index beyond 127, so that invalid LD(0xff) value should be returned beyond device index beyond 127. Cc: <stable@vger.kernel.org> Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com> Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-01-09megaraid_sas: add support for secure JBODSumit.Saxena@avagotech.com
This patch adds support for Secure Encrypting Drives (SED) in JBOD mode: 1) If the firmware supports SED JBOD, all non read/write commands to JBODs will be sent via firmware path, and read/write commands to JBODs will be sent via fastpath. 2) If the firmware does not support SED JBOD, driver will fall back to the old design, i.e. send all JBOD I/O via fastpath. Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com> Signed-off-by: Chaitra Basappa <chaitra.basappa@avagotech.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
2015-01-09megaraid_sas: endianness related bug fixes and code optimizationSumit.Saxena@avagotech.com
This patch addresses below issues: 1) Few endianness bug fixes. 2) Break the iteration after (MAX_LOGICAL_DRIVES_EXT - 1)), instead of MAX_LOGICAL_DRIVES_EXT. 3) Optimization in MFI INIT frame before firing. 4) MFI IO frame should be 256bytes aligned. Code is optimized to reduce the size of frame for fusion adapters and make the MFI frame size calculation a bit transparent and readable. Cc: <stable@vger.kernel.org> Signed-off-by: Kashyap Desai <kashyap.desai@avagotech.com> Signed-off-by: Sumit Saxena <sumit.saxena@avagotech.com> Signed-off-by: Chaitra Basappa <chaitra.basappa@avagotech.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Christoph Hellwig <hch@lst.de>