if(isich4) hwpec = (flags & I2C_CLIENT_PEC) != 0; 
hwpec = isich4 && (flags & I2C_CLIENT_PEC) && size != I2C_SMBUS_QUICK && size != I2C_SMBUS_I2C_BLOCK_DATA; 
static s32 i801_access(struct i2c_adapter * adap, u16 addr,		       unsigned short flags, char read_write, u8 command,		       int size, union i2c_smbus_data * data){	int hwpec = 0;	int block = 0;	int ret, xact = 0;	if(isich4)		hwpec = (flags & I2C_CLIENT_PEC) != 0;	switch (size) {	case I2C_SMBUS_QUICK:		outb_p(((addr & 0x7f) << 1) | (read_write & 0x01),		       SMBHSTADD);		xact = I801_QUICK;		break;	case I2C_SMBUS_BYTE:		outb_p(((addr & 0x7f) << 1) | (read_write & 0x01),		       SMBHSTADD);		if (read_write == I2C_SMBUS_WRITE)			outb_p(command, SMBHSTCMD);		xact = I801_BYTE;		break;	case I2C_SMBUS_BYTE_DATA:		outb_p(((addr & 0x7f) << 1) | (read_write & 0x01),		       SMBHSTADD);		outb_p(command, SMBHSTCMD);		if (read_write == I2C_SMBUS_WRITE)			outb_p(data->byte, SMBHSTDAT0);		xact = I801_BYTE_DATA;		break;	case I2C_SMBUS_WORD_DATA:		outb_p(((addr & 0x7f) << 1) | (read_write & 0x01),		       SMBHSTADD);		outb_p(command, SMBHSTCMD);		if (read_write == I2C_SMBUS_WRITE) {			outb_p(data->word & 0xff, SMBHSTDAT0);			outb_p((data->word & 0xff00) >> 8, SMBHSTDAT1);		}		xact = I801_WORD_DATA;		break;	case I2C_SMBUS_BLOCK_DATA:	case I2C_SMBUS_I2C_BLOCK_DATA:		outb_p(((addr & 0x7f) << 1) | (read_write & 0x01),		       SMBHSTADD);		outb_p(command, SMBHSTCMD);		block = 1;		break;	case I2C_SMBUS_PROC_CALL:	default:		dev_err(&I801_dev->dev, "Unsupported transaction %d\n", size);		return -1;	}	if(isich4 && hwpec) {		if(size != I2C_SMBUS_QUICK &&		   size != I2C_SMBUS_I2C_BLOCK_DATA)			outb_p(1, SMBAUXCTL);	/* enable HW PEC */	}	if(block)		ret = i801_block_transaction(data, read_write, size, hwpec);	else {		outb_p(xact | ENABLE_INT9, SMBHSTCNT);		ret = i801_transaction();	}	if(isich4 && hwpec) {		if(size != I2C_SMBUS_QUICK &&		   size != I2C_SMBUS_I2C_BLOCK_DATA)			outb_p(0, SMBAUXCTL);	}	if(block)		return ret;	if(ret)		return -1;	if ((read_write == I2C_SMBUS_WRITE) || (xact == I801_QUICK))		return 0;	switch (xact & 0x7f) {	case I801_BYTE:	/* Result put in SMBHSTDAT0 */	case I801_BYTE_DATA:		data->byte = inb_p(SMBHSTDAT0);		break;	case I801_WORD_DATA:		data->word = inb_p(SMBHSTDAT0) + (inb_p(SMBHSTDAT1) << 8);		break;	}	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/e8aac4a9b417643dd9739b48473790a09b8b6cbe/i2c-i801.c/buggy/drivers/i2c/busses/i2c-i801.c