* [PATCH] ipoctal: request_irq after configuration
@ 2014-07-03 8:53 Federico Vaga
2014-07-03 8:56 ` Samuel Iglesias Gonsálvez
0 siblings, 1 reply; 3+ messages in thread
From: Federico Vaga @ 2014-07-03 8:53 UTC (permalink / raw)
To: Samuel Iglesias Gonsalvez, Jens Taprogge, Greg Kroah-Hartman
Cc: industrypack-devel, linux-kernel, Federico Vaga
The request for an IRQ handler must be done after whole configuration. This
was not the case for this driver which request the IRQ in the middle of
the configuration. Sometimes, it happens that something is not completely
configured, we recieve an interrupt thus we stumble into troubles in the
IRQ handler.
Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
---
drivers/ipack/devices/ipoctal.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/ipack/devices/ipoctal.c b/drivers/ipack/devices/ipoctal.c
index a7ec6f9..72fd761 100644
--- a/drivers/ipack/devices/ipoctal.c
+++ b/drivers/ipack/devices/ipoctal.c
@@ -344,13 +344,6 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
&block_regs[i].w.imr);
}
- /*
- * IP-OCTAL has different addresses to copy its IRQ vector.
- * Depending of the carrier these addresses are accesible or not.
- * More info in the datasheet.
- */
- ipoctal->dev->bus->ops->request_irq(ipoctal->dev,
- ipoctal_irq_handler, ipoctal);
/* Dummy write */
iowrite8(1, ipoctal->mem8_space + 1);
@@ -411,6 +404,14 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
dev_set_drvdata(tty_dev, channel);
}
+ /*
+ * IP-OCTAL has different addresses to copy its IRQ vector.
+ * Depending of the carrier these addresses are accesible or not.
+ * More info in the datasheet.
+ */
+ ipoctal->dev->bus->ops->request_irq(ipoctal->dev,
+ ipoctal_irq_handler, ipoctal);
+
return 0;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ipoctal: request_irq after configuration
2014-07-03 8:53 [PATCH] ipoctal: request_irq after configuration Federico Vaga
@ 2014-07-03 8:56 ` Samuel Iglesias Gonsálvez
2014-07-03 20:55 ` Greg Kroah-Hartman
0 siblings, 1 reply; 3+ messages in thread
From: Samuel Iglesias Gonsálvez @ 2014-07-03 8:56 UTC (permalink / raw)
To: Federico Vaga
Cc: Jens Taprogge, Greg Kroah-Hartman, industrypack-devel,
linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1961 bytes --]
On Thu, 2014-07-03 at 10:53 +0200, Federico Vaga wrote:
> The request for an IRQ handler must be done after whole configuration. This
> was not the case for this driver which request the IRQ in the middle of
> the configuration. Sometimes, it happens that something is not completely
> configured, we recieve an interrupt thus we stumble into troubles in the
> IRQ handler.
>
> Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
> ---
> drivers/ipack/devices/ipoctal.c | 15 ++++++++-------
> 1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/ipack/devices/ipoctal.c b/drivers/ipack/devices/ipoctal.c
> index a7ec6f9..72fd761 100644
> --- a/drivers/ipack/devices/ipoctal.c
> +++ b/drivers/ipack/devices/ipoctal.c
> @@ -344,13 +344,6 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
> &block_regs[i].w.imr);
> }
>
> - /*
> - * IP-OCTAL has different addresses to copy its IRQ vector.
> - * Depending of the carrier these addresses are accesible or not.
> - * More info in the datasheet.
> - */
> - ipoctal->dev->bus->ops->request_irq(ipoctal->dev,
> - ipoctal_irq_handler, ipoctal);
> /* Dummy write */
> iowrite8(1, ipoctal->mem8_space + 1);
>
> @@ -411,6 +404,14 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
> dev_set_drvdata(tty_dev, channel);
> }
>
> + /*
> + * IP-OCTAL has different addresses to copy its IRQ vector.
> + * Depending of the carrier these addresses are accesible or not.
> + * More info in the datasheet.
> + */
> + ipoctal->dev->bus->ops->request_irq(ipoctal->dev,
> + ipoctal_irq_handler, ipoctal);
> +
> return 0;
> }
>
Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Greg, Would you mind picking this patch through your driver-core tree?
Together with "ipoctal: protect only the real critical section" patch.
Thanks,
Sam
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ipoctal: request_irq after configuration
2014-07-03 8:56 ` Samuel Iglesias Gonsálvez
@ 2014-07-03 20:55 ` Greg Kroah-Hartman
0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2014-07-03 20:55 UTC (permalink / raw)
To: Samuel Iglesias Gonsálvez
Cc: Federico Vaga, Jens Taprogge, industrypack-devel, linux-kernel
On Thu, Jul 03, 2014 at 10:56:55AM +0200, Samuel Iglesias Gonsálvez wrote:
> On Thu, 2014-07-03 at 10:53 +0200, Federico Vaga wrote:
> > The request for an IRQ handler must be done after whole configuration. This
> > was not the case for this driver which request the IRQ in the middle of
> > the configuration. Sometimes, it happens that something is not completely
> > configured, we recieve an interrupt thus we stumble into troubles in the
> > IRQ handler.
> >
> > Signed-off-by: Federico Vaga <federico.vaga@cern.ch>
> > ---
> > drivers/ipack/devices/ipoctal.c | 15 ++++++++-------
> > 1 file changed, 8 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/ipack/devices/ipoctal.c b/drivers/ipack/devices/ipoctal.c
> > index a7ec6f9..72fd761 100644
> > --- a/drivers/ipack/devices/ipoctal.c
> > +++ b/drivers/ipack/devices/ipoctal.c
> > @@ -344,13 +344,6 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
> > &block_regs[i].w.imr);
> > }
> >
> > - /*
> > - * IP-OCTAL has different addresses to copy its IRQ vector.
> > - * Depending of the carrier these addresses are accesible or not.
> > - * More info in the datasheet.
> > - */
> > - ipoctal->dev->bus->ops->request_irq(ipoctal->dev,
> > - ipoctal_irq_handler, ipoctal);
> > /* Dummy write */
> > iowrite8(1, ipoctal->mem8_space + 1);
> >
> > @@ -411,6 +404,14 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
> > dev_set_drvdata(tty_dev, channel);
> > }
> >
> > + /*
> > + * IP-OCTAL has different addresses to copy its IRQ vector.
> > + * Depending of the carrier these addresses are accesible or not.
> > + * More info in the datasheet.
> > + */
> > + ipoctal->dev->bus->ops->request_irq(ipoctal->dev,
> > + ipoctal_irq_handler, ipoctal);
> > +
> > return 0;
> > }
> >
>
> Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
>
> Greg, Would you mind picking this patch through your driver-core tree?
> Together with "ipoctal: protect only the real critical section" patch.
Ok, will do, thanks.
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-03 20:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-03 8:53 [PATCH] ipoctal: request_irq after configuration Federico Vaga
2014-07-03 8:56 ` Samuel Iglesias Gonsálvez
2014-07-03 20:55 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox