> + if (max_sectors > 0) { > + struct device *dev = us->pusb_dev->bus->sysdev; > + size_t max_dma_sectors = dma_max_mapping_size(dev) >> > + SECTOR_SHIFT; > + > + max_sectors = min_t(size_t, max_sectors, max_dma_sectors); > + blk_queue_max_hw_sectors(sdev->request_queue, max_sectors); I think we need to do this unconditionally for the rare (or maybe even theoretical case) of a dma max mapping size smaller than the default max_sectos. So something like this: blk_queue_max_hw_sectors(sdev->request_queue, min_t(unsigned long, queue_max_hw_sectors(sdev->request_queue), dma_max_mapping_size(dev) >> SECTOR_SHIFT));