Commit Graph

18515 Commits

Author SHA1 Message Date
Warner Losh
2f4f3e9365 Don't check for mapping above 4GB on 32-bit platforms. 2009-02-05 20:44:06 +00:00
Warner Losh
102720b585 do_product_lookup should return a const struct pccard_product *. 2009-02-05 19:39:07 +00:00
Warner Losh
73e04c0b84 Fix parameter types for set_res_flags and read_ivars 2009-02-05 19:38:31 +00:00
Warner Losh
a6340ec88d shutdown returns an int 2009-02-05 19:37:49 +00:00
Warner Losh
8c1d2b702b shutdown returns an int 2009-02-05 19:36:14 +00:00
Warner Losh
16ec4b00e6 writereg returns an int. 2009-02-05 19:33:35 +00:00
Warner Losh
85a7cf04e7 writereg returns an int. 2009-02-05 19:33:20 +00:00
Warner Losh
005f7c3308 Make iclear return int, since that matches all function definitions of it. 2009-02-05 19:32:34 +00:00
Warner Losh
3fd8527379 reset_epp and ecp_sync both return int. 2009-02-05 19:31:55 +00:00
Warner Losh
174ed15e5c Shutdown returns an int. 2009-02-05 19:30:55 +00:00
Warner Losh
cdaf8487a3 Add some additional debugging for the memory code. 2009-02-05 18:51:14 +00:00
Warner Losh
b6c974e8da device_shutdown returns an int. 2009-02-05 18:43:13 +00:00
Warner Losh
1496d4a967 pcib_read_config and pcib_write_config take u_int params. 2009-02-05 18:40:42 +00:00
Warner Losh
e3545bcc26 device_shutdown returns int. 2009-02-05 18:39:33 +00:00
Warner Losh
66a149db32 bus_add_child takes a const char *. 2009-02-05 18:38:39 +00:00
Sam Leffler
63425a7f25 Add support for frobbing Intel StrataFlash Protection Registers:
o add CFI_SUPPORT_STRATAFLASH compile option to enable support
o add new ioctls to get/set the factory and user/oem segments of the PR
  and to get/set Protection Lock Register that fuses the user segment
o add #defines for bits in the status register
o update cfi_wait_ready to take an offset so it can be used to wait for
  PR write completion and replace constants w/ symbolic names

Note: writing the user segment isn't correct; committing now to get review.

Sponsored by:	Carlson Wireless
Reviewed by:	imp, Chris Anderson
2009-02-05 18:12:07 +00:00
Nathan Whitehorn
6b122703cc Fix bm_shutdown() KOBJ method to correspond to return int, as it should.
Found by:	Andriy Gapon
2009-02-04 22:16:27 +00:00
Warner Losh
a620f9a577 Correct signatures to match kobj function definitions. 2009-02-04 21:11:31 +00:00
Warner Losh
56e63ed738 Shutdown routine returns int. 2009-02-04 20:39:45 +00:00
Warner Losh
850f048e58 detach doesn't return an unsinged int, but returns an int. 2009-02-04 20:35:22 +00:00
Warner Losh
02fa902fbe Fix shutdown routine to return 0 and change signature from void return
to int.
2009-02-04 20:26:27 +00:00
Warner Losh
85d27a4f81 Correct signature for the identify routine. The bad parameter wasn't
used at all, so this is just a tidiness excersize.
2009-02-04 20:23:42 +00:00
Ed Schouten
41ba7e9b13 Slightly improve the design of the TTY buffer.
The TTY buffers used the standard <sys/queue.h> lists. Unfortunately
they have a big shortcoming. If you want to have a double linked list,
but no tail pointer, it's still not possible to obtain the previous
element in the list. Inside the buffers we don't need them. This is why
I switched to custom linked list macros. The macros will also keep track
of the amount of items in the list. Because it doesn't use a sentinel,
we can just initialize the queues with zero.

In its simplest form (the output queue), we will only keep two
references to blocks in the queue, namely the head of the list and the
last block in use. All free blocks are stored behind the last block in
use.

I noticed there was a very subtle bug in the previous code: in a very
uncommon corner case, it would uma_zfree() a block in the queue before
calling memcpy() to extract the data from the block.
2009-02-03 19:58:28 +00:00
John Baldwin
e2f76cae05 Trim what we expose to userland in <dev/ppbus/ppbconf.h> to just the
constants used for the ppi(4) ioctls for bits in the control and status
registers.

Reviewed by:	db
2009-02-03 19:49:21 +00:00
Sam Leffler
8313510315 add Roel's copyright as he did the initial version 2009-02-03 19:21:15 +00:00
Sam Leffler
e73090b5d3 honor any interface width (e.g. setup by the bus shim) and don't probe;
this is needed for the moment to workaround bus shim issues
2009-02-03 19:09:16 +00:00
Sam Leffler
3a114d1f92 reorg ioctl code to simplify adding new requests 2009-02-03 19:07:41 +00:00
Sam Leffler
50d5ad0e42 fix compilation w/ AH_DEBUG 2009-02-03 19:00:56 +00:00
Sean Bruno
23ee18767e Delete fwohci_filt() as it is now unused
Obtained from:	Marius Strobl <marius@alchemy.franken.de>
MFC after:	2 weeks
2009-02-03 17:13:37 +00:00
John Baldwin
3619ea6a08 Don't right-adjust the SMBus slave address for SSIF IPMI BMCs enumerated
via ACPI either.  This is somewhat academic since we don't currently
support such devices though.
2009-02-03 16:39:51 +00:00
John Baldwin
bb6bb7fe1b - Change ichsmb(4) to follow the format of all the other smbus controllers
for slave addressing by using left-adjusted slave addresses (i.e.
  xxxxxxx0b).
- Require the low bit of the slave address to always be zero in smb(4) to
  help catch broken applications.
- Adjust some code in the IPMI driver to not convert the slave address for
  SSIF to a right-adjusted address.  I (or possibly ambrisko@) added this in
  the past to (unknowingly) work around the bug in ichsmb(4).

Submitted by:	 Andriy Gapon <avg of icyb.net.ua> (1,2)
MFC after:	1 month
2009-02-03 16:14:37 +00:00
Andrew Thompson
c96a3b833f - Keep the same sorting on usb_errstr_table as the enum.
- Use c99 array initializers for usb_quirk_str so the indexing isnt critical.
2009-02-03 16:00:20 +00:00
Andrew Thompson
911ee9f112 Add missing string table for the usb quirk enum.
Pointy hat:	me
Submitted by:	rrs
2009-02-03 15:24:00 +00:00
Randall Stewart
2f4afd2125 Adds support for SCTP checksum offload. This means
we, like TCP and UDP, move the checksum calculation
into the IP routines when there is no hardware support
we call into the normal SCTP checksum routine.

The next round of SCTP updates will use
this functionality. Of course the IGB driver needs
a few updates to support the new intel controller set
that actually does SCTP csum offload too.

Reviewed by:	gnn, rwatson, kmacy
2009-02-03 11:00:43 +00:00
Andrew Thompson
5261ba87bc Move away from autogenerated enums, these values never change and its helpful
to be able to look them up.
2009-02-03 05:50:36 +00:00
Warner Losh
711873d44f o Define some symbols for a few items that are bare constants in the
code.
o Use NULL in preference to 0 for a few pointers.
o default to bus timing normal, like we default to bus_width_1.
2009-02-03 04:28:45 +00:00
Kip Macy
a392a2719c break out of loop if we run out of mbufs 2009-02-02 23:04:20 +00:00
John Baldwin
ba8d936dd2 Goof, catch up to constant rename (I renamed it to match the overall PCI
style of having register offsets start with PCIR_* rather than PCI_*).

Submitted by:	rss
2009-02-02 22:06:20 +00:00
Maksim Yevmenkin
8de7d5083c Properly retun error core from kbdmux_modevent()
Reported by:	Christoph Mallon < christoph -dot- mallon -at- gmx -dot- de >
MFC after:	1 week
2009-02-02 21:34:04 +00:00
John Baldwin
da1e0915c5 - Add a new ioctl to /dev/pci to fetch details on an individual BAR of a
device.  The details include the current value of the BAR (including all
  the flag bits and the current base address), its length, and whether or not
  it is enabled.  Since this operation is not invasive, non-root users are
  allowed to use it (unlike manual config register access which requires
  root).  The intention is that userland apps (such as Xorg) will use this
  interface rather than dangerously frobbing the BARs from userland to
  obtain this information.
- Add a new sub-mode to the 'list' mode of pciconf.  The -b flag when used
  with -l will now list all the active BARs for each device.

MFC after:	1 month
2009-02-02 19:54:16 +00:00
Sam Leffler
8216b39e2b o make SAVE_CCK slightly less error prone by always writing the _flag
value used later by RESTORE_CCK
o swap arg order in RESTORE_CCK to slightly reduce cost
2009-02-02 16:56:58 +00:00
Sam Leffler
55a2313ad2 restore variable initialization removed in r187831; this broke
the horrible SAVE/RESTORE_CCK macros used by swan/nala cards to
implement 11b using 11g
2009-02-02 16:55:57 +00:00
Alfred Perlstein
7e474656a6 src/usr.bin/usbhidaction/usbhidaction.c
src/usr.bin/usbhidctl/usbhid.c
src/sys/dev/usb2/include/usb2_hid.h
src/sys/dev/usb2/input/uhid2.c
src/lib/libusbhid/Makefile
src/lib/libusbhid/descr.c
src/lib/libusbhid/descr_compat.c
src/lib/libusbhid/usbhid.3
src/lib/libusbhid/usbhid.h
src/lib/libusbhid/usbvar.h

