Commit Graph

149 Commits

Author SHA1 Message Date
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
rumble
334307e192 Extract mac addresses on Phobos G100 boards. 2007-02-19 04:35:21 +00:00
jmcneill
f135e0d607 Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@
2006-09-24 03:53:07 +00:00
rumble
e980865174 Phobos boards (my G130 at least) have a non-standard srom layout. Try to
identify it and pull out the enaddr.
2006-08-30 23:31:08 +00:00
blymn
a88dd3436a Clean up bogus whitespace 2006-05-26 12:52:45 +00:00
elad
2867b68bc3 integrate kauth. 2006-05-14 21:42:26 +00:00
rpaulo
4ed37fa0d7 Add support for the Conexant RS7112. From Frank Wille <frank@phoenix.owl.de>. 2006-03-25 23:10:50 +00:00
thorpej
3ddf26777f Use device_is_active() rather than testing dv_flags for DVF_ACTIVE
directly.
2006-02-20 16:50:36 +00:00
perry
93124077ae Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:27:29 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
he
d3fc666f98 Make tlp_idle() not be static, so that the newsmips version of the
driver can access that function again.

Approved by thorpej
2005-07-17 18:11:36 +00:00
thorpej
99c4ea1319 - Use ANSI function decls.
- Liberally apply static.
2005-07-08 05:07:31 +00:00
rpaulo
ec4e36b7c2 Add support for ASIX AX88140A/AX88141 chipsets using only
the 10/100 MII with inspiration from FreeBSD dc(4) driver.

Tested on i386 and macppc.

Reviewed by Jason Thorpe and ok'ed by Hubert Feyrer.
2005-06-23 23:51:41 +00:00
wiz
ec30909ad0 Remove duplicate word in comment. From Rui Paulo in PR 29767. 2005-03-23 13:24:47 +00:00
perry
f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
skrll
b48e30cb2e Initialize 'error' in all cases in ioctl handler, otherwise it doesn't
compile (and of course might return garbage).  [hi kim!]
2005-02-06 09:33:23 +00:00
kim
f045f7096d If the interface is up and running, only modify the receive filter
when setting promiscuous or debug mode.  This avoids resetting the
chip unnecessarily.

Fixes PR kern/29126.
2005-02-06 03:15:14 +00:00
perry
18db93c7f6 de-__P 2005-02-04 02:10:35 +00:00
thorpej
586d85d4f2 Eliminate use of M_HASFCS. 2005-01-30 17:23:45 +00:00
sketch
70f18ae0f6 Silence the 'receive process failed to idle' message on the Davicom DM9102A. 2004-12-11 09:31:42 +00:00
thorpej
711247fa68 When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.

Fixes kern/27678.
2004-10-30 23:33:29 +00:00
jkunz
2950c906af Attach phy anyway if srom has invalid contents.
Patch sugested by Charles M. Hannum on tech-kern.
2004-08-05 09:07:45 +00:00
mycroft
e8699d813a Add debugging code to dump the filter setup descriptor, similar to the transmit
path.
2004-07-02 19:53:31 +00:00
thorpej
52f06d7766 If we're running on a Connectix Virtual PC, we might get a packet longer
than a max size Ethernet frame without getting a frame-too-long error.  VPC
seems to be adding 4 zeros at the end of every frame.  Detect this condition
and simply truncate the packet to a max size Ethernet frame.

I now have no problems with networking on NetBSD inside Virtual PC 6.
2003-12-18 18:39:36 +00:00
christos
b3ae88ff5d Fix uninitialized variable warning. 2003-10-25 19:12:08 +00:00
christos
8bfd5e3292 Fix uninitialized variable warnings 2003-10-25 18:34:14 +00:00
tsutsui
71427b1eb1 Handle SROM quirk of tulip on Cobalt RAQ2. Fixes kern/20702. 2003-09-07 10:45:11 +00:00
matt
65e5548a17 Add MBUFTRACE kernel option.
Do a little mbuf rework while here.  Change all uses of MGET*(*, M_WAIT, *)
to m_get*(M_WAIT, *).  These are not performance critical and making them
call m_get saves considerable space.  Add m_clget analogue of MCLGET and
make corresponding change for M_WAIT uses.
Modify netinet, gem, fxp, tulip, nfs to support MBUFTRACE.
Begin to change netstat to use sysctl.
2003-02-26 06:31:08 +00:00
minoura
0ca32eba66 Check existence of the default 10baseT media for 21140.
If one does not exist, fall back to the first.
2002-10-08 15:05:35 +00:00
provos
0f09ed48a5 remove trailing \n in panic(). approved perry. 2002-09-27 15:35:29 +00:00
thorpej
620a647b60 For the 21142/21143 internal Nway, only advertise/resolve media for
which we have SROM blocks.
2002-09-18 19:12:17 +00:00
chs
bfb698717d use the SROM info to set the media in 2114[23] autonegotiation
rather than just fiddling the opmode CSR, since we might
need to change the SIA CSRs as well (eg. for some ZNYX cards).
from PR 17510.
2002-07-14 21:02:41 +00:00
chuck
9b667cf839 only powerdown on a suspend. do not powerdown on a standby (PR#17537). 2002-07-09 20:19:57 +00:00
mycroft
8a3f8605fb Add a missing DELAY() in the initial GPIO setup for the 21140. 2002-07-08 18:43:54 +00:00
lukem
06de426449 SIMPLEQ rototill:
- implement SIMPLEQ_REMOVE(head, elm, type, field).  whilst it's O(n),
  this mirrors the functionality of SLIST_REMOVE() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE()
- remove the unnecessary elm arg from SIMPLEQ_REMOVE_HEAD().
  this mirrors the functionality of SLIST_REMOVE_HEAD() (the other
  singly-linked list type) and FreeBSD's STAILQ_REMOVE_HEAD()
- remove notes about SIMPLEQ not supporting arbitrary element removal
- use SIMPLEQ_FOREACH() instead of home-grown for loops
- use SIMPLEQ_EMPTY() appropriately
- use SIMPLEQ_*() instead of accessing sqh_first,sqh_last,sqe_next directly
- reorder manual page; be consistent about how the types are listed
- other minor cleanups
2002-06-01 23:50:52 +00:00
thorpej
eb00d53595 Remove duplicate TULIP_SET/TULIP_CLR. 2002-05-31 17:27:40 +00:00
mycroft
3f47c5b658 Clean up some dead code.
Combine nway_reset() into nway_auto().
2002-05-03 08:48:12 +00:00
mycroft
a5f6bd3b57 5) Be more liberal in blasting SIATXRX and SIASTAT in nway_auto(); in
particular, make sure that all the SIASTAT_ANS bits are in the right state
   so we don't do something inane.

