Show
Ignore:
Timestamp:
11/05/05 18:11:47 (8 years ago)
Author:
khali
Message:

Backport SMBus PEC support rewrite from Linux 2.6:

The new SMBus PEC implementation doesn't support PEC emulation on
non-PEC non-I2C SMBus masters, so we can drop all related code.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/kernel/busses/i2c-i801.c

    r3176 r3177  
    146146 
    147147static int i801_transaction(void); 
    148 static int i801_block_transaction(union i2c_smbus_data *data, 
    149                                   char read_write, int command); 
     148static int i801_block_transaction(union i2c_smbus_data *data, char read_write, 
     149                                  int command, int hwpec); 
    150150 
    151151static unsigned short i801_smba; 
     
    299299/* All-inclusive block transaction function */ 
    300300static int i801_block_transaction(union i2c_smbus_data *data, char read_write, 
    301                                   int command) 
     301                                  int command, int hwpec) 
    302302{ 
    303303        int i, len; 
     
    447447 
    448448#ifdef HAVE_PEC 
    449         if(isich4 && command == I2C_SMBUS_BLOCK_DATA_PEC) { 
     449        if (hwpec && command == I2C_SMBUS_BLOCK_DATA) { 
    450450                /* wait for INTR bit as advised by Intel */ 
    451451                timeout = 0; 
     
    519519        case I2C_SMBUS_BLOCK_DATA: 
    520520        case I2C_SMBUS_I2C_BLOCK_DATA: 
    521 #ifdef HAVE_PEC 
    522         case I2C_SMBUS_BLOCK_DATA_PEC: 
    523                 if(hwpec && size == I2C_SMBUS_BLOCK_DATA) 
    524                         size = I2C_SMBUS_BLOCK_DATA_PEC; 
    525 #endif 
    526521                outb_p(((addr & 0x7f) << 1) | (read_write & 0x01), 
    527522                       SMBHSTADD); 
     
    543538#endif 
    544539        if(block) 
    545                 ret = i801_block_transaction(data, read_write, size); 
     540                ret = i801_block_transaction(data, read_write, size, hwpec); 
    546541        else { 
    547542                outb_p(xact | ENABLE_INT9, SMBHSTCNT);