Bug 17601

Summary: newbus patch for if_tx
Product: Base System Reporter: brooks <brooks>
Component: kernAssignee: semenu <semenu>
Status: Closed FIXED    
Severity: Affects Only Me CC: semen
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description brooks 2000-03-26 02:20:01 UTC
The tx driver needs newbus attachment code.  This patch provides it.

Fix: The following match adds newbus attachment, unconditionalized bpf,
bus_space support and use of device_printf.  It removes the unused
iospace support.  It works for me, but this is my first attempt at
driver hacking so review before comitting would be wise. ;-)  I'm not
sure if it will work on an alpha or not since I don't have one.  If
someone wants to attack that problem I could probably loan them a card
as there should be a pile of them at work that got replaced with fxp's.
The detach function should be better, but I don't really know what I
should be freeing.  It should be a bit more friendly then the old
at_shutdown once was, but it would probably leak resources if it were
hot plugged, not that we support that yet.

The patch has been tested on my laptop with docking station running 5.0.
If you remove the bpfdetach call from epic_freebsd_detach it compiles on
a 4.0 system as well.  I haven't tested it under 4.0 as the only machine
I have with a tx card is my laptop's docking station running -current.

This patch is closly based on patches made to the fxp driver.
Specificaly:

1.67	new-bus
1.75	if_ naming
1.76	unconditional bpf support
1.77	bus_space
How-To-Repeat: 
Try compiling with tx enabled without COMPAT_OLDPCI.
Comment 1 Sheldon Hearn freebsd_committer freebsd_triage 2000-03-29 11:19:21 UTC
Responsible Changed
From-To: freebsd-bugs->semenu

Over to the driver's author. 
Comment 2 semenu freebsd_committer freebsd_triage 2000-04-12 23:16:00 UTC
State Changed
From-To: open->closed

Patch commited to current.