Commit Graph

2220 Commits

Author SHA1 Message Date
Warner Losh
6d431b17c9 Fix newer Xircom CBE2-100 cards that were reporting
dc0: MII without any PHY!
We have to enable the connection to the MII first.  Doing so fixes the
problem cards without breaking the older, working cards.

Bad card provided by: deischen
2005-04-18 03:31:29 +00:00
Matthew N. Dodd
c7ae8b4fa8 Invert conditional and use continue to reduce nesting. 2005-04-13 01:32:06 +00:00
David E. O'Brien
fd92279bef Add nForce3-250. 2005-04-08 18:04:39 +00:00
David E. O'Brien
824a5e96dc nVidia AGP chipsets beyond nForce2 are AMD64-specific.
So move the AGP support to there.

Submitted by:	Jung-uk Kim <jkim@niksun.com>
2005-04-02 01:10:09 +00:00
Scott Long
69bbb4fe70 If resource allocation fails, we could wind up freeing the cdev without it
being allocated.  Add a simple check for this.

Submitted by: yongari
2005-03-31 17:16:40 +00:00
David E. O'Brien
f6bb4f25a4 Bring rev 1.31 to the AMD64 platform.
This adds support for the SiS intergrated NIC on some Athlon64 motherboards.
The MAC address is stored in the APC CMOS RAM and this fixes the
sis driver ending up with a 00:00:00:00:00:00 MAC address.

Submitted by:	Stasys Smailys <ssmailys@komvista.lt>
2005-03-28 18:06:44 +00:00
Sam Leffler
52c94c38dc deal with malloc failure when setting up the multicast filter
Noticed by:	Coverity Prevent analysis tool
2005-03-26 23:26:49 +00:00
Sam Leffler
af5691cdd5 handle malloc failure and sk_vpd_prodname potentially being null for
other reasons

Noticed by:	Coverity Prevent analysis tool
Reviewed by:	bz, jmg
2005-03-26 22:57:28 +00:00
Ruslan Ermilov
77d23c9bc3 xl(4) meets polling(4). Hardware for this work kindly provided by
Eric Masson.

MFC after:	3 weeks
2005-03-26 20:22:58 +00:00
Scott Long
586cfbb265 Start the process of modernizing the Tigon driver by using busdma for the
descriptor and configuration data.  Thanks to Martin Nilsson for providing
hardware.
2005-03-21 07:17:27 +00:00
Bjoern A. Zeeb
e7f8ebb45e Do not try to free non allocated memory in error case.
Do our best to plug some memory leaks (VPD data, jumbo memory buffer,...).
Log if we cannot free because memory still in use[1].
Change locking to avoid ''acquiring duplicate lock of same
  type: "network driver"'' and potential deadlock. Also seems to fix LOR #063.

[1] This change does not solve problems if buffers are still in use when
    unloading if_sk.ko. There is ongoing work which will address jumbogram
    allocations in a more general way.

PR:		kern/75677 (with changes, no mii fixes in here)
Tested by:	net, Antoine Brodin (slightly different version)
Approved by:	rwatson (mentor)
MFC after:	5 days
2005-03-17 14:27:22 +00:00
Bjoern A. Zeeb
9f0877efe3 * Lower interrupt moderation timer 200->100.
Obtained from:	NetBSD if_sk.c rev. 1.11

* Make interrupt moderation configurable via sysctl/tuneable.
PR:		kern/41220
Approved by:	rwatson (mentor)
2005-03-17 14:23:13 +00:00
Bjoern A. Zeeb
2dfd4c0a21 * Improve chip identification.
Obtained from:	NetBSD if_sk.c rev. 1.11

* Take PHY out of reset for Yukon Lite Rev. A3.
Submitted by:	postings on net@ in thread "skc0: no PHY found", 2005-02-22

Tested by:	net
Approved by:	rwatson (mentor)
MFC after:	5 days
2005-03-17 14:21:51 +00:00
Bjoern A. Zeeb
d34019b31e * When adding/deleting multicast addresses, only whack the address filter
if the interface is marked RUNNING.
Obtained from:	NetBSD if_sk.c rev. 1.12

* Don't initialize the card (and start an autonegotiation) every time the IP
  address changes. Makes 'dhclient sk0' invocations way faster and more
  consistant. i.e. one DHCPREQUEST elicits the DHCPACK.
Obtained from:	OpenBSD if_sk.c rev. 1.56

* Additional locking changes in sk_ioctl.

PR:		kern/61296 should see improvements by the last two.
Approved by:	rwatson (mentor)
MFC after:	5 days
2005-03-17 14:18:58 +00:00
Scott Long
ab0d8702bf Bugger, wiped out a needed comma in the previous commit. 2005-03-09 00:54:55 +00:00
Scott Long
c1b677aa80 The DC driver asks for an alignment of PAGE_SIZE for data buffers, but also
asks that each buffer be (2048 * 256) bytes long.  I suspect that alignment
isn't a real requirement since busdma only recently started honoring it.  The
size is also bogus.  Fix both of these and stop busdma from trying to
exhaust the system memory pool with bounce pages.

