patch: update iwi(4)

Matthew Dillon dillon at apollo.backplane.com
Thu Apr 15 12:28:48 PDT 2010


:* Locking is done completely with lockmgr locks as it is done for
:  ath now. What is the plan about if_serializer?
:  I noticed that e.g. parent_updown() in ieee80211_proto.c calls
:  if_ioctl without if_serializer held. Does this mean that
:  if_serializer use is deprecated?

    The serializer is already held at that point.  The serializer is
    not optional, it must be held properly when messing with the ifnet
    (such as when dequeueing packets).  I still have some work to do
    on the ath driver but as Rui mentioned I'm having problems stabilizing
    it on SMP.

    The kernel will call into the driver with the serializer held for
    entry points via ifnet, but things such as callouts and the device
    function call API need to acquire the serializer.

    The 80211 (wlan) code does acquire the serializer when making most
    cross-ifnet calls which simplifies the other drivers but it's still 
    a real mess.

:* It still uses our old firmware API via wrapper functions, as I
:  didn't know how to create the firmware modules needed with the new API.
:  Therefore the patch brings kern_firmware.c back into the kernel
:  build, but all this can easily be switched to the new API.
:
:* sysctl's are not removed on module unload, so when unloading/loading
:  I get warnings about reusing sysctl leafs. I didn't find the
:  relevent code in the other drivers, so maybe I'm missing something
:  here.

    Any SYSCTL declarations should be automatically added and removed.
    Any manually added sysctl subtrees (made with procedure calls within
    the driver) have to be explicitly removed by the driver.

    An example can be found in /usr/src/sys/dev/coretemp/coretemp.c,
    coretemp_attach() and coretemp_detach().

:* The alloc_unr()/free_unr() stuff is just commented out. Are there
:  any plans to bring in this API from FreeBSD?
:

    That doesn't look optional.  Sigh. I suppose you could port subr_unit.c
    but as is typical in FreeBSDland they have completely overengineered
    the API.  It would be a whole lot easier if they had just used the
    subr_blist.c code for that.

					-Matt
					Matthew Dillon 
					<dillon at backplane.com>





More information about the Submit mailing list