Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Don't wait for door bell interrupt when controll...



details:   https://anonhg.NetBSD.org/src/rev/66c735f5d930
branches:  trunk
changeset: 517856:66c735f5d930
user:      augustss <augustss%NetBSD.org@localhost>
date:      Tue Nov 20 14:28:44 2001 +0000

description:
Don't wait for door bell interrupt when controller has been disconnected.

diffstat:

 sys/dev/usb/ehci.c |  26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)

diffs (84 lines):

diff -r 9853f6fd1512 -r 66c735f5d930 sys/dev/usb/ehci.c
--- a/sys/dev/usb/ehci.c        Tue Nov 20 13:50:07 2001 +0000
+++ b/sys/dev/usb/ehci.c        Tue Nov 20 14:28:44 2001 +0000
@@ -5,7 +5,7 @@
 Indicator light bit.
 Check 7.1.7.3
 */
-/*     $NetBSD: ehci.c,v 1.11 2001/11/20 13:49:07 augustss Exp $       */
+/*     $NetBSD: ehci.c,v 1.12 2001/11/20 14:28:44 augustss Exp $       */
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -54,7 +54,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.11 2001/11/20 13:49:07 augustss Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci.c,v 1.12 2001/11/20 14:28:44 augustss Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -814,7 +814,7 @@
        u_int32_t s;
 
        printf("  next="); ehci_dump_link(qtd->qtd_next);
-       printf("altnext="); ehci_dump_link(qtd->qtd_altnext);
+       printf(" altnext="); ehci_dump_link(qtd->qtd_altnext);
        printf("\n");
        s = qtd->qtd_status;
        printf("  status=0x%08x: toggle=%d bytes=0x%x ioc=%d c_page=0x%x\n",
@@ -834,7 +834,8 @@
        printf("QH(%p) at 0x%08x:\n", sqh, sqh->physaddr);
        printf("  link="); ehci_dump_link(qh->qh_link); printf("\n");
        printf("  endp=0x%08x endphub=0x%08x\n", qh->qh_endp, qh->qh_endphub);
-       printf("  curqtd="); ehci_dump_link(qh->qh_curqtd); printf("\n  ");
+       printf("  curqtd="); ehci_dump_link(qh->qh_curqtd); printf("\n");
+       printf("Overlay qTD:\n");
        ehci_dump_qtd(&qh->qh_qtd);
 }
 
@@ -992,13 +993,19 @@
 {
        int s;
 
+       if (sc->sc_dying) {
+               DPRINTFN(2,("ehci_sync_hc: dying\n"));
+               return;
+       }
+       DPRINTFN(2,("ehci_sync_hc: enter\n"));
        lockmgr(&sc->sc_doorbell_lock, LK_EXCLUSIVE, NULL); /* get doorbell */
        s = splhardusb();
        /* ask for doorbell */
        EOWRITE4(sc, EHCI_USBCMD, EOREAD4(sc, EHCI_USBCMD) | EHCI_CMD_IAAD);
-       tsleep(&sc->sc_async_head, PZERO, "ehcidi", 0); /* wait for doorbell */
+       tsleep(&sc->sc_async_head, PZERO, "ehcidi", hz); /* wait for doorbell */
        splx(s);
        lockmgr(&sc->sc_doorbell_lock, LK_RELEASE, NULL); /* release doorbell */
+       DPRINTFN(2,("ehci_sync_hc: exit\n"));
 }
 
 /***********/
@@ -1770,6 +1777,8 @@
 {
        usbd_status err;
 
+       return USBD_IOERROR;
+
        /* Insert last in queue. */
        err = usb_insert_transfer(xfer);
        if (err)
@@ -1779,7 +1788,12 @@
        return (ehci_device_ctrl_start(SIMPLEQ_FIRST(&xfer->pipe->queue)));
 }
 
-Static usbd_status     ehci_device_ctrl_start(usbd_xfer_handle xfer) { return USBD_IOERROR; }
+Static usbd_status
+ehci_device_ctrl_start(usbd_xfer_handle xfer)
+{
+       /* Not implemented */
+       return USBD_IOERROR;
+}
 
 void
 ehci_device_ctrl_done(usbd_xfer_handle xfer)



Home | Main Index | Thread Index | Old Index