Commit Graph

6397 Commits

Author SHA1 Message Date
cegger
150dcfcbbb Yukon chips support flow-control. Tested on Yukon Lite chip.
ok cube@
2009-02-12 10:22:30 +00:00
cegger
a4f75ff6c2 age_dma_free: set smb pointers to NULL for consistency
age_stop: call mii_down()
ok cube@
2009-02-11 16:15:59 +00:00
markd
90459b5b45 Add some more ICH9 SATA controller variants. 2009-02-11 06:39:43 +00:00
markd
7bb4356373 regen 2009-02-11 06:36:21 +00:00
markd
10f2846ed4 Add more ICH9 SATA controller variants 2009-02-11 06:35:16 +00:00
nonaka
9d853f68dd fix comment. 2009-02-09 12:11:16 +00:00
jakllsch
1db353a59c regen. 2009-02-06 19:40:31 +00:00
jakllsch
3b951f1af8 Add TI PCIxx12-series product IDs. 2009-02-06 19:36:35 +00:00
dyoung
e7aed4b441 When the power status changes, always note the change and wake the
socket events thread.  Sometimes we would not note the power-status
change if the socket also indicated a change in card status.
2009-02-06 01:15:53 +00:00
dyoung
1121b32c97 If the bus_dmamap_load_mbuf() status was non-zero, then the DMA
map is undefined, so do not try to unload it.
2009-02-05 23:56:57 +00:00
dyoung
4bb08aca8c Initialize ec_mii, and re-use more ethernet common code for media
handling.

Replace an anonymous constant by PCI_COMMAND_INTERRUPT_DISABLE.

These changes have been compile-tested, only.
2009-02-05 21:40:46 +00:00
pgoyette
7eb6f514e7 Update the i2c_exec() functions to handle quick_read/quick_write protocol.
Although interface routines i2c_smbus_*() exist, nothing in NetBSD actually
uses them yet.
2009-02-03 16:27:13 +00:00
cegger
9e46f319a5 Adapt age_stop() as our ethernet stack expects it.
This makes 'ifconfig age0 down' working.
Ok cube@
2009-02-03 16:13:34 +00:00
tsutsui
849e430f36 Remove obsolete #if defined(LKM) block. PR kern/40513 2009-02-02 15:57:51 +00:00
bouyer
af9cd4822a Under some circunstance, the JMC250A2 (and maybe others) can enter a state
where INTA is asserted while no enabled interrupts are pending, which
cause a continous strean if interrupts with no way to clear it.
Clearing/resetting the enabled interrupt mask in the interrupt handler seems
to workaround this issue (this is what the FreeBSD driver does).
While there properly return 0 if the interrupt was not for us, and explicitely
disable JME_TMCSR in addition to TIMER1 and TIMER2.
2009-01-31 13:57:03 +00:00
cegger
fac6f4dc2d age_dma_alloc(): Don't allocate more than really required.
It is less likely to fail with ENOMEM when we are short on dma-safe memory.
This happens more likely when running NetBSD as Xen Dom0.
2009-01-30 16:16:36 +00:00
he
2c8025012d Make fibre cards, at least 5701 models, work, by initializing the
bge_ifmedia.ifm_media field, which is not done by ifmedia_set().
Patch lifted from FreeBSD's revision 1.71.
2009-01-30 15:01:19 +00:00
cegger
2caf306c7c age_dma_alloc(): print error code to figure out why it failed. 2009-01-30 08:57:35 +00:00
cegger
2042e8e4e8 remove brackets from return statements.
No functional change.
2009-01-30 08:46:25 +00:00
cegger
54411cb3fc fix error path: don't crash when age_dma_alloc() fails. 2009-01-29 17:03:37 +00:00
dyoung
6ebb93d58e Protect against spurious "bnx0: Double mbuf allocation failure!"
panics.

Extract a new function, bnx_add_buf(), from bnx_get_buf().
bnx_add_buf() just tries to add an mbuf to the Rx chain.  bnx_get_buf()
tries to allocate an mbuf, first, and then to add the mbuf to the
chain.  Use bnx_add_buf() to try to put an mbuf that we took off
of the chain back onto the chain, and use bnx_get_buf() everywhere
else.

This change seems to be in keeping with the author's intent, but
it looks like the code broke at some point.

