From 9ccfeca95cc74ad71f57719d181aed601cce4df3 Mon Sep 17 00:00:00 2001 From: Stefan Richter Date: Wed, 22 Jun 2011 21:05:08 +0200 Subject: [PATCH] --- yaml --- r: 256635 b: refs/heads/master c: 215fa444c2a6d571f1f915cf3dc7a8b01cc51a0a h: refs/heads/master i: 256633: 37a7f65f091b45264a950b28f2d44cba030b3e3e 256631: b41e5fbe0442d867291be905bbc828d6c9ed508a v: v3 --- [refs] | 2 +- trunk/drivers/firewire/ohci.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index d1cfe8eafcbc..dfb49a6640a1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b14c369d87d7fbf120ad21919d34a8f1290290f1 +refs/heads/master: 215fa444c2a6d571f1f915cf3dc7a8b01cc51a0a diff --git a/trunk/drivers/firewire/ohci.c b/trunk/drivers/firewire/ohci.c index a818dc834690..448598876278 100644 --- a/trunk/drivers/firewire/ohci.c +++ b/trunk/drivers/firewire/ohci.c @@ -527,6 +527,9 @@ static int read_phy_reg(struct fw_ohci *ohci, int addr) reg_write(ohci, OHCI1394_PhyControl, OHCI1394_PhyControl_Read(addr)); for (i = 0; i < 3 + 100; i++) { val = reg_read(ohci, OHCI1394_PhyControl); + if (!~val) + return -ENODEV; /* Card was ejected. */ + if (val & OHCI1394_PhyControl_ReadDone) return OHCI1394_PhyControl_ReadData(val); @@ -550,6 +553,9 @@ static int write_phy_reg(const struct fw_ohci *ohci, int addr, u32 val) OHCI1394_PhyControl_Write(addr, val)); for (i = 0; i < 3 + 100; i++) { val = reg_read(ohci, OHCI1394_PhyControl); + if (!~val) + return -ENODEV; /* Card was ejected. */ + if (!(val & OHCI1394_PhyControl_WritePending)) return 0;