08 Jul, 2010

1 commit


10 May, 2010

1 commit

  • Now that core network takes care of trans_start updates, dont do it
    in drivers themselves, if possible. Drivers can avoid one cache miss
    (on dev->trans_start) in their start_xmit() handler.

    Exceptions are NETIF_F_LLTX drivers

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

03 May, 2010

1 commit


29 Apr, 2010

1 commit

  • "ifconfig eth0 up && ifconfig eth0 down" triggers:
    | kobject (a8000000cfa5a480): tried to init an initialized object, something is seriously wrong.
    | Call Trace:
    | [] dump_stack+0x8/0x34
    | [] kobject_init+0xe8/0xf0
    | [] device_initialize+0x2c/0x98
    | [] device_register+0x14/0x28
    | [] mdiobus_register+0xdc/0x1e0
    | [] sbmac_open+0x58/0x220
    | [] __dev_open+0x11c/0x180
    | [] __dev_change_flags+0x120/0x180
    | [] dev_change_flags+0x20/0x78
    | [] devinet_ioctl+0x7cc/0x820
    | [] sock_do_ioctl+0x38/0x90
    | [] compat_sock_ioctl_trans+0x408/0x1030
    | [] compat_sock_ioctl+0xb0/0xd0
    | [] compat_sys_ioctl+0xa0/0x18b8
    | [] handle_sys+0x114/0x130
    |
    | sb1250-mac-mdio: probed

    mdiobus_register() calls device_register() which initializes the kobj of
    the device. mdiobus_unregister() calls only device_del() so we have one
    reference left. That one is leaving with mdiobus_free() which is only
    called on remove.
    Since I don't see any reason why mdiobus_register()/mdiobus_unregister()
    should happen in ->open()/->close() I move them to probe & exit.

    Signed-off-by: Sebastian Andrzej Siewior
    Signed-off-by: David S. Miller

    Sebastian Siewior
     

28 Apr, 2010

2 commits


06 Apr, 2010

1 commit


04 Apr, 2010

1 commit

  • Converts the list and the core manipulating with it to be the same as uc_list.

    +uses two functions for adding/removing mc address (normal and "global"
    variant) instead of a function parameter.
    +removes dev_mcast.c completely.
    +exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for
    manipulation with lists on a sandbox (used in bonding and 80211 drivers)

    Signed-off-by: Jiri Pirko
    Signed-off-by: David S. Miller

    Jiri Pirko
     

19 Feb, 2010

1 commit


19 Nov, 2009

1 commit

  • Not as fancy as coccinelle. Checkpatch errors ignored.
    Compile tested allyesconfig x86, not all files compiled.

    grep -rPl --include=*.[ch] "\brequest_irq\s*\([^,\)]+,\s*\&" drivers/net | while read file ; do \
    perl -i -e 'local $/; while (<>) { s@(\brequest_irq\s*\([^,\)]+,\s*)\&@\1@g ; print ; }' $file ;\
    done

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

13 Oct, 2009

1 commit


24 Jul, 2009

1 commit

  • A pointer to sbmac_probe is passed to the core via
    platform_driver_register and so the function must not disappear when the
    .init sections are discarded. Otherwise (if also having HOTPLUG=y)
    unbinding and binding a device to the driver via sysfs will result in an
    oops as does a device being registered late.

    An alternative to this patch is using platform_driver_probe instead of
    platform_driver_register plus removing the pointer to the probe function
    from the struct platform_driver.

    Signed-off-by: Uwe Kleine-König
    Cc: Weiwei Wang
    Cc: Jeff Garzik
    Cc: David S. Miller
    Cc: Stephen Hemminger
    Acked-by: Maciej W. Rozycki
    Cc: Andrew Morton
    Cc: Greg Kroah-Hartman
    Cc: netdev@vger.kernel.org
    Signed-off-by: David S. Miller

    Uwe Kleine-König
     

