| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
a panic on sparc64.
Reviewed by: Florian Smeets flo kasimir.com
|
|
|
|
|
|
|
|
|
|
|
| |
- Add a mutex to the softc to protect the softc and device hardware.
- Use a private timer to implement a watchdog for tx timeouts and drive
the timer for auto negotiation.
- Use bus_foo() rather than bus_space_foo() and remove the bus space
tag & handle from the softc.
- Call bus_setup_intr() after ether_ifattach().
Tested by: Florian Smeets flo of kasimir.com
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
unnecessary.
|
| |
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
| |
rather than in ifindex_table[]; all (except one) accesses are
through ifp anyway. IF_LLADDR() works faster, and all (except
one) ifaddr_byindex() users were converted to use ifp->if_addr.
- Stop storing a (pointer to) Ethernet address in "struct arpcom",
and drop the IFP2ENADDR() macro; all users have been converted
to use IF_LLADDR() instead.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
and amd64. The optimization is a trivial on recent machines.
Reviewed by: -arch (imp, marcel, dfr)
|
|
|
|
|
| |
BUS_PROBE_LOW_PRIORITY in stead of ifdef for devices that xl and vx
both support so that xl will snarf them on up.
|
|
|
|
| |
the interface as IFF_NEEDSGIANT so if_start is run holding Giant.
|
| |
|
| |
|
|
|
|
| |
hardcoded to "ON" for these interfaces.
|
|
|
|
|
| |
Submitted by: Mark Santcroos <marks@ripe.net>
Reviewed by: imp, dfr, bde
|
| |
|
|
|
|
| |
Requested by: bde,imp
|
| |
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
| |
Glanced over by: imp, gibbs
Tested by: i386 LINT
|
|
|
|
| |
Also some minor style cleanups.
|
|
|
|
|
| |
tree for two or more years now), except in a few places where there's
code to be compatible with older versions of FreeBSD.
|
|
|
|
| |
- Use BUS_DMA_ZERO where appropriate.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg.
Lockfunc allows a driver to provide a function for managing its locking
semantics while using busdma. At the moment, this is used for the
asynchronous busdma_swi and callback mechanism. Two lockfunc implementations
are provided: busdma_lock_mutex() performs standard mutex operations on the
mutex that is specified from lockfuncarg. dftl_lock() is a panic
implementation and is defaulted to when NULL, NULL are passed to
bus_dma_tag_create(). The only time that NULL, NULL should ever be used is
when the driver ensures that bus_dmamap_load() will not be deferred.
Drivers that do not provide their own locking can pass
busdma_lock_mutex,&Giant args in order to preserve the former behaviour.
sparc64 and powerpc do not provide real busdma_swi functions, so this is
largely a noop on those platforms. The busdma_swi on is64 is not properly
locked yet, so warnings will be emitted on this platform when busdma
callback deferrals happen.
If anyone gets panics or warnings from dflt_lock() being called, please
let me know right away.
Reviewed by: tmm, gibbs
|
|
|
|
|
| |
Special thanks to brueffer for sending me such a card so that
I could do this work.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
other initializations succeeded.
- Initialize the TX and RX rings in epic_attach() rather than in
epic_init() where we're not supposed to fail. Similarly, free
the TX and RX rings in epic_detach() rather than in epic_stop().
- Change epic_init() to be a void function now that it can't fail.
Also change its parameter to a void * so that we have a correct
prototype for if_init.
- Now that epic_init() has a correct prototype, don't cast the
function pointer when initializing if_init.
- Fix nearby style bugs.
|
|
|
|
| |
- Use __FBSDID.
|
|
|
|
|
|
|
| |
- Don't initialize if_output, ether_ifattach() does this for us.
- Use pci_enable_busmaster() instead of using pci_read_config()
and pci_write_config() directly.
- Don't try to enable I/O, bus_alloc_resource() does this for us.
|
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
|
|
|
| |
instead use our optimized m_getcl().
Submitted by: Hiten Pandya <hiten@unixdaemons.com>
MFC After: 1 week
|
|
|
|
| |
Approved by: trb
|
|
|
|
| |
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
|
|
|
|
| |
The devlist2h.awk tool to do this has been repocopied to sys/tools/.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
o replace EPIC_MGETCLUSER with m_getcl
MFC after: 1 week
|
|
|
|
|
| |
compilant. Split two pieces if code into separate functions to do not
exceed line length due to indentation.
|
|
|
|
| |
others.
|
|
|
|
| |
epic_common_attach().
|
|
|
|
|
|
|
|
|
|
|
| |
we don't collect any stats in it, we mii_tick() in it! This fix the bug
when autonegotiating fullduplex modes.
Also, pause activity before setting TXCON in epic_miibus_statchg(). Though
i've never seen problmes from not doing that, the documentation says we
need to do it.
MFC after: 1 week
|
|
|
|
|
|
| |
Inspired by: dc(4)
MFC after: 1 week
|
|
|
|
| |
MFC after: 1 day
|
|
|
|
|
|
|
| |
was if_baudrate being always 10Mbit.
Obtained from: OpenBSD
MFC after: 1 day
|
|
|
|
|
|
| |
into if_txreg.h.
MFC after: 1 week
|