]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/net/vxge/vxge-main.c
vxge: Check if FCS stripping is disabled by the firmware.
[net-next-2.6.git] / drivers / net / vxge / vxge-main.c
index 068d7a9d3e36aaf447661fb27e0b9d898325137a..04ac4b6cf83a91463a6efbf9badce9dc20f03ae6 100644 (file)
@@ -4088,9 +4088,10 @@ vxge_probe(struct pci_dev *pdev, const struct pci_device_id *pre)
                driver_config->config_dev_cnt = 0;
                driver_config->total_dev_cnt = 0;
                driver_config->g_no_cpus = 0;
-               driver_config->vpath_per_dev = max_config_vpath;
        }
 
+       driver_config->vpath_per_dev = max_config_vpath;
+
        driver_config->total_dev_cnt++;
        if (++driver_config->config_dev_cnt > max_config_dev) {
                ret = 0;
@@ -4243,6 +4244,15 @@ vxge_probe(struct pci_dev *pdev, const struct pci_device_id *pre)
                        goto _exit3;
        }
 
+       /* if FCS stripping is not disabled in MAC fail driver load */
+       if (vxge_hw_vpath_strip_fcs_check(hldev, vpath_mask) != VXGE_HW_OK) {
+               vxge_debug_init(VXGE_ERR,
+                       "%s: FCS stripping is not disabled in MAC"
+                       " failing driver load", VXGE_DRIVER_NAME);
+               ret = -EINVAL;
+               goto _exit4;
+       }
+
        vxge_hw_device_debug_set(hldev, VXGE_ERR, VXGE_COMPONENT_LL);
 
        /* set private device info */