Use IFQ_MAXLEN instead. This seemed like a good idea at the time since
most 3c509s have all of 2k for their TX fifo. My intention was to revisit
ifq_maxlen and auto-scale it or something.
ttcp-t: 16777216 bytes in 21.53 real seconds = 761.07 KB/sec +++
ttcp-t: 2771 I/O calls, msec/call = 7.96, calls/sec = 128.72
ttcp-t: 0.0user 2.9sys 0:21real 13% 20i+280d 222maxrss 0+2pf 717+0csw
ttcp-r: 16777216 bytes in 14.11 real seconds = 1161.48 KB/sec +++
ttcp-r: 2050 I/O calls, msec/call = 7.05, calls/sec = 145.33
ttcp-r: 0.0user 1.4sys 0:14real 10% 87i+1198d 196maxrss 0+1pf 1949+186csw
I've got some tweaks that move the TX speed up to the RX speed but I've
got to groom them from the mess I've made of my source tree.
Yelled at by: wpaul
- Rip out all the static softc stuff and do softc allocation the right way.
- Rewrite most of the ISA code so that it provides a DEVICE_IDENTIFY
method to enumerate all non-PnP ISA devices.
This has the following consequences:
- No 'ep' devices may be hardwired.
- All hardwired devices will probably be detected twice.
By hardwired I mean:
device ep0 at isa? port 0x300 irq 10
- 'ep' devices are ordered by bus, slot, and then MAC address.
- Make 3c509B cards work in PnP mode. Yes, they really work.
- Convert over to using ifmedia for media selection. No more of this
lame 'linkX' stuff.
- Consolidate a lot of duplicated code.
- Make a stab at not breaking MII based PCCARD devices.
I doubt that the PCCARD stuff works any more than it did before my
changes but theres hope. My PCCARD hardware should arrive in a
week or so.
- Retreive the media settings from the card EEPROM rather than guessing.
I've got a 3c509-TPO that thinks its got an AUI port and if others
can report similar problems I'll write a bit of clever code that will
fix this but right now it works correctly on all but 1 card.
- Clean up a few things and make some cosmetic changes.
- Add myself as the MAINTAINER since nobody else wants to. I'm
in the best position to do this as I've got an example of most
of the cards:
EISA 3c579 bnc/aui
MCA 3c529 tp/aui
ISA 3c509 tpo
ISA-PnP 3c509B combo
If someone wants to send me a any cards I don't have I'd appriciate
it. Also welcome are 3c59x boards since I'll be folding if_vx and
if_ep at some point.
I'm committing this from a laptop running this driver. Have only one
devclass for all ep devices (at least for pccard and eisa) so unit
numbering is sane. Might not work with both isa and non-isa devices
on the same system until ep is updated (Matt has some patches in the
pipeline which should resolve this, he wanted me to commit this so he
can resolve any conflicts against cvs rather than my patches).
Reviewed by: Matt Dodd <mdodd@freebsd.org>
- Split out the prototypes, externs and struct decls from if_epreg.h into
if_epvar.h.
- Add support for MCA based Etherlink III (3c529) devices.
None of this code is used right now; the old if_ep driver is still
in place and used.
I will eventually get around to converting if_ep_isa.c to newbus once I've
had a talk with Peter and DFR about the DEVICE_IDENTIFY() method.
I have tested this code on my PS/2. It works. I would like EISA and ISA
testers since my example hardware hasn't arrived yet.
Add:
dev/ep/if_ep.c optional ep
dev/ep/if_ep_isa.c optional ep isa
dev/ep/if_ep_eisa.c optional ep eisa
dev/ep/if_ep_mca.c optional ep mca
dev/ep/if_ep_pccard.c optional ep card
to sys/conf/files
Remove:
i386/eisa/3c5x9.c optional ep
i386/isa/if_ep.c optional ep
from sys/i386/conf/files.i386
PCCARD testers wanted!
I will switch off and cvs rm the old driver in favor of this copy once
I've had positive feedback or have the hardware to verify that it works.
This means that we will not have to have a bpf and a non-bpf version
of our driver modules.
This does not open any security hole, because the bpf core isn't loadable
The drivers left unchanged are the "cross platform" drivers where the respective
maintainers are urged to DTRT, whatever that may be.
Add a couple of missing FreeBSD tags.
for you to be told there was an error [during verbose boot].
I poked him for the fix, he poked me to get it committed.
Submitted by: Jason Young <doogie@anet-stl.com>
1) Reworked the probe routine
2) Addition of the 574B's product ID.
3) Added useful info when booting verbosely.
Submitted by: Jason Young <doogie@anet-stl.com>
if_init_f_t is passed void * containing the address of ifp->if_softc
not the unit number.
Someone tell me if these things don't work as I don't have the hardware
needed to test them. (thats a first.)
I'll get if_ze and if_zp later.
Pointed out by: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
Increase the overall length of the delay by 10.
Without this a 3C509 card on my MediaGX crash box can't be reliably
read. With this it is solid.
I've left a delay multiplier in instead of just changing the base
delay because I'm surprised I had to increase it so much and expect
there may be another problem.
FreeBSD/alpha. The most significant item is to change the command
argument to ioctl functions from int to u_long. This change brings us
inline with various other BSD versions. Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.
The prototype FreeBSD/alpha machdep will follow in a couple of days
time.
This will not make any of object files that LINT create change; there
might be differences with INET disabled, but hardly anything compiled
before without INET anyway. Now the 'obvious' things will give a
proper error if compiled without inet - ipx_ip, ipfw, tcp_debug. The
only thing that _should_ work (but can't be made to compile reasonably
easily) is sppp :-(
This commit move struct arpcom from <netinet/if_ether.h> to
<net/if_arp.h>.
The #ifdef IPXIP in netipx/ipx_if.h is OK (used from ipx_usrreq.c and
ifconfig.c only).
I also fixed a typo IPXTUNNEL -> IPTUNNEL (and #ifdef'ed out the code
inside, as it never could have compiled - doh.)
use a Linker Set. Note, if a driver is loaded as an LKM if will have
to use the function call, but since none of the existing drivers
are loadable, this made things cleaner and boot messages nicer.
Obtained from: PAO-970616
* Kill individual drivers 'suspend' routines, since there's no simple/safe
way to suspend/resume a card w/out going through the complete probe
at initialization time.
* Default to using the apm_pccard_resume sysctl code, which basically
pretends the card was removed, and then re-inserted. Suspend/resume
is now 'emulated' with a fake insert/removal. (Hence we no longer
need the driver-specific suspend routines.)
follow.
* Rename/reorder all of the pccard structures, change many of the member
names to be descriptive, and follow more closely other 'bus' drivers
naming schemes.
* Rename a bunch of parameter and local variable names to be more
consistant in the code.
* Renamed the PCCARD 'crd' device to be the 'card' device
* KNF and make the code consistant where it was obvious.
* ifdef'd out some unused code
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
to TAILQs. Fix places which referenced these for no good reason
that I can see (the references remain, but were fixed to compile
again; they are still questionable).
and then never accept for sending packet from upper layer anymore
(i.e. ping -f )
Reviewed by: David Greenman <dg@root.com>
Submitted by: amurai@spec.co.jp
before attaching. Without this fix, 3c579(EISA) never make
any H/W inturrupt.
Reviewed by: "Justin T. Gibbs" <gibbs@freefall.freebsd.org>, nao@sbl.cl.nec.co.jp and owner-current on mailing list ;-)
Submitted by: amurai@spec.co.jp, nao@sbl.cl.nec.co.jp
(author's explaination):
Bit 15 is the flag to request a transmit complete interrupt. The
driver was apparently written to minimize interrupts, and if not for a
3-COM design quirk, everything would be just ducky.
Prior to loading the outbound packet into the FIFO, the driver checks
to see if there's enough space to contain the packet. If not, the
driver requests a transmit-available interrupt when there is
sufficient room. Unfortunately, the card is continuing to process the
prior FIFO, and by the time the driver sets the threshold for a
transmit available interrupt, the space is already available. When
this occurs, the 3COM card ignores the interrupt request, and the
driver is hung waiting for an interrupt that will never occur.
There's probably a more elegant solution, but requesting the transmit
complete interrupt was the easiest to implement. An alternative fix
might be to check free FIFO space again, after requesting the transmit
available interrupt, but I haven't bothered pursuing this. Since the
patch, my 3C590 (PCI, same FIFO interface as 3C509) has been rock
solid.
Submitted by: mevans@candle.com (Mike Evans)
is only used by the icu support modules and by a few drivers that know
too much about the icu (most only use it to convert `n' to `IRQn'). isa.h
is only used by ioconf.c and by a few drivers that know too much about
isa addresses (a few have to, because config is deficient).
parameters to printf() using the "D" format. (Why this even worked on
my box during testing I don't know, but as soon as I powered it on/off
it quite working.)
using the existing files using the existing PCCARD support. Now that
this is in place I would like to fixup the PCCARD hooks and remove the
if_zp driver. At this point, we support everything we used to support
*AND MORE* with the PCCARD code.
Submitted by: Naoki Hamada <nao@sbl.cl.nec.co.jp> (via the Nomad release)
[ This works on both my 3C589B and 3C589C ]
My 3C509B-COMBO works fine with the following patch. Switching between
UTP and BNC is quite easy. (Just type 'ifconfig ep0 link1 -link2' or 'ifconifg
ep0 link2 -link1'.)
[ I tested this with the additional PC-CARD patches and it works on both
connectors on my 3C589B and 3C589C ]
Reviewed by: nate
Submitted by: Naoki Hamada <nao@sbl.cl.nec.co.jp>