09 Sep, 2010

6 commits

  • Signed-off-by: Andy Shevchenko
    Cc: Karsten Keil
    Cc: Tilman Schmidt
    Cc: netdev@vger.kernel.org
    Signed-off-by: David S. Miller

    Andy Shevchenko
     
  • Casts __kernel to __user pointer require __force markup, so add it. Also
    sock_get/setsockopt() takes @optval and/or @optlen arguments as user pointers
    but were taking kernel pointers, use new variables 'uoptval' and/or 'uoptlen'
    to fix it. These remove following warnings from sparse:

    net/socket.c:1922:46: warning: cast adds address space to expression ()
    net/socket.c:3061:61: warning: incorrect type in argument 4 (different address spaces)
    net/socket.c:3061:61: expected char [noderef] *optval
    net/socket.c:3061:61: got char *optval
    net/socket.c:3061:69: warning: incorrect type in argument 5 (different address spaces)
    net/socket.c:3061:69: expected int [noderef] *optlen
    net/socket.c:3061:69: got int *optlen
    net/socket.c:3063:67: warning: incorrect type in argument 4 (different address spaces)
    net/socket.c:3063:67: expected char [noderef] *optval
    net/socket.c:3063:67: got char *optval
    net/socket.c:3064:45: warning: incorrect type in argument 5 (different address spaces)
    net/socket.c:3064:45: expected int [noderef] *optlen
    net/socket.c:3064:45: got int *optlen
    net/socket.c:3078:61: warning: incorrect type in argument 4 (different address spaces)
    net/socket.c:3078:61: expected char [noderef] *optval
    net/socket.c:3078:61: got char *optval
    net/socket.c:3080:67: warning: incorrect type in argument 4 (different address spaces)
    net/socket.c:3080:67: expected char [noderef] *optval
    net/socket.c:3080:67: got char *optval

    Signed-off-by: Namhyung Kim
    Signed-off-by: David S. Miller

    Namhyung Kim
     
  • Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     
  • This patch introduces cx82310_eth driver - driver for USB ethernet port of
    ADSL routers based on Conexant CX82310 chips. Such routers usually have
    ethernet port(s) too which are bridged together with the USB ethernet port,
    allowing the USB-connected machine to communicate to the network (and also
    internet through the ADSL, of course).

    This is my first driver, so please check thoroughly. As there's no protocol
    documentation, it was done with usbsnoop dumps from Windows driver, some
    parts (the commands) inspired by cxacru driver and also other usbnet drivers.
    The driver passed my testing - some real work and also pings sized from 0 to
    65507 B.

    The only problem I found is the ifconfig error counter. When I return 0 (or 1
    but empty skb) from rx_fixup(), usbnet increases the error counter although
    it's not an error condition (because packets can cross URB boundaries). Maybe
    the usbnet should be fixed to allow rx_fixup() to return empty skbs (or some
    other value, e.g. 2)?

    The USB ID of my device is 0x0572:0xcb01 which conflicts with some ADSL modems
    using cxacru driver (they probably use the same chipset but simpler
    firmware). The modems seem to use bDeviceClass 0 and iProduct "ADSL USB
    MODEM", my router uses bDeviceClass 255 and iProduct "USB NET CARD". The
    driver matches only devices with class 255 and checks for the iProduct string
    during init. I already posted a patch for the cxacru driver to ignore these
    devices.

    Signed-off-by: Ondrej Zary
    Signed-off-by: David S. Miller

    Ondrej Zary
     
  • When there is only one rps_cpus, skb_get_rxhash() can be eliminated.

    Signed-off-by: Changli Gao
    Signed-off-by: David S. Miller

    Changli Gao
     
  • This simple patch copies the current approach for SIOCINQ ioctl() from DCCP
    into SCTP so that the userland code working with SCTP can use a similar
    interface across different protocols to know how much space to allocate for
    a buffer.

    Signed-off-by: Diego Elio Pettenò
    Signed-off-by: David S. Miller

    Diego Elio 'Flameeyes' Pettenò
     

08 Sep, 2010

11 commits

  • - Use napi_gro_receive() and vlan_gro_receive()
    - Enable GRO by default

    Tested on a RTL8111/8168 adapter

    Signed-off-by: Eric Dumazet
    Acked-by: Francois Romieu
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • Note that the date format was fixed.

    Signed-off-by: Yaniv Rosner
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Yaniv Rosner
     
  • Change LED scheme for dual-media

    Signed-off-by: Yaniv Rosner
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Yaniv Rosner
     
  • Add required changes in order to support dual-media boards.

    Signed-off-by: Yaniv Rosner
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Yaniv Rosner
     
  • Group all PHY specific functions together to have an organized code

    Signed-off-by: Yaniv Rosner
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Yaniv Rosner
     
  • Make the needed changes for the new scheme especially around PHY
    initialization, and link detection.
    - The get_emac_base function was changed to enable setting different MAC
    access setting for each PHY based of external configuration.
    - As a part of the dual-media preparation, the save_spirom_version was
    modified to accept a PHY specific version address to be saved in the
    shmem. This will enable to save more than single spirom version in

    different locations.
    - The test_link function was changed also as a preparation for the
    dual-media upcoming changes
    - Duplicate initialization logic was removed from the
    link_setting_status and link_initialize functions

    Signed-off-by: Yaniv Rosner
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Yaniv Rosner
     
  • Move all PHY specific logic from bnx2x_main into bnx2x_link.

    Signed-off-by: Yaniv Rosner
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Yaniv Rosner
     
  • Flow control implementation is split to be done in each PHY function.

    Signed-off-by: Yaniv Rosner
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Yaniv Rosner
     
  • In previous patch, common PHY functions were split in simple way to
    allow easy diff. This patch comes to align code in the new functions.
    In addition, the non-production BCM8072 PHY was removed.

    Signed-off-by: Yaniv Rosner
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Yaniv Rosner
     
  • Move the code into PHY oriented functions, and for that a new structure
    is defines for each PHY which contain PHY properties and its own
    functions. This also enables to encapsulate all PHY specific operations
    into the PHY functions. During initialization, the PHYs will be probed
    by the "bnx2x_phy_probe" function to detect which PHYs exist on-board,
    and configure them accordingly. Note that the ext_phy_reset
    implementation was incorporated in the ext_phy_init since it is actually
    part of the PHY initialization procedure.

    Signed-off-by: Yaniv Rosner
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Yaniv Rosner
     
  • Start building the infrastructure for dual media by adding new component
    of PHY which will be used all along the function. Modify function to
    work with this component instead of the link_params.

    Signed-off-by: Yaniv Rosner
    Signed-off-by: Eilon Greenstein
    Signed-off-by: David S. Miller

    Yaniv Rosner
     

07 Sep, 2010

