]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
firewire: ohci: dump_stack() for PHY regs read/write failures
authorPeter Hurley <peter@hurleysoftware.com>
Wed, 27 Mar 2013 10:57:40 +0000 (06:57 -0400)
committerStefan Richter <stefanr@s5r6.in-berlin.de>
Tue, 30 Apr 2013 18:30:16 +0000 (20:30 +0200)
A stack trace is an invaluable tool in determining the basis
and cause of PHY regs read/write failures.

Include PHY reg addr (and value for writes) in the diagnostic.

[Stefan R:  changed whitespace]

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
drivers/firewire/ohci.c

index c64b4801adaa9236c5216ff402d6892cbe61b9f0..9e1db6490b9a3bb497b7911d94c42d9fc6190be7 100644 (file)
@@ -572,7 +572,8 @@ static int read_phy_reg(struct fw_ohci *ohci, int addr)
                if (i >= 3)
                        msleep(1);
        }
-       ohci_err(ohci, "failed to read phy reg\n");
+       ohci_err(ohci, "failed to read phy reg %d\n", addr);
+       dump_stack();
 
        return -EBUSY;
 }
@@ -594,7 +595,8 @@ static int write_phy_reg(const struct fw_ohci *ohci, int addr, u32 val)
                if (i >= 3)
                        msleep(1);
        }
-       ohci_err(ohci, "failed to write phy reg\n");
+       ohci_err(ohci, "failed to write phy reg %d, val %u\n", addr, val);
+       dump_stack();
 
        return -EBUSY;
 }