Date: Mon, 3 Aug 2009 08:33:49 +0200 From: Hans Petter Selasky <hselasky@freebsd.org> To: freebsd-usb@freebsd.org Subject: Re: uvisor(4) and Palm Z22 under 8.X Message-ID: <200908030833.50464.hselasky@freebsd.org> In-Reply-To: <20090802201816.GD1592@gothic.blackend.org> References: <20090728111131.GA1383@gothic.blackend.org> <20090802201523.GC1592@gothic.blackend.org> <20090802201816.GD1592@gothic.blackend.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 02 August 2009 22:18:16 Marc Fonvieille wrote: > On Sun, Aug 02, 2009 at 10:15:23PM +0200, Marc Fonvieille wrote: > > Attach for real the patch > > Sorry, I dunno why attachement is not working today, here's the patch: > Hi, Can you verify that the driver works with 1024 byte buffers (RX+TX), and the other changes made. The comment in the old driver does not apply any more. Alternativly, try: TX buffer 1024 bytes: RX buffer 0 bytes (which makes it use wMaxPacketSize). --HPS > > Index: uvisor.c > =================================================================== > --- uvisor.c (revision 196038) > +++ uvisor.c (working copy) > @@ -95,7 +95,8 @@ > > #define UVISOR_CONFIG_INDEX 0 > #define UVISOR_IFACE_INDEX 0 > -#define UVISOR_BUFSIZE 1024 /* bytes */ > +#define UVISORIBUFSIZE 64 /* bytes */ > +#define UVISOROBUFSIZE 32 /* bytes */ > > /* From the Linux driver */ > /* > @@ -208,7 +209,7 @@ > .type = UE_BULK, > .endpoint = UE_ADDR_ANY, > .direction = UE_DIR_OUT, > - .bufsize = UVISOR_BUFSIZE, /* bytes */ > + .bufsize = UVISOROBUFSIZE, /* bytes */ > .flags = {.pipe_bof = 1,.force_short_xfer = 1,}, > .callback = &uvisor_write_callback, > }, > @@ -217,7 +218,7 @@ > .type = UE_BULK, > .endpoint = UE_ADDR_ANY, > .direction = UE_DIR_IN, > - .bufsize = UVISOR_BUFSIZE, /* bytes */ > + .bufsize = UVISORIBUFSIZE, /* bytes */ > .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, > .callback = &uvisor_read_callback, > }, > @@ -375,7 +376,7 @@ > struct uvisor_connection_info coninfo; > struct uvisor_palm_connection_info pconinfo; > uint16_t actlen; > - uWord wAvail; > +/* uWord wAvail;*/ > uint8_t buffer[256]; > > if (sc->sc_flag & UVISOR_FLAG_VISOR) { > @@ -497,7 +498,7 @@ > } > } > DPRINTF("getting available bytes\n"); > - req.bmRequestType = UT_READ_VENDOR_ENDPOINT; > +/* req.bmRequestType = UT_READ_VENDOR_ENDPOINT; > req.bRequest = UVISOR_REQUEST_BYTES_AVAILABLE; > USETW(req.wValue, 0); > USETW(req.wIndex, 5); > @@ -506,7 +507,7 @@ > if (err) { > goto done; > } > - DPRINTF("avail=%d\n", UGETW(wAvail)); > + DPRINTF("avail=%d\n", UGETW(wAvail));*/ > > DPRINTF("done\n"); > done: > @@ -586,7 +587,7 @@ > tr_setup: > pc = usbd_xfer_get_frame(xfer, 0); > if (ucom_get_data(&sc->sc_ucom, pc, 0, > - UVISOR_BUFSIZE, &actlen)) { > + UVISOROBUFSIZE, &actlen)) { > > usbd_xfer_set_frame_len(xfer, 0, actlen); > usbd_transfer_submit(xfer);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908030833.50464.hselasky>