06 Jul, 2009

1 commit


13 Jun, 2009

1 commit


05 May, 2009

1 commit


16 Apr, 2009

1 commit


30 Mar, 2009

1 commit


27 Jan, 2009

1 commit


22 Jan, 2009

1 commit

  • Following the removal of the unused struct net_device * parameter from
    the NAPI functions named *netif_rx_* in commit 908a7a1, they are
    exactly equivalent to the corresponding *napi_* functions and are
    therefore redundant.

    Signed-off-by: Ben Hutchings
    Acked-by: Neil Horman
    Signed-off-by: David S. Miller

    Ben Hutchings
     

23 Dec, 2008

1 commit

  • When the napi api was changed to separate its 1:1 binding to the net_device
    struct, the netif_rx_[prep|schedule|complete] api failed to remove the now
    vestigual net_device structure parameter. This patch cleans up that api by
    properly removing it..

    Signed-off-by: Neil Horman
    Signed-off-by: David S. Miller

    Neil Horman
     

28 Oct, 2008

1 commit

  • This converts pretty much everything to print_mac. There were
    a few things that had conflicts which I have just dropped for
    now, no harm done.

    I've built an allyesconfig with this and looked at the files
    that weren't built very carefully, but it's a huge patch.

    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     

09 Oct, 2008

2 commits

  • This patch introduces mdiobus_alloc() and mdiobus_free(), and
    makes all mdio bus drivers use these functions to allocate their
    struct mii_bus'es dynamically.

    Signed-off-by: Lennert Buytenhek
    Signed-off-by: David S. Miller
    Acked-by: Andy Fleming

    Lennert Buytenhek
     
  • In preparation of giving mii_bus objects a device tree presence of
    their own, rename struct mii_bus's ->dev argument to ->parent, since
    having a 'struct device *dev' that points to our parent device
    conflicts with introducing a 'struct device dev' representing our own
    device.

    Signed-off-by: Lennert Buytenhek
    Signed-off-by: David S. Miller
    Acked-by: Andy Fleming

    Lennert Buytenhek
     

25 Sep, 2008

1 commit


26 May, 2008

1 commit


22 May, 2008

1 commit

  • Use netdev_alloc_skb. This sets skb->dev and allows arch specific
    allocation. Also simplify and cleanup the alignment code.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Maciej W. Rozycki
    Signed-off-by: Jeff Garzik

    Stephen Hemminger
     

13 May, 2008

1 commit


17 Apr, 2008

1 commit

  • Having the id field be an int was making more complex bus topologies
    excessively difficult. For now, just convert it to a string, and
    change all instances of "bus->id = val" to
    snprintf(id, MII_BUS_ID_LEN, "%x", val).

    Signed-off-by: Andy Fleming
    Signed-off-by: Jeff Garzik

    Andy Fleming
     

11 Oct, 2007

