Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jun 2006 17:24:11 -0400
From:      Anish Mistry <mistry.7@osu.edu>
To:        freebsd-usb@freebsd.org
Subject:   ugen partial write() amount
Message-ID:  <200606161724.21722.mistry.7@osu.edu>

next in thread | raw e-mail | index | archive | help
--nextPart10765258.Z32likdNzF
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

	I'm trying to reliably recover from a write() timeout using ugen. =20
The problem that I'm having is that when using write() to write data=20
to an endpoint and the write times out there seems no way to figure=20
out the amount of that data that was actually written.  This is a=20
problem when trying to write data to a printer and the paper runs=20
out.  write() will timeout and you are left with no way to figure out=20
where to start sending data since you don't know how much was=20
received by the device before the paper ran out.
	It seems this could be possible by modifying the driver by adding and=20
ioctl that would allow you to call bulk transfer and then return the=20
number of bytes written.  Is there a better way of doing?

=2D-=20
Anish Mistry

--nextPart10765258.Z32likdNzF
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (FreeBSD)

iD8DBQBEkyGFxqA5ziudZT0RAu09AKCPm00Q6phrduQCzaevwq3VdTnKpwCgw0ua
F0Aqanb0XzbulWfbNhRKTsc=
=ESOd
-----END PGP SIGNATURE-----

--nextPart10765258.Z32likdNzF--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606161724.21722.mistry.7>