@@ -1086,11 +1086,15 @@ static void pm8001_pci_remove(struct pci_dev *pdev)
{
struct sas_ha_struct *sha = pci_get_drvdata(pdev);
struct pm8001_hba_info *pm8001_ha;
+ struct Scsi_Host *shost;
int i, j;
pm8001_ha = sha->lldd_ha;
- scsi_remove_host(pm8001_ha->shost);
+ shost = pm8001_ha->shost;
+
sas_unregister_ha(sha);
- sas_remove_host(pm8001_ha->shost);
+ sas_remove_host(shost);
+ scsi_remove_host(shost);
+
list_del(&pm8001_ha->list);
PM8001_CHIP_DISP->interrupt_disable(pm8001_ha, 0xFF);
PM8001_CHIP_DISP->chip_soft_rst(pm8001_ha);