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

Commit 2d61bde7 authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman
Browse files

[PATCH] USB: net2280: add a shutdown routine



The net2280 board has an annoying habit of surviving soft reboots with
interrupts enabled.  This patch (as674) adds a shutdown routine to the
driver so that the board can be put in a quiescent state.

Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b383539e
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -2966,6 +2966,22 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id)
	return retval;
}

/* make sure the board is quiescent; otherwise it will continue
 * generating IRQs across the upcoming reboot.
 */

static void net2280_shutdown (struct pci_dev *pdev)
{
	struct net2280		*dev = pci_get_drvdata (pdev);

	/* disable IRQs */
	writel (0, &dev->regs->pciirqenb0);
	writel (0, &dev->regs->pciirqenb1);

	/* disable the pullup so the host will think we're gone */
	writel (0, &dev->usb->usbctl);
}


/*-------------------------------------------------------------------------*/

@@ -2995,6 +3011,7 @@ static struct pci_driver net2280_pci_driver = {

	.probe =	net2280_probe,
	.remove =	net2280_remove,
	.shutdown =	net2280_shutdown,

	/* FIXME add power management support */
};