Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194783
b: refs/heads/master
c: 7d99746
h: refs/heads/master
i:
  194781: 8169021
  194779: 79fe5a4
  194775: 1026620
  194767: 8018f66
  194751: 09f4376
v: v3
  • Loading branch information
Sebastien Jan authored and David S. Miller committed May 6, 2010
1 parent 56b8380 commit e4299ad
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d951f7250305adaea5f25398b70023681183d0cb
refs/heads/master: 7d9974666e0dc2cbbeac80fa4d550df0bbea6fad
12 changes: 12 additions & 0 deletions trunk/drivers/net/ks8851.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ union ks8851_tx_hdr {
* @msg_enable: The message flags controlling driver output (see ethtool).
* @fid: Incrementing frame id tag.
* @rc_ier: Cached copy of KS_IER.
* @rc_ccr: Cached copy of KS_CCR.
* @rc_rxqcr: Cached copy of KS_RXQCR.
* @eeprom_size: Companion eeprom size in Bytes, 0 if no eeprom
*
* The @lock ensures that the chip is protected when certain operations are
* in progress. When the read or write packet transfer is in progress, most
Expand Down Expand Up @@ -109,6 +111,8 @@ struct ks8851_net {

u16 rc_ier;
u16 rc_rxqcr;
u16 rc_ccr;
u16 eeprom_size;

struct mii_if_info mii;
struct ks8851_rxctrl rxctrl;
Expand Down Expand Up @@ -1269,6 +1273,14 @@ static int __devinit ks8851_probe(struct spi_device *spi)
goto err_id;
}

/* cache the contents of the CCR register for EEPROM, etc. */
ks->rc_ccr = ks8851_rdreg16(ks, KS_CCR);

if (ks->rc_ccr & CCR_EEPROM)
ks->eeprom_size = 128;
else
ks->eeprom_size = 0;

ks8851_read_selftest(ks);
ks8851_init_mac(ks);

Expand Down

0 comments on commit e4299ad

Please sign in to comment.