/* __vxge_hw_verify_pci_e_info - Validate the pci-e link parameters such as link width and signalling rate.  */
static enum vxge_hw_status __vxge_hw_verify_pci_e_info(struct __vxge_hw_device *hldev)
/* __vxge_hw_verify_pci_e_info - Validate the pci-e link parameters such as link width and signalling rate.  */
static enum vxge_hw_status __vxge_hw_verify_pci_e_info(struct __vxge_hw_device *hldev)
{
	int exp_cap;
	u16 lnk;
	exp_cap = pci_find_capability(hldev->pdev, PCI_CAP_ID_EXP);
	pci_read_config_word(hldev->pdev, exp_cap + PCI_EXP_LNKSTA, &lnk);
	if ((lnk & PCI_EXP_LNKSTA_CLS) != 1)
		return VXGE_HW_ERR_INVALID_PCI_INFO;
	switch ((lnk & PCI_EXP_LNKSTA_NLW) >> 4) {
	case PCIE_LNK_WIDTH_RESRV:
	case PCIE_LNK_X1:
	case PCIE_LNK_X2:
	case PCIE_LNK_X4:
	case PCIE_LNK_X8:
		break;
	default:
		return VXGE_HW_ERR_INVALID_PCI_INFO;
	}
	return VXGE_HW_OK;
}