Skip to content

Commit

Permalink
scsi: mpt: Move scsi_remove_host() out of mptscsih_remove_host()
Browse files Browse the repository at this point in the history
Commit c5ce0ab ("scsi: sas: move scsi_remove_host call...")  moved
the call to scsi_remove_host() into sas_remove_host(), but forgot to
modify the mpt drivers.

Fixes: c5ce0ab ("scsi: sas: move scsi_remove_host call into sas_remove_host")
Signed-off-by: Hannes Reinecke <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
  • Loading branch information
hreinecke authored and martinkpetersen committed Apr 24, 2017
1 parent e791ce2 commit cfd2aff
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
7 changes: 6 additions & 1 deletion drivers/message/fusion/mptfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,7 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id)
WQ_MEM_RECLAIM);
if (!ioc->fc_rescan_work_q) {
error = -ENOMEM;
goto out_mptfc_probe;
goto out_mptfc_host;
}

/*
Expand All @@ -1351,6 +1351,9 @@ mptfc_probe(struct pci_dev *pdev, const struct pci_device_id *id)

return 0;

out_mptfc_host:
scsi_remove_host(sh);

out_mptfc_probe:

mptscsih_remove(pdev);
Expand Down Expand Up @@ -1530,6 +1533,8 @@ static void mptfc_remove(struct pci_dev *pdev)
}
}

scsi_remove_host(ioc->sh);

mptscsih_remove(pdev);
}

Expand Down
2 changes: 0 additions & 2 deletions drivers/message/fusion/mptscsih.c
Original file line number Diff line number Diff line change
Expand Up @@ -1176,8 +1176,6 @@ mptscsih_remove(struct pci_dev *pdev)
MPT_SCSI_HOST *hd;
int sz1;

scsi_remove_host(host);

if((hd = shost_priv(host)) == NULL)
return;

Expand Down
10 changes: 9 additions & 1 deletion drivers/message/fusion/mptspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1548,11 +1548,19 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
return error;
}

static void mptspi_remove(struct pci_dev *pdev)
{
MPT_ADAPTER *ioc = pci_get_drvdata(pdev);

scsi_remove_host(ioc->sh);
mptscsih_remove(pdev);
}

static struct pci_driver mptspi_driver = {
.name = "mptspi",
.id_table = mptspi_pci_table,
.probe = mptspi_probe,
.remove = mptscsih_remove,
.remove = mptspi_remove,
.shutdown = mptscsih_shutdown,
#ifdef CONFIG_PM
.suspend = mptscsih_suspend,
Expand Down

0 comments on commit cfd2aff

Please sign in to comment.