1. 16 10月, 2015 32 次提交
  2. 15 10月, 2015 4 次提交
    • J
      net/mlx4_core: Replace VF zero mac with random mac in mlx4_core · 2b3ddf27
      Jack Morgenstein 提交于
      By design, when no default MAC addresses are set in the Hypervisor for VFs,
      the VFs are passed zero-macs. When such a MAC is received by the VF, it
      generates a random MAC address and registers that MAC address
      with the Hypervisor.
      
      This random mac generation is currently done in the mlx4_en module.
      There is a problem, though, if the mlx4_ib module is loaded by a VF before
      the mlx4_en module. In this case, for RoCE, mlx4_ib will see the un-replaced
      zero-mac and register that zero-mac as part of QP1 initialization.
      
      Having a zero-mac in the port's MAC table creates problems for a
      Baseboard Management Console. The BMC occasionally sends packets with a
      zero-mac destination MAC. If there is a zero-mac present in the port's
      MAC table, the FW will send such BMC packets to the host driver rather than
      to the wire, and BMC will stop working.
      
      To address this problem, we move the replacement of zero-mac addresses
      with random-mac addresses to procedure mlx4_slave_cap(), which is part of the
      driver startup for VFs, and is before activation of mlx4_ib and mlx4_en.
      As a result, zero-mac addresses will never be registered in the port MAC table
      by the driver.
      
      In addition, when mlx4_en does initialize the net device, it needs to set
      the NET_ADDR_RANDOM flag in the netdev structure if the address was
      randomly generated. This is done so that udev on the VM does not create
      a new device name after each VF probe (VM boot and such). To accomplish this,
      we add a per-port flag in mlx4_dev which gets set whenever mlx4_core replaces
      a zero-mac with a randomly-generated mac. This flag is examined when mlx4_en
      initializes the net-device.
      
      Fix was suggested by Matan Barak <matanb@mellanox.com>
      Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2b3ddf27
    • E
      net/mlx5_core: Wait for FW readiness on startup · e3297246
      Eli Cohen 提交于
      On device initialization, wait till firmware indicates that that it is done
      with initialization before proceeding to initialize the device.
      
      Also update initialization segment layout to match driver/firmware
      interface definitions.
      Signed-off-by: NEli Cohen <eli@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e3297246
    • M
      net/mlx5_core: Add pci error handlers to mlx5_core driver · 89d44f0a
      Majd Dibbiny 提交于
      This patch implement the pci_error_handlers for mlx5_core which allow the
      driver to recover from PCI error.
      
      Once an error is detected in the PCI, the mlx5_pci_err_detected is called
      and it:
      1) Marks the device to be in 'Internal Error' state.
      2) Dispatches an event to the mlx5_ib to flush all the outstanding cqes
      with error.
      3) Returns all the on going commands with error.
      4) Unloads the driver.
      
      Afterwards, the FW is reset and mlx5_pci_slot_reset is called and it
      enables the device and restore it's pci state.
      
      If the later succeeds, mlx5_pci_resume is called, and it loads the SW
      stack.
      Signed-off-by: NMajd Dibbiny <majd@mellanox.com>
      Signed-off-by: NEli Cohen <eli@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      89d44f0a
    • E
      net/mlx5_core: Fix internal error detection conditions · fd76ee4d
      Eli Cohen 提交于
      The detection of a fatal condition has been updated to take into account
      the state reported by the device or by detecting an all ones read of the
      firmware version which indicates that the device is not accessible.
      Signed-off-by: NEli Cohen <eli@mellanox.com>
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fd76ee4d
  3. 09 10月, 2015 4 次提交