[MLX4] added support to new device. [mlnx: 4473]
[mirror/winof/.git] / hw / mlx4 / kernel / bus / net / main.c
index 508336d..f8782fe 100644 (file)
@@ -93,7 +93,8 @@ mlx4_pci_table[] = {
        HCA(MELLANOX, DDR_G2,           HERMON),
        HCA(MELLANOX, QDR_G2,           HERMON),
        HCA(MELLANOX, ETH_G2,           HERMON),
-       HCA(MELLANOX, ETH_YATIR_G2,             HERMON),
+       HCA(MELLANOX, ETH_YATIR_G2,     HERMON),
+       HCA(MELLANOX, ETH_B0_G2,        HERMON),
        HCA(MELLANOX, BD,               LIVEFISH),
 };
 #define MLX4_PCI_TABLE_SIZE (sizeof(mlx4_pci_table)/sizeof(struct pci_device_id))
@@ -635,7 +636,13 @@ static int mlx4_init_hca(struct mlx4_dev *dev)
 
        err = mlx4_QUERY_FW(dev);
        if (err) {
-               mlx4_err(dev, "QUERY_FW command failed, aborting.\n");
+               if (err == -EACCES) {
+                       static int print_it = 1;
+                       if (print_it-- > 0)
+                               mlx4_warn(dev, "Function disabled, please upgrade to multi function driver.\n");
+               }
+               else
+                       mlx4_err(dev, "QUERY_FW command failed, aborting.\n");
                return err;
        }
 
@@ -988,8 +995,11 @@ run_as_livefish:
        }
 
        err = mlx4_init_hca(dev);
-       if (err)
+       if (err) {
+               if (err == -EACCES) 
+                       dev->flags |= MLX4_FLAG_NOT_PRIME;
                goto err_cmd;
+       }
 
        mlx4_enable_msi_x(dev);