Commit Graph

21803 Commits

Author SHA1 Message Date
drochner
3ccaca911b -remove "bDescriptorSubtype" from usb_descriptor_t - this is not part
of the common USB spec
-Fix length of string descriptor: Descriptors have only a byte field
 for length, so 2*127+2 is already too much. Some devices obviously
 don't reply to string read requests with impossible length which
 happened if "sizeof(usb_string_descriptor_t) was used.
2007-02-26 13:58:36 +00:00
drochner
d91012791a Define a usb_cdc_descriptor_t which contains the class specific
"bDescriptorSubtype" field and change usb_find_desc()/usb_find_desc_if()
to use it. (The latter functions should not be used by generic code;
I've left the names for now for compatibility.)
Rename USBD_SUBTYPE_ANY to make clear that it is not generic.
2007-02-26 13:50:06 +00:00
drochner
47032dbc5e -g/c usbd_init()/usbd_finish() which don't do anything useful
-use <fs/unicode.h> for utf16->utf8 conversion instead of a private
 implementation
-streamline the COMPAT_30 utf16->ascii conversion a bit: remove
 length check (USB_MAX_STRING_LEN is too large to be useful) and
 replace array index arithmetics
2007-02-26 13:44:40 +00:00
drochner
515beb215f g/c calls to usbd_init()/usbd_finish() which don't have an effect 2007-02-26 13:38:09 +00:00
drochner
527f6a72af don't use usb_find_desc() which has some "subtype" semantics which
should not be used outside of device classes defining it
2007-02-26 13:36:01 +00:00
drochner
a0afd1c3d9 Remove the check which disallows to connect a bus powered hub to another
bus powered hub. While one can interpret the spec that way, it is not
stated clearly, and is at most a side effect of power budgeting.
Also, there are devices which don't report correctly whether they
are self powered, so the check was unreliable.
2007-02-26 13:33:09 +00:00
drochner
ff825e3a80 The manpage promises not to touch the device on USB_GET_DEVICEINFO.
Make it so.
2007-02-26 13:28:56 +00:00
drochner
8fd98300b1 -in root hub emulation, return a sane value as language code
-constify "methods" tables and (partly) descriptor templates
2007-02-26 13:26:45 +00:00
drochner
f8b074ef41 allow the bus/pipes methods tables to be const 2007-02-26 13:23:59 +00:00
drochner
c033a8d4ed Don't assume that usb_descriptor_t contains a bDescriptorSubtype field.
This is class specific and shouldn't be in a generic definition.
2007-02-26 13:14:11 +00:00
martin
ade480cf0b Make it at least compile again (const propagation) 2007-02-25 21:06:57 +00:00
darcy
db4d899fe8 Add Canon PowerShot SD630 camera. 2007-02-25 14:22:58 +00:00
tsutsui
075b18ca23 Try to map both PCI I/O and memory space and remove #ifdef RTK_USEIOSPACE.
Tested on dreamcast, landisk, and macppc with 8139C on PCI slot.
2007-02-25 04:19:32 +00:00
msaitoh
7db9e02335 fix media link issues with fiber-based card
fixes PR#35797
2007-02-23 08:22:06 +00:00
msaitoh
f0a2eb28e5 fix some negotiation problems on wm(4).
will fix PR#30078, PR#30490, PR#30906, PR#33429, PR#35386.
2007-02-23 03:03:10 +00:00
riz
52138eeaf6 Defer dkwedge_discover() until after interrupts are enabled. This
allows a kernel with options DKWEDGE_AUTODISCOVER to boot
on a machine with a twa(4) card.

ok matt@
2007-02-22 22:28:32 +00:00
thorpej
dd962f8680 Pick up some additional files that were missed before due to conflicts
with newlock2 merge:

Replace the Mach-derived boolean_t type with the C99 bool type.  A
future commit will replace use of TRUE and FALSE with true and false.
2007-02-21 23:48:10 +00:00
thorpej
712239e366 Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
2007-02-21 22:59:35 +00:00
mrg
4410329b87 add a pair of new bus_dma(9) functions:
int _bus_dmatag_subregion(bus_dma_tag_t tag,
				  bus_addr_t min_addr,
				  bus_addr_t max_addr,
				  bus_dma_tag_t *newtag,
				  int flags)
	void _bus_dmatag_destroy(bus_dma_tag_t tag)

that allow a (normally broken/limited) device to restrict the bus address
range it can talk to.  this is used by bce(4) to limit DMA addresses to
1GB range, the maximum the chip can address.

all this is from Yorick Hardy <yhardy@uj.ac.za> with input from several
people on tech-kern.

XXX: bus_dma(9) needs an update still.
2007-02-21 20:41:23 +00:00
wiz
017d008f6d Fix debug format strings (found on amd64). 2007-02-21 15:42:07 +00:00
briggs
d298894138 Install sys/dev/bluetooth/btuart.h.
Descend into and build/install usr.sbin/btuartd.
Install etc/rc.d/btuartd.
2007-02-20 21:29:08 +00:00
kiyohara
10abd6f2e2 Supprot Bluetooth HCI UART (H4) driver and daemon. 2007-02-20 16:53:20 +00:00
matt
148790dc55 Fix tpyo. 2007-02-20 01:56:59 +00:00
macallan
562219389b update copyrights 2007-02-20 01:32:33 +00:00
macallan
f6a33e5a19 report power button events to sysmon 2007-02-20 01:27:25 +00:00
ad
a030fa3a9b The ACPI locks need to run at IPL_VM, since they can be taken from
interrupt handlers.
2007-02-19 22:32:52 +00:00
ad
1d4a085a4a Initialize acpi_interrupt_list_mtx in acpi_probe(). 2007-02-19 22:31:05 +00:00
bouyer
7054823d08 We have to bus_mapmap_load() after m_adj, otherwise the map will point at
the wrong place in the buffer. Fix an issue in the !sc->bge_rx_alignment_bug
case reported by Nicolas Joly.
While there remove a duplicate m_adj(), and add a missing bus_dmamap_unload().
2007-02-19 18:44:05 +00:00
xtraeme
c661f78440 AcpiOsDelete{Lock,Semaphore}: don't forget to destroy the mutex,
otherwise mutex_init might be called multiple times.

Discussed with Andrew hours ago.
2007-02-19 12:29:24 +00:00
ad
3a91cc8a3b Back out previous for now. There isn't currently an easy way to set up
shared state before these get attached or used.

From xtraeme@.
2007-02-19 06:08:37 +00:00
rumble
334307e192 Extract mac addresses on Phobos G100 boards. 2007-02-19 04:35:21 +00:00
xtraeme
fe10a8bc01 Forgot to initialize the mutex. 2007-02-19 00:56:05 +00:00
xtraeme
9ece13126c Replace ACPI_INTERRUPT_LIST_{LOCK,UNLOCK} mutex_{enter,exit} 2007-02-19 00:41:48 +00:00
xtraeme
0bb6833f55 Replace SYSMON_ENVSYS_{LOCK,UNLOCK} with mutex_{enter,exit}. 2007-02-19 00:36:12 +00:00
xtraeme
bf63a83084 * sysmon_wdog_mtx needs to run at IPL_SOFTCLOCK.
* replace SYSMON_WDOG_{LOCK,UNLOCK} macros with mutex_{enter,exit}

reminded by ad@.
2007-02-19 00:25:30 +00:00
xtraeme
8ef949e8d4 * Provide same description in cv_init as we had before.
* Use cv_timedwait.

Thanks to Andrew for information.
2007-02-19 00:01:23 +00:00
xtraeme
58398d7565 * Replace simple_locks and exclusive locks with adaptive mutexes.
* Replace ltsleep/wakeup pairs with condition variables
  (cv_init/cv_wait/cv_broadcast).

Reviewed by ad@.
2007-02-18 23:41:07 +00:00
xtraeme
a50e1fb3a5 Replace simple_locks with mutexes, reviewed by ad@. 2007-02-18 23:40:07 +00:00
xtraeme
039f493e4b Replace a simple_lock with a mutex, reviewed by ad@. 2007-02-18 23:39:20 +00:00
xtraeme
406b5ff314 * Replace simple_locks and exclusive locks with adaptive mutexes.
* Replace ltsleep/wakeup pairs with condition variables
  (cv_init/cv_wait/cv_broadcast).

Reviewed by ad@.
2007-02-18 23:38:11 +00:00
xtraeme
840604a1a8 Replace simple_locks with mutexes, reviewed by ad@. 2007-02-18 23:34:55 +00:00
xtraeme
b821d47d37 There's no need to use a simple_lock here, ok ad@. 2007-02-18 23:32:52 +00:00
tsutsui
1359adc400 No need to specify BUS_DMA_ALLOCNOW for sglist map
since it will never be unloaded anyway.
2007-02-18 12:26:13 +00:00
tsutsui
14dfb0043c - KNF, ANSIfy, TAB/space cleanup
- unwrap some lines
- u_intNN_t -> uintNN_t
2007-02-18 12:16:14 +00:00
jmcneill
2b24c5c8d5 Regen. 2007-02-17 23:24:44 +00:00
jmcneill
bc130a3a9b Add Marvell 88E6060 10/100 5-port PHY switch 2007-02-17 23:24:32 +00:00
jmcneill
737605ff0b Enable mvphy(4) 2007-02-17 23:24:01 +00:00
jmcneill
046f6fb760 Add a default "dumb" mode, that adds all ports to the same interface. 2007-02-17 23:23:38 +00:00
dyoung
5493f188c7 KNF: de-__P, bzero -> memset, bcmp -> memcmp. Remove extraneous
parentheses in return statements.

Cosmetic: don't open-code TAILQ_FOREACH().

Cosmetic: change types of variables to avoid oodles of casts: in
   in6_src.c, avoid casts by changing several route_in6 pointers
   to struct route pointers.  Remove unnecessary casts to caddr_t
   elsewhere.

Pave the way for eliminating address family-specific route caches:
   soon, struct route will not embed a sockaddr, but it will hold
   a reference to an external sockaddr, instead.  We will set the
   destination sockaddr using rtcache_setdst().  (I created a stub
   for it, but it isn't used anywhere, yet.)  rtcache_free() will
   free the sockaddr.  I have extracted from rtcache_free() a helper
   subroutine, rtcache_clear().  rtcache_clear() will "forget" a
   cached route, but it will not forget the destination by releasing
   the sockaddr.  I use rtcache_clear() instead of rtcache_free()
   in rtcache_update(), because rtcache_update() is not supposed
   to forget the destination.

Constify:

   1 Introduce const accessor for route->ro_dst, rtcache_getdst().

   2 Constify the 'dst' argument to ifnet->if_output().  This
     led me to constify a lot of code called by output routines.

   3 Constify the sockaddr argument to protosw->pr_ctlinput.  This
     led me to constify a lot of code called by ctlinput routines.

   4 Introduce const macros for converting from a generic sockaddr
     to family-specific sockaddrs, e.g., sockaddr_in: satocsin6,
     satocsin, et cetera.
2007-02-17 22:34:07 +00:00
pavel
934634a18c Change the process/lwp flags seen by userland via sysctl back to the
P_*/L_* naming convention, and rename the in-kernel flags to avoid
conflict. (P_ -> PK_, L_ -> LW_ ). Add back the (now unused) LSDEAD
constant.

Restores source compatibility with pre-newlock2 tools like ps or top.

Reviewed by Andrew Doran.
2007-02-17 22:31:36 +00:00