Commit Graph

19794 Commits

Author SHA1 Message Date
John Baldwin
b1f459a01b Use a private callout timer to drive the transmit watchdog instead of using
if_watchdog and if_timer.  The driver already contained an optional stats
timer that individual attachments could use to provide a 'tick' event.  The
stats timer only ran if the tick function pointer was non-NULL and the
attachment's tick routine had to call callout_reset(), etc.  Now the driver
always schedules a stat timer and manages the callout_reset() internally.
This timer is used to drive the watchdog and will also call the attachment's
'tick' handler if one is provided.

Tested by:	WATANABE Kazuhiro
2009-11-17 14:23:09 +00:00
John Baldwin
12d54232b2 Use a private timer to run the statistics timer instead of (ab)using
if_watchdog and if_timer.

Tested by:	WATANABE Kazuhiro  CQG00620 of nifty.ne.jp
2009-11-17 14:13:30 +00:00
Jung-uk Kim
2272d05019 Merge ACPICA 20091112. 2009-11-16 21:47:12 +00:00
Alexander Motin
5319fb62a8 Do not require payload data to be aligned. It is not mentioned in datasheet
and works fine in practice.
2009-11-16 20:54:47 +00:00
Andrew Thompson
185d20b5f9 Sort ID list by vendor. 2009-11-16 20:36:43 +00:00
Andrew Thompson
2f5c868874 Add the Curitel UM175 3g device. 2009-11-16 20:35:16 +00:00
Alexander Motin
6bd8779bb9 Change the way in which AHCI+PATA combined controllers, such as JMicron
and Marvell handled. Instead of trying to attach two different drivers to
single device, wrapping each call, make one of them (atajmicron, atamarvell)
attach do device solely, but create child device for AHCI driver,
passing it all required resources. It is quite easy, as none of
resources are shared, except IRQ.

As result, it:
- makes drivers operation more independent and straitforward,
- allows to use new ahci(4) driver with such devices, adding support for
new features, such as PMP and NCQ, same time keeping legacy PATA support,
- will allow to just drop old ataahci driver, when it's time come.
2009-11-16 15:38:27 +00:00
Alexander Motin
49b96d25da MFp4:
Check SNCQ HBA capability bit when reporting NCQ support to CAM.
2009-11-14 20:06:04 +00:00
Alexander Motin
00c4be80ae Disable PMP probing for Marvell AHCI controllers.
It is not working for some reason. Linux does the same.
2009-11-14 08:04:38 +00:00
Attilio Rao
884015f6fc Add sysctls in ahd(4) in order to keep track of different classes of
errors. So far 3 different classes are present (correctable,
uncorrectable and fatal) but more can be added easilly.

Obtained from:	Sandvine Incorporated
Reviewed by:	emase, gibbs
Sponsored by:	Sandvine Incorporated
MFC:		2 weeks
2009-11-13 22:57:20 +00:00
Alexander Motin
3f809d7a40 Add support for SATA ports on SATA+PATA Marvell controllers.
These controllers provide combination of AHCI for SATA and legacy
PCI ATA for PATA. Use same solution as used for JMicron controllers.
Add IDs of Marvell 88SX6102, 88SX6111. 88SX6141 alike controllers
2009-11-13 22:53:49 +00:00
Alexander Motin
a1c0421a4a Add more codec IDs. 2009-11-13 21:06:33 +00:00
Ed Schouten
4b2361f811 Convert syscons on i386 to TERM=xterm.
TEKEN_XTERM is now gone. Because we always use xterm mode now, we only
need a TEKEN_CONS25 switch to go back to cons25.
2009-11-13 11:28:54 +00:00
Ed Schouten
e42fc36867 Switch the default terminal emulation style to xterm for most platforms.
Right now syscons(4) uses a cons25-style terminal emulator. The
disadvantages of that are:

- Little compatibility with embedded devices with serial interfaces.
- Bad bandwidth efficiency, mainly because of the lack of scrolling
  regions.
- A very hard transition path to support for modern character sets like
  UTF-8.

Our terminal emulation library, libteken, has been supporting
xterm-style terminal emulation for months, so flip the switch and make
everyone use an xterm-style console driver.

I still have to enable this on i386. Right now pc98 and i386 share the
same /etc/ttys file. I'm not going to switch pc98, because it uses its
own Kanji-capable cons25 emulator.

IMPORTANT: What to do if things go wrong (i.e. graphical artifacts):

- Run the application inside script(1), try to reduce the problem and
  send me the log file.
- In the mean time, you can run `vidcontrol -T cons25' and `export
  TERM=cons25' so you can run applications the same way you did before.
  You can also build your kernel with `options TEKEN_CONS25' to make all
  virtual terminals use the cons25 emulator by default.

Discussed on:	current@
2009-11-13 05:54:55 +00:00
Navdeep Parhar
a9c23ef044 Don't disable the XGMAC's tx on ifconfig down. It is unnecessary
and can cause false backpressure in the chip.  Fix a us/ms mixup
while here.
2009-11-13 00:37:29 +00:00
Navdeep Parhar
3cb33003ce The 10GBASE-T card should use an IPG of 1. Also enable the check
for low power startup on this card.
2009-11-13 00:34:28 +00:00
Navdeep Parhar
1fa10c920e Make sure *some* edc is setup even for an unknown transceiver (assume
it is optical).
2009-11-13 00:31:51 +00:00
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