Re: [RFC/PATCH] usb: host: xhci: don't re-enable IE constantly

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

 



On Thu, Mar 15, 2012 at 04:37:08PM +0200, Felipe Balbi wrote:
> while at that, define IMAN bitfield to aid
> readability.
> 
> Signed-off-by: Felipe Balbi <balbi@xxxxxx>
> ---
> 
> Sarah, was there any reason to always enable IMAN_IP and IMAN_IE when Acking
> the IRQ?

I can't remember if there was a reason.  Perhaps some host controllers
don't actually set the interrupt enabled bit when we originally write
it?  I think this was just a typo though.

> I'm concerned if this couldn't goof up some xHCI implementations, though I
> haven't seend that happen.

Which hosts have you tested on?  I'll test on the ones I have and see if
it causes any issues.

Sarah Sharp

>  drivers/usb/host/xhci-ring.c |    2 +-
>  drivers/usb/host/xhci.h      |    4 ++++
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
> index b62037b..6851bc2 100644
> --- a/drivers/usb/host/xhci-ring.c
> +++ b/drivers/usb/host/xhci-ring.c
> @@ -2350,7 +2350,7 @@ hw_died:
>  		u32 irq_pending;
>  		/* Acknowledge the PCI interrupt */
>  		irq_pending = xhci_readl(xhci, &xhci->ir_set->irq_pending);
> -		irq_pending |= 0x3;
> +		irq_pending |= IMAN_IP;
>  		xhci_writel(xhci, irq_pending, &xhci->ir_set->irq_pending);
>  	}
>  
> diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
> index fb99c83..a947d70 100644
> --- a/drivers/usb/host/xhci.h
> +++ b/drivers/usb/host/xhci.h
> @@ -205,6 +205,10 @@ struct xhci_op_regs {
>  #define CMD_PM_INDEX	(1 << 11)
>  /* bits 12:31 are reserved (and should be preserved on writes). */
>  
> +/* IMAN - Interrupt Management Register */
> +#define IMAN_IP		(1 << 1)
> +#define IMAN_IE		(1 << 0)
> +
>  /* USBSTS - USB status - status bitmasks */
>  /* HC not running - set to 1 when run/stop bit is cleared. */
>  #define STS_HALT	XHCI_STS_HALT
> -- 
> 1.7.9.2
> 
--
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