1. 19 Apr, 2007 11 commits
    • Stephen Hemminger's avatar
      sky2: EC-U performance and jumbo support · b628ed98
      Stephen Hemminger authored
      The Yukon EC Ultra chips have transmit settings for store and
      forward and PCI buffering. By setting these appropriately, normal
      performance goes from 750Mbytes/sec to 940Mbytes/sec (non-jumbo).
      
      It is also possible to do Jumbo mode, but it means turning off
      TSO and checksum offload so the performance gets worse. There isn't
      enough buffering for checksum offload to work.
      Signed-off-by: default avatarStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      b628ed98
    • Stephen Hemminger's avatar
      sky2: disable ASF on all chip types · 4f44d8ba
      Stephen Hemminger authored
      Need to make sure and disable ASF on all chip types. Otherwise, there may be
      random reboots.
      Signed-off-by: default avatarStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      4f44d8ba
    • Stephen Hemminger's avatar
      sky2: handle descriptor errors · 40b01727
      Stephen Hemminger authored
      There should never be descriptor error unless hardware or driver is buggy.
      But if an error occurs, print useful information, clear irq, and recover.
      Signed-off-by: default avatarStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      40b01727
    • Stephen Hemminger's avatar
      sky2: disable support for 88E8056 · 0a17e4c2
      Stephen Hemminger authored
      This device is having all sorts of problems that lead to data corruption
      and system instability.  It gets receive status and data out of order,
      it generates descriptor and TSO errors, etc.
      
      Until the problems are resolved, it should not be used by anyone
      who cares about there system.
      Signed-off-by: default avatarStephen Hemminger <shemminger@linux-foundation.org>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      0a17e4c2
    • Dave Jiang's avatar
      gianfar needs crc32 lib dependency · bf41a7c5
      Dave Jiang authored
      Gianfar needs crc32 to be selected to compile.
      Signed-off-by: default avatarDave Jiang <djiang@mvista.com>
      
      --
       drivers/net/Kconfig |    1 +
       1 files changed, 1 insertions(+), 0 deletions(-)
      --
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      bf41a7c5
    • Linas Vepstas's avatar
      spidernet: Fix problem sending IP fragments · 33bdeec8
      Linas Vepstas authored
      The basic structure of "normal" UDP/IP/Ethernet
      frames (that actually work):
       - It starts with the Ethernet header (dest MAC, src MAC, etc.)
       - The next part is occupied by the IP header (version info, length of
      packet, id=0, fragment offset=0, checksum, from / to address, etc.)
       - Then comes the UDP header (src / dest port, length, checksum)
       - Actual payload
       - Ethernet checksum
      
      Now what's different for IP fragment:
       - The IP header has id set to some value (same for all fragments),
      offset is set appropriately (i.e. 0 for first fragment, following
      according to size of other fragments), size is the length of the frame.
       - UDP header is unchanged. I.e. length is according to full UDP
      datagram, not just the part within the actual frame! But this is only
      true within the first frame: all following frames don't have a valid
      UDP-header at all.
      
      The spidernet silicon seems to be quite intelligent: It's able to
      compute (IP / UDP / Ethernet) checksums on the fly and tests if frames
      are conforming to RFC -- at least conforming to RFC on complete frames.
      
      But IP fragments are different as explained above:
      I.e. for IP fragments containing part of a UDP datagram it sees
      incompatible length in the headers for IP and UDP in the first frame
      and, thus, skips this frame. But the content *is* correct for IP
      fragments. For all following frames it finds (most probably) no valid
      UDP header at all. But this *is* also correct for IP fragments.
      
      The Linux IP-stack seems to be clever in this point. It expects the
      spidernet to calculate the checksum (since the module claims to be able
      to do so) and marks the skb's for "normal" frames accordingly
      (ip_summed set to CHECKSUM_HW).
      But for the IP fragments it does not expect the driver to be capable to
      handle the frames appropriately. Thus all checksums are allready
      computed. This is also flaged within the skb (ip_summed set to
      CHECKSUM_NONE).
      
      Unfortunately the spidernet driver ignores that hints. It tries to send
      the IP fragments of UDP datagrams as normal UDP/IP frames. Since they
      have different structure the silicon detects them the be not
      "well-formed" and skips them.
      
      The following one-liner against 2.6.21-rc2 changes this behavior. If the
      IP-stack claims to have done the checksumming, the driver should not
      try to checksum (and analyze) the frame but send it as is.
      Signed-off-by: default avatarNorbert Eicker <n.eicker@fz-juelich.de>
      Signed-off-by: default avatarLinas Vepstas <linas@austin.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      33bdeec8
    • Divy Le Ray's avatar
      cxgb3 - PHY interrupts and GPIO pins. · 1ca03cbc
      Divy Le Ray authored
      Remove assumption that PHY interrupts use GPIOs 3 and 5.
      Deal with PHY interrupts connected to any GPIO pins.
      Signed-off-by: default avatarDivy Le Ray <divy@chelsio.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      1ca03cbc
    • Divy Le Ray's avatar
      cxgb3 - Fix low memory conditions · 606fcd0b
      Divy Le Ray authored
      Reuse the incoming skb when a clientless abort req is recieved.
      
      The release of RDMA connections HW resources might be deferred in
      low memory situations.
      Ensure that no further activity is passed up to the RDMA driver
      for these connections.
      Signed-off-by: default avatarDivy Le Ray <divy@chelsio.com>
      Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
      606fcd0b
    • Linus Torvalds's avatar
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm · 895e1fc7
      Linus Torvalds authored
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm:
        KVM: Fix off-by-one when writing to a nonpae guest pde
      895e1fc7
    • Avi Kivity's avatar
      KVM: Fix off-by-one when writing to a nonpae guest pde · 6b8d0f9b
      Avi Kivity authored
      Nonpae guest pdes are shadowed by two pae ptes, so we double the offset
      twice: once to account for the pte size difference, and once because we
      need to shadow pdes for a single guest pde.
      
      But when writing to the upper guest pde we also need to truncate the
      lower bits, otherwise the multiply shifts these bits into the pde index
      and causes an access to the wrong shadow pde.  If we're at the end of the
      page (accessing the very last guest pde) we can even overflow into the
      next host page and oops.
      Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
      6b8d0f9b
    • Denis Lunev's avatar
      [NETLINK]: Don't attach callback to a going-away netlink socket · ac57b3a9
      Denis Lunev authored
      There is a race between netlink_dump_start() and netlink_release()
      that can lead to the situation when a netlink socket with non-zero
      callback is freed.
      
      Here it is:
      
      CPU1:                           CPU2
      netlink_release():              netlink_dump_start():
      
                                      sk = netlink_lookup(); /* OK */
      
      netlink_remove();
      
      spin_lock(&nlk->cb_lock);
      if (nlk->cb) { /* false */
        ...
      }
      spin_unlock(&nlk->cb_lock);
      
                                      spin_lock(&nlk->cb_lock);
                                      if (nlk->cb) { /* false */
                                               ...
                                      }
                                      nlk->cb = cb;
                                      spin_unlock(&nlk->cb_lock);
                                      ...
      sock_orphan(sk);
      /*
       * proceed with releasing
       * the socket
       */
      
      The proposal it to make sock_orphan before detaching the callback
      in netlink_release() and to check for the sock to be SOCK_DEAD in
      netlink_dump_start() before setting a new callback.
      Signed-off-by: default avatarDenis Lunev <den@openvz.org>
      Signed-off-by: default avatarKirill Korotaev <dev@openvz.org>
      Signed-off-by: default avatarPavel Emelianov <xemul@openvz.org>
      Acked-by: default avatarPatrick McHardy <kaber@trash.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ac57b3a9
  2. 18 Apr, 2007 3 commits
    • Olaf Kirch's avatar
      [IrDA]: Correctly handling socket error · bfb6709d
      Olaf Kirch authored
      This patch fixes an oops first reported in mid 2006 - see
      http://lkml.org/lkml/2006/8/29/358 The cause of this bug report is that
      when an error is signalled on the socket, irda_recvmsg_stream returns
      without removing a local wait_queue variable from the socket's sk_sleep
      queue. This causes havoc further down the road.
      
      In response to this problem, a patch was made that invoked sock_orphan on
      the socket when receiving a disconnect indication. This is not a good fix,
      as this sets sk_sleep to NULL, causing applications sleeping in recvmsg
      (and other places) to oops.
      
      This is against the latest net-2.6 and should be considered for -stable
      inclusion. 
      Signed-off-by: default avatarOlaf Kirch <olaf.kirch@oracle.com>
      Signed-off-by: default avatarSamuel Ortiz <samuel@sortiz.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bfb6709d
    • Vlad Yasevich's avatar
      [SCTP]: Do not interleave non-fragments when in partial delivery · d0cf0d99
      Vlad Yasevich authored
      The way partial delivery is currently implemnted, it is possible to
      intereleave a message (either from another steram, or unordered) that
      is not part of partial delivery process.  The only way to this is for
      a message to not be a fragment and be 'in order' or unorderd for a
      given stream.  This will result in bypassing the reassembly/ordering
      queues where things live duing partial delivery, and the
      message will be delivered to the socket in the middle of partial delivery.
      
      This is a two-fold problem, in that:
      1.  the app now must check the stream-id and flags which it may not
      be doing.
      2.  this clearing partial delivery state from the association and results
      in ulp hanging.
      
      This patch is a band-aid over a much bigger problem in that we
      don't do stream interleave.
      Signed-off-by: default avatarVlad Yasevich <vladislav.yasevich@hp.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d0cf0d99
    • David S. Miller's avatar
      [IPSEC] af_key: Fix thinko in pfkey_xfrm_policy2msg() · fefaa75e
      David S. Miller authored
      Make sure to actually assign the determined mode to
      rq->sadb_x_ipsecrequest_mode.
      
      Noticed by Joe Perches.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fefaa75e
  3. 17 Apr, 2007 26 commits