Commit Graph

54 Commits

Author SHA1 Message Date
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
pooka
7fe36dcdc1 Instead of writing the packet length in two 8bit pieces, use one
16bit write.  At least in certain environments this has the effect
of the latter 8bit write of the length to be not interpreted as
the first 16 bits of the packet contents and hence the interface
working.
2005-06-06 20:20:09 +00:00
perry
f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
perry
18db93c7f6 de-__P 2005-02-04 02:10:35 +00:00
thorpej
e9818f5b5e When adding/deleting multicast addresses, only whack the address
filter if the interface is marked RUNNING.

Fixes kern/27678.
2004-10-30 18:08:34 +00:00
mycroft
f5eacc00f9 Don't loop forever if a card went away. 2004-08-09 13:52:21 +00:00
mycroft
76344241eb Look in the correct register for the BSR detection value.
Also, do this early, before writing any registers.
2004-08-08 16:20:43 +00:00
wiz
c5670263e0 Fix some typos. From Tom Cosgrove via jmc@openbsd. 2003-11-02 11:07:44 +00:00
scw
f95724bd6b Add support for the SMC91C111 chip, with its internal PHY. 2003-04-29 08:47:29 +00:00
fair
96b8b890ed Change the "dontcare bits" argument to ifmedia_init() to IFM_IMASK
so that it is possible select PHY instances other than the first
one (instance zero), if there is more than one PHY attached.
2002-10-22 00:01:55 +00:00
scw
ee37eef012 Add smc91cxx_copy_tx_frame(), based on the version in cs89x0.c, to deal
with misaligned mbufs.
2002-09-28 10:24:46 +00:00
bsh
63422177a6 make this compile again on ports that don't have bus space stream methods. 2002-09-24 02:30:15 +00:00
scw
0dbf19c561 Add a flag, SMC_FLAGS_32BIT_READ, which is settable by the bus-specific
back-end to indicate that the device always sees reads as 32-bit
transactions, even if the host does 8 or 16-bit reads.

This is necessary for the SH-5 "Cayman" on-board ethernet. The SMsC part
is behind an FPGA which maps all cpu reads to 32-bits transactions.
2002-09-04 14:54:37 +00:00
thorpej
403f667b5a Handle platforms that don't provide stream methods.
From Hiroyuki Bessho, PR 16617.
2002-05-03 03:30:48 +00:00
chs
150665fbb1 91C96 has the same chip ID as 91C94, list both in attach output. PR 11413. 2002-03-27 07:50:54 +00:00
thorpej
1a69060597 When getting the packet off the interface, make sure the payload is
aligned after the Ethernet header.

kern/15982, Hiroyuki Bessho <bsh@grotto.jp>
2002-03-20 17:42:23 +00:00
lukem
a4bae8b066 add/cleanup RCSID 2001-11-13 13:14:31 +00:00
pooka
787bb8ce97 fix system freeze in situation where you pop a pcmcia card out of the
slot while it is in operation

ok'd by thorpej
2001-10-02 19:17:07 +00:00
thorpej
04a394787e Oops, the "auto" capability was getting masked off by mistake.
Fixes a panic reported by Chuck Silvers.
2001-08-20 20:22:53 +00:00
thorpej
150ca9d41a bcopy -> memcpy, strcpy 2001-07-07 15:59:37 +00:00
itojun
4d51fe368b change the meaning of ifnet.if_lastchange to meet RFC1573 ifLastChange.
follows BSD/OS practice and ucd-snmp code (FreeBSD does it for specific
interfaces only).

