On Thu, 13 Jun 2019, Christoph Hellwig wrote: > On Thu, Jun 13, 2019 at 01:06:40PM -0400, Alan Stern wrote: > > Hmmm. Would it be easier instead to copy the DMA mapping parameters > > from us->pusb_dev->bus->sysdev into the SCSI host's parent before > > calling scsi_add_host()? That way the correct values would be > > available from the beginning, so the existing DMA setup would > > automatically use the correct sizes. > > It would in theory. But at usb-storage has a special max_sectors quirk > for tape devices, and as the device type is a per-LU property we'd > still have to override it in ->slave_configure. Not just for tape devices. But that's okay; those max_sectors overrides have been present for a long time and we can keep them. Getting rid of the virt_boundary_mask stuff would still be a big improvement. Alan Stern