1. 03 8月, 2013 1 次提交
  2. 02 8月, 2013 1 次提交
    • Y
      bnx2x: Revising locking scheme for MAC configuration · 8b09be5f
      Yuval Mintz 提交于
      On very rare occasions, repeated load/unload stress test in the presence of
      our storage driver (bnx2i/bnx2fc) causes a kernel panic in bnx2x code
      (NULL pointer dereference). Stack traces indicate the issue happens during MAC
      configuration; thorough code review showed that indeed several races exist
      in which one thread can iterate over the list of configured MACs while another
      deletes entries from the same list.
      
      This patch adds a varient on the single-writer/Multiple-reader lock mechanism -
      It utilizes an already exsiting bottom-half lock, using it so that Whenever
      a writer is unable to continue due to the existence of another writer/reader,
      it pends its request for future deliverance.
      The writer / last readers will check for the existence of such requests and
      perform them instead of the original initiator.
      This prevents the writer from having to sleep while waiting for the lock
      to be accessible, which might cause deadlocks given the locks already
      held by the writer.
      
      Another result of this patch is that setting of Rx Mode is now made in
      sleepable context - Setting of Rx Mode is made under a bottom-half lock, which
      was always nontrivial for the bnx2x driver, as the HW/FW configuration requires
      wait for completions.
      Since sleep was impossible (due to the sleepless-context), various mechanisms
      were utilized to prevent the calling thread from sleep, but the truth was that
      when the caller thread (i.e, the one calling ndo_set_rx_mode()) returned, the
      Rx mode was still not set in HW/FW.
      
      bnx2x_set_rx_mode() will now overtly schedule for the Rx changes to be
      configured by the sp_rtnl_task which hold the RTNL lock and is sleepable
      context.
      Signed-off-by: NYuval Mintz <yuvalmin@broadcom.com>
      Signed-off-by: NAriel Elior <ariele@broadcom.com>
      Signed-off-by: NEilon Greenstein <eilong@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8b09be5f
  3. 30 7月, 2013 12 次提交
  4. 17 7月, 2013 1 次提交
  5. 12 7月, 2013 1 次提交
  6. 11 7月, 2013 2 次提交
  7. 02 7月, 2013 3 次提交
  8. 26 6月, 2013 1 次提交
    • G
      net/tg3: Avoid delay during MMIO access · 6d446ec3
      Gavin Shan 提交于
      When the EEH error is the result of a fenced host bridge, MMIO accesses
      can be very slow (milliseconds) to timeout and return all 1's,
      thus causing the driver various timeout loops to take way too long and
      trigger soft-lockup warnings (in addition to taking minutes to recover).
      
      It might be worthwhile to check if for any of these cases, ffffffff is
      a valid possible value, and if not, bail early since that means the HW
      is either gone or isolated. In the meantime, checking that the PCI channel
      is offline would be workaround of the problem.
      
      Cc: <stable@vger.kernel.org> # v3.0+
      Signed-off-by: NGavin Shan <shangw@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6d446ec3
  9. 25 6月, 2013 1 次提交
  10. 24 6月, 2013 5 次提交
  11. 20 6月, 2013 5 次提交
  12. 19 6月, 2013 1 次提交
  13. 18 6月, 2013 1 次提交
    • M
      tg3: Prevent system hang during repeated EEH errors. · 72bb72b0
      Michael Chan 提交于
      The current tg3 code assumes the pci_error_handlers to be always called
      in sequence.  In particular, during ->error_detected(), NAPI is disabled
      and the device is shutdown.  The device is later reset and NAPI
      re-enabled in ->slot_reset() and ->resume().
      
      In EEH, if more than 6 errors are detected in a hour, only
      ->error_detected() will be called.  This will leave the driver in an
      inconsistent state as NAPI is disabled but netif_running state is still
      true.  When the device is later closed, we'll try to disable NAPI again
      and it will loop forever.
      
      We fix this by closing the device if we encounter any error conditions
      during the normal sequence of the pci_error_handlers.
      
      v2: Remove the changes in tg3_io_resume() based on Benjamin Poirier's
          feedback.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NNithin Nayak Sujir <nsujir@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      72bb72b0
  14. 14 6月, 2013 1 次提交
    • F
      bcm63xx_enet: add support Broadcom BCM6345 Ethernet · 3dc6475c
      Florian Fainelli 提交于
      This patch adds support for the Broadcom BCM6345 SoC Ethernet. BCM6345
      has a slightly different and older DMA engine which requires the
      following modifications:
      
      - the width of the DMA channels on BCM6345 is 64 bytes vs 16 bytes,
        which means that the helpers enet_dma{c,s} need to account for this
        channel width and we can no longer use macros
      
      - BCM6345 DMA engine does not have any internal SRAM for transfering
        buffers
      
      - BCM6345 buffer allocation and flow control is not per-channel but
        global (done in RSET_ENETDMA)
      
      - the DMA engine bits are right-shifted by 3 compared to other DMA
        generations
      
      - the DMA enable/interrupt masks are a little different (we need to
        enabled more bits for 6345)
      
      - some register have the same meaning but are offsetted in the ENET_DMAC
        space so a lookup table is required to return the proper offset
      
      The MAC itself is identical and requires no modifications to work.
      Signed-off-by: NFlorian Fainelli <florian@openwrt.org>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3dc6475c
  15. 13 6月, 2013 1 次提交
    • N
      tg3: Wait for boot code to finish after power on · df465abf
      Nithin Sujir 提交于
      Some systems that don't need wake-on-lan may choose to power down the
      chip on system standby. Upon resume, the power on causes the boot code
      to startup and initialize the hardware. On one new platform, this is
      causing the device to go into a bad state due to a race between the
      driver and boot code, once every several hundred resumes. The same race
      exists on open since we come up from a power on.
      
      This patch adds a wait for boot code signature at the beginning of
      tg3_init_hw() which is common to both cases. If there has not been a
      power-off or the boot code has already completed, the signature will be
      present and poll_fw() returns immediately. Also return immediately if
      the device does not have firmware.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NNithin Nayak Sujir <nsujir@broadcom.com>
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      df465abf
  16. 11 6月, 2013 3 次提交