1. 28 Oct, 2010 12 commits
    • Pavel Emelyanov's avatar
      8390: Don't oops on starting dev queue · b7126d8c
      Pavel Emelyanov authored
      The __NS8390_init tries to start the device queue before the
      device is registered. This results in an oops (snipped):
      
      [    2.865493] BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
      [    2.866106] IP: [<ffffffffa000602a>] netif_start_queue+0xb/0x12 [8390]
      [    2.881267] Call Trace:
      [    2.881437]  [<ffffffffa000624d>] __NS8390_init+0x102/0x15a [8390]
      [    2.881999]  [<ffffffffa00062ae>] NS8390_init+0x9/0xb [8390]
      [    2.882237]  [<ffffffffa000d820>] ne2k_pci_init_one+0x297/0x354 [ne2k_pci]
      [    2.882955]  [<ffffffff811c7a0e>] local_pci_probe+0x12/0x16
      [    2.883308]  [<ffffffff811c85ad>] pci_device_probe+0xc3/0xef
      [    2.884049]  [<ffffffff8129218d>] driver_probe_device+0xbe/0x14b
      [    2.884937]  [<ffffffff81292260>] __driver_attach+0x46/0x62
      [    2.885170]  [<ffffffff81291788>] bus_for_each_dev+0x49/0x78
      [    2.885781]  [<ffffffff81291fbb>] driver_attach+0x1c/0x1e
      [    2.886089]  [<ffffffff812912ab>] bus_add_driver+0xba/0x227
      [    2.886330]  [<ffffffff8129259a>] driver_register+0x9e/0x115
      [    2.886933]  [<ffffffff811c8815>] __pci_register_driver+0x50/0xac
      [    2.887785]  [<ffffffffa001102c>] ne2k_pci_init+0x2c/0x2e [ne2k_pci]
      [    2.888093]  [<ffffffff81000212>] do_one_initcall+0x7c/0x130
      [    2.888693]  [<ffffffff8106d74f>] sys_init_module+0x99/0x1da
      [    2.888946]  [<ffffffff81002a2b>] system_call_fastpath+0x16/0x1b
      
      This happens because the netif_start_queue sets respective bit on the dev->_tx
      array which is not yet allocated.
      
      As far as I understand the code removing the netif_start_queue from __NS8390_init
      is OK, since queue will be started later on device open. Plz, correct me if I'm wrong.
      
      Found in the Dave's current tree, so he's in Cc.
      Signed-off-by: default avatarPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b7126d8c
    • Gerrit Renker's avatar
      dccp ccid-2: Stop polling · 1c0e0a05
      Gerrit Renker authored
      This updates CCID-2 to use the CCID dequeuing mechanism, converting from
      previous continuous-polling to a now event-driven mechanism.
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1c0e0a05
    • Gerrit Renker's avatar
      dccp: Refine the wait-for-ccid mechanism · b1fcf55e
      Gerrit Renker authored
      This extends the existing wait-for-ccid routine so that it may be used with
      different types of CCID, addressing the following problems:
      
       1) The queue-drain mechanism only works with rate-based CCIDs. If CCID-2 for
          example has a full TX queue and becomes network-limited just as the
          application wants to close, then waiting for CCID-2 to become unblocked
          could lead to an indefinite  delay (i.e., application "hangs").
       2) Since each TX CCID in turn uses a feedback mechanism, there may be changes
          in its sending policy while the queue is being drained. This can lead to
          further delays during which the application will not be able to terminate.
       3) The minimum wait time for CCID-3/4 can be expected to be the queue length
          times the current inter-packet delay. For example if tx_qlen=100 and a delay
          of 15 ms is used for each packet, then the application would have to wait
          for a minimum of 1.5 seconds before being allowed to exit.
       4) There is no way for the user/application to control this behaviour. It would
          be good to use the timeout argument of dccp_close() as an upper bound. Then
          the maximum time that an application is willing to wait for its CCIDs to can
          be set via the SO_LINGER option.
      
      These problems are addressed by giving the CCID a grace period of up to the
      `timeout' value.
      
      The wait-for-ccid function is, as before, used when the application
       (a) has read all the data in its receive buffer and
       (b) if SO_LINGER was set with a non-zero linger time, or
       (c) the socket is either in the OPEN (active close) or in the PASSIVE_CLOSEREQ
           state (client application closes after receiving CloseReq).
      
      In addition, there is a catch-all case of __skb_queue_purge() after waiting for
      the CCID. This is necessary since the write queue may still have data when
       (a) the host has been passively-closed,
       (b) abnormal termination (unread data, zero linger time),
       (c) wait-for-ccid could not finish within the given time limit.
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b1fcf55e
    • Gerrit Renker's avatar
      dccp: Extend CCID packet dequeueing interface · dc841e30
      Gerrit Renker authored
      This extends the packet dequeuing interface of dccp_write_xmit() to allow
       1. CCIDs to take care of timing when the next packet may be sent;
       2. delayed sending (as before, with an inter-packet gap up to 65.535 seconds).
      
      The main purpose is to take CCID-2 out of its polling mode (when it is network-
      limited, it tries every millisecond to send, without interruption).
      
      The mode of operation for (2) is as follows:
       * new packet is enqueued via dccp_sendmsg() => dccp_write_xmit(),
       * ccid_hc_tx_send_packet() detects that it may not send (e.g. window full),
       * it signals this condition via `CCID_PACKET_WILL_DEQUEUE_LATER',
       * dccp_write_xmit() returns without further action;
       * after some time the wait-condition for CCID becomes true,
       * that CCID schedules the tasklet,
       * tasklet function calls ccid_hc_tx_send_packet() via dccp_write_xmit(),
       * since the wait-condition is now true, ccid_hc_tx_packet() returns "send now",
       * packet is sent, and possibly more (since dccp_write_xmit() loops).
      
      Code reuse: the taskled function calls dccp_write_xmit(), the timer function
                  reduces to a wrapper around the same code.
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dc841e30
    • Gerrit Renker's avatar
      dccp: Return-value convention of hc_tx_send_packet() · fe84f414
      Gerrit Renker authored
      This patch reorganises the return value convention of the CCID TX sending
      function, to permit more flexible schemes, as required by subsequent patches.
      
      Currently the convention is
       * values < 0     mean error,
       * a value == 0   means "send now", and
       * a value x > 0  means "send in x milliseconds".
      
      The patch provides symbolic constants and a function to interpret return values.
      
      In addition, it caps the maximum positive return value to 0xFFFF milliseconds,
      corresponding to 65.535 seconds.  This is possible since in CCID-3/4 the
      maximum possible inter-packet gap is fixed at t_mbi = 64 sec.
      Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fe84f414
    • Emil Tantilov's avatar
      igbvf: fix panic on load · de7fe787
      Emil Tantilov authored
      Introduced by commit:e6484930
      net: allocate tx queues in register_netdevice
      Signed-off-by: default avatarEmil Tantilov <emil.s.tantilov@intel.com>
      Acked-by: default avatarGreg Rose <greg.v.rose@intel.com>
      Tested-by: default avatarJeff Pieper <jeffrey.e.pieper@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      de7fe787
    • Emil Tantilov's avatar
      ixgb: call pci_disable_device in ixgb_remove · ec43a81c
      Emil Tantilov authored
      ixgb fails to work after reload on recent kernels:
      
      rmmod ixgb (dev->current_state = PCI_UNKNOWN)
      modprobe ixgb (pci_enable_device will bail leaving current_state to PCI_UNKNOWN)
      ifup eth0
      do_IRQ: 2.82 No irq handler for vector (irq -1)
      
      The issue was exposed by commit fcd097f3
      PCI: MSI: Remove unsafe and unnecessary hardware access
      
      which avoids HW writes for power states != PCI_D0
      
      CC: Ben Hutchings <bhutchings@solarflare.com>
      Signed-off-by: default avatarEmil Tantilov <emil.s.tantilov@intel.com>
      Tested-by: default avatarJeff Pieper <jeffrey.e.pieper@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ec43a81c
    • John Fastabend's avatar
      ixgbe: DCB, fix TX hang occurring in stress condition with PFC · 9806307a
      John Fastabend authored
      The DCB credits refill quantum _must_ be greater than half the max
      packet size. This is needed to guarantee that TX DMA operations
      are not attempted during a pause state. Additionally, the min IFG
      must be set correctly for DCB mode. If a DMA operation is
      requested unexpectedly during the pause state the HW data
      store may be corrupted leading to a DMA hang.  The DMA hang
      requires a reset to correct. This fixes the HW configuration
      to avoid this condition.
      Signed-off-by: default avatarJohn Fastabend <john.r.fastabend@intel.com>
      Tested-by: default avatarRoss Brattain <ross.b.brattain@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9806307a
    • Carolyn Wyborny's avatar
      e1000e: Add check for reset flags before displaying reset message · affa9dfb
      Carolyn Wyborny authored
      Some parts need to execute resets during normal operation.  This flag
      check ensures that those parts reset without needlessly alarming the
      user.  Other unexpected resets by other parts will dump debug info
      and message the reset action to the user, as originally intended.
      Signed-off-by: default avatarCarolyn Wyborny <carolyn.wyborny@intel.com>
      Acked-by: default avatarBruce Allan <bruce.w.allan@intel.com>
      Tested-by: default avatarEmil Tantilov <emil.s.tantilov@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      affa9dfb
    • Carolyn Wyborny's avatar
      e1000e: reset PHY after errors detected · ff10e13c
      Carolyn Wyborny authored
      Some errors can be induced in the PHY via environmental testing
      (specifically extreme temperature changes and electro static
      discharge testing), and in the case of the PHY hanging due to
      this input, this detects the problem and resets to continue.
      This issue only applies to 82574 silicon.
      Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
      Signed-off-by: default avatarCarolyn Wyborny <carolyn.wyborny@intel.com>
      Tested-by: default avatarEmil Tantilov <emil.s.tantilov@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ff10e13c
    • David S. Miller's avatar
      pch_gbe: Select MII. · 116c1ea0
      David S. Miller authored
      Reported-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      116c1ea0
    • Jesse Gross's avatar
      igb: Fix unused variable warning. · c1758012
      Jesse Gross authored
      Commit eab6d18d "vlan: Don't check for vlan group before
      vlan_tx_tag_present" removed the need for the adapter variable
      in igb_xmit_frame_ring_adv().  This removes the variable as well
      to avoid the compiler warning.
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: default avatarJesse Gross <jesse@nicira.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c1758012
  2. 27 Oct, 2010 25 commits
  3. 26 Oct, 2010 3 commits