This fixes two independent problems: it would not save the PCI state on
suspend (and thus try to resume a nonexistent state on resume), and
while shut off, if an interrupt happened on the same shared irq, the irq
handler would react very badly to the interrupt status being an invalid
all-ones state.
Acked-by: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
int work_done = 0;
u32 status = sky2_read32(hw, B0_Y2_SP_EISR);
+ if (!~status)
+ return 0;
+
if (status & Y2_IS_HW_ERR)
sky2_hw_intr(hw);
}
}
+ pci_save_state(pdev);
return sky2_set_power_state(hw, pci_choose_state(pdev, state));
}