* [PATCH RESEND] USB/host: Cleanup unneccessary irq disable code
@ 2012-09-07 9:19 Chuansheng Liu
2012-09-08 3:26 ` Liu, Chuansheng
2012-09-10 18:08 ` Greg KH
0 siblings, 2 replies; 7+ messages in thread
From: Chuansheng Liu @ 2012-09-07 9:19 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel
Because the IRQF_DISABLED as the flag is now a NOOP and has been
deprecated and in hardirq context the interrupt is disabled.
so in usb/host code:
Removing the usage of flag IRQF_DISABLED;
Removing the calling local_irq save/restore actions in irq
handler usb_hcd_irq();
Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
---
drivers/usb/core/hcd.c | 15 ---------------
drivers/usb/host/ehci-ls1x.c | 2 +-
drivers/usb/host/ohci-xls.c | 2 +-
3 files changed, 2 insertions(+), 17 deletions(-)
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index bc84106..f84ddea 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -2153,15 +2153,8 @@ EXPORT_SYMBOL_GPL(usb_bus_start_enum);
irqreturn_t usb_hcd_irq (int irq, void *__hcd)
{
struct usb_hcd *hcd = __hcd;
- unsigned long flags;
irqreturn_t rc;
- /* IRQF_DISABLED doesn't work correctly with shared IRQs
- * when the first handler doesn't use it. So let's just
- * assume it's never used.
- */
- local_irq_save(flags);
-
if (unlikely(HCD_DEAD(hcd) || !HCD_HW_ACCESSIBLE(hcd)))
rc = IRQ_NONE;
else if (hcd->driver->irq(hcd) == IRQ_NONE)
@@ -2169,7 +2162,6 @@ irqreturn_t usb_hcd_irq (int irq, void *__hcd)
else
rc = IRQ_HANDLED;
- local_irq_restore(flags);
return rc;
}
EXPORT_SYMBOL_GPL(usb_hcd_irq);
@@ -2358,13 +2350,6 @@ static int usb_hcd_request_irqs(struct usb_hcd *hcd,
if (hcd->driver->irq) {
- /* IRQF_DISABLED doesn't work as advertised when used together
- * with IRQF_SHARED. As usb_hcd_irq() will always disable
- * interrupts we can remove it here.
- */
- if (irqflags & IRQF_SHARED)
- irqflags &= ~IRQF_DISABLED;
-
snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d",
hcd->driver->description, hcd->self.busnum);
retval = request_irq(irqnum, &usb_hcd_irq, irqflags,
diff --git a/drivers/usb/host/ehci-ls1x.c b/drivers/usb/host/ehci-ls1x.c
index a283e59..425cb4a 100644
--- a/drivers/usb/host/ehci-ls1x.c
+++ b/drivers/usb/host/ehci-ls1x.c
@@ -119,7 +119,7 @@ static int ehci_hcd_ls1x_probe(struct platform_device *pdev)
goto err_release_region;
}
- ret = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED);
+ ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
if (ret)
goto err_iounmap;
diff --git a/drivers/usb/host/ohci-xls.c b/drivers/usb/host/ohci-xls.c
index 41e378f..84201cd 100644
--- a/drivers/usb/host/ohci-xls.c
+++ b/drivers/usb/host/ohci-xls.c
@@ -56,7 +56,7 @@ static int ohci_xls_probe_internal(const struct hc_driver *driver,
goto err3;
}
- retval = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED);
+ retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
if (retval != 0)
goto err4;
return retval;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* RE: [PATCH RESEND] USB/host: Cleanup unneccessary irq disable code
2012-09-07 9:19 [PATCH RESEND] USB/host: Cleanup unneccessary irq disable code Chuansheng Liu
@ 2012-09-08 3:26 ` Liu, Chuansheng
2012-09-10 18:08 ` Greg KH
1 sibling, 0 replies; 7+ messages in thread
From: Liu, Chuansheng @ 2012-09-08 3:26 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 898 bytes --]
> -----Original Message-----
> From: Liu, Chuansheng
> Sent: Friday, September 07, 2012 5:20 PM
> To: gregkh@linuxfoundation.org
> Cc: linux-kernel@vger.kernel.org
> Subject: [PATCH RESEND] USB/host: Cleanup unneccessary irq disable code
>
> Because the IRQF_DISABLED as the flag is now a NOOP and has been
> deprecated and in hardirq context the interrupt is disabled.
>
> so in usb/host code:
> Removing the usage of flag IRQF_DISABLED;
> Removing the calling local_irq save/restore actions in irq
> handler usb_hcd_irq();
>
> Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
Hi greg,
This new patch is still not OK in a right format to apply? Please let me know, thanks.
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH RESEND] USB/host: Cleanup unneccessary irq disable code
2012-09-07 9:19 [PATCH RESEND] USB/host: Cleanup unneccessary irq disable code Chuansheng Liu
2012-09-08 3:26 ` Liu, Chuansheng
@ 2012-09-10 18:08 ` Greg KH
2012-09-10 23:07 ` Liu, Chuansheng
1 sibling, 1 reply; 7+ messages in thread
From: Greg KH @ 2012-09-10 18:08 UTC (permalink / raw)
To: Chuansheng Liu; +Cc: linux-kernel
On Fri, Sep 07, 2012 at 05:19:59PM +0800, Chuansheng Liu wrote:
> Because the IRQF_DISABLED as the flag is now a NOOP and has been
> deprecated and in hardirq context the interrupt is disabled.
>
> so in usb/host code:
> Removing the usage of flag IRQF_DISABLED;
> Removing the calling local_irq save/restore actions in irq
> handler usb_hcd_irq();
>
> Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
> ---
> drivers/usb/core/hcd.c | 15 ---------------
> drivers/usb/host/ehci-ls1x.c | 2 +-
> drivers/usb/host/ohci-xls.c | 2 +-
> 3 files changed, 2 insertions(+), 17 deletions(-)
This fails to apply to my usb-next branch for some odd reason, please
refresh it and resend.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH RESEND] USB/host: Cleanup unneccessary irq disable code
2012-09-10 18:08 ` Greg KH
@ 2012-09-10 23:07 ` Liu, Chuansheng
0 siblings, 0 replies; 7+ messages in thread
From: Liu, Chuansheng @ 2012-09-10 23:07 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel
> > Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
> > Acked-by: Alan Stern <stern@rowland.harvard.edu>
> > ---
> > drivers/usb/core/hcd.c | 15 ---------------
> > drivers/usb/host/ehci-ls1x.c | 2 +-
> > drivers/usb/host/ohci-xls.c | 2 +-
> > 3 files changed, 2 insertions(+), 17 deletions(-)
>
> This fails to apply to my usb-next branch for some odd reason, please
> refresh it and resend.
>
> thanks,
>
> greg k-h
Has resent, refresh the code base and sent with evolution client, wish it is OK, thanks.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH RESEND] USB/host: Cleanup unneccessary irq disable code
@ 2012-09-11 8:00 Chuansheng Liu
0 siblings, 0 replies; 7+ messages in thread
From: Chuansheng Liu @ 2012-09-11 8:00 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, chuansheng.liu
Because the IRQF_DISABLED as the flag is now a NOOP and has been
deprecated and in hardirq context the interrupt is disabled.
so in usb/host code:
Removing the usage of flag IRQF_DISABLED;
Removing the calling local_irq save/restore actions in irq
handler usb_hcd_irq();
Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
---
drivers/usb/core/hcd.c | 16 ----------------
drivers/usb/host/ehci-ls1x.c | 2 +-
drivers/usb/host/ohci-xls.c | 2 +-
3 files changed, 2 insertions(+), 18 deletions(-)
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index bc84106..d456c10 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -2153,15 +2153,8 @@ EXPORT_SYMBOL_GPL(usb_bus_start_enum);
irqreturn_t usb_hcd_irq (int irq, void *__hcd)
{
struct usb_hcd *hcd = __hcd;
- unsigned long flags;
irqreturn_t rc;
- /* IRQF_DISABLED doesn't work correctly with shared IRQs
- * when the first handler doesn't use it. So let's just
- * assume it's never used.
- */
- local_irq_save(flags);
-
if (unlikely(HCD_DEAD(hcd) || !HCD_HW_ACCESSIBLE(hcd)))
rc = IRQ_NONE;
else if (hcd->driver->irq(hcd) == IRQ_NONE)
@@ -2169,7 +2162,6 @@ irqreturn_t usb_hcd_irq (int irq, void *__hcd)
else
rc = IRQ_HANDLED;
- local_irq_restore(flags);
return rc;
}
EXPORT_SYMBOL_GPL(usb_hcd_irq);
@@ -2357,14 +2349,6 @@ static int usb_hcd_request_irqs(struct usb_hcd *hcd,
int retval;
if (hcd->driver->irq) {
-
- /* IRQF_DISABLED doesn't work as advertised when used together
- * with IRQF_SHARED. As usb_hcd_irq() will always disable
- * interrupts we can remove it here.
- */
- if (irqflags & IRQF_SHARED)
- irqflags &= ~IRQF_DISABLED;
-
snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d",
hcd->driver->description, hcd->self.busnum);
retval = request_irq(irqnum, &usb_hcd_irq, irqflags,
diff --git a/drivers/usb/host/ehci-ls1x.c b/drivers/usb/host/ehci-ls1x.c
index a283e59..425cb4a 100644
--- a/drivers/usb/host/ehci-ls1x.c
+++ b/drivers/usb/host/ehci-ls1x.c
@@ -119,7 +119,7 @@ static int ehci_hcd_ls1x_probe(struct platform_device *pdev)
goto err_release_region;
}
- ret = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED);
+ ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
if (ret)
goto err_iounmap;
diff --git a/drivers/usb/host/ohci-xls.c b/drivers/usb/host/ohci-xls.c
index 41e378f..84201cd 100644
--- a/drivers/usb/host/ohci-xls.c
+++ b/drivers/usb/host/ohci-xls.c
@@ -56,7 +56,7 @@ static int ohci_xls_probe_internal(const struct hc_driver *driver,
goto err3;
}
- retval = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED);
+ retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
if (retval != 0)
goto err4;
return retval;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH RESEND] USB/host: Cleanup unneccessary irq disable code
2012-09-06 2:00 Liu, Chuansheng
@ 2012-09-06 16:36 ` gregkh
0 siblings, 0 replies; 7+ messages in thread
From: gregkh @ 2012-09-06 16:36 UTC (permalink / raw)
To: Liu, Chuansheng; +Cc: linux-kernel, linux-usb, stern
On Thu, Sep 06, 2012 at 02:00:16AM +0000, Liu, Chuansheng wrote:
> Because the IRQF_DISABLED as the flag is now a NOOP and has been
> deprecated and in hardirq context the interrupt is disabled.
>
> so in usb/host code:
> Removing the usage of flag IRQF_DISABLED;
> Removing the calling local_irq save/restore actions in irq
> handler usb_hcd_irq();
>
> Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
> ---
> drivers/usb/core/hcd.c | 15 ---------------
> drivers/usb/host/ehci-ls1x.c | 2 +-
> drivers/usb/host/ohci-xls.c | 2 +-
> 3 files changed, 2 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
> index bc84106..f84ddea 100644
> --- a/drivers/usb/core/hcd.c
> +++ b/drivers/usb/core/hcd.c
> @@ -2153,15 +2153,8 @@ EXPORT_SYMBOL_GPL(usb_bus_start_enum);
> irqreturn_t usb_hcd_irq (int irq, void *__hcd)
> {
> struct usb_hcd *hcd = __hcd;
> - unsigned long flags;
> irqreturn_t rc;
All of your whitespace is broken, making this patch impossible to apply.
As I asked before, please fix this.
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH RESEND] USB/host: Cleanup unneccessary irq disable code
@ 2012-09-06 2:00 Liu, Chuansheng
2012-09-06 16:36 ` gregkh
0 siblings, 1 reply; 7+ messages in thread
From: Liu, Chuansheng @ 2012-09-06 2:00 UTC (permalink / raw)
To: gregkh; +Cc: linux-kernel, linux-usb, stern
Because the IRQF_DISABLED as the flag is now a NOOP and has been
deprecated and in hardirq context the interrupt is disabled.
so in usb/host code:
Removing the usage of flag IRQF_DISABLED;
Removing the calling local_irq save/restore actions in irq
handler usb_hcd_irq();
Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
---
drivers/usb/core/hcd.c | 15 ---------------
drivers/usb/host/ehci-ls1x.c | 2 +-
drivers/usb/host/ohci-xls.c | 2 +-
3 files changed, 2 insertions(+), 17 deletions(-)
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index bc84106..f84ddea 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -2153,15 +2153,8 @@ EXPORT_SYMBOL_GPL(usb_bus_start_enum);
irqreturn_t usb_hcd_irq (int irq, void *__hcd)
{
struct usb_hcd *hcd = __hcd;
- unsigned long flags;
irqreturn_t rc;
- /* IRQF_DISABLED doesn't work correctly with shared IRQs
- * when the first handler doesn't use it. So let's just
- * assume it's never used.
- */
- local_irq_save(flags);
-
if (unlikely(HCD_DEAD(hcd) || !HCD_HW_ACCESSIBLE(hcd)))
rc = IRQ_NONE;
else if (hcd->driver->irq(hcd) == IRQ_NONE)
@@ -2169,7 +2162,6 @@ irqreturn_t usb_hcd_irq (int irq, void *__hcd)
else
rc = IRQ_HANDLED;
- local_irq_restore(flags);
return rc;
}
EXPORT_SYMBOL_GPL(usb_hcd_irq);
@@ -2358,13 +2350,6 @@ static int usb_hcd_request_irqs(struct usb_hcd *hcd,
if (hcd->driver->irq) {
- /* IRQF_DISABLED doesn't work as advertised when used together
- * with IRQF_SHARED. As usb_hcd_irq() will always disable
- * interrupts we can remove it here.
- */
- if (irqflags & IRQF_SHARED)
- irqflags &= ~IRQF_DISABLED;
-
snprintf(hcd->irq_descr, sizeof(hcd->irq_descr), "%s:usb%d",
hcd->driver->description, hcd->self.busnum);
retval = request_irq(irqnum, &usb_hcd_irq, irqflags,
diff --git a/drivers/usb/host/ehci-ls1x.c b/drivers/usb/host/ehci-ls1x.c
index a283e59..425cb4a 100644
--- a/drivers/usb/host/ehci-ls1x.c
+++ b/drivers/usb/host/ehci-ls1x.c
@@ -119,7 +119,7 @@ static int ehci_hcd_ls1x_probe(struct platform_device *pdev)
goto err_release_region;
}
- ret = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED);
+ ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
if (ret)
goto err_iounmap;
diff --git a/drivers/usb/host/ohci-xls.c b/drivers/usb/host/ohci-xls.c
index 41e378f..84201cd 100644
--- a/drivers/usb/host/ohci-xls.c
+++ b/drivers/usb/host/ohci-xls.c
@@ -56,7 +56,7 @@ static int ohci_xls_probe_internal(const struct hc_driver *driver,
goto err3;
}
- retval = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED);
+ retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
if (retval != 0)
goto err4;
return retval;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-09-10 23:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-07 9:19 [PATCH RESEND] USB/host: Cleanup unneccessary irq disable code Chuansheng Liu
2012-09-08 3:26 ` Liu, Chuansheng
2012-09-10 18:08 ` Greg KH
2012-09-10 23:07 ` Liu, Chuansheng
-- strict thread matches above, loose matches on Subject: below --
2012-09-11 8:00 Chuansheng Liu
2012-09-06 2:00 Liu, Chuansheng
2012-09-06 16:36 ` gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).