Commit Graph

19777 Commits

Author SHA1 Message Date
Navdeep Parhar
7ead19d4a8 sc->rev and is_offload(sc) will always be 0 during probe. Wait till
attach to get correct values.
2009-11-13 00:28:16 +00:00
Jung-uk Kim
2f28bf307c - Remove a redundant check for dpms(4).
- Test a cheaper function first.
2009-11-12 18:16:35 +00:00
Jung-uk Kim
bf71c25f87 - Partially revert hackish r198964 and r199002.
- Add a proxy driver vgapm to help vgapci to save/load VGA state.
- Move device_set_desc() to the right place while we are here.

Reviewed by:	jhb
2009-11-12 17:56:56 +00:00
John Baldwin
f140aad88c More consistent whitespace. 2009-11-11 20:29:40 +00:00
John Baldwin
58fbe5ab67 Use a dedicated callout to drive the transmit watchdog timer instead of
using if_watchdog and if_timer.

Tested by:	gavin
2009-11-11 20:27:53 +00:00
Jack F Vogel
466727ddbe With an i386 kernel the igb driver can cause a
page fault panic on initialization due to a large
number of bounce pages being allocated. This is due
to the dma tag requiring page alignment on mbuf mapping.
This was removed some time back from the ixgbe driver
and is not needed here either.
2009-11-11 19:13:40 +00:00
Alexander Motin
30a4094f86 MFp4:
- Move tagged queueing control from ADA to ATA XPT. It allows to control
  device command queue length correctly. First step to support < 32 tags.
- Limit queue for non-tagged devices by 2 slots for ahci(4) and siis(4).
- Implement quirk matching for ATA devices.
- Move xpt_schedule_dev_sendq() from header to source file.
- Move delayed queue shrinking to the more expected place - element freeing.
- Remove some SCSIsms in ATA.
2009-11-11 11:10:36 +00:00
Alexander Motin
8e57bf8357 MFp4:
Add set of chip IDs, known to support AHCI.
2009-11-11 10:44:09 +00:00
Ed Schouten
3a8a07eadd Allow Syscons terminal emulators to provide function key strings.
xterm and cons25 have some incompatibilities when it comes to escape
sequences for special keys, such as F1 to F12, home, end, etc. Add a new
te_fkeystr() that can be used to override the strings.

scterm-sck won't do anything with this, but scterm-teken will use
teken_get_sequences() to obtain the proper sequence.
2009-11-11 08:20:19 +00:00
Nathan Whitehorn
b201cde68d Reduce probe priority of USB input devices to BUS_PROBE_GENERIC from
BUS_PROBE_SPECIFIC. This allows device-specific drivers like atp to
attach reliably.

Reviewed by:	hps
2009-11-11 03:17:51 +00:00
John Baldwin
3be4af9213 - Locking fixes to not do silly things like drop the lock only to call a
function that immediately reacquires the lock.  Also removes recursive
  locking.
- Use the statistics timer to drive the transmit watchdog instead of using
  if_watchdog and if_timer.

Tested by:	gavin
2009-11-10 22:04:19 +00:00
Pyun YongHyeon
5c1da2fac0 Controller does not update Tx descriptors(send BDs) after sending
frames so remove unnecessary BUS_DMASYNC_PREREAD and
BUS_DMASYNC_POSTREAD of bus_dmamap_sync(9).
2009-11-10 20:29:20 +00:00
Nathan Whitehorn
d7f3684090 Add support for the touchpads found in later models of iBook and
Powerbook.

Reviewed by:	Rohit Grover <rgrover1 at gmail.com>
2009-11-10 19:14:06 +00:00
Alexander Motin
03a6387ec3 MFp4:
Organize device IDs and add some more of them.
2009-11-10 09:46:52 +00:00
Pyun YongHyeon
e6bf277eff Zero out Tx/Rx descriptors before using them. Also add missing
bus_dmamap_sync(9) after Tx descriptor initialization.
2009-11-09 23:09:18 +00:00
Pyun YongHyeon
aa94f33338 Add missing bus_dmamap_sync(9) before issuing kick command. 2009-11-09 22:58:30 +00:00
Roman Divacky
68c4dfdf0c Make isa_dma functions MPSAFE by introducing its own private lock. These
functions are selfcontained (ie. they touch only isa_dma.c static variables
and hardware) so a private lock is sufficient to prevent races. This changes
only i386/amd64 while there are also isa_dma functions for ia64/sparc64.
Sparc64 are ones empty stubs and ia64 ones are unused as ia64 does not
have isa (says marcel).

This patch removes explicit locking of Giant from a few drivers (there
are some that requires this but lack ones - this patch fixes this) and
also removes the need for implicit locking of Giant from attach routines
where it's provided by newbus.

