RE: [PATCH] USB/host: Cleanup unneccessary irq disable code

2012-09-05 Thread Liu, Chuansheng
> > From: liu chuansheng 
> > Subject: [PATCH] USB/host: Cleanup unneccessary irq disable code
> 
> Why is this in the patch?
> 
> Please resend it in a format that I do not have to manually edit the patch.
> 
> greg k-h
Thanks your teaching, resend again.


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 
---
 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, _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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] USB/host: Cleanup unneccessary irq disable code

2012-09-05 Thread gre...@linuxfoundation.org
On Thu, Sep 06, 2012 at 12:39:09AM +, Liu, Chuansheng wrote:
> > This patch is corrupted and can not be applied at all.  Please fix your 
> > email
> > client and try again.
> > 
> > greg k-h
> 
> I am very sorry to waste your time, resend it again.
> 
> From: liu chuansheng 
> Subject: [PATCH] USB/host: Cleanup unneccessary irq disable code

Why is this in the patch?

Please resend it in a format that I do not have to manually edit the
patch.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH] USB/host: Cleanup unneccessary irq disable code

2012-09-05 Thread Liu, Chuansheng
> This patch is corrupted and can not be applied at all.  Please fix your email
> client and try again.
> 
> greg k-h

I am very sorry to waste your time, resend it again.

From: liu chuansheng 
Subject: [PATCH] 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 
---
 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, _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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] USB/host: Cleanup unneccessary irq disable code

2012-09-05 Thread gre...@linuxfoundation.org
On Sat, Sep 01, 2012 at 09:39:56AM +, Liu, Chuansheng wrote:
> From: liu chuansheng 
> Subject: [PATCH] USB/host: Cleanup unneccessary irq disable code

Don't include the Subject: in the patch body again, that is pointless
and requires me to hand-edit the file.

> 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 

This patch is corrupted and can not be applied at all.  Please fix your
email client and try again.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] USB/host: Cleanup unneccessary irq disable code

2012-09-05 Thread gre...@linuxfoundation.org
On Sat, Sep 01, 2012 at 09:39:56AM +, Liu, Chuansheng wrote:
 From: liu chuansheng chuansheng@intel.com
 Subject: [PATCH] USB/host: Cleanup unneccessary irq disable code

Don't include the Subject: in the patch body again, that is pointless
and requires me to hand-edit the file.

 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@intel.com

This patch is corrupted and can not be applied at all.  Please fix your
email client and try again.

greg k-h
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH] USB/host: Cleanup unneccessary irq disable code

2012-09-05 Thread Liu, Chuansheng
 This patch is corrupted and can not be applied at all.  Please fix your email
 client and try again.
 
 greg k-h

I am very sorry to waste your time, resend it again.

From: liu chuansheng chuansheng@intel.com
Subject: [PATCH] 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@intel.com
---
 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
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] USB/host: Cleanup unneccessary irq disable code

2012-09-05 Thread gre...@linuxfoundation.org
On Thu, Sep 06, 2012 at 12:39:09AM +, Liu, Chuansheng wrote:
  This patch is corrupted and can not be applied at all.  Please fix your 
  email
  client and try again.
  
  greg k-h
 
 I am very sorry to waste your time, resend it again.
 
 From: liu chuansheng chuansheng@intel.com
 Subject: [PATCH] USB/host: Cleanup unneccessary irq disable code

Why is this in the patch?

Please resend it in a format that I do not have to manually edit the
patch.

greg k-h
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: [PATCH] USB/host: Cleanup unneccessary irq disable code

2012-09-05 Thread Liu, Chuansheng
  From: liu chuansheng chuansheng@intel.com
  Subject: [PATCH] USB/host: Cleanup unneccessary irq disable code
 
 Why is this in the patch?
 
 Please resend it in a format that I do not have to manually edit the patch.
 
 greg k-h
Thanks your teaching, resend again.


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@intel.com
---
 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
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] USB/host: Cleanup unneccessary irq disable code

2012-09-04 Thread Alan Stern
On Sat, 1 Sep 2012, Liu, Chuansheng wrote:

> From: liu chuansheng 
> Subject: [PATCH] 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 

Acked-by: Alan Stern 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] USB/host: Cleanup unneccessary irq disable code

2012-09-04 Thread Alan Stern
On Sat, 1 Sep 2012, Liu, Chuansheng wrote:

 From: liu chuansheng chuansheng@intel.com
 Subject: [PATCH] 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@intel.com

Acked-by: Alan Stern st...@rowland.harvard.edu

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] USB/host: Cleanup unneccessary irq disable code

2012-09-01 Thread Liu, Chuansheng
From: liu chuansheng 
Subject: [PATCH] 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 
---
 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, _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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] USB/host: Cleanup unneccessary irq disable code

2012-09-01 Thread Liu, Chuansheng
From: liu chuansheng chuansheng@intel.com
Subject: [PATCH] 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@intel.com
---
 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

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/