lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 15 Mar 2012 06:21:34 +0000
From:	"Xu, Andiry" <Andiry.Xu@....com>
To:	Alex Shi <alex.shi@...el.com>,
	"stern@...land.harvard.edu" <stern@...land.harvard.edu>,
	gregkh <gregkh@...uxfoundation.org>
CC:	"sarah.a.sharp@...ux.intel.com" <sarah.a.sharp@...ux.intel.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-usb <linux-usb@...r.kernel.org>
Subject: RE: [PATCH] usb/core: skip unnecessary line IRQ request for USB3

> -----Original Message-----
> From: linux-usb-owner@...r.kernel.org [mailto:linux-usb-
> owner@...r.kernel.org] On Behalf Of Alex Shi
> Sent: Thursday, March 15, 2012 12:48 PM
> To: stern@...land.harvard.edu; gregkh
> Cc: sarah.a.sharp@...ux.intel.com; linux-kernel@...r.kernel.org; linux-usb
> Subject: [PATCH] usb/core: skip unnecessary line IRQ request for USB3
> 
> 
> USB3 requests line IRQ here but will disable it
> in later driver->start function and try MSI first.
> 

You may also remove the unregister the legacy interrupt part in
xhci_try_enable_msi().

In fact, I think all the MSI related codes should be moved to xhci-pci.c,
Since MSI is PCI-only.

Thanks,
Andiry

> xhci_hcd 0000:02:00.0: irq 18, io mem 0xfe500000
> xhci_hcd 0000:02:00.0: irq 45 for MSI/MSI-X
> xhci_hcd 0000:02:00.0: irq 46 for MSI/MSI-X
> 
> So it is better to remove the redundant request here. And
> save a little time in booting.
> 
> Signed-off-by: Alex Shi <alex.shi@...el.com>
> ---
>  drivers/usb/core/hcd.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
> index e128232..5b09825 100644
> --- a/drivers/usb/core/hcd.c
> +++ b/drivers/usb/core/hcd.c
> @@ -2450,7 +2450,8 @@ int usb_add_hcd(struct usb_hcd *hcd,
>  	/* enable irqs just before we start the controller,
>  	 * if the BIOS provides legacy PCI irqs.
>  	 */
> -	if (usb_hcd_is_primary_hcd(hcd) && irqnum) {
> +	if (usb_hcd_is_primary_hcd(hcd) && irqnum
> +		&& (hcd->driver->flags & HCD_MASK) != HCD_USB3) {
>  		retval = usb_hcd_request_irqs(hcd, irqnum, irqflags);
>  		if (retval)
>  			goto err_request_irq;
> --
> 1.7.5.1
> 
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