On Tue, Apr 05, 2011 at 10:39:45AM -0400, Alan Stern wrote: > On Tue, 5 Apr 2011, Felipe Balbi wrote: > > > On Tue, Apr 05, 2011 at 10:18:14AM -0400, Alan Stern wrote: > > > On Tue, 5 Apr 2011, Mian Yousaf Kaukab wrote: > > > > > > > Instead of removing short_not_ok can we use something like following? > > > > bh->outreq->short_not_ok = (amount % maxp) ? 0 : 1; > > > > short_not_ok is useful for example when it is not possible to do DMA > > > > tranfers from usb controller's buffer to the memory for unaligned > > > > lengths. > > > > controller driver can decide to use dma or pio mode based on if short > > > > packets are expected or not. > > > > > > You are trying to use the short_not_ok flag for something it wasn't > > > designed for. Its real purpose is to allow drivers to delimit > > > consecutive bulk transfers, in the case where the first transfer ends > > > early. > > > > > > Besides, what is your controller going to do if a full-sized packet is > > > expected but a short packet actually arrives? > > > > that's not a problem. The only requirement is request->length to be > > divisible by wMaxPacketSize, if a short does come, the transfer is ended > > early. No problems there. > > I wasn't asking you; I was asking Mian. (There's some issue involving > whether to use DMA vs. PIO.) Are the two of you working on the same > controller driver? Nope, I just got confused. My bad. -- balbi -- 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