was: if_lastchange get updated on every packet transmission/receipt.
now: if_lastchange get updated when IFF_UP is changed.
2001-06-14 05:44:23 +00:00
thorpej
6b16911a43 ALTQ'ify. 2000-12-14 06:27:23 +00:00
thorpej
b84f740be0 Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach(). 2000-11-15 01:02:11 +00:00
thorpej
7ca3fb9ef0 Move the check for "promisc + unicast + not for us" into ether_input(),
and change Ethernet drivers to always pass all received frames to
ether_input() (with a few exceptions, which are documented in the
code).
2000-10-01 23:32:39 +00:00
briggs
b103a8ca48 Label the buffer size as such on probe. 128 KB makes sense, but 4608 does not. 2000-08-06 00:19:04 +00:00
briggs
02e3c1ef40 Use bus_space_read/write_multi_stream_2 for FIFO instead of bsr/w_multi_2. 2000-07-31 22:48:49 +00:00
briggs
3628f3e00c Make sure that we do not call bus_space_*_multi_* with zero count. 2000-07-31 02:14:47 +00:00
briggs
e6dde2bd42 Add MII support to smc91cxx driver. This is supported for the 91c100
and 91c100FD (FEAST) controllers.  Existing controllers should continue
to work as they have.  Added the card's memory to the probe message.
2000-07-30 21:34:47 +00:00
jhawk
1e59d99d28 For all network drivers that call ether_ifattach(), and also
have _detach() functions:
  Ensure that softc keeps state about whether the attach succeeded,
  and make the detach function return immediately if the attach did
  not complete.
2000-05-29 17:37:12 +00:00
enami
ed0f41807d - Call if_deactivate instead of smc91cxx_disable when deactivating.
- Fix typo in comment.
2000-02-04 04:05:50 +00:00
itojun
579e538de0 fix promisc mode for smc91cxx again. 2000-02-03 16:20:49 +00:00
itojun
b2cac6e684 if_detach for sm/pcmcia.
with addition of resource allocation flags in softc (to DTRT on detach).
2000-02-02 16:04:40 +00:00
itojun
e9100143aa in promisc mode, don't inject outgoing packet to bpf twice.
this is because the card gets the outgoing packet from itself in promisc mode
(not really IFF_SIMPLEX).
2000-01-17 07:06:57 +00:00
thorpej
cca601b9b2 Make sure the Revision register contains the correct magic number.
From Chuck Cranor.
1999-09-28 17:55:33 +00:00
itojun
e0042cf412 drop wrongly looped back multicast packet before we put it into BPF. 1999-09-12 18:26:58 +00:00
itojun
ebcd1b7a41 Make sure to behave as IFF_SIMPLEX in all cases.
Drop multicast/broadcast packet looped back from myself.

This is to cope with SMC91C92 (Megahertz XJ10BT), which
loops back multicast packet to itself on promiscuous mode.
(should be ensured by chipset configuration)

Reviewed by: thorpej
1999-09-10 00:23:34 +00:00
thorpej
f98d358a1f Rework layer 2 protocol input routines. Instead of calling e.g. ether_input()
directly, call the function pointer (*if_input)(ifp, m).  The input routine
expects the packet header to be at the head of the packet, and will adjust
as necessary.  Privatize the layer 2 input and output routines, allowing
*_ifattach() to set them up as appropriate.
1999-05-18 23:52:51 +00:00
thorpej
34f3cd7ce9 Use ETHER_*_LEN constants from <net/if_ether.h> instead of defining them
ourselves.
1999-03-25 23:20:22 +00:00
explorer
3ebb419571 Update to slightly altered rnd_attach_source() api 1999-02-28 17:08:05 +00:00
thorpej
69a4436f8b Avoid initializing the interface in the SIOCSIFFLAGS if ! UP and ! RUNNING. 1999-02-17 03:40:59 +00:00
thorpej
1d0f24882d Now that the *_activate() functions don't do things which are attachment
specific, move them into the chipset drivers.
1998-11-18 18:34:52 +00:00
thorpej
dd6750820c Expose the "enable" and "disable" functions so that the front-ends can
access them.
1998-11-17 20:25:00 +00:00
mycroft
e2686d0a1b Use splnet, not splimp. 1998-08-08 23:51:39 +00:00
jonathan
011f2bda08 defopt NS, NSIP. 1998-07-05 06:49:00 +00:00
jonathan
fe484937cf defopt LLC 1998-07-05 03:14:41 +00:00
jonathan
8db0fcdbf7 defopt CCITT. 1998-07-05 02:12:22 +00:00
jonathan
3751946b97 defopt INET, NETATALK. 1998-07-05 00:51:04 +00:00
thorpej
095c4c092d Adjust for config changes. 1998-01-12 09:23:08 +00:00