On Tue, 2005-12-13 at 16:10 -0800, David S. Miller wrote:
> Like this?
>
> diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
> index be1f30a..eadc0c3 100644
> --- a/drivers/net/tg3.c
> +++ b/drivers/net/tg3.c
> @@ -4368,6 +4368,9 @@ static int tg3_chip_reset(struct tg3 *tp
>
> udelay(120);
>
> + /* The chip reset undoes the nvram lock done above. */
> + tp->nvram_lock_cnt = 0;
> +
> if (tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS) {
> if (tp->pci_chip_rev_id == CHIPREV_ID_5750_A0) {
> int i;
>
Yes. But add the following as well:
--- a/drivers/net/tg3.c 2005-12-13 14:28:05.000000000 -0800
+++ b/drivers/net/tg3.c 2005-12-13 14:27:31.000000000 -0800
@@ -9909,9 +9909,11 @@ static int __devinit tg3_get_device_addr
(tp->tg3_flags2 & TG3_FLG2_5780_CLASS)) {
if (tr32(TG3PCI_DUAL_MAC_CTRL) & DUAL_MAC_CTRL_ID)
mac_offset = 0xcc;
- if (tg3_nvram_lock(tp))
+ if (tg3_nvram_lock(tp)) {
tw32_f(NVRAM_CMD, NVRAM_CMD_RESET);
- else
+ /* reset undoes the nvram lock. */
+ tp->nvram_lock_cnt = 0;
+ } else
tg3_nvram_unlock(tp);
}
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html