Patchwork e1000e: release hw semaphore after successfully writing EEPROM

login
register
mail settings
Submitter Arthur Jones
Date Sept. 29, 2008, 9:51 p.m.
Message ID <20080929215109.GA23380@ajones-laptop.nbttech.com>
Download mbox | patch
Permalink /patch/1981/
State Accepted
Delegated to: Jeff Garzik
Headers show

Comments

Arthur Jones - Sept. 29, 2008, 9:51 p.m.
Since e1000e has been existance in linux-2.6, we've
never released the hardware semaphore after a successful
write to the SPI EEPROM.  I guess we don't write to
SPI EEPROM much -- but those few of us that do appreciate
it when we can later read from the EEPROM without having
to reboot.

Found-by: Nick Van Fossen <Nick.VanFossen@riverbed.com>
Signed-off-by: Arthur Jones <ajones@riverbed.com>
---
 drivers/net/e1000e/lib.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Kok, Auke - Sept. 29, 2008, 10:48 p.m.
looks totally valid to me indeed!


Reviewed-by: Auke Kok <auke-jan.h.kok@intel.com>


Auke

Arthur Jones wrote:
> Since e1000e has been existance in linux-2.6, we've
> never released the hardware semaphore after a successful
> write to the SPI EEPROM.  I guess we don't write to
> SPI EEPROM much -- but those few of us that do appreciate
> it when we can later read from the EEPROM without having
> to reboot.
> 
> Found-by: Nick Van Fossen <Nick.VanFossen@riverbed.com>
> Signed-off-by: Arthur Jones <ajones@riverbed.com>
> ---
>  drivers/net/e1000e/lib.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/e1000e/lib.c b/drivers/net/e1000e/lib.c
> index f1f4e9d..6492107 100644
> --- a/drivers/net/e1000e/lib.c
> +++ b/drivers/net/e1000e/lib.c
> @@ -2012,6 +2012,7 @@ s32 e1000e_write_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
>  	}
>  
>  	msleep(10);
> +	nvm->ops.release_nvm(hw);
>  	return 0;
>  }
>  

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/e1000e/lib.c b/drivers/net/e1000e/lib.c
index f1f4e9d..6492107 100644
--- a/drivers/net/e1000e/lib.c
+++ b/drivers/net/e1000e/lib.c
@@ -2012,6 +2012,7 @@  s32 e1000e_write_nvm_spi(struct e1000_hw *hw, u16 offset, u16 words, u16 *data)
 	}
 
 	msleep(10);
+	nvm->ops.release_nvm(hw);
 	return 0;
 }