diff options
| -rw-r--r-- | drivers/net/ks8851.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/ks8851.c b/drivers/net/ks8851.c index b8ed1ee37ac1..623171f37d99 100644 --- a/drivers/net/ks8851.c +++ b/drivers/net/ks8851.c | |||
| @@ -78,7 +78,9 @@ union ks8851_tx_hdr { | |||
| 78 | * @msg_enable: The message flags controlling driver output (see ethtool). | 78 | * @msg_enable: The message flags controlling driver output (see ethtool). |
| 79 | * @fid: Incrementing frame id tag. | 79 | * @fid: Incrementing frame id tag. |
| 80 | * @rc_ier: Cached copy of KS_IER. | 80 | * @rc_ier: Cached copy of KS_IER. |
| 81 | * @rc_ccr: Cached copy of KS_CCR. | ||
| 81 | * @rc_rxqcr: Cached copy of KS_RXQCR. | 82 | * @rc_rxqcr: Cached copy of KS_RXQCR. |
| 83 | * @eeprom_size: Companion eeprom size in Bytes, 0 if no eeprom | ||
| 82 | * | 84 | * |
| 83 | * The @lock ensures that the chip is protected when certain operations are | 85 | * The @lock ensures that the chip is protected when certain operations are |
| 84 | * in progress. When the read or write packet transfer is in progress, most | 86 | * in progress. When the read or write packet transfer is in progress, most |
| @@ -109,6 +111,8 @@ struct ks8851_net { | |||
| 109 | 111 | ||
| 110 | u16 rc_ier; | 112 | u16 rc_ier; |
| 111 | u16 rc_rxqcr; | 113 | u16 rc_rxqcr; |
| 114 | u16 rc_ccr; | ||
| 115 | u16 eeprom_size; | ||
| 112 | 116 | ||
| 113 | struct mii_if_info mii; | 117 | struct mii_if_info mii; |
| 114 | struct ks8851_rxctrl rxctrl; | 118 | struct ks8851_rxctrl rxctrl; |
| @@ -1269,6 +1273,14 @@ static int __devinit ks8851_probe(struct spi_device *spi) | |||
| 1269 | goto err_id; | 1273 | goto err_id; |
| 1270 | } | 1274 | } |
| 1271 | 1275 | ||
| 1276 | /* cache the contents of the CCR register for EEPROM, etc. */ | ||
| 1277 | ks->rc_ccr = ks8851_rdreg16(ks, KS_CCR); | ||
| 1278 | |||
| 1279 | if (ks->rc_ccr & CCR_EEPROM) | ||
| 1280 | ks->eeprom_size = 128; | ||
| 1281 | else | ||
| 1282 | ks->eeprom_size = 0; | ||
| 1283 | |||
| 1272 | ks8851_read_selftest(ks); | 1284 | ks8851_read_selftest(ks); |
| 1273 | ks8851_init_mac(ks); | 1285 | ks8851_init_mac(ks); |
| 1274 | 1286 | ||
