Bart Van Assche
ce425dd7db
scsi: mvumi: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-32-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:40 -04:00
Bart Van Assche
24b3c922bc
scsi: mpt3sas: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-31-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:40 -04:00
Bart Van Assche
69868c3b69
scsi: mpi3mr: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-30-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:40 -04:00
Bart Van Assche
4bccecf1c9
scsi: megaraid: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-29-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:39 -04:00
Bart Van Assche
4221c8a4bd
scsi: lpfc: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-28-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:39 -04:00
Bart Van Assche
cad1a780e0
scsi: libsas: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-27-bvanassche@acm.org
Reviewed-by: John Garry <john.garry@huawei.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:39 -04:00
Bart Van Assche
240ec11977
scsi: ips: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-26-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:39 -04:00
Bart Van Assche
0cd7510201
scsi: ibmvscsi: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-25-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:39 -04:00
Bart Van Assche
e9ddad785e
scsi: ibmvfc: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-24-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:39 -04:00
Bart Van Assche
84090d42c4
scsi: hpsa: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-23-bvanassche@acm.org
Acked-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:39 -04:00
Bart Van Assche
1effbface9
scsi: hisi_sas: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-22-bvanassche@acm.org
Acked-by: John Garry <john.garry@huawei.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:39 -04:00
Bart Van Assche
e1c9f0cfac
scsi: fnic: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-21-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:39 -04:00
Bart Van Assche
3ada9c791b
scsi: dpt_i2o: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-20-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:38 -04:00
Bart Van Assche
d3e16aecea
scsi: cxlflash: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-19-bvanassche@acm.org
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:38 -04:00
Bart Van Assche
c14f1fee18
scsi: csiostor: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-18-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:38 -04:00
Bart Van Assche
4bfb9809b8
scsi: bnx2i: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-17-bvanassche@acm.org
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:38 -04:00
Bart Van Assche
11bf4ec580
scsi: aha1542: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-16-bvanassche@acm.org
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:38 -04:00
Bart Van Assche
40e16ce7b6
scsi: advansys: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-15-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:38 -04:00
Bart Van Assche
8779b4bdbc
scsi: aacraid: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-14-bvanassche@acm.org
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:38 -04:00
Bart Van Assche
2e4b231ac1
scsi: NCR5380: Use sc_data_direction instead of rq_data_dir()
...
This patch prepares for the removal of the request pointer from struct
scsi_cmnd and does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-13-bvanassche@acm.org
Cc: Michael Schmitz <schmitzmic@gmail.com >
Suggested-by: Finn Thain <fthain@linux-m68k.org >
Acked-by: Finn Thain <fthain@linux-m68k.org >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:38 -04:00
Bart Van Assche
cd4b46cdb4
scsi: 53c700: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-12-bvanassche@acm.org
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:38 -04:00
Bart Van Assche
d78f31ce7e
scsi: zfcp: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-11-bvanassche@acm.org
Acked-by: Benjamin Block <bblock@linux.ibm.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:37 -04:00
Bart Van Assche
9c5274eec7
scsi: RDMA/srp: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-10-bvanassche@acm.org
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:37 -04:00
Bart Van Assche
99247108c0
scsi: RDMA/iser: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-9-bvanassche@acm.org
Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com >
Reviewed-by: Sagi Grimberg <sagi@grimberg.me >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:37 -04:00
Bart Van Assche
c8329cd55b
scsi: ata: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-8-bvanassche@acm.org
Cc: Jens Axboe <axboe@kernel.dk >
Cc: Christoph Hellwig <hch@lst.de >
Cc: Hannes Reinecke <hare@suse.de >
Cc: Ming Lei <ming.lei@redhat.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:37 -04:00
Bart Van Assche
eb43d41de2
scsi: scsi_transport_spi: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-7-bvanassche@acm.org
Cc: Christoph Hellwig <hch@lst.de >
Cc: Hannes Reinecke <hare@suse.de >
Cc: Ming Lei <ming.lei@redhat.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:37 -04:00
Bart Van Assche
3b4720fc8d
scsi: scsi_transport_fc: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-6-bvanassche@acm.org
Cc: Christoph Hellwig <hch@lst.de >
Cc: Hannes Reinecke <hare@suse.de >
Cc: Ming Lei <ming.lei@redhat.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:37 -04:00
Bart Van Assche
c4deb5b5dd
scsi: sr: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-5-bvanassche@acm.org
Cc: Christoph Hellwig <hch@lst.de >
Cc: Hannes Reinecke <hare@suse.de >
Cc: Ming Lei <ming.lei@redhat.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:37 -04:00
Bart Van Assche
5999ccff0f
scsi: sd: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-4-bvanassche@acm.org
Cc: Christoph Hellwig <hch@lst.de >
Cc: Hannes Reinecke <hare@suse.de >
Cc: Ming Lei <ming.lei@redhat.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:37 -04:00
Bart Van Assche
aa8e25e500
scsi: core: Use scsi_cmd_to_rq() instead of scsi_cmnd.request
...
Prepare for removal of the request pointer by using scsi_cmd_to_rq()
instead. Cast away constness where necessary when passing a SCSI command
pointer to scsi_cmd_to_rq(). This patch does not change any functionality.
Link: https://lore.kernel.org/r/20210809230355.8186-3-bvanassche@acm.org
Cc: Christoph Hellwig <hch@lst.de >
Cc: Hannes Reinecke <hare@suse.de >
Cc: Ming Lei <ming.lei@redhat.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:37 -04:00
Bart Van Assche
51f3a47889
scsi: core: Introduce the scsi_cmd_to_rq() function
...
The 'request' member of struct scsi_cmnd is superfluous. The struct request
and struct scsi_cmnd data structures are adjacent and hence the request
pointer can be derived easily from a scsi_cmnd pointer. Introduce a helper
function that performs that conversion in a type-safe way. This patch is
the first step towards removing the request member from struct
scsi_cmnd. Making that change has the following advantages:
- This is a performance optimization since adding an offset to a pointer
takes less time than dereferencing a pointer.
- struct scsi_cmnd becomes smaller.
Link: https://lore.kernel.org/r/20210809230355.8186-2-bvanassche@acm.org
Cc: Christoph Hellwig <hch@lst.de >
Cc: Hannes Reinecke <hare@suse.de >
Cc: Ming Lei <ming.lei@redhat.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:36 -04:00
Avri Altman
10163cee1f
scsi: ufs: ufshpb: Do not report victim error in HCM
...
In host control mode, eviction is perceived as an extreme measure. There
are several conditions that both the entering and exiting regions should
meet, so that eviction will take place.
The common case however, is that those conditions are rarely met, so it is
normal that the act of eviction fails. Therefore, do not report an error
in host control mode if eviction fails.
Link: https://lore.kernel.org/r/20210808090024.21721-5-avri.altman@wdc.com
Fixes: 6c59cb501b (scsi: ufs: ufshpb: Make eviction depend on region's reads)
Signed-off-by: Avri Altman <avri.altman@wdc.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:36 -04:00
Avri Altman
22aede9f48
scsi: ufs: ufshpb: Verify that 'num_inflight_map_req' is non-negative
...
'num_inflight_map_req' should not be negative. It is incremented and
decremented without any protection, allowing it theoretically to be
negative, should some weird unbalanced count occur.
Verify that the those calls are properly serialized.
Link: https://lore.kernel.org/r/20210808090024.21721-4-avri.altman@wdc.com
Fixes: 33845a2d84 (scsi: ufs: ufshpb: Limit the number of in-flight map requests)
Signed-off-by: Avri Altman <avri.altman@wdc.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:36 -04:00
Avri Altman
07106f86ae
scsi: ufs: ufshpb: Use a correct max multi chunk
...
In HPB2.0, if pre_req_min_tr_len < transfer_len < pre_req_max_tr_len, the
driver is expected to send a HPB-WRITE-BUFFER companion to HPB-READ.
The upper bound should fit into a single byte, regardless of bMAX_
DATA_SIZE_FOR_HPB_SINGLE_CMD which being an attribute (u32) can be
significantly larger.
To further illustrate the issue, consider the following scenario:
- SCSI_DEFAULT_MAX_SECTORS is 1024 limiting the I/O chunks to 512KB
- The OEM changes scsi_host_template .max_sectors to be 2048 which allows
for 1MB requests: transfer_len = 256
- pre_req_max_tr_len = HPB_MULTI_CHUNK_HIGH = 256
- ufshpb_is_supported_chunk() returns true (256 <= 256)
- WARN_ON_ONCE(256 > 256) doesn't warn
- ufshpb_set_hpb_read_to_upiu() casts transfer_len to u8: transfer_len = 0
- The command is failing with ILLEGAL REQUEST
Link: https://lore.kernel.org/r/20210808090024.21721-3-avri.altman@wdc.com
Fixes: 41d8a9333c (scsi: ufs: ufshpb: Add HPB 2.0 support)
Signed-off-by: Avri Altman <avri.altman@wdc.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:36 -04:00
Avri Altman
283e61c5a9
scsi: ufs: ufshpb: Rewind the read timeout on every read
...
The purpose of the "cold"-timer is not to hang-on to active regions with no
reads. Therefore the read timeout should be rewound on every read, and not
just when the region is activated.
Link: https://lore.kernel.org/r/20210808090024.21721-2-avri.altman@wdc.com
Fixes: 13c044e916 (scsi: ufs: ufshpb: Add "cold" regions timer)
Signed-off-by: Avri Altman <avri.altman@wdc.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-11 22:25:36 -04:00
Colin Ian King
83da6ad6f9
scsi: pm8001: Remove redundant initialization of variable 'rv'
...
The variable 'rv' is being initialized with a value that is never read, it
is being updated later on. The assignment is redundant and can be removed.
Link: https://lore.kernel.org/r/20210804143319.115340-1-colin.king@canonical.com
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
Addresses-Coverity: ("Unused value")
2021-08-09 23:47:28 -04:00
Colin Ian King
102851fc9a
scsi: ufs: ufshpb: Remove redundant initialization of variable 'lba'
...
The variable 'lba' is being initialized with a value that is never read, it
is being updated later on. The assignment is redundant and can be removed.
Link: https://lore.kernel.org/r/20210804133241.113509-1-colin.king@canonical.com
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
Addresses-Coverity: ("Unused value")
2021-08-09 23:43:05 -04:00
Colin Ian King
e71dd41ea0
scsi: elx: efct: Remove redundant initialization of variable 'ret'
...
The variable 'ret' is being initialized with a value that is never read, it
is being updated later on. The assignment is redundant and can be removed.
Link: https://lore.kernel.org/r/20210804132451.113086-1-colin.king@canonical.com
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
Addresses-Coverity: ("Unused value")
2021-08-09 23:41:19 -04:00
Wei Li
632c4ae6da
scsi: fdomain: Fix error return code in fdomain_probe()
...
If request_region() fails the return value is not set. Return -EBUSY on
error.
Link: https://lore.kernel.org/r/20210715032625.1395495-1-liwei391@huawei.com
Fixes: 8674a8aa2c ("scsi: fdomain: Add PCMCIA support")
Reported-by: Hulk Robot <hulkci@huawei.com >
Signed-off-by: Wei Li <liwei391@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-09 23:30:25 -04:00
Colin Ian King
e9b1adb7c5
scsi: snic: Remove redundant assignment to variable ret
...
The variable ret is being initialized with a value that is never read, the
assignment is redundant and can be removed.
Link: https://lore.kernel.org/r/20210806112313.12434-1-colin.king@canonical.com
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
Addresses-Coverity: ("Unused value")
2021-08-09 23:24:32 -04:00
Adrian Hunter
bf25967ac5
scsi: ufshcd: Fix device links when BOOT WLUN fails to probe
...
Managed device links are deleted by device_del(). However it is possible to
add a device link to a consumer before device_add(), and then discovering
an error prevents the device from being used. In that case normally
references to the device would be dropped and the device would be deleted.
However the device link holds a reference to the device, so the device link
and device remain indefinitely (unless the supplier is deleted).
For UFSHCD, if a LUN fails to probe (e.g. absent BOOT WLUN), the device
will not have been registered but can still have a device link holding a
reference to the device. The unwanted device link will prevent runtime
suspend indefinitely.
Amend device link removal to accept removal of a link with an unregistered
consumer device (suggested by Rafael), and fix UFSHCD by explicitly
deleting the device link when SCSI destroys the SCSI device.
Link: https://lore.kernel.org/r/a1c9bac8-b560-b662-f0aa-58c7e000cbbd@intel.com
Fixes: b294ff3e34 ("scsi: ufs: core: Enable power management for wlun")
Reviewed-by: Rafael J. Wysocki <rafael@kernel.org >
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-09 23:19:26 -04:00
Colin Ian King
a5402cdcc2
scsi: ufs: Fix unsigned int compared with less than zero
...
Variable 'tag' is currently an unsigned int and is being compared to less
than zero, this check is always false. Fix this by making 'tag' an int.
Link: https://lore.kernel.org/r/20210806144301.19864-1-colin.king@canonical.com
Fixes: 4728ab4a8e ("scsi: ufs: Remove ufshcd_valid_tag()")
Reviewed-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Colin Ian King <colin.king@canonical.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
Addresses-Coverity: ("Macro compares unsigned to 0")
2021-08-09 23:14:52 -04:00
Damien Le Moal
4758fd91d5
scsi: mpt3sas: Introduce sas_ncq_prio_supported sysfs sttribute
...
Similarly to AHCI, introduce the device sysfs attribute
sas_ncq_prio_supported to advertise if a SATA device supports the NCQ
priority feature. Without this new attribute, the user can only discover if
a SATA device supports NCQ priority by trying to enable the feature use
with the sas_ncq_prio_enable sysfs device attribute, which fails when the
device does not support high prioity commands.
Link: https://lore.kernel.org/r/20210807041859.579409-11-damien.lemoal@wdc.com
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-09 23:10:58 -04:00
Suganath Prabu S
cdc1767698
scsi: mpt3sas: Update driver version to 39.100.00.00
...
Update driver version to 39.100.00.00.
Link: https://lore.kernel.org/r/20210809072639.21228-3-suganath-prabu.subramani@broadcom.com
Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-09 23:07:04 -04:00
Suganath Prabu S
787f2448c2
scsi: mpt3sas: Use firmware recommended queue depth
...
Currently, the mpt3sas driver sets the default queue depth based on the
physical interface of the attached device:
- SAS : 254
- SATA: 32
- NVMe: 128
The IOC firmware provides a recommended queue depth for each device through
SAS IO Unit Page1 for SAS/SATA and PCIe IO Unit Page 1 for NVMe devices.
If the host sets the queue depth greater than the firmware recommended
value, then the IOC places the I/Os above the recommended queue depth in an
internal pending queue. This consumes outstanding host-credit/resources,
thereby leading to potential starvation of other devices.
To avoid this, use the device depth recommended by the IOC firmware.
Link: https://lore.kernel.org/r/20210809072639.21228-2-suganath-prabu.subramani@broadcom.com
Signed-off-by: Suganath Prabu S <suganath-prabu.subramani@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-09 23:07:04 -04:00
Sreekanth Reddy
44f88ef3c9
scsi: mpt3sas: Bump driver version to 38.100.00.00
...
Bump driver version to 38.100.00.00.
Link: https://lore.kernel.org/r/20210803065134.19090-1-sreekanth.reddy@broadcom.com
Reviewed-by: Lee Duncan <lduncan@suse.com >
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-09 22:58:08 -04:00
Sreekanth Reddy
432bc7caef
scsi: mpt3sas: Add io_uring iopoll support
...
Enable the driver to work in non-IRQ mode, i.e. there will not be any MSI-X
vectors associated with queues dedicated to polling. The IOC hardware is
single submission queue and multiple reply queue. However, using the shared
host tagset support it is possible to simulate multiple hardware queues.
When poll_queues are enabled through the module parameter, the driver will
allocate extra reply queues without an MSI-X association. All I/O
completion on these queues will be done through the iopoll interface.
Link: https://lore.kernel.org/r/20210727081212.2742-1-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-09 22:55:50 -04:00
Bean Huo
f5efd4fe78
scsi: ufs: core: Add lu_enable sysfs node
...
We need to check whether HPB is enabled on a given LU from the userspace
tool. Add lu_enable sysfs node.
Link: https://lore.kernel.org/r/20210804182128.458356-3-huobean@gmail.com
Tested-by: Avri Altman <avri.altman@wdc.com >
Reviewed-by: Avri Altman <avri.altman@wdc.com >
Signed-off-by: Bean Huo <beanhuo@micron.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-05 23:21:13 -04:00
Bean Huo
63522bf3ac
scsi: ufs: core: Add L2P entry swap quirk for Micron UFS
...
For Micron UFS devices the L2P entry need to be byteswapped before sending
an HPB READ command to the UFS device. Add the quirk
UFS_DEVICE_QUIRK_SWAP_L2P_ENTRY_FOR_HPB_READ to address this.
Link: https://lore.kernel.org/r/20210804182128.458356-2-huobean@gmail.com
Reviewed-by: Avri Altman <avri.altman@wdc.com >
Signed-off-by: Bean Huo <beanhuo@micron.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-05 23:21:08 -04:00
Bean Huo
f0101af435
scsi: ufs: core: Remove redundant call in ufshcd_add_command_trace()
...
ufshcd_add_cmd_upiu_trace() will be called later anyway. Simplify code by
moving if-statement.
Link: https://lore.kernel.org/r/20210802180803.100033-1-huobean@gmail.com
Reviewed-by: Avri Altman <avri.altman@wdc.com >
Signed-off-by: Bean Huo <beanhuo@micron.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2021-08-05 23:21:08 -04:00