summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mpt2sas, mpt3sas: set cpu affinity for each MSIX vectorsSreekanth Reddy2015-01-134-6/+44
| | | | | | | | | | | | | | | | | | | | | 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>
* mpt2sas, mpt3sas: Update attribution language to AvagoSreekanth Reddy2015-01-1318-20/+38
| | | | | | | | | 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>
* mpt2sas: map log_info value 0x0x32010081 to DID_RESETSreekanth Reddy2015-01-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | 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>
* mpt2sas, mpt3sas: fix upper bound for the module parameter max_sgl_entriesSreekanth Reddy2015-01-132-5/+15
| | | | | | | | | | | | | | | | | | | | 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>
* mpt2sas: MPI2 Rev BB (2.00.20) specification and 2.00.35 header filesSreekanth Reddy2015-01-132-5/+17
| | | | | | | | | | | 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>
* mpt2sas: Bump driver version to 19.100.00.00Sreekanth Reddy2015-01-131-2/+2
| | | | | | | | 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>
* mpt2sas, mpt3sas: Fail the host reset initiated due to discovery related I/O ↵Sreekanth Reddy2015-01-132-0/+17
| | | | | | | | | | | | | | | | | | | | | | | 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>
* mpt2sas, mpt3sas: log exceeded temperature thresholdsSreekanth Reddy2015-01-138-0/+161
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* mpt2sas: MPI2 Rev AA (2.00.19) specificationsSreekanth Reddy2015-01-124-11/+41
| | | | | | | | | | | | | | 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>
* megaraid_sas: driver version updateSumit.Saxena@avagotech.com2015-01-091-1/+1
| | | | | | | | 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>
* megaraid_sas: remove redundant memset callSumit.Saxena@avagotech.com2015-01-091-2/+0
| | | | | | | | | | 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>
* megaraid_sas: reserve commands for IOCTLs and internal DCMDsSumit.Saxena@avagotech.com2015-01-093-39/+45
| | | | | | | | | | | | | | | 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>
* megaraid_sas: complete outstanding IOCTLs before killing adapterSumit.Saxena@avagotech.com2015-01-092-15/+54
| | | | | | | | | | | | | | 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>
* megaraid_sas: disable interrupt_mask before enabling hardware interruptsSumit.Saxena@avagotech.com2015-01-091-1/+2
| | | | | | | | | | | | 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>
* megaraid_sas: fix the problem of non-existing VD exposed to hostSumit.Saxena@avagotech.com2015-01-092-2/+15
| | | | | | | | | | | | | | | | | | | 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>
* megaraid_sas: add support for secure JBODSumit.Saxena@avagotech.com2015-01-093-51/+107
| | | | | | | | | | | | | | | 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>
* megaraid_sas: endianness related bug fixes and code optimizationSumit.Saxena@avagotech.com2015-01-094-30/+24
| | | | | | | | | | | | | | | | | | | 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>
* scsi: do not display kernel pointer in message logsHannes Reinecke2015-01-091-29/+20
| | | | | | | | | | It is not good practice to display the kernel pointer in any message logs, and it doesn't display any additional information. And as we know have block-layer assigned tags we can use them to differentiate the messages. So remove any pointer references from the displayed messages. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
* scsi: Do not display buffer pointers in scsi_log_send()Hannes Reinecke2015-01-091-8/+1
| | | | | | | | | | | | scsi_log_send() would display buffer pointer for higher logging levels. This is not only of questionable value but also exposes kernel pointer to userspace, which is discouraged in some setups. So drop this message altogether. Tested-by: Robert Elliott <elliott@hp.com> Reviewed-by: Robert Elliott <elliott@hp.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
* scsi: Conditionally compile in constants.cHannes Reinecke2015-01-095-52/+69
| | | | | | | | | | | | | Instead of having constants.c littered with ifdef statements we should be moving dummy functions into the header and condintionally compile in constants.c if selected. And update the Kconfig description to reflect the actual size difference. Suggested-by: Christoph Hellwig <hch@infradead.org> Tested-by: Robert Elliott <elliott@hp.com> Reviewed-by: Robert Elliott <elliott@hp.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
* scsi: use per-cpu buffer for formatting scsi_print_result()Hannes Reinecke2015-01-094-24/+61
| | | | | | | | | | Convert scsi_print_result() to use the per-cpu buffer for decoding the command result and disposition. Tested-by: Robert Elliott <elliott@hp.com> Reviewed-by: Robert Elliott <elliott@hp.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
* scsi: use per-cpu buffer for formatting senseHannes Reinecke2015-01-094-125/+161
| | | | | | | | | | Convert sense buffer logging to use the per-cpu buffer to avoid line breakup. Tested-by: Robert Elliott <elliott@hp.com> Reviewed-by: Robert Elliott <elliott@hp.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
* libata: use __scsi_format_command()Hannes Reinecke2015-01-091-10/+7
| | | | | | | | | | | libata already uses an internal buffer, so we should be using __scsi_format_command() here. Tested-by: Robert Elliott <elliott@hp.com> Reviewed-by: Robert Elliott <elliott@hp.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
* scsi: use external buffer for command loggingHannes Reinecke2015-01-096-92/+192
| | | | | | | | | | | | | | Use an external buffer for __scsi_print_command() and move command logging over to use the per-cpu logging buffer. With that we can guarantee the command always will always be formatted in one line. So we can even print out a variable length command correctly across several lines. Finally rename __scsi_print_command() to __scsi_format_comment() to better reflect the functionality. Tested-by: Robert Elliott <elliott@hp.com> Reviewed-by: Robert Elliott <elliott@hp.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
* scsi: log request tag for scmd_printk()Hannes Reinecke2015-01-091-0/+4
| | | | | | | | | | | The request tag provides a concise identification of a SCSI command, so we should be printing that out for scmd_printk(). Suggested-by: Christoph Hellwig <hch@lst.de> Tested-by: Robert Elliott <elliott@hp.com> Reviewed-by: Robert Elliott <elliott@hp.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
* scsi: Implement per-cpu logging bufferHannes Reinecke2015-01-093-14/+133
| | | | | | | | | | | | Implement a per-cpu buffer for formatting messages to avoid line breaks up under high load. This patch implements scmd_printk() and sdev_prefix_printk() using the per-cpu buffer and makes sdev_printk() a wrapper for sdev_prefix_printk(). Tested-by: Robert Elliott <elliott@hp.com> Reviewed-by: Robert Elliott <elliott@hp.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
* storvsc: force SPC-3 compliance on win8 and win8 r2 hostsK. Y. Srinivasan2015-01-091-0/+13
| | | | | | | | | | | | | | On win8 and win8 r2 hosts force SPC-3 compliance for MSFT virtual disks. Ubuntu has been carrying a similar patch outside the tree for a while now. Starting with win10, the host will support SPC-3 compliance. Based on all the testing that has been done on win8 and win8 r2 hosts, we are comfortable claiming SPC-3 compliance on these hosts as well. This will enable TRIM support on these hosts. Suggested by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Long Li <longli@microsoft.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
* storvsc: fix a bug in storvsc limitsK. Y. Srinivasan2015-01-091-3/+12
| | | | | | | | | | | Commit 4cd83ecdac20d30725b4f96e5d7814a1e290bc7e changed the limits to reflect the values on the host. It turns out that WS2008R2 cannot correctly handle these new limits. Fix this bug by setting the limits based on the host. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Long Li <longli@microsoft.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
* storvsc: force discovery of LUNs that may have been removed.K. Y. Srinivasan2015-01-091-0/+26
| | | | | | | | | | | | | | | The host asks the guest to scan when a LUN is removed or added. The only way a guest can identify the removed LUN is when an I/O is attempted on a removed LUN - the SRB status code indicates that the LUN is invalid. We currently handle this SRB status and remove the device. Rather than waiting for an I/O to remove the device, force the discovery of LUNs that may have been removed prior to discovering LUNs that may have been added. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Long Li <longli@microsoft.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
* storvsc: in responce to a scan event, scan the hostK. Y. Srinivasan2015-01-091-12/+7
| | | | | | | | | The virtual HBA that storvsc implements can support multiple channels and targets. So, scan the host when the host notifies that a scan is needed. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Long Li <longli@microsoft.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
* storvsc: use cmd_size to allocate per-command dataChristoph Hellwig2015-01-091-111/+8
| | | | | | | | | | | | | STORVSC uses its own momory pool to manage device request data. However, the SCSI layer already has a mechanisim for allocating additional memory for each command issued to device driver. This patch removes the memory pool in STORVSC and makes it use SCSI layer to allocate memory for device request data. Reviewed-by: Long Li <longli@microsoft.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
* lpfc: correct device removal deadlock after link bounceJames Smart2015-01-091-0/+9
| | | | | | | | | | | | | | This patch, applicable to 8G/4G/2G adapters, adds a call that resumes transmit operations after a link bounce. Without it, targets that tried to suspend exchanges after a link bounce (such as tape devices using sequence level error recovery) would never resume io operation, causing scan failures, and eventually deadlocks if a device removal request is made. Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
* esp_scsi: remove check for ESP_MAX_TAGSHannes Reinecke2015-01-091-2/+0
| | | | | | | | | 'num_tags' is an unsigned char, so the check for 'ESP_MAX_TAGS' (which is set to 256) is pointless. Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
* mpt3sas: issue_reset is uninitializedDan Carpenter2015-01-091-4/+4
| | | | | | | | | | | The "issue_reset" can be used uninitialized. It should be set to false at the start. Also I cleaned up the types a little by using bool. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
* mpt2sas: issue_reset is uninitializedDan Carpenter2015-01-091-4/+4
| | | | | | | | | | | The "issue_reset" variable can be used uninitialized. It should be set to false at the start. Also I cleaned up the types by using bool. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
* 3w-9xxx.c: Cleaning up missing null-terminate in conjunction with strncpyRickard Strandqvist2015-01-091-1/+2
| | | | | | | | | Replacing strncpy with strlcpy to avoid strings that lacks null terminate. And use the sizeof on the to string rather than strlen on the from string. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Acked-by: Adam Radford <aradford@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
* scsi_debug: Implement WRITE BUFFER commandEwan D. Milne2015-01-091-3/+71
| | | | | | | | | | | | Accept the WRITE BUFFER command and do nothing other than set the appropriate "microcode has been changed" UA on the LU. >From an earlier patch by Doug Gilbert. Signed-off-by: Ewan D. Milne <emilne@redhat.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Tested-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
* scsi_debug: Add REPORTED LUNS DATA HAS CHANGED Unit AttentionEwan D. Milne2015-01-091-1/+55
| | | | | | | | | | | | | | | Generate a REPORTED LUNS DATA HAS CHANGED Unit Attention if sysfs "max_luns" is used to change the number of scsi_debug LUNs. This is only done if scsi_debug_scsi_level is SPC-3 or above. Additionally, implement SPC-4 behavior which only generates this Unit Attention on the first LUN on the target to receive a command after the change. This condition is cleared when a REPORT LUNS command is received. Signed-off-by: Ewan D. Milne <emilne@redhat.com> Acked-by: Douglas Gilbert <dgilbert@interlog.com> Tested-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
* ses: Add power_status to SES device slotSong Liu2015-01-093-9/+133
| | | | | | | | | | | | | | Add power_status to SES device slot, so we can power on/off the HDDs behind the enclosure. Check firmware status in ses_set_* before sending control pages to firmware. Signed-off-by: Song Liu <songliubraving@fb.com> Acked-by: Dan Williams <dan.j.williams@intel.com> Reviewed-by: Jens Axboe <axboe@fb.com> Cc: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
* ses: add reliable slot attributeDan Williams2015-01-093-6/+32
| | | | | | | | | | | | | | | | The name provided by firmware is in a vendor specific format, publish the slot number to have a reliable mechanism for identifying slots across firmware implementations. If the enclosure does not provide a slot number fallback to the component number which is guaranteed unique, and usually mirrors the slot number. Cleaned up the unused ses_component.desc in the process. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Song Liu <songliubraving@fb.com> Reviewed-by: Jens Axboe <axboe@fb.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
* ses: add enclosure logical idDan Williams2015-01-093-0/+23
| | | | | | | | | | | | Export the NAA logical id for the enclosure. This is optionally available from the sas_transport_class, but it is really a property of the enclosure. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Song Liu <songliubraving@fb.com> Reviewed-by: Jens Axboe <axboe@fb.com> Cc: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
* ses: generate KOBJ_CHANGE on enclosure attachDan Williams2015-01-091-1/+2
| | | | | | | | | | | | | In support of a /dev/disk/by-slot populated with data from the enclosure and ses modules udev needs notification when the new interface files/links are available. Otherwise, any udev rules specified for the disk cannot assume that the enclosure topology has settled. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Song Liu <songliubraving@fb.com> Reviewed-by: Jens Axboe <axboe@fb.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
* ses: close potential registration raceDan Williams2015-01-093-20/+43
| | | | | | | | | | | | | The slot and address fields have a small window of instability when userspace can read them before initialization. Separate enclosure_component allocation from registration. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Song Liu <songliubraving@fb.com> Reviewed-by: Jens Axboe <axboe@fb.com> Cc: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
* scsi: retry report-luns when reported LU count requres more memoryRob Evers2015-01-091-30/+11
| | | | | | | | | | | Update scsi_report_lun_scan to initially always report up to 511 LUs, as the previous default max_report_luns did. Retry in a loop if not enough memory is available for the number of LUs reported. Parameter max_report_luns is removed as it is no longer used. Signed-off-by: Rob Evers <revers@redhat.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
* scsi: use set/get_unaligned_be32 in report_lunsRob Evers2015-01-091-8/+3
| | | | | | Signed-off-by: Rob Evers <revers@redhat.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
* scsi: avoid unnecessary GFP_ATOMIC allocation in scsi_report_lun_scanRob Evers2015-01-091-1/+1
| | | | | | Signed-off-by: Rob Evers <revers@redhat.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
* scsi: fix scsi_error.c kernel-doc warningRandy Dunlap2015-01-091-0/+1
| | | | | | | | | | | | | Fix kernel-doc warning in scsi_error.c: Warning(..//drivers/scsi/scsi_error.c:887): No description found for parameter 'hostt' Fixes: 883a030f989a17b81167f3a181cf93d741fa98b4 (scsi: document scsi_try_to_abort_cmd) Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
* scsi: asc/ascq codes, sync to T10 2014/12/21Douglas Gilbert2015-01-091-1/+27
| | | | | | | | | | The last time these SCSI asc/ascq codes were synced with T10 was 2013/06/05. Sync the SCSI ASC/ASCQ number to string tables with those found at http://www.t10.org/lists/asc-num.txt dated 2014/12/21. Signed-off-by: Douglas Gilbert <dgilbert@interlog.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
* scsi: ->queue_rq can't sleepChristoph Hellwig2015-01-091-2/+1
| | | | | | | | | | | | | The blk-mq ->queue_rq method is always called from process context, but might have preemption disabled. This means we still always have to use GFP_ATOMIC for memory allocations, and thus need to revert part of commit 3c356bde1 ("scsi: stop passing a gfp_mask argument down the command setup path"). Signed-off-by: Christoph Hellwig <hch@lst.de> Reported-by: Sasha Levin <sasha.levin@oracle.com> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Tested-by: Alexei Starovoitov <alexei.starovoitov@gmail.com>
* MAINTAINERS: Update maintainer list for qla4xxxNilesh Javali2015-01-091-2/+1
| | | | | Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
OpenPOWER on IntegriCloud