1. 04 10月, 2016 2 次提交
    • G
      net/ncsi: Rework the channel monitoring · 83afdc6a
      Gavin Shan 提交于
      The original NCSI channel monitoring was implemented based on a
      backoff algorithm: the GLS response should be received in the
      specified interval. Otherwise, the channel is regarded as dead
      and failover should be taken if current channel is an active one.
      There are several problems in the implementation: (A) On BCM5718,
      we found when the IID (Instance ID) in the GLS command packet
      changes from 255 to 1, the response corresponding to IID#1 never
      comes in. It means we cannot make the unfair judgement that the
      channel is dead when one response is missed. (B) The code's
      readability should be improved. (C) We should do failover when
      current channel is active one and the channel monitoring should
      be marked as disabled before doing failover.
      
      This reworks the channel monitoring to address all above issues.
      The fields for channel monitoring is put into separate struct
      and the state of channel monitoring is predefined. The channel
      is regarded alive if the network controller responses to one of
      two GLS commands or both of them in 5 seconds.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Reviewed-by: NJoel Stanley <joel@jms.id.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      83afdc6a
    • G
      net/ncsi: Allow to extend NCSI request properties · a0509cbe
      Gavin Shan 提交于
      There is only one NCSI request property for now: the response for
      the sent command need drive the workqueue or not. So we had one
      field (@driven) for the purpose. We lost the flexibility to extend
      NCSI request properties.
      
      This replaces @driven with @flags and @req_flags in NCSI request
      and NCSI command argument struct. Each bit of the newly introduced
      field can be used for one property. No functional changes introduced.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Reviewed-by: NJoel Stanley <joel@jms.id.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a0509cbe
  2. 20 7月, 2016 3 次提交
    • G
      net/ncsi: NCSI AEN packet handler · 7a82ecf4
      Gavin Shan 提交于
      This introduces NCSI AEN packet handlers that result in (A) the
      currently active channel is reconfigured; (B) Currently active
      channel is deconfigured and disabled, another channel is chosen
      as active one and configured. Case (B) won't happen if hardware
      arbitration has been enabled, the channel that was in active
      state is suspended simply.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Acked-by: NJoel Stanley <joel@jms.id.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7a82ecf4
    • G
      net/ncsi: Package and channel management · e6f44ed6
      Gavin Shan 提交于
      This manages NCSI packages and channels:
      
       * The available packages and channels are enumerated in the first
         time of calling ncsi_start_dev(). The channels' capabilities are
         probed in the meanwhile. The NCSI network topology won't change
         until the NCSI device is destroyed.
       * There in a queue in every NCSI device. The element in the queue,
         channel, is waiting for configuration (bringup) or suspending
         (teardown). The channel's state (inactive/active) indicates the
         futher action (configuration or suspending) will be applied on the
         channel. Another channel's state (invisible) means the requested
         action is being applied.
       * The hardware arbitration will be enabled if all available packages
         and channels support it. All available channels try to provide
         service when hardware arbitration is enabled. Otherwise, one channel
         is selected as the active one at once.
       * When channel is in active state, meaning it's providing service, a
         timer started to retrieve the channe's link status. If the channel's
         link status fails to be updated in the determined period, the channel
         is going to be reconfigured. It's the error handling implementation
         as defined in NCSI spec.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Acked-by: NJoel Stanley <joel@jms.id.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e6f44ed6
    • G
      net/ncsi: NCSI response packet handler · 138635cc
      Gavin Shan 提交于
      The NCSI response packets are sent to MC (Management Controller)
      from the remote end. They are responses of NCSI command packets
      for multiple purposes: completion status of NCSI command packets,
      return NCSI channel's capability or configuration etc.
      
      This defines struct to represent NCSI response packets and introduces
      function ncsi_rcv_rsp() which will be used to receive NCSI response
      packets and parse them.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Acked-by: NJoel Stanley <joel@jms.id.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      138635cc