]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: core: cap shost max_sectors according to DMA limits only once
authorJohn Garry <john.garry@huawei.com>
Thu, 14 Jul 2022 11:15:26 +0000 (19:15 +0800)
committerChristoph Hellwig <hch@lst.de>
Tue, 19 Jul 2022 04:05:47 +0000 (06:05 +0200)
commit7f8c520f9966412a46b735c1710d57ce356db99b
treea88892c614aae0e977799e418242fdbb56e67843
parentfa26a9a17179d382b6cc81086f7f3775ec4e658d
scsi: core: cap shost max_sectors according to DMA limits only once

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 <john.garry@huawei.com>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/hosts.c
drivers/scsi/scsi_lib.c