aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/sn
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove two variables that became unused because of last commit.Luigi Rizzo2004-04-161-2/+0
| | | | | | | Reported by: tinderbox Notes: svn path=/head/; revision=128307
* Remove improper use of if_addrhead in device drivers to checkLuigi Rizzo2004-04-151-18/+0
| | | | | | | | | | | | | | | if the link-level address has been initialized already. The majority of modern drivers never does this and works fine, which makes me think that the check is totally unnecessary and a residue of cut&paste from other drivers. This change is done to simplify locking because now almost none of the drivers uses this field. The exceptions are "ct" "ctau" and "cx" where i am not sure if i can remove that part. Notes: svn path=/head/; revision=128293
* Convert callers to the new bus_alloc_resource_any(9) API.Nate Lawson2004-03-171-2/+2
| | | | | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde Notes: svn path=/head/; revision=127135
* Announce ethernet MAC addresss in ether_ifattach().Matthew N. Dodd2004-03-141-1/+0
| | | | Notes: svn path=/head/; revision=126966
* Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones.David E. O'Brien2003-12-081-1/+1
| | | | | | | Requested by: bde,imp Notes: svn path=/head/; revision=123289
* Remove duplicate FBSDID's, move others to their right place.David E. O'Brien2003-11-141-1/+0
| | | | Notes: svn path=/head/; revision=122678
* Reconst-poison crc routine that was renamed to mchash.Warner Losh2003-11-141-5/+5
| | | | | | | re-remove the _ in u_intXX_t Notes: svn path=/head/; revision=122642
* Try to create some sort of consistency in how the routings to find theDavid E. O'Brien2003-11-131-15/+16
| | | | | | | | | | multicast hash are written. There are still two distinct algorithms used, and there actually isn't any reason each driver should have its own copy of this function as they could all share one copy of it (if it grew an additional argument). Notes: svn path=/head/; revision=122625
* Don't establish the ISR in the sn_activate routine. I've had twoWarner Losh2003-11-102-12/+11
| | | | | | | | | | crashes that had sn0 as the irq that's being serviced, when there was no sn0 in the system. This seems to prevent them. Also, we want to wait until after we've registered with the network layer before we turn on the interrupt spigot to avoid races. Notes: svn path=/head/; revision=122427
* Replace the if_name and if_unit members of struct ifnet with new membersBrooks Davis2003-10-311-2/+1
| | | | | | | | | | | | | | | | if_xname, if_dname, and if_dunit. if_xname is the name of the interface and if_dname/unit are the driver name and instance. This change paves the way for interface renaming and enhanced pseudo device creation and configuration symantics. Approved By: re (in principle) Reviewed By: njl, imp Tested On: i386, amd64, sparc64 Obtained From: NetBSD (if_xname) Notes: svn path=/head/; revision=121816
* Make sn MPSAFE. This has survived a couple of make buildworlds withWarner Losh2003-10-262-123/+119
| | | | | | | my Megahertz XJ10BT. Notes: svn path=/head/; revision=121589
* Style changes:Warner Losh2003-10-261-16/+16
| | | | | | | | o kill register o minor function name tweaks. Notes: svn path=/head/; revision=121553
* Convert to bus_space.Warner Losh2003-10-254-143/+205
| | | | | | | | | | | | Make the pccard attachment work with NEWCARD Start locking of the driver, but only the macros are defined right now Tested on: Megahertz CC10BT/2 # (These cards are very popular on ebay these days, and run < $10 including # shipping from some sellers). Notes: svn path=/head/; revision=121514
* Use __FBSDID().David E. O'Brien2003-08-243-6/+10
| | | | | | | Also some minor style cleanups. Notes: svn path=/head/; revision=119419
* DSP Solutions, Inc made the XJEM1144 and XJACK ethernet cards. UpdateWarner Losh2003-08-211-1/+1
| | | | | | | MEGAHERTZ2 to DSPSI. Notes: svn path=/head/; revision=119227
* - Express hard dependencies on bus (pci, isa, pccard) andMatthew N. Dodd2003-04-152-3/+6
| | | | | | | | | | | network layer (ether). - Don't abuse module names to facilitate ifconfig module loading; such abuse isn't really needed. (And if we do need type information associated with a module then we should make it explicit and not use hacks.) Notes: svn path=/head/; revision=113506
* Make sure that pp_name is non-null before setting the deviceWarner Losh2003-04-101-1/+2
| | | | | | | | description. This allows us to rely entirely on the CIS entries if necessary... Notes: svn path=/head/; revision=113315
* Finish driving a stake through the heart of netns and the associatedPeter Wemm2003-03-051-5/+0
| | | | | | | | | ifdefs scattered around the place - its dead Jim! The SMB stuff had stolen AF_NS, make it official. Notes: svn path=/head/; revision=111926
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-191-2/+2
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-211-2/+2
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* network interface driver changes:Sam Leffler2002-11-141-17/+8
| | | | | | | | | | | | | | | | | o don't strip the Ethernet header from inbound packets; pass packets up the stack intact (required significant changes to some drivers) o reference common definitions in net/ethernet.h (e.g. ETHER_ALIGN) o track ether_ifattach/ether_ifdetach API changes o track bpf changes (use BPF_TAP and BPF_MTAP) o track vlan changes (ifnet capabilities, revised processing scheme, etc.) o use if_input to pass packets "up" o call ether_ioctl for default handling of ioctls Reviewed by: many Approved by: re Notes: svn path=/head/; revision=106937
* Use if_printf(ifp, "blah") instead of printf("sn%d: blah", ifp->if_unit).Brooks Davis2002-10-011-8/+7
| | | | Notes: svn path=/head/; revision=104257
* Don't bogusly depend on pcic. pccard should be enough.Warner Losh2002-08-081-1/+0
| | | | | | | | Noticed by: jhay Forgotten about for two years by: imp Notes: svn path=/head/; revision=101531
* Minor whitespace nits. remove #if 1 and #endif pair, but not code between.Warner Losh2002-07-212-7/+1
| | | | Notes: svn path=/head/; revision=100426
* Migrate to PCMCIA_CARD() macrosWarner Losh2001-11-151-9/+3
| | | | Notes: svn path=/head/; revision=86394
* s/PCCARD_/PCMCIA_/g in NEWCARD device tables to enable easier NetBSD sharingWarner Losh2001-11-111-9/+9
| | | | Notes: svn path=/head/; revision=86273
* Kill debug output for sn device. It is confusing the nativesWarner Losh2001-08-041-1/+0
| | | | Notes: svn path=/head/; revision=81122
* Convert if_multiaddrs from LIST to TAILQ so that it can be traversedPoul-Henning Kamp2001-02-061-1/+1
| | | | | | | | | backwards in the three drivers which want to do that. Reviewed by: mikeh Notes: svn path=/head/; revision=72084
* Another round of the <sys/queue.h> FOREACH transmogriffer.Poul-Henning Kamp2001-02-041-2/+1
| | | | | | | | Created with: sed(1) Reviewed by: md5(1) Notes: svn path=/head/; revision=72012
* Mechanical change to use <sys/queue.h> macro API instead ofPoul-Henning Kamp2001-02-041-2/+2
| | | | | | | | | | fondling implementation details. Created with: sed(1) Reviewed by: md5(1) Notes: svn path=/head/; revision=71999
* Use PCCARD_CIS_xxx #defines for the table of oem ids. These usuallyWarner Losh2001-01-211-5/+6
| | | | | | | translate to all NULLs (as for all the ones in this commit). Notes: svn path=/head/; revision=71323
* Add support for SMC91C100FD chip of MELCO LPC-TX.Toshihiko ARAI2001-01-152-1/+3
| | | | | | | | | | sn1 at port 0x240-0x24f irq 10 slot 0 on pccard0 sn1: SMC91C100FD UTP MAC address 00:a0:dc:22:26:8c Submitted by: "KOMURO" <komujun@nifty.com> Notes: svn path=/head/; revision=71060
* Add isa support:Warner Losh2000-12-134-20/+18
| | | | | | | | o write isa driver routines. o factor detach routine in sn_detach. Notes: svn path=/head/; revision=69955
* Make sn_pccard_products[] staticPeter Wemm2000-11-251-1/+1
| | | | Notes: svn path=/head/; revision=69151
* Remove unneeded #include <machine/clock.h>Poul-Henning Kamp2000-10-153-3/+0
| | | | Notes: svn path=/head/; revision=67164
* Implement sn_pccard_match. The match routines are the compromiseWarner Losh2000-09-281-11/+24
| | | | | | | | | | | | | matching methods so that we can run the same driver on both NEWCARD and OLDCARD. Also set the device description to the card that we found, if any. The sn driver should be ready when the NEWCARD catches up. There's a config activation issue as well as a kernel thread issue to resolve first. Notes: svn path=/head/; revision=66425
* Remove 8 unnecessary includes from phk's scriptWarner Losh2000-09-202-8/+0
| | | | Notes: svn path=/head/; revision=66136
* Implement indirection in the pccard probe/attach. This should make itWarner Losh2000-09-193-22/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | possible to have different probe/attach semantics between the two systems and yet still use the same driver for both. Compatibility methods for OLDCARD drivers. We use these routines to make it possible to call the OLDCARD driver's probe routine in the context that it expects. For OLDCARD these are implemented as pass throughs to the device_{probe,attach} routines. For NEWCARD they are implemented such such that probe becomes strictly a matching routine and attach does both the old probe and old attach. compat devices should use the following: /* Device interface */ DEVMETHOD(device_probe), pccard_compat_probe), DEVMETHOD(device_attach), pccard_compat_attach), /* Card interface */ DEVMETHOD(card_compat_match, foo_match), /* newly written */ DEVMETHOD(card_compat_probe, foo_probe), /* old probe */ DEVMETHOD(card_compat_attach, foo_attach), /* old attach */ This will allow a single driver binary image to be used for both OLDCARD and NEWCARD. Drivers wishing to not retain OLDCARD compatibility needn't do this. ep driver minorly updated. sn driver updated more than minorly. Add module dependencies to allow module to load. Also change name to if_sn. Add some debugging code. attempt to fix the cannot allocate memory problem I'd been seeing. Minor formatting nits. Notes: svn path=/head/; revision=66058
* Make all Ethernet drivers attach using ether_ifattach() and detach usingArchie Cobbs2000-07-132-5/+2
| | | | | | | | | | | | 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
* Move code to handle BPF and bridging for incoming Ethernet packets outArchie Cobbs2000-05-141-20/+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
* Don't claim devices that we fail to probe for. Reverse the sense of a testWarner Losh2000-05-071-2/+2
| | | | | | | | | | | so that we return failure when we've failed and succeed when we succeed. Otherwise, users always get a sn device :-(. PR: 18431 Submitted by: <sanpei@sanpei.org> MIHIRA Yoshiro-san Notes: svn path=/head/; revision=60173
* Remove unneeded #include <sys/kernel.h>Poul-Henning Kamp2000-04-291-1/+0
| | | | Notes: svn path=/head/; revision=59760
* Remove ~25 unneeded #include <sys/conf.h>Poul-Henning Kamp2000-04-191-1/+0
| | | | | | | Remove ~60 unneeded #include <sys/malloc.h> Notes: svn path=/head/; revision=59391
* Re-enable probe for isa and correct the plug and play issue thatWarner Losh2000-04-081-2/+2
| | | | | | | | caused this device to be disabled. It will no longer claim all devices with PNPBIOS enabled. Notes: svn path=/head/; revision=59099
* Don't execute MAC address initialization for non-pccard sn devices.Tatsumi Hosokawa2000-01-224-7/+19
| | | | Notes: svn path=/head/; revision=56397
* Added support for hex-encoded MAC address of Megahertz X-Jack Ethernet CardTatsumi Hosokawa2000-01-212-14/+19
| | | | | | | Reviewed by: Warner Losh <imp@village.org> Notes: svn path=/head/; revision=56366
* Two nits and disable isa probe due to its overly agressive claiming ofWarner Losh1999-12-282-4/+4
| | | | | | | | | | | | | | | devices. o Return ENXIO from sn_isa_probe o Fix SN_DEBUG printf o Use IFQ_MAXLEN rather than 8 I'll fix the isa probe when I get access to a real isa attachment device to test against here in a few days. Overly agressive snagging behavior noticed by: phk Notes: svn path=/head/; revision=55161
* Newbusify the driver.Warner Losh1999-12-225-341/+390
| | | | | | | | | | | | | | | | | | | Add support, kinda, for megaheartz xjack nic cards. This support works well for one machine per ethernet segment because it hard codes the MAC address. The pccardd in -current doesn't have support to parse the ethernet address from the CIS in the funky way that the megaheartz card does things (it includes it in the info tuple, as ascii, which is non-standard). I'd rather kludge this for the moment and work to read the CIS from the kernel rather than mess with pccardd. The isa attachment is untested. The pccard attachment is known to work since I'm committing over it. Card Obtained from: Chris D. Faulhaber <jedger@fxp.org> Notes: svn path=/head/; revision=54994
* Removed unnecessary include files.Yoshihiro Takahashi1999-12-201-2/+0
| | | | Notes: svn path=/head/; revision=54881
* Make this compile again.Peter Wemm1999-12-181-2/+0
| | | | | | | GENERIC-broken-by: imp Notes: svn path=/head/; revision=54786