Approved by:	ed (mentor, implicit)
Reviewed by:	jhb, attilio (glanced by)
Tested by:	Giovanni Trematerra <giovanni.trematerra gmail com>
IA64 clue:	marcel
2009-11-09 20:29:10 +00:00
Rui Paulo
4d16b4ec42 Driver for the Apple Touchpad present on MacBook (non-Pro & Pro).
Submitted by:	Rohit Grover <rgrover1 at gmail.com>
MFC after:	2 months
2009-11-09 15:59:09 +00:00
Alexander Motin
fb549e86e7 Add more ICH10 chip IDs.
Submitted by:	Dmitry S. Luhtionov <mitya@cabletv.dp.ua>
2009-11-09 09:27:09 +00:00
Xin LI
641182ba04 Initialize the whole message unit's DMA buffer to zero, this fixes a panic
during boot when ARC1200 is being used with certain motherboard models.

This commit brings the driver to the same state of vendor's 1.20.00.16
release.  Many thanks to Areca for their continued support to FreeBSD.

Reported by:	Jirka Mikulas <jiri mikulas com>
Submitted by:	Erich Chen (Areca)
Obtained from:	ftp://ftp.areca.com.tw/RaidCards/AP_Drivers/FreeBSD/DRIVER/SourceCode/arcmsr-freebsd-1.20.00.16-91010.zip
MFC after:	3 days
2009-11-09 07:28:29 +00:00
Pyun YongHyeon
4d3a629c65 Correct disabling checksum offloading for BCM5700 B0. 2009-11-09 00:16:50 +00:00
Andrew Thompson
a1f7c632cc Correct Olympus quirk.
Submitted by:	Pavel Gubin
2009-11-08 21:08:50 +00:00
Andrew Thompson
9dac8e0ed2 Add missing mtx_destroy().
Submitted by:	Sebastian Huber
2009-11-08 21:07:47 +00:00
Andrew Thompson
b029f6bb95 Improve support for High-speed USB audio devices.
- fix issues regarding the mixer, where the interface number was not set in
  time.
- fix wrong use of resolution parameter.

Submitted by:	Hans Petter Selasky
2009-11-08 21:00:50 +00:00
Andrew Thompson
883bb30022 improve support for high speed isochronous endpoints which does not run 1:1,
but needs intervalling 1:2, 1:4 or 1:8

Submitted by:	Hans Petter Selasky
2009-11-08 20:54:03 +00:00
Andrew Thompson
30b22abe40 Integrate lost interrupts patch from the old USB stack.
Some EHCI chips from VIA / ATI seem to trigger interrupts before writing back
the qTD status, or miss signalling occasionally under heavy load.  If the host
machine is too fast, we can miss transaction completion - when we scan the
active list the transaction still seems to be active. This generally exhibits
itself as a umass stall that never recovers.

We work around this behaviour by setting up this callback after any softintr
that completes with transactions still pending, giving us another chance to
check for completion after the writeback has taken place

Submitted by:	Alexander Nedotsuko
MFC after:	3 days
2009-11-08 20:51:15 +00:00
Andrew Thompson
10454ab700 ehci_init() will do reset and set the usbrev flag. Fix problem where
ehci_reset() was called before ehci_init().

PR:		usb/140242
Submitted by:	Sebastian Huber
2009-11-08 20:44:55 +00:00
Pyun YongHyeon
f5a034f95a Partially revert r199035.
Revision 1.158 says only lower ten bits of
BGE_RXLP_LOCSTAT_IFIN_DROPS register is valid. For BCM5761 case it
seems the controller maintains 16bits value for the register.
However 16bits are still too small to count all dropped packets
happened in a second. To get a correct counter we have to read the
register in bge_rxeof() which would be too expensive.

Pointed out by:	bde
2009-11-08 19:59:54 +00:00
Alexander Motin
6fb5300b34 Introduce define and kernel option ATA_REQUEST_TIMEOUT to control ATA(4)
command timeout.

Submitted by:	keramida
2009-11-08 14:33:19 +00:00
Alexander Motin
c43ee88764 Introduce hw.hptrr.attach_generic loader tunable to deny hptrr driver
attach chips with generic Marvell (non-HighPoint) PCI identification.
These chips are also supported by ata(4). Some vendors, like Supermicro,
are using same chips without providing HPT RAID BIOS.

PR:		kern/120842, kern/136750
2009-11-08 11:33:51 +00:00
Doug Barton
afe0ec0027 Properly turn off debugging
LART applied (gently) by:	sam
2009-11-08 02:33:33 +00:00
Pyun YongHyeon
e238d4ead1 Count number of inbound packets which were chosen to be discarded
as input errors. Also count out of receive BDs as input errors.
2009-11-08 01:30:35 +00:00
Pyun YongHyeon
25dc84f22f Don't count input errors twice, we always read input errors from
MAC in bge_tick. Previously it used to show more number of input
errors. I noticed actual input errors were less than 8% even for
64 bytes UDP frames generated by netperf.
Since we always access BGE_RXLP_LOCSTAT_IFIN_DROPS register in
bge_tick, remove useless code protected by #ifdef notyet.
2009-11-08 01:13:38 +00:00
Pyun YongHyeon
61ccb9da43 Tell upper layer we support long frames. ether_ifattach()
initializes it to ETHER_HDR_LEN so we have to override it after
calling ether_ifattch().
While I'm here remove setting if_mtu value, it's initialized in
ether_ifattach().
2009-11-07 20:37:38 +00:00
Doug Barton
5c670c33fc Turn off WPI_DEBUG by default as the driver seems sufficiently stable
at this point.