Patches to make libusbhid and HID userland utilities compatible with
the new USB stack. All HID ioctls should go through the libusbhid
library to ensure compatibility. I have found at least one piece of
software in /usr/ports which needs to get updated before USB HID
devices will work. This is the X joystick input driver.

Reported and tested by:

Daichi GOTO and Masanori OZAWA.

src/sys/dev/usb2/core/usb2_process.c

Correct USB process names.

Reported by:

Andre Guibert de Bruet

src/sys/dev/usb2/serial/uftdi2.c

Integrate changes from old USB stack.

Submitted by:	hps
2009-02-02 00:49:39 +00:00
Sean Bruno
3042cc43f0 Some updates and bug squashing in the firewire stack.
Move the interupt handler to a driver_intr_t type function as it was trying
to do way to much for a lightweight filter interrupt function.

Introduce much more locking around fc->mtx.  Tested this for lock reversals
and other such lockups.  Locking seems to be working better, but there
is much more to do with regard to locking.  The most significant lock is
in the BUS RESET handler.  It was possible, before this checkin, to set
a bus reset via "fwcontrol -r" and have the BUS RESET handler fire before
the code responsible for asserting BUS RESET was complete.  This locking
fixes that issue.

Move some of the memory allocations in the fc struct to the attach function
in firewire.c

Rework the businfo.generation indicator to be merely a on/off bit now.
It's purpose according to spec is to notify the bus that the config ROM
has changed.  That's it.

Catch and squash a possible panic in SBP where in the SBP_LOCK was held
during a possible error case.  The error handling code would definitely
panic as it would try to acquire the SBP_LOCK on entrance.

Catch and squash a camcontrol/device lockup when firewire drives go away.
When a firewire device was powered off or disconnected from the firewire
bus, a "camcontrol rescan all" would hang trying to poll removed devices
as they were not properly detached.  Don't do that.

Approved by:	scottl
MFC after:	2 weeks
2009-02-01 23:28:52 +00:00
Andrew Thompson
84bcda5d68 Revert part of r187970, the NULL check was removed from
udbp_bulk_read_complete() as well as udbp_attach.
2009-02-01 01:07:15 +00:00
Andrew Thompson
50bf982db6 Remove check for null softc in attach, it can never happen. 2009-02-01 00:51:25 +00:00
Alexander Motin
a05a433984 Fix bug in hint.hdac.X.config parsing. 2009-01-31 08:24:09 +00:00
John Baldwin
be57da218c Use si_drv1 to hold the softc for the adb_mouse character device instead of
using devclass_get_softc().

Tested by:	nwhitehorn
2009-01-29 16:18:49 +00:00
Ed Schouten
218653a7fc Make adb_mouse use dev2unit() instead of minor().
A real fix would be to migrate it to si_drv0 to store the softc
directly, but this is the quickest way to fix it right now.
2009-01-29 05:59:42 +00:00
Alexander Motin
64e4196db9 Add one more debug level. 2009-01-28 23:18:21 +00:00
Alexander Motin
5b69a497e5 Add hw.sdhci.debug sysctl to control debug level. 2009-01-28 22:53:41 +00:00
Alexander Motin
ed01be88f7 Improve mmc driver verbose logging.
Make requests logging controllable by hw.mmc.debug sysctl.
2009-01-28 22:09:00 +00:00
Maksim Yevmenkin
3045a45f42 Update ubtbcmfw2 (aka usb2_bluetooth_fw) driver
Reviewed by:	HPS
2009-01-28 20:06:02 +00:00
Maksim Yevmenkin
0e360a7ebe Make ng_ubt2 (aka usb2_bluetooth_ng) driver only attach as "generic" driver
Reviewed by:	HPS
2009-01-28 20:04:39 +00:00
Sam Leffler
59efa8b517 Overhaul regulatory support:
o remove HAL_CHANNEL; convert the hal to use net80211 channels; this
  mostly involves mechanical changes to variable names and channel
  attribute macros
o gut HAL_CHANNEL_PRIVATE as most of the contents are now redundant
  with the net80211 channel available
o change api for ath_hal_init_channels: no more reglass id's, no more outdoor
  indication (was a noop), anM contents
o add ath_hal_getchannels to have the hal construct a channel list without
  altering runtime state; this is used to retrieve the calibration list for
  the device in ath_getradiocaps
o add ath_hal_set_channels to take a channel list and regulatory data from
  above and construct internal state to match (maps frequencies for 900MHz
  cards, setup for CTL lookups, etc)
