Skip to contentSkip to conversation

e1000e: remove failed request for sw/fw/hw flag

PATCH Applied Jeff Kirsher 3 participants 4 messages Sep 23, 2008 – Sep 25, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/3 e1000e: remove failed request for sw/fw/hw flag

From: Bruce Allan <[email protected]>

When the driver fails to acquire the control flag used to serialize NVM and PHY accesses between the driver, firmware and hardware, remove the request for the flag otherwise the hardware might grant the flag when it becomes available but the driver will not release the flag. This could cause the firmware to prevent the driver getting the flag for all future attempts.

---

 drivers/net/e1000e/ich8lan.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/e1000e/ich8lan.c +2 -0
index f47c60e..6b14ea8 100644
@@ -409,6 +409,8 @@ static s32 e1000_acquire_swflag_ich8lan(struct e1000_hw *hw)
 
 	if (!timeout) {
 		hw_dbg(hw, "FW or HW has locked the resource for too long.\n");
+		extcnf_ctrl &= ~E1000_EXTCNF_CTRL_SWFLAG;
+		ew32(EXTCNF_CTRL, extcnf_ctrl);
 		return -E1000_ERR_CONFIG;
 	}
 
Applied
#1 lore raw
Quoted 9 lines · Jeff Kirsher

From: Bruce Allan <[email protected]>

When the driver fails to acquire the control flag used to serialize NVM and PHY accesses between the driver, firmware and hardware, remove the request for the flag otherwise the hardware might grant the flag when it becomes available but the driver will not release the flag. This could cause the firmware to prevent the driver getting the flag for all future attempts.

Quoted 6 lines

---

 drivers/net/e1000e/ich8lan.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

applied

#2 lore raw
Quoted 7 lines · Jeff Garzik
Quoted 6 lines

When the driver fails to acquire the control flag used to serialize NVM and PHY accesses between the driver, firmware and hardware, remove the request for the flag otherwise the hardware might grant the flag when it becomes available but the driver will not release the flag. This could cause the firmware to prevent the driver getting the flag for all future attempts.

applied

BTW are you going to take the whole series, or just this fix?

I don't think that the other patches should be really applied to upstream (they could be very handy for debugging this horrible issue, once we could do any debugging of it, thoug), as they don't protect against anyone creating a new rw mapping, which can then be freely used to still overwrite the mmio area without any problems.

Signature · 2 lines
Jiri Kosina
SUSE Labs
#3 lore raw
Quoted 11 lines · Jiri Kosina
Quoted 7 lines · Jeff Garzik
Quoted 6 lines

When the driver fails to acquire the control flag used to serialize NVM and PHY accesses between the driver, firmware and hardware, remove the request for the flag otherwise the hardware might grant the flag when it becomes available but the driver will not release the flag. This could cause the firmware to prevent the driver getting the flag for all future attempts.

applied

BTW are you going to take the whole series, or just this fix?

Just this fix

Jeff