summaryrefslogtreecommitdiffstats
path: root/sys/dev
Commit message (Collapse)AuthorAgeFilesLines
* Overhaul regulatory support:sam2009-01-2838-3423/+2411
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Last step of splitting up minor and unit numbers: remove minor().ed2009-01-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 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.
* change ic_getradiocaps driver callback to include the max # channelssam2009-01-271-2/+2
| | | | so callers know the size of the array passed down
* Fix the input buffer at 1024. The previous calculated buffer sizen_hibma2009-01-271-5/+6
| | | | | | 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?).
* - Add support for Moxa Technologies CP-168EL/PCIe card.stas2009-01-271-0/+6
| | | | | Submitted by: dmarck MFC after: 1 week
* - Add support for nehalem/corei7 cpus. This supports all of the corejeff2009-01-273-53/+838
| | | | | | | | counters defined in the reference manual. It does not support the 'uncore' events. Reviewed by: jkoshy Sponsored by: Nokia
* Clean up ng_ubt2. Get rid of excessive use of NG_NODE_REF/UNREF().emax2009-01-262-503/+244
| | | | | | | | | 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
* Don't unlock the parent ppc lock until after releasing the ppbus.jhb2009-01-261-1/+1
| | | | Submitted by: csjp
* MFp4 //depot/projects/usb/ @156706thompsa2009-01-261-6/+10
| | | | | | Adjust an UHCI portreset delay. Submitted by: Hans Petter Selasky
* Regen.thompsa2009-01-262-2/+46
|
* MFp4 //depot/projects/usb/ @156522,156530thompsa2009-01-263-1/+36
| | | | | | | UHCI SOF Quirk. Makes some broken USB devices work again. Reported by several people. Patch made by me. Submitted by: Hans Petter Selasky
* MFp4 //depot/projects/usb/ @156521thompsa2009-01-261-22/+50
| | | | | | | U3G regression issue. Patch to support multiple modem instances per logical USB interface. Submitted by: Hans Petter Selasky
* Fix up USB_GET_REPORT_DESC ioctl.thompsa2009-01-261-1/+1
| | | | Submitted by: daichi
* Add umass quirk.thompsa2009-01-262-0/+5
| | | | Submitted by: Hans Petter Selasky
* Add a usb hid quirk.thompsa2009-01-262-0/+2
| | | | Submitted by: Andre Guibert de Bruet
* Specify analog beep pin widget for several AD codecs.mav2009-01-261-1/+8
| | | | It gives working speaker control for that systems.
* Change the way our softc is stored to use the devinfo facility provided by pcmnwhitehorn2009-01-264-27/+20
| | | | | | | instead of the regular device softc interface. This brings the AOA driver in line with the other pcm drivers. Requested by: ariff
* Add missing locking around setting the ppc interrupt handler IVAR.jhb2009-01-261-0/+2
| | | | Reported by: many
* Teach iic(4) the 'repeated start' I2C condition. This will be used by theraj2009-01-262-0/+6
| | | | | | | upcoming i2c(8) diag utility. Reviewed by: bms, stas Obtained from: Semihalf
* Add support for the I2S and davbus audio controllers found in Apple PowerPCnwhitehorn2009-01-257-0/+2953
| | | | | | hardware. Submitted by: Marco Trillo
* Remove unneeded checks of device unit number from speaker(4).ed2009-01-251-18/+9
| | | | | Calls on the cdev can only be made on existing devices. This means we don't have to check the value of dev2unit().
* - Add few VIA bridges to agp_via.c and connect it to amd64 buildjkim2009-01-231-0/+9
| | | | | as they support Intel Core/Core 2 and VIA Nano processors. - Align "optional agp" in conf/files.* for consistency while I am here.
* fix return status handling by ar5XXXReset; this is the reason thesam2009-01-235-10/+10
| | | | driver sometimes reports reset failed w/ status 0
* Add a new USB wireless driver, urtw(4) for supporting Realtek's 8187Lweongyo2009-01-234-0/+3733
| | | | chipset.
* don't run the calibration code if scanning, we won't be on the home channelsam2009-01-231-0/+4
|
* Fix a compile bogon. 'ppbus' is used by two different sets of debug codejhb2009-01-221-0/+2
| | | | | | in lptout(). Reported by: several
* Rename sc_is_pseudo to sc_nobulk member in ufoma_softc.takawata2009-01-221-13/+13
| | | | | | 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.
* Add locking to ppc and ppbus and mark the whole lot MPSAFE:jhb2009-01-2121-497/+830
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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 :-(
* Add the dresden elektronik SensorTerminalBoard which uses an FT245.joerg2009-01-212-0/+19
|
* Add Unicode rendering to the teken demo application.ed2009-01-212-11/+32
| | | | | | | | | 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.
* Default to normal bus timing mode on SD cards. In practice, mostimp2009-01-211-0/+1
| | | | | | 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...
* Fix minor style nit for file consistency.imp2009-01-211-5/+4
|
* Make the command reporting be under boot verbose.imp2009-01-211-6/+10
| | | | | Also, report a few other things under boot verbose. Small style nit to make new code look like old code in this file.
* Fix copy/paste mistake in variable name. This could lead to using incorrectmav2009-01-211-1/+1
| | | | bus frequency.
* correct typo that left programmed sifs time in the slot timesam2009-01-212-3/+3
| | | | | | (to be applied on subsequent resets) Submitted by: Jiri Fojtasek <jiri.fojtasek@hlohovec.net>
* Fix typo in commentemax2009-01-201-1/+1
| | | | Pointed out by: Daan Vreeken / Daan at vehosting dot nl
* Update (well, actually rewrite mostly) ng_ubt2 driver for USB2.emax2009-01-202-1147/+1362
| | | | | Reviewed by: HPS, alfred Blessed by: HPS
* - Add support for 8110SCe part. Some magic registers were taken fromjkim2009-01-201-19/+39
| | | | | | | Linux driver. - Swap hardware revisions for 8110S and 8169S as Linux driver claims. Reviewed by: yongari (early version)
* Retire RL_FLAG_INVMAR bit to match its comment and reality.jkim2009-01-201-11/+9
|
* - Do not read and write RX configuration register multiple times.jkim2009-01-201-66/+31
| | | | | | | | | - 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)
* Set the wrong softc size when defining the ofw_iicbus class. Change it tonwhitehorn2009-01-201-2/+2
| | | | the correct value.
* Properly implement the VT100 SCS sequences in xterm-mode.ed2009-01-206-31/+201
| | | | | | | | | | | | | | | 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.
* Change the probe priority for PCI and I2C generic bus modules fromnwhitehorn2009-01-202-2/+2
| | | | | | numerical constants to BUS_PROBE_GENERIC. Suggested by: jhb
* Set the pipe pointer before calling usbd_transfer() as its possible for thethompsa2009-01-191-1/+1
| | | | | | xfer callback to be invoked on error. MFC after: 2 weeks
* Add two more nVidia HDMI codec IDs.mav2009-01-191-0/+4
|
* Sometimes RTL8168B seems to take long time to access GMII registersyongari2009-01-191-4/+4
| | | | | | | | in device attach phase. Double GMII register access timeout value to fix the issue. Reported by: wkoszek Tested by: wkoszek
* Don't forget to mark the color translation array as const.ed2009-01-181-2/+2
| | | | Spotted by: Christoph Mallon <christoph mallon gmx de>
* Just put the ifnet pointer first in the softc like it needs to be rather thanthompsa2009-01-1820-30/+10
| | | | adding another deliciously evil pointer.
* Add support for CMedia CMI120.keramida2009-01-181-0/+4
| | | | | | PR: kern/123640 Approved by: ariff MFC after: 2 weeks
* Fix for my previous commit: color mapping is not 1:1.ed2009-01-171-4/+7
| | | | | | | | | | | | 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.
OpenPOWER on IntegriCloud