kernel/usb4bsd: Update uhci and ohci drivers
authorMarkus Pfeiffer <markus.pfeiffer@morphism.de>
Sun, 22 Feb 2015 00:07:18 +0000 (00:07 +0000)
committerMarkus Pfeiffer <markus.pfeiffer@morphism.de>
Sun, 22 Feb 2015 00:09:48 +0000 (00:09 +0000)
sys/bus/u4b/controller/ohci.c
sys/bus/u4b/controller/ohci.h
sys/bus/u4b/controller/uhci.c
sys/bus/u4b/controller/uhci.h

index 86bce79..17a3f31 100644 (file)
@@ -1,3 +1,4 @@
+/* $FreeBSD: head/sys/dev/usb/controller/ohci.c 267992 2014-06-28 03:56:17Z hselasky $ */
 /*-
  * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
  * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved.
index be289f3..3458e2b 100644 (file)
@@ -1,3 +1,4 @@
+/* $FreeBSD: head/sys/dev/usb/controller/ohci.h 228483 2011-12-14 00:28:54Z hselasky $ */
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
  * All rights reserved.
index 895ec01..3ddb006 100644 (file)
@@ -1,3 +1,4 @@
+/* $FreeBSD: head/sys/dev/usb/controller/uhci.c 278883 2015-02-17 07:52:50Z hselasky $ */
 /*-
  * Copyright (c) 2008 Hans Petter Selasky. All rights reserved.
  * Copyright (c) 1998 The NetBSD Foundation, Inc. All rights reserved.
@@ -1171,8 +1172,13 @@ uhci_non_isoc_done_sub(struct usb_xfer *xfer)
                    (status & UHCI_TD_SPD) ? "[SPD]" : "");
        }
 #endif
-       return (status & UHCI_TD_STALLED) ?
-           USB_ERR_STALLED : USB_ERR_NORMAL_COMPLETION;
+       if (status & UHCI_TD_STALLED) {
+               /* try to separate I/O errors from STALL */
+               if (UHCI_TD_GET_ERRCNT(status) == 0)
+                       return (USB_ERR_IOERROR);
+               return (USB_ERR_STALLED);
+       }
+       return (USB_ERR_NORMAL_COMPLETION);
 }
 
 static void
@@ -1465,7 +1471,8 @@ uhci_interrupt(uhci_softc_t *sc)
            UHCI_STS_USBEI |
            UHCI_STS_RD |
            UHCI_STS_HSE |
-           UHCI_STS_HCPE);
+           UHCI_STS_HCPE |
+           UHCI_STS_HCH);
 
        if (status == 0) {
                /* nothing to acknowledge */
index 9e09bec..e73b671 100644 (file)
@@ -1,3 +1,4 @@
+/* $FreeBSD: head/sys/dev/usb/controller/uhci.h 228483 2011-12-14 00:28:54Z hselasky $ */
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
  * All rights reserved.