mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-10 16:30:50 +00:00
Ignore Sony Vaio EEPROMs with a password set (override
with force parameter). git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1949 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
6f26bed8ce
commit
da916a854b
1 file changed
+16
-1
+16
-1
@@ -55,7 +55,6 @@ MODULE_PARM_DESC(checksum,
|
||||
#define EIGHT_K 4
|
||||
#define SIXTEEN_K 5
|
||||
|
||||
/* Conversions */
|
||||
/* Size of EEPROM in bytes */
|
||||
#define EEPROM_SIZE 256
|
||||
|
||||
@@ -223,6 +222,22 @@ int eeprom_detect(struct i2c_adapter *adapter, int address,
|
||||
goto ERROR1;
|
||||
}
|
||||
|
||||
/* Ignore Vaio EEPROMs with a password set, unless forced.
|
||||
We use the "PCG-" prefix as the signature. */
|
||||
if (kind < 0 && address == 0x57)
|
||||
{
|
||||
if (i2c_smbus_read_byte_data(new_client, 0x80) == 'P'
|
||||
&& i2c_smbus_read_byte_data(new_client, 0x81) == 'C'
|
||||
&& i2c_smbus_read_byte_data(new_client, 0x82) == 'G'
|
||||
&& i2c_smbus_read_byte_data(new_client, 0x83) == '-'
|
||||
&& i2c_smbus_read_byte_data(new_client, 0x00) != 0x00)
|
||||
{
|
||||
printk("eeprom.o: Protecting Sony Vaio password, use force to"
|
||||
"override\n");
|
||||
goto ERROR1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Determine the chip type - only one kind supported! */
|
||||
if (kind <= 0)
|
||||
kind = eeprom;
|
||||
|
||||
Reference in new issue
Block a user