Commit Graph

19120 Commits

Author SHA1 Message Date
Andrew Thompson
774651eee7 Use the correct usb config number on attach.
Reported by:	Greg Rivers
Submitted by:	Hans Petter Selasky
2009-05-21 17:45:37 +00:00
Andrew Thompson
1d70ff1cf6 Fix a failure to report failure on stalled status stage for control
transactions.

Submitted by:	Hans Petter Selasky
2009-05-21 17:43:35 +00:00
Andrew Thompson
55e76c210e Add a driver for the AVR32 series USB Device Controller. Not hooked up as
FreeBSD does not yet support this platform but it makes it easier to stay in
sync.

Submitted by:	Hans Petter Selasky
2009-05-21 17:42:32 +00:00
Andrew Thompson
476183df94 Improve device mode (gadget) stall handling.
Some hardware easily comes out of sync with regard to whether the current or
the next control transfer should be stalled, if a stall command is always
issued before receiving the SETUP packet. After this patch the stall command
will only be issued when a transfer should actually be stalled.

Submitted by:	Hans Petter Selasky
2009-05-21 17:39:21 +00:00
Sam Leffler
07f8bbea05 rssi/nf data are now dbm, tag them accordingly 2009-05-21 15:30:59 +00:00
Sam Leffler
fedda42340 o remove bpf tap call missed in r192468
o correct rssi taken from rx descriptor; need dbm
2009-05-21 15:30:29 +00:00
George V. Neville-Neil
0bbdea7776 Integrate three changes from Chelsio.
1) Add a sysctl that will say what type of PHYs exist on the card.
2) Fix a bug that occurs when an AEL 2005 PHY resets without a transciever
in the card.
3) Unify the PHY link detection code.

Obtained from:	Navdeep Parhar
MFC after:	10 days
2009-05-21 15:08:03 +00:00
George V. Neville-Neil
3cf138bb79 Modified the attach and detach routines to handle bringing ports up
and down more cleanly.  This addresses a problem where if we have the
link flap during boot the driver would lock up the system.

Reviewed by:	jhb
MFC after:	1 week
2009-05-21 14:43:12 +00:00
John Baldwin
46990862ab Largely revert the earlier change to use a single CCB for the RAID recovery
thread.  Multiple RAID events in quick succession can cause an additional
bus rescan to be scheduled before an earlier scan has completed.  In this
case the driver was attempting to use the same CCB storage for two requests.

PR:		kern/130330
Reviewed by:	Riccardo Torrini  riccardo.torrini | esaote com
MFC after:	1 week
2009-05-21 12:36:40 +00:00
Sam Leffler
c3e8a58723 force type match 2009-05-21 04:00:31 +00:00
Andrew Thompson
88f3df72ef Print out device attachment. 2009-05-21 02:26:51 +00:00
Pyun YongHyeon
f6bc943047 bus_dma(9) conversion and make nge(4) work on all architectures.
o Header file cleanup.
o bus_dma(9) conversion.
  - Removed all consumers of vtophys(9) and converted to use
    bus_dma(9).
  - 64bit DMA support was disabled because DP83821 is not capable
    of handling the DMA request. 64bit DMA request on DP83820
    requires different descriptor structures and it's hard to
    dynamically change descriptor format at run time so I disabled
    it. Note, this is the same behavior as previous one but
    previously nge(4) didn't explicitly disable 64bit mode on
    DP83820.
  - Added Tx/Rx descriptor ring alignment requirements(8 bytes
    alignment).
  - Limit maximum number of Tx DMA segments to 16. In fact,
    controller does not seem to have limitations on number of Tx
    DMA segments but 16 should be enough for most cases and
    m_collapse(9) will handle highly fragmented frames without
    consuming a lot of CPU cycles.
  - Added Rx buffer alignment requirements(8 bytes alignment). This
    means driver should fixup received frames to align on 16bits
    boundary on strict-alignment architectures.
  - Nuked driver private data structure in descriptor ring.
  - Added endianness support code in Tx/Rx descriptor access.
o Prefer faster memory mapped register access to I/O mapped access.
   Added fall-back mechanism to use alternative register access.
   The hardware supports both memory and I/O mapped access.
o Added suspend/resume methods but it wasn't tested as controller I
  have does not support PCI PME.
