25 Aug, 2010

1 commit


27 Jul, 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
     

08 Jul, 2010

1 commit

  • Get rid of the pointless back-and-forth casting of dev->mem_start
    from long to pointer back to long again.

    Also fixes a warning reported by Stephen Rothwell:

    drivers/net/ethoc.c: In function 'ethoc_init_ring':
    drivers/net/ethoc.c:302: warning: assignment makes integer from pointer without a cast

    Signed-off-by: David S. Miller

    David S. Miller
     

06 Jul, 2010

1 commit


12 Jun, 2010

7 commits


24 May, 2010

1 commit

  • Dan reported the patch 0baa080c75c: "ethoc: use system memory
    as buffer" introduced a potential null dereference.

    1060 free:
    1061 if (priv->dma_alloc)
    ^^^^^^^^^^^^^^^
    priv can be null here.

    He also suggested that the error handling is not complete.

    This patch fixes the null priv issue and improves resources
    releasing in ethoc_probe() and ethoc_remove().

    Reported-by: Dan Carpenter
    Signed-off-by: Thomas Chou
    Signed-off-by: David S. Miller

    Thomas Chou
     

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
     

07 May, 2010

1 commit


12 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
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

23 Feb, 2010

1 commit


15 Jan, 2010

1 commit


19 Nov, 2009

2 commits


27 Oct, 2009

1 commit


23 Oct, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits)
    niu: VLAN_ETH_HLEN should be used to make sure that the whole MAC header was copied to the head buffer in the Vlan packets case
    KS8851: Fix ks8851_set_rx_mode() for IFF_MULTICAST
    KS8851: Fix MAC address write order
    KS8851: Add soft reset at probe time
    net: fix section mismatch in fec.c
    net: Fix struct inet_timewait_sock bitfield annotation
    tcp: Try to catch MSG_PEEK bug
    net: Fix IP_MULTICAST_IF
    bluetooth: static lock key fix
    bluetooth: scheduling while atomic bug fix
    tcp: fix TCP_DEFER_ACCEPT retrans calculation
    tcp: reduce SYN-ACK retrans for TCP_DEFER_ACCEPT
    tcp: accept socket after TCP_DEFER_ACCEPT period
    Revert "tcp: fix tcp_defer_accept to consider the timeout"
    AF_UNIX: Fix deadlock on connecting to shutdown socket
    ethoc: clear only pending irqs
    ethoc: inline regs access
    vmxnet3: use dev_dbg, fix build for CONFIG_BLOCK=n
    virtio_net: use dev_kfree_skb_any() in free_old_xmit_skbs()
    be2net: fix support for PCI hot plug
    ...

    Linus Torvalds
     

19 Oct, 2009

2 commits


16 Oct, 2009

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (53 commits)
    vmxnet: fix 2 build problems
    net: add support for STMicroelectronics Ethernet controllers.
    net: ks8851_mll uses mii interfaces
    net/fec_mpc52xx: Fix kernel panic on FEC error
    net: Fix OF platform drivers coldplug/hotplug when compiled as modules
    TI DaVinci EMAC: Clear statistics register properly.
    r8169: partial support and phy init for the 8168d
    irda/sa1100_ir: check return value of startup hook
    udp: Fix udp_poll() and ioctl()
    WAN: fix Cisco HDLC handshaking.
    tcp: fix tcp_defer_accept to consider the timeout
    3c574_cs: spin_lock the set_multicast_list function
    net: Teach pegasus driver to ignore bluetoother adapters with clashing Vendor:Product IDs
    netxen: fix pci bar mapping
    ethoc: fix warning from 32bit build
    libertas: fix build
    net: VMware virtual Ethernet NIC driver: vmxnet3
    net: Fix IXP 2000 network driver building.
    libertas: fix build
    mac80211: document ieee80211_rx() context requirement
    ...

    Linus Torvalds
     

14 Oct, 2009

2 commits


13 Oct, 2009

1 commit


12 Oct, 2009

1 commit


07 Oct, 2009

5 commits

  • Only 128 buffer descriptors are supported in the core. Limit the
    number in case we have more memory.

    Signed-off-by: Thomas Chou
    Signed-off-by: David S. Miller

    Thomas Chou
     
  • This patch enabled the ethoc to allocate system memory as buffer
    when there is no dedicated buffer memory.

    Some hardware designs may not have dedicated buffer memory such as
    on chip or off chip SRAM. In this case, only one memory resource is
    supplied in the platform data instead of two. Then a DMA buffer can
    be allocated from system memory and used for the transfer.

    Signed-off-by: Thomas Chou
    Signed-off-by: David S. Miller

    Thomas Chou
     
  • The packet buffer is allocated at 4 bytes boundary, but the IP header
    length and version bits is located at byte 14. These bit fields access
    as 32 bits word and caused exception on processors that do not support
    unaligned access.

    The patch adds 2 bytes offset to make the bit fields word aligned.

    Signed-off-by: Thomas Chou
    Signed-off-by: David S. Miller

    Thomas Chou
     
  • The pointer address in buffer descriptors is physical address. The
    pointer that processor used to access packet is virtual address.

    Though the higher bits of pointer address used by the MAC may be
    truncated to zero in special case, it is not always true in larger
    designs.

    Signed-off-by: Thomas Chou
    Signed-off-by: David S. Miller

    Thomas Chou
     
  • It should be max() instead of min(). Use 1/4 of available
    descriptors for tx, and there should be at least 2 tx
    descriptors.

    Signed-off-by: Thomas Chou
    Signed-off-by: David S. Miller

    Thomas Chou
     

03 Sep, 2009

1 commit


01 Sep, 2009

1 commit


28 Jul, 2009

1 commit

  • res has already been tested. It seems that this test should be on the
    recently returned value mmio.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://www.emn.fr/x-info/coccinelle/)

    //
    @r exists@
    local idexpression x;
    expression E;
    @@

    if (x == NULL || ...) { ... when forall
    return ...; }
    ... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\)
    (
    *x == NULL
    |
    *x != NULL
    )
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: David S. Miller

    Julia Lawall
     

13 Jun, 2009

1 commit

  • Fix up drivers that return an errno value to qdisc_restart(), causing
    qdisc_restart() to print a warning and requeue/retransmit the skb.

    - xpnet: memory allocation error, intention is to drop
    - ethoc: oversized packet, packet must be dropped
    - ibmlana: skb freed: use after free
    - rrunner: skb freed: use after free

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy