lpfc 8.3.25: PCI and SR-IOV Fixes
authorJames Smart <james.smart@emulex.com>
Fri, 22 Jul 2011 22:37:28 +0000 (18:37 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 3 Oct 2011 18:41:00 +0000 (11:41 -0700)
commitc02aabcf67bd5d770602eeb6a5cada6f482de696
tree8982fc2e4d0bca9b8fd074cb778ba6439eeb1f2f
parent641e746c63cb770e196226754c675c471876d4e8
lpfc 8.3.25: PCI and SR-IOV Fixes

commit 0a96e9754d6c4a2a31e50ee6c6e36ec13f80bc25 upstream.

PCI and SR-IOV Fixes

- Call pci_save_state after the pci_restore_state completes.
- After calling pci_enable_pcie_error_reporting() and checking the return
  value for logging messages from rc, reset rc to 0 to it will not later be
  interpreted for error.
- Read PCI config space SR-IOV capability to get the number of VFs supported.
- Check for the PF's supported number of VFs before invoking PCI enable sriov
  API call and log error message that user requested number of VFs is beyond
  the PF capability if such request is passed in.
- Added check for Physical function with Virtual Functions attached. If so,
  first disable all the VFs before proceeding to device reset.

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/scsi/lpfc/lpfc_attr.c
drivers/scsi/lpfc/lpfc_crtn.h
drivers/scsi/lpfc/lpfc_init.c
drivers/scsi/lpfc/lpfc_sli.c