OSDN Git Service

scsi: core: take the DMA max mapping size into account
authorChristoph Hellwig <hch@lst.de>
Mon, 17 Jun 2019 12:19:54 +0000 (14:19 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 17 Jul 2019 03:01:49 +0000 (23:01 -0400)
commitbdd17bdef7d8da4d8eee254abb4c92d8a566bdc1
tree0a93328605a47da7ad488683e54c5d7b2db83ced
parent7ad388d8e4c703980b7018b938cdeec58832d78d
scsi: core: take the DMA max mapping size into account

We need to limit the device's max_sectors to what the DMA mapping
implementation can support.  If not, we risk running out of swiotlb
buffers easily.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_lib.c