freebsd-nq/sys/dev
John Baldwin f8190d8dc8 Major rototill of this driver to add FreeBSD bus-dma support:
- Allocate arrays of metadata for the descriptors in the rx and tx rings
  and change the ring pointers to walk the metadata array rather than the
  actual descriptor rings.  Each metadata object contains a pointer to its
  descriptor, a pointer to any associated mbuf, and a pointer to the
  associated bus_dmamap_t in the bus_dma case.  The mbuf pointers replace
  the tulip_txq and tulip_rxq local ifqueue's in the softc.
- Add lots of KTR trace entries using a local KTR_TULIP level which
  defaults to 0, but can be changed to KTR_DEV at the top of the file
  when debugging.
- Rename tulip_init(), tulip_start(), tulip_ifinit(), and tulip_ifstart()
  to tulip_init_locked(), tulip_start_locked(), tulip_init(), and
  tulip_start(), respectively, to match the convention in other drivers.
- Add a TULIP_SP_MAC() macro to encode two bytes of the MAC address into
  the setup buffer and use that in place of lots of BYTE_ORDER #ifdef's.
  Also, remove an incorrect XXX comment I added earlier, the driver was
  correct (at least it does the same thing dc(4) does).  TULIP_SP_MAC
  was shamelessly copied from DC_SP_MAC() in dc(4).
- Remove the #ifdef'd NetBSD bus-dma code and replace it with FreeBSD
  bus-dma code that not only compiles but even works at runtime.
- Use callout_init_mtx() instead of just callout_init().
- Correct the various wrapper macros for bus_dmamap_sync() for the rx
  and tx buffers to only ask for the sync ops that they actually need.
- Tidy the #ifdef TULIP_COPY_RXDATA code by expanding an #ifdef a bit
  so it becomes easier to read at the expense of a couple of duplicated
  lines of code.  Also, use m_getcl() to get an mbuf cluster rather than
  MGETHDR() followed by MCLGET().
- Maintain the ring free (ri_free) count for the rx ring metadata since
  we no longer have tulip_rxq.ifq_len around to indicate how many mbuf's
  are currently in the rx ring.
- Add code to teardown bus_dma resources when attach fails and generally
  fixup attach to do a better job of cleaning up when it fails.  This
  gets us a good bit closer to possibly having a detach method someday
  and making this driver an unloadable module.
- Add some functions that can be called from ddb to dump the state of
  a descriptor ring and to dump the state of an individual descriptor.
- Various comment grammer and spelling fixes.

I have bus-dma turned on by default, but I've left the non-bus-dma code
around so that it can be turned off to aid in debugging should any problems
turn up later on.  I'll be removing the non-bus-dma code in a subsequent
commit.
2005-08-25 20:12:43 +00:00
..
aac Add support for HP branded 2610SA 2005-08-08 19:39:58 +00:00
acpi_support Don't lock when holding led_mtx, instead use AcpiOsQueueForExecution to defer 2005-08-04 22:48:36 +00:00
acpica get current temperature from _TMP during passive cooling is active. 2005-08-25 11:31:30 +00:00
adlink Instead of a rather useless generation number, use a sample number to 2005-03-19 12:55:46 +00:00
advansys Don't try to probe ISA PnP devices for now until this driver can grow a 2005-07-13 15:44:53 +00:00
agp Make the initialization in the AGPv3 case match that of Linux. Fixes hangs on 2005-06-26 04:01:11 +00:00
aha Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
ahb Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
aic Eliminate unused argument in PCMCIA_CARD macro. 2005-06-24 14:36:54 +00:00
aic7xxx Back out change accidentally committed as Makefile:1.21 -- a local 2005-08-03 00:47:33 +00:00
amd Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
amr Complete the removal of __FreeBSD_version checks from the amr driver. The 2005-08-08 12:16:21 +00:00
an Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
ar Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
arcmsr Use same RID we allocated the resource with to free it 2005-06-05 23:05:26 +00:00
arl Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
asr Only create the rdpti alias if the asr device creation succeeds. 2005-04-29 04:47:11 +00:00
ata Dont set default mode to ATA_DMA_MAX on devices not capable of DMA. 2005-08-25 15:45:03 +00:00
ath correct CTS duration calculation; SIFS+ACK should use the xmit rate not 2005-08-12 23:11:44 +00:00
atkbdc - Hook up the new locations of the atkbdc(4), atkbd(4) and psm(4) source 2005-06-10 20:56:38 +00:00
auxio Switch from trying to allocate up to 8 register banks for the EBus 2005-07-10 10:33:00 +00:00
awi fix handling of the current channel (missed in previous commit) 2005-08-13 00:30:26 +00:00
bfe Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
bge Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
bktr Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
buslogic Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
cardbus Use STAILQ in preference to SLIST for the resources. Insert new resources 2005-03-18 05:19:50 +00:00
ciss There's no reason to check the valence. This allows ciss to work 2005-08-09 20:53:51 +00:00
cm Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
cnw Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
cp Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
cpufreq Only activate ICH speedstep if we're going to use it. No bugs were observed 2005-03-20 01:25:21 +00:00
cs Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
ct Change a directory layout for pc98. 2005-05-10 12:02:18 +00:00
ctau Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
cx Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
cy Use BUS_PROBE_DEFAULT for pci probe return value 2005-03-05 18:30:12 +00:00
dc Fixup locking and mark MPSAFE: 2005-08-18 19:10:07 +00:00
dcons Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
de Major rototill of this driver to add FreeBSD bus-dma support: 2005-08-25 20:12:43 +00:00
dec Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
digi Staticize some symbols that are each only used in one corresponding .c file. 2005-05-06 20:53:34 +00:00
dpt Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
drm Fix a buffer aging problem in new r300 code that could lead to hangs with some 2005-08-01 17:50:19 +00:00
ed Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
eisa Make the eisa probe messages just like all the others in the system. 2005-08-01 07:09:15 +00:00
em Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
en Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
ep Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
esp - Try to not leak resources in the attach functions of the esp(4) SBus 2005-05-19 14:51:10 +00:00
ex Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
exca Properly calculate the offset in mapping the memory of pccards. This 2005-01-11 00:32:43 +00:00
fatm Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
fb - Declare lookup tables etc. const. [1] 2005-07-10 11:43:20 +00:00
fdc Eliminate unused argument in PCMCIA_CARD macro. 2005-06-24 14:36:54 +00:00
fe Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
firewire Remove an unnecessicary bzero that was zeroing the softc's struct ifnet 2005-08-17 18:53:06 +00:00
fxp Add callout_drain()'s to foo_detach() after calling foo_stop() to make sure 2005-08-17 17:44:32 +00:00
gem Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
gfb Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
harp Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
hatm Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
hfa Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
hifn These registers are saved by pci bus code. Remove from #if 0'd code anyway 2005-06-05 22:57:32 +00:00
hme - Remove redundant assertions that the driver lock is not held in attach() 2005-08-24 20:28:56 +00:00
hptmv Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
hwpmc On x86 processors, turn off any 'INTERRUPT' capabilities on PMCs 2005-08-22 18:20:41 +00:00
ic cosmetic change. 2005-05-14 10:26:31 +00:00
ichsmb Make ichsmb unloadable. 2005-07-29 00:20:50 +00:00
ichwd Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
ida Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
idt Stop embedding struct ifnet at the top of driver softcs. Instead the 2005-06-10 16:49:24 +00:00
ie Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
ieee488 Remove public declarations of variables that were forgotten when they were 2005-08-10 07:10:02 +00:00
if_ndis Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
iicbus Remove public declarations of variables that were forgotten when they were 2005-08-10 07:10:02 +00:00
iir Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
io Add module versions. 2004-08-02 20:42:28 +00:00
ips Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
ipw Remove IEEE80211_C_WPA from capabilities flags. WPA support is not fully 2005-08-20 15:03:41 +00:00
isp AT_MAKE_TAGID needs an instance as the 2nd arg- not just a 0. 2005-07-31 23:21:19 +00:00
ispfw Roll firmware to the latest version. There are a bunch of features 2005-01-29 01:12:37 +00:00
iwi Enhanced WME (802.11e) support. 2005-08-21 09:52:18 +00:00
ixgb Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
joy Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
kbd kbdmux(4) keyboard multiplexer integration 2005-07-13 23:58:57 +00:00
kbdmux kbdmux(4) keyboard multiplexer integration 2005-07-14 22:43:20 +00:00
led Add placeholder mutex argument to new_unrhdr(). 2005-03-07 11:05:47 +00:00
lge Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
lnc Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
mc146818 After some input from bde@ and rereading the datasheet use a MTX_SPIN 2005-06-04 23:24:50 +00:00
mca
mcd Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
md Ensure that file flags such as schg, sappnd (and others) are honored 2005-08-17 01:24:55 +00:00
mem Fix module builds for i386 and amd64. 2004-08-04 18:30:31 +00:00
mii Add an evil hack to work around a cast from the softc to the ifnet that 2005-06-11 00:20:38 +00:00
mk48txx - Add locking. 2005-05-19 21:16:50 +00:00
mlx Add missing parenthesis around error handling code upon attaching 2005-07-30 15:53:40 +00:00
mly Retire the last of the FreeBSD 4.x compat code from the mly driver. 2005-08-08 12:23:27 +00:00
mpt Correct attribution in clause three to address the correct copyright 2005-08-03 14:08:41 +00:00
mse Minor style(9) changes 2005-04-08 05:22:58 +00:00
my Fixup locking in if_my(4) and mark it MPSAFE: 2005-08-16 20:39:30 +00:00
ncv Eliminate unused argument in PCMCIA_CARD macro. 2005-06-24 14:36:54 +00:00
nge Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
nmdm Merge the dev_clone and dev_clone_cred event handlers into a single 2005-08-08 19:55:32 +00:00
nsp Eliminate unused argument in PCMCIA_CARD macro. 2005-06-24 14:36:54 +00:00
null Use dynamic major number allocation. 2005-02-27 22:01:09 +00:00
nve Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
ofw Sync with openfirm(4) and check the return value of malloc() although 2005-05-19 15:23:17 +00:00
owi Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
patm Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
pbio Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
pccard o Add Toshiba's id. Make AGERE an alias for LUCENT. Add Ungermann's ID. 2005-07-18 21:47:38 +00:00
pccbb o The ricoh bridge needs us to turn off the function interrupts for 2005-07-17 19:40:05 +00:00
pcf Account for ebus(4) defaulting to SYS_RES_MEMORY for memory resources 2005-06-04 20:29:28 +00:00
pci As threatened by BURN_BRIDGES, restire PCIR_MAPS and PCIR_HEADERTYPE 2005-06-05 23:08:59 +00:00
pdq Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
ppbus Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
ppc don't use C keyword register as CPP macro argument name 2005-04-12 23:32:26 +00:00
pst Use BUS_PROBE_DEFAULT for pci probe return value 2005-03-05 18:10:49 +00:00
puc Recognize the SAB82532 in USIII machines. 2005-08-07 13:37:25 +00:00
ral if_ral_pccard does not depend on pccard module directly, but rather 2005-08-22 00:20:28 +00:00
random malloc.h relies on param.h for a definition of MAXCPU. I guess that there is 2005-05-30 05:01:44 +00:00
ray Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
rc Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
re In re_shutdown() mark interface as down since otherwise we will panic if 2005-08-18 14:29:01 +00:00
rndtest Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
rp - Use pci_get_device() and pci_get_vendor() when we only want one part 2005-03-25 03:10:51 +00:00
sab Account for ebus(4) defaulting to SYS_RES_MEMORY for memory resources 2005-06-04 20:29:28 +00:00
safe Use BUS_PROBE_DEFAULT in preference to 0 and BUS_PROBE_LOW_PRIORITY in 2005-03-01 08:58:06 +00:00
sbni Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
sbsh Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
scd Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
sf Fixup locking for sf(4) and mark MPSAFE: 2005-08-18 17:09:16 +00:00
si Use BUS_PROBE_DEFAULT in preference to 0 and BUS_PROBE_LOW_PRIORITY in 2005-03-01 08:58:06 +00:00
sio Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
sk * Solve "No PHY found" problem for more Yukon Lite variants. 2005-08-13 11:13:12 +00:00
smbus Remove public declarations of variables that were forgotten when they were 2005-08-10 07:10:02 +00:00
sn Some preliminary support for Megahertz XJEM and CCEM (same cards really) 2005-08-15 18:28:49 +00:00
snc Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
snp Merge the dev_clone and dev_clone_cred event handlers into a single 2005-08-08 19:55:32 +00:00
sound Merge the dev_clone and dev_clone_cred event handlers into a single 2005-08-08 19:55:32 +00:00
speaker - Move timerreg.h to <arch>/include and split i8253 specific defines into 2005-05-14 09:10:02 +00:00
sr Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
stg Eliminate unused argument in PCMCIA_CARD macro. 2005-06-24 14:36:54 +00:00
streams Use kern_open() directly rather than a stackgap detour via open(). 2005-02-07 18:22:20 +00:00
sx Use BUS_PROBE_DEFAULT in preference to 0 and BUS_PROBE_LOW_PRIORITY in 2005-03-01 08:58:06 +00:00
sym Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
syscons kbdmux(4) keyboard multiplexer integration 2005-07-13 23:58:57 +00:00
tdfx Use BUS_PROBE_DEFAULT in preference to 0. Also for vx, return 2005-03-01 07:50:12 +00:00
tga Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
ti Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
trm Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
twa Acquire Giant before making some CAM calls that need Giant to be held. 2005-06-11 00:14:23 +00:00
twe Remove bus_{mem,p}io.h and related code for a micro-optimization on i386 2005-05-29 04:42:30 +00:00
tx Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
txp Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
uart - Change the code that determines whether to use a serial console and 2005-08-15 20:58:36 +00:00
ubsec Use BUS_PROBE_DEFAULT in preference to 0. Also for vx, return 2005-03-01 07:50:12 +00:00
usb Provide the USB device release number along with other parameters 2005-08-23 21:32:49 +00:00
utopia Struct ifatm isn't at the beginning of the softc anymore. Use the 2005-06-22 06:51:52 +00:00
vge Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
vkbd Merge the dev_clone and dev_clone_cred event handlers into a single 2005-08-08 19:55:32 +00:00
vr Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
vx Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
watchdog Do the dreaded s/dev_t/struct cdev */ 2004-06-16 09:47:26 +00:00
wds Start each of the license/copyright comments with /*-, minor shuffle of lines 2005-01-06 01:43:34 +00:00
wi fix media_status so devd recognizes the device as an 802.11 interface 2005-08-13 00:04:42 +00:00
wl Fix FBSDid style nit. 2005-08-10 03:56:31 +00:00
xe Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and 2005-08-09 10:20:02 +00:00
zs The zs(4) driver is superseded by uart(4) and broken in -CURRENT. Remove 2005-02-27 15:23:58 +00:00