1 Revert "mtd: pxa3xx-nand: handle PIO in threaded interrupt"
3 This reverts commit 24542257a3b987025d4b998ec2d15e556c98ad3f
4 This upstream change has been causing spurious timeouts on accesses
5 to the NAND flash if something else on the system is causing
8 Nothing guarantees that the thread will run in time, so the
9 usual timeout is unreliable.
11 Signed-off-by: Felix Fietkau <nbd@nbd.name>
13 --- a/drivers/mtd/nand/pxa3xx_nand.c
14 +++ b/drivers/mtd/nand/pxa3xx_nand.c
15 @@ -791,24 +791,11 @@ static void start_data_dma(struct pxa3xx
16 __func__, direction, info->dma_cookie, info->sg.length);
19 -static irqreturn_t pxa3xx_nand_irq_thread(int irq, void *data)
21 - struct pxa3xx_nand_info *info = data;
23 - handle_data_pio(info);
25 - info->state = STATE_CMD_DONE;
26 - nand_writel(info, NDSR, NDSR_WRDREQ | NDSR_RDDREQ);
31 static irqreturn_t pxa3xx_nand_irq(int irq, void *devid)
33 struct pxa3xx_nand_info *info = devid;
34 unsigned int status, is_completed = 0, is_ready = 0;
35 unsigned int ready, cmd_done;
36 - irqreturn_t ret = IRQ_HANDLED;
39 ready = NDSR_FLASH_RDY;
40 @@ -850,8 +837,7 @@ static irqreturn_t pxa3xx_nand_irq(int i
42 info->state = (status & NDSR_RDDREQ) ?
43 STATE_PIO_READING : STATE_PIO_WRITING;
44 - ret = IRQ_WAKE_THREAD;
45 - goto NORMAL_IRQ_EXIT;
46 + handle_data_pio(info);
49 if (status & cmd_done) {
50 @@ -896,7 +882,7 @@ static irqreturn_t pxa3xx_nand_irq(int i
52 complete(&info->dev_ready);
58 static inline int is_buf_blank(uint8_t *buf, size_t len)
59 @@ -1865,9 +1851,7 @@ static int alloc_nand_resource(struct pl
60 /* initialize all interrupts to be disabled */
61 disable_int(info, NDSR_MASK);
63 - ret = request_threaded_irq(irq, pxa3xx_nand_irq,
64 - pxa3xx_nand_irq_thread, IRQF_ONESHOT,
66 + ret = request_irq(irq, pxa3xx_nand_irq, 0, pdev->name, info);
68 dev_err(&pdev->dev, "failed to request IRQ: %d\n", ret);