1. 08 Sep, 2010 10 commits
    • Joe Perches's avatar
      qeth: Use %pI6 · 963a9fd2
      Joe Perches authored
      Format an ipv6 address using vsprintf extensions.
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarFrank Blaschka <frank.blaschka@de.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      963a9fd2
    • Jan Glauber's avatar
      qdio: extend API to allow polling · d36deae7
      Jan Glauber authored
      Extend the qdio API to allow polling in the upper-layer driver. This
      is needed by qeth to use NAPI.
      
      To use the new interface the upper-layer driver must specify the
      queue_start_poll(). This callback is used to signal the upper-layer
      driver that is has initiative and must process the inbound queue by
      calling qdio_get_next_buffers(). If the upper-layer driver wants to
      stop polling it calls qdio_start_irq().
      
      Since adapter interrupts are not completely stoppable qdio implements
      a software bit QDIO_QUEUE_IRQS_DISABLED to safely disable interrupts for an
      input queue.
      
      The old interface is preserved and will be used as is by zfcp.
      Signed-off-by: default avatarJan Glauber <jang@linux.vnet.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: default avatarFrank Blaschka <frank.blaschka@de.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d36deae7
    • Jesse Brandeburg's avatar
      e1000: fix Tx hangs by disabling 64-bit DMA · e508be17
      Jesse Brandeburg authored
      Several users report issues with 32-bit adapters when plugged
      into PCI slots in machines with >= 4GB ram.  In particular AMD
      systems with HyperTransport to PCI bridges seem to trigger the
      issue, but it isn't limited to only them.
      
      This issue is not easily reproducible here, yet still continues
      to occur in the field.  For e1000 on PCI devices, just disable DMA
      addresses over the 4GB boundary when in PCI (not PCI-X) mode, to
      prevent the issue from continuing to pop up.  The performance
      impact for this is negligible.
      
      The code was refactored to move the init of the hw struct to its
      own function. This allows the init to be called very early in
      probe, which then allows using hw-> members for this fix.
      
      A slight refactor to the DMA mask code was done for minor
      correctness based on the instructions in DMA-API-HOWTO.
      Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e508be17
    • Eric Dumazet's avatar
      net: introduce rcu_dereference_rtnl · a6e0fc85
      Eric Dumazet authored
      We use rcu_dereference_check(p, rcu_read_lock_held() ||
      lockdep_rtnl_is_held()) several times in network stack.
      
      More usages to come too, so its time to create a helper.
      Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a6e0fc85
    • Andy Shevchenko's avatar
      drivers: isdn: capi: use simple_strtol to convert numbers · a7a4f1c1
      Andy Shevchenko authored
      Signed-off-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      Cc: Karsten Keil <isdn@linux-pingi.de>
      Cc: Tilman Schmidt <tilman@imap.cc>
      Cc: netdev@vger.kernel.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a7a4f1c1
    • Namhyung Kim's avatar
      net: remove address space warnings in net/socket.c · fb8621bb
      Namhyung Kim authored
      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 (<asn:1>)
       net/socket.c:3061:61: warning: incorrect type in argument 4 (different address spaces)
       net/socket.c:3061:61:    expected char [noderef] <asn:1>*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] <asn:1>*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] <asn:1>*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] <asn:1>*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] <asn:1>*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] <asn:1>*optval
       net/socket.c:3080:67:    got char *optval
      Signed-off-by: default avatarNamhyung Kim <namhyung@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fb8621bb
    • Joe Perches's avatar
    • Ondrej Zary's avatar
      introduce cx82310_eth: Conexant CX82310-based ADSL router USB ethernet driver · cc28a20e
      Ondrej Zary authored
      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: default avatarOndrej Zary <linux@rainbow-software.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cc28a20e
    • Changli Gao's avatar
      net: rps: add the shortcut for one rps_cpus · 6febfca9
      Changli Gao authored
      When there is only one rps_cpus, skb_get_rxhash() can be eliminated.
      Signed-off-by: default avatarChangli Gao <xiaosuo@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6febfca9
    • Diego Elio 'Flameeyes' Pettenò's avatar
      sctp: implement SIOCINQ ioctl() (take 3) · 65040c33
      Diego Elio 'Flameeyes' Pettenò authored
      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: default avatarDiego Elio Pettenò <flameeyes@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      65040c33
  2. 07 Sep, 2010 30 commits