Re: [PATCH] ehci-hcd: Disable memory-write-invalidate when the driver is removed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 28 Dec 2015, Jia-Ju Bai wrote:

-ENOCHANGELOG

Why do you want to disable MWI in the first place?

And why disable it here?  Shouldn't it be disabled in the same source 
file that enabled it originally?

(Actually in this case that's not possible.  It might be better to move 
the code that enables MWI to usb_hcd_pci_probe() and then disable it in 
usb_hcd_pci_remove(), if that's really necessary.)

> Signed-off-by: Jia-Ju Bai <baijiaju1990@xxxxxxx>
> ---
>  drivers/usb/host/ehci-hcd.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
> index 48c92bf..c02ec42 100644
> --- a/drivers/usb/host/ehci-hcd.c
> +++ b/drivers/usb/host/ehci-hcd.c
> @@ -422,6 +422,7 @@ static void ehci_work (struct ehci_hcd *ehci)
>  static void ehci_stop (struct usb_hcd *hcd)
>  {
>  	struct ehci_hcd		*ehci = hcd_to_ehci (hcd);
> +	struct pci_dev      *pdev = to_pci_dev(hcd->self.controller);

This isn't going to work very well on systems where the EHCI conroller 
isn't a PCI device.

>  	ehci_dbg (ehci, "stop\n");
>  
> @@ -444,6 +445,7 @@ static void ehci_stop (struct usb_hcd *hcd)
>  	end_free_itds(ehci);
>  	spin_unlock_irq (&ehci->lock);
>  	ehci_mem_cleanup (ehci);
> +	pci_clear_mwi(pdev);
>  
>  	if (ehci->amd_pll_fix == 1)
>  		usb_amd_dev_put();

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux