Commit Graph

202 Commits

Author SHA1 Message Date
christos 894062c90e Coverity CID 3061: Add KASSERT (from Arnaud Lacombe) 2006-10-03 18:21:53 +00:00
jmcneill ce9801710e Only display "interrupt while not running ignored" if DIAGNOSTIC is set, as
whenever this happens, so many messages are spewed to the screen from the
kernel that the system is effectively useless. Hardly ignored :-)
2006-09-25 22:15:15 +00:00
jmcneill f135e0d607 Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@
2006-09-24 03:53:07 +00:00
christos 40be650c67 add missing initializers. 2006-09-03 21:05:01 +00:00
christos 224c7c746b add missing initializer. 2006-09-03 21:03:11 +00:00
gdamore a5c89047c0 Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.)  This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.
2006-06-19 15:44:33 +00:00
mrg 0337fbac37 make [OU]READ[124]() real inline functions instead of macros. 2006-05-12 01:25:00 +00:00
christos 2fa8f13ac7 Coverity CID 1133: Abort quickly if we don't have a buffer in all the cases. 2006-04-14 16:31:27 +00:00
christos c7ffec83be Only do the software reset if we are dying, like we do in ohci and ehci.
Pointed out by SAITOH Masanobu
2006-03-31 17:31:13 +00:00
augustss 94cd2a4171 Use polling while shutting down the host controller since interrupts
cannot be trusted at this point.  From Iain Hibbert <plunky@rya-online.net>.
2006-03-05 23:12:58 +00:00
perry 3d4ed1fbc7 __inline__ -> inline 2005-12-24 23:41:33 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
augustss 7dd02394b7 Make sure we don't enable host controller interrupts until all
initialization is finished.
2005-07-18 11:08:00 +00:00
christos a9cf21849d - const poisoning
- eliminate variable shadowing
2005-05-30 04:21:39 +00:00
augustss 5b3acf742e Fix a race condition in xfer abort. Derived from a FreeBSD patch.
An xfer could be aborted twice (which means that the second abort might
access deallocated memory).  This happened when an xfer timed out and
the timeout started an abort.  While that abort was taking place the
xfer could be cancelled (usually by closing the pipe), causing a second
abort to begin.
This is now handled by having flags indicating the abort state of an xfer.

Hopefully this will fix the occasional crashes when printing.
2005-04-30 14:38:40 +00:00
skrll e71eebcad0 Complete the interrupt output transfer support copy from FreeBSD, but
remove the incorrect access to the bulk part of the union.

Reviewed and OK'ed by Lennart.
2005-04-29 19:15:13 +00:00
skrll 5597345e50 KNF and s/a an/an/ 2005-04-27 07:47:25 +00:00
mycroft 2d562a01e2 Copyright maintenance. 2005-03-02 11:37:27 +00:00
perry f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
fvdl a3cea30b50 Implement an USB memory reserve. Allocate some memory per host controller
in the wanted bus_dma space. If an allocation fails during operation
(i.e. when hotplugging an umass device), fall back to using the reserve.

The amount can be configured as USB_MEM_RESERVE. The default value is
256k.

Ideally, there would be a way to steal pages in the desired area from
UVM, but that's far more complicated, and this is not intrusive, plus
it works.
2004-12-21 16:41:24 +00:00
augustss d32a749096 Allow strings descriptor 0 to be fetched. It's the default language index. 2004-10-26 20:46:16 +00:00
drochner 7f3933adae typo in comment 2004-07-22 18:45:40 +00:00
mycroft c206d4cf15 hcpriv is not actually used here. Remove references to it. 2004-07-17 20:12:02 +00:00
mycroft ac575d2a58 Make one message dependent on ohcidebug, so it doesn't interfere with polled
operation; e.g. when entering a root device or in DDB.
2004-06-29 03:56:04 +00:00
martin ce925f4f4f 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.
2004-03-02 16:32:05 +00:00
toshii 05069ebd4d Use the correct wValue to get hub desriptors.
Also, make wValue checks of root hub codes less strict.
2003-12-29 08:17:10 +00:00
mycroft c6589d2082 Ignore a CRCTO error on a SETUP transaction in combination with STALLED or NAK.
This fixes problems with the GL641.
2003-11-04 19:11:21 +00:00
mycroft af7e1b8144 Tweak a debugging printf(). 2003-09-12 16:18:08 +00:00
drochner 8c4f2074f2 avoid a gcc3 warning about a never-true comparision in the
mstohz() macro
2003-07-03 11:24:13 +00:00
gson 34388cbdcc Function names printed in debug messages did not always match the
actual name of the function.
2003-05-13 04:41:59 +00:00
simonb 9bfb5c46f4 Remove unreachable break after return. 2003-02-23 04:19:26 +00:00
tsutsui 881b65ce01 Use mstohz() in <sys/param.h> rather than homegrown MS_TO_TICKS(). 2003-02-22 05:24:16 +00:00
augustss fe29dd94be Bail out early in isoc_done if the ii is not on the interrupt list. 2003-02-19 01:35:04 +00:00
augustss 47f7f552a2 Don't take xfers off the interrupt list if they are not on it yet. 2003-02-16 23:15:27 +00:00
ichiro 6236662a85 change URL pointers of USB[1,2] specification 2003-02-08 03:32:50 +00:00
augustss f2590fdb81 Reissue the MAXP command on resume. From FreeBSD. 2003-01-01 16:25:59 +00:00
dsainty 3204b83aa5 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.
2002-12-31 02:21:31 +00:00
dsainty 0bdb52527a CONSTCOND away some lint warnings 2002-12-31 02:04:49 +00:00
augustss 434abd832d Add #ifdef USB_USE_SOFTINTR for some softintr code. From FreeBSD. 2002-09-29 21:13:01 +00:00
provos 0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
augustss 86650920c9 Get rid of trailing white space. 2002-07-11 21:14:24 +00:00
lukem 06de426449 SIMPLEQ rototill:
- implement SIMPLEQ_REMOVE(head, elm, type, field).  whilst it's O(n),
  this mirrors the functionality of SLIST_REMOVE() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- 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()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups
2002-06-01 23:50:52 +00:00
augustss 0a15c2acd4 Change DMAADDR macro slightly. 2002-05-28 12:42:38 +00:00
augustss 4bc0b333ea Update dma memory access API a little. 2002-05-19 06:24:30 +00:00
augustss b32942bb23 Whitespace fixes. 2002-03-17 18:02:52 +00:00
tsutsui ce457aa10e Fix a couple of typo:
- s/ehci/uhci/ (in unused arg of macro)
- s/ohci/uhci/ (in panic message)
2002-03-16 16:13:41 +00:00
augustss e4ca1c8a44 Use the correct pointer for the timeout abort. 2002-03-04 00:53:33 +00:00
augustss 5d2b04bb42 Move the interrupt bailout when a cancelled ii is found. 2002-02-27 12:42:41 +00:00
augustss 5663022c32 Remove spurious splusb().
Lower abort hardware wait.
2002-02-27 12:12:45 +00:00
augustss f8204d29e1 Switch to the same abort mechanism as in [eo]hci; it should be more
robust.
2002-02-11 11:40:33 +00:00