diff options
author | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2006-05-29 03:49:23 +0000 |
---|---|---|
committer | Christopher Pascoe <pascoe@cvs.openbsd.org> | 2006-05-29 03:49:23 +0000 |
commit | 4f4ee71cf61bb93ae9dd746d22790ae452fc5362 (patch) | |
tree | 9369dc6b6cd60ee8040110e02955599a97bb1590 /sys/dev/usb | |
parent | 0d1708823e9b92c30eeadb465b6d2821c48e3fe1 (diff) |
Correct status value check for OHCI isoc transfer;
the spec says that "not accessed" is 111x, not 1111.
From NetBSD rev1.158
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/ohci.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index 6b348dfe12e..6af9669043f 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ohci.c,v 1.70 2006/05/29 03:35:31 pascoe Exp $ */ +/* $OpenBSD: ohci.c,v 1.71 2006/05/29 03:49:22 pascoe Exp $ */ /* $NetBSD: ohci.c,v 1.139 2003/02/22 05:24:16 tsutsui Exp $ */ /* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */ @@ -1422,10 +1422,12 @@ ohci_softintr(void *v) for (j = 0; j < iframes; i++, j++) { len = le16toh(sitd-> itd.itd_offset[j]); - len = - (OHCI_ITD_PSW_GET_CC(len) == - OHCI_CC_NOT_ACCESSED) ? 0 : - OHCI_ITD_PSW_LENGTH(len); + if ((OHCI_ITD_PSW_GET_CC(len) & + OHCI_CC_NOT_ACCESSED_MASK) + == OHCI_CC_NOT_ACCESSED) + len = 0; + else + len = OHCI_ITD_PSW_LENGTH(len); xfer->frlengths[i] = len; actlen += len; } |