o Removed swap argument in nge_read_eeprom() since endianness
  should be handled after reading EEPROM.
o Implemented experimental 802.3x full-duplex flow-control. ATM
  it was commented out but will be activated after we have generic
  flow-control framework in mii(4) layer.
o Rearranged promiscuous mode settings and simplified logic.
o Always disable Rx filter prior to changing Rx filter functions as
  indicated in DP83820/DP83821 datasheet.
o Added an explicit DELAY in timeout loop of nge_reset().
o Added a sysctl variable dev.nge.%d.int_holdoff to control
  interrupt moderation. Valid ranges are 1 to 255(default 1) in
  units of 100us. The actual delivery of interrupt would be delayed
  based on the sysctl value. The interface has to be brought down
  and up again before a change takes effect. With proper tuning
  value, users do not need to resort to polling(4) anymore.
o Added ALTQ(4) support.
o Added missing IFCAP_VLAN_HWCSUM as nge(4) can offload Tx/Rx
  checksum calculation on VLAN tagged frames as well as VLAN tag
  insertion/stripping. Also add IFCAP_VLAN_MTU capability as nge(4)
  can handle VLAN tagged oversized frames.
o Fixed media header length for VLAN.
o Rearranged nge_detach routine such that it's now used for general
  clean-up routine.
o Enabled MWI.
o Accessing EEPROM takes very long time so read 6 bytes ethernet
  address with one call instead of 3 separate accesses.
o Don't set if_mtu in device attach, it's already set in
  ether_ifattach().
o Don't do any special things for TBI interface. Remove TBI
  specific media handling in the driver and have gentbi(4) handle
  it. Add glue code to read/write TBI PHY registers in miibus
  method. This change removes a lot of PHY handling code in driver
  and now its functionality is handled by mii(4).
o Alignment fixup code is now applied only for strict-alignment
  architectures. Previously the code was applied for all
  architectures except i386. With this change amd64 will get
  instant Rx performance boost.
o When driver fails to allocate a new mbuf, update if_qdrops so
  users can see what was wrong in Rx path.
o Added a workaround for a hardware bug which resulted in short
  VLAN tagged frames(e.g. ARP) was rejected as if runt frame was
  received. With this workaround nge(4) now accepts the short VLAN
  tagged frame and nge(4) can take full advantage of hardware VLAN
  tag stripping. I have no idea how this bug wasn't known so far,
  without the workaround nge(4) may never work on VLAN
  environments.
o Fixed Rx checksum offload logic such that it now honors active
  interface capability configured with ifconfig(8).
o In nge_start()/nge_txencap(), always leave at least one free
  descriptor as indicated in datasheet. Without this the hardware
  would be confused with ring descriptor structure(e.g. no clue
  for the end of descriptor ring).
o Removed dead-code that checks interrupts on PHY hardware. The
  code was designed to detect link state changes but it was
  disabled as driving nge_tick clock would break auto-negotiation
  timer. This code is no longer needed as nge(4) now uses mii(4)
  and link state change handling is done with mii callback.
o Rearranged ethernet address programming logic such that it works
   on strict-alignment architectures.
o Added IFCAP_VLAN_HWTAGGING/IFCAP_VLAN_HWCSUM handler in
   nge_ioctl() such that the functionality is configurable with
   ifconfig(8). DP83820/DP83821 can do checksum offload for VLAN
   tagged frames so enable Tx/Rx checksum offload for VLAN
   interfaces.
o Simplified IFCAP_POLLING selection logic in nge_ioctl().
o Fixed module unload panic when bpf listeners are active.
o Tx/Rx descriptor ring address uses 64bit DMA address for
   readability. High address part of DMA would be 0 as nge(4)
   disabled 64bit DMA transfers so it's ok for DP83821.
o Removed volatile keyword in softc as bus_dmamap_sync(9) should
   take care of this.
o Removed extra driver private structures in descriptor ring. These
   extra elements are not part of descriptor structure. Embedding
   private driver structure into descriptor ring is not good idea
   as its size may be different on 32bit/64bit architectures.
o Added miibus_linkchg method handler to catch link state changes.
o Removed unneeded nge_ifmedia in softc. All TBI access is handled
  in gentbi(4). There is no difference between TBI and non-TBI case
  now.