23 commits

  • No need to test twice sk->sk_shutdown & RCV_SHUTDOWN

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

    Eric Dumazet
     
  • The values didn't match the title after removing the LRO
    statistics in commit fa37a9586f92051de03a13e55e5ec3880bb6783e

    Signed-off-by: Yevgeny Petrilin
    Signed-off-by: David S. Miller

    Yevgeny Petrilin
     
  • If failed to get skb frags using napi_get_frags(),
    the packet is dropped.

    Reported-by: Eric Dumazet
    Signed-off-by: Yevgeny Petrilin
    Signed-off-by: David S. Miller

    Yevgeny Petrilin
     
  • Convert pr_("%s" ..., (struct netdev *)->name ...)
    to netdev_((struct netdev *), ...)

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

    Joe Perches
     
  • This patch standardizes caif message logging prefixes.

    Add #define pr_fmt(fmt) KBUILD_MODNAME ":%s(): " fmt, __func__
    Add missing "\n"s to some logging messages
    Convert pr_warning to pr_warn

    This changes the logging message prefix from CAIF: to caif:
    for all uses but caif_socket.c and chnl_net.c. Those now use
    their filename without extension.

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

    Joe Perches
     
  • The function has an unsigned return type, but returns a negative constant
    to indicate an error condition. The result of calling the function is
    always stored in a variable of type (signed) int, and thus unsigned can be
    dropped from the return type.

    A sematic match that finds this problem is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @exists@
    identifier f;
    constant C;
    @@

    unsigned f(...)
    { }
    //

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

    Julia Lawall
     
  • The function has an unsigned return type, but returns a negative constant
    to indicate an error condition. The result of calling the function is
    always stored in a variable of type (signed) int, and thus unsigned can be
    dropped from the return type.

    A sematic match that finds this problem is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @exists@
    identifier f;
    constant C;
    @@

    unsigned f(...)
    { }
    //

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

    Julia Lawall
     
  • The CHELSIO_T1_1G ifdef isn't necessary at this point, because it is
    checked in an outer ifdef level already and has no effect here.

    Signed-off-by: Christian Dietrich
    Signed-off-by: David S. Miller

    Christian Dietrich
     
  • Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
    Convert jeprintk to pr_err
    Remove jeprintk macro define
    Remove periods from end of logging messages
    Coalesce format strings

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

    Joe Perches
     
  • This showed up in my audit because we use strcpy() to copy "ds" into a
    32 character buffer inside the isdn_tty_dial() function. But it turns
    out that we only ever use the first 32 characters so it's OK. I have
    changed the declaration to make the static checkers happy.

    Signed-off-by: Dan Carpenter
    Signed-off-by: David S. Miller

    Dan Carpenter
     
  • cs->ics.parm.setup.phone is a 32 character array. In each of these
    cases we're copying from a 35 character array into a 32 character array
    so we should use strlcpy() instead of strcpy().

    Signed-off-by: Dan Carpenter
    Signed-off-by: David S. Miller

    Dan Carpenter
     
  • bnad_set_rx_mode omit to unlock bna_lock on one fail path. Fix that.

    Signed-off-by: Jiri Slaby
    Cc: Debashis Dutt
    Cc: Rasesh Mody
    Cc: David S. Miller
    Signed-off-by: David S. Miller

    Jiri Slaby
     
  • In this case, a device_node structure is stored in another structure that
    is then freed without first decrementing the reference count of the
    device_node structure.

    The semantic match that finds this problem is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r exists@
    expression x;
    identifier f;
    position p1,p2;
    @@

    x@p1->f = \(of_find_node_by_path\|of_find_node_by_name\|of_find_node_by_phandle\|of_get_parent\|of_get_next_parent\|of_get_next_child\|of_find_compatible_node\|of_match_node\|of_find_node_by_type\|of_find_node_with_property\|of_find_matching_node\|of_parse_phandle\|of_node_get\)(...);
    ... when != of_node_put(x)
    kfree@p2(x)

    @script:python@
    p1 << r.p1;
    p2 << r.p2;
    @@
    cocci.print_main("call",p1)
    cocci.print_secs("free",p2)
    //

    Signed-off-by: Julia Lawall
    Acked-by: Wolfram Sang
    Signed-off-by: David S. Miller

    Julia Lawall
     
  • pskb_expand_head() blindly takes references on fragments before calling
    skb_release_data(), potentially releasing these references.

    We can add a fast path, avoiding these atomic operations, if we own the
    last reference on skb->head.

    Based on a previous patch from David

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

    Eric Dumazet
     
  • Add an entry to the MAINTAINERS file for ibmveth, clean up the copyright
    and add all authors. Change the name of the module to reflect the product name
    over the last number of years.

    Considering all the changes we have made, bump the driver version.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Santiago Leon
    Signed-off-by: David S. Miller

    Santiago Leon
     
  • These files probably came across from the skeleton driver. Remove them.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Santiago Leon
    Signed-off-by: David S. Miller

    Santiago Leon
     
  • We had a driver specific assert function which wasn't enabled most of the
    time. Convert them to BUG_ON and enable them all the time.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Santiago Leon
    Signed-off-by: David S. Miller

    Santiago Leon
     
  • We had a few cases where we returned success on error.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Santiago Leon
    Signed-off-by: David S. Miller

    Santiago Leon
     
  • Fix most of the kernel coding style issues in ibmveth.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Santiago Leon
    Signed-off-by: David S. Miller

    Santiago Leon
     
  • IbmVethNumBufferPools -> IBMVETH_NUM_BUFF_POOLS

    Also change IBMVETH_MAX_MTU -> IBMVETH_MIN_MTU, it refers to the minimum
    size not the maximum.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Santiago Leon
    Signed-off-by: David S. Miller

    Santiago Leon
     
  • Use netdev_err to standardise the error output.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Santiago Leon
    Signed-off-by: David S. Miller

    Santiago Leon
     
  • Use netdev_dbg to standardise the debug output.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Santiago Leon
    Signed-off-by: David S. Miller

    Santiago Leon
     
  • These functions appear before their use, so we can remove the redundant
    prototypes.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Santiago Leon
    Signed-off-by: David S. Miller

    Santiago Leon