Commit Graph

16098 Commits

Author SHA1 Message Date
simokawa
9c6071b7a1 Configuration ROM length should be unsigned.
MFC: 1 week
2007-04-24 12:15:05 +00:00
sephe
3d6a615c77 Nuke unnecessary setting of ural(4)'s security registers. ural(4) only
supports software encrypt/decrypt.

The nuked code itself is quite problematic, as pointed out by sam@ ---
wk->wk_keyix should be replaced by the loop count.

Tested with WEP/TKIP/CCMP/no-protection.

Approved by:	sam@ (mentor)
Noticed by:	Hans Petter Selasky <hselasky@c2i.net>
2007-04-24 11:18:55 +00:00
phk
0edeffe864 Make it possible to specify an initial state for the LED.
Requested by:	Henrik Brix Andersen <henrik@brixandersen.dk>
PR:	112008
2007-04-23 12:42:15 +00:00
phk
1c3ed182bc Add VLAN capability.
Submitted by:	Slawa Olhovchenkov <slw@zxy.spb.ru>
2007-04-23 12:19:02 +00:00
sam
b2ba6c9d1d make dev.ath.N.ledpin have an immediate effect
PR:		kern/111810
Submitted by:	Henrik Brix Andersen <henrik@brixandersen.dk>
MFC after:	1 week
2007-04-23 05:57:06 +00:00
phk
c729a4c68d Remove the old software bit-banging MII interface, we started using
the Rhines shiftregisters in four years ago (1.60).
2007-04-22 15:58:56 +00:00
phk
ac1868addb Remove further cobwebs: Two layers of pointless substructures. 2007-04-22 15:48:29 +00:00
phk
db8dcec801 Initialize the physical next pointer in the tx descriptors when we
initialize instead of in the start routine.
2007-04-22 15:09:03 +00:00
phk
fc0fe76a27 Don't rename fields with #define.
Collapse two semantically identical structs.
Add missing vr_ prefix.
2007-04-22 14:57:05 +00:00
phk
1c813951d5 Run if_vr(4) through FlexeLint and clean some of the cobwebs found. 2007-04-22 12:55:36 +00:00
kmacy
60e4196f37 Free cluster if we fail to create the dmamap.
Fixes CID 1829
Found by: Coverity
2007-04-20 05:16:42 +00:00
kmacy
17fde132b6 Eliminate CID 1842 by comparing against (type != EXT_MBUF) => refcnt != NULL 2007-04-20 05:12:54 +00:00
kmacy
f49e46301b Fix memory leak in m_collapse (CID 1843)
Found by: Coverity
Submitted by: jhb
2007-04-20 05:06:02 +00:00
ariff
327fac0f6f Unbreak module / driver attach breakage. Both snd_envy24 and snd_envy24ht
mistakenly rely on wrong snd_spicds version.
2007-04-20 01:28:51 +00:00
scottl
e9f0701090 Up until now, the free SCB pool received only a small initial allocation,
and new SCBs were allocated on demand later if needed.  This has two
problems.  First, allocating SCBs involves allocating contiguous memory,
and if memory is exhausted then the VM will try to page out to satisfy
the request, leading to recursion and deadlock.  The second problem is
that it can cause lock order reversals due to parts of the VM still being
under Giant.

Fix the problem be allocating the full pool at driver attach, when it is
safe to do so.
2007-04-19 18:53:52 +00:00
ariff
d81e54ad86 - AC97 quirk / patch cleanups. Most quirks doesn't work in general sense
and should only be applied on certain specific card / vendor, hence the
  addition of ac97_getsubvendor().
- Fix low volume issue on several MSI laptops through ALC655 quirk.

Reported/Tested by:	Christian Mueller
                   	<raptor-freebsd-multimedia@xpls.de>
