Patchwork [U-Boot,v2,5/7] usb: usbeth: smsc95xx: remove EEPROM loaded check

login
register
mail settings
Submitter Simon Glass
Date Dec. 14, 2012, 2:21 a.m.
Message ID <1355451692-28017-6-git-send-email-sjg@chromium.org>
Download mbox | patch
Permalink /patch/206276/
State Superseded, archived
Delegated to: Marek Vasut
Headers show

Comments

Simon Glass - Dec. 14, 2012, 2:21 a.m.
From: Michael Spang <spang@chromium.org>

[port of Linux kernel commit bcd218be5aeb by Steve Glendinning]

The eeprom read & write commands currently check the E2P_CMD_LOADED_ bit is
set before allowing any operations.  This prevents any reading or writing
unless a correctly programmed EEPROM is installed.

Signed-off-by: Michael Spang <spang@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
---
Changes in v2: None

 drivers/usb/eth/smsc95xx.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
Joe Hershberger - Dec. 21, 2012, 2:30 a.m.
Hi Simon,

On Thu, Dec 13, 2012 at 8:21 PM, Simon Glass <sjg@chromium.org> wrote:
> From: Michael Spang <spang@chromium.org>
>
> [port of Linux kernel commit bcd218be5aeb by Steve Glendinning]
>
> The eeprom read & write commands currently check the E2P_CMD_LOADED_ bit is
> set before allowing any operations.  This prevents any reading or writing
> unless a correctly programmed EEPROM is installed.
>
> Signed-off-by: Michael Spang <spang@chromium.org>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Acked-by: Marek Vasut <marex@denx.de>
> ---

Acked-by: Joe Hershberger <joe.hershberger@ni.com>

Patch

diff --git a/drivers/usb/eth/smsc95xx.c b/drivers/usb/eth/smsc95xx.c
index dc5ca65..fd8f8a7 100644
--- a/drivers/usb/eth/smsc95xx.c
+++ b/drivers/usb/eth/smsc95xx.c
@@ -265,10 +265,6 @@  static int smsc95xx_eeprom_confirm_not_busy(struct ueth_data *dev)
 
 	do {
 		smsc95xx_read_reg(dev, E2P_CMD, &val);
-		if (!(val & E2P_CMD_LOADED_)) {
-			debug("No EEPROM present\n");
-			return -1;
-		}
 		if (!(val & E2P_CMD_BUSY_))
 			return 0;
 		udelay(40);