o Removed "gigabit link up" message handling in nge_tick. Link
  state change notification is already performed by mii(4) and
  checking link state by accessing PHY registers in periodic timer
  handler of driver is wrong. All link state and speed/duplex
  monitoring should be handled in PHY driver.
o Use our own timer for watchdog instead of if_watchdog/if_timer
  interface.
o Added hardware MAC statistics counter, users canget current MAC
  statistics from dev.nge.%d.stats sysctl node(%d is unit number of
  a device).
o Removed unused macros, NGE_LASTDESC, NGE_MODE, NGE_OWNDESC,
  NGE_RXBYTES.
o Increased number of Tx/Rx descriptors from 128 to 256. From my
  experience on gigabit ethernet controllers, number of descriptors
  should be 256 or higher to get an optimal performance on gigabit
  link.
o Increased jumbo frame length to 9022 bytes to cope with other
  gigabit ethernet drivers. Experimentation shows no problems with
  9022 bytes.
o Removed unused member variables in softc.
o Switched from bus_space_{read|write}_4 to bus_{read|write}_4.
o Added support for WOL.
2009-05-21 02:12:10 +00:00
Andrew Thompson
fadc970b77 Fix a few variable renames of usb2_mode outside dev/usb. 2009-05-21 02:09:12 +00:00
Andrew Thompson
9360ae4073 Rename the usb sysctl tree from hw.usb2.* back to hw.usb.*.
Submitted by:	Hans Petter Selasky
2009-05-21 01:48:42 +00:00
Andrew Thompson
8d2dd5dd85 Use enums for speed and rev data types. 2009-05-21 01:05:21 +00:00
Andrew Thompson
f29a072444 - rename usb2_mode to usb_mode [1]
- change variable types to use the enum

Submitted by:	Hans Petter Selasky [1]
2009-05-21 00:04:17 +00:00
Sam Leffler
74904f7d58 update for net80211 rx api change 2009-05-20 23:33:40 +00:00
Warner Losh
68fc5ce70b Revert last junk... 2009-05-20 22:28:55 +00:00
Warner Losh
89c81b88f1 Revert junk from last commit. These are WIP and not ready (and don't
match the description of the last commit).
2009-05-20 22:00:39 +00:00
Warner Losh
9e31449738 Last commit was in error, revert. 2009-05-20 21:31:47 +00:00
Sam Leffler
5463c4a485 Overhaul monitor mode handling:
o replace DLT_IEEE802_11 support in net80211 with DLT_IEEE802_11_RADIO
  and remove explicit bpf support from wireless drivers; drivers now
  use ieee80211_radiotap_attach to setup shared data structures that
  hold the radiotap header for each packet tx/rx
o remove rx timestamp from the rx path; it was used only by the tdma support
  for debugging and was mostly useless due to it being 32-bits and mostly
  unavailable
o track DLT_IEEE80211_RADIO bpf attachments and maintain per-vap and
  per-com state when there are active taps
o track the number of monitor mode vaps
o use bpf tap and monitor mode vap state to decide when to collect radiotap
  state and dispatch frames; drivers no longer explicitly directly check
  bpf state or use bpf calls to tap frames
o handle radiotap state updates on channel change in net80211; drivers
  should not do this (unless they bypass net80211 which is almost always
  a mistake)
o update various drivers to be more consistent/correct in handling radiotap
o update ral to include TSF in radiotap'd frames
o add promisc mode callback to wi

Reviewed by:	cbzimmer, rpaulo, thompsa
2009-05-20 20:00:40 +00:00
Joel Dahl
498a9afee2 Slightly adjust copyright text.
Approved by:	matk
2009-05-20 18:38:43 +00:00
Joel Dahl
e05a128eb7 Remove license clauses 3 and 4 as per rev. 1.65 of midi.c in NetBSD.
Approved by:	matk
2009-05-20 18:34:26 +00:00
Joel Dahl
4367b59545 Remove license clauses 3 and 4 as per rev. 1.65 of auvia.c in NetBSD. 2009-05-20 18:31:11 +00:00
Joel Dahl
1d631ee69a Remove license clauses 3 and 4 as per rev. 1.112 of uaudio.c and rev. 1.15 of
uaudioreg.h in NetBSD.
2009-05-20 18:15:13 +00:00
Joel Dahl
ba55ca9732 Remove license clauses 3 and 4 as per rev. 1.12 of cs4231reg.h in NetBSD. 2009-05-20 18:04:56 +00:00
Warner Losh
00b4e54ae7 We no longer need to use d_thread_t, migrate to struct thread *. 2009-05-20 17:29:21 +00:00
Andrew Thompson
6f6932dc0b Use defines for register offsets that do not change.
Submitted by:	Hans Petter Selasky
2009-05-20 17:03:12 +00:00
Andrew Thompson
7eaa41aed8 - Add new register definitions
- Enable the controller and wait for the PLL to start

