• J
    mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet · ab9c17a0
    Jack Morgenstein 提交于
    1. Added module parameters sr_iov and probe_vf for controlling enablement of
       SRIOV mode.
    2. Increased default max num-qps, num-mpts and log_num_macs to accomodate
       SRIOV mode
    3. Added port_type_array as a module parameter to allow driver startup with
       ports configured as desired.
       In SRIOV mode, only ETH is supported, and this array is ignored; otherwise,
       for the case where the FW supports both port types (ETH and IB), the
       port_type_array parameter is used.
       By default, the port_type_array is set to configure both ports as IB.
    4. When running in sriov mode, the master needs to initialize the ICM eq table
       to hold the eq's for itself and also for all the slaves.
    5. mlx4_set_port_mask() now invoked from mlx4_init_hca, instead of in mlx4_dev_cap.
    6. Introduced sriov VF (slave) device startup/teardown logic (mainly procedures
       mlx4_init_slave, mlx4_slave_exit, mlx4_slave_cap, mlx4_slave_exit and flow
       modifications in __mlx4_init_one, mlx4_init_hca, and mlx4_setup_hca).
       VFs obtain their startup information from the PF (master) device via the
       comm channel.
    7. In SRIOV mode (both PF and VF), MSI_X must be enabled, or the driver
       aborts loading the device.
    8. Do not allow setting port type via sysfs when running in SRIOV mode.
    9. mlx4_get_ownership:  Currently, only one PF is supported by the driver.
       If the HCA is burned with FW which enables more than one PF, only one
       of the PFs is allowed to run.  The first one up grabs a FW ownership
       semaphone -- all other PFs will find that semaphore taken, and the
       driver will not allow them to run.
    Signed-off-by: NJack Morgenstein <jackm@dev.mellanox.co.il>
    Signed-off-by: NYevgeny Petrilin <yevgenyp@mellanox.co.il>
    Signed-off-by: NLiran Liss <liranl@mellanox.co.il>
    Signed-off-by: NMarcel Apfelbaum <marcela@mellanox.co.il>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    ab9c17a0
fw.c 43.7 KB