Commit Graph

18952 Commits

Author SHA1 Message Date
Sam Leffler
04f19fd699 make superg/fast-frames state dynamically-allocated (and indirect off
the com structure instead of embedded); this reduces the overhead when
not configured and reduces visibility of the contents
2009-05-02 20:16:55 +00:00
Andrew Thompson
5efea30f03 Create a taskqueue for each wireless interface which provides a serialised
sleepable context for net80211 driver callbacks. This removes the need for USB
and firmware based drivers to roll their own code to defer the chip programming
for state changes, scan requests, channel changes and mcast/promisc updates.
When a driver callback completes the hardware state is now guaranteed to have
been updated and is in sync with net80211 layer.

This nukes around 1300 lines of code from the wireless device drivers making
them more readable and less race prone.

The net80211 layer has been updated as follows
 - all state/channel changes are serialised on the taskqueue.
 - ieee80211_new_state() always queues and can now be called from any context
 - scanning runs from a single taskq function and executes to completion. driver
   callbacks are synchronous so the channel, phy mode and rx filters are
   guaranteed to be set in hardware before probe request frames are
   transmitted.

Help and contributions from Sam Leffler.

Reviewed by:	sam
2009-05-02 15:14:18 +00:00
Alexander Motin
b1d1fff76c Improve kernel dumping reliability for busy ATA channels:
- Generate fake channel interrupts even if channel busy with previous
request to let it finish. Without this, dumping requests were just queued
and never processed.
 - Drop pre-dump requests queue on dumping. ATA code, working in dumping
(interruptless) mode, unable to handle long request queue. Actually, to get
coherent dump we anyway should do as few unrelated actions as possible.
2009-05-01 08:03:46 +00:00
Pyun YongHyeon
59dffaa088 Separate multicast filtering of SysKonnect GENESIS and Marvell
Yukon from common multicast handling code. Yukon uses hash-based
multicast filtering(big endian form) but GENESIS uses perfect
multicast filtering as well as hash-based one(little endian form).
Due to the differences of multicast filtering there is no much
sense to have a common code.
 o Remove sk_setmulti() and introduce sk_rxfilter_yukon(),
   sk_rxfilter_yukon() that handles multicast filtering setup.
 o Have sk_rxfilter_{yukon, genesis} handle promiscuous mode and
   nuke sk_setpromisc(). This simplifies ioctl handler as well as
   giving a chance to check validity of Rx control register of
   Yukon.
 o Don't reinitialize controller when IFF_ALLMULTI flags is changed.
 o Nuke sk_gmchash(), it's not needed anymore.
 o Always reconfigure Rx control register whenever a new multicast
   filtering condition is changed. This fixes multicast filtering
   setup on Yukon.

PR:	kern/134051
2009-05-01 03:24:03 +00:00
Andrew Thompson
6fca021096 We need to ref the bss node when sending the beacon since it goes through the
normal tx path and will be decremented on the mbuf free.
2009-04-30 22:30:01 +00:00
Jung-uk Kim
54b43614e7 Fix off-by-one bug. S5 state must be checked as well. 2009-04-30 18:00:53 +00:00
Jung-uk Kim
19682c4826 Fix style(9). 2009-04-30 17:45:43 +00:00
Jung-uk Kim
2d0c82e8cf Prefer device_printf() over printf() where ever possible. 2009-04-30 17:42:11 +00:00
Jung-uk Kim
a0e73a122d General sleep state change clean up.
- Probe supported sleep states from acpi_attach() just once and do not
call AcpiGetSleepTypeData() again.  It is redundant because
AcpiEnterSleepStatePrep() does it any way.
- Treat UNKNOWN sleep state as NONE, i.e., "do nothing", and remove obscure
NONE state (ACPI_S_STATES_MAX + 1) to avoid confusions.
- Do not set unsupported sleep states as default button/switch events.
If the default sleep state is not supported, just set it as UNKNOWN/NONE.
- Do not allow sleep state change if the system is not fully up and running.
This should prevent entering S5 state multiple times, which causes strange
behaviours later.
- Make sleep states case-insensitive when they are used with sysctl(8).
For example,

	sysctl hw.acpi.lid_switch_state=s1
	sysctl hw.acpi.sleep_button_state=none

are now legal and equivalent to the uppercase ones.
2009-04-30 17:35:44 +00:00
Alexander Motin
4c10f2e605 Add experimental support for SATA interface power management.
Feature is controlled by hint.ata.X.pm_level tunable:
 0 - PM disabled, old behaviour, default.
 1 - device is allowed to initiate PM state change, host is passive.
 2 - host initiates PARTIAL state transition every time port is idle.
 3 - host initiates SLUMBER state transition every time port is idle.

PARTIAL state has up to 100us (50us for me) wakeup latency, but for my
ICH8M saves 0.5W of power per drive. SLUMBER state has up to 10ms (3.5ms
for me) wakeup latency, but saves 0.8W of power.

