Skip to content

Commit

Permalink
ipoctal: request_irq after configuration
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Samuel Iglesias Gonsalvez <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Federico Vaga authored and gregkh committed Jul 10, 2014
1 parent 968d04e commit 4847cc0
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions drivers/ipack/devices/ipoctal.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,13 +323,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);

Expand Down Expand Up @@ -390,6 +383,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;
}

Expand Down

0 comments on commit 4847cc0

Please sign in to comment.