Commit 8662b6b029636c35e5876e184d90daf6b0072667
Committed by
Stefan Richter
1 parent
ec766a7970
Exists in
master
and in
4 other branches
firewire: ohci: restore GUID on resume.
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>
Showing 1 changed file with 7 additions and 0 deletions Side-by-side Diff
drivers/firewire/ohci.c
... | ... | @@ -3284,6 +3284,13 @@ |
3284 | 3284 | return err; |
3285 | 3285 | } |
3286 | 3286 | |
3287 | + /* Some systems don't setup GUID register on resume from ram */ | |
3288 | + if (!reg_read(ohci, OHCI1394_GUIDLo) && | |
3289 | + !reg_read(ohci, OHCI1394_GUIDHi)) { | |
3290 | + reg_write(ohci, OHCI1394_GUIDLo, (u32)ohci->card.guid); | |
3291 | + reg_write(ohci, OHCI1394_GUIDHi, (u32)(ohci->card.guid >> 32)); | |
3292 | + } | |
3293 | + | |
3287 | 3294 | return ohci_enable(&ohci->card, NULL, 0); |
3288 | 3295 | } |
3289 | 3296 | #endif |