Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipoctal: request_irq after configuration

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>
Acked-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Federico Vaga and committed by
Greg Kroah-Hartman
4847cc07 968d04e8

+8 -7
+8 -7
drivers/ipack/devices/ipoctal.c
··· 323 323 &block_regs[i].w.imr); 324 324 } 325 325 326 - /* 327 - * IP-OCTAL has different addresses to copy its IRQ vector. 328 - * Depending of the carrier these addresses are accesible or not. 329 - * More info in the datasheet. 330 - */ 331 - ipoctal->dev->bus->ops->request_irq(ipoctal->dev, 332 - ipoctal_irq_handler, ipoctal); 333 326 /* Dummy write */ 334 327 iowrite8(1, ipoctal->mem8_space + 1); 335 328 ··· 382 389 } 383 390 dev_set_drvdata(tty_dev, channel); 384 391 } 392 + 393 + /* 394 + * IP-OCTAL has different addresses to copy its IRQ vector. 395 + * Depending of the carrier these addresses are accesible or not. 396 + * More info in the datasheet. 397 + */ 398 + ipoctal->dev->bus->ops->request_irq(ipoctal->dev, 399 + ipoctal_irq_handler, ipoctal); 385 400 386 401 return 0; 387 402 }