1. 23 8月, 2013 3 次提交
    • B
      ecd0a6f0
    • B
      sfc: Cleanup Falcon-arch simple MAC filter state · 964e6135
      Ben Hutchings 提交于
      On Falcon we implement MAC filtering requested by the stack using the
      MAC wrapper's single unicast filter and multicast hash filter.  Siena
      is very similar, though MAC configuration is mediated by the MC.
      
      Since MCDI operations may sleep, reconfiguration is deferred from
      ndo_set_rx_mode to a work item.  However, it still updates the private
      variables describing the filter state synchronously.  Contrary to
      comments, the later use of these variables is not protected using the
      address lock, resulting in race conditions.
      
      Move the state update to a new function
      efx_farch_filter_sync_rx_mode() and make the Falcon-arch MAC
      configuration functions call that, so that its use is consistently
      serialised by the mac_lock.
      
      Invert and rename the promiscuous flag to the more accurate
      unicast_filter, and comment that both this and multicast_hash are
      not used on EF10.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      964e6135
    • B
      sfc: Make most filter operations NIC-type-specific · add72477
      Ben Hutchings 提交于
      Aside from accelerated RFS, there is almost nothing that can be shared
      between the filter table implementations for the Falcon architecture
      and EF10.
      
      Move the few shared functions into efx.c and rx.c and the rest into
      farch.c.  Introduce efx_nic_type operations for the implementation and
      inline wrapper functions that call these.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      add72477
  2. 22 8月, 2013 5 次提交
  3. 21 8月, 2013 2 次提交
  4. 25 6月, 2013 1 次提交
  5. 01 12月, 2012 1 次提交
    • B
      sfc: Really disable flow control while flushing · d5e8cc6c
      Ben Hutchings 提交于
      Receiving pause frames can block TX queue flushes.  Earlier changes
      work around this by reconfiguring the MAC during flushes for VFs, but
      during flushes for the PF we would only change the fc_disable counter.
      Unless the MAC is reconfigured for some other reason during the flush
      (which I would not expect to happen) this had no effect at all.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      d5e8cc6c
  6. 01 11月, 2012 1 次提交
  7. 19 9月, 2012 1 次提交
  8. 17 7月, 2012 1 次提交
  9. 07 3月, 2012 4 次提交
  10. 16 2月, 2012 4 次提交
  11. 14 2月, 2012 1 次提交
  12. 27 1月, 2012 3 次提交
    • B
      sfc: Add hwmon driver for boards using SFC9000-family controllers · 55c5e0f8
      Ben Hutchings 提交于
      The SFC9000-family controllers have firmware to manage all board
      peripherals including temperature, heat sink continuity and voltage
      sensors.  The firmware reports sensor alarms, which we log, and
      will shut down the board if necessary.
      
      Some users may want to monitor their boards more closely, so add an
      hwmon driver that exposes all sensors reported by the firmware.  Move
      efx_mcdi_sensor_event() into the new file so it can share the array of
      sensor labels with the hwmon driver.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      55c5e0f8
    • B
      sfc: Correct interrupt timer quantum for Siena (normal and turbo mode) · cc180b69
      Ben Hutchings 提交于
      We currently assume that the timer quantum for Siena is 5 us, the same
      as for Falcon.  This is not correct; timer ticks are generated on a
      rota which takes a minimum of 768 cycles (each event delivery or other
      timer change will delay it by 3 cycles).  The timer quantum should be
      6.144 or 3.072 us depending on whether turbo mode is active.
      
      Replace EFX_IRQ_MOD_RESOLUTION with a timer_quantum_ns field in struct
      efx_nic, initialised by the efx_nic_type::probe function.
      
      While we're at it, replace EFX_IRQ_MOD_MAX with a timer_period_max
      field in struct efx_nic_type.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      cc180b69
    • B
      sfc: Merge efx_mac_operations into efx_nic_type · 710b208d
      Ben Hutchings 提交于
      No NICs need to switch efx_mac_operations at run-time, and the MAC
      operations are fairly closely bound to NIC types.
      
      Move efx_mac_operations::reconfigure to efx_nic_type::reconfigure_mac
      and efx_mac_operations::check_fault fo efx_nic_type::check_mac_fault.
      Change callers to call through efx->type or directly if the NIC type
      is known.
      
      Remove efx_mac_operations::update_stats.  The implementations for
      Falcon used to fetch MAC statistics synchronously and this was used by
      efx_register_netdev() to clear statistics after running self-tests.
      However, it now only converts statistics that have already been
      fetched (and that only for Falcon), and the call from
      efx_register_netdev() has no effect.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      710b208d
  13. 17 9月, 2011 1 次提交
  14. 11 8月, 2011 1 次提交
  15. 12 5月, 2011 1 次提交
    • B
      sfc: Always map MCDI shared memory as uncacheable · 747df225
      Ben Hutchings 提交于
      We enabled write-combining for memory-mapped registers in commit
      65f0b417, but inhibited it for the
      MCDI shared memory where this is not supported.  However,
      write-combining mappings also allow read-reordering, which may also
      be a problem.
      
      I found that when an SFC9000-family controller is connected to an
      Intel 3000 chipset, and write-combining is enabled, the controller
      stops responding to PCIe read requests during driver initialisation
      while the driver is polling for completion of an MCDI command.  This
      results in an NMI and system hang.  Adding read memory barriers
      between all reads to the shared memory area appears to reduce but not
      eliminate the probability of this.
      
      We have not yet established whether this is a bug in our BIU or in the
      PCIe bridge.  For now, work around by mapping the shared memory area
      separately.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      747df225
  16. 15 4月, 2011 1 次提交
  17. 12 4月, 2011 1 次提交
    • B
      sfc: Do not use efx_process_channel_now() in online self-test · d4fabcc8
      Ben Hutchings 提交于
      During self-tests we use efx_process_channel_now() to handle
      completion and other events synchronously.  This disables interrupts
      and NAPI processing for the channel in question, but it may still be
      interrupted by another channel.  A single socket may receive packets
      from multiple net devices or even multiple channels of the same net
      device, so this can result in deadlock on a socket lock.
      
      Receiving packets in process context will also result in incorrect
      classification by the network cgroup classifier.
      
      Therefore, we must only use efx_process_channel_now() in the offline
      loopback tests (which never deliver packets up the stack) and not for
      the online interrupt and event tests.
      
      For the interrupt test, there is no reason to process events.  We
      only care that an interrupt is raised.
      
      For the event test, we want to know whether events have been received,
      and there may be many events ahead of the one we inject.  Therefore
      remove efx_channel::magic_count and instead test whether
      efx_channel::eventq_read_ptr advances.  This is currently an event
      queue index and might wrap around to exactly the same value, resulting
      in a false negative.  Therefore move the masking to efx_event() and
      efx_nic_eventq_read_ack() so that it cannot wrap within the time of
      the test.
      
      The event test also tries to diagnose failures by checking whether an
      event was delivered without causing an interrupt.  Add and use a
      helper function that only does this.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      d4fabcc8
  18. 01 3月, 2011 3 次提交
  19. 04 12月, 2010 4 次提交
  20. 01 7月, 2010 1 次提交