Commit Graph

18357 Commits

Author SHA1 Message Date
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