Submitted by:	Hans Petter Selasky
2009-05-20 17:00:55 +00:00
Andrew Thompson
b28838a861 The register shift is not needed on this controller.
Submitted by:	Hans Petter Selasky
2009-05-20 16:58:53 +00:00
Alexander Motin
74150c398a Fix NULL dereference on Promise SX4 controllers, while executing commands
that do not require data transfer (FLUSHCACHE).

Tested by:	Magnus Kling <klingfon@gmail.com>
MFC after:	1 week
2009-05-20 09:44:32 +00:00
Weongyo Jeong
e557e68088 try to unsetup USB xfers before calling ieee80211_ifdetach() to fix a
bug referencing a destroyed lock within TX callbacks during device
detach.

Submitted by:	hps (original version)
Tested by:	Lucius Windschuh <lwindschuh at googlemail.com>
2009-05-20 03:49:16 +00:00
Pyun YongHyeon
e32035ce1e pci(4) handles PCIM_CMD_INTxDIS so there is no need to poke this
bit in driver.
2009-05-20 03:33:27 +00:00
Sam Leffler
3f51a18229 correct HAL_INT_BNR comment, this bit is mapped directly the h/w now 2009-05-19 17:54:32 +00:00
Sam Leffler
210411e0f1 add TBTT interrupt support; this was added in Griffin so consumers should
check HAL_CAP_INTRMASK before using it

NB: didn't test 11n parts yet so supported only for 5212-class parts
2009-05-19 17:53:53 +00:00
Sam Leffler
00e602a997 minor cleanup 2009-05-19 17:43:31 +00:00
Sam Leffler
88608a2211 remove special handling for BNR; it is direct mapped to the harwdare so
can be added to HAL_INT_COMMON except on the 5210 where it doesn't exist
2009-05-19 17:35:15 +00:00
Sam Leffler
683f31342d add HAL_CAP_INTRMASK to return the set of interrupts supported by the device 2009-05-19 17:30:13 +00:00
Scott Long
7b6d3d4c7b Updated PCI ID's from the vendor 2009-05-19 01:41:11 +00:00
Marcel Moolenaar
dbb95048da Add cpu_flush_dcache() for use after non-DMA based I/O so that a
possible future I-cache coherency operation can succeed. On ARM
for example the L1 cache can be (is) virtually mapped, which
means that any I/O that uses temporary mappings will not see the
I-cache made coherent. On ia64 a similar behaviour has been
observed. By flushing the D-cache, execution of binaries backed
by md(4) and/or NFS work reliably.
For Book-E (powerpc), execution over NFS exhibits SIGILL once in
a while as well, though cpu_flush_dcache() hasn't been implemented
yet.

Doing an explicit D-cache flush as part of the non-DMA based I/O
read operation eliminates the need to do it as part of the
I-cache coherency operation itself and as such avoids pessimizing
the DMA-based I/O read operations for which D-cache are already
flushed/invalidated. It also allows future optimizations whereby
the bcopy() followed by the D-cache flush can be integrated in a
single operation, which could be implemented using on-chips DMA
engines, by-passing the D-cache altogether.
2009-05-18 18:37:18 +00:00
Warner Losh
f4fcd5ddec Remove unnecessary comments. 11A read/write is the same: its just the
classic indirect register dance.

Submitted by:	ddkprog at yahoo not com
2009-05-18 15:46:34 +00:00
Warner Losh
b16a8a5859 Fix a typo from the original driver. We need to write ctrl2 into RF
register 0x52, not ctrl1.  This appears to be a mistake in the bcm
reverse engineering page, and has been corrected there.  Tracing
through the code, this is more in keeping with the "documented"
register. Sephe thinks it looks interesting and may be worth
fixing. :)

