diff mbox

[1/5] firewire: ohci: restore GUID register on resume.

Message ID 1290906936-14472-2-git-send-email-maximlevitsky@gmail.com
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Maxim Levitsky Nov. 28, 2010, 1:15 a.m. UTC
Some lousy BIOSes, eg my Aspire 5720 BIOS forgets to restore
device GUID on resume from ram.

Fix that by programming GUID register on resume from ram
Since that register is one time programable according to spec,
that has no effect on systems that have sane BIOS (Are there any?)

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
---
 drivers/firewire/ohci.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c
index 6dd56cd..cadd6af 100644
--- a/drivers/firewire/ohci.c
+++ b/drivers/firewire/ohci.c
@@ -3240,6 +3240,10 @@  static int pci_resume(struct pci_dev *dev)
 		return err;
 	}
 
+	/* Some bioses forget to reinitialize the GUID. Do that ourselves */
+	reg_write(ohci, OHCI1394_GUIDLo, ohci->card.guid & 0xFFFFFFFF);
+	reg_write(ohci, OHCI1394_GUIDHi, (ohci->card.guid >> 32) & 0xFFFFFFFF);
+
 	return ohci_enable(&ohci->card, NULL, 0);
 }
 #endif