aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sf
Commit message (Collapse)AuthorAgeFilesLines
* Remove unneeded #include <machine/clock.h>Poul-Henning Kamp2000-10-151-1/+0
| | | | Notes: svn path=/head/; revision=67164
* Use device_get_nameunit(dev) as the mutex string when callingBill Paul2000-10-131-1/+1
| | | | | | | | mtx_init() instead of hard-coded string constant. Also remember to do the mutex changes to the ste driver, which I forgot in the first commit. Notes: svn path=/head/; revision=67089
* First round of converting network drivers from spls to mutexes. ThisBill Paul2000-10-132-25/+50
| | | | | | | | | | | takes care of all the 10/100 and gigE PCI drivers that I've done. Next will be the wireless drivers, then the USB ones. I may pick up some stragglers along the way. I'm sort of playing this by ear: if anyone spots any places where I've screwed up horribly, please let me know. Notes: svn path=/head/; revision=67087
* Close PR# 19904: remember to call sf_setmulti() when initializing theBill Paul2000-07-141-0/+5
| | | | | | | interface so the multicast filter will be programmed correctly. Notes: svn path=/head/; revision=63166
* Make all Ethernet drivers attach using ether_ifattach() and detach usingArchie Cobbs2000-07-131-6/+3
| | | | | | | | | | | | ether_ifdetach(). The former consolidates the operations of if_attach(), ng_ether_attach(), and bpfattach(). The latter consolidates the corresponding detach operations. Reviewed by: julian, freebsd-net Notes: svn path=/head/; revision=63090
* Use the correct register name. s/PCI_COMMAND_STATUS_REG/PCIR_COMMAND/Peter Wemm2000-05-281-3/+3
| | | | Notes: svn path=/head/; revision=61041
* Move code to handle BPF and bridging for incoming Ethernet packets outArchie Cobbs2000-05-141-11/+0
| | | | | | | | | | | | | | | | | | of the individual drivers and into the common routine ether_input(). Also, remove the (incomplete) hack for matching ethernet headers in the ip_fw code. The good news: net result of 1016 lines removed, and this should make bridging now work with *all* Ethernet drivers. The bad news: it's nearly impossible to test every driver, especially for bridging, and I was unable to get much testing help on the mailing lists. Reviewed by: freebsd-net Notes: svn path=/head/; revision=60536
* Depend on miibus.Peter Wemm2000-04-291-0/+2
| | | | | | | | | | | Note that if_aue doesn't strictly depend on usb because it uses the method interface for calls rather than using internal symbols, and because it's a child driver of usb and therefore will not try and do anything unless the parent usb code is loaded at some point. if_aue does strictly depend on miibus as it will fail to link if it is missing. Notes: svn path=/head/; revision=59758
* Modify the Adaptec "starfire" driver to reset the PHY on the MII busBill Paul1999-12-052-11/+47
| | | | | | | | | | | | | | | | | | | | | before selecting a mode. The Seeq PHY chips on the Adaptec cards that use the AIC-6915 controller seem to need it in order to get them to change modes correctly. This corrects a problem that I noticed where my ANA-62022 board failed to correctly program the full duplex bit in the macconfig1 register when the interface was brought up. Running ifconfig sf0 would mask this problem in some cases because polling the PHY status would cause the miibus code to notice that full duplex was now needed and the statchg callback would be invoked to configure the duplex setting. However it would still get it wrong other times. Also changed sf_miibus_statchg() to program the IPG register to match the duplex setting in accordance with Adaptec manual's recommendations (0x15 for full duplex, 0x11 for half duplex). Notes: svn path=/head/; revision=54161
* Minor tweak: the subsystem device ID code for the quad port 62044 cardBill Paul1999-11-202-2/+7
| | | | | | | | | | | is documented to be 0x18 in the Adaptec manual, however there appears to be a newer board rev with code 0x19. I added a #define for this and updated the probe code so that this board will be properly identified in the probe messages. (Currently it's just identified generically as an AIC-6915 chip.) Notes: svn path=/head/; revision=53468
* Update the Starfire driver comments and man page to include the URL ofBill Paul1999-09-261-1/+2
| | | | | | | | the AIC-6915 Programmer's Manual which I finally found online at Adaptec's site. Notes: svn path=/head/; revision=51682
* Change contigmalloc() lower memory bound from 1MB to 0 to improveBill Paul1999-09-251-1/+1
| | | | | | | | | | chances of allocations succeeding on systems with small amounts of RAM. Pointed out by: bde Notes: svn path=/head/; revision=51657
* As suggested by phk, unconditionalize BPF support in these drivers. SinceBill Paul1999-09-231-10/+1
| | | | | | | | | | there are stubs compiled into the kernel if BPF support is not enabled, there aren't any problems with unresolved symbols. The modules in /modules are compiled with BPF support enabled anyway, so the most this will do is bloat GENERIC a little. Notes: svn path=/head/; revision=51583
* Tweak these for what I hope is the last time: change the DRIVER_MODULE()Bill Paul1999-09-221-1/+1
| | | | | | | | | | | | | declaration for the interface driver from "foo" to "if_foo" but leave the declaration for the miibus attached to the interface driver alone. This lets the internal module name be "if_foo" while still allowing the miibus instances to attach to "foo." This should allow ifconfig to autoload driver modules again without breaking the miibus attach. Notes: svn path=/head/; revision=51533
* Un-do the changes to the DRIVER_MODULE() declarations in these drivers.Bill Paul1999-09-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This whole idea isn't going to work until somebody makes the bus/kld code smarter. The idea here is to change the module's internal name from "foo" to "if_foo" so that ifconfig can tell a network driver from a non-network one. However doing this doesn't work correctly no matter how you slice it. For everything to work, you have to change the name in both the driver_t struct and the DRIVER_MODULE() declaration. The problems are: - If you change the name in both places, then the kernel thinks that the device's name is now "if_foo", so you get things like: if_foo0: <FOO ethernet> irq foo at device foo on pcifoo if_foo0: Ethernet address: foo:foo:foo:foo:foo:foo This is bogus. Now the device name doesn't agree with the logical interface name. There's no reason for this, and it violates the principle of least astonishment. - If you leave the name in the driver_t struct as "foo" and only change the names in the DRIVER_MODULE() declaration to "if_foo" then attaching drivers to child devices doesn't work because the names don't agree. This breaks miibus: drivers that need to have miibuses and PHY drivers attached never get them. In other words: damned if you do, damned if you don't. This needs to be thought through some more. Since the drivers that use miibus are broken, I have to change these all back in order to make them work again. Yes this will stop ifconfig from being able to demand load driver modules. On the whole, I'd rather have that than having the drivers not work at all. Notes: svn path=/head/; revision=51473
* Grrr. Okay, changing the devnames was a bad idea. Put them back the wayBill Paul1999-09-201-1/+1
| | | | | | | they were. Notes: svn path=/head/; revision=51455
* Fix the strings in the driver_t structs so that they match the new namesBill Paul1999-09-201-1/+1
| | | | | | | in the DRIVER_MODULES() declarations. *sigh* Notes: svn path=/head/; revision=51453
* Goofed and didn't change the second DRIVER_MODULE() linking these withDavid E. O'Brien1999-09-201-1/+1
| | | | | | | | | the miibus. Noticed by: wpaul Notes: svn path=/head/; revision=51450
* Change the name we register with DRIVER_MODULE() to include the leadingDavid E. O'Brien1999-09-201-1/+1
| | | | | | | | | "if_". Reviewed by: msmith, wpaul Notes: svn path=/head/; revision=51446
* Fix sf_probe() to detect the card type properly. I botched the readingBill Paul1999-09-171-2/+2
| | | | | | | | of the subsystem ID when I converted to newbus. The driver still detects the chipset and still works but fails to identify the exact card. Notes: svn path=/head/; revision=51336
* Add a pointer to "controller miibus0" for people who will not read thePeter Wemm1999-09-081-0/+1
| | | | | | | | commit messages or GENERIC and insist on running -CURRENT. It probably won't work, but it's worth a try. Notes: svn path=/head/; revision=51089
* #ifdef out the definition for the small packet RX ring. I ended up onlyBill Paul1999-09-031-0/+9
| | | | | | | | using one RX ring because of the alignment issue, so we may as well save a few K of memory by not allocating space for it. Notes: svn path=/head/; revision=50863
* Convert the Adaptec and Winbond drivers to miibus.Bill Paul1999-08-302-590/+80
| | | | Notes: svn path=/head/; revision=50675
* Don't restrict our requests for contiguous memory to addresses >= 1MB.Bruce Evans1999-08-291-1/+1
| | | | | | | | | | | This fixes, at least, panics in ncr_attach() on i386's with about 5MB of memory. The restriction was a hack to leave some low memory for ISA DMA, but on i386's we now allocate pages from the top down, so all the restriction did was cause our allocations to fail when there is no free memory above 1MB. Notes: svn path=/head/; revision=50548
* $Id$ -> $FreeBSD$Peter Wemm1999-08-282-3/+3
| | | | Notes: svn path=/head/; revision=50477
* Remember to clear the IFF_RUNNING and IFF_OACTIVE flags in sf_stop() andBill Paul1999-07-251-2/+7
| | | | | | | sk_stop(). Notes: svn path=/head/; revision=49077
* This commit adds device driver support for Adaptec Duralink PCI fastBill Paul1999-07-252-0/+3008
ethernet controllers based on the AIC-6915 "Starfire" controller chip. There are single port, dual port and quad port cards, plus one 100baseFX card. All are 64-bit PCI devices, except one single port model. The Starfire would be a very nice chip were it not for the fact that receive buffers have to be longword aligned. This requires buffer copying in order to achieve proper payload alignment on the alpha. Payload alignment is enforced on both the alpha and x86 platforms. The Starfire has several different DMA descriptor formats and transfer mechanisms. This driver uses frame descriptors for transmission which can address up to 14 packet fragments, and a single fragment descriptor for receive. It also uses the producer/consumer model and completion queues for both transmit and receive. The transmit ring has 128 descriptors and the receive ring has 256. This driver supports both FreeBSD/i386 and FreeBSD/alpha, and uses newbus so that it can be compiled as a loadable kernel module. Support for BPF and hardware multicast filtering is included. Notes: svn path=/head/; revision=49076