| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
backed out commits were trying to address: when cancelling the timeout
callout, also cancel the abort_task event, since it is possible that
the timeout has already fired and set up an abort_task.
|
|
|
|
|
|
|
| |
reports of problems. The bug is probably that there are cases where
`xfer->timeout && !sc->sc_bus.use_polling' is not a suitable test
for an active timeout callout, so an explicit flag will be necessary.
Apologies for the breakage.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
transfer timeouts that typically cause a transfer to be completed
twice, resulting in panics and page faults:
o A transfer completion interrupt could arrive while an abort_task
event was set up, so the transfer would be aborted after it had
completed. This is very easy to reproduce. Fix this by setting
the transfer status to USBD_TIMEOUT before scheduling the
abort_task so that the transfer completion code will ignore it.
o The transfer completion code could execute concurrently with the
timeout callout, leaving the callout blocked (e.g. waiting for
Giant) while the transfer completion code runs. In this case,
callout_stop() does not prevent the callout from running, so
again the timeout code would run after the transfer was complete.
Handle this case by checking the return value from callout_stop(),
and ignoring the transfer if the callout could not be removed.
o Finally, protect against a timeout callout occurring while a
transfer is being aborted by another process. Here we arrange
for the timeout processing to ignore the transfer, and use
callout_drain() to ensure that the callout has really gone before
completing the transfer.
This was tested by repeatedly performing USB transfers with a timeout
set to approximately the same as the normal transfer completion
time. In the PR below, apparently this occurred by accident with a
particular printer and the default timeout.
PR: kern/71491
|
|
|
|
|
|
|
|
| |
polled mode.
PR: kern/73000
Submitted by: Daan Vreeken <Danovitsch at Vitsch dot net>
MFC after: 1 month
|
| |
|
|
|
|
| |
previous revision.
|
|
|
|
|
| |
a significant amount of memory may be leaked each time a host
controller is detached.
|
|
|
|
|
|
|
|
| |
ehci.c rev. 1.69, author: mycroft
uhci.c rev. 1.179, author: mycroft
hcpriv is not actually used here. Remove references to it.
Obtained from: NetBSD
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MFNetBSD 1.177; author: toshii
Use the correct wValue to get hub desriptors.
Also, make wValue checks of root hub codes less strict.
MFNetBSD 1.178: author: martin
Interrupt descriptors might become invalid while being processed in
uhci_check_intr - so remember their next pointer before calling it.
Patch provided by Matthew Orgass in PR kern/24542.
Obtained from: NetBSD
|
| |
|
|
|
|
|
|
|
| |
revision 1.176
date: 2003/11/04 19:11:21; author: mycroft;
Ignore a CRCTO error on a SETUP transaction in combination with
STALLED or NAK. This fixes problems with the GL641.
|
|
|
|
|
| |
date: 2003/09/12 16:18:08; author: mycroft;
Tweak a debugging printf().
|
| |
|
|
|
|
|
|
| |
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
|
|
|
|
| |
Also some minor style cleanups.
|
|
|
|
| |
Reviewed by: joe among others
|
|
|
|
|
|
| |
date: 2003/05/13 04:41:59; author: gson;
Function names printed in debug messages did not always match the
actual name of the function.
|
|
|
|
|
| |
date: 2003/02/23 04:19:26; author: simonb;
Remove unreachable break after return.
|
|
|
|
|
| |
date: 2003/02/19 01:35:04; author: augustss;
Bail out early in isoc_done if the ii is not on the interrupt list.
|
|
|
|
|
| |
date: 2003/02/16 23:15:28; author: augustss;
Don't take xfers off the interrupt list if they are not on it yet.
|
| |
|
|
|
|
|
| |
date: 2003/02/08 03:32:51; author: ichiro;
change URL pointers of USB[1,2] specification
|
|
|
|
|
|
|
|
|
|
| |
date: 2002/12/31 02:21:31; author: dsainty;
Be somewhat more persuasive about enabling the port on a port reset.
USB protocol dictates that the port enable must be implied by the port
reset. To implement this on (at least) the VIA VT83C572 this means we
need to wait around tweaking the chip state until the port actually
transitions to enabled (or the device goes away). Likely fixes
kern/11018.
|
|
|
|
|
| |
date: 2002/12/31 02:04:49; author: dsainty;
CONSTCOND away some lint warnings
|
|
|
|
|
|
| |
This brings us more in line with Net/OpenBSD
Obtained from: Net/OpenBSD
|
|
|
|
|
|
| |
This code reduces the number of trailing white space to be more in line
w/ NetBSD. I don't regenerate usbdevs, saving that for when it really
changes.
|
|
|
|
|
|
|
|
|
| |
it is expected that they will not be enabled at the time that it
is called. This is reported to work around a problem in RELENG_4
where the kernel panics on boot if FAST_IPSEC and crypto support
are enabled.
Tested by: Scott Johnson <scottj@insane.com>
|
|
|
|
| |
The Lego Infrared Tower use it.
|
|
|
|
| |
Approved by: trb
|
|
|
|
| |
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
|
|
|
|
| |
especially in troff files.
|
|
|
|
|
|
|
|
|
|
| |
command in case this setting was not saved. Since bandwidth reclamation
(-current only) often results in bus activity continuing to the end
of every frame, most transfers would fail with IOERROR if this
setting is missed.
Reviewed by: n_hibma
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
code path to fix a bug in the non USB_USE_SOFTINTR path that caused
the usb bus to hang and generally misbehave when devices were unplugged.
In the process though it also reduced the throughput of usb devices because
of a less than optimal implementation under FreeBSD.
This commit fixes the non USB_USE_SOFTINTR code in uhci and ohci
so that it works again, and switches back to using this code path.
The uhci code has been tested, but the ohci code hasn't. It's
essentially the same anyway and so I don't envisage any difficulties.
Code for uhci submitted by: Maksim Yevmenkin <myevmenk@exodus.net>
|
|
|
|
| |
Requested by: imp
|
|
|
|
|
|
| |
debugging levels to off by default. Now that debug levels can be
tweaked by sysctl we don't need to go through hoops to get the
different usb parts to produce debug data.
|
|
|
|
|
|
| |
sysctl tree for tweaking them real-time.
Reviewed by: iedowse
|
|
|
|
|
|
|
|
| |
frees it again. The idea was to perform M_WAITOK allocations in a
process context to reduce the risk of later interrupt-context
M_NOWAIT allocations failing, but in fact this code can be called
from contexts where it is not desirable to sleep (e.g. if_start
routines), so it causes lots of witness "could sleep" warnings.
|
|
|
|
|
|
|
|
| |
date: 2002/05/28 12:42:39; author: augustss;
Change DMAADDR macro slightly.
Update the $NetBSD$ tags to reflect this and make slight changes to
usb_mem.h so that we're in sync with each other.
|
|
|
|
|
|
|
|
|
| |
date: 2002/05/19 06:24:31; author: augustss; state: Exp;
Update dma memory access API a little.
NetBSD have adopted our way of using the KERNADDR macro. Update
the revision tags to show that we're in sync, and remove the casts
that they did in their adaptation.
|
|
|
|
| |
<sys/endian.h>. This puts us in line with NetBSD and OpenBSD.
|
| |
|
|
|
|
|
|
|
|
| |
revision 1.157
date: 2002/03/16 16:13:41; author: tsutsui; state: Exp; lines: +4 -4
Fix a couple of typo:
- s/ehci/uhci/ (in unused arg of macro)
- s/ohci/uhci/ (in panic message)
|
|
|
|
|
|
| |
revision 1.156
date: 2002/03/04 00:53:33; author: augustss; state: Exp; lines: +3 -3
Use the correct pointer for the timeout abort.
|
|
|
|
|
|
| |
revision 1.155
date: 2002/02/27 12:42:41; author: augustss; state: Exp; lines: +8 -8
Move the interrupt bailout when a cancelled ii is found.
|
|
|
|
|
|
|
| |
revision 1.154
date: 2002/02/27 12:12:45; author: augustss; state: Exp; lines: +14 -9
Remove spurious splusb().
Lower abort hardware wait.
|
|
|
|
|
|
|
| |
revision 1.153
date: 2002/02/11 11:40:33; author: augustss; state: Exp; lines: +67 -26
Switch to the same abort mechanism as in [eo]hci; it should be more
robust.
|
|
|
|
|
|
|
| |
revision 1.151
date: 2002/01/27 23:00:34; author: augustss; state: Exp; lines: +3 -3
Use M_WAITOK instead of M_NOWAIT when allocating extra descriptors.
Spotted by OpenBSD.
|
|
|
|
|
| |
date: 2002/01/14 13:23:37; author: tsutsui;
Call malloc(9) with M_ZERO flag instead of memset() after malloc().
|
| |
|