Re: [PATCH v5 3/5] scsi: core: Cap shost max_sectors according to DMA limits only once

2022-07-01 Thread John Garry via iommu
On 01/07/2022 00:41, Damien Le Moal wrote: shost->dma_dev = dma_dev; + if (dma_dev->dma_mask) { + shost->max_sectors = min_t(unsigned int, shost->max_sectors, + dma_max_mapping_size(dma_dev) >> SECTOR_SHIFT); + } Nit: you could remove th

Re: [PATCH v5 3/5] scsi: core: Cap shost max_sectors according to DMA limits only once

2022-06-30 Thread Damien Le Moal via iommu
On 6/30/22 21:08, John Garry wrote: > The shost->max_sectors is repeatedly capped according to the host DMA > mapping limit for each sdev in __scsi_init_queue(). This is unnecessary, so > set only once when adding the host. > > Signed-off-by: John Garry > --- > drivers/scsi/hosts.c| 5 +

[PATCH v5 3/5] scsi: core: Cap shost max_sectors according to DMA limits only once

2022-06-30 Thread John Garry via iommu
The shost->max_sectors is repeatedly capped according to the host DMA mapping limit for each sdev in __scsi_init_queue(). This is unnecessary, so set only once when adding the host. Signed-off-by: John Garry --- drivers/scsi/hosts.c| 5 + drivers/scsi/scsi_lib.c | 4 2 files changed