From fa41fd10038ab575f043a62dace374e07e9193de Mon Sep 17 00:00:00 2001 From: Sreenivasa Honnur Date: Mon, 5 Oct 2009 01:56:35 +0000 Subject: vxge: Check if FCS stripping is disabled by the firmware. - Added a function to check if FCS stripping is disabled by the firmware, if it is not disabled fail driver load. - By default FCS stripping is disabled by the firmware. With this assumption driver decrements the indicated packet length by 4 bytes(FCS length). - This patch ensures that FCS stripping is disabled during driver load time. Signed-off-by: Sreenivasa Honnur Signed-off-by: David S. Miller --- drivers/net/vxge/vxge-main.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/net/vxge/vxge-main.c') diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c index 7a851ac30c6..04ac4b6cf83 100644 --- a/drivers/net/vxge/vxge-main.c +++ b/drivers/net/vxge/vxge-main.c @@ -4244,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 */ -- cgit v1.2.3