Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53c1d2c9 authored by Bryan O'Sullivan's avatar Bryan O'Sullivan Committed by Roland Dreier
Browse files

IB/ipath: Disable IB link earlier in shutdown sequence



Move the code that shuts down the IB link earlier in the unload
process, to be sure no new packets can arrive while we are unloading.

Signed-off-by: default avatarDave Olson <dave.olson@qlogic.com>
Signed-off-by: default avatarBryan O'Sullivan <bryan.osullivan@qlogic.com>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 490462c2
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -536,8 +536,6 @@ static void __devexit cleanup_device(struct ipath_devdata *dd)
{
	int port;

	ipath_shutdown_device(dd);

	if (*dd->ipath_statusp & IPATH_STATUS_CHIP_PRESENT) {
		/* can't do anything more with chip; needs re-init */
		*dd->ipath_statusp &= ~IPATH_STATUS_CHIP_PRESENT;
@@ -634,6 +632,12 @@ static void __devexit ipath_remove_one(struct pci_dev *pdev)

	ipath_cdbg(VERBOSE, "removing, pdev=%p, dd=%p\n", pdev, dd);

	/*
	 * disable the IB link early, to be sure no new packets arrive, which
	 * complicates the shutdown process
	 */
	ipath_shutdown_device(dd);

	if (dd->verbs_dev)
		ipath_unregister_ib_device(dd->verbs_dev);