summaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2024-04-12 06:35:55 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2024-04-12 06:35:55 -0400
commitf92141e18c8b466027e226f3388de15b059b6f65 (patch)
tree714256f47972378a8ecd372731cb77eac0fcc537 /include/scsi
parent6d97e807c9067e154f4f5c5c2d17b54678df2898 (diff)
parentec84ca4025c0b90c6b7173a230f78ec00cad44f5 (diff)
downloadlinux-f92141e18c8b466027e226f3388de15b059b6f65.tar.gz
linux-f92141e18c8b466027e226f3388de15b059b6f65.tar.bz2
linux-f92141e18c8b466027e226f3388de15b059b6f65.zip
Merge patch series "convert SCSI to atomic queue limits, part 1 (v3)"
Christoph Hellwig <hch@lst.de> says: Hi all, this series converts the SCSI midlayer and LLDDs to use atomic queue limits API. It is pretty straight forward, except for the mpt3mr driver which does really weird and probably already broken things by setting limits from unlocked device iteration callbacks. I will probably defer the (more complicated) ULD changes to the next merge window as they would heavily conflict with Damien's zone write plugging series. With that the series could go in through the SCSI tree if Jens' ACKs the core block layer bits. Link: https://lore.kernel.org/r/20240409143748.980206-1-hch@lst.de Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/libsas.h5
-rw-r--r--include/scsi/scsi_host.h9
-rw-r--r--include/scsi/scsi_transport.h2
-rw-r--r--include/scsi/scsi_transport_fc.h1
4 files changed, 14 insertions, 3 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index d06a0570f4c5..1324068dd950 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -683,7 +683,8 @@ int sas_phy_reset(struct sas_phy *phy, int hard_reset);
int sas_phy_enable(struct sas_phy *phy, int enable);
extern int sas_queuecommand(struct Scsi_Host *, struct scsi_cmnd *);
extern int sas_target_alloc(struct scsi_target *);
-extern int sas_slave_configure(struct scsi_device *);
+int sas_device_configure(struct scsi_device *dev,
+ struct queue_limits *lim);
extern int sas_change_queue_depth(struct scsi_device *, int new_depth);
extern int sas_bios_param(struct scsi_device *, struct block_device *,
sector_t capacity, int *hsc);
@@ -749,7 +750,7 @@ void sas_notify_phy_event(struct asd_sas_phy *phy, enum phy_event event,
#endif
#define LIBSAS_SHT_BASE _LIBSAS_SHT_BASE \
- .slave_configure = sas_slave_configure, \
+ .device_configure = sas_device_configure, \
.slave_alloc = sas_slave_alloc, \
#define LIBSAS_SHT_BASE_NO_SLAVE_INIT _LIBSAS_SHT_BASE
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index b259d42a1e1a..92c8c3b08dfc 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -211,7 +211,11 @@ struct scsi_host_template {
* up after yourself before returning non-0
*
* Status: OPTIONAL
+ *
+ * Note: slave_configure is the legacy version, use device_configure for
+ * all new code. A driver must never define both.
*/
+ int (* device_configure)(struct scsi_device *, struct queue_limits *lim);
int (* slave_configure)(struct scsi_device *);
/*
@@ -405,6 +409,8 @@ struct scsi_host_template {
*/
unsigned int max_segment_size;
+ unsigned int dma_alignment;
+
/*
* DMA scatter gather segment boundary limit. A segment crossing this
* boundary will be split in two.
@@ -614,6 +620,7 @@ struct Scsi_Host {
unsigned int max_sectors;
unsigned int opt_sectors;
unsigned int max_segment_size;
+ unsigned int dma_alignment;
unsigned long dma_boundary;
unsigned long virt_boundary_mask;
/*
@@ -665,6 +672,8 @@ struct Scsi_Host {
/* The transport requires the LUN bits NOT to be stored in CDB[1] */
unsigned no_scsi2_lun_in_cdb:1;
+ unsigned no_highmem:1;
+
/*
* Optional work queue to be utilized by the transport
*/
diff --git a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h
index a0458bda3148..1394cf313bb3 100644
--- a/include/scsi/scsi_transport.h
+++ b/include/scsi/scsi_transport.h
@@ -83,6 +83,6 @@ scsi_transport_device_data(struct scsi_device *sdev)
+ shost->transportt->device_private_offset;
}
-void __scsi_init_queue(struct Scsi_Host *shost, struct request_queue *q);
+void scsi_init_limits(struct Scsi_Host *shost, struct queue_limits *lim);
#endif /* SCSI_TRANSPORT_H */
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h
index ebb1bd565103..4b884b8013e0 100644
--- a/include/scsi/scsi_transport_fc.h
+++ b/include/scsi/scsi_transport_fc.h
@@ -709,6 +709,7 @@ struct fc_function_template {
int (*vport_delete)(struct fc_vport *);
/* bsg support */
+ u32 max_bsg_segments;
int (*bsg_request)(struct bsg_job *);
int (*bsg_timeout)(struct bsg_job *);