From owner-freebsd-usb@FreeBSD.ORG Sun Aug 2 20:17:38 2009 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A953D106566B; Sun, 2 Aug 2009 20:17:38 +0000 (UTC) (envelope-from marc@blackend.org) Received: from abigail.blackend.org (ns0.blackend.org [82.227.222.164]) by mx1.freebsd.org (Postfix) with ESMTP id 148D78FC32; Sun, 2 Aug 2009 20:17:37 +0000 (UTC) (envelope-from marc@blackend.org) Received: from gothic.blackend.org (gothic.blackend.org [192.168.1.203]) by abigail.blackend.org (8.13.4/8.13.3) with ESMTP id n72KHYOw057190; Sun, 2 Aug 2009 22:17:34 +0200 (CEST) (envelope-from marc@abigail.blackend.org) Received: from gothic.blackend.org (localhost [127.0.0.1]) by gothic.blackend.org (8.14.3/8.14.3) with ESMTP id n72KIG8W001745; Sun, 2 Aug 2009 22:18:17 +0200 (CEST) (envelope-from marc@gothic.blackend.org) Received: (from marc@localhost) by gothic.blackend.org (8.14.3/8.14.3/Submit) id n72KIGf0001744; Sun, 2 Aug 2009 22:18:16 +0200 (CEST) (envelope-from marc) Date: Sun, 2 Aug 2009 22:18:16 +0200 From: Marc Fonvieille To: freebsd-usb@freebsd.org Message-ID: <20090802201816.GD1592@gothic.blackend.org> References: <20090728111131.GA1383@gothic.blackend.org> <20090802194956.GA1592@gothic.blackend.org> <20090802201523.GC1592@gothic.blackend.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090802201523.GC1592@gothic.blackend.org> X-Useless-Header: blackend.org X-Operating-System: FreeBSD 8.0-BETA2 User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Hans Petter Selasky Subject: Re: uvisor(4) and Palm Z22 under 8.X X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Aug 2009 20:17:39 -0000 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: 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); -- Marc