summaryrefslogtreecommitdiffstats
path: root/drivers/usb/image/microtek.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-04-09 16:37:32 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2024-04-11 21:37:48 -0400
commit5b7dfbeff92a4a00b55b2be580f057d533b65cd5 (patch)
tree9e21994f89ae622706edf982c50d876ea7891216 /drivers/usb/image/microtek.c
parent6248d7f7714f018f2c02f356582784e74596f8e8 (diff)
downloadlinux-stable-5b7dfbeff92a4a00b55b2be580f057d533b65cd5.tar.gz
linux-stable-5b7dfbeff92a4a00b55b2be580f057d533b65cd5.tar.bz2
linux-stable-5b7dfbeff92a4a00b55b2be580f057d533b65cd5.zip
scsi: core: Add a dma_alignment field to the host and host template
Get drivers out of the business of having to call the block layer DMA alignment limits helpers themselves. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20240409143748.980206-8-hch@lst.de Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/usb/image/microtek.c')
-rw-r--r--drivers/usb/image/microtek.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/usb/image/microtek.c b/drivers/usb/image/microtek.c
index 8c8fa71c69c4..9f758241d9d3 100644
--- a/drivers/usb/image/microtek.c
+++ b/drivers/usb/image/microtek.c
@@ -328,12 +328,6 @@ static int mts_slave_alloc (struct scsi_device *s)
return 0;
}
-static int mts_slave_configure (struct scsi_device *s)
-{
- blk_queue_dma_alignment(s->request_queue, (512 - 1));
- return 0;
-}
-
static int mts_scsi_abort(struct scsi_cmnd *srb)
{
struct mts_desc* desc = (struct mts_desc*)(srb->device->host->hostdata[0]);
@@ -631,8 +625,8 @@ static const struct scsi_host_template mts_scsi_host_template = {
.can_queue = 1,
.this_id = -1,
.emulated = 1,
+ .dma_alignment = 511,
.slave_alloc = mts_slave_alloc,
- .slave_configure = mts_slave_configure,
.max_sectors= 256, /* 128 K */
};