23 May, 2011

1 commit

  • After discovering that wide use of prefetch on modern CPUs
    could be a net loss instead of a win, net drivers which were
    relying on the implicit inclusion of prefetch.h via the list
    headers showed up in the resulting cleanup fallout. Give
    them an explicit include via the following $0.02 script.

    =========================================
    #!/bin/bash
    MANUAL=""
    for i in `git grep -l 'prefetch(.*)' .` ; do
    grep -q '' $i
    if [ $? = 0 ] ; then
    continue
    fi

    ( echo '?^#include '
    echo .
    echo w
    echo q
    ) | ed -s $i > /dev/null 2>&1
    if [ $? != 0 ]; then
    echo $i needs manual fixup
    MANUAL="$i $MANUAL"
    fi
    done
    echo ------------------- 8\
    [ Fixed up some incorrect #include placements, and added some
    non-network drivers and the fib_trie.c case - Linus ]
    Signed-off-by: Linus Torvalds

    Paul Gortmaker
     

31 Mar, 2011

1 commit


27 Sep, 2010

1 commit


19 Jul, 2010

1 commit

  • The phy_mii_ioctl() function unnecessarily throws away the original ifreq.
    We need access to the ifreq in order to support PHYs that can perform
    hardware time stamping.

    Two maverick drivers filter the ioctl commands passed to phy_mii_ioctl().
    This is unnecessary since phylib will check the command in any case.

    Signed-off-by: Richard Cochran
    Signed-off-by: David S. Miller

    Richard Cochran
     

14 Jul, 2010

1 commit


13 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
     

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
     

26 Feb, 2010

3 commits


23 Feb, 2010

1 commit

  • The netif_wake_queue() is called correctly (i.e. only on !txfull
    condition) from txdone routine. So Unconditional call to the
    netif_wake_queue() here is wrong. This might cause calling of
    start_xmit routine on txfull state and trigger BUG_ON.

    This bug does not happen when NAPI disabled. After txdone there
    must be at least one free tx slot. But with NAPI, this is not
    true anymore and the BUG_ON can hits on heavy load.

    In this driver NAPI was enabled on 2.6.33-rc1 so this is
    regression from 2.6.32 kernel.

    Reported-by: Ralf Roesch
    Signed-off-by: Atsushi Nemoto
    Signed-off-by: David S. Miller

    Atsushi Nemoto
     

13 Feb, 2010

1 commit


08 Jan, 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
     

03 Nov, 2009

2 commits


28 Oct, 2009

2 commits


07 Aug, 2009

5 commits


06 Jul, 2009

1 commit


18 May, 2009

1 commit


14 Apr, 2009

1 commit


02 Apr, 2009