Modes 2 and 3 are implemented only for AHCI driver now.

Interface power management is incompatible with device presence detection
(host receives no signal from drive, so unable to monitor it), so later is
disabled when PM is used.
2009-04-29 21:17:18 +00:00
Marius Strobl
db6bbcd2dc - Change some softc members to be unsigned where more appropriate.
- Add some missing const.
- Move the size of the window spun by the registers to the softc
  as neither using va_mem_size for this nor va_mem_base for the
  start of the bus addresses is appropriate.

MFC after:	1 week
2009-04-28 20:49:47 +00:00
Andriy Gapon
33c70d417e acpi: do not run resume/backout code when entering S0/S5 states
This change adds (possibly redundant) early check for invalid
state input parameter (including S0). Handling of S5 request
is reduced to simply calling shutdown_nice(). As a result
control flow of acpi_EnterSleepState is somewhat simplified
and resume/backout half of the function is not executed
for S5 (soft poweroff) request and invalid state requests.

Note: it seems that shutdown_nice may act as nop when initproc
is already initialized (to grab pid of 1), but init process is in
"pre-natal" state.

Tested by:	Fabian Keil <fk@fabiankeil.de>
Reviewed by:	njl, jkim
Approved by:	rpaulo
2009-04-28 11:56:54 +00:00
Kip Macy
8f781951eb fix typo in conditional 2009-04-27 23:43:28 +00:00
Kip Macy
b3e6cec7b3 collapse the two em_start_locked routines in to one 2009-04-27 22:55:48 +00:00
Kip Macy
bf541f371e simplify by removing dead code 2009-04-27 22:54:30 +00:00
Kip Macy
cb2ff24c38 remove dead code with reference to IFQ_HANDOFF 2009-04-27 22:53:35 +00:00
Jung-uk Kim
c39437eb46 Use cached progif instead of reading it again. 2009-04-27 21:45:05 +00:00
Jung-uk Kim
c6b8ee96f6 - Give generic AHCI driver lower priority than device-specific drivers.
- Consistently use BUS_PROBE_GENERIC instead of -100.
2009-04-27 21:34:15 +00:00
Jung-uk Kim
7267edac39 Reduce code duplication and excessive pci_get_slot() calls.
Reviewed by:	mav
2009-04-27 19:39:18 +00:00
Jack F Vogel
eb60d22100 Correct fat finger mistake 2009-04-27 18:35:06 +00:00
Jung-uk Kim
3388ca6b71 Reduce excessive pci_get_devid() and pci_get_revid() calls
on the same PCI device while device probing.
2009-04-27 18:10:42 +00:00
Jack F Vogel
aecaefee25 igb_txeof also has a case where the watchdog may not
get reset when it should be

MFC after: 2 weeks
2009-04-27 17:36:41 +00:00
Jung-uk Kim
f71ac6d60a - Always force AHCI mode on a ATI/AMD SB600/700/800 SATA controller. These
controllers may be configured as legacy IDE mode by modifying subclass and
progif without actually changing PCI device IDs.  Instead of complicating
code, we always force AHCI mode while probing.  Also we restore AHCI mode
while resuming per ATI/AMD register programming/requirement guides.
- Fix SB700/800 "combined" mode.  Unlike SB600, this PATA controller can
combine two SATA ports and emulate one PATA channel as primary or secondary
depending on BIOS configuration.  When the combined mode is disabled, this
channel disappears and it works just like SB600 PATA controller, however.
- Add more PCI device IDs for SB700/800 and adjust device descriptions.
SB800 shares the same PCI device IDs and added two more SATA IDs.
2009-04-27 17:29:51 +00:00
Andrew Gallatin
950f22e38d Fix build: Make forgotten IFNET_MULTIQUEUE to IFNET_BUF_RING
ifdef change.
2009-04-27 17:24:47 +00:00
Jack F Vogel
baf2572c76 Thanks for Michael Tuexen for tracking down a path where
the watchdog timer was not being rearmed in txeof, and also
a missing case in the new code.

MFC after:	2 weeks
2009-04-27 17:22:14 +00:00
Doug Ambrisko
a18c284294 Start to convert this over to the new tty layer. These changes allow
this driver to compile and limp along with the new layer.  These changes
do not deal with proper locking around access to the HW.  This is only
a starting point.  I have not tested modem control but tip seems to work
okay and I can send and receive characters which I needed for one of my
-current boxes.  I have not tied this driver back up to the build since
I don't want people to think it is ready for prime time.  If anyone
else has some cycles to work on this feel free to!

Also add support for a 16 port PCI interface I have at work.

Glanced at by:	ed
2009-04-27 15:58:38 +00:00
Andrew Gallatin
c6cb3e3fe8 Updates to mxge for multiple tx/rx rings:
- Update mxge to use if_transmit(), and the new buf_ring
  interfaces, so as to enable multiple transmit queues.
  Use of if_transmit() is conditional on IFNET_BUF_RING,
  and is enabled by default (as in if_em).

