#
fc6d0222 |
| 03-Aug-2006 |
Sascha Wildner <swildner@dragonflybsd.org> |
Remove all occurences of double semicolons at the end of a line by single ones.
Submitted-by: Bill Marquette <bill.marquette@gmail.com>
|
#
94b23fe3 |
| 01-Aug-2006 |
Sascha Wildner <swildner@dragonflybsd.org> |
Use pcidevs.h.
|
#
cdf89432 |
| 31-Dec-2005 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
{ether,ieee80211}_ifdetach() can't be called with serializer being held, since they will go through code which tries to hold serializer again, e.g. ether_ifdetach() -> if_detach() -> in_control()
So
{ether,ieee80211}_ifdetach() can't be called with serializer being held, since they will go through code which tries to hold serializer again, e.g. ether_ifdetach() -> if_detach() -> in_control()
So in various NICs' xxx_detach(): - Move bus_teardown_intr() under "(device_is_attached())", whenever it is applicable. Since it is not possible that intrhandle is NULL here, nuke original "(intrhandle != NULL)". This can: 1) Avoid holding serializer, if xxx_attach() fails 2) Release serializer ASAP 3) Ease following tasks - Hold serializer only for xxx_stop()(or similar functions which stops NIC) and bus_teardown_intr() - Call {ether,ieee80211}_ifdetach() after serializer is released
Other stuffs: - Serialize xxx_detach() for awi(4), ep(4), sn(4) and xe(4) - Release serializer before returning from {ed_pccard,ray}_detach() - Make ipw(4)'s ipw_detach() suitable for error handling, adjust ipw_attach() accordingly - Fix a bug in ex_pccard_detach(): instead of if_detach(), ether_ifdetach() should be used here - For ndis(4), "ifp->serializer" ==> "ifp->if_serializer" Reported-by: esmith <esmith@postmark.net>
Discussed-with: dillon and joerg Partially-Reviewed-by: dillon and joerg Reported-by: Steve Mynott <steve.mynott@gmail.com> and me
show more ...
|
#
78195a76 |
| 28-Nov-2005 |
Matthew Dillon <dillon@dragonflybsd.org> |
Make all network interrupt service routines MPSAFE part 1/3.
Replace the critical section that was previously used to serialize access with the LWKT serializer. Integrate the serializer into the IF
Make all network interrupt service routines MPSAFE part 1/3.
Replace the critical section that was previously used to serialize access with the LWKT serializer. Integrate the serializer into the IFNET structure. Note that kern.intr_mpsafe must be set to 1 for network interrupts to actually run MPSAFE. Also note that any interrupts shared with othre non-MP drivers will cause all drivers on that interrupt to run with the Big Giant Lock.
Network interrupt - Each network driver then simply passes that serializer to bus_setup_intr() so only a single serializer is required to process the entire interrupt path. LWKT serialization support is already 100% integrated into the interrupt subsystem so it will already be held as of when the registered interrupt procedure is called.
Ioctl and if_* functions - All callers of if_* functions (such as if_start, if_ioctl, etc) now obtain the IFNET serializer before making the call. Thus all of these entry points into the driver will now be serialized.
if_input - All code that calls if_input now ensures that the serializer is held. It will either already be held (when called from a driver), or the serializer will be wrapped around the call. When packets are forwarded or bridged between interfaces, the target interface serializer will be dropped temporarily to avoid a deadlock.
Device Driver access - dev_* entry points into certain pseudo-network devices now obtain and release the serializer. This had to be done on a device-by-device basis (but there are only a few such devices).
Thanks to several people for helping test the patch, in particular Sepherosa Ziehau.
show more ...
|
#
d2c71fa0 |
| 22-Nov-2005 |
Matthew Dillon <dillon@dragonflybsd.org> |
Fix the design of ifq_dequeue/altq_dequeue by adding an mbuf pointer and requiring that a polled mbuf be passed as an argument to the dequeue function. Assert that the passed argument matches the mb
Fix the design of ifq_dequeue/altq_dequeue by adding an mbuf pointer and requiring that a polled mbuf be passed as an argument to the dequeue function. Assert that the passed argument matches the mbuf that is actually dequeued. Also remove assignments of the return value from ifq_dequeue() in such cases which implied that the mbuf might be different when, in fact, it had better not be.
show more ...
|
#
2b71c8f1 |
| 24-Oct-2005 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
- Move DEVICE_POLLING from opt_global.h to opt_polling.h(newly added), so that polling(4) can be enabled in modules that are not built during kernel building - Add opt_polling.h to files that dep
- Move DEVICE_POLLING from opt_global.h to opt_polling.h(newly added), so that polling(4) can be enabled in modules that are not built during kernel building - Add opt_polling.h to files that depend on DEVICE_POLLING - Change related netif modules' Makefile to enable polling(4) support - Add comment in net/if_var.h to prevent DEVICE_POLLING related incompatibilities from being introduced Suggested-by: dillon
NOTE: As of this commit, any file that will depend on DEVICE_POLLING *must* include opt_polling.h at its beginning
With-helps-from: joerg Reviewed-by: dillon, submit@
show more ...
|
#
ee61f228 |
| 12-Oct-2005 |
Matthew Dillon <dillon@dragonflybsd.org> |
Remove the INTR_TYPE_* flags. The interrupt type is no longer used to figure out which spl*() set an interrupt belongs to, because, well, spl's no longer exist.
|
#
2f54d1d2 |
| 29-Sep-2005 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
For bge(4), dc(4), lge(4), ndis(4), nge(4), pcn(4), re(4), sis(4), sk(4), ti(4) - Do not start tx engine or set if_timer, if there is nothing to be sent - Let if_watchdog() kick if_start(). This may
For bge(4), dc(4), lge(4), ndis(4), nge(4), pcn(4), re(4), sis(4), sk(4), ti(4) - Do not start tx engine or set if_timer, if there is nothing to be sent - Let if_watchdog() kick if_start(). This may avoid a possible race (in the future) between testing/setting if_timer and calling if_watchdog(). Only bge(4), re(4), sk(4) and ti(4) require this change. The rest drivers affected by this commit already have this in place.
Discussed-with: joerg Reviewed-by: joerg
show more ...
|
#
ea0c0e03 |
| 29-Aug-2005 |
Sepherosa Ziehau <sephe@dragonflybsd.org> |
Remove unnecessary bzero(softc). With following exceptions: - ed(4) if_ed_cbus.c - snc(4) They are PC-98 only.
|
#
3b7f6d2b |
| 12-Jun-2005 |
Joerg Sonnenberger <joerg@dragonflybsd.org> |
Switch to critical sections, fix some possible minor nits with ISR protection.
|
#
9c095379 |
| 25-May-2005 |
Matthew Dillon <dillon@dragonflybsd.org> |
Rewrite the polling code. Instead of trying to do fancy polling enablement from inside the IF interrupt itself, which creates a headache in the code, simply allow IFF_POLLING to be set and cleared v
Rewrite the polling code. Instead of trying to do fancy polling enablement from inside the IF interrupt itself, which creates a headache in the code, simply allow IFF_POLLING to be set and cleared via ifconfig. This greatly simplifies both the networking code and the polling code and allows polling to be enabled and disabled at will on a per-network-interface basis.
* Drivers no longer have to have polling checks in the interrupt path. * An if_poll function vector has been added. Polling is supported if the driver initializes the vector. * Registration command added to the poll function command list. * Driver code for registration and deregistration is now greatly simplified.
The kernel polling code no longer randomly turns off the polling bit if an interface goes down or is reset.
Remove IFCAP_POLLING, it serves no purpose.
Fix a couple of bugs in the serializer code. Add a warning in nexus_setup_intr if a driver tries to specify a serializer and an SPL. A driver can specify one or the other, not both.
Convert the EM driver to use the new serializer API instead of SPLs.
Add ifconfig poll and ifconfig -poll support to ifconfig, and fix bugs in the rtsock code that only returned the low 16 bits of the interface flags so ifconfig properly reports when polling mode is turned on for an interface.
NOTE to people using polling. You must first enable polling via kern.polling.enable, and then may specify the 'poll' directive in ifconfig to enable it on a per interface basis. If IFF_POLLING refuses to be set, the device does not support polling.
show more ...
|
#
e9cb6d99 |
| 24-May-2005 |
Matthew Dillon <dillon@dragonflybsd.org> |
Get rid of bus_{disable,enable}_intr(), it wasn't generic enough for our needs.
Implement some generic atomic.h functions to aid in the implementation of a low level mutex.
Implement a generic low
Get rid of bus_{disable,enable}_intr(), it wasn't generic enough for our needs.
Implement some generic atomic.h functions to aid in the implementation of a low level mutex.
Implement a generic low level sleep-mutex serializer, kern/lwkt_serialize.c. The serializer is designed to be a replacement for SPL calls but may also be used for other very low level work (e.g. lockmgr interlocks).
Add a serializer argument to BUS_SETUP_INTR(). When non-NULL, the interrupt handler will no longer be protected by an SPL so e.g. spl*() will no longer protect against that device's interrupts.
The IF queueing and dequeueing mechanisms may no longer depend on outside SPL state because network driver interrupt handlers are no longer required to enter splnet(). Use critical sections for the moment. The IFQ and IFF_OACTIVE interactions are not yet MP safe.
show more ...
|
#
4e6d744d |
| 24-May-2005 |
Joerg Sonnenberger <joerg@dragonflybsd.org> |
Use bus_alloc_resource_any when possible.
|
#
198d1293 |
| 21-Feb-2005 |
Joerg Sonnenberger <joerg@dragonflybsd.org> |
Remove some duplicate FreeBSD CVS IDs, move some IDs to better places.
Submitted-by: Sarunas Vancevicius <svan@redbrick.dcu.ie>
|
#
e25db1f0 |
| 14-Feb-2005 |
Joerg Sonnenberger <joerg@dragonflybsd.org> |
ALTQ support.
|
#
3013ac0e |
| 23-Jul-2004 |
Joerg Sonnenberger <joerg@dragonflybsd.org> |
Unify the input handling of the low-level network stack by introducing a new field if_input in struct ifnet.
Initialize if_input and if_output in the low-level _ifattach routines.
Make the _output
Unify the input handling of the low-level network stack by introducing a new field if_input in struct ifnet.
Initialize if_input and if_output in the low-level _ifattach routines.
Make the _output and _input routines static, they are now called via (*ifp->if_input) and (*ifp->if_output) accordingly. The exception is ether_input which is still used with the second argument, the pointer to the Ethernet header instead of always taking it from the mbuf.
Move the if_attach and bpfattach from the devices into fddi_ifattach, atm_ifattach.
Remove the first argument to VLAN_INPUT_TAG, the pointer to the Ethernet header. Expect it at the beginning of the mbuf.
Adjust the network for the changed API. Exceptions are wl(4), le(4), ie(4), el(4), ed(4) and de(4), because they use a on-stack Ethernet header. Another exception is the ATM stack, which uses a fourth argument to atm_input.
Inspired-by: NetBSd net/if.h, rev 1.36
show more ...
|
#
d9168eb7 |
| 07-Jul-2004 |
Joerg Sonnenberger <joerg@dragonflybsd.org> |
Add per-device polling support.
|
#
267caeeb |
| 02-Jul-2004 |
Joerg Sonnenberger <joerg@dragonflybsd.org> |
Announce MAC address in ether_ifattach, not in each NIC indepently.
aue(4), axe(4), cue(4), kue(4), pcn(4): - Don't bcopy the MAC address, ether_ifattach does it. lnc(4): - sc->arpcom.ac_if ==> ifp
Announce MAC address in ether_ifattach, not in each NIC indepently.
aue(4), axe(4), cue(4), kue(4), pcn(4): - Don't bcopy the MAC address, ether_ifattach does it. lnc(4): - sc->arpcom.ac_if ==> ifp in lnc_attach_common, more changes coming. awi(4): - Nuke local copy of ether_sprintf, use %6D directly. - Use if_printf instead of printf("%s: ...", sc->sc_dev.dv_xname, ...).
show more ...
|
#
74f1caca |
| 02-Jun-2004 |
Eirik Nygaard <eirikn@dragonflybsd.org> |
Change mbug allocation flags from M_ to MB_ to avoid confusion with malloc flags.
Requested by: Jeffrey Hsu
|
#
5047f29c |
| 06-May-2004 |
Joerg Sonnenberger <joerg@dragonflybsd.org> |
Switch to the callout interface and rename the associated entry to sis_timer, which is more accurate.
|
#
46f25451 |
| 16-Apr-2004 |
Joerg Sonnenberger <joerg@dragonflybsd.org> |
Move IFF_PROMISC and IFF_POLLING from ifnet.ipending to ifnet.if_flags, where they belong. Consistently use the higher bits of if_flags, not ipending.
|
#
10c5bfa0 |
| 14-Apr-2004 |
Joerg Sonnenberger <joerg@dragonflybsd.org> |
Remove unit from sis_softc and use device_printf and if_printf instead of the "sis%d: ..." printfs. Use the device name for if_initname.
|
#
4ddeda6c |
| 01-Apr-2004 |
Joerg Sonnenberger <joerg@dragonflybsd.org> |
Convert sis(4) from vtophys to busdma.
Obtained-from: FreeBSD 5
|
#
bd4539cc |
| 23-Mar-2004 |
Jeffrey Hsu <hsu@dragonflybsd.org> |
Eliminate use of curthread in if_ioctl functions by passing down the ucred structure.
|
#
49eef4c6 |
| 16-Mar-2004 |
Joerg Sonnenberger <joerg@dragonflybsd.org> |
Cleanup sis(4): - conform somewhat to style(9) - rename sis_crc to sis_mchash - use LIST_FOREACH for ifp->if_multiaddrs and mii->mii_phys scans - make sis_rxeoc static - use BPF_MTAP
|