* usb printer driver and zero length transfer
@ 2003-03-24 19:51 Kallol Biswas
2003-03-25 0:28 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Kallol Biswas @ 2003-03-24 19:51 UTC (permalink / raw)
To: Linux Kernel Mailing List
Hi,
I am new to USB world and looking for clarification on usb
printer's
behavior when transferring data with size multiple of wMaxPacketSize.
I have been running redhat 7.1 (linux kernel 2.4.2-2) on x86 PC with a
USB 1.1 controller. There is a target mode printer driver running on the
other side.
On the host the device file is /dev/usb/lp0.
If a data packet of 64 bytes is sent with
"cat data8 > /dev/usb/lp0" , the size of data8 is 64, a zero length
packet
at the end of the transfer is not sent.
Is this a correct behavior? How do we force the printer driver send
a zero length packet at the end of a transfer if the packet size is
a multiple of wMAxPacketSize?
Kallol
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: usb printer driver and zero length transfer
2003-03-24 19:51 usb printer driver and zero length transfer Kallol Biswas
@ 2003-03-25 0:28 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2003-03-25 0:28 UTC (permalink / raw)
To: Kallol Biswas; +Cc: Linux Kernel Mailing List
On Mon, Mar 24, 2003 at 11:51:50AM -0800, Kallol Biswas wrote:
> Hi,
> I am new to USB world and looking for clarification on usb
> printer's
> behavior when transferring data with size multiple of wMaxPacketSize.
>
> I have been running redhat 7.1 (linux kernel 2.4.2-2) on x86 PC with a
> USB 1.1 controller. There is a target mode printer driver running on the
>
> other side.
>
> On the host the device file is /dev/usb/lp0.
> If a data packet of 64 bytes is sent with
>
> "cat data8 > /dev/usb/lp0" , the size of data8 is 64, a zero length
> packet
> at the end of the transfer is not sent.
>
> Is this a correct behavior? How do we force the printer driver send
> a zero length packet at the end of a transfer if the packet size is
> a multiple of wMAxPacketSize?
If your device requires that a zero length packet be send for this
situation, then modify the transfer flags of the urb with
URB_ZERO_PACKET to cause this to happen.
Hope this helps,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-03-25 0:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-24 19:51 usb printer driver and zero length transfer Kallol Biswas
2003-03-25 0:28 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.