On Fri, 8 Apr 2011, Mian Yousaf Kaukab wrote: > Hi, > > On Thu, Apr 7, 2011 at 4:39 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > > On Thu, 7 Apr 2011, Mian Yousaf Kaukab wrote: > > > >> On Wed, Apr 6, 2011 at 5:08 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > >> Performance reasons mainly. If short_not_ok is set, we can program the > >> dma for the full buffer length. Otherwise we program it for each > >> packet. > > > > What happens if short_not_ok is set and you program the DMA for the > > full buffer length, but a short packet arrives? > With the current state of things it will most likely hang and wait for > reset. But I have already agreed with you that behavior should not > change even if short_not_ok/short_not_expected is set or not so I need > to fix this in my driver. Okay. One acceptable behavior that might be simple to program (if the hardware can do it) would be to DMA the entire buffer to system memory, even if the last part of the buffer contains only garbage. As long as req->actual is correct, it doesn't matter what the "extra" bytes in the buffer are set to. 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