History log of /freebsd-9.3-release/sys/dev/sn/
Revision Date Author Comments
267654 20-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


256219 09-Oct-2013 mav

MFC r250460 (by eadler):
Fix a bunch of typos.


248078 09-Mar-2013 marius

MFC: r243857 (partial)

Mechanically substitute flags from historic mbuf allocator with
malloc(9) flags in sys/dev.


235743 21-May-2012 jhb

Toss bogus mergeinfo.


235738 21-May-2012 sbruno

MFC r235634

Fix and update battery status bits according to linux driver


225736 23-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


207554 03-May-2010 sobomax

Add new tunable 'net.link.ifqmaxlen' to set default send interface
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


199559 19-Nov-2009 jhb

- Add a private timer to drive the transmit watchdog instead of using
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.


199414 17-Nov-2009 jhb

Use the bus_*() routines rather than bus_space_*() for register operations.


195049 26-Jun-2009 rwatson

Use if_maddr_rlock()/if_maddr_runlock() rather than IF_ADDR_LOCK()/
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


166901 23-Feb-2007 piso

o break newbus api: add a new argument of type driver_filter_t to
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@


155283 04-Feb-2006 imp

Fix mismerge after last cvs update for the IFQ_DRV_DEQUEUE changes.


155280 04-Feb-2006 imp

Remove ifdef notyet for SIOCGHWADDR
Treat SIOCADDMULTI and SIOCDELMULTI the same, since they had the same code
Remove redundant assignment to error
Convert to using the altq interface completely.


154100 07-Jan-2006 imp

While reviewing if_sn in an attempt to understand network drivers
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.


150459 22-Sep-2005 imp

Eliminate dead code


150306 19-Sep-2005 imp

Make sure that we call if_free(ifp) after bus_teardown_intr. Since we
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.


150183 15-Sep-2005 ru

Spell "destroy" correctly.


150106 13-Sep-2005 imp

Use new convenience function to read CIS rather than the older, harder to
use version.


149101 15-Aug-2005 imp

Some preliminary support for Megahertz XJEM and CCEM (same cards really)
combo cards.


149095 15-Aug-2005 imp

Diff reduction to my tree: commit the trivial part of efforts to add
support for the really old Megahertz ethernet/modem combo cards.


148887 09-Aug-2005 rwatson

Propagate rename of IFF_OACTIVE and IFF_RUNNING to IFF_DRV_OACTIVE and
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


148654 03-Aug-2005 rwatson

Modify device drivers supporting multicast addresses to lock if_addr_mtx
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


148144 18-Jul-2005 imp

Better name for type 4 chips


147957 13-Jul-2005 imp

Comment out a few entries in the sn_pccard_products table until
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.


147955 13-Jul-2005 imp

Commit firmware that the xilinx on the Ositech Seven of Diamonds and a
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.


147872 10-Jul-2005 imp

Add a boatload of new device ids, gleaned from the pcmcia-cs-3.2.8
distribution. Add the appropriate devices to the man pages.

Obtained from: pcmcia-cs
Approved by: re (scottl)


147850 09-Jul-2005 scottl

Fix the build. The SMC_8020BT define doesn't exist yet.

Approved by: re (implicit)


147847 09-Jul-2005 imp

Noticed that NetBSD's sm driver has the PSION GOLDCARD listed, so list
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)


147797 06-Jul-2005 imp

Add support for Farallon EtherMAC PC Card.
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)


147580 24-Jun-2005 imp

Eliminate unused argument in PCMCIA_CARD macro.

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)


147256 10-Jun-2005 brooks

Stop embedding struct ifnet at the top of driver softcs. Instead the
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


140525 20-Jan-2005 imp

Only attach to network functions. I'm not aware of any multifunction
(pccard sense) sn based cards, but this won't hurt. The
pseudo-multifunction cards need a special driver anyway...


139749 06-Jan-2005 imp

