Skip to content

Commit

Permalink
firewire: ohci: restore GUID on resume.
Browse files Browse the repository at this point in the history
Some lousy BIOSes, e.g. my Aspire 5720 BIOS forget to restore the GUID
register on resume from RAM.

Fix that by setting it to the last value that was read from it.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
  • Loading branch information
Maxim Levitsky authored and Stefan Richter committed Dec 13, 2010
1 parent ec766a7 commit 8662b6b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/firewire/ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -3284,6 +3284,13 @@ static int pci_resume(struct pci_dev *dev)
return err;
}

/* Some systems don't setup GUID register on resume from ram */
if (!reg_read(ohci, OHCI1394_GUIDLo) &&
!reg_read(ohci, OHCI1394_GUIDHi)) {
reg_write(ohci, OHCI1394_GUIDLo, (u32)ohci->card.guid);
reg_write(ohci, OHCI1394_GUIDHi, (u32)(ohci->card.guid >> 32));
}

return ohci_enable(&ohci->card, NULL, 0);
}
#endif
Expand Down

0 comments on commit 8662b6b

Please sign in to comment.