- Record a flow id on receive if receive hashing is active.
  I currently only record the rx ring id (0..8) rather than
  the 32-bit topelitz hash result, as doing the latter would
  require shifting the driver to use a larger rx return ring.

Sponsored by:  Myricom, Inc.
2009-04-27 15:45:54 +00:00
Ed Schouten
e439bf9ccc Remove unneeded device index from unit number.
We only use the unit number to determine whether we should rewind the
device upon closure.
2009-04-26 09:21:37 +00:00
Andrew Thompson
4d4fa6edd4 Make the state string descriptions public. 2009-04-25 21:25:52 +00:00
Andrew Thompson
bd21677868 Track the usb device state as its powered on, addressed and configured. This helps
to avoid touching the device when it is not going to respond and would otherwise
timeout.

Implement the suspend tracking as a udev state too.
2009-04-25 21:10:06 +00:00
Warner Losh
1c51765e41 Add Surecom EP-427X. 2009-04-24 17:28:12 +00:00
Warner Losh
a5a8a1c8fe Another PC Card that needs the CIS strings for the Surecom EP-427X,
which really is just a rebadged OEM card...  Plus a tiny whitespace
nit.
2009-04-24 17:27:45 +00:00
Kip Macy
1af1902295 fix typo 2009-04-23 21:27:06 +00:00
Kip Macy
4b4945b673 fix panic when using msix
Pointed out by Nate Whitehorn
2009-04-23 21:23:19 +00:00
Kip Macy
173ff3e204 Make sure the ALTQ case is handle correctly by using drbr_dequeue 2009-04-23 21:19:35 +00:00
Robert Watson
530ee5c971 Two ifnet misuse fixes for if_nve:
(1) Don't manually configure if_output(), ether_ifattach() will do that
    for us as part of link-layer setup.

(2) Call if_detach() before stopping nve in order to prevent calls into
    the device driver after the driver has started shutting down.

Reviewed by:	jhb
MFC after:	2 weeks
2009-04-23 19:29:45 +00:00
Andrew Thompson
459d369ee2 MFp4 //depot/projects/usb@160930
Change the roothub exec functions to take the usb request and data pointers
directly rather than placing them on the parent bus struct.

Submitted by:	Hans Petter Selasky
2009-04-22 17:08:16 +00:00
Andrew Thompson
c1911c1b7c MFp4 //depot/projects/usb@160708
Need to check Read/Write allowed before writing any data for non-control
transfers.

Submitted by:	Hans Petter Selasky
2009-04-22 17:08:13 +00:00
Andrew Thompson
672c9965ef MFp4 //depot/projects/usb@160706
Resolve possible device side mode deadlock by creating another thread.

Submitted by:	Hans Petter Selasky
2009-04-22 17:08:10 +00:00
Andrew Thompson
39063699e6 MFp4 //depot/projects/usb@160678
Remove unused field.

Submitted by:	Hans Petter Selasky
2009-04-22 17:08:07 +00:00
Andrew Thompson
9469c92974 MFp4 //depot/projects/usb@160655
Fix possible issue with clear-stall and set-config happening at the same time.

Submitted by:	Hans Petter Selasky
2009-04-22 17:08:04 +00:00
Andrew Thompson
88b4e0abcf MFp4 //depot/projects/usb@160614
Fix errornous printout.

Submitted by:	Hans Petter Selasky
2009-04-22 17:07:59 +00:00
Andrew Thompson
8ac0864630 MFp4 //depot/projects/usb@160485
Fix a bug in the USB power daemon code where connection of multiple HUBs in
series would result in incorrect device suspend.

Reported by:	Nicolas xxx@wanadoo.fr
Submitted by:	Hans Petter Selasky
2009-04-22 17:07:56 +00:00
Andrew Thompson
495f25cedc MFp4 //depot/projects/usb@160413
Use direct reference to parent high-speed HUB instead of indirect, due to
pointer clearing race at detach of parent USB HUB.

Reported by:	kientzle
Submitted by:	Hans Petter Selasky
PR:		usb/133545
2009-04-22 17:07:53 +00:00
Warner Losh
1d00d5ed3c A couple of older Melco cards that missed the transition to newcard 2009-04-22 16:51:01 +00:00
Warner Losh
9ca9ddabfd A couple of older Melco cards that missed the transition to newcard 2009-04-22 16:50:44 +00:00
Warner Losh
9ac15d8cea Add Billionton LNT10TB 2009-04-22 15:57:22 +00:00
Warner Losh
194842b5c3 Add Billionton LNT-10TB variant 2009-04-22 15:56:00 +00:00
Warner Losh
52641d220c Add a few more models of AMBICOM cards from data from linux driver and
pccard.conf.
2009-04-22 15:13:20 +00:00
Warner Losh
ffef988b76 Add AmbiCom AMB8002, AMB8010 (2 variants) and AMB8610. These were
inferred from data in the linux driver.
2009-04-22 15:11:27 +00:00