Damien Le Moal
cd2268a180
scsi: pm8001: Fix command initialization in pm8001_chip_ssp_tm_req()
...
The ds_ads_m field of struct ssp_ini_tm_start_req has the type __le32.
Assigning a value to it should thus use cpu_to_le32(). This fixes the
sparse warning:
warning: incorrect type in assignment (different base types)
expected restricted __le32 [addressable] [assigned] [usertype] ds_ads_m
got int
Link: https://lore.kernel.org/r/20220220031810.738362-7-damien.lemoal@opensource.wdc.com
Fixes: dbf9bfe615 ("[SCSI] pm8001: add SAS/SATA HBA driver")
Reviewed-by: Jack Wang <jinpu.wang@ionos.com >
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:31:17 -05:00
Damien Le Moal
3762d8f6ed
scsi: pm8001: Fix pm80xx_pci_mem_copy() interface
...
The declaration of the local variable destination1 in pm80xx_pci_mem_copy()
as a pointer to a u32 results in the sparse warning:
warning: incorrect type in assignment (different base types)
expected unsigned int [usertype]
got restricted __le32 [usertype]
Furthermore, the destination" argument of pm80xx_pci_mem_copy() is wrongly
declared with the const attribute.
Fix both problems by changing the type of the "destination" argument to
"__le32 *" and use this argument directly inside the pm80xx_pci_mem_copy()
function, thus removing the need for the destination1 local variable.
Link: https://lore.kernel.org/r/20220220031810.738362-6-damien.lemoal@opensource.wdc.com
Reviewed-by: Jack Wang <jinpu.wang@ionos.com >
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:31:17 -05:00
Damien Le Moal
1a37b6738b
scsi: pm8001: Fix command initialization in pm80XX_send_read_log()
...
Since the sata_cmd struct is zeroed out before its fields are initialized,
there is no need for using "|=" to initialize the ncqtag_atap_dir_m
field. Using a standard assignment removes the sparse warning:
warning: invalid assignment: |=
Also, since the ncqtag_atap_dir_m field has type __le32, use cpu_to_le32()
to generate the assigned value.
Link: https://lore.kernel.org/r/20220220031810.738362-5-damien.lemoal@opensource.wdc.com
Fixes: c6b9ef5779 ("[SCSI] pm80xx: NCQ error handling changes")
Reviewed-by: John Garry <john.garry@huawei.com >
Reviewed-by: Jack Wang <jinpu.wang@ionos.com >
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:31:17 -05:00
Damien Le Moal
c58e935e80
scsi: pm8001: Fix pm8001_update_flash() local variable type
...
Change the type of partitionSizeTmp from u32 to __be32 to suppress the
sparse warning:
warning: cast to restricted __be32
Link: https://lore.kernel.org/r/20220220031810.738362-4-damien.lemoal@opensource.wdc.com
Reviewed-by: Jack Wang <jinpu.wang@ionos.com >
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:31:16 -05:00
Damien Le Moal
d2ed913b9a
scsi: pm8001: Fix __iomem pointer use in pm8001_phy_control()
...
Avoid the sparse warning "warning: cast removes address space '__iomem' of
expression" by declaring the qp pointer as "u32 __iomem *". Accordingly,
change the accesses to the qp array to use readl().
Link: https://lore.kernel.org/r/20220220031810.738362-3-damien.lemoal@opensource.wdc.com
Reviewed-by: Jack Wang <jinpu.wang@ionos.com >
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:31:16 -05:00
Damien Le Moal
8454563e4c
scsi: libsas: Fix sas_ata_qc_issue() handling of NCQ NON DATA commands
...
To detect for the DMA_NONE (no data transfer) DMA direction,
sas_ata_qc_issue() tests if the command protocol is ATA_PROT_NODATA. This
test does not include the ATA_CMD_NCQ_NON_DATA command as this command
protocol is defined as ATA_PROT_NCQ_NODATA (equal to ATA_PROT_FLAG_NCQ) and
not as ATA_PROT_NODATA.
To include both NCQ and non-NCQ commands when testing for the DMA_NONE DMA
direction, use "!ata_is_data()".
Link: https://lore.kernel.org/r/20220220031810.738362-2-damien.lemoal@opensource.wdc.com
Fixes: 176ddd8917 ("scsi: libsas: Reset num_scatter if libata marks qc as NODATA")
Cc: stable@vger.kernel.org
Reviewed-by: John Garry <john.garry@huawei.com >
Reviewed-by: Jack Wang <jinpu.wang@ionos.com >
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:31:16 -05:00
Yang Li
07dd40b307
scsi: hisi_sas: Remove unnecessary print function dev_err()
...
The print function dev_err() is redundant because platform_get_irq()
already prints an error.
Eliminate the follow coccicheck warnings:
./drivers/scsi/hisi_sas/hisi_sas_v1_hw.c:1661:3-10: line 1661 is
redundant because platform_get_irq() already prints an error
./drivers/scsi/hisi_sas/hisi_sas_v1_hw.c:1642:4-11: line 1642 is
redundant because platform_get_irq() already prints an error
./drivers/scsi/hisi_sas/hisi_sas_v1_hw.c:1679:3-10: line 1679 is
redundant because platform_get_irq() already prints an error
Link: https://lore.kernel.org/r/20220215020524.44268-1-yang.lee@linux.alibaba.com
Reported-by: Abaci Robot <abaci@linux.alibaba.com >
Acked-by: John Garry <john.garry@huawei.com >
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:08 -05:00
Christoph Hellwig
e383e16e84
scsi: sd: Remove WRITE_SAME support
...
There are no more end-users of REQ_OP_WRITE_SAME left, so we can start
deleting it.
Link: https://lore.kernel.org/r/20220209082828.2629273-5-hch@lst.de
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com >
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:08 -05:00
Christoph Hellwig
898cd34607
scsi: cxlflash: Query write_zeroes limit for zeroing
...
The write_same and write_zeroes limits for SCSI are effectively the same,
so the current code works just fine. But we plan to remove
REQ_OP_WRITE_SAME support, so switch to querying the write zeroes limit for
a zeroing WRITE SAME operation.
Link: https://lore.kernel.org/r/20220209082828.2629273-2-hch@lst.de
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com >
Signed-off-by: Christoph Hellwig <hch@lst.de >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:08 -05:00
Sreekanth Reddy
334ae6459a
scsi: mpi3mr: Fix flushing !WQ_MEM_RECLAIM events warning
...
Fix the following warning by not allocating driver's event handling worker
queue with WQ_MEM_RECLAIM flag enabled:
workqueue: WQ_MEM_RECLAIM
mpi3mr_fwevt_worker [mpi3mr] is flushing !WQ_MEM_RECLAIM events
Link: https://lore.kernel.org/r/20220218180515.27455-1-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:08 -05:00
Gleb Chesnokov
1f652aa0e4
scsi: qla2xxx: Use named initializers for q_dev_state
...
Make q_dev_state a little more readable and maintainable by using named
initializers.
Also convert QLA8XXX_DEV_* macros into an enum and remove
qla83xx_dev_state_to_string(), which is a duplicate of qdev_state().
Link: https://lore.kernel.org/r/AS8PR10MB495298515A7553C8D6D6E74D9D349@AS8PR10MB4952.EURPRD10.PROD.OUTLOOK.COM
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Gleb Chesnokov <Chesnokov.G@raidix.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:07 -05:00
Gleb Chesnokov
6e0e85d39e
scsi: qla2xxx: Use named initializers for port_[d]state_str
...
Make port_state_str and port_dstate_str a little more readable and
maintainable by using named initializers.
Also convert FCS_* macros into an enum.
Link: https://lore.kernel.org/r/AS8PR10MB495215841EB25C16DBC0CB409D349@AS8PR10MB4952.EURPRD10.PROD.OUTLOOK.COM
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Gleb Chesnokov <Chesnokov.G@raidix.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:07 -05:00
Keoseong Park
482dcaa1c9
scsi: ufs: core: Remove wlun_dev_to_hba()
...
Commit edc0596cc0 ("scsi: ufs: core: Stop clearing UNIT ATTENTIONS")
removed all callers of wlun_dev_to_hba(). Hence also remove the macro
itself.
Link: https://lore.kernel.org/r/1891546521.01644927481711.JavaMail.epsvc@epcpadp4
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com >
Reviewed-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Keoseong Park <keosung.park@samsung.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:07 -05:00
Bart Van Assche
31160bd3e5
scsi: zalon: Stop using the SCSI pointer
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-49-bvanassche@acm.org
Cc: Helge Deller <deller@gmx.de >
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:07 -05:00
Bart Van Assche
dbb2da557a
scsi: wd33c93: Move the SCSI pointer to private command data
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-48-bvanassche@acm.org
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:07 -05:00
Bart Van Assche
70d1b920af
scsi: wd719x: Stop using the SCSI pointer
...
Move the DMA handle into the per-command private data instead of using the
SCSI pointer from struct scsi_cmnd. This patch prepares for removal of the
SCSI pointer from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-47-bvanassche@acm.org
Cc: Ondrej Zary <linux@zary.sk >
Cc: Christoph Hellwig <hch@lst.de >
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:07 -05:00
Bart Van Assche
4022bfd63d
scsi: sym53c8xx_2: Move the SCSI pointer to private command data
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-45-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:07 -05:00
Bart Van Assche
c1ea387d99
scsi: smartpqi: Stop using the SCSI pointer
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-44-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:06 -05:00
Bart Van Assche
5597616333
scsi: qla2xxx: Stop using the SCSI pointer
...
Instead of using the SCp.ptr field to track whether or not a command is
in flight, use the sp->type field to track this information. sp->type
must be set for proper operation of the qla2xxx driver. See e.g. the
switch (sp->type) statement in qla2x00_ct_entry().
This patch prepares for removal of the SCSI pointer from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-43-bvanassche@acm.org
Cc: Nilesh Javali <njavali@marvell.com >
Cc: Ewan D. Milne <emilne@redhat.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Daniel Wagner <dwagner@suse.de >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:06 -05:00
Bart Van Assche
504540d00f
scsi: qla1280: Move the SCSI pointer to private command data
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-42-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:06 -05:00
Bart Van Assche
4a938517fb
scsi: ppa: Move the SCSI pointer to private command data
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-41-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:06 -05:00
Bart Van Assche
3d75be6de7
scsi: sym53c500_cs: Move the SCSI pointer to private command data
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd.
This patch prepares for removal of the SCSI pointer from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-40-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:06 -05:00
Bart Van Assche
ea39700fa9
scsi: nsp_cs: Move the SCSI pointer to private command data
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
in struct scsi_cmnd.
This patch prepares for removal of the SCSI pointer from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-39-bvanassche@acm.org
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:06 -05:00
Bart Van Assche
195771c5da
scsi: nsp32: Stop using the SCSI pointer
...
Move the SCSI status field to private data. Stop setting the .ptr,
.this_residual, .buffer and .buffer_residual SCSI pointer members
since no code in this driver reads these members.
This patch prepares for removal of the SCSI pointer from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-38-bvanassche@acm.org
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Reviewed-by: Masanori Goto <gotom@debian.or.jp >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:06 -05:00
Bart Van Assche
af0d3c13e4
scsi: mvumi: Stop using the SCSI pointer
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-37-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:06 -05:00
Bart Van Assche
8d1537342f
scsi: mvsas: Fix a set-but-not-used warning
...
This patch fixes the following compiler warning:
drivers/scsi/mvsas/mv_init.c: In function ‘mvs_pci_init’:
drivers/scsi/mvsas/mv_init.c:497:30: warning: variable ‘mpi’ set but not used [-Wunused-but-set-variable]
497 | struct mvs_prv_info *mpi;
| ^~~
Link: https://lore.kernel.org/r/20220218195117.25689-36-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: John Garry <john.garry@huawei.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:06 -05:00
Bart Van Assche
57cbd78e61
scsi: mesh: Move the SCSI pointer to private command data
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-35-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:06 -05:00
Bart Van Assche
96e77a2743
scsi: megasas: Stop using the SCSI pointer
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-34-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:05 -05:00
Bart Van Assche
fb597392b1
scsi: megaraid: Stop using the SCSI pointer
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-33-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:05 -05:00
Bart Van Assche
cb2b62082c
scsi: mac53c94: Move the SCSI pointer to private command data
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-32-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:05 -05:00
Bart Van Assche
8c0156b10e
scsi: mac53c94: Fix a set-but-not-used compiler warning
...
Fix the following compiler warning:
drivers/scsi/mac53c94.c: In function 'mac53c94_init':
drivers/scsi/mac53c94.c:128:13: warning: variable 'x' set but not used [-Wunused-but-set-variable]
128 | int x;
Link: https://lore.kernel.org/r/20220218195117.25689-31-bvanassche@acm.org
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org >
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:05 -05:00
Bart Van Assche
a33e7925b5
scsi: qedf: Stop using the SCSI pointer
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. Remove the CMD_SCSI_STATUS() assignment because the
assigned value is not used.
This patch prepares for removal of the SCSI pointer from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-30-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 >
2022-02-22 21:11:05 -05:00
Bart Van Assche
f4b4216f3e
scsi: bnx2fc: Stop using the SCSI pointer
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. Remove the CMD_SCSI_STATUS() assignment because the
assigned value is not used.
This patch prepares for removal of the SCSI pointer from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-29-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 >
2022-02-22 21:11:05 -05:00
Bart Van Assche
5d21aa3636
scsi: libfc: Stop using the SCSI pointer
...
Move the fc_fcp_pkt pointer, the residual length and the SCSI status into
the new data structure libfc_cmd_priv. This patch prepares for removal of
the SCSI pointer from struct scsi_cmnd.
The user of the libfc data path functions have been identified as follows:
$ git grep -lw fc_queuecommand | grep -v scsi/libfc/
drivers/scsi/fcoe/fcoe.c
Link: https://lore.kernel.org/r/20220218195117.25689-28-bvanassche@acm.org
Cc: Saurav Kashyap <skashyap@marvell.com >
Cc: Javed Hasan <jhasan@marvell.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.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 >
2022-02-22 21:11:05 -05:00
Bart Van Assche
09cc102bb4
scsi: initio: Stop using the SCSI pointer
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-27-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:05 -05:00
Bart Van Assche
db22de3eb0
scsi: iscsi: Stop using the SCSI pointer
...
Instead of storing the iSCSI task pointer and the session age in the SCSI
pointer, use command-private variables. This patch prepares for removal of
the SCSI pointer from struct scsi_cmnd.
The list of iSCSI drivers has been obtained as follows:
$ git grep -lw iscsi_host_alloc
drivers/infiniband/ulp/iser/iscsi_iser.c
drivers/scsi/be2iscsi/be_main.c
drivers/scsi/bnx2i/bnx2i_iscsi.c
drivers/scsi/cxgbi/libcxgbi.c
drivers/scsi/iscsi_tcp.c
drivers/scsi/libiscsi.c
drivers/scsi/qedi/qedi_main.c
drivers/scsi/qla4xxx/ql4_os.c
include/scsi/libiscsi.h
Note: it is not clear to me how the qla4xxx driver can work without this
patch since it uses the scsi_cmnd::SCp.ptr member for two different
purposes:
- The qla4xxx driver uses this member to store a struct srb pointer.
- libiscsi uses this member to store a struct iscsi_task pointer.
Reviewed-by: Lee Duncan <lduncan@suse.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Cc: Chris Leech <cleech@redhat.com >
Cc: Sagi Grimberg <sagi@grimberg.me >
Cc: Nilesh Javali <njavali@marvell.com >
Cc: Manish Rangankar <mrangankar@marvell.com >
Cc: Karen Xie <kxie@chelsio.com >
Cc: Ketan Mukadam <ketan.mukadam@broadcom.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
iscsi
Link: https://lore.kernel.org/r/20220218195117.25689-26-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:04 -05:00
Bart Van Assche
6b66f09c46
scsi: imm: Move the SCSI pointer to private command data
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer.
This patch prepares for removal of the SCSI pointer from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-25-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:04 -05:00
Bart Van Assche
5c113eb3bc
scsi: hptiop: Stop using the SCSI pointer
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Rename hpt_scsi_pointer into hpt_cmd_priv because that data structure is
not related to struct scsi_pointer.
Link: https://lore.kernel.org/r/20220218195117.25689-24-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.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 >
2022-02-22 21:11:04 -05:00
Bart Van Assche
924cb24df4
scsi: fnic: Stop using the SCSI pointer
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-23-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.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 >
2022-02-22 21:11:04 -05:00
Bart Van Assche
3032ed77a2
scsi: fnic: Fix a tracing statement
...
Report both the command flags and command state instead of only the
command state.
Link: https://lore.kernel.org/r/20220218195117.25689-22-bvanassche@acm.org
Fixes: 4d7007b49d ("[SCSI] fnic: Fnic Trace Utility")
Cc: Hiral Patel <hiralpat@cisco.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:04 -05:00
Bart Van Assche
211134c47c
scsi: fdomain: Move the SCSI pointer to private command data
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-21-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.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 >
2022-02-22 21:11:04 -05:00
Bart Van Assche
dfae39874f
scsi: esp_scsi: Stop using the SCSI pointer
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-20-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:04 -05:00
Bart Van Assche
9804db13d3
scsi: dc395x: Stop using the SCSI pointer
...
Remove the code that sets SCSI pointer members since there is no code in
this driver that reads these members.
Link: https://lore.kernel.org/r/20220218195117.25689-19-bvanassche@acm.org
Cc: Oliver Neukum <oneukum@suse.com >
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:04 -05:00
Bart Van Assche
30564db73b
scsi: csio: Stop using the SCSI pointer
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-18-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:04 -05:00
Bart Van Assche
34f5b537a9
scsi: bfa: Stop using the SCSI pointer
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-17-bvanassche@acm.org
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.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 >
2022-02-22 21:11:04 -05:00
Bart Van Assche
3ac6aba372
scsi: aha152x: Move the SCSI pointer to private command data
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-16-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:03 -05:00
Bart Van Assche
ea1c947559
scsi: aha1542: Remove a set-but-not-used array
...
This patch fixes the following W=1 warning:
drivers/scsi/aha1542.c:209:12: warning: variable ‘inquiry_result’ set but not used [-Wunused-but-set-variable]
209 | u8 inquiry_result[4];
Link: https://lore.kernel.org/r/20220218195117.25689-15-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:03 -05:00
Bart Van Assche
17d4c2e22a
scsi: advansys: Move the SCSI pointer to private command data
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-14-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.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 >
2022-02-22 21:11:03 -05:00
Bart Van Assche
76a3451b64
scsi: aacraid: Move the SCSI pointer to private command data
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-13-bvanassche@acm.org
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:03 -05:00
Bart Van Assche
d80624a2ae
scsi: 53c700: Stop clearing SCSI pointer fields
...
None of the 53c700 drivers uses the SCSI pointer. Hence remove the code
from 53c700.c that clears two SCSI pointer fields. The 53c700 drivers are:
$ git grep -l 'include.*53c700'
drivers/scsi/53c700.c
drivers/scsi/a4000t.c
drivers/scsi/bvme6000_scsi.c
drivers/scsi/lasi700.c
drivers/scsi/mvme16x_scsi.c
drivers/scsi/sim710.c
drivers/scsi/sni_53c710.c
drivers/scsi/zorro7xx.c
Link: https://lore.kernel.org/r/20220218195117.25689-12-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.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 >
2022-02-22 21:11:03 -05:00