From a75a512f71438bdae00e3e74bc78fcf07052e10f Mon Sep 17 00:00:00 2001 From: Holger Waechtler Date: Mon, 16 Jun 2003 21:10:45 +0000 Subject: update comment and clear mac field if EEPROM read failed --- linux/drivers/media/dvb/ttpci/ttpci-eeprom.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'linux/drivers/media') 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; } -- cgit v1.2.3