Subject: uvisor driver support for Palm z22
To: None <tech-kern@netbsd.org>
From: None <antiright@gmail.com>
List: tech-kern
Date: 04/24/2006 15:15:51
--8t9RHnE3ZwKMSgU+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
The uvisor driver fails to recognize the Palm z22,
failing with a TIMEOUT error.
The following patch allows the ucom0 device to be initiated.
This is only a hack, since it involves removal of error checking,
but it can be made to be conditional to whether or not this particular
device is attached.
After I made these changes, I was able to sync the device.
(Patch Attached)
Regards,
Jeff Bedard
--8t9RHnE3ZwKMSgU+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="uvisor.c.patch"
*** uvisor.c Mon Apr 24 15:11:23 2006
--- uvisor.c.modified Mon Apr 24 15:07:51 2006
***************
*** 435,442 ****
USETW(req.wLength, UVISOR_CONNECTION_INFO_SIZE);
err = usbd_do_request_flags(sc->sc_udev, &req, ci,
USBD_SHORT_XFER_OK, &actlen, USBD_DEFAULT_TIMEOUT);
! if (err)
! return (err);
}
if (sc->sc_flags & PALM4) {
--- 435,442 ----
USETW(req.wLength, UVISOR_CONNECTION_INFO_SIZE);
err = usbd_do_request_flags(sc->sc_udev, &req, ci,
USBD_SHORT_XFER_OK, &actlen, USBD_DEFAULT_TIMEOUT);
! /*if (err)
! return (err);*/
}
if (sc->sc_flags & PALM4) {
***************
*** 448,455 ****
USETW(req.wLength, UVISOR_GET_PALM_INFORMATION_LEN);
err = usbd_do_request_flags(sc->sc_udev, &req, cpi,
USBD_SHORT_XFER_OK, &actlen, USBD_DEFAULT_TIMEOUT);
! if (err)
! return (err);
}
DPRINTF(("uvisor_init: getting available bytes\n"));
--- 448,455 ----
USETW(req.wLength, UVISOR_GET_PALM_INFORMATION_LEN);
err = usbd_do_request_flags(sc->sc_udev, &req, cpi,
USBD_SHORT_XFER_OK, &actlen, USBD_DEFAULT_TIMEOUT);
! /*if (err)
! return (err);*/
}
DPRINTF(("uvisor_init: getting available bytes\n"));
***************
*** 459,470 ****
USETW(req.wIndex, 5);
USETW(req.wLength, sizeof avail);
err = usbd_do_request(sc->sc_udev, &req, &avail);
! if (err)
! return (err);
DPRINTF(("uvisor_init: avail=%d\n", UGETW(avail)));
DPRINTF(("uvisor_init: done\n"));
! return (err);
}
void
--- 459,471 ----
USETW(req.wIndex, 5);
USETW(req.wLength, sizeof avail);
err = usbd_do_request(sc->sc_udev, &req, &avail);
! /*if (err)
! return (err);*/
DPRINTF(("uvisor_init: avail=%d\n", UGETW(avail)));
DPRINTF(("uvisor_init: done\n"));
! /*return (err);*/
! return(0);
}
void
--8t9RHnE3ZwKMSgU+--