uvisor(4) and Palm Z22 under 8.X
Marc Fonvieille
blackend at freebsd.org
Sun Aug 2 20:17:39 UTC 2009
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
More information about the freebsd-usb
mailing list