summaryrefslogtreecommitdiffstats
path: root/sys/dev/sn
Commit message (Collapse)AuthorAgeFilesLines
* ether_ifattach() sets if_mtu to ETHERMTU, don't bother set it againkevlo2012-01-071-1/+0
| | | | Reviewed by: yongari
* Add new tunable 'net.link.ifqmaxlen' to set default send interfacesobomax2010-05-031-2/+2
| | | | | | | | | | queue length. The default value for this parameter is 50, which is quite low for many of today's uses and the only way to modify this parameter right now is to edit if_var.h file. Also add read-only sysctl with the same name, so that it's possible to retrieve the current value. MFC after: 1 month
* - Add a private timer to drive the transmit watchdog instead of usingjhb2009-11-192-20/+39
| | | | | | if_watchdog and if_timer. - Fix some issues in detach for sn(4), ste(4), and ti(4). Primarily this means calling ether_ifdetach() before anything else.
* Use the bus_*() routines rather than bus_space_*() for register operations.jhb2009-11-173-14/+8
|
* Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/rwatson2009-06-261-3/+3
| | | | | | | | | | | | | IF_ADDR_UNLOCK() across network device drivers when accessing the per-interface multicast address list, if_multiaddrs. This will allow us to change the locking strategy without affecting our driver programming interface or binary interface. For two wireless drivers, remove unnecessary locking, since they don't actually access the multicast address list. Approved by: re (kib) MFC after: 6 weeks
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-231-1/+2
| | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@
* Fix mismerge after last cvs update for the IFQ_DRV_DEQUEUE changes.imp2006-02-041-4/+4
|
* Remove ifdef notyet for SIOCGHWADDRimp2006-02-041-19/+7
| | | | | | Treat SIOCADDMULTI and SIOCDELMULTI the same, since they had the same code Remove redundant assignment to error Convert to using the altq interface completely.
* While reviewing if_sn in an attempt to understand network driversimp2006-01-071-34/+34
| | | | | | | | | | | | | | | better, I discovered sn doing too many pointer dereferences. This driver would do silly things like: sn_foo(struct ifnet *ifp) { struct sn_softc *sc = ifp->if_softc; sc->ifp->mumble /* Other stuff */ } while /* other stuff */ usually needed sc, the extra deref isn't needed. Eliminate a few dozen of them.
* Eliminate dead codeimp2005-09-221-6/+0
|
* Make sure that we call if_free(ifp) after bus_teardown_intr. Since weimp2005-09-191-1/+1
| | | | | | | could get an interrupt after we free the ifp, and the interrupt handler depended on the ifp being still alive, this could, in theory, cause a crash. Eliminate this possibility by moving the if_free to after the bus_teardown_intr() call.
* Spell "destroy" correctly.ru2005-09-152-2/+2
|
* Use new convenience function to read CIS rather than the older, harder toimp2005-09-131-2/+1
| | | | use version.
* Some preliminary support for Megahertz XJEM and CCEM (same cards really)imp2005-08-151-28/+159
| | | | combo cards.
* Diff reduction to my tree: commit the trivial part of efforts to addimp2005-08-152-2/+8
| | | | support for the really old Megahertz ethernet/modem combo cards.
* Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE andrwatson2005-08-091-13/+14
| | | | | | | | | | | | | | IFF_DRV_RUNNING, as well as the move from ifnet.if_flags to ifnet.if_drv_flags. Device drivers are now responsible for synchronizing access to these flags, as they are in if_drv_flags. This helps prevent races between the network stack and device driver in maintaining the interface flags field. Many __FreeBSD__ and __FreeBSD_version checks maintained and continued; some less so. Reviewed by: pjd, bz MFC after: 7 days
* Modify device drivers supporting multicast addresses to lock if_addr_mtxrwatson2005-08-031-1/+5
| | | | | | | | over iteration of their multicast address lists when synchronizing the hardware address filter with the network stack-maintained list. Problem reported by: Ed Maste (emaste at phaedrus dot sandvine dot ca> MFC after: 1 week
* Better name for type 4 chipsimp2005-07-181-1/+1
|
* Comment out a few entries in the sn_pccard_products table untilimp2005-07-131-27/+40
| | | | | | | support for them can really be added. Eliminate the check for network card, because many of the cards in the commented out section are combo cards and report themselves as either multifunction or modem. They will be added back as I obtain hardware and test them more fully.
* Commit firmware that the xilinx on the Ositech Seven of Diamonds and aimp2005-07-131-0/+382
| | | | | | few other cards need. This firmware was obtained from the Linux pcmica-cs project, but Ositech Communications, Inc has been kind enough to grant permission to change the license to a pure BSDL type.
* Add a boatload of new device ids, gleaned from the pcmcia-cs-3.2.8imp2005-07-102-3/+7
| | | | | | | distribution. Add the appropriate devices to the man pages. Obtained from: pcmcia-cs Approved by: re (scottl)
* Fix the build. The SMC_8020BT define doesn't exist yet.scottl2005-07-091-0/+2
| | | | Approved by: re (implicit)
* Noticed that NetBSD's sm driver has the PSION GOLDCARD listed, so listimp2005-07-091-3/+2
| | | | | | | | | | | that since I can't test it directly. The driver also lists the EM1144 as being supported, but in reality it isn't. The EM1144-T, {XJ,CC}{3288,3336} have the SMC chips in them, but aren't conformant MFC cards, so they need their own driver. Also, it does little harm to list the 8020BT, so remove #if 0. Approved by: re (scottl)
* Add support for Farallon EtherMAC PC Card.imp2005-07-064-66/+65
| | | | | | | | | Move ethernet MAC address setting into pccard attachment Fix panic from IFP2ENADDR() use prior to if_alloc Remove OLDCARD compat support. This should work still on oldcard, however. sn_attach now requires that the resources be activated now, so adjust. Approved by: re (scottl)
* Eliminate unused argument in PCMCIA_CARD macro.imp2005-06-241-3/+3
| | | | | | | | Provide a backwards compatible way to have the extra macro by defining PCCARD_API_LEVEL 5 before including pccarddevs for driver writers that want/need to have the same driver on 5 and 6 with pccard attachments. Approved by: re (dwhite)
* Stop embedding struct ifnet at the top of driver softcs. Instead thebrooks2005-06-103-58/+61
| | | | | | | | | | | | | | | | | | | | struct ifnet or the layer 2 common structure it was embedded in have been replaced with a struct ifnet pointer to be filled by a call to the new function, if_alloc(). The layer 2 common structure is also allocated via if_alloc() based on the interface type. It is hung off the new struct ifnet member, if_l2com. This change removes the size of these structures from the kernel ABI and will allow us to better manage them as interfaces come and go. Other changes of note: - Struct arpcom is no longer referenced in normal interface code. Instead the Ethernet address is accessed via the IFP2ENADDR() macro. To enforce this ac_enaddr has been renamed to _ac_enaddr. - The second argument to ether_ifattach is now always the mac address from driver private storage rather than sometimes being ac_enaddr. Reviewed by: sobomax, sam
* Only attach to network functions. I'm not aware of any multifunctionimp2005-01-201-0/+10
| | | | | (pccard sense) sn based cards, but this won't hurt. The pseudo-multifunction cards need a special driver anyway...
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-064-4/+4
|
* Replace handrolled CRC calculation with ether_crc32_[lb]e().naddy2004-06-091-22/+2
|
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* Include required machine/bus.himp2004-05-281-0/+2
|
* Fix disordering of pccarddevs.h noticed by bde. Also remove a fewimp2004-05-271-9/+4
| | | | | | redundant includes and fix some of the include disordering. Submitted by: bde
* Move to generating pccarddevs.h on the fly, both for the kernel andimp2004-05-261-1/+1
| | | | | | | the modules. Also generate usbdevs.h automatically now, but a non-kernel file is stopping that at the moment.
* We don't need to initialize if_output, ether_ifattach() does itmux2004-05-231-1/+0
| | | | for us.
* It turns out that the module dependency on pccard is in error. Sinceimp2004-05-081-1/+0
| | | | | | | | | | | | there's not dependencies on pccard symboles, such a dependency is not necessary. This means that drivers that have multiple attachments can not drag bogus devices into the kernel at load time. We can't (yet) do this with pci and isa. Drivers written for them actually do seem to have symbols that depend on these busses' implementation code. ndis not touched until other things can be tested.
* Remove two variables that became unused because of last commit.luigi2004-04-161-2/+0
| | | | Reported by: tinderbox
* Remove improper use of if_addrhead in device drivers to checkluigi2004-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.
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-2/+2
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Announce ethernet MAC addresss in ether_ifattach().mdodd2004-03-141-1/+0
|
* Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones.obrien2003-12-081-1/+1
| | | | Requested by: bde,imp
* Remove duplicate FBSDID's, move others to their right place.obrien2003-11-141-1/+0
|
* Reconst-poison crc routine that was renamed to mchash.imp2003-11-141-5/+5
| | | | re-remove the _ in u_intXX_t
* Try to create some sort of consistency in how the routings to find theobrien2003-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).
* Don't establish the ISR in the sn_activate routine. I've had twoimp2003-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.
* Replace the if_name and if_unit members of struct ifnet with new membersbrooks2003-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)
* Make sn MPSAFE. This has survived a couple of make buildworlds withimp2003-10-262-123/+119
| | | | my Megahertz XJ10BT.
* Style changes:imp2003-10-261-16/+16
| | | | | o kill register o minor function name tweaks.
* Convert to bus_space.imp2003-10-254-144/+206
| | | | | | | | | 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).
* Use __FBSDID().obrien2003-08-243-6/+10
| | | | Also some minor style cleanups.
* DSP Solutions, Inc made the XJEM1144 and XJACK ethernet cards. Updateimp2003-08-211-1/+1
| | | | MEGAHERTZ2 to DSPSI.
OpenPOWER on IntegriCloud