Still doesn't actually bring the link up properly, but at least it negotiates
most of the time, and does it a little faster.
2002-05-03 06:56:20 +00:00
mycroft
b3bd4ab122 More internal Nway issues:
1) Do not call tlp_sia_update_link() in Nway mode, and do not look at SIASTAT
   in any other place that nway_status(), where we first check that it's valid.
   In other places, look at IFM_ACTIVE after having call nway_status().
2) Eliminate stupid MII_MEDIACHG calls, and arrange for nway_service() to
   update status on every call.
3) Nuke the synchronous case of nway_auto() from orbit.
4) Do not call nway_statchg() when using manual configuration; tlp_sia_set()
   does everything we need.
2002-05-03 06:54:37 +00:00
mycroft
1489c15507 Fix multiple problems with 2114x internal Nway:
1) Set OPMODE_TTM in the default tsti_opmode, so that nway_status doesn't
   blow up and report the wrong media type when statically configured.  (This
   code is a hack.)
2) Do not set IFM_ACTIVE (i.e. ignore SIASTAT_LS*) when in auto-negotiation
   mode and negotiation has not completed (per 21143 manual).
3) Do not clear auto-negotiation mode; otherwise the chip will not
   renegotiate on a link failure.

With these changes, 10/100 selection is more stable, and auto-negotiation
comes up with the right status and detects link, but the link does not work
unless it's hardwired.  More work is needed.
2002-05-03 05:41:46 +00:00
mycroft
f00c3c2e40 tm_gpctl and tm_gpdata must be shifted right 16 bits. DOH.
This makes another CardBus tlp card work...
2002-04-14 19:10:18 +00:00
chs
110d16d5ae add support for built-in NWay autonegotiation on 2114[23], Macronix
98713A, 98715, 98715A, 98725, and Lite-On 82C115.
2002-04-09 05:57:20 +00:00
mycroft
cdb5a13a85 With certain 21140 and 21143 SROM formats, OPMODE_FD was never being set when
the interface was wired to full-duplex mode.  Duh.
Also, add OPMODE_TTM to OPMODE_MEDIA_BITS, to insure that it is changed when
we switch between 10 and 100.
2002-04-05 04:48:40 +00:00
chs
99b5d17961 move some prototypes from tulip.c to tulipvar.h so they can
be used by bus-specific code.
2002-03-26 07:41:40 +00:00
chs
9846849435 in the TULIP_ROM_MB_21142_MII case of tlp_2114x_isv_tmsw_init(),
use "cp" instead of "ncp" as a temporary pointer into the SROM.
we still need the value of ncp here, it points to the next media block.
(update the copy of this code in tlp_21142_reset() just 'cause.)
this makes the BNC port on the Adaptec ANA-6911A work.
2002-03-16 17:38:35 +00:00
chs
1ba402084f assume that 21143 SROM info blocks are in extended format (as the spec
requires), even if the bit to indicate this is not set.
this makes Phobos P430 4-port cards work.
2002-03-14 04:44:34 +00:00
tsutsui
84926576f1 Call malloc(9) with M_ZERO flag instead of memset() after malloc(). 2002-01-12 16:03:11 +00:00
yamt
5bf4d5554b use little-endian crc on multicast hash for admtek chips. 2001-11-22 05:03:04 +00:00
lukem
a4bae8b066 add/cleanup RCSID 2001-11-13 13:14:31 +00:00
perry
7a702dcf66 trivially rename some macro parameters to avoid lint warnings. 2001-11-10 22:48:09 +00:00