Thanks to Jarle Greipsland, David Dudley, and others for reporting
this bug and for testing patches.
2009-01-27 21:15:38 +00:00
markd
70250ff52e Add some more Intel G4X class chipsets. Also fix gtt_size for G4X chipsets.
Partially from FreeBSD.   There is still an issue here as G4X chipsets
report an aperture size of 0.
2009-01-27 08:39:33 +00:00
markd
be346f80ff Add Analog Devices AD1984A and treat like AD1984. 2009-01-27 08:23:00 +00:00
markd
7c98b7ee1a Add i82567LM-3 2009-01-27 08:18:04 +00:00
markd
152cb9db85 regen 2009-01-27 08:07:43 +00:00
markd
a62cbc5202 Add Intel 82567LM_3 ethernet 2009-01-27 08:04:54 +00:00
cegger
e3f5192d4c - fix test for IPv4 csum.
- No need to double negate TCP/UDP csum test
2009-01-24 08:31:03 +00:00
cegger
bbb2be253d Improve handling of transmitting large packets.
Sending large packets works better, but still needs investigations.
2009-01-23 22:59:30 +00:00
cegger
f21b8480ba struct device -> device_t 2009-01-22 09:39:28 +00:00
cegger
ea6211cb91 fix crash when bringing up the device and no cable is plugged in 2009-01-22 09:37:44 +00:00
jnemeth
5a2d34426b add a comment explaining how to regenerate pcidevs.h and pcidevs_data.h 2009-01-21 14:10:10 +00:00
cegger
2f997eedf3 Roll our own ETHER_ALIGN #define like many other driver do.
Use ETHER_ALIGN to calculate number of segments correctly (actually the same way as FreeBSD and OpenBSD do).
Also use ETHER_ALIGN to correctly adjust new mbufs.
This makes the driver finally work. Tested by Jochen Kunz:
ping -nf 192.168.2.1
PING 192.168.2.1 (192.168.2.1): 56 data bytes

----192.168.2.1 PING Statistics----
28949 packets transmitted, 28949 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.157/0.364/2.272/0.023 ms
  2710.6 packets/sec sent,  2710.6 packets/sec received


XXX Shouldn't if_ether.h provide ETHER_ALIGN instead of defining it in all drivers?
2009-01-21 07:48:54 +00:00
jmcneill
b7ae31c476 Decode and display PCI Power Management registers when available. 2009-01-20 13:54:43 +00:00
jmcneill
0c302519a0 regen for Attansic L1E Gigabit Ethernet Adapter 2009-01-19 15:04:24 +00:00
jmcneill
371a1b3043 Attansic L1E Gigabit Ethernet Adapter 2009-01-19 15:03:50 +00:00
cegger
946c49f6ac fix botched age_ioctl(): don't try to roll its own handling when ether_ioctl() is doing all of it right.
Tested by Jochen Kunz.
2009-01-18 21:24:44 +00:00
cegger
97f2088ea7 beautify dmesg output 2009-01-18 18:55:38 +00:00
cegger
d5fc4888bc Bracket IRQ masking around nfe_intr() in nfe_init() rather inside nfe_intr().
Proposed by dyoung@ in PR 40345. Should fix PR 40345.
2009-01-18 11:21:06 +00:00
cegger
94a79c95d5 Use aprint_error_dev. Eliminates XNAME macro. 2009-01-18 10:40:40 +00:00
mrg
71e27a6efb The PCI revision numbers are unique to a PCI vendor/product
ID pair.  Misuse of the revision numbers was causing some of the chip
features to be disabled on some integrated Intel chips.  So, move the
determination of the features into the bus frontend, where the
vendor/product ID is known.  (Note: sc_rev should be removed.  The
microcode patch stuff is also busted and needs to be fixed.)  Also,
poll the actual flow control status in inphy, rather than making
assumptions.

contributed anonymously.
2009-01-18 10:37:03 +00:00
mrg
94ed4b4374 Don't attempt to unload a DRM device that's in use. (Note:
Unloading doesn't work right in any case -- it doesn't clean up the
sysctl tree, among other things.  This code needs Work, but at least
this prevents it crashing randomly due to autounload while X is
running.)  Also, fix the dependency list for radeondrm.

contributed anonymously.
2009-01-18 10:04:35 +00:00
mrg
dff35a2418 Enable flow control and poll the status appropriately.
contributed anonymously.
2009-01-18 10:00:51 +00:00
cegger
7971844bd8 Until we do WOL, the PCI power management suspend code is a noop. 2009-01-17 00:02:40 +00:00
cegger
8023f7432d don't call age_stop and age_init in suspend/resume.
pmf network class is already doing that.
pointed out by jmcneill
2009-01-16 23:58:05 +00:00
cegger
09bd2fda5c rename PCI_PMCSR_PME to PCI_PMCSR_PME_STS.
Per request from jmcneill
2009-01-16 23:23:34 +00:00
cegger
fe069f5185 - fix age_read_vpd_word().
- add power management support. From FreeBSD.
2009-01-16 23:10:32 +00:00
cegger
53033e6af4 add Power Management flag. From FreeBSD. 2009-01-16 23:09:27 +00:00
cegger
31614b9ad8 add RCSID 2009-01-16 21:47:56 +00:00
cegger
0da9122630 age driver needs mii_phy 2009-01-16 21:11:27 +00:00
cegger
32b43f4cc8 Driver for Attansic L1 gigabit ethernet driver.
Written by Pyun YongHyeon for FreeBSD, ported to DragonFlyBSD
by Sepherosa Ziehau, ported to OpenBSD by Kevin Lo and then
ported to NetBSD by me.

XXX Driver needs testing.
2009-01-16 20:18:08 +00:00