Commit Graph

56 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
christos
1665d5e960 fix spelling of accommodate; from Zapher. 2006-11-24 19:46:58 +00:00
dogcow
f2d329dca0 remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP. 2006-09-07 02:40:31 +00:00
perry
3d4ed1fbc7 __inline__ -> inline 2005-12-24 23:41:33 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
yamt
330cc0a11e split IFCAP_CSUM_xxx to IFCAP_CSUM_xxx_Rx and IFCAP_CSUM_xxx_Tx. 2005-05-02 15:34:31 +00:00
rafal
08bbc8e180 Fix typo in HW checksum code -- check for TCP & UDP HW checksumming being
enabled rather than TCP twice.
2005-03-17 15:51:28 +00:00
heas
37ea29ba5a Perform a s/w checksum for packets that are not the same length as the length
field of the IP header (ip->ip-len) indicates they should be.  This handles
the case where an ethernet frame has been padded to meet the minimum ethernet
frame length or erroneously (my cisco switch unnecessarily adds 4 bytes to its
SYN).  This padding will be included in the hardware checksum and may be
non-zero, thus making it incorrect.
Also, clear csum_flags when we want a s/w checksum, since we may have started
down the h/w checksum path and determined that it was not usable.

While here, clean-up a few WS nits and ifdef INET the hardware checksum code.
2005-03-05 18:36:23 +00:00
perry
f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
thorpej
2f8e8079d1 Define M_CSUM_DATA_IPv4_IPHL() and M_CSUM_DATA_IPv4_OFFSET() macros
to extract data from csum_data, rather than just open-coding it.
2005-02-21 02:12:48 +00:00
heas
9d624b89de Add handling for hardware TCP/UDP checksums. 2005-02-18 00:40:32 +00:00
heas
7056d7dd2a Handle interface IFF_DEBUG flags sooner in hme_ioctl and cache a copy of
sc_ethercom.ec_capenable such that we can properly adjust the max frame size
when vlan tagging is enabled/disabled.
2005-02-18 00:22:11 +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
heas
6df21a5e13 GC some trailing WS. 2004-10-26 22:52:44 +00:00
heas
9efbbebf3a do not reset the chip (and subsequently the phy) when unnecessary; that is,
for address changes, multicast filter changes, or adjusting promiscuous mode.
Fixes resetting the phy for things like start/stopping tcpdump.

ok petrov@, martin@, pk@
2004-06-28 20:50:52 +00:00
abs
637b0ef23e If we are explicitly asked for entropy, provide it. 2004-01-21 00:47:37 +00:00
petrov
334dcc0296 Do not set HMEDEBUG as default mode. 2003-11-03 20:30:14 +00:00
wiz
c5670263e0 Fix some typos. From Tom Cosgrove via jmc@openbsd. 2003-11-02 11:07:44 +00:00
wiz
1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
wiz
c42e1fac66 Management, not managment. Mostly from jmc@openbsd. 2003-04-26 22:07:12 +00:00
pk
d46f710241 Enable the MII output drivers in hme_mifinit() based on the currently
selected transceiver. Save and restore this setting in hme_mii_readreg()
and hme_mii_writereg().
2003-02-27 14:58:22 +00:00
petrov
1d6ce76050 Use MIIF_FORCEANEG. 2003-02-20 20:09:56 +00:00
pk
b377c6693a Preserve the current PHY select bit in the MIF configuration register
in mii_readreg()/mii_writereg(). Also restore this bit based on the
currently selected media instance every time we need to reinitialise
the interface.
2003-02-13 12:10:20 +00:00
martin
324c47457d Since we have to select one of the two possible PHYs when configuring
the MIF Configuration Register PHY_Select, there is no use in pretending
we could talk to both at the MII interface layer.

If both PHY are reported to be present, prefer the external one.

Remember this selection and enforce it in hme_mii_{read,write}reg.
This fixes problems with one of the dual hmes in Netra T1s.

From OpenBSD.
2002-12-18 23:13:02 +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
martin
95617c00d7 Experimentation shows the hme chip is SIMPLEX if used in full-duplex
mode, but not otherwise.

This fixes PR 17523.
2002-08-29 14:33:03 +00:00
thorpej
9a88d576c1 hme_init(): call mii_mediachg() to make sure the current media is set. 2002-05-05 03:02:38 +00:00
tron
e75321130b Back out new "hme" driver because it causes a performance regression on
"netio" on an U5.
2001-11-26 10:39:29 +00:00
tron
7287466499 Bug fixes for VLAN handling supplied by Klaus Klein in private e-mail. 2001-11-26 06:51:12 +00:00
tron
99756bfe86 Pull in Jason Wright's latest changes to the "hme" driver from OpenBSD.
This supports direct DMA from and into mbuf cluster, and VLAN
handling is done a bit differently.
2001-11-25 22:12:01 +00:00
lukem
a4bae8b066 add/cleanup RCSID 2001-11-13 13:14:31 +00:00
mrg
3059c66d8f fix a typo in the previous 2001-10-22 16:47:43 +00:00
mrg
c4f3ffd5e7 increase the value of _HME_NDESC from 32 to 128. it reduces the noise the
driver makes due to various bad status conditions.
2001-10-22 16:45:20 +00:00
thorpej
0d4d2293bb Minor tidying up of the HME driver attach:
- Print nicer-looking message.
- Use bus_space_subregion() when appropriate, rather than arithmetic
  on a bus_space_handle_t.
2001-10-05 17:49:43 +00:00
thorpej
150ca9d41a bcopy -> memcpy, strcpy 2001-07-07 15:59:37 +00:00
thorpej
6b16911a43 ALTQ'ify. 2000-12-14 06:27:23 +00:00
bouyer
42681a6a9f Supports ETHERCAP_VLAN_MTU. Tested on sbus hme on Ultra/1.
Thanks to Andrei Petrov for the hint !
2000-11-17 19:08:00 +00:00
thorpej
b84f740be0 Move bpfattach()/bpfdetach() calls into ether_ifattach()/ether_ifdetach(). 2000-11-15 01:02:11 +00:00
mrg
0c6aa8d3ed ensure DMA mappings are not mapped streamable. fixes ethernet problems on
ultrasparc sbus class machines.  from eeh.
2000-10-20 06:08:02 +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
eeh
79dffec702 Get PCI HME working. 2000-06-25 01:05:16 +00:00
pk
297445c2a2 Turn on the hash filter enable bit in the RX configuration register
when loading the multicast hash filter (noted by itojun@iijlab.net).
2000-06-15 15:34:32 +00:00
mrg
badbd98b2a rearrange the order of bus_dma operations to be more like many other
drivers, at the suggestion of fvdl.  also, use bus_dmamap_load() not
load_raw().
2000-05-18 14:00:46 +00:00
mrg
cc57e4111a do not pass a `boundary' argument to bus_dmamap_create(), particularly one
that is smaller than the `size' argument.
2000-05-18 12:49:09 +00:00
pk
1bf775b965 Conform bus_dmamem_{alloc,map} usage to bus_dma(9) specs. 2000-05-09 22:42:08 +00:00
mrg
36b65b7d48 return if we can't map DMA buffers 2000-04-05 05:54:02 +00:00
thorpej
fc96443d15 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 07:01:25 +00:00
pk
1d373a94e2 Bump receive buffer size up to the maximum DMA burst boundary. 2000-02-14 17:14:28 +00:00
thorpej
eed75dbc26 Don't dry to diving MIIF_NOISOLATE in the PHY drivers. Instead, pass
flags down from the parent to child vi mii_attach().
2000-02-02 17:09:38 +00:00