Submitted by:	ddkprog at yahoo com
Reviewed by:	Sepherosa Ziehau
2009-05-18 15:31:26 +00:00
Pyun YongHyeon
a315e86aad Remove extra parenthesis used in macros. These macros are not used
in driver, though.
2009-05-18 07:13:42 +00:00
Pyun YongHyeon
056e0442f6 Consistently use tab characters instead of spaces. 2009-05-18 07:10:48 +00:00
Pyun YongHyeon
6f94c0fd17 style(9) 2009-05-18 07:04:03 +00:00
Pyun YongHyeon
3929ff51cf s/u_int8_t/uint8_t/g
s/u_int16_t/uint16_t/g
s/u_int32_t/uint32_t/g
2009-05-18 06:32:38 +00:00
Pyun YongHyeon
25d7155f3d style(9) - space after keyword. 2009-05-18 06:19:17 +00:00
Pyun YongHyeon
2da9a170c0 Remove return statement at the end of functions that return void. 2009-05-18 06:13:56 +00:00
Pyun YongHyeon
a13d350293 Remove trailling whitespaces. 2009-05-18 06:09:10 +00:00
Pyun YongHyeon
2cf2d79999 Remove register keyword. 2009-05-18 06:05:50 +00:00
Pyun YongHyeon
284c81cbcb Use ANSI C declarations for all functions. 2009-05-18 06:02:54 +00:00
Adrian Chadd
3a5391225b The merge in r189699 reverted part of the work done in a previous commit
(r188036.)

Re-revert that change so the Xen networking functions again.
2009-05-18 04:56:37 +00:00
Adrian Chadd
aa6aea0715 Disable some un-needed console debugging. 2009-05-18 04:50:31 +00:00
Xin LI
ab7b2d927c DMA synchronization fixes:
- In bce_rx_intr(), use BUS_DMASYNC_POSTREAD instead of
   BUS_DMASYNC_POSTWRITE, as we want to "read" from the
   rx page chain pages.
 - Document why we need to do PREWRITE after we have updated
   the rx page chain pages.
 - In bce_intr(), use BUS_DMASYNC_POSTREAD and
   BUS_DMASYNC_PREREAD when before and after CPU "reading"
   the status block.
 - Adjust some nearby style mismatches/etc.

Pointed out by:	yongari
Approved by:	davidch (no objection) but bugs are mine :)
2009-05-18 01:51:52 +00:00
Warner Losh
e9902ec0a6 Correct types of PHY, per http://bcm-specs.sipsolutions.net/PHYVersioning
# Note: The driver doesn't support either these PHY types, so this is
# effectively a nop.

Submitted by:	"ddk"
Obtained from:	http://paradox.lissyara.su/bwi.diff
2009-05-18 01:07:38 +00:00
Warner Losh
e9d57f2fd1 Turns out that my BCM4318 has a PCI ID of 0x4319, which lead me to
believe it was a BCM4319.  However, it is the a/b/g variation of the
BCM4318.  The chip itself is labelled BCM4318EKFBG, and the board is
BCM94318MKABG.