6 commits

  • A driver model and phylib update. It includes the following changes:

    1. Removal of unused module options.

    2. Phylib support and the resulting removal of generic bits for handling
    the PHY.

    3. Proper reserving of device resources and using ioremap()ped handles
    to access MAC registers rather than platform-specific macros.

    4. Handling of the device using the driver model.

    Signed-off-by: Maciej W. Rozycki
    Signed-off-by: Jeff Garzik

    Maciej W. Rozycki
     
  • Remove typedefs, volatiles and convert kmalloc()/memset() pairs to
    kcalloc(). Also reformat the surrounding clutter.

    Signed-off-by: Maciej W. Rozycki
    Signed-off-by: Jeff Garzik

    Maciej W. Rozycki
     
  • This is nicer than the MAC_FMT stuff.

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     
  • We now have struct net_device_stats embedded in struct net_device,
    and the default ->get_stats() hook does the obvious thing for us.

    Run through drivers/net/* and remove the driver-local storage of
    statistics, and driver-local ->get_stats() hook where applicable.

    This was just the low-hanging fruit in drivers/net; plenty more drivers
    remain to be updated.

    [ Resolved conflicts with napi_struct changes and fix sunqe build
    regression... -DaveM ]

    Signed-off-by: Jeff Garzik
    Signed-off-by: David S. Miller

    Jeff Garzik
     
  • Signed-off-by: Mariusz Kozlowski

    drivers/net/sb1250-mac.c | 76286 -> 76199 (-87 bytes)

    drivers/net/sb1250-mac.c | 6 ++----
    1 file changed, 2 insertions(+), 4 deletions(-)
    Signed-off-by: Jeff Garzik

    Mariusz Kozlowski
     
  • Several devices have multiple independant RX queues per net
    device, and some have a single interrupt doorbell for several
    queues.

    In either case, it's easier to support layouts like that if the
    structure representing the poll is independant from the net
    device itself.

    The signature of the ->poll() call back goes from:

    int foo_poll(struct net_device *dev, int *budget)

    to

    int foo_poll(struct napi_struct *napi, int budget)

    The caller is returned the number of RX packets processed (or
    the number of "NAPI credits" consumed if you want to get
    abstract). The callee no longer messes around bumping
    dev->quota, *budget, etc. because that is all handled in the
    caller upon return.

    The napi_struct is to be embedded in the device driver private data
    structures.

    Furthermore, it is the driver's responsibility to disable all NAPI
    instances in it's ->stop() device close handler. Since the
    napi_struct is privatized into the driver's private data structures,
    only the driver knows how to get at all of the napi_struct instances
    it may have per-device.

    With lots of help and suggestions from Rusty Russell, Roland Dreier,
    Michael Chan, Jeff Garzik, and Jamal Hadi Salim.

    Bug fixes from Thomas Graf, Roland Dreier, Peter Zijlstra,
    Joseph Fannin, Scott Wood, Hans J. Koch, and Michael Chan.

    [ Ported to current tree and all drivers converted. Integrated
    Stephen's follow-on kerneldoc additions, and restored poll_list
    handling to the old style to fix mutual exclusion issues. -DaveM ]

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

07 Jul, 2007

1 commit

  • In 7d12e780e003f93433d49ce78cfedf4b4c52adc5 David Howells performed
    this evolution:
    "IRQ: Maintain regs pointer globally rather than passing to IRQ handlers"

    He correctly updated many of the function definitions that were using this
    extra regs pointer parameter but forgot to update some caller sites of
    those functions. The reason the modifications was not properly done on all
    drivers is that some drivers were rarely compiled because they are for
    AMIGA, or that some code sites were inside #ifdefs where the option is not
    set or inside #if 0.

    Here is the semantic patch that found the occurences
    and fixed the problem.

    @ rule1 @
    identifier fn;
    identifier irq, dev_id;
    typedef irqreturn_t;
    @@

    static irqreturn_t fn(int irq, void *dev_id)
    {
    ...
    }

    @@
    identifier rule1.fn;
    expression E1, E2, E3;
    @@

    fn(E1, E2
    - ,E3
    )

    Signed-off-by: Yoann Padioleau
    Cc: "David S. Miller"
    Cc: Jeff Garzik
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yoann Padioleau
     

28 Apr, 2007

2 commits

  • Patch to add NAPI support to sb1250-mac.c (rev 2). This patch differs from
    the last in that the NAPI support isn't marked as experimental, nor is it
    configurable (ie. once applied - NAPI is enabled all the time). This was
    based on feedback from Ralf and others.

    Signed-off-by: Mark Mason
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Mark Mason
     
  • NETPOLL support for Sibyte MAC

    Signed-off-by: Manish Lachwani
    Signed-off-by: Deepak Saxena
    Signed-off-by: Jeff Garzik

    Deepak Saxena
     

26 Apr, 2007

1 commit


25 Mar, 2007

1 commit


22 Oct, 2006

1 commit