diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-09 11:10:16 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-09 11:10:16 -0700 |
commit | d6c7528447dec208f9b742ede047753584528c0a (patch) | |
tree | 9538710890063ca035a16cdb71569185841231f1 /drivers/ide/ide-iops.c | |
parent | eafdca4d7010a0e019aaaace3dd71b432a69b54c (diff) | |
parent | 47b82e88180c3c6db795a43373beab47cb073f7a (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide
Pull IDE updates from David Miller:
"Primarily IRQ disabling avoidance changes from Sebastian Andrzej
Siewior"
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
ide: don't enable/disable interrupts in force threaded-IRQ mode
ide: don't disable interrupts during kmap_atomic()
ide: Handle irq disabling consistently
alim15x3: move irq-restore before pci_dev_put()
Diffstat (limited to 'drivers/ide/ide-iops.c')
-rw-r--r-- | drivers/ide/ide-iops.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c index 210a0887dd29..d55e9ebd5628 100644 --- a/drivers/ide/ide-iops.c +++ b/drivers/ide/ide-iops.c @@ -108,6 +108,7 @@ int __ide_wait_stat(ide_drive_t *drive, u8 good, u8 bad, ide_hwif_t *hwif = drive->hwif; const struct ide_tp_ops *tp_ops = hwif->tp_ops; unsigned long flags; + bool irqs_threaded = force_irqthreads; int i; u8 stat; @@ -115,8 +116,10 @@ int __ide_wait_stat(ide_drive_t *drive, u8 good, u8 bad, stat = tp_ops->read_status(hwif); if (stat & ATA_BUSY) { - local_save_flags(flags); - local_irq_enable_in_hardirq(); + if (!irqs_threaded) { + local_save_flags(flags); + local_irq_enable_in_hardirq(); + } timeout += jiffies; while ((stat = tp_ops->read_status(hwif)) & ATA_BUSY) { if (time_after(jiffies, timeout)) { @@ -129,12 +132,14 @@ int __ide_wait_stat(ide_drive_t *drive, u8 good, u8 bad, if ((stat & ATA_BUSY) == 0) break; - local_irq_restore(flags); + if (!irqs_threaded) + local_irq_restore(flags); *rstat = stat; return -EBUSY; } } - local_irq_restore(flags); + if (!irqs_threaded) + local_irq_restore(flags); } /* * Allow status to settle, then read it again. |