Paradox's patch includes the type of 802.11 wireless for each card,
but changes all the names (I don't think the latter is quite right).
Import that part of the patch, but keep the current set of BCM names
(with a minor tweak for the 4306 ones). I'll need to verify them via
some other means.

Obtained from:	http://paradox.lissyara.su/bwi.diff (partially)
2009-05-18 01:00:11 +00:00
Sam Leffler
afb8a6b500 add TRENDnet TEW-504UB/EU
Submitted by:	Lucius Windschuh <lwindschuh@googlemail.com>
2009-05-17 19:51:08 +00:00
Sam Leffler
f61336e4cb fix 11a channel use; mark OFDM operation correctly
Submitted by:	Lucius Windschuh <lwindschuh@googlemail.com>
2009-05-17 19:46:50 +00:00
Christian Brueffer
f633d09533 Add a missing break in a switch statement.
Found with:	Coverity Prevent(tm)
CID:		4302
MFC after:	2 weeks
2009-05-15 21:06:28 +00:00
Warner Losh
b8f5836a3c The module name convention is foo, not if_foo. 2009-05-15 17:02:11 +00:00
Warner Losh
16dcc9ce77 Cleanup module declarations:
Use "bwi" consistently
	No need to have separate cardbus attachment
	No need to declare a module version
2009-05-15 16:38:42 +00:00
Ed Schouten
983d12f39b Turn consolectl into a simple device node, not a TTY.
Apart from the 16 virtual terminals, Syscons allocates two device nodes
that should not really be TTYs, even though they are. One of them is
consolectl. In RELENG_7 and before, these device nodes are used in
single user mode. After I simplified input path, we only use this device
node to call ioctl() on (moused, Xorg, vidcontrol).

When you call ioctl() on consolectl, it will behave the same as being
called on the first window.
2009-05-15 14:30:37 +00:00
Xin LI
9fe569d8f9 Some comment/space changes (FALLTHRU -> FALLTHROUGH, space after while). 2009-05-14 22:36:56 +00:00
Xin LI
25e13e6895 Try to workaround a race where bge_stop() may sneak in when bge_rxeof()
drops and re-grabs the softc mutex in the middle, resulting in kernel
trap 12.  This may happen when a lot of traffic is being hammered on
one bge(4) interface while the system is shutting down.

Reported by:	Alexander Sack <pisymbol gmail com>
PR:		kern/134548
MFC After:	2 weeks
2009-05-14 22:33:37 +00:00
John Baldwin
bb2aebf3ad - Add a void pointer to the ata-pci controller softc to allow
chipset-specific code to attach chipset-specific data.
- Use chipset-specific data in the acard and promise chipsets rather than
  changing the ivars of ATA PCI devices.  ivars are reserved for use by the
  parent bus driver and are _not_ available for use by devices directly.
  This fixes a panic during sysctl -a with certain Promise controllers with
  ACPI enabled.

Reviewed by:	mav
Tested by:	Magnus Kling (kingfon @ gmail) (on 7)
MFC after:	3 days
2009-05-14 14:57:13 +00:00
Christian Brueffer
3af3ff479b Compare the correct variable against NULL.
Reviewed by:	scottl
Found with:	Coverity Prevent(tm)
CID:		821
MFC after:	2 weeks
2009-05-14 13:32:33 +00:00
Kip Macy
8222d237cb Call drbr_stats_update to update ifp stats directly when we bypass the buf_ring on transmit 2009-05-14 03:33:04 +00:00
Dag-Erling Smørgrav
e872228f51 Snip redundant assignment.
Approved by:	scottl
MFC after:	2 weeks
Coverity ID:	3863
2009-05-13 22:31:25 +00:00
Ed Schouten
aa16f86ca5 Keep this line shorter than 80 columns. 2009-05-13 19:29:50 +00:00
Oleksandr Tymoshenko
ecd6163338 - Make SPI bus bridge be non-arch dependent by using more generic
name

Reviewed by:	imp
2009-05-13 18:42:49 +00:00
Oleksandr Tymoshenko
ab88d607a5 - Remove nonexistent header file from includes list 2009-05-13 18:31:28 +00:00
Andrew Thompson
7261357fbc Ensure the bmRequestType is the right type for the incoming control request.
Submitted by:	Hans Petter Selasky
2009-05-13 18:26:55 +00:00
Andrew Thompson
8ea86e467f Add parenthesis around the xfer macro argument.
Submitted by:	Hans Petter Selasky
2009-05-13 18:25:14 +00:00
Andrew Thompson
ecf65ed434 Make sure collections have the usage field set.
Submitted by:	Hans Petter Selasky
2009-05-13 18:06:52 +00:00
Andrew Thompson
07532e4997 Check the correct variable for IO_NDELAY.
Submitted by:	Hans Petter Selasky
2009-05-13 18:05:40 +00:00
Andrew Thompson
c773c25419 Add debug lines for fullspeed and highspeed xfer completion.
Submitted by:	Hans Petter Selasky
2009-05-13 18:04:51 +00:00
Andrew Thompson
3a67e91430 Sync to P4
Add umass quirks for Alcor AU6390, Cypress PATA 6830XX and MPMan MPF400.

Submitted by:	Hans Petter Selasky
2009-05-13 18:03:23 +00:00
Andrew Thompson
f1f8840814 The transfer must return USB_ERR_CANCELLED when the device is gone due to the
way usb drivers work.

Submitted by:	Hans Petter Selasky
2009-05-13 17:58:37 +00:00
Nathan Whitehorn
8553eea5ce Add a comment to motivate my last change.
Suggested by:	sam, imp
2009-05-13 16:19:05 +00:00
Warner Losh
d47f0d75af ifp->if_softc is managed entirely by the driver. We never set it to
NULL or change it.  We initialize it before we set if_ioctl.  It can
therefore never be NULL, and most other drivers don't bother with this
sanity check.
2009-05-13 14:43:26 +00:00
Nathan Whitehorn
0a594d9ecc Add a short delay after programming PHY registers to give some time for
the engine to catch up. This prevents a machine check exception from
illegal memory requests with a BCM4318.
2009-05-13 14:25:55 +00:00
Christian Brueffer
e831cd36d0 Remove unused variables.
Found with:	Coverity Prevent(tm)
CID:		544, 545
2009-05-12 23:22:58 +00:00
Christian Brueffer
6282e61346 Remove unused variable.
Found with:	Coverity Prevent(tm)
CID:		549
2009-05-12 19:33:36 +00:00
Christian Brueffer
75c4b82c36 Remove unused variable.
Found with:	Coverity Prevent(tm)
CID:		550
2009-05-12 19:30:46 +00:00
Edward Tomasz Napierala
f095d54f01 Remove dead code.
Found with:	Coverity Prevent(tm)
CID:		556
2009-05-12 16:39:43 +00:00
Kip Macy
24df53962e fix bug introduced by last change
Submitted by:	Navdeep Parhar
2009-05-12 03:30:25 +00:00
Weongyo Jeong
922f7c5c21 Add WUSB54AG and XM142 entries for upgt(4) 2009-05-12 02:05:42 +00:00
Kip Macy
673d9d33eb don't acquire tty lock with console lock held 2009-05-11 23:03:15 +00:00
Kip Macy
94a24e4240 xen console lock needs to be a spin lock in case it is acquired from an interrupt context 2009-05-11 22:55:49 +00:00
Ed Schouten
7fb6f68587 Add macros around the sx operations in snp(4).
As an experiment, I changed snp(4) to use a mutex instead of an sx lock.
We can't enable this right now, because Syscons still picks up Giant.
It's nice to already have the framework there.
2009-05-11 18:52:46 +00:00
Warner Losh
d83d76df1f Update a few XXX comments
Submitted by:	ddk ddk ddkprog at yahoo dot com
2009-05-11 17:13:52 +00:00
Weongyo Jeong
879f0eff53 ports upgt(4) driver for USB2. 2009-05-11 02:39:49 +00:00
Marius Strobl
0ec607133b Change uses of the struct ccb_hdr timeout_ch missed when isp(4) was
adapted to MPSAFE cam(4) to a isp(4) specific callout structure.
Thanks to Florian Smeets for providing access to a machine exhibiting
this problem for debugging.

Approved by:	mjacob
MFC after:	3 days
2009-05-10 20:14:19 +00:00
Andrew Thompson
e1d2045e3f Abort any scan on a fatal firmware. ic_scan_curchan is overridden to perform
the scan in firmware and this relies on the firmware to wake up the scan task
on completion.
2009-05-10 02:44:19 +00:00
Sam Leffler
853569c6ec push wme parameter setting to the taskq thread; the update callback from
net80211 can happen from the ithread and submitting the fw cmd requires
a sleepable context
2009-05-09 19:22:37 +00:00
Warner Losh
ec54a3a337 Unmark the ASR Compat IOCTLs as BURN_BRIDGES, per scottl@ 2009-05-09 17:47:42 +00:00
David Christensen
8ef3f835d2 - Fixed incorrect packet length problem caused be earlier change to
support ZERO_COPY_SOCKETS.
- Created #define for context initialization retry count.

MFC after:	1 week
2009-05-08 22:20:45 +00:00
Andrew Thompson
b569d2132e Drain the tasks before the interface stop call in case a restart was queued. 2009-05-08 13:44:33 +00:00
Alexander Motin
6e8e2779b3 Add one more board ID with inverted external amplifier control.
PR:		kern/121156
2009-05-08 03:19:57 +00:00
Sam Leffler
b4307a77d2 kill more portability functions that are no longer useful 2009-05-08 00:23:00 +00:00