Submitted by: Kevin Oberman
MFC After: 7 days
2005-03-08 23:25:46 +00:00
Olivier Houchard
4ac78327de Add device id for the Ali M1671 host to AGP bridge. 2005-02-27 13:05:34 +00:00
Warner Losh
576f8ba203 Add back 'n' that went missing in last commit 2005-02-25 03:43:43 +00:00
Warner Losh
d24ae19d0e Fix style(9) issues with __P removal.
Noticed by: bde
2005-02-24 22:33:05 +00:00
Warner Losh
d701c91325 Return BUS_PROBE_DEFAULT instead of 0. 2005-02-24 21:32:56 +00:00
Eric Anholt
9271f7b6d5 Correct the SiS 755 PCI ID. Confirmed against Linux code.
PR:		kern/76411
Submitted by:	Jonathan Fosburgh, jonathan at fosburgh dot org
Obtained from:	Jung-uk Kim, jkim at niksun.com
2005-02-14 07:30:04 +00:00
Eric Anholt
ba16275b9f No use for this AMD64 special-case "return NULL;" in probe now that we don't
do fake "generic" support.
2005-02-14 07:16:25 +00:00
Max Laier
0afa9c9e2c Adjust TX threshold on every TX underrun. Some supported cards (8139-based)
can retransmit on TX underrun and set TOK in addition to TUND.  Also add a
check to prevent overflow of the addressable threshold.

This fixes some reports of rl(4) slowness, believed to be related to ALTQ
before.

PR:		kern/61448
Submitted by:	Tim Draegen-Gilman <timNOeudaemonSPAMnet> (with changes)
MFC after:	1 week
2005-02-11 01:05:52 +00:00
Bjoern A. Zeeb
9eed64cad9 Cleanup debugging code and put it under bootverbose
(includes minor style polishing).

Approved by:	rwatson (mentor)
2005-01-29 19:26:53 +00:00
Warner Losh
5fb99dcabe Bring in support for SUGOI LAN GIGA NIC made by System TALKS, Inc from
a RealTek 8169SB.

PR: 74262
Submitted by: Yoshikazu GOTO-san

# Submitter notes that he's unsure of the revision string for 8169SB
2005-01-22 22:40:53 +00:00
Ruslan Ermilov
37c3875846 Reimplement the fix in rev. 1.126.
OK'ed by:	phk
2005-01-10 09:56:47 +00:00
Sam Leffler
b03eb9a092 correct direction for bus_dma sync of rx buffer
Submitted by:	Tai-hwa Liang
2005-01-09 19:57:55 +00:00
Poul-Henning Kamp
90711964ef Revert local experiment which leaked into commit. 2005-01-07 23:54:16 +00:00
Poul-Henning Kamp
aeaf0a3a68 Fix compilation of DEVICE_POLLING code. 2005-01-07 23:52:41 +00:00
Scott Long
45a0fd86e1 Fix typos from previous commit. 2005-01-07 05:01:24 +00:00
Warner Losh
60727d8b86 /* -> /*- for license, minor formatting changes 2005-01-07 02:29:27 +00:00
Poul-Henning Kamp
72f0eb9104 We no longer recurse the mutex. 2005-01-07 00:02:11 +00:00
Poul-Henning Kamp
8397f22c34 If we get an interrupt and the interface is down, return before we
grab the lock.  This should help a tiny bit on machines where unused
if_sis interfaces share IRQ.
2005-01-07 00:01:43 +00:00
Poul-Henning Kamp
41166e0488 Don't tweak DSP on the ..16 chips. 2005-01-06 23:56:13 +00:00
Poul-Henning Kamp
4ce7885f87 Fix for an issue with excessive collisions in half duplex mode. 2005-01-06 23:54:55 +00:00
Poul-Henning Kamp
bce3bc624c Nail the short cable problem the exact way National says it should be. 2005-01-06 23:49:26 +00:00
Poul-Henning Kamp
0608b4a20c Simplify and fix bugs in rx/tx ring cleanup. 2005-01-06 23:36:43 +00:00
Poul-Henning Kamp
7302042943 Rewrite the rx/tx ring initialization to use pointers instead of arrays. 2005-01-06 23:31:41 +00:00
Poul-Henning Kamp
1bad258b05 Eliminate a bunch of unnecessary prototypes. 2005-01-06 23:26:13 +00:00
Poul-Henning Kamp
878f347274 Move the module related stuff to the bottom of the file. This will
allow us to save prototypes.
2005-01-06 23:22:38 +00:00
Poul-Henning Kamp
951365068b Make sure to clear any pending interrupts when we stop the interface. 2005-01-06 23:18:44 +00:00
Poul-Henning Kamp
c884a1dc23 Close a theoretical race: By the time the watchdog comes around
the interface may have been stopped, so we should not restart it.
2005-01-06 23:13:50 +00:00
Poul-Henning Kamp
9be9637246 Align if else if properly 2005-01-05 22:28:24 +00:00
Poul-Henning Kamp
93368d1eb2 Style: new-speak functions, remove pointless "return". 2005-01-05 22:23:03 +00:00
Poul-Henning Kamp
1e079a9113 Make sis_initl() take a typed argument.
Expect caller to lock before calling sis_stop()
Various style stuff.
2005-01-05 10:26:12 +00:00
Poul-Henning Kamp
a55fd2ad97 Add locked/unlocked variants of sis_init() 2005-01-05 10:11:37 +00:00
Poul-Henning Kamp
93e6be6cd7 Make a locked and unlocked variant of sis_start() 2005-01-05 10:04:45 +00:00
Poul-Henning Kamp
93a8f35688 Don't declare variables "register", the compiler ought to know what to do. 2005-01-05 09:02:05 +00:00
Poul-Henning Kamp
dc010b7380 Instead of keeping track of the index into the receive ring use the already
implemented "sis_nextdesc" pointer to keep a pointer instead.
2005-01-04 22:39:35 +00:00
Poul-Henning Kamp
32a300364d Forget about the sis_list_data and sis_ring_data structures and embedd
their fields directly in the softc structure.

This is a no-op which shortens most of the affected source lines
by N * 10 characters.
2005-01-04 22:25:58 +00:00