Skip to content

Commit c533c11

Browse files
Ondrej Zarygregkh
Ondrej Zary
authored andcommitted
sata_via: Enable hotplug only on VT6421
[ Upstream commit 3cf8645 ] Commit 57e5568 ("sata_via: Implement hotplug for VT6421") adds hotplug IRQ handler for VT6421 but enables hotplug on all chips. This is a bug because it causes "irq xx: nobody cared" error on VT6420 when hot-(un)plugging a drive: [ 381.839948] irq 20: nobody cared (try booting with the "irqpoll" option) [ 381.840014] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.10.0-rc5+ #148 [ 381.840066] Hardware name: P4VM800/P4VM800, BIOS P1.60 05/29/2006 [ 381.840117] Call Trace: [ 381.840167] <IRQ> [ 381.840225] ? dump_stack+0x44/0x58 [ 381.840278] ? __report_bad_irq+0x14/0x97 [ 381.840327] ? handle_edge_irq+0xa5/0xa5 [ 381.840376] ? note_interrupt+0x155/0x1cf [ 381.840426] ? handle_edge_irq+0xa5/0xa5 [ 381.840474] ? handle_irq_event_percpu+0x32/0x38 [ 381.840524] ? handle_irq_event+0x1f/0x38 [ 381.840573] ? handle_fasteoi_irq+0x69/0xb8 [ 381.840625] ? handle_irq+0x4f/0x5d [ 381.840672] </IRQ> [ 381.840726] ? do_IRQ+0x2e/0x8b [ 381.840782] ? common_interrupt+0x2c/0x34 [ 381.840836] ? mwait_idle+0x60/0x82 [ 381.840892] ? arch_cpu_idle+0x6/0x7 [ 381.840949] ? do_idle+0x96/0x18e [ 381.841002] ? cpu_startup_entry+0x16/0x1a [ 381.841057] ? start_kernel+0x319/0x31c [ 381.841111] ? startup_32_smp+0x166/0x168 [ 381.841165] handlers: [ 381.841219] [<c12a7263>] ata_bmdma_interrupt [ 381.841274] Disabling IRQ #20 Seems that VT6420 can do hotplug too (there's no documentation) but the comments say that SCR register access (required for detecting hotplug events) can cause problems on these chips. For now, just keep hotplug disabled on anything other than VT6421. Signed-off-by: Ondrej Zary <[email protected]> Signed-off-by: Tejun Heo <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 26899ca commit c533c11

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

drivers/ata/sata_via.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -644,14 +644,16 @@ static void svia_configure(struct pci_dev *pdev, int board_id,
644644
pci_write_config_byte(pdev, SATA_NATIVE_MODE, tmp8);
645645
}
646646

647-
/* enable IRQ on hotplug */
648-
pci_read_config_byte(pdev, SVIA_MISC_3, &tmp8);
649-
if ((tmp8 & SATA_HOTPLUG) != SATA_HOTPLUG) {
650-
dev_dbg(&pdev->dev,
651-
"enabling SATA hotplug (0x%x)\n",
652-
(int) tmp8);
653-
tmp8 |= SATA_HOTPLUG;
654-
pci_write_config_byte(pdev, SVIA_MISC_3, tmp8);
647+
if (board_id == vt6421) {
648+
/* enable IRQ on hotplug */
649+
pci_read_config_byte(pdev, SVIA_MISC_3, &tmp8);
650+
if ((tmp8 & SATA_HOTPLUG) != SATA_HOTPLUG) {
651+
dev_dbg(&pdev->dev,
652+
"enabling SATA hotplug (0x%x)\n",
653+
(int) tmp8);
654+
tmp8 |= SATA_HOTPLUG;
655+
pci_write_config_byte(pdev, SVIA_MISC_3, tmp8);
656+
}
655657
}
656658

657659
/*

0 commit comments

Comments
 (0)