Reviewed by:	benjsc, thompsa
2009-11-07 18:42:53 +00:00
Andriy Gapon
f6eb382c79 acpi: remove 'magic' ivar
o acpi_hpet: auto-added 'wildcard' devices can be identified by
  non-NULL handle attribute.
o acpi_ec: auto-add 'wildcard' devices can be identified by
  unset (NULL) private attribute.
o acpi_cpu: use private instead of magic to store cpu id.

Reviewed by:	jhb
Silence from:	acpi@
MFC after:	2 weeks
X-MFC-Note:	perhaps the ivar should stay for ABI stability
2009-11-07 11:46:38 +00:00
Andriy Gapon
ede807c429 ichwd: don't attach to isa pnp device(s) by accident
Reviewed by:	imp, des
MFC after:	1 week
2009-11-07 11:41:23 +00:00
Pyun YongHyeon
03e78bd096 Fix I mssied in r199011. Rx ring index also should be updated.
If we fill Rx ring full instead of half we can simplify this logic
but this requires more experimentation.
2009-11-07 02:10:59 +00:00
Pyun YongHyeon
76202a1601 Add preliminary Yukon Ultra 2 support(88E8057). The controller
looks very similar to Yukon EC Ultra.

Tested by:	 kalin m ( kalin <> el dot net )
2009-11-07 01:14:09 +00:00
Pyun YongHyeon
943787f3a7 Reimplement Rx buffer allocation to handle dma map load failure.
Introduce two spare dma maps for standard buffer and jumbo buffer
respectively. If loading a dma map failed reuse previously loaded
dma map. This should fix unloaded dma map is used in case of dma
map load failure. Also don't blindly unload dma map and defer
dma map sync and unloading operation until we know dma map for new
buffer is successfully loaded. This change saves unnecessary dma
load/unload operation. Previously bge(4) tried to reuse mbuf
with unloaded dma map which is really bad thing in bus_dma(9)
perspective.
While I'm here update if_iqdrops if we can't allocate Rx buffers.
2009-11-07 01:01:33 +00:00
Pyun YongHyeon
c215fd771d Do bus_dmamap_sync call only if frame size is greater than
standard buffer size. If controller is not capable of handling
jumbo frame, interface MTU couldn't be larger than standard MTU
which in turn the received should be fit in standard buffer. This
fixes bus_dmamap_sync call for jumbo ring is called even if
interface is configured to use standard MTU.
Also if total frame size could be fit into standard buffer don't
use jumbo buffers.
2009-11-06 23:49:20 +00:00
Pyun YongHyeon
a669a81f0b bge(4) already switched to use UMA backed page allocator and local
memory allocator for jumbo frame was removed long time ago. Remove
no more used macros.
2009-11-06 22:37:29 +00:00
Jung-uk Kim
b66e2b8e50 Remove duplicate suspend/resume code from vga_pci.c and let vga(4) register
itself to an associated PCI device if it exists.  It is little bit hackish
but it should fix build without frame buffer driver since r198964.
Fix some style(9) nits in vga_isa.c while we are here.
2009-11-06 20:32:26 +00:00
John Baldwin
f802264db1 Take a step towards removing if_watchdog/if_timer. Don't explicitly set
if_watchdog/if_timer to NULL/0 when initializing an ifnet.  if_alloc()
sets those members to NULL/0 already.

(Missed this driver in the earlier commit.)
2009-11-06 20:07:16 +00:00
Pyun YongHyeon
ff08021657 It's normal to see Rx FIFO overruns under high network load and
showing the message creates other side-effects. Remove the Rx
FIFO overrun message in interrupt handler. msk(4) should recover
from the FIFO overruns without any user intervention. Users can
still check the Rx FIFO overrun counter from MAC MIB statistics
maintained in driver(dev.msk.0.stats.rx.overflows).
2009-11-06 18:51:05 +00:00
Pyun YongHyeon
56964c4c9f Remove unnecessary header file. 2009-11-06 18:36:09 +00:00
John Baldwin
775a636b11 - Use device_printf() instead of printf() with an explicit unit number
in the PCI attach routine.
- Simplify PCI probe.
- Remove no-longer-used 'unit' from an_attach() parameters.

PR:		kern/126924
Submitted by:	gavin
2009-11-06 18:28:13 +00:00
John Baldwin
e1b17582f4 Take a step towards removing if_watchdog/if_timer. Don't explicitly set
if_watchdog/if_timer to NULL/0 when initializing an ifnet.  if_alloc()
sets those members to NULL/0 already.
2009-11-06 14:55:01 +00:00
John Baldwin
f1b211841d Use device_printf() and if_printf() instead of printf() with an explicit
unit number and remove 'unit' members from softc.
2009-11-06 14:52:37 +00:00
Pyun YongHyeon
c3bbfed430 Correct MSI mode register bits. 2009-11-06 01:11:59 +00:00