diff options
author | Holger Waechtler <devnull@localhost> | 2003-06-16 21:10:45 +0000 |
---|---|---|
committer | Holger Waechtler <devnull@localhost> | 2003-06-16 21:10:45 +0000 |
commit | a75a512f71438bdae00e3e74bc78fcf07052e10f (patch) | |
tree | 3ca7158a051f899b9f0ebc009c85ad18cca5e67c /linux/drivers/media/dvb/ttpci/ttpci-eeprom.c | |
parent | 78b1177a3c46410b85617db187854447b9ec1347 (diff) | |
download | mediapointer-dvb-s2-a75a512f71438bdae00e3e74bc78fcf07052e10f.tar.gz mediapointer-dvb-s2-a75a512f71438bdae00e3e74bc78fcf07052e10f.tar.bz2 |
update comment and clear mac field if EEPROM read failed
Diffstat (limited to 'linux/drivers/media/dvb/ttpci/ttpci-eeprom.c')
-rw-r--r-- | linux/drivers/media/dvb/ttpci/ttpci-eeprom.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/linux/drivers/media/dvb/ttpci/ttpci-eeprom.c b/linux/drivers/media/dvb/ttpci/ttpci-eeprom.c index aa9c68f0b..3f02e8068 100644 --- a/linux/drivers/media/dvb/ttpci/ttpci-eeprom.c +++ b/linux/drivers/media/dvb/ttpci/ttpci-eeprom.c @@ -1,6 +1,15 @@ /* - Retrieve encoded MAC address from ATMEL ttpci_eeprom serial 2-wire EEPROM, - decode it and store it in associated adapter net device + Retrieve encoded MAC address from 24C16 serial 2-wire EEPROM, + decode it and store it in the associated adapter struct for + use by dvb_net.c + + This code was tested on TT-Budget/WinTV-NOVA-CI PCI boards with + Atmel and ST Microelectronics EEPROMs. + + This card appear to have the 24C16 write protect held to ground, + thus permitting normal read/write operation. Theoretically it + would be possible to write routines to burn a different (encoded) + MAC address into the EEPROM. Robert Schlabbach GMX Michael Glaum KVH Industries @@ -90,6 +99,7 @@ int ttpci_eeprom_parse_mac (struct dvb_i2c_bus *i2c) if (ret != 0) { // Will only be -ENODEV dprintk("Couldn't read from EEPROM: not there?\n"); + memset(i2c->adapter->proposed_mac, 0, 6); return ret; } @@ -100,7 +110,9 @@ int ttpci_eeprom_parse_mac (struct dvb_i2c_bus *i2c) i2c->adapter->name, i2c->adapter->num, decodedMAC[0],decodedMAC[1],decodedMAC[2], decodedMAC[3],decodedMAC[4],decodedMAC[5]); - + dprintk("encoded MAC was %x:%x:%x:%x:%x:%x\n", + encodedMAC[0],encodedMAC[1],encodedMAC[2], + encodedMAC[3],encodedMAC[4],encodedMAC[5]); return 0; } |