diff options
author | Christoph Hellwig <hch@lst.de> | 2024-04-09 16:37:31 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2024-04-11 21:37:48 -0400 |
commit | 6248d7f7714f018f2c02f356582784e74596f8e8 (patch) | |
tree | 3ed59a406d61d664e516b9709ce3f86aeb4d5b49 /drivers/scsi/scsi_lib.c | |
parent | 7eaae991c30d46a4ea45aa00f50eba939d7f951b (diff) |
scsi: core: Add a no_highmem flag to struct Scsi_Host
While we really should be killing the block layer bounce buffering ASAP, I
even more urgently need to stop the drivers to fiddle with the limits from
->slave_configure. Add a no_highmem flag to the Scsi_Host to centralize
this setting and switch the remaining four drivers that use block layer
bounce buffering to it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20240409143748.980206-7-hch@lst.de
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 1deca84914e8..f1936f98abe3 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1995,6 +1995,9 @@ void scsi_init_limits(struct Scsi_Host *shost, struct queue_limits *lim) */ lim->dma_alignment = max(4, dma_get_cache_alignment()) - 1; + if (shost->no_highmem) + lim->bounce = BLK_BOUNCE_HIGH; + dma_set_seg_boundary(dev, shost->dma_boundary); dma_set_max_seg_size(dev, shost->max_segment_size); } |