1 commit

  • This driver contains experimental NAPI code disabled by default.
    The commit bea3348ee ("[NET]: Make NAPI polling independent of struct
    net_device objects.") converted the NAPI path of this driver but that
    conversion was not complete. This patch fixes a build error
    introduced by the commit.

    Signed-off-by: Atsushi Nemoto
    Signed-off-by: David S. Miller

    Atsushi Nemoto
     

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
     

12 Dec, 2008

1 commit

  • The chip can strip CRC automatically on receiving. Enable it.

    Also fix potential RX_BUF_SIZE calculation bug which was obscured by
    alignment. And use proper symbols (NET_IP_ALIGN, ETH_FCS_LEN, etc.)
    instead of magic numbers.

    Signed-off-by: Atsushi Nemoto
    Signed-off-by: David S. Miller

    Atsushi Nemoto
     

04 Nov, 2008

1 commit


31 Oct, 2008

1 commit


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
     

13 Oct, 2008

1 commit

  • Fix an obvious typo introduced by
    commit 298cf9beb9679522de995e249eccbd82f7c51999
    (phylib: move to dynamic allocation of struct mii_bus).

    ...
    CC drivers/net/tc35815.o
    drivers/net/tc35815.c: In function 'tc_mii_init':
    drivers/net/tc35815.c:799: error: 'err_out_free_mii_bus' undeclared (first use in this function)
    drivers/net/tc35815.c:799: error: (Each undeclared identifier is reported only once
    drivers/net/tc35815.c:799: error: for each function it appears in.)
    drivers/net/tc35815.c:781: error: label 'err_out_free_mii_bus' used but not defined
    make[3]: *** [drivers/net/tc35815.o] Error 1

    Signed-off-by: Adrian Bunk
    Signed-off-by: David S. Miller

    Adrian Bunk
     

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
     

27 Jul, 2008

1 commit

  • Add per-device dma_mapping_ops support for CONFIG_X86_64 as POWER
    architecture does:

    This enables us to cleanly fix the Calgary IOMMU issue that some devices
    are not behind the IOMMU (http://lkml.org/lkml/2008/5/8/423).

    I think that per-device dma_mapping_ops support would be also helpful for
    KVM people to support PCI passthrough but Andi thinks that this makes it
    difficult to support the PCI passthrough (see the above thread). So I
    CC'ed this to KVM camp. Comments are appreciated.

    A pointer to dma_mapping_ops to struct dev_archdata is added. If the
    pointer is non NULL, DMA operations in asm/dma-mapping.h use it. If it's
    NULL, the system-wide dma_ops pointer is used as before.

    If it's useful for KVM people, I plan to implement a mechanism to register
    a hook called when a new pci (or dma capable) device is created (it works
    with hot plugging). It enables IOMMUs to set up an appropriate
    dma_mapping_ops per device.

    The major obstacle is that dma_mapping_error doesn't take a pointer to the
    device unlike other DMA operations. So x86 can't have dma_mapping_ops per
    device. Note all the POWER IOMMUs use the same dma_mapping_error function
    so this is not a problem for POWER but x86 IOMMUs use different
    dma_mapping_error functions.

    The first patch adds the device argument to dma_mapping_error. The patch
    is trivial but large since it touches lots of drivers and dma-mapping.h in
    all the architecture.

    This patch:

    dma_mapping_error() doesn't take a pointer to the device unlike other DMA
    operations. So we can't have dma_mapping_ops per device.

    Note that POWER already has dma_mapping_ops per device but all the POWER
    IOMMUs use the same dma_mapping_error function. x86 IOMMUs use device
    argument.

    [akpm@linux-foundation.org: fix sge]
    [akpm@linux-foundation.org: fix svc_rdma]
    [akpm@linux-foundation.org: build fix]
    [akpm@linux-foundation.org: fix bnx2x]
    [akpm@linux-foundation.org: fix s2io]
    [akpm@linux-foundation.org: fix pasemi_mac]
    [akpm@linux-foundation.org: fix sdhci]
    [akpm@linux-foundation.org: build fix]
    [akpm@linux-foundation.org: fix sparc]
    [akpm@linux-foundation.org: fix ibmvscsi]
    Signed-off-by: FUJITA Tomonori
    Cc: Muli Ben-Yehuda
    Cc: Andi Kleen
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: Avi Kivity
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    FUJITA Tomonori
     

23 Jul, 2008

1 commit

  • The drivers were touching net queue before it has been started, so
    without this patch, the drivers will potentially WARN at
    net/core/dev.c:1328.

    I don't have the hardware for the drivers below, so this patch is
    untested, and thus should be carefully peer reviewed.

    tc35815.c
    au1000_eth.c
    bfin_mac.c
    macb.c
    ^ The four drivers are using phylib, they're calling netif_start_queue()
    in open() callback. So trivially remove netif_tx_schedule_all().
    Phylib will handle netif_carrier_*().

    cpmac.c
    fec_mpc52xx.c
    fs_enet/fs_enet-main.c
    sh_eth.c
    ^ The same as above, but these were also needlessly calling
    netif_carrier_*() functions. So removed queue calls and also remove
    carrier calls, since phylib will handle it. fs_enet-main.c also didn't
    call netif_start_queue() at open(), this is fixed now.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: David S. Miller

    Anton Vorontsov