Re: [PATCH v2] usb/isp1760: set IRQ flags properly

2015-03-04 Thread Valentin Rothberg
Andrew Morton asked me to prepare a big patch that removes
IRQF_DISABLED entirely (see https://lkml.org/lkml/2015/3/2/819).  It
seems a good way to get rid of the few references and the definition
at once.

So please don't apply this patch.  After, I can prepare another patch
later that takes care of the redundant setting of IRQF_SHARED for
isp1760_udc_register().

Kind regards,
 Valentin

On Mon, Mar 2, 2015 at 4:30 PM,   wrote:
> Hi Valentin,
>
> Thank  you for the patch.
>
> On Sun Mar 01 2015 17:54:32 GMT+0200 (EET), Valentin Rothberg wrote:
>> The IRQF_DISABLED is a NOOP and scheduled to be removed.  According to
>> commit e58aa3d2d0cc ("genirq: Run irq handlers with interrupts
>> disabled") running IRQ handlers with interrupts enabled can cause stack
>> overflows when the interrupt line of the issuing device is still active.
>>
>> This patch removes using this deprecated flag and additionally removes
>> redundantly setting IRQF_SHARED for isp1760_udc_register().
>>
>> Signed-off-by: Valentin Rothberg 
>
> Acked-by: Laurent Pinchart 
>
>> ---
>> v2: Reverted change that removed IRQF_SHARED in the call of
>> isp1760_hcd_register().
>> ---
>>  drivers/usb/isp1760/isp1760-core.c | 3 +--
>>  drivers/usb/isp1760/isp1760-udc.c  | 4 ++--
>>  2 files changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/usb/isp1760/isp1760-core.c 
>> b/drivers/usb/isp1760/isp1760-core.c
>> index b982755..bfa402c 100644
>> --- a/drivers/usb/isp1760/isp1760-core.c
>> +++ b/drivers/usb/isp1760/isp1760-core.c
>> @@ -151,8 +151,7 @@ int isp1760_register(struct resource *mem, int irq, 
>> unsigned long irqflags,
>>   }
>>
>>   if (IS_ENABLED(CONFIG_USB_ISP1761_UDC) && !udc_disabled) {
>> - ret = isp1760_udc_register(isp, irq, irqflags | IRQF_SHARED |
>> -IRQF_DISABLED);
>> + ret = isp1760_udc_register(isp, irq, irqflags);
>>   if (ret < 0) {
>>   isp1760_hcd_unregister(>hcd);
>>   return ret;
>> diff --git a/drivers/usb/isp1760/isp1760-udc.c 
>> b/drivers/usb/isp1760/isp1760-udc.c
>> index 9612d79..0b46ff0 100644
>> --- a/drivers/usb/isp1760/isp1760-udc.c
>> +++ b/drivers/usb/isp1760/isp1760-udc.c
>> @@ -1451,8 +1451,8 @@ int isp1760_udc_register(struct isp1760_device *isp, 
>> int irq,
>>
>>   sprintf(udc->irqname, "%s (udc)", devname);
>>
>> - ret = request_irq(irq, isp1760_udc_irq, IRQF_SHARED | IRQF_DISABLED |
>> -   irqflags, udc->irqname, udc);
>> + ret = request_irq(irq, isp1760_udc_irq, IRQF_SHARED | irqflags,
>> +   udc->irqname, udc);
>>   if (ret < 0)
>>   goto error;
>>
>> --
>> 1.9.1
>>
>>
--
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 v2] usb/isp1760: set IRQ flags properly

2015-03-04 Thread Valentin Rothberg
Andrew Morton asked me to prepare a big patch that removes
IRQF_DISABLED entirely (see https://lkml.org/lkml/2015/3/2/819).  It
seems a good way to get rid of the few references and the definition
at once.

So please don't apply this patch.  After, I can prepare another patch
later that takes care of the redundant setting of IRQF_SHARED for
isp1760_udc_register().

Kind regards,
 Valentin

On Mon, Mar 2, 2015 at 4:30 PM,  laurent.pinch...@ideasonboard.com wrote:
 Hi Valentin,

 Thank  you for the patch.

 On Sun Mar 01 2015 17:54:32 GMT+0200 (EET), Valentin Rothberg wrote:
 The IRQF_DISABLED is a NOOP and scheduled to be removed.  According to
 commit e58aa3d2d0cc (genirq: Run irq handlers with interrupts
 disabled) running IRQ handlers with interrupts enabled can cause stack
 overflows when the interrupt line of the issuing device is still active.

 This patch removes using this deprecated flag and additionally removes
 redundantly setting IRQF_SHARED for isp1760_udc_register().

 Signed-off-by: Valentin Rothberg valentin.rothb...@lip6.fr

 Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com

 ---
 v2: Reverted change that removed IRQF_SHARED in the call of
 isp1760_hcd_register().
 ---
  drivers/usb/isp1760/isp1760-core.c | 3 +--
  drivers/usb/isp1760/isp1760-udc.c  | 4 ++--
  2 files changed, 3 insertions(+), 4 deletions(-)

 diff --git a/drivers/usb/isp1760/isp1760-core.c 
 b/drivers/usb/isp1760/isp1760-core.c
 index b982755..bfa402c 100644
 --- a/drivers/usb/isp1760/isp1760-core.c
 +++ b/drivers/usb/isp1760/isp1760-core.c
 @@ -151,8 +151,7 @@ int isp1760_register(struct resource *mem, int irq, 
 unsigned long irqflags,
   }

   if (IS_ENABLED(CONFIG_USB_ISP1761_UDC)  !udc_disabled) {
 - ret = isp1760_udc_register(isp, irq, irqflags | IRQF_SHARED |
 -IRQF_DISABLED);
 + ret = isp1760_udc_register(isp, irq, irqflags);
   if (ret  0) {
   isp1760_hcd_unregister(isp-hcd);
   return ret;
 diff --git a/drivers/usb/isp1760/isp1760-udc.c 
 b/drivers/usb/isp1760/isp1760-udc.c
 index 9612d79..0b46ff0 100644
 --- a/drivers/usb/isp1760/isp1760-udc.c
 +++ b/drivers/usb/isp1760/isp1760-udc.c
 @@ -1451,8 +1451,8 @@ int isp1760_udc_register(struct isp1760_device *isp, 
 int irq,

   sprintf(udc-irqname, %s (udc), devname);

 - ret = request_irq(irq, isp1760_udc_irq, IRQF_SHARED | IRQF_DISABLED |
 -   irqflags, udc-irqname, udc);
 + ret = request_irq(irq, isp1760_udc_irq, IRQF_SHARED | irqflags,
 +   udc-irqname, udc);
   if (ret  0)
   goto error;

 --
 1.9.1


--
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 v2] usb/isp1760: set IRQ flags properly

2015-03-02 Thread laurent . pinchart
Hi Valentin,

Thank  you for the patch.

On Sun Mar 01 2015 17:54:32 GMT+0200 (EET), Valentin Rothberg wrote:
> The IRQF_DISABLED is a NOOP and scheduled to be removed.  According to
> commit e58aa3d2d0cc ("genirq: Run irq handlers with interrupts
> disabled") running IRQ handlers with interrupts enabled can cause stack
> overflows when the interrupt line of the issuing device is still active.
> 
> This patch removes using this deprecated flag and additionally removes
> redundantly setting IRQF_SHARED for isp1760_udc_register().
> 
> Signed-off-by: Valentin Rothberg 

Acked-by: Laurent Pinchart 

> ---
> v2: Reverted change that removed IRQF_SHARED in the call of
> isp1760_hcd_register().
> ---
>  drivers/usb/isp1760/isp1760-core.c | 3 +--
>  drivers/usb/isp1760/isp1760-udc.c  | 4 ++--
>  2 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/usb/isp1760/isp1760-core.c 
> b/drivers/usb/isp1760/isp1760-core.c
> index b982755..bfa402c 100644
> --- a/drivers/usb/isp1760/isp1760-core.c
> +++ b/drivers/usb/isp1760/isp1760-core.c
> @@ -151,8 +151,7 @@ int isp1760_register(struct resource *mem, int irq, 
> unsigned long irqflags,
>   }
>  
>   if (IS_ENABLED(CONFIG_USB_ISP1761_UDC) && !udc_disabled) {
> - ret = isp1760_udc_register(isp, irq, irqflags | IRQF_SHARED |
> -IRQF_DISABLED);
> + ret = isp1760_udc_register(isp, irq, irqflags);
>   if (ret < 0) {
>   isp1760_hcd_unregister(>hcd);
>   return ret;
> diff --git a/drivers/usb/isp1760/isp1760-udc.c 
> b/drivers/usb/isp1760/isp1760-udc.c
> index 9612d79..0b46ff0 100644
> --- a/drivers/usb/isp1760/isp1760-udc.c
> +++ b/drivers/usb/isp1760/isp1760-udc.c
> @@ -1451,8 +1451,8 @@ int isp1760_udc_register(struct isp1760_device *isp, 
> int irq,
>  
>   sprintf(udc->irqname, "%s (udc)", devname);
>  
> - ret = request_irq(irq, isp1760_udc_irq, IRQF_SHARED | IRQF_DISABLED |
> -   irqflags, udc->irqname, udc);
> + ret = request_irq(irq, isp1760_udc_irq, IRQF_SHARED | irqflags,
> +   udc->irqname, udc);
>   if (ret < 0)
>   goto error;
>  
> -- 
> 1.9.1
> 
>N�r��yb�X��ǧv�^�)޺{.n�+{zX����ܨ}���Ơz�:+v���zZ+��+zf���h���~i���z��w���?�&�)ߢf��^jǫy�m��@A�a���
>0��h���i

Re: [PATCH v2] usb/isp1760: set IRQ flags properly

2015-03-02 Thread laurent . pinchart
Hi Valentin,

Thank  you for the patch.

On Sun Mar 01 2015 17:54:32 GMT+0200 (EET), Valentin Rothberg wrote:
 The IRQF_DISABLED is a NOOP and scheduled to be removed.  According to
 commit e58aa3d2d0cc (genirq: Run irq handlers with interrupts
 disabled) running IRQ handlers with interrupts enabled can cause stack
 overflows when the interrupt line of the issuing device is still active.
 
 This patch removes using this deprecated flag and additionally removes
 redundantly setting IRQF_SHARED for isp1760_udc_register().
 
 Signed-off-by: Valentin Rothberg valentin.rothb...@lip6.fr

Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com

 ---
 v2: Reverted change that removed IRQF_SHARED in the call of
 isp1760_hcd_register().
 ---
  drivers/usb/isp1760/isp1760-core.c | 3 +--
  drivers/usb/isp1760/isp1760-udc.c  | 4 ++--
  2 files changed, 3 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/usb/isp1760/isp1760-core.c 
 b/drivers/usb/isp1760/isp1760-core.c
 index b982755..bfa402c 100644
 --- a/drivers/usb/isp1760/isp1760-core.c
 +++ b/drivers/usb/isp1760/isp1760-core.c
 @@ -151,8 +151,7 @@ int isp1760_register(struct resource *mem, int irq, 
 unsigned long irqflags,
   }
  
   if (IS_ENABLED(CONFIG_USB_ISP1761_UDC)  !udc_disabled) {
 - ret = isp1760_udc_register(isp, irq, irqflags | IRQF_SHARED |
 -IRQF_DISABLED);
 + ret = isp1760_udc_register(isp, irq, irqflags);
   if (ret  0) {
   isp1760_hcd_unregister(isp-hcd);
   return ret;
 diff --git a/drivers/usb/isp1760/isp1760-udc.c 
 b/drivers/usb/isp1760/isp1760-udc.c
 index 9612d79..0b46ff0 100644
 --- a/drivers/usb/isp1760/isp1760-udc.c
 +++ b/drivers/usb/isp1760/isp1760-udc.c
 @@ -1451,8 +1451,8 @@ int isp1760_udc_register(struct isp1760_device *isp, 
 int irq,
  
   sprintf(udc-irqname, %s (udc), devname);
  
 - ret = request_irq(irq, isp1760_udc_irq, IRQF_SHARED | IRQF_DISABLED |
 -   irqflags, udc-irqname, udc);
 + ret = request_irq(irq, isp1760_udc_irq, IRQF_SHARED | irqflags,
 +   udc-irqname, udc);
   if (ret  0)
   goto error;
  
 -- 
 1.9.1
 
N�r��yb�X��ǧv�^�)޺{.n�+{zX����ܨ}���Ơz�j:+v���zZ+��+zf���h���~i���z��w���?��)ߢf��^jǫy�m��@A�a���
0��h���i

[PATCH v2] usb/isp1760: set IRQ flags properly

2015-03-01 Thread Valentin Rothberg
The IRQF_DISABLED is a NOOP and scheduled to be removed.  According to
commit e58aa3d2d0cc ("genirq: Run irq handlers with interrupts
disabled") running IRQ handlers with interrupts enabled can cause stack
overflows when the interrupt line of the issuing device is still active.

This patch removes using this deprecated flag and additionally removes
redundantly setting IRQF_SHARED for isp1760_udc_register().

Signed-off-by: Valentin Rothberg 
---
v2: Reverted change that removed IRQF_SHARED in the call of
isp1760_hcd_register().
---
 drivers/usb/isp1760/isp1760-core.c | 3 +--
 drivers/usb/isp1760/isp1760-udc.c  | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/isp1760/isp1760-core.c 
b/drivers/usb/isp1760/isp1760-core.c
index b982755..bfa402c 100644
--- a/drivers/usb/isp1760/isp1760-core.c
+++ b/drivers/usb/isp1760/isp1760-core.c
@@ -151,8 +151,7 @@ int isp1760_register(struct resource *mem, int irq, 
unsigned long irqflags,
}
 
if (IS_ENABLED(CONFIG_USB_ISP1761_UDC) && !udc_disabled) {
-   ret = isp1760_udc_register(isp, irq, irqflags | IRQF_SHARED |
-  IRQF_DISABLED);
+   ret = isp1760_udc_register(isp, irq, irqflags);
if (ret < 0) {
isp1760_hcd_unregister(>hcd);
return ret;
diff --git a/drivers/usb/isp1760/isp1760-udc.c 
b/drivers/usb/isp1760/isp1760-udc.c
index 9612d79..0b46ff0 100644
--- a/drivers/usb/isp1760/isp1760-udc.c
+++ b/drivers/usb/isp1760/isp1760-udc.c
@@ -1451,8 +1451,8 @@ int isp1760_udc_register(struct isp1760_device *isp, int 
irq,
 
sprintf(udc->irqname, "%s (udc)", devname);
 
-   ret = request_irq(irq, isp1760_udc_irq, IRQF_SHARED | IRQF_DISABLED |
- irqflags, udc->irqname, udc);
+   ret = request_irq(irq, isp1760_udc_irq, IRQF_SHARED | irqflags,
+ udc->irqname, udc);
if (ret < 0)
goto error;
 
-- 
1.9.1

--
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 v2] usb/isp1760: set IRQ flags properly

2015-03-01 Thread Valentin Rothberg
The IRQF_DISABLED is a NOOP and scheduled to be removed.  According to
commit e58aa3d2d0cc (genirq: Run irq handlers with interrupts
disabled) running IRQ handlers with interrupts enabled can cause stack
overflows when the interrupt line of the issuing device is still active.

This patch removes using this deprecated flag and additionally removes
redundantly setting IRQF_SHARED for isp1760_udc_register().

Signed-off-by: Valentin Rothberg valentin.rothb...@lip6.fr
---
v2: Reverted change that removed IRQF_SHARED in the call of
isp1760_hcd_register().
---
 drivers/usb/isp1760/isp1760-core.c | 3 +--
 drivers/usb/isp1760/isp1760-udc.c  | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/isp1760/isp1760-core.c 
b/drivers/usb/isp1760/isp1760-core.c
index b982755..bfa402c 100644
--- a/drivers/usb/isp1760/isp1760-core.c
+++ b/drivers/usb/isp1760/isp1760-core.c
@@ -151,8 +151,7 @@ int isp1760_register(struct resource *mem, int irq, 
unsigned long irqflags,
}
 
if (IS_ENABLED(CONFIG_USB_ISP1761_UDC)  !udc_disabled) {
-   ret = isp1760_udc_register(isp, irq, irqflags | IRQF_SHARED |
-  IRQF_DISABLED);
+   ret = isp1760_udc_register(isp, irq, irqflags);
if (ret  0) {
isp1760_hcd_unregister(isp-hcd);
return ret;
diff --git a/drivers/usb/isp1760/isp1760-udc.c 
b/drivers/usb/isp1760/isp1760-udc.c
index 9612d79..0b46ff0 100644
--- a/drivers/usb/isp1760/isp1760-udc.c
+++ b/drivers/usb/isp1760/isp1760-udc.c
@@ -1451,8 +1451,8 @@ int isp1760_udc_register(struct isp1760_device *isp, int 
irq,
 
sprintf(udc-irqname, %s (udc), devname);
 
-   ret = request_irq(irq, isp1760_udc_irq, IRQF_SHARED | IRQF_DISABLED |
- irqflags, udc-irqname, udc);
+   ret = request_irq(irq, isp1760_udc_irq, IRQF_SHARED | irqflags,
+ udc-irqname, udc);
if (ret  0)
goto error;
 
-- 
1.9.1

--
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/