Start each of the license/copyright comments with /*-, minor shuffle of lines


130270 09-Jun-2004 naddy

Replace handrolled CRC calculation with ether_crc32_[lb]e().


129879 30-May-2004 phk

Add missing <sys/module.h> includes


129798 28-May-2004 imp

Include required machine/bus.h


129764 27-May-2004 imp

Fix disordering of pccarddevs.h noticed by bde. Also remove a few
redundant includes and fix some of the include disordering.

Submitted by: bde


129740 26-May-2004 imp

Move to generating pccarddevs.h on the fly, both for the kernel and
the modules.

Also generate usbdevs.h automatically now, but a non-kernel file is
stopping that at the moment.


129616 23-May-2004 mux

We don't need to initialize if_output, ether_ifattach() does it
for us.


129046 08-May-2004 imp

It turns out that the module dependency on pccard is in error. Since
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.


128307 16-Apr-2004 luigi

Remove two variables that became unused because of last commit.

Reported by: tinderbox


128293 15-Apr-2004 luigi

Remove improper use of if_addrhead in device drivers to check
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.


127135 17-Mar-2004 njl

Convert callers to the new bus_alloc_resource_any(9) API.

Submitted by: Mark Santcroos <marks@ripe.net>
Reviewed by: imp, dfr, bde


126966 14-Mar-2004 mdodd

Announce ethernet MAC addresss in ether_ifattach().


123289 08-Dec-2003 obrien

Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones.

Requested by: bde,imp


122678 14-Nov-2003 obrien

Remove duplicate FBSDID's, move others to their right place.


122642 14-Nov-2003 imp

Reconst-poison crc routine that was renamed to mchash.
re-remove the _ in u_intXX_t


122625 13-Nov-2003 obrien

Try to create some sort of consistency in how the routings to find the
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).


122427 10-Nov-2003 imp

Don't establish the ISR in the sn_activate routine. I've had two
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.


121816 31-Oct-2003 brooks

Replace the if_name and if_unit members of struct ifnet with new members
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)


121589 26-Oct-2003 imp

Make sn MPSAFE. This has survived a couple of make buildworlds with
my Megahertz XJ10BT.


121553 26-Oct-2003 imp

Style changes:
o kill register
o minor function name tweaks.


121514 25-Oct-2003 imp

Convert to bus_space.
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).


119419 24-Aug-2003 obrien

Use __FBSDID().
Also some minor style cleanups.


119227 21-Aug-2003 imp

DSP Solutions, Inc made the XJEM1144 and XJACK ethernet cards. Update
MEGAHERTZ2 to DSPSI.


113506 15-Apr-2003 mdodd

- Express hard dependencies on bus (pci, isa, pccard) and
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.)


113315 10-Apr-2003 imp

Make sure that pp_name is non-null before setting the device
description. This allows us to rely entirely on the CIS entries if
necessary...


111926 05-Mar-2003 peter

Finish driving a stake through the heart of netns and the associated
ifdefs scattered around the place - its dead Jim!

The SMB stuff had stolen AF_NS, make it official.


111119 19-Feb-2003 imp

Back out M_* changes, per decision of the TRB.

Approved by: trb


109623 21-Jan-2003 alfred

Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.


106937 14-Nov-2002 sam

network interface driver changes:

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


104257 01-Oct-2002 brooks

Use if_printf(ifp, "blah") instead of printf("sn%d: blah", ifp->if_unit).


101531 08-Aug-2002 imp

Don't bogusly depend on pcic. pccard should be enough.

Noticed by: jhay
Forgotten about for two years by: imp


100426 21-Jul-2002 imp

Minor whitespace nits. remove #if 1 and #endif pair, but not code between.


86394 15-Nov-2001 imp

Migrate to PCMCIA_CARD() macros


86273 11-Nov-2001 imp

s/PCCARD_/PCMCIA_/g in NEWCARD device tables to enable easier NetBSD sharing


81122 04-Aug-2001 imp

Kill debug output for sn device. It is confusing the natives


72084 06-Feb-2001 phk

Convert if_multiaddrs from LIST to TAILQ so that it can be traversed
backwards in the three drivers which want to do that.

Reviewed by: mikeh


72012 04-Feb-2001 phk

Another round of the <sys/queue.h> FOREACH transmogriffer.

Created with: sed(1)
Reviewed by: md5(1)


71999 04-Feb-2001 phk

Mechanical change to use <sys/queue.h> macro API instead of
fondling implementation details.

Created with: sed(1)
Reviewed by: md5(1)


71323 21-Jan-2001 imp

Use PCCARD_CIS_xxx #defines for the table of oem ids. These usually
translate to all NULLs (as for all the ones in this commit).


71060 15-Jan-2001 toshi

Add support for SMC91C100FD chip of MELCO LPC-TX.

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>


69955 13-Dec-2000 imp

Add isa support:
o write isa driver routines.
o factor detach routine in sn_detach.


69151 25-Nov-2000 peter

Make sn_pccard_products[] static


67164 15-Oct-2000 phk

Remove unneeded #include <machine/clock.h>


66425 28-Sep-2000 imp

Implement sn_pccard_match. The match routines are the compromise
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.


66136 20-Sep-2000 imp

Remove 8 unnecessary includes from phk's script


66058 19-Sep-2000 imp

Implement indirection in the pccard probe/attach. This should make it
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.


63090 13-Jul-2000 archie

Make all Ethernet drivers attach using ether_ifattach() and detach using
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


60536 14-May-2000 archie

Move code to handle BPF and bridging for incoming Ethernet packets out
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


60173 07-May-2000 imp

Don't claim devices that we fail to probe for. Reverse the sense of a test
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


59760 29-Apr-2000 phk

Remove unneeded #include <sys/kernel.h>


59391 19-Apr-2000 phk

Remove ~25 unneeded #include <sys/conf.h>
Remove ~60 unneeded #include <sys/malloc.h>


59099 08-Apr-2000 imp

Re-enable probe for isa and correct the plug and play issue that
caused this device to be disabled. It will no longer claim all
devices with PNPBIOS enabled.


56397 22-Jan-2000 hosokawa

Don't execute MAC address initialization for non-pccard sn devices.


56366 21-Jan-2000 hosokawa

Added support for hex-encoded MAC address of Megahertz X-Jack Ethernet Card

Reviewed by: Warner Losh <imp@village.org>


55161 28-Dec-1999 imp

Two nits and disable isa probe due to its overly agressive claiming of
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


54994 22-Dec-1999 imp

Newbusify the driver.

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>


54881 20-Dec-1999 nyan

Removed unnecessary include files.


54786 18-Dec-1999 peter

Make this compile again.

GENERIC-broken-by: imp


54773 18-Dec-1999 imp

Driver for the smc91xx series of ethernet chips. Ported from PAO to
3.3R and then to -current. The pccard support has been left in the
driver, but is presently non-functional because we are using the
isa_compat layer for the moment.

Obtained From: PAO
Sponsored by: Timing Solutions