MFC after:		1 week
2007-04-19 13:54:22 +00:00
sephe
f9d2951cad - Fix mbuf/node leakage in drivers' raw_xmit().
- For ural(4):
  o  Fix node leakage in ural_start(), if ural_tx_mgt() fails.
  o  Fix mbuf leakage in ural_tx_{mgt,data}(), if usbd_transfer() fails.
  o  In ural_tx_{mgt,data}(), set ural_tx_data.{m,ni} to NULL, if
     usbd_transfer() fails, so they will not be freed again in ural_stop().

Approved by:	sam (mentor)
2007-04-19 13:09:57 +00:00
jkoshy
4552216c34 Fix witness(4) warnings about mutex use.
Group mutexes used in hwpmc(4) into 3 "types" in the sense of
witness(4):

 - leaf spin mutexes---only one of these should be held at a time,
   so these mutexes are specified as belonging to a single witness
   type "pmc-leaf".

 - `struct pmc_owner' descriptors are protected by a spin mutex of
   witness type "pmc-owner-proc".  Since we call wakeup_one() while
   holding these mutexes, the witness type of these mutexes needs
   to dominate that of "sleepq chain" mutexes.

 - logger threads use a sleep mutex, of type "pmc-sleep".

Submitted by:	wkoszek (earlier patch)
2007-04-19 08:02:51 +00:00
ariff
7583ed7e77 sndbuf_alloc() now accept dmaflags argument which will be forwarded to
internal bus_dmammem_alloc() for greater flexibility on setting up DMA /
page attributes.
2007-04-18 18:26:41 +00:00
ariff
bbf615a391 Break ABI / module compatibility for the upcoming sndbuf_alloc() changes. 2007-04-18 18:20:48 +00:00
scottl
a40b57339d Revert a driver API change to xpt_alloc_ccb that isn't necessary. Fix a
couple of associated error checks.
2007-04-18 04:58:53 +00:00
yongari
8c9ec0ed49 Don't reinitialize the hardware if only PROMISC flag was changed.
Previously whenever PROMISC mode turned on/off link renegotiation
occurs and it could resulted in network unavailability for serveral
seconds.(Depending on switch STP settings it could last several tens
seconds.)

Reported by:	Prokofiev S.P.  < proks AT logos DOT uptel DOT net >
Tested by:	Prokofiev S.P.  < proks AT logos DOT uptel DOT net >
2007-04-18 00:40:43 +00:00
phk
b85dc1755d Add support for hw-assisted checksums on 6105M.
Sponsored by: Soekris Engineering
2007-04-17 22:59:54 +00:00
phk
f0a8f88e53 No need to throw tag+handle around on the stack. 2007-04-17 17:32:39 +00:00
phk
bb49ccc48c Improve the if_vr driver ever so slightly.
The 6105M and 6102 does not have the DWORD alignment problem, so
don't m_defrag() every packet in the transmit path for those.

More stringent usage of tx-descriptor ring and its flags.

Tested on 6102 and 6105M, other chips may also be able to run
without the m_defrag() but I have neither hardware nor docs to
find out.

Sponsored by:	Soekris Engineering
2007-04-17 12:23:57 +00:00
scottl
46e32eee32 Basic MPSAFE locking for the AHC and AHD drivers. 2007-04-17 06:26:25 +00:00
imp
5e201c93e8 Don't use spinlocks here. The iicbus transactions can take a long
time, and this prevents interrupts (say for Hz/hardclock) from
happening.  Time stands still during the transfers...
2007-04-17 05:48:35 +00:00
pjd
2ee778fb99 s/destory/destroy/ (except for the code in contrib/). 2007-04-16 12:31:35 +00:00
kmacy
b13ef47a11 PHYS_TO_VM_PAGE requires explicit vm_page.h include on sparc64 2007-04-15 22:17:10 +00:00
mjacob
e08f3ecf3c Use %j and args cast to uintmax_t to print bus_addr_t && length args. 2007-04-15 19:03:45 +00:00
kmacy
252acbdc5f Add pmap includes needed by i386 2007-04-15 15:30:45 +00:00
scottl
7605c12c0f Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will
use to synchornize and protect all data objects that are used for that
SIM.  Drivers that are not yet MPSAFE register Giant and operate as
usual.  RIght now, no drivers are MPSAFE, though a few will be changed
in the coming week as this work settles down.

The driver API has changed, so all CAM drivers will need to be recompiled.
The userland API has not changed, so tools like camcontrol do not need to
be recompiled.
2007-04-15 08:49:19 +00:00
kmacy
99993e1232 suck in more of busdma to enable more efficient mappings
kill redundant INVARIANTS check
2007-04-15 05:46:34 +00:00
kmacy
8d122756a5 Add sysctl for disabling/enabling mbuf chain collapsing
remove map creation before calling bus_dmamap_load_mvec_sg
2007-04-15 05:45:10 +00:00
kmacy
f6d283a04e Implement ZERO_COPY_SOCKETS check in a way that doesn't make LINT unhappy 2007-04-15 04:55:39 +00:00
kmacy
df7c6cd2a9 Add support for mbuf iovec in the TX path 2007-04-14 20:40:22 +00:00
kmacy
a8a962f8f6 add reference count pointer to mbuf iovec
implement robust version of m_collapse
add support for sf_buf
add fix for m_iovappend
add calls to m_sanity under INVARIANTS
fix m_freem_vec to correctly travese the mbuf iovec chain
2007-04-14 20:38:38 +00:00
maxim
149c919492 o Extend the list of supported CDMA-2000 terminals.
Submitted by:	R.Mahmatkhanov
MFC after:	10 days
2007-04-13 18:15:07 +00:00
kmacy
73a329aba9 restore sense to get_imm_packet
MFC after: 3 days
2007-04-12 04:48:54 +00:00
kmacy
70fb9b909b switch over to per-txq dma tag to facilitate parallelism on TX
MFC after: 3 days
2007-04-12 04:31:44 +00:00
kmacy
e5733cf7f2 explicitly check TSO flag
don't clear and then set M_PKTHDR, m_gethdr sets it correctly
improve error handling on m_gethdr failure

MFC after: 3 days
2007-04-12 03:33:30 +00:00
kmacy
560360bd84 Add ETHER_HDR_LEN to hardware accepted mtu
MFC after: 3 days
2007-04-12 03:07:24 +00:00
jhb
081fdb71d7 Fix m_freem_vec() to actually traverse the mbuf chain. This avoids
double free's and an infinite loop.

CID:		1834
Found by:	Coverity Prevent (tm)
2007-04-11 13:47:24 +00:00
yongari
8a4ba838b2 Add work around for hardware Tx checksum offload bug in Yukon II.
Yukon II generated corrupted TCP checksum for short TCP packets
that's less than 60 bytes in size(e.g. window probe packet, pure ACK
packet etc). Padding the frame with zeros to make the frame minimum
ethernet frame size didn't work at all. Instead of dropping Tx
checksum offload support we calculate TCP checksum with S/W method
when we encounter short TCP frames.
Fortunately it seems that short UDP datagrams appear to be handled
correctly by Yukon II.

While I'm here simplify ethernet/VLAN header size calculation logic.

PR:	111384
2007-04-11 00:47:29 +00:00
marius
b308662bf2 Let brgphy(4) attach for the Broadcom BCM5755 ASIC based chipsets
as well.

Obtained from:	OpenBSD
MFC after:	1 week
2007-04-10 20:43:23 +00:00
rwatson
fc1b9c146d Remove unnecessary suser() check in the sysctl to set up ath_hal
logging: the sysctl framework will already have checked for privilege
if a sysctl value is being set.

Discussed a long time ago with:	sam
2007-04-10 15:48:45 +00:00
kmacy
22667b1b7e throw sun4v into the check while we're at it 2007-04-09 17:05:54 +00:00
kmacy
4083aff7c8 busdma tags are opaque on all architectures except sparc64
for now simply don't compile/use on sparc64
2007-04-09 17:01:23 +00:00
kmacy
47ca069c43 Add missing paren 2007-04-08 22:56:18 +00:00
sos
331106ea12 OK, this is not my day, fix the former fix :/ 2007-04-08 21:53:52 +00:00