Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170448
b: refs/heads/master
c: fa41fd1
h: refs/heads/master
v: v3
  • Loading branch information
Sreenivasa Honnur authored and David S. Miller committed Oct 6, 2009
1 parent f5058a7 commit caa6fea
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f0dfebafcc14a7456eb6ae974b68f600fdd8b42d
refs/heads/master: fa41fd10038ab575f043a62dace374e07e9193de
22 changes: 22 additions & 0 deletions trunk/drivers/net/vxge/vxge-config.c
Original file line number Diff line number Diff line change
Expand Up @@ -2156,6 +2156,28 @@ vxge_hw_mgmt_reg_read(struct __vxge_hw_device *hldev,
return status;
}

/*
* vxge_hw_vpath_strip_fcs_check - Check for FCS strip.
*/
enum vxge_hw_status
vxge_hw_vpath_strip_fcs_check(struct __vxge_hw_device *hldev, u64 vpath_mask)
{
struct vxge_hw_vpmgmt_reg __iomem *vpmgmt_reg;
enum vxge_hw_status status = VXGE_HW_OK;
int i = 0, j = 0;

for (i = 0; i < VXGE_HW_MAX_VIRTUAL_PATHS; i++) {
if (!((vpath_mask) & vxge_mBIT(i)))
continue;
vpmgmt_reg = hldev->vpmgmt_reg[i];
for (j = 0; j < VXGE_HW_MAC_MAX_MAC_PORT_ID; j++) {
if (readq(&vpmgmt_reg->rxmac_cfg0_port_vpmgmt_clone[j])
& VXGE_HW_RXMAC_CFG0_PORT_VPMGMT_CLONE_STRIP_FCS)
return VXGE_HW_FAIL;
}
}
return status;
}
/*
* vxge_hw_mgmt_reg_Write - Write Titan register.
*/
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/vxge/vxge-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -2201,6 +2201,8 @@ __vxge_hw_vpath_func_id_get(
enum vxge_hw_status
__vxge_hw_vpath_reset_check(struct __vxge_hw_virtualpath *vpath);

enum vxge_hw_status
vxge_hw_vpath_strip_fcs_check(struct __vxge_hw_device *hldev, u64 vpath_mask);
/**
* vxge_debug
* @level: level of debug verbosity.
Expand Down
9 changes: 9 additions & 0 deletions trunk/drivers/net/vxge/vxge-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit caa6fea

Please sign in to comment.