o compact the private channel table: we keep one private channel
  per frequency instead of one per HAL_CHANNEL; this gives a big
  space savings and potentially improves ani and calibration by
  sharing state (to be seen; didn't see anything in testing); a new config
  option AH_MAXCHAN controls the table size (default to 96 which
  was chosen to be ~3x the largest expected size)
o shrink ani state and change to mirror private channel table (one entry per
  frequency indexed by ic_devdata)
o move ani state flags to private channel state
o remove country codes; use net80211 definitions instead
o remove GSM regulatory support; it's no longer needed now that we
  pass in channel lists from above
o consolidate ADHOC_NO_11A attribute with DISALLOW_ADHOC_11A
o simplify initial channel list construction based on the EEPROM contents;
  we preserve country code support for now but may want to just fallback
  to a WWR sku and dispatch the discovered country code up to user space
  so the channel list can be constructed using the master regdomain tables
o defer to net80211 for max antenna gain
o eliminate sorting of internal channel table; now that we use ic_devdata
  as an index, table lookups are O(1)
o remove internal copy of the country code; the public one is sufficient
o remove AH_SUPPORT_11D conditional compilation; we always support 11d
o remove ath_hal_ispublicsafetysku; not needed any more
o remove ath_hal_isgsmsku; no more GSM stuff
o move Conformance Test Limit (CTL) state from private channel to a lookup
  using per-band pointers cached in the private state block
o remove regulatory class id support; was unused and belongs in net80211
o fix channel list construction to set IEEE80211_CHAN_NOADHOC,
  IEEE80211_CHAN_NOHOSTAP, and IEEE80211_CHAN_4MSXMIT
o remove private channel flags CHANNEL_DFS and CHANNEL_4MS_LIMIT; these are
  now set in the constructed net80211 channel
o store CHANNEL_NFCREQUIRED (Noise Floor Required) channel attribute in one
  of the driver-private flag bits of the net80211 channel
o move 900MHz frequency mapping into the hal; the mapped frequency is stored
  in the private channel and used throughout the hal (no more mapping in the
  driver and/or net80211)
o remove ath_hal_mhz2ieee; it's no longer needed as net80211 does the
  calculation and available in the net80211 channel
o change noise floor calibration logic to work with compacted private channel
  table setup; this may require revisiting as we no longer can distinguish
  channel attributes (e.g. 11b vs 11g vs turbo) but since the data is used
  only to calculate status data we can live with it for now
o change ah_getChipPowerLimits internal method to operate on a single channel
  instead of all channels in the private channel table
o add ath_hal_gethwchannel to map a net80211 channel to a h/w frequency
  (always the same except for 900MHz channels)
o add HAL_EEBADREG and HAL_EEBADCC status codes to better identify regulatory
  problems
o remove CTRY_DEBUG and CTRY_DEFAULT enum's; these come from net80211 now
o change ath_hal_getwirelessmodes to really return wireless modes supported
  by the hardware (was previously applying regulatory constraints)
o return channel interference status with IEEE80211_CHANSTATE_CWINT (should
  change to a callback so hal api's can take const pointers)
o remove some #define's no longer needed with the inclusion of
  <net80211/_ieee80211.h>

Sponsored by:   Carlson Wireless
2009-01-28 18:00:22 +00:00
Ed Schouten
a4611ab612 Last step of splitting up minor and unit numbers: remove minor().
Inside the kernel, the minor() function was responsible for obtaining
the device minor number of a character device. Because we made device
numbers dynamically allocated and independent of the unit number passed
to make_dev() a long time ago, it was actually a misnomer. If you really
want to obtain the device number, you should use dev2udev().

We already converted all the drivers to use dev2unit() to obtain the
device unit number, which is still used by a lot of drivers. I've
noticed not a single driver passes NULL to dev2unit(). Even if they
would, its behaviour would make little sense. This is why I've removed
the NULL check.

Ths commit removes minor(), minor2unit() and unit2minor() from the
kernel. Because there was a naming collision with uminor(), we can
rename umajor() and uminor() back to major() and minor(). This means
that the makedev(3) manual page also applies to kernel space code now.

I suspect umajor() and uminor() isn't used that often in external code,
but to make it easier for other parties to port their code, I've
increased __FreeBSD_version to 800062.
2009-01-28 17:57:16 +00:00
Sam Leffler
5fe9f04492 change ic_getradiocaps driver callback to include the max # channels
so callers know the size of the array passed down
2009-01-27 23:19:36 +00:00
Nick Hibma
c57c9cb6be Fix the input buffer at 1024. The previous calculated buffer size
exceeded the maximum size of 1 page for OHCI controllers. Other serial
drivers use the same size, so I assume this should be enough (1MB/s
throughput?).
2009-01-27 19:37:30 +00:00
Stanislav Sedov
0db1aa0bcb - Add support for Moxa Technologies CP-168EL/PCIe card.
Submitted by:	dmarck
MFC after:	1 week
2009-01-27 09:38:44 +00:00
Jeff Roberson
597979c4b7 - Add support for nehalem/corei7 cpus. This supports all of the core
counters defined in the reference manual.  It does not support the
   'uncore' events.

Reviewed by:	jkoshy
Sponsored by:	Nokia
2009-01-27 07:29:37 +00:00
Maksim Yevmenkin
50e71c31aa Clean up ng_ubt2. Get rid of excessive use of NG_NODE_REF/UNREF().
Make detach() completely synchronous. Properly handle stalled USB
transfers (use internal mechanism instead of submitting own control
transfers). Rename/remove a couple of variables and update comments.
This work was done in close collaboration with HPS.

Reviewed by:	HPS
2009-01-26 20:59:41 +00:00
John Baldwin
192204fece Don't unlock the parent ppc lock until after releasing the ppbus.
Submitted by:	csjp
2009-01-26 20:58:05 +00:00
Andrew Thompson
023ac6ce67 MFp4 //depot/projects/usb/ @156706
Adjust an UHCI portreset delay.

Submitted by:	Hans Petter Selasky
2009-01-26 17:55:07 +00:00
Andrew Thompson
6bd202b0ce Regen. 2009-01-26 17:50:20 +00:00
Andrew Thompson
2b9a58fd23 MFp4 //depot/projects/usb/ @156522,156530
UHCI SOF Quirk. Makes some broken USB devices work again.  Reported by several
 people. Patch made by me.

Submitted by:	Hans Petter Selasky
2009-01-26 17:49:58 +00:00
Andrew Thompson
4d64302ef7 MFp4 //depot/projects/usb/ @156521
U3G regression issue. Patch to support multiple modem instances per logical
 USB interface.

Submitted by:	Hans Petter Selasky
2009-01-26 17:47:32 +00:00
Andrew Thompson
fb89268fbf Fix up USB_GET_REPORT_DESC ioctl.
Submitted by:	daichi
2009-01-26 17:45:50 +00:00
Andrew Thompson
5a869e681d Add umass quirk.
Submitted by:	Hans Petter Selasky
2009-01-26 17:43:58 +00:00
Andrew Thompson
6eba88e901 Add a usb hid quirk.
Submitted by:	Andre Guibert de Bruet
2009-01-26 17:42:02 +00:00
Alexander Motin
18141fb27d Specify analog beep pin widget for several AD codecs.
It gives working speaker control for that systems.
2009-01-26 15:55:15 +00:00
Nathan Whitehorn
a808d0177a Change the way our softc is stored to use the devinfo facility provided by pcm
instead of the regular device softc interface. This brings the AOA driver in
line with the other pcm drivers.

Requested by:	ariff
2009-01-26 14:43:18 +00:00
John Baldwin
34bb786889 Add missing locking around setting the ppc interrupt handler IVAR.
Reported by:	    many
2009-01-26 14:12:12 +00:00
Rafal Jaworowski
1aef11be0e Teach iic(4) the 'repeated start' I2C condition. This will be used by the
upcoming i2c(8) diag utility.

Reviewed by:	bms, stas
Obtained from:	Semihalf
2009-01-26 13:53:39 +00:00
Nathan Whitehorn
8486eb86a7 Add support for the I2S and davbus audio controllers found in Apple PowerPC
hardware.

Submitted by:	Marco Trillo
2009-01-25 18:20:15 +00:00
Ed Schouten
8d456252aa Remove unneeded checks of device unit number from speaker(4).
Calls on the cdev can only be made on existing devices. This means we
don't have to check the value of dev2unit().
2009-01-25 09:20:59 +00:00
Jung-uk Kim
129dec4245 - Add few VIA bridges to agp_via.c and connect it to amd64 build
as they support Intel Core/Core 2 and VIA Nano processors.
- Align "optional agp" in conf/files.* for consistency while I am here.
2009-01-23 17:48:18 +00:00
Sam Leffler
8698ea65aa fix return status handling by ar5XXXReset; this is the reason the
driver sometimes reports reset failed w/ status 0
2009-01-23 05:33:48 +00:00
Weongyo Jeong
d195485267 Add a new USB wireless driver, urtw(4) for supporting Realtek's 8187L
chipset.
2009-01-23 05:04:49 +00:00
Sam Leffler
8d91de92ee don't run the calibration code if scanning, we won't be on the home channel 2009-01-23 03:15:28 +00:00
John Baldwin
66a86c3bc1 Fix a compile bogon. 'ppbus' is used by two different sets of debug code
in lptout().

Reported by:	several
2009-01-22 15:35:54 +00:00
Takanori Watanabe
824a5dd970 Rename sc_is_pseudo to sc_nobulk member in ufoma_softc.
That was pseudo ucom because it used home brew tty interface.
Now, it is integrated to usb serial framework, so it is not pseudo
ucom any more.
2009-01-22 05:05:56 +00:00
John Baldwin
2067d312d4 Add locking to ppc and ppbus and mark the whole lot MPSAFE:
- To avoid having a bunch of locks that end up always getting acquired as
  a group, give each ppc(4) device a mutex which it shares with all the
  child devices including ppbus(4), lpt(4), plip(4), etc.  This mutex
  is then used for all the locking.
- Rework the interrupt handling stuff yet again.  Now ppbus drivers setup
  their interrupt handler during attach and tear it down during detach
  like most other drivers.  ppbus(4) only invokes the interrupt handler
  of the device that currently owns the bus (if any) when an interrupt
  occurs, however.  Also, interrupt handlers in general now accept their
  softc pointers as their argument rather than the device_t.  Another
  feature of the ppbus interrupt handlers is that they are called with
  the parent ppc device's lock already held.  This minimizes the number
  of lock operations during an interrupt.
- Mark plip(4), lpt(4), pcfclock(4), ppi(4), vpo(4) MPSAFE.
- lpbb(4) uses the ppc lock instead of Giant.
- Other plip(4) changes:
  - Add a mutex to protect the global tables in plip(4) and free them on
    module unload.
  - Add a detach routine.
  - Split out the init/stop code from the ioctl routine into separate
    functions.
- Other lpt(4) changes:
  - Use device_printf().
  - Use a dedicated callout for the lptout timer.
  - Allocate the I/O buffers at attach and detach rather than during
    open and close as this simplifies the locking at the cost of
    1024+32 bytes when the driver is attached.
- Other ppi(4) changes:
  - Use an sx lock to serialize open and close.
  - Remove unused HADBUS flag.
  - Add a detach routine.
  - Use a malloc'd buffer for each read and write to avoid races with
    concurrent read/write.
- Other pps(4) changes:
  - Use a callout rather than a callout handle with timeout().
  - Conform to the new ppbus requirements (regular mutex, non-filter
    interrupt handler).  pps(4) is probably going to have to become a
    standalone driver that doesn't use ppbus(4) to satisfy it's
    requirements for low latency as a result.
  - Use an sx lock to serialize open and close.
- Other vpo(4) changes:
  - Use the parent ppc device's lock to create the CAM sim instead of
    Giant.
- Other ppc(4) changes:
  - Fix ppc_isa's detach method to detach instead of calling attach.

Tested by:	  no one :-(
2009-01-21 23:10:06 +00:00
Joerg Wunsch
cdea919138 Add the dresden elektronik SensorTerminalBoard which uses an FT245. 2009-01-21 20:57:28 +00:00
Ed Schouten
2dfc3551a6 Add Unicode rendering to the teken demo application.
Some time ago I tried adding Unicode rendering to the teken demo
application, but I didn't get it working. It seems I forgot to call
setlocale(). Polish this code and make sure it doesn't get lost.

Also a small fix for my previous commit: all Unicode characters in
teken_boxdrawing are below 0x10000, so store them as 16-bit values.
2009-01-21 19:43:10 +00:00
Warner Losh
b63865c6bf Default to normal bus timing mode on SD cards. In practice, most
cards people have today support high speed mode, so the timing field
would be initialized to bus_timing_hs, but there are some slow
cards...
2009-01-21 17:49:23 +00:00
Warner Losh
38d1bc2312 Fix minor style nit for file consistency. 2009-01-21 17:34:14 +00:00
Warner Losh
3cb54b06bc Make the command reporting be under boot verbose.
Also, report a few other things under boot verbose.
Small style nit to make new code look like old code in this file.
2009-01-21 17:28:24 +00:00
Alexander Motin
1e9d4974c1 Fix copy/paste mistake in variable name. This could lead to using incorrect
bus frequency.
2009-01-21 14:22:06 +00:00
Sam Leffler
b2edeea7fb correct typo that left programmed sifs time in the slot time
(to be applied on subsequent resets)

Submitted by:	Jiri Fojtasek <jiri.fojtasek@hlohovec.net>
2009-01-21 02:53:00 +00:00
Maksim Yevmenkin
c4830de394 Fix typo in comment
Pointed out by:	Daan Vreeken / Daan at vehosting dot nl
2009-01-20 23:25:27 +00:00
Maksim Yevmenkin
127a7d3f89 Update (well, actually rewrite mostly) ng_ubt2 driver for USB2.
Reviewed by:	HPS, alfred
Blessed by:	HPS
2009-01-20 22:17:05 +00:00
Jung-uk Kim
566ca8ca5d - Add support for 8110SCe part. Some magic registers were taken from
Linux driver.
- Swap hardware revisions for 8110S and 8169S as Linux driver claims.

Reviewed by:	yongari (early version)
2009-01-20 20:22:28 +00:00
Jung-uk Kim
aaab4fbea7 Retire RL_FLAG_INVMAR bit to match its comment and reality. 2009-01-20 20:04:09 +00:00
Jung-uk Kim
ff19136537 - Do not read and write RX configuration register multiple times.
- Always program RX configuration register from scratch instead of
doing read/modify/write.
- Rename re_setmulti() to re_set_rxmode() to be reflect reality.
- Simplify hash filter logic a little while I am here.

Reviewed by:	yongari (early version)
2009-01-20 19:58:01 +00:00
Nathan Whitehorn
ed366ae5c8 Set the wrong softc size when defining the ofw_iicbus class. Change it to
the correct value.
2009-01-20 14:06:30 +00:00
Ed Schouten
4873b07e2a Properly implement the VT100 SCS sequences in xterm-mode.
Even though VT100-like devices can display non-ASCII characters, they do
not use an 8-bit character set. Special escape sequences allow the VT100
to switch character maps. The special graphics character set stores the
box drawing characters, starting at 0x60, ending at 0x7e. This means
we now pass the character map tests in vttest, even the save/restore
cursor test, combined with character maps. dialog(1) also works a lot
better now.

This commit also includes some other minor fixes:

- Default to 24 lines in teken_demo when using xterm emulation.
- Make white foreground and background work in teken_demo.
2009-01-20 11:34:28 +00:00
Nathan Whitehorn
f5a78b2f7e Change the probe priority for PCI and I2C generic bus modules from
numerical constants to BUS_PROBE_GENERIC.

Suggested by:	jhb
2009-01-20 00:05:43 +00:00
Andrew Thompson
70e1b678ee Set the pipe pointer before calling usbd_transfer() as its possible for the
xfer callback to be invoked on error.

MFC after:	2 weeks
2009-01-19 21:22:10 +00:00
Alexander Motin
8e097e5b32 Add two more nVidia HDMI codec IDs. 2009-01-19 19:16:50 +00:00
Pyun YongHyeon
96b774f489 Sometimes RTL8168B seems to take long time to access GMII registers
in device attach phase. Double GMII register access timeout value
to fix the issue.

Reported by:	wkoszek
Tested by:	wkoszek
2009-01-19 02:31:27 +00:00
Ed Schouten
fcf1ff110a Don't forget to mark the color translation array as const.
Spotted by:	Christoph Mallon <christoph mallon gmx de>
2009-01-18 09:44:33 +00:00
Andrew Thompson
f2476867dc Just put the ifnet pointer first in the softc like it needs to be rather than
adding another deliciously evil pointer.
2009-01-18 05:35:58 +00:00
Giorgos Keramidas
7efe59806b Add support for CMedia CMI120.
PR:		kern/123640
Approved by:	ariff
MFC after:	2 weeks
2009-01-18 04:29:42 +00:00
Ed Schouten
6cecf41bf7 Fix for my previous commit: color mapping is not 1:1.
Cons25 doesn't seem to use a straight 1:1 mapping to the ANSI colors,
but uses the same color numbers as at least used by syscons on i386. I
suspect if you change the definitions on a different architecture,
things may break? Not sure.

Add a small array to convert syscons-style color codes to ANSI
equivalents, which are used by libteken internally. I didn't notice this
bug, because I only tested my code with black, white and green, all of
them shared the same numbers.
2009-01-17 23:01:40 +00:00
Ed Schouten
ec9037a258 Make vidcontrol's color setting work again.
It turns out I forgot to implement two escape sequences that allows the
user to change the default foreground and background colors. I thought
they were implemented by syscons itself, but vidcontrol just generates
some escape sequences, which get interpreted by the terminal emulator.

Reported by:	mgp (forums)
2009-01-17 22:53:53 +00:00
Alexander Motin
0f9e2596e2 Convert battery capacity/rate from mA to mW only when summary is requested.
Unconditional conversion causes incorrect rate units reported by acpiconf.

MFC after:	2 weeks
2009-01-17 17:40:44 +00:00
Ed Schouten
83409a55ec Allow experimental libteken features to be tested without changing code.
The teken library already supports UTF-8 handling and xterm emulation,
but we have reasons to disable this right now. Because we should make it
easy and interesting for people to experiment with these features, allow
them to be set in kernel configuration files.

Before this commit we had a flag called `TEKEN_CONS25' to enable
cons25-style emulation. I'm calling it the opposite now, `TEKEN_XTERM',
because we want to enable it in kernel configuration files explicitly.

Requested by:	kib
2009-01-17 16:37:13 +00:00
John Baldwin
589d604bf9 Disable decoding of BARs by devices before we trash the value in the BAR
by writing all 1's to it to determine its length.  This fixes issues with
MCFG on at least some machines where a trashed BAR claimed subsequent
attempts at PCI config transactions because the addresses in the MCFG
window fell in the decoding range of the BAR.

In general it is a bad idea to leave the BARs enabled while we are
frobbing with them in this manner.

Sleuthing by:  tegge
MFC after:     1 week
2009-01-16 22:22:30 +00:00
Sam Leffler
5e36f05822 export PSB frequencies 2009-01-16 20:44:45 +00:00
Ed Schouten
ef1a9cf642 Remove unused files from the digi(4) driver.
The digi(4) driver directory contains some files that cannot be checked
out on Windows filesystems. This isn't a big deal, but the files aren't
used anyway.

There are still some other places where checkouts on Windows don't work,
such as VFS_MOUNT.9/vfs_mount.9. This should already be a small
improvement.

MFC after:	1 month
2009-01-16 14:45:48 +00:00
Pyun YongHyeon
3a91ee716b Add hardware MAC statistics support. Also added some reserved
statistics register definition. Users can get current MAC
statistics from dev.msk.%d.stats sysctl node(%d is unit number of
a device).
2009-01-16 08:06:55 +00:00
Nathan Whitehorn
ee9db219df Revert revision 186833 and try a different strategy to allow this device to
work when the bus attaches its own children. Instead of hardcoding a unit
number and returning BUS_PROBE_NOWILDCARD, which will break multiple iicbus
systems, check in the probe routine whether the device address is 0. Real
I2C devices will never have this address, but devices added with
BUS_ADD_CHILD() will.

Requested by:	jhb
Reviewed by:	jhb
2009-01-15 23:14:59 +00:00
Xin LI
bf55aadcb9 Changes to match "Marketing Description" from Broadcom for HP servers.
Submitted by:	davidch
MFC after:	2 months
2009-01-15 22:28:05 +00:00
Takanori Watanabe
3302fb4839 Name the items of xfer array. 2009-01-15 16:04:11 +00:00
Weongyo Jeong
d081353342 fix a ehci's bug that it's occurred when the xfers are aborted under
heavy loads or working.  It looks this bug exists since r158869
so needs to revert a part of the previous.

Reviewed by:	imp
Tested by:	sam
MFC after:	3 weeks
2009-01-15 07:11:14 +00:00
Nathan Whitehorn
3bb481ffb0 Import an Open Firmware I2C bus module. This attaches firmware device tree
indicated I2C devices, and provides an ofw_bus interface for driver probing.
This should be MI, but is currently provided only on PowerPC due to lack of
sparc64 hardware with an I2C controller.

Discussed on:	freebsd-arch
2009-01-15 02:46:43 +00:00
Andrew Thompson
b90eec1bce Name the items in the xfer arrays so they can be identified throughout the
code.
2009-01-15 02:35:40 +00:00
Pyun YongHyeon
85b340cb24 Remove local jumbo locator and switch to UMA backed page allocator
for jumbo frame.
  o Nuke unneeded jlist lock which was used to protect jumbo buffer
    management in local allocator.
  o Added a new tunable hw.mskc.jumbo_disable to disable jumbo
    frame support for the driver. The tunable could be set for
    systems that do not need to use jumbo frames and it would
    save (9K * number of Rx descriptors) bytes kernel memory.
  o Jumbo buffer allocation failure is no longer critical error
    for the operation of msk(4). If msk(4) encounter the allocation
    failure it just disables jumbo frame support and continues to
    work without your intervention.

Using local allocator had several drawbacks such as requirement of
large amount of continuous kernel memory and fixed (small) number
of available buffers. The need for large continuous memory resulted
in failure of loading driver with kldload on running systems.
Also small number of buffer used in local allocator showed poor
performance for some applications.
2009-01-14 05:08:52 +00:00
Pyun YongHyeon
f9ad2b2f3c Correct frame length argument of in_cksum_skip. While I'm here
remove intermediate variable csum.

Reported by:	Kim Culhan < w8hdkim <> gmail DOT com >
Tested by:	Kim Culhan < w8hdkim <> gmail DOT com >
2009-01-14 04:47:04 +00:00
Xin LI
d337638129 Remove intermediate variable busaddr and have bus_* operate directly on
softc members upon initialization.

Reviewed by:	davidch
MFC after:	1 month
2009-01-13 23:46:45 +00:00
Alexander Motin
a1cfce010b Correct spelling in comment. 2009-01-13 23:03:07 +00:00
Alexander Motin
12f2031fd5 Improve AD1983 codec support:
- force playback via mixer to get PCM volume control,
 - make cleanup on recoring source selection.
2009-01-13 22:10:01 +00:00
Andrew Thompson
a8e4c71c30 Restore the if_*var.h and if_*reg.h to their original names, they dont need to
be different.
2009-01-13 21:18:14 +00:00
Andrew Thompson
33ec76e402 Sync to p4 156093
- Add quirks for Parallels

These snuck in as part of a perforce IFC.
2009-01-13 19:14:51 +00:00
Andrew Thompson
fc577776dc Regen. 2009-01-13 19:07:23 +00:00
Andrew Thompson
d9e340a1af MFp4: //depot/projects/usb@156055
Compile fix for AVR-GCC

Submitted by: Hans Petter Selasky
2009-01-13 19:05:51 +00:00
Andrew Thompson
922dd044db MFp4: //depot/projects/usb@156005
Add missing set frame data pointer call. The
	function call was missed when zero copy was
	introduced in UMASS.
	Reported by: WATANABE Kazuhiro.

Submitted by: Hans Petter Selasky
2009-01-13 19:05:20 +00:00
Andrew Thompson
0239859bda MFp4: //depot/projects/usb@155957
Make code more compliant with SuperSpeed USB and Wireless USB.

Submitted by: Hans Petter Selasky
2009-01-13 19:04:58 +00:00
Andrew Thompson
1697b02185 MFp4: //depot/projects/usb@155948
Remove duplicate USB device ID's. These ID's are already
	present in the U3G driver.
	Reported by: Paul-Henning Kamp.

Submitted by: Hans Petter Selasky
2009-01-13 19:04:48 +00:00
Andrew Thompson
9d2f688aa3 MFp4: //depot/projects/usb@155936
Save an USB transfer in UHUB driver by using
	the builtin clear-stall mechanism.

Submitted by: Hans Petter Selasky
2009-01-13 19:04:37 +00:00
Andrew Thompson
2c8e37aa5c MFp4: //depot/projects/usb@155923
Fix remaining xfer->udev variable changes.

Submitted by: Hans Petter Selasky
2009-01-13 19:04:12 +00:00
Andrew Thompson
62005a2d11 MFp4: //depot/projects/usb@155917
Remove dependancy towards the USB config thread in
	the USB serial core. Use USB process msignalling
	instead. Saves a little memory and hopefully makes
	the code more understandable.

Submitted by: Hans Petter Selasky
2009-01-13 19:03:47 +00:00
Andrew Thompson
3fa39bbbed MFp4: //depot/projects/usb@155906
Remove "vbus_interrupt" method from bus methods and use
	a global function instead for the various drivers using it.
	The reason for the removal is to simplify the code.

Submitted by: Hans Petter Selasky
2009-01-13 19:03:33 +00:00
Andrew Thompson
edf1048c85 MFp4: //depot/projects/usb@155842
Reduce the number of callback processes to 4 per
	USB controller. There are two rough categories:
	1) Giant locked USB transfers.
	2) Non-Giant locked USB transfers.
	On a real system with many USB devices plugged in the
	number of processes reported by "ps auxw | grep USBPROC"
	was reduced from 40 to 18.

Submitted by: Hans Petter Selasky
2009-01-13 19:03:23 +00:00
Andrew Thompson
13bd84042e MFp4: //depot/projects/usb@155839
This change is about removing three fields from "struct usb2_xfer"
	which can be reached from "struct usb2_xfer_root" instead and cleaning
	up the code after this change. The fields are "xfer->udev",
	"xfer->xfer_mtx" and "xfer->usb2_sc". In this process the following
	changes were also made:
	Rename "usb2_root" to "xroot" which is short for "xfer root".
	Rename "priv_mtx" to "xfer_mtx" in USB core.
	The USB_XFER_LOCK and USB_XFER_UNLOCK macros should only be used in
	the USB core due to dependency towards "xroot". Substitute macros
	for the real lock in two USB device drivers.

Submitted by: Hans Petter Selasky
2009-01-13 19:03:12 +00:00
Andrew Thompson
f892798d89 MFp4: //depot/projects/usb@155834
Factor out roothub process into the USB bus structure for
	all USB controller drivers. Essentially I am trying to
	save some processes on the root HUB and get away
	from the config thread pradigm. There will be a follow up
	commit where the root HUB control and interrupt callback
	will be moved over to run from the roothub process.
	Total win: 3 processes become 1 for every USB controller.

Submitted by: Hans Petter Selasky
2009-01-13 19:03:01 +00:00
Andrew Thompson
ee6d7582e9 MFp4: //depot/projects/usb@155829
Code style changes requested by:
	M. Warner Losh

Submitted by: Hans Petter Selasky
2009-01-13 19:02:50 +00:00
Andrew Thompson
cba1b53d88 MFp4: //depot/projects/usb@155820
USB memory usage reduction patch.

Submitted by: Hans Petter Selasky
2009-01-13 19:02:40 +00:00
Andrew Thompson
f3396b74be MFp4: //depot/projects/usb@155810
Usability improvement. Make sure that setting
	power mode ON resurrects the device if powered OFF.
	Reported by: Alexander Best.

Submitted by: Hans Petter Selasky
2009-01-13 19:02:30 +00:00
Andrew Thompson
abc96a038c MFp4: //depot/projects/usb@155759
Optimise: Remove extra flush calls.

Submitted by: Hans Petter Selasky
2009-01-13 19:02:07 +00:00
Andrew Thompson
90de96dd02 MFp4: //depot/projects/usb@155755
Fix a race causing the explore thread to
	hang when tearing down USB transfers at
	detach.

Submitted by: Hans Petter Selasky
2009-01-13 19:01:56 +00:00
Andrew Thompson
a767337039 MFp4: //depot/projects/usb@155754
Make sure that the cancelled error code
	is always checked and result in a return
	from the USB callback.

Submitted by: Hans Petter Selasky
2009-01-13 19:01:46 +00:00
Andrew Thompson
204793b247 MFp4: //depot/projects/usb@155750
Patch to resolve problems with power mode off.
	Reported by Alexander Best.

Submitted by: Hans Petter Selasky
2009-01-13 19:01:35 +00:00
Andrew Thompson
92346917b1 MFp4: //depot/projects/usb@155748
Umass module quirk from Alexander Best
	to support Meizu Electronics MiniPlayer.

Submitted by: Hans Petter Selasky
2009-01-13 19:01:25 +00:00
Andrew Thompson
dbd7373cc6 MFp4: //depot/projects/usb@155730
Config index should be zero. Reported by:
	Stanislav Sedov

Submitted by: Hans Petter Selasky
2009-01-13 19:01:03 +00:00
Andrew Thompson
20c2956049 MFp4: //depot/projects/usb@155869
Initial version of ATMEGA USB device controller
	driver. Has not been tested on real hardware yet.
	The driver is based upon the AT91DCI driver.

Submitted by: Hans Petter Selasky
2009-01-13 18:49:35 +00:00
Alexander Motin
01dd74a1ed Change configuration order to enable output only after codec is configured.
Mute all mixer controllable amplifiers initially to let mixer to unmute
only some of them later. This should reduce clicks and noises during boot.
2009-01-13 16:27:04 +00:00
Xin LI
c47f7fff79 Add several HP OEM parts' PCI IDs.
MFC after:	2 months
2009-01-13 07:12:32 +00:00
Sam Leffler
694be3e533 On some platforms touching the bb registers when the phy is powered
down will cause a fault.  Check the phy power state before possibly
reading from the bb, this can happen as ar5212Reset intentionally
calls ar5212GetRfgain before bringing the bb out of reset (but we
do it here and not in the caller to guard against other possible uses).
2009-01-13 05:50:22 +00:00
George V. Neville-Neil
6df8576005 Fix a cut/paste bug which prevents us from setting the average
latency tunable.

Reviewed by:	jfv
MFC after:	1 day
2009-01-13 00:10:50 +00:00
Takanori Watanabe
e71400183d More usb2 foma driver update.
1. Export usb serial port unit number as sysctl.
2. Fix bug on handsfree port.
2009-01-12 20:13:14 +00:00
David E. O'Brien
b5d54ecafa Fix issue where ata_atapicmd() can never really return EBUSY which is
expected in acd_fixate().

This should fix various problems folks are having with 'burncd' reporting
"burncd: ioctl(CDRIOCFIXATE): Input/output error" during the fixate phase
when "fixate" is issued together with the "data" command.

PR:		95979
Submitted by:	Jaakko Heinonen <jh@saunalahti.fi>
2009-01-12 17:18:58 +00:00
Andrew Thompson
1e736167a5 Provide a NDIS tx power level converstion to/from net80211, this uses a loookup
table to approximate mW<->dBM.

Submitted by:	Paul B. Mahol
2009-01-12 17:15:09 +00:00
Jung-uk Kim
7dcbc463ef Add support for AMD64 Family 10h processors.
PR:		kern/128331
MFC after:	3 days
2009-01-12 16:07:03 +00:00
Andrew Thompson
304764936f Remove unneeded includes. 2009-01-11 19:41:38 +00:00
Alexander Motin
56035520b7 Fix unwanted crosschannel mixing, possible on some codecs like
VIA VT1708B and Realtek ALC268.
2009-01-11 12:04:18 +00:00
Alexander Motin
530a1aa636 OSS tools expect EINVAL for unsupported ioctls, but not ENXIO. 2009-01-10 21:38:37 +00:00
Alexander Motin
609c69b731 Make devnode include full device path.
This makes OSSv4 osstest tool work.
2009-01-10 20:49:15 +00:00
Alexander Motin
ccaaa74562 Remove debug slipped with the previous commit. 2009-01-10 19:01:29 +00:00
Alexander Motin
52f6e09e09 Import some new constants and structures fields from OSSv4.
Implement some OSSv4 ioctls to make ossinfo tool work and print
something reasonable.
2009-01-10 18:19:22 +00:00
Edward Tomasz Napierala
a9ebb31183 Add the possibility to specify "-o force" with "mdconfig -du".
Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
2009-01-10 17:17:18 +00:00
Alexander Motin
7f7de27152 Add one more bunch of controller and codec IDs. 2009-01-10 14:14:00 +00:00
Andrew Thompson
43e2612a8e Readd the Alcor Transcend device which is referenced in usb2/storage/umass2.c,
regenerate the usb2 dev tables for the scanner additions while I am here.
2009-01-09 04:38:22 +00:00
Weongyo Jeong
c862b05ba7 fix a typo to set the 48Mbps data rate.
PR:		kern/130189
Submitted by:	Paul B. Mahol <onemda_at_gmail.com>
Reviewed by:	sam
MFC after:	3 weeks
2009-01-09 02:31:51 +00:00
Alexander Motin
78bb0fa358 Add external connector jack color into widget names.
It should help users to identify them while reading verbose messages.
2009-01-08 19:43:47 +00:00
Nathan Whitehorn
4fb52093a8 Improve the AT keyboard emulation of the ADB keyboard driver, by supporting
an AT-like K_RAW mode instead of just K_CODE. This has the effect of making
the arrow keys on ADB keyboards work in X11.

Copied from: sunkbd(4)
2009-01-08 17:47:45 +00:00
Edward Tomasz Napierala
02caf36ee1 Make "kldunload atapicam" return EBUSY instead of deadlocking when a device
created by atapicam is being kept opened or mounted.  This is probably just
a temporary solution until we invent something better.

Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
Reported by:	Jaakko Heinonen
2009-01-08 17:26:51 +00:00
Sam Leffler
10ad9a77f3 TDMA support for long distance point-to-point links using ath devices:
o add net80211 support for a tdma vap that is built on top of the
  existing adhoc-demo support
o add tdma scheduling of frame transmission to the ath driver; it's
  conceivable other devices might be capable of this too in which case
  they can make use of the 802.11 protocol additions etc.
o add minor bits to user tools that need to know: ifconfig to setup and
  configure, new statistics in athstats, and new debug mask bits

While the architecture can support >2 slots in a TDMA BSS the current
design is intended (and tested) for only 2 slots.

Sponsored by:	Intel
2009-01-08 17:12:47 +00:00
Rafal Jaworowski
885f8b20e6 Provide handler for USB controller error interrupts for Marvell EHCI device.
Obtained from:	Semihalf
2009-01-08 13:32:08 +00:00
Rafal Jaworowski
d0bc717a43 De-hard code UART speed setting for Marvell SOCs when hw.uart.console is not
specified. Instead, let uart(4) fall back to whatever speed firmware has set.
2009-01-08 13:24:25 +00:00
Rafal Jaworowski
8e1dc58e8c Handle mge(4) chip revision differences at run-time rather then compile time,
which is more flexible for future revisions, and lets eliminate some #defines
and compile conditionals.

Obtained from:	Semihalf
2009-01-08 11:09:27 +00:00
Takanori Watanabe
f9965aa640 Make ufoma2 driver work.
1.Sync TD on close to ensure USB request in close callback issued.
2.Add sysctls to indicate device role.
3.Enable handsfree port support.

Now modem port and obex port works well.
Handsfree port works but not with good response.
2009-01-08 05:10:03 +00:00
Pyun YongHyeon
e2157cf706 Always check whether dma map is valid before unloading the map.
When fxp(4) intializes Rx buffers for the first time, there is no
loaded dma map so attempting to unload it is an invalid operation.
2009-01-08 04:26:44 +00:00
Sam Leffler
5f82a460f8 correct fixed rate handling; the rixmap was changed a while back
to be indexed by the ieee rate code
2009-01-07 23:30:26 +00:00
Marius Strobl
7ee3780799 Make the whole initiator mode part of mpt(4) endian-clean,
specifically SPI controllers now also work in big-endian
machines and some conversions relevant for FC and SAS
controllers as well as support for ILP32 machines which all
were omitted in previous attempts are now also implemented.
The IOCTL-interface is intentionally left (and where needed
actually changed) to be completely little-endian as otherwise
we would have to add conversion code for every possible
configuration page to mpt(4), which didn't seem the right
thing to do, neither did converting only half of the user-
interface to the native byte order.
This change was tested on amd64 (SAS+SPI), i386 (SAS) and
sparc64 (SAS+SPI). Due to lack of the necessary hardware
the target mode code is still left to be made endian-clean.

Reviewed by:	scottl
MFC after:	1 month
2009-01-07 21:52:47 +00:00
Marius Strobl
3da80d3a0e Check the return values of contigmalloc(9) as well as bus_dma(9)
functions and stop attaching of dcons(4) and dcons_crom(4) if
they indicate failure. This fixes a panic seen on sparc64 machines
with no free physical memory in the requested 32-bit region but
still doesn't make dcons(4)/dcons_crom(4) these work. I think
the latter can be fixed by simply specifying ~0UL as the upper
limit for contigmalloc(9) and letting the bounce pages and the
IOMMU respectively handle limitations of the DMA engine. I didn't
want to change that without the consensus of simokawa@ though,
who unfortunately didn't reply so far.

MFC after:	1 week
2009-01-07 21:25:44 +00:00
Alexander Motin
c412d503cf Add some new oss_sysinfo structure fields from OSSv4. 2009-01-07 21:12:33 +00:00
Rong-En Fan
fb898a2cc2 - Remove snd_au88x0 which seems never got compiled into kernel nor as a kernel
module. These files cause manual interaction when building
  ports/audio/aureal-kmod which provides a usable i386-only driver (it requires
  linking against some linux object files distributed by vendor which bankrupted
  back in 2000).

MFC after:	1 week
2009-01-07 03:15:22 +00:00
Nathan Whitehorn
789c4b9d08 Change the way I2C bus attachment works to allow firmware-assisted bus
subclasses as are available with PCI. Changes I2C device drivers without
real probe logic to return BUS_PROBE_NOWILDWARD to avoid interference with
firmware bus enumeration, and reduces the probe priority of the iicbus
base driver to allow subclass attachment at higher priority.

Discussed on:	freebsd-arch
2009-01-06 17:23:37 +00:00
Edward Tomasz Napierala
67c6f956b1 Add workaround for Parallels 4.0. Without it, ehci and uhci drivers
would fail to attach due to unsupported USB revision.  It should have
no effect when running on a real hardware.

Reviewed by:	imp
Approved by:	rwatson (mentor)
2009-01-06 09:03:02 +00:00
Sam Leffler
50666d87db remove the ath_rate module dependency; it's all bundled 2009-01-06 01:58:45 +00:00
Sam Leffler
34b8d7d479 remove module glue, it's not used any more 2009-01-06 01:36:36 +00:00
Ed Schouten
2056b4c79b Import yet some more small fixes to libteken sources:
- Implement NP (ASCII 12, Form Feed). When used with cons25, it should
  clear the screen and place the cursor at the top of the screen. When
  used with xterm, it should just simulate a newline.

- When we want to use xterm emulation, make teken_demo set TERM to
  xterm.

Spotted by:	Paul B. Mahol <onemda@gmail.com>
2009-01-05 22:09:46 +00:00
Warner Losh
1f97c78986 First cut at fixing memory mapping botch. Nobody must use the ray(4)
driver since it couldn't have worked with NEWCARD w/o these fixes.
This should allow selecting 16-bit memory width as well (which was
what was broken).
2009-01-05 21:00:22 +00:00
Warner Losh
609729b7a6 Define bits for memory mapping house keeping by bridges. 2009-01-05 20:58:41 +00:00
Ed Schouten
1259994283 Fix rendering glitch in cons25 emulation.
Because we now have cons25-style linewrapping, we must also use cons25-
style reverse linewrapping. This means that a ^H on column 0 will move
the cursor one line up.

Also fix a small regression: if the user invokes a RIS (Reset to Initial
State), we must show the cursor again.

Spotted by:	Paul B. Mahol <onemda gmail com>
2009-01-04 22:24:47 +00:00
Ed Schouten
67ac7fd748 Print control characters, even though they are normally not visible.
With cons25, there are printable characters below 0x1B. This is not the
case with ASCII, UTF-8, etc. but in this case we just have to.

Also don't set LC_CTYPE to UTF-8 when libteken is compiled without UTF-8
in the demo-application.
2009-01-04 00:20:18 +00:00
Alfred Perlstein
d5474fd85f Sync with usb4bsd:
src/lib/libusb20/libusb20_desc.c

Make "libusb20_desc_foreach()" more readable.

src/sys/dev/usb2/controller/*.[ch]
src/sys/dev/usb2/core/*.[ch]

Implement support for USB power save for all HC's.

Implement support for Big-endian EHCI.

Move Huawei quirks back into "u3g" driver.

Improve device enumeration.

src/sys/dev/usb2/ethernet/*[ch]

Patches for supporting new AXE Gigabit chipset.

src/sys/dev/usb2/serial/*[ch]

Fix IOCTL return code.

src/sys/dev/usb2/wlan/*[ch]

Sync with old USB stack.

Submitted by: hps
2009-01-04 00:12:01 +00:00
Ed Schouten
17c98d6dab Resolve some regressions related to tabs and linewrap handling.
It turns out I was looking too much at mimicing xterm, that I didn't
take the differences of cons25 into account. There are some differences
between xterm and cons25 that are important. Create a new #define called
TEKEN_CONS25 that can be toggled to switch between cons25 and xterm
mode.

- Don't forget to redraw the cursor after processing a forward/backward
  tabulation.

- Implement cons25-style (WYSE?) autowrapping. This form of autowrapping
  isn't that nice. It wraps the cursor when printing something on column
  80. xterm wraps when printing the first character that doesn't fit.

- In cons25, a \t shouldn't overwrite previous contents, while xterm
  does.

Reported by:	Garrett Cooper <yanefbsd gmail com>
2009-01-03 22:51:54 +00:00
Nathan Whitehorn
acb97117e3 Fix the OFW interrupt map parser to use its own idea of the number of interrupt
cells in the map, instead of using a value passed to it and then panicing if it
disagrees. This fixes interrupt map parsing for PCI bridges on some Apple
Uninorth PCI controllers.

Reported by:	marcel
Tested on:	G4 iBook, Sun Ultra 5
2009-01-03 19:38:47 +00:00
Marius Strobl
a79bdfef68 Reapply the intpin correction part of r146420 which somehow
got lost.
2009-01-03 14:33:48 +00:00
Christian Brueffer
3514c91e2c Call pcn_start_locked() instead of pcn_start() where the softc lock is
already held.

Approved by:	rwatson (mentor)
MFC after:	3 weeks
2009-01-03 10:56:10 +00:00
Ed Schouten
bfe36bb462 Remove an unneeded assertion in libteken.
The cursor is only inside the scrolling region when we are in origin
mode. In that case, it should use originreg instead of scrollreg. It is
completely valid to place the cursor outside the scrolling region.
2009-01-01 23:22:01 +00:00
Ed Schouten
b4b1c5169d Replace syscons terminal renderer by a new renderer that uses libteken.
Some time ago I started working on a library called libteken, which is
terminal emulator. It does not buffer any screen contents, but only
keeps terminal state, such as cursor position, attributes, etc. It
should implement all escape sequences that are implemented by the
cons25 terminal emulator, but also a fair amount of sequences that are
present in VT100 and xterm.

A lot of random notes, which could be of interest to users/developers:

- Even though I'm leaving the terminal type set to `cons25', users can
  do experiments with placing `xterm-color' in /etc/ttys. Because we
  only implement a subset of features of xterm, this may cause
  artifacts. We should consider extending libteken, because in my
  opinion xterm is the way to go. Some missing features:

  - Keypad application mode (DECKPAM)
  - Character sets (SCS)

- libteken is filled with a fair amount of assertions, but unfortunately
  we cannot go into the debugger anymore if we fail them. I've done
  development of this library almost entirely in userspace. In
  sys/dev/syscons/teken there are two applications that can be helpful
  when debugging the code:

  - teken_demo: a terminal emulator that can be started from a regular
    xterm that emulates a terminal using libteken. This application can
    be very useful to debug any rendering issues.

  - teken_stress: a stress testing application that emulates random
    terminal output. libteken has literally survived multiple terabytes
    of random input.

- libteken also includes support for UTF-8, but unfortunately our input
  layer and font renderer don't support this. If users want to
  experiment with UTF-8 support, they can enable `TEKEN_UTF8' in
  teken.h. If you recompile your kernel or the teken_demo application,
  you can hold some nice experiments.

- I've left PC98 the way it is right now. The PC98 platform has a custom
  syscons renderer, which supports some form of localised input. Maybe
  we should port PC98 to libteken by the time syscons supports UTF-8?

- I've removed the `dumb' terminal emulator. It has been broken for
  years. It hasn't survived the `struct proc' -> `struct thread'
  conversion.

- To prevent confusion among people that want to hack on libteken:
  unlike syscons, the state machines that parse the escape sequences are
  machine generated. This means that if you want to add new escape
  sequences, you have to add an entry to the `sequences' file. This will
  cause new entries to be added to `teken_state.h'.

- Any rendering artifacts that didn't occur prior to this commit are by
  accident. They should be reported to me, so I can fix them.

Discussed on:	current@, hackers@
Discussed with:	philip (at 25C3)
2009-01-01 13:26:53 +00:00
Luigi Rizzo
e051c32c9b add some USB scanner IDs for recent Epson multifunction devices.
Add support to uscanner.c for known-working devices
(the same should be done for uscanner2.c).

Waiting for 7.1 to be released before the merge.

MFC after:	3 weeks
2008-12-31 14:25:14 +00:00
Warner Losh
a84736bdf6 When no driver attaches to a card, don't power down the card. We can
now read config registers of cardbus cards that are inserted, but
aren't attached to a driver.
Also, add a power related comment...
2008-12-31 07:41:42 +00:00
Kip Macy
3a6d1fcf9c merge 186535, 186537, and 186538 from releng_7_xen
Log:
 - merge in latest xenbus from dfr's xenhvm
 - fix race condition in xs_read_reply by converting tsleep to mtx_sleep

Log:
 unmask evtchn in bind_{virq, ipi}_to_irq

Log:
 - remove code for handling case of not being able to sleep
 - eliminate tsleep - make sleeps atomic
2008-12-29 06:31:03 +00:00
Stanislav Sedov
d85f3935ec - Fix incorrect array declaration that was causing the stack overflow
on some (most?) Asus laptops.

Discussed with:	rpaulo
Approved by:	kib (mentor)
MFC after:	2 weeks
2008-12-27 20:48:11 +00:00
Alexander Kabaev
7d376cbce3 Minor style(9) compliance change. 2008-12-27 16:03:34 +00:00
Roman Kurakin
11a12794a9 Add support for the Oxford OX16PCI958-based card.
Note, that the patch provided with this card for the Linux states that
the card uses DEFAULT_RCLK * 2, while in fact it is '* 10'.  So probably
we should also use the subdevice/subvendord here. For now just ignore
that fact.

PR:		kern/129665
Submitted by:	bsam
Obtained from:	united efforst with bsam
2008-12-27 15:22:22 +00:00
Bjoern A. Zeeb
44a2eb509f Remove an unused variable to make the SENTRY5 mips kernel compile
(though with some asm warning).
2008-12-27 11:38:41 +00:00
Alexander Motin
f496eee7e3 Add some found NVidia MCP7x HDA controller IDs. 2008-12-27 11:00:20 +00:00
Weongyo Jeong
b3974c00b5 Integrate the NDIS USB support code to CURRENT.
Now the NDISulator supports NDIS USB drivers that it've tested with
devices as follows:

  - Anygate XM-142 (Conexant)
  - Netgear WG111v2 (Realtek)
  - U-Khan UW-2054u (Marvell)
  - Shuttle XPC Accessory PN20 (Realtek)
  - ipTIME G054U2 (Ralink)
  - UNiCORN WL-54G (ZyDAS)
  - ZyXEL G-200v2 (ZyDAS)

All of them succeeded to attach and worked though there are still some
problems that it's expected to be solved.

To use NDIS USB support, you should rebuild and install ndiscvt(8) and
if you encounter a problem to attach please set `hw.ndisusb.halt' to
0 then retry.

I expect no changes of the NDIS code for PCI, PCMCIA devices.

Obtained from:  //depot/projects/ndisusb/...
2008-12-27 08:03:32 +00:00
Alexander Motin
3f4f72bf2b Add some special handling for AD1986A codec:
Disable some unneeded pathes in overcomplicated input mixer to help parser
to handle the rest better. This gives mic input boost control in some
configurations and just more predictable operation in others.
2008-12-26 22:47:11 +00:00
Weongyo Jeong
46e6dd8ffb fix a silly bug that I missed a for-loop to initialize AL2230S PHY.
Reported by:    Hans Petter Selasky <hselasky_at_c2i.net>
2008-12-25 04:29:40 +00:00
Sam Leffler
370e677c29 must pack structures for architectures like arm
Reviewed by:	thompsa
2008-12-24 06:59:07 +00:00
Robert Noland
b2dc68697e Only set registers if irqs are enabled
Approved by:	kib
Obtained from:	drm git
2008-12-23 22:53:57 +00:00
Andrew Thompson
ac4b4c24ac Remove CALLOUT_RETURNUNLOCKED from the callouts, there is no reason for them to
drop the lock for us.
2008-12-23 19:59:21 +00:00
Sam Leffler
cd5c694a56 move IXP4XX EHCI bus shim to the usb directory and rename 2008-12-23 17:40:02 +00:00
Andrew Thompson
cf4d7cfcc5 Name the bus mutex by the controller name, this allows each bus to be
distinguished in lock profiling, etc.
2008-12-23 17:36:25 +00:00
Robert Noland
fc25498ad9 Fix up handling of Intel G4X chips some more.
Note that you need at least xf86-video-intel 2.4.3 for this to work.
The G4X doesn't put the GATT into the same area of stolen memory
as all the other chips and older versions of the driver didn't
handle that properly.

Tested by:	ganbold
Approved by:	kib
MFC after:	2 weeks
2008-12-23 16:16:30 +00:00
Konstantin Belousov
fc72031c5d Clear busy state on the pages which are after the one that failed the bind
attempt.

Reported and tested by:	ganbold
Reviewed by:	rnoland
MFC after:	2 weeks
2008-12-23 16:04:33 +00:00
Alexander Motin
51a8e5f0c3 Organize Conexant codecs.
Add CX20561 (Hermosa) codec ID.
2008-12-23 14:58:08 +00:00
Remko Lodder
05534ba77d Add support for the HP 4470C scanner.
Note that there is no working backend (or at least
that is mentioned in the PR ticket) but the device
is now supported on our end.

PR:		117205
Submitted by:	Artem Naluzhnyy <tut at nhamon dot com dot ua>
MFC after:	1 week
2008-12-23 13:09:17 +00:00
Remko Lodder
e39a1e71cd Add support for the MaxSream USB test carrier.
PR:		117546
Submitted by:	Daniel J. O'Connor <darius at midget dot dons dot net
dot au>
MFC after:	1 week
2008-12-23 12:44:18 +00:00
Remko Lodder
12ca024e73 Add support for 2 EVDO devices.
PR:		119150
Submitted by:	lioux
MFC after:	1 week
2008-12-23 12:15:21 +00:00
Sam Leffler
405fc730ef o add Transaction Translator support (still missing ISOC xfers)
o add EHCI_SCFLG_BIGEMMIO flag to force big-endian byte-select to be
  set in USBMODE
o split reset work into new public routine ehci_reset so bus shim drivers
  can force big-endian byte-select before ehci_init
2008-12-23 04:42:10 +00:00
Alexander Motin
fd9c95bdab Add 9 more Analog Devices codec names. 2008-12-22 22:40:17 +00:00
Pyun YongHyeon
0fe200d953 Since we don't request reset for rlphy(4), the link state 'UP'
event from mii(4) may not be delivered if valid link was already
established. To address the issue, check current link state after
driving MII_TICK. This should fix a regression introduced in
r185753 on fast ethernet controllers.

Reported by:	csjp, Bruce Cran < bruce <> cran DOT org DOT uk >
Tested by:	csjp, Bruce Cran (initial version)
2008-12-22 00:46:22 +00:00
Robert Noland
241dd5673c Convert DRM_[DEBUG,ERROR,INFO] macros to c99 __VA_ARGS__.
Approved by:	kib
2008-12-21 22:32:01 +00:00
Robert Noland
213ab42e6b Deal with 0 length args...
Approved by:	kib
2008-12-21 22:30:37 +00:00
Robert Noland
b02ae948bb Fix AGP_DEBUG macro to use c99 __VA_ARGS__ and build if enabled.
Approved by:	kib
2008-12-21 22:00:39 +00:00
Sam Leffler
e43c1fe0bc o add sys/endian.h now required by ehcivar.h
o reorder a couple of include's to make this consistent with pci code
2008-12-20 17:55:37 +00:00
Sam Leffler
43d44e8a31 fix build w/ EHCI_DEBUG 2008-12-20 05:56:08 +00:00
Sam Leffler
bfa98d2bd1 Merge usb changes for Gateworks Cambria boards:
o add support to byte swap EHCI descriptor contents; the IXP435
  has dual-EHCI controllers integral but descriptor contents are
  in big-endian format; this support is configured with the
  USB_EHCI_BIG_ENDIAN_DESC option and enabled with EHCI_SCFLG_BIGEDESC
o clean up EHCI USBMODE register setup during init; add #defines for
  bit values
o split debug support out into a new file and enable use through ddb
o while here remove a bunch of lingering netbsd-isms

Reviewed by:	imp
2008-12-20 03:02:32 +00:00
Sam Leffler
41fe50f5de MFH @ 186335 2008-12-20 01:29:19 +00:00
Nathan Whitehorn
91416fb268 Modularize the Open Firmware client interface to allow run-time switching
of OFW access semantics, in order to allow future support for real-mode
OF access and flattened device frees. OF client interface modules are
implemented using KOBJ, in a similar way to the PPC PMAP modules.

Because we need Open Firmware to be available before mutexes can be used on
sparc64, changes are also included to allow KOBJ to be used very early in
the boot process by only using the mutex once we know it has been initialized.

Reviewed by:    marius, grehan
2008-12-20 00:33:10 +00:00
Pyun YongHyeon
69d6a6aafc Fix a typo.
Submitted by:	clemens fischer via Shigeaki Tagashira
2008-12-20 00:04:04 +00:00
Sam Leffler
af945736cf Correct 5212 ani support so that max noise immunity, spur immunity, and
step levels are used.

Noticed by:	Jiri Fojtasek <jiri.fojtasek@hlohovec.net>
Reviewed by:	rpaulo
2008-12-19 18:33:53 +00:00
Alexander Motin
9678919ba4 Add ULI M5461 chipset and vendor ID. 2008-12-18 22:04:13 +00:00
Robert Noland
73e1b34a9e Garbage collect entries from pcireg.h since we now include it.
Approved by:	kib@
MFC after:	2 weeks
2008-12-18 22:01:46 +00:00
Robert Noland
c9e7b21284 We only want drm to ever attach to the primary pci device.
Intel 855 chips present the same pci id for both heads.  This prevents
us from attaching to the dummy second head.  All other chips that I
am aware of either only present a single pci id, or different ids
for each head so that we only match on the correct head.

Approved by:	kib@
MFC after:	2 weeks
2008-12-18 21:58:57 +00:00
Alexander Motin
f6550fad4d Before modularization commit, atapci driver was attaching only to devices of
storage class. This check was lost. It is not important for the most cases,
but as it was reported on current@, it does important for sis driver and
surely inportant for AHCI driver. So restore it there.

Submitted by:   Toshikazu ICHINOSEKI, Andrey V. Elsukov
Discussed on:   current@
2008-12-18 21:13:46 +00:00
Robert Noland
8b8df0ff61 rework drm_scatter.c which allocates scatter / gather pages for use by
ati pci gart to use bus_dma to handle the allocations.  This fixes
a garbled screen issue on at least some radeons (X1400 tested).  It is
also likely that this is the correct fix for PR# 119324, though that
is not confirmed yet.

Reviewed by:	jhb@ (mentor, prior version)
Approved by:	kib@
MFC after:	2 weeks
2008-12-18 21:04:50 +00:00
Andrew Thompson
b461c84caf Fix last commit, ttydisc_rint_bypass returns the total, not remainder. 2008-12-18 19:15:25 +00:00
Andrew Thompson
59a34231a4 Attempt to handoff the entire buffer with ttydisc_rint_bypass() before banging
each char separately.
2008-12-18 19:08:19 +00:00
George V. Neville-Neil
837f41b067 Check in the actual module recognition code for the Chelsio
driver.

Obtained from:	Chelsio Inc.
2008-12-18 14:21:35 +00:00
Pyun YongHyeon
68f4ab9aa3 It seems that we don't need to reserve a TBD to set total TCP
payload length in TSO case. Leaving unused TBD also seem to cause
SCB timeouts under certain conditions when TSO/non-TSO traffics
are active at the same time.
2008-12-18 01:36:46 +00:00
Alexander Motin
3ad8744168 Improve error handling at ata_ahci_chipinit().
Submitted by:	Andrey V. Elsukov
2008-12-17 19:17:58 +00:00
Bjoern A. Zeeb
dcdb4371ca Use inc_flags instead of the inc_isipv6 alias which so far
had been the only flag with random usage patterns.
Switch inc_flags to be used as a real bit field by using
INC_ISIPV6 with bitops to check for the 'isipv6' condition.

While here fix a place or two where in case of v4 inc_flags
were not properly initialized before.[1]

Found by:	rwatson during review [1]
Discussed with:	rwatson
Reviewed by:	rwatson
MFC after:	4 weeks
2008-12-17 12:52:34 +00:00
Jean-Sébastien Pédron
c9d986fe54 Synaptics touchpads must be reinitialized after suspend/resume.
This fixes touchpad resume on Asus EeePC among others.

Submitted by:	rpaulo
2008-12-17 10:42:53 +00:00
Pyun YongHyeon
818951afd8 It seems that RealTek PCIe controllers require an explicit Tx poll
command whenever Tx completion interrupt is raised. The Tx poll
bit is cleared when all packets waiting to be transferred have been
processed. This means the second Tx poll command can be silently
ignored as the Tx poll bit could be still active while processing
of previous Tx poll command is in progress.
To address the issue re(4) used to invoke the Tx poll command in Tx
completion handler whenever it detects there are pending packets in
TxQ. However that still does not seem to completely eliminate
watchdog timeouts seen on RealTek PCIe controllers. To fix the
issue kick Tx poll command only after Tx completion interrupt is
raised as this would indicate Tx is now idle state such that it can
accept new Tx poll command again. While here apply this workaround
for PCIe based controllers as other controllers does not seem to
have this limitation.

Tested by:	Victor Balada Diaz < victor <> bsdes DOT net >
2008-12-17 08:18:11 +00:00
Pyun YongHyeon
61f45a7222 For RTL8168C SPIN2 controllers, make sure to take the controller
out of sleep mode prior to accessing to PHY. This should fix device
attach failure seen on these controllers. Also enable the sleep
mode when device is put into sleep state.

PR:	kern/123123, kern/123053
2008-12-17 06:01:03 +00:00
Edward Tomasz Napierala
41c8b468e6 Fix forced mdconfig -du. E.g. the following would previously
result in panic:

mdconfig -af blah.img -o force
mount /dev/md0 /mnt
mdconfig -du 0

Reviewed by:	scottl
Approved by:	rwatson (mentor)
Sponsored by:	FreeBSD Foundation
2008-12-16 20:59:27 +00:00
Alexander Motin
cb33306f41 Call ata_legacy() only once on attach and save it's result. Scanning PCI
configuration registers (which are not going to change) on every interrupt
looks expensive, especially when interrupt is shared. Profiling shows me 3%
of time spent by atapci0 on pure network load due to IRQ sharing with em0.
2008-12-16 16:04:40 +00:00
Joseph Koshy
8d8b174004 Bug fixes:
- Initialize variables before use.
- Remove a KASSERT() that could falsely trigger if there are other sources
  of NMIs in the system.

Efficiency tweak:
- When checking PMCs that overflowed, ignore PMCs that were not configured for
  sampling.
2008-12-16 11:04:02 +00:00
Jean-Sébastien Pédron
e3c46ebb60 Rephrase and/or fix some comments in Synaptics touchpad initialization
function.
2008-12-16 09:51:13 +00:00
Xin LI
204cbef71b Don't count InFramesL2FilterDiscards into Ierr. This value does not represent
a real packet error but simply indicate that an unexpected unicast or multicast
error was received by the NIC, which was not counted in the past as well.

Reported by:	many (on -stable@)
Reviewed by:	davidch
MFC after:	3 days
2008-12-16 05:03:22 +00:00
Xin LI
6fca90a0f9 Test whether sc->tx_mbuf_map[i], not whether sc->tx_mbuf_map is NULL before
doing bus_dmamap_sync() since it operates on the former, not the latter.

Reviewed by:	davidch
2008-12-16 04:59:04 +00:00
Alexander Motin
1bc133fee9 Add some HDMI codec IDs. 2008-12-16 00:08:51 +00:00