/* This routine is to be registered to the kernel's PCI subsystem. When an Emulex HBA is removed from PCI bus, the driver core invokes this routine. This routine dispatches the action to the proper SLI-3 or SLI-4 device remove routine, which will perform all the necessary cleanup for the device to be removed from the PCI subsystem properly.  */
static void __devexit lpfc_pci_remove_one(struct pci_dev *pdev)
/* This routine is to be registered to the kernel's PCI subsystem. When an Emulex HBA is removed from PCI bus, the driver core invokes this routine. This routine dispatches the action to the proper SLI-3 or SLI-4 device remove routine, which will perform all the necessary cleanup for the device to be removed from the PCI subsystem properly.  */
static void __devexit lpfc_pci_remove_one(struct pci_dev *pdev)
{
	struct Scsi_Host *shost = pci_get_drvdata(pdev);
	struct lpfc_hba *phba = ((struct lpfc_vport *)shost->hostdata)->phba;
	switch (phba->pci_dev_grp) {
	case LPFC_PCI_DEV_LP:
		lpfc_pci_remove_one_s3(pdev);
		break;
	case LPFC_PCI_DEV_OC:
		lpfc_pci_remove_one_s4(pdev);
		break;
	default:
		lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
				"1424 Invalid PCI device group: 0x%x\n",
				phba->pci_dev_grp);
		break;
	}
	return;
}