- 12 4月, 2017 5 次提交
-
-
由 Johannes Thumshirn 提交于
Check for a valid direction before starting the request, otherwise we risk running into an assertion in the scsi midlayer checking for valid requests. [mkp: fixed typo] Signed-off-by: NJohannes Thumshirn <jthumshirn@suse.de> Link: http://www.spinics.net/lists/linux-scsi/msg104400.htmlReported-by: NDmitry Vyukov <dvyukov@google.com> Signed-off-by: NHannes Reinecke <hare@suse.com> Tested-by: NJohannes Thumshirn <jthumshirn@suse.de> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
The 'reserved' page array is used as a short-cut for mapping data, saving us to allocate pages per request. However, the 'reserved' array is only capable of holding one request, so this patch introduces a mutex for protect 'sg_fd' against concurrent accesses. Signed-off-by: NHannes Reinecke <hare@suse.com> Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de> Tested-by: NJohannes Thumshirn <jthumshirn@suse.de> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
Unused. Signed-off-by: NHannes Reinecke <hare@suse.com> Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de> Tested-by: NJohannes Thumshirn <jthumshirn@suse.de> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
The ioctl SET_FORCE_LOW_DMA has never worked since the initial git check-in, and the respective setting is nowadays handled correctly. So disable it entirely. Signed-off-by: NHannes Reinecke <hare@suse.com> Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de> Tested-by: NJohannes Thumshirn <jthumshirn@suse.de> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Colin Ian King 提交于
There are several local or function parameter pointers that are being assigned NULL after a kfree where and these have no effect and hence can be removed. Fixes various cppcheck warnings: "Assignment of function parameter has no effect outside the function. Did you forget dereferencing it" Signed-off-by: NColin Ian King <colin.king@canonical.com> Acked-by: NHimanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 07 4月, 2017 12 次提交
-
-
由 Nicholas Mc Guire 提交于
The redundant init_completion() here seems to be a cut&past error as struct scsi_qla_host only has 4 completion elements to initialize, thus the duplicate init_completion(disable_acb_comp) is simply removed. Signed-off-by: NNicholas Mc Guire <der.herr@hofr.at> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
There hasn't been any reports for HBAs where asynchronous abort would not work, so we should make it mandatory and remove the fallback. Signed-off-by: NHannes Reinecke <hare@suse.de> Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de> Reviewed-by: NBart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
scsi_eh_scmd_add() currently only will fail if no error handler thread is started (which will never be the case) or if the state machine encounters an illegal transition. But if we're encountering an invalid state transition chances is we cannot fixup things with the error handler. So better add a WARN_ON for illegal host states and make scsi_dh_scmd_add() a void function. Signed-off-by: NHannes Reinecke <hare@suse.de> Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de> Reviewed-by: NBart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
If a failed command is retried and fails again we need to enter SCSI EH, otherwise we will never be able to recover the command. To detect this situation we must not clear scmd->eh_eflags when EH finishes but rather make it persistent throughout the lifetime of the command. Signed-off-by: NHannes Reinecke <hare@suse.de> Reviewed-by: NBenjamin Block <bblock@linux.vnet.ibm.com> Reviewed-by: NBart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Christoph Hellwig 提交于
We now first try to call ->eh_abort_handler from a work queue, but libsas was always failing that for no good reason. Allow async aborts. Reviewed-by: NJohannes Thumshirn <jth@kernel.org> Reviewed-by: NHannes Reinecke <hare@suse.de> Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
When a command has timed out we always should be sending an abort; with the previous code a failed abort might signal SCSI EH to start, and all other timed out commands will never be aborted, even though they might belong to a different ITL nexus. Cc: Benjamin Block <bblock@linux.vnet.ibm.com> Signed-off-by: NHannes Reinecke <hare@suse.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
If sd_eh_action() decides to take the device offline there is no point in returning FAILED, as taking the device offline is the ultimate step in SCSI EH anyway. So further escalation via SCSI EH is not likely to make a difference and we can as well return SUCCESS. Cc: Benjamin Block <bblock@linux.vnet.ibm.com> Signed-off-by: NHannes Reinecke <hare@suse.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Hannes Reinecke 提交于
The current medium access timeout counter will be increased for each command, so if there are enough failed commands we'll hit the medium access timeout for even a single device failure and the following kernel message is displayed: sd H:C:T:L: [sdXY] Medium access timeout failure. Offlining disk! Fix this by making the timeout per EH run, ie the counter will only be increased once per device and EH run. Fixes: 18a4d0a2 ("[SCSI] Handle disk devices which can not process medium access commands") Cc: Ewan Milne <emilne@redhat.com> Cc: Lawrence Obermann <loberman@redhat.com> Cc: Benjamin Block <bblock@linux.vnet.ibm.com> Cc: Steffen Maier <maier@linux.vnet.ibm.com> Signed-off-by: NHannes Reinecke <hare@suse.com> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Christoph Hellwig 提交于
And get automatic MSI-X affinity for free. Signed-off-by: NChristoph Hellwig <hch@lst.de> Acked-by: NVarun Prakash <varun@chelsio.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
The commit 08024885 ("ses: Add power_status to SES device slot") introduced the 'power_status' attribute to enclosure components and the associated callbacks. There are 2 callbacks available to get the power status of a device: 1) ses_get_power_status() for 'struct enclosure_component_callbacks' 2) get_component_power_status() for the sysfs device attribute (these are available for kernel-space and user-space, respectively.) However, despite both methods being available to get power status on demand, that commit also introduced a call to get power status in ses_enclosure_data_process(). This dramatically increased the total probe time for SCSI devices on larger configurations, because ses_enclosure_data_process() is called several times during the SCSI devices probe and loops over the component devices (but that is another problem, another patch). That results in a tremendous continuous hammering of SCSI Receive Diagnostics commands to the enclosure-services device, which does delay the total probe time for the SCSI devices __significantly__: Originally, ~34 minutes on a system attached to ~170 disks: [ 9214.490703] mpt3sas version 13.100.00.00 loaded ... [11256.580231] scsi 17:0:177:0: qdepth(16), tagged(1), simple(0), ordered(0), scsi_level(6), cmd_que(1) With this patch, it decreased to ~2.5 minutes -- a 13.6x faster [ 1002.992533] mpt3sas version 13.100.00.00 loaded ... [ 1151.978831] scsi 11:0:177:0: qdepth(16), tagged(1), simple(0), ordered(0), scsi_level(6), cmd_que(1) Back to the commit discussion.. on the ses_get_power_status() call introduced in ses_enclosure_data_process(): impact of removing it. That may possibly be in place to initialize the power status value on device probe. However, those 2 functions available to retrieve that value _do_ automatically refresh/update it. So the potential benefit would be a direct access of the 'power_status' field which does not use the callbacks... But the only reader of 'struct enclosure_component::power_status' is the get_component_power_status() callback for sysfs attribute, and it _does_ check for and call the .get_power_status callback, (which indeed is defined and implemented by that commit), so the power status value is, again, automatically updated. So, the remaining potential for a direct/non-callback access to the power_status attribute would be out-of-tree modules -- well, for those, if they are for whatever reason interested in values that are set during device probe and not up-to-date by the time they need it.. well, that would be curious. Well, to handle that more properly, set the initial power state value to '-1' (i.e., uninitialized) instead of '1' (power 'on'), and check for it in that callback which may do an direct access to the field value _if_ a callback function is not defined. Signed-off-by: NMauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com> Fixes: 08024885 ("ses: Add power_status to SES device slot") Reviewed-by: NDan Williams <dan.j.williams@intel.com> Reviewed-by: NSong Liu <songliubraving@fb.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Bart Van Assche 提交于
Now that all scsi_device_get() callers check the return value of this function, make checking that return value mandatory. Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com> Cc: Hannes Reinecke <hare@suse.de> Cc: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Bart Van Assche 提交于
scsi_device_get() can fail. Hence check its return value. Signed-off-by: NBart Van Assche <bart.vanassche@sandisk.com> Cc: Boaz Harrosh <bharrosh@panasas.com> Acked-by: NBoaz Harrosh <ooo@electrozaur.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 05 4月, 2017 3 次提交
-
-
由 Johannes Thumshirn 提交于
sas_domain_release_transport is unused since at least v3.13, remove it. Signed-off-by: NJohannes Thumshirn <jthumshirn@suse.de> Reviewed-by: NHannes Reinecke <hare@suse.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Milan P Gandhi 提交于
Signed-off-by: NMilan P Gandhi <mgandhi@redhat.com> Signed-off-by: NHimanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Arnd Bergmann 提交于
gcc-7.0.1 now warns about a previously unnoticed access of uninitialized struct members: drivers/scsi/advansys.c: In function 'AscMsgOutSDTR': drivers/scsi/advansys.c:3860:26: error: '*((void *)&sdtr_buf+5)' may be used uninitialized in this function [-Werror=maybe-uninitialized] ((ushort)s_buffer[i + 1] << 8) | s_buffer[i]); ^ drivers/scsi/advansys.c:3860:26: error: '*((void *)&sdtr_buf+7)' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/scsi/advansys.c:3860:26: error: '*((void *)&sdtr_buf+5)' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/scsi/advansys.c:3860:26: error: '*((void *)&sdtr_buf+7)' may be used uninitialized in this function [-Werror=maybe-uninitialized] The code has existed in this exact form at least since v2.6.12, and the warning seems correct. This uses named initializers to ensure we initialize all members of the structure. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 30 3月, 2017 12 次提交
-
-
由 Christoph Hellwig 提交于
And get automatic MSI-X affinity for free. Signed-off-by: NChristoph Hellwig <hch@lst.de> Acked-by: NJitendra Bhivare <jitendra.bhivare@broadcom.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Szymon Mielczarek 提交于
This reverts commit 61e07359. The patch introduced redundant query retries as we already had such mechanism provided with _retry functions. Both ufshcd_read_desc and ufshcd_read_unit_desc_param functions call ufshcd_query_descriptor_retry wrapper. Signed-off-by: NSzymon Mielczarek <szymonx.mielczarek@intel.com> Reviewed-by: NSubhash Jadavani <subhashj@codeaurora.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Don Brace 提交于
Reviewed-by: NGerry Morong <gerry.morong@microsemi.com> Reviewed-by: NScott Teel <scott.teel@microsemi.com> Signed-off-by: NDon Brace <don.brace@microsemi.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Don Brace 提交于
Reviewed-by: NGerry Morong <gerry.morong@microsemi.com> Reviewed-by: NScott Teel <scott.teel@microsemi.com> Signed-off-by: NDon Brace <don.brace@microsemi.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Arnd Bergmann 提交于
Removing the 'select SCSI_SAS_LIBSAS' statement in Kconfig resulted in a link failure in configurations that have hisi_sas built-in but libsas as a loadable module: drivers/scsi/built-in.o: In function `hisi_sas_scan_finished': hisi_sas_main.c:(.text+0x37ce9): undefined reference to `sas_drain_work' drivers/scsi/built-in.o: In function `hisi_sas_slave_configure': hisi_sas_main.c:(.text+0x37d17): undefined reference to `sas_slave_configure' hisi_sas_main.c:(.text+0x37d40): undefined reference to `sas_change_queue_depth' drivers/scsi/built-in.o: In function `hisi_sas_remove': All other libsas users have the 'select' statement, so we should do the same here for consistency. For all I can tell, the patch that added the sata softreset does not actually introduce a dependency on SCSI_SAS_ATA but instead adds calls into libata itself, so we can express that with a more specific dependency. We cannot have 'select SCSI_SAS_LIBSAS; depends on SCSI_SAS_ATA' as that would cause a dependency loop. Fixes: 7c594f04 ("scsi: hisi_sas: add softreset function for SATA disk") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NJohn Garry <john.garry@huawei.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Tomohiro Kusumi 提交于
Not much reason to use ARRAY_SIZE() when we know it's for a C string. Signed-off-by: NTomohiro Kusumi <tkusumi@tuxera.com> Reviewed-by: NSubhash Jadavani <subhashj@codeaurora.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Tomohiro Kusumi 提交于
These flags are no longer needed after 2fbd009b in 2013. Signed-off-by: NTomohiro Kusumi <tkusumi@tuxera.com> Reviewed-by: NSubhash Jadavani <subhashj@codeaurora.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Tomohiro Kusumi 提交于
Add macros for register bits that can be found in JESD223C (v2.1). Not all registers are defined in ufshci.h (i.e. some are unused whether macros are defined or undefined), but all the bits for those registers that are already defined should appear here. Signed-off-by: NTomohiro Kusumi <tkusumi@tuxera.com> Reviewed-by: NSubhash Jadavani <subhashj@codeaurora.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Tomohiro Kusumi 提交于
Not having () isn't likely to do any harm in this case, but all the other macros below do have it. Also add "are" in a comment. Signed-off-by: NTomohiro Kusumi <tkusumi@tuxera.com> Reviewed-by: NSubhash Jadavani <subhashj@codeaurora.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Tomohiro Kusumi 提交于
Signed-off-by: NTomohiro Kusumi <tkusumi@tuxera.com> Reviewed-by: NSubhash Jadavani <subhashj@codeaurora.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Tomohiro Kusumi 提交于
ufshcd driver generally uses bool for is_xxx type things instead of int, so conform to its style. Signed-off-by: NTomohiro Kusumi <tkusumi@tuxera.com> Reviewed-by: NSubhash Jadavani <subhashj@codeaurora.org> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Colin Ian King 提交于
It appears that a break in the TRANS_TX_OPEN_CNX_ERR_NO_DESTINATION case got accidentally removed in an earlier commit, as it stands, the ts->stat and ts->open_rej_reason are being updated twice for this case which looks incorrect. Fix this by adding in the missing break statement. Detected by CoverityScan, CID#1422110 ("Missing break in switch") Fixes: 634a9585 ("scsi: hisi_sas: process error codes according to their priority") Signed-off-by: NColin Ian King <colin.king@canonical.com> Acked-by: NJohn Garry <john.garry@huawei.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
- 28 3月, 2017 8 次提交
-
-
由 Jack Wang 提交于
The email address is undeliverable for some time now, so just remove it. Signed-off-by: NJack Wang <jinpu.wang@profitbricks.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Jitendra Bhivare 提交于
Version 11.4.0.0 Signed-off-by: NJitendra Bhivare <jitendra.bhivare@broadcom.com> Reviewed-by: NTomas Henzl <thenzl@redhat.com> Reviewed-by: NChris Leech <cleech@redhat.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Jitendra Bhivare 提交于
Update Broadcom Copyright markings in all files. Signed-off-by: NJitendra Bhivare <jitendra.bhivare@broadcom.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Jitendra Bhivare 提交于
Data in buffers are gathered into a single buffer before giving to iSCSI layer. Though less likely to have payload more than 8K in ASYNC PDU, the data length is provide by FW and check is missing for overrun. Signed-off-by: NJitendra Bhivare <jitendra.bhivare@broadcom.com> Reviewed-by: NTomas Henzl <thenzl@redhat.com> Reviewed-by: NChris Leech <cleech@redhat.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Jitendra Bhivare 提交于
With previous patch adding ASYNC Rx buffers to free_list is not required. Remove all free_list related operations. Add in_use to track if buffer posted is being processed by driver and purge all buffers received for connection if found so. Signed-off-by: NJitendra Bhivare <jitendra.bhivare@broadcom.com> Reviewed-by: NTomas Henzl <thenzl@redhat.com> Reviewed-by: NChris Leech <cleech@redhat.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Jitendra Bhivare 提交于
FW runs out of buffer if buffers are not posted back soon. ASYNC Rx CQE indicates that FW has consumed 8 RQEs. Use it to post back buffers instead of waiting for buffers to be processed and freed by driver. Signed-off-by: NJitendra Bhivare <jitendra.bhivare@broadcom.com> Reviewed-by: NTomas Henzl <thenzl@redhat.com> Reviewed-by: NChris Leech <cleech@redhat.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Jitendra Bhivare 提交于
Currently, ASYNC PDU default queue size is set to max connections. This leaves only one buffer per connection for any ASYNC PDUs from targets. Double the size of the default queue. Signed-off-by: NJitendra Bhivare <jitendra.bhivare@broadcom.com> Reviewed-by: NTomas Henzl <thenzl@redhat.com> Reviewed-by: NChris Leech <cleech@redhat.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-
由 Jitendra Bhivare 提交于
scsi_flush_work flushes workqueue for the Scsi_Host. In iSCSI offload enabled host, this would wait for all other sessions under the host. Use flush_work for the session being removed instead. Signed-off-by: NJitendra Bhivare <jitendra.bhivare@broadcom.com> Reviewed-by: NTomas Henzl <thenzl@redhat.com> Reviewed-by: NChris Leech <cleech@redhat.com> Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
-