Re: How to resolve an issue in swiotlb environment?

Oliver Neukum
2019-06-12T11:48:59Z

Am Mittwoch, den 12.06.2019, 09:30 +0200 schrieb Christoph Hellwig:
>
> So based on the above I'm a little confused about the actual requirement
> again. Can you still split the SCSI command into multiple URBs? And

Yes. The device sees only a number of packets over the wire. They can
come from an arbitrary number of URBs with the two restrictions that
- we cannot split a packet among URBs
- every packet but the last must be a multiple of maxpacket

> is the boundary for that split still the scatterlist entry as in the
> description above? If so I don't really see how the virt_boundary
> helps you at all. as it only guarnatees that in a bio, each subsequent
> segment start as the advertised virt_boundary. It says nothing about
> the size of each segment.

That is problematic.

> Thay is someething the virt_boundary prevents. But could still give
> you something like:
>
> 1536 4096 4096 1024
>
> or
> 1536 16384 8192 4096 16384 512

That would kill the driver, if maxpacket were 1024.

USB has really two kinds of requirements

1. What comes from the protocol
2. What comes from the HCD

The protocol wants just multiples of maxpacket. XHCI can satisfy
that in arbitrary scatter/gather. Other HCs cannot.

Regards
Oliver