Re: [RFC PATCH] usb: dwc3: ep0: Fix mem corruption on OUT transfers of more than 512 bytes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 9 Jun 2015, Kishon Vijay Abraham I wrote:

> > But with a bounce buffer that's only 512 bytes long, you can never send
> > an entire packet's worth of data.  If the bounce buffer is 1024 bytes
> 
> for control endpoint, 512 bytes should be sufficient to send entire packet right?

Yes, you're right.  I had confused control endpoints with bulk 
endpoints, where the maxpacket size is 1024.  Sorry for the mistake.

> > then you can send the entire first packet.  When that's done, you can
> > send the second packet.  And so on.  It wouldn't be quite as fast, but
> > for ep0 that shouldn't matter.
> 
> right! this is a variant of what I tried to implement in chained TRB [1]. 
> $subject tries just to avoid memory corruption instead of actually trying to 
> receive all the data.

Okay.  If you take the $SUBJECT approach, I think it would be better
for an URB submission to fail than for the host controller to send only
part of the data.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux