lkml.org 
[lkml]   [2001]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: NETDEV_CHANGE events when __LINK_STATE_NOCARRIER is modified
    kuznet@ms2.inr.ac.ru wrote:
    >
    > Hello!
    >
    > > Jeff has introduced `alloc_etherdev()' which allocates storage
    > > for a netdev but doesn't register it. The one quirk with this
    > > approach (and why it's vastly simpler than my thing)
    >
    > I do not see where it is simpler. The only difference is that
    > name is unknown. 8)

    Note that using dev->name during probe was always incorrect. Think
    about the error case:

    device 0:
    dev = init_etherdev(...); /* gets if eth0 */
    printk(... dev->name ...)
    /* prints "eth0: error foo, aborting" */
    failure! exit and unregister_netdev
    device 1:
    dev = init_etherdev(...); /* gets if eth0 */
    printk(... dev->name ...)
    /* prints "eth0: error foo, aborting" */
    failure! exit and unregister_netdev
    device 2:
    dev = init_etherdev(...); /* gets if eth0 */
    printk(... dev->name ...)
    /* prints "eth0: error foo, aborting" */
    failure! exit and unregister_netdev

    So, using interface name in this manner was always buggy because it
    conveys no useful information to the user.


    > What's about dev_probe_lock, I again do not understand why it is not deleted.
    > Please, shed some light.

    I'm all for removing it... I do not like removing it in a so-called
    "stable" series, though. alloc_etherdev() was enough to solve the race
    and flush out buggy drivers using dev->name during probe. Notice I did
    not remove init_etherdev and fix it properly -- IMHO that is 2.5
    material.

    Jeff


    --
    Jeff Garzik | Game called on account of naked chick
    Building 1024 |
    MandrakeSoft |
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 12:53    [W:0.023 / U:33.952 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site