Don't write back status bits that are cleared when written.
This commit is contained in:
parent
c1856b0940
commit
be12c4395c
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: uhci.c,v 1.136 2001/07/11 14:11:00 augustss Exp $ */
|
||||
/* $NetBSD: uhci.c,v 1.137 2001/08/06 15:15:08 augustss Exp $ */
|
||||
/* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -3053,27 +3053,27 @@ uhci_root_ctrl_start(usbd_xfer_handle xfer)
|
|||
}
|
||||
switch(value) {
|
||||
case UHF_PORT_ENABLE:
|
||||
x = UREAD2(sc, port);
|
||||
x = URWMASK(UREAD2(sc, port));
|
||||
UWRITE2(sc, port, x & ~UHCI_PORTSC_PE);
|
||||
break;
|
||||
case UHF_PORT_SUSPEND:
|
||||
x = UREAD2(sc, port);
|
||||
x = URWMASK(UREAD2(sc, port));
|
||||
UWRITE2(sc, port, x & ~UHCI_PORTSC_SUSP);
|
||||
break;
|
||||
case UHF_PORT_RESET:
|
||||
x = UREAD2(sc, port);
|
||||
x = URWMASK(UREAD2(sc, port));
|
||||
UWRITE2(sc, port, x & ~UHCI_PORTSC_PR);
|
||||
break;
|
||||
case UHF_C_PORT_CONNECTION:
|
||||
x = UREAD2(sc, port);
|
||||
x = URWMASK(UREAD2(sc, port));
|
||||
UWRITE2(sc, port, x | UHCI_PORTSC_CSC);
|
||||
break;
|
||||
case UHF_C_PORT_ENABLE:
|
||||
x = UREAD2(sc, port);
|
||||
x = URWMASK(UREAD2(sc, port));
|
||||
UWRITE2(sc, port, x | UHCI_PORTSC_POEDC);
|
||||
break;
|
||||
case UHF_C_PORT_OVER_CURRENT:
|
||||
x = UREAD2(sc, port);
|
||||
x = URWMASK(UREAD2(sc, port));
|
||||
UWRITE2(sc, port, x | UHCI_PORTSC_OCIC);
|
||||
break;
|
||||
case UHF_C_PORT_RESET:
|
||||
|
@ -3179,15 +3179,15 @@ uhci_root_ctrl_start(usbd_xfer_handle xfer)
|
|||
}
|
||||
switch(value) {
|
||||
case UHF_PORT_ENABLE:
|
||||
x = UREAD2(sc, port);
|
||||
x = URWMASK(UREAD2(sc, port));
|
||||
UWRITE2(sc, port, x | UHCI_PORTSC_PE);
|
||||
break;
|
||||
case UHF_PORT_SUSPEND:
|
||||
x = UREAD2(sc, port);
|
||||
x = URWMASK(UREAD2(sc, port));
|
||||
UWRITE2(sc, port, x | UHCI_PORTSC_SUSP);
|
||||
break;
|
||||
case UHF_PORT_RESET:
|
||||
x = UREAD2(sc, port);
|
||||
x = URWMASK(UREAD2(sc, port));
|
||||
UWRITE2(sc, port, x | UHCI_PORTSC_PR);
|
||||
usb_delay_ms(&sc->sc_bus, 50); /*XXX USB v1.1 7.1.7.3 */
|
||||
UWRITE2(sc, port, x & ~UHCI_PORTSC_PR);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: uhcireg.h,v 1.13 2000/08/13 18:20:15 augustss Exp $ */
|
||||
/* $NetBSD: uhcireg.h,v 1.14 2001/08/06 15:15:08 augustss Exp $ */
|
||||
/* $FreeBSD: src/sys/dev/usb/uhcireg.h,v 1.12 1999/11/17 22:33:42 n_hibma Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -106,6 +106,9 @@
|
|||
#define UHCI_PORTSC_OCIC 0x0800
|
||||
#define UHCI_PORTSC_SUSP 0x1000
|
||||
|
||||
#define URWMASK(x) \
|
||||
((x) & (UHCI_PORTSC_SUSP | UHCI_PORTSC_PR | UHCI_PORTSC_RD | UHCI_PORTSC_PE))
|
||||
|
||||
#define UHCI_FRAMELIST_COUNT 1024
|
||||
#define UHCI_FRAMELIST_ALIGN 4096
|
||||
|
||||
|
|
Loading…
Reference in New Issue