Skip to content
Snippets Groups Projects
  1. Oct 02, 2021
  2. Sep 03, 2021
    • Shannon Nelson's avatar
      ionic: fix double use of queue-lock · 79a58c06
      Shannon Nelson authored
      
      Deadlock seen in an instance where the hwstamp configuration
      is changed while the driver is running:
      
      [ 3988.736671]  schedule_preempt_disabled+0xe/0x10
      [ 3988.736676]  __mutex_lock.isra.5+0x276/0x4e0
      [ 3988.736683]  __mutex_lock_slowpath+0x13/0x20
      [ 3988.736687]  ? __mutex_lock_slowpath+0x13/0x20
      [ 3988.736692]  mutex_lock+0x2f/0x40
      [ 3988.736711]  ionic_stop_queues_reconfig+0x16/0x40 [ionic]
      [ 3988.736726]  ionic_reconfigure_queues+0x43e/0xc90 [ionic]
      [ 3988.736738]  ionic_lif_config_hwstamp_rxq_all+0x85/0x90 [ionic]
      [ 3988.736751]  ionic_lif_hwstamp_set_ts_config+0x29c/0x360 [ionic]
      [ 3988.736763]  ionic_lif_hwstamp_set+0x76/0xf0 [ionic]
      [ 3988.736776]  ionic_eth_ioctl+0x33/0x40 [ionic]
      [ 3988.736781]  dev_ifsioc+0x12c/0x420
      [ 3988.736785]  dev_ioctl+0x316/0x720
      
      This can be demonstrated with "ptp4l -m -i <intf>"
      
      To fix this, we pull the use of the queue_lock further up above the
      callers of ionic_reconfigure_queues() and ionic_stop_queues_reconfig().
      
      Fixes: 7ee99fc5 ("ionic: pull hwstamp queue_lock up a level")
      Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      79a58c06
  3. Aug 28, 2021
  4. Aug 26, 2021
    • Shannon Nelson's avatar
      ionic: handle mac filter overflow · a0c007b3
      Shannon Nelson authored
      
      Make sure we go into PROMISC mode when we have too many
      filters by specifically counting the filters that successfully
      get saved to the firmware.
      
      The device advertises max_ucast_filters and max_mcast_filters,
      but really only has max_ucast_filters slots available for
      uc and mc filters combined.
      
      Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a0c007b3
    • Shannon Nelson's avatar
      ionic: refactor ionic_lif_addr to remove a layer · 8b415173
      Shannon Nelson authored
      
      The filter counting in ionic_lif_addr() really isn't useful,
      and potentially misleading, especially when we're checking in
      ionic_lif_rx_mode() to see if we need to go into PROMISC mode.
      We can safely refactor this and remove a calling layer.
      
      Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8b415173
    • Shannon Nelson's avatar
      ionic: sync the filters in the work task · 969f8439
      Shannon Nelson authored
      
      In order to separate the atomic needs of __dev_uc_sync()
      and __dev_mc_sync() from the safe rx_mode handling, we need
      to have the ndo handler manipulate the driver's filter list,
      and later have the driver sync the filters to the firmware,
      outside of the atomic context.
      
      Here we put __dev_mc_sync() and __dev_uc_sync() back into the
      ndo callback to give them their netif_addr_lock context and
      have them update the driver's filter list, flagging changes
      that should be made to the device filter list.  Later, in the
      rx_mode handler, we read those hints and sync up the device's
      list as needed.
      
      It is possible for multiple add/delete requests to come from
      the stack before the rx_mode task processes the list, but the
      handling of the sync status flag should keep everything sorted
      correctly.  For example, if a delete of an existing filter is
      followed by another add before the rx_mode task is run, as can
      happen when going in and out of a bond, the add will cancel
      the delete and no actual changes will be sent to the device.
      
      We also add a check in the watchdog to see if there are any
      stray unsync'd filters, possibly left over from a filter
      overflow and waiting to get sync'd after some other filter
      gets removed to make room.
      
      Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      969f8439
    • Shannon Nelson's avatar
      ionic: flatten calls to set-rx-mode · b941ea05
      Shannon Nelson authored
      
      Since only two functions call through ionic_set_rx_mode(), one
      that can sleep and one that can't, we can split the function
      and put the bits of code into the callers.  This removes an
      unnecessary calling layer.
      
      Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b941ea05
    • Shannon Nelson's avatar
      ionic: remove old work task types · 56c8a53b
      Shannon Nelson authored
      
      With the move of mac filter handling to outside of the
      ndo_rx_mode context using the IONIC_DW_TYPE_RX_MODE,
      we no longer are using IONIC_DW_TYPE_RX_ADDR_ADD and
      IONIC_DW_TYPE_RX_ADDR_DEL and they can be removed.
      
      Signed-off-by: default avatarShannon Nelson <snelson@pensando.io>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      56c8a53b
  5. Jul 27, 2021
  6. Jul 23, 2021
  7. Apr 08, 2021
  8. Apr 02, 2021
  9. Mar 31, 2021
  10. Mar 19, 2021
  11. Mar 10, 2021
  12. Dec 02, 2020
  13. Nov 24, 2020
Loading