1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

Merge from NetBSD:

date: 2001/08/06 15:15:08;  author: augustss;  state: Exp;
  Don't write back status bits that are cleared when written.
This commit is contained in:
Josef Karthauser 2002-01-03 00:46:47 +00:00
parent b992262bcf
commit 4b2ee62a91
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=88840
2 changed files with 12 additions and 9 deletions

View File

@ -2782,27 +2782,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:
@ -2908,15 +2908,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, USB_PORT_ROOT_RESET_DELAY);
UWRITE2(sc, port, x & ~UHCI_PORTSC_PR);

View File

@ -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