On 6/28/22 00:25, John Garry wrote:
ATA devices (struct ata_device) have a max_sectors field which isNit: please change the patch title to "ata: libata-scsi: Cap ..."
configured internally in libata. This is then used to (re)configure the
associated sdev request queue max_sectors value from how it is earlier set
in __scsi_init_queue(). In __scsi_init_queue() the max_sectors value is set
according to shost limits, which includes host DMA mapping limits.
Cap the ata_device max_sectors according to shost->max_sectors to respect
this shost limit.
Signed-off-by: John Garry<john.garry@xxxxxxxxxx>
Acked-by: Damien Le Moal<damien.lemoal@xxxxxxxxxxxxxxxxxx>