#ifdef DEBUG 
static int vt596_transaction(u8 size){	int temp;	int result = 0;	int timeout = 0;#ifdef DEBUG	vt596_dump_regs("Transaction (pre)", size);#endif	/* Make sure the SMBus host is ready to start transmitting */	if ((temp = inb_p(SMBHSTSTS)) & 0x1F) {		dev_dbg(&vt596_adapter.dev, "SMBus busy (0x%02x). "			"Resetting... ", temp);		outb_p(temp, SMBHSTSTS);		if ((temp = inb_p(SMBHSTSTS)) & 0x1F) {			printk("Failed! (0x%02x)\n", temp);			return -1;		} else {			printk("Successful!\n");		}	}	/* Start the transaction by setting bit 6 */	outb_p(0x40 | (size & 0x3C), SMBHSTCNT);	/* We will always wait for a fraction of a second */	do {		msleep(1);		temp = inb_p(SMBHSTSTS);	} while ((temp & 0x01) && (timeout++ < MAX_TIMEOUT));	/* If the SMBus is still busy, we give up */	if (timeout >= MAX_TIMEOUT) {		result = -1;		dev_err(&vt596_adapter.dev, "SMBus timeout!\n");	}	if (temp & 0x10) {		result = -1;		dev_err(&vt596_adapter.dev, "Transaction failed (0x%02x)\n",			inb_p(SMBHSTCNT) & 0x3C);	}	if (temp & 0x08) {		result = -1;		dev_err(&vt596_adapter.dev, "SMBus collision!\n");	}	if (temp & 0x04) {		result = -1;		/* Quick commands are used to probe for chips, so		   errors are expected, and we don't want to frighten the		   user. */		if ((inb_p(SMBHSTCNT) & 0x3C) != VT596_QUICK)			dev_err(&vt596_adapter.dev, "Transaction error!\n");	}	/* Resetting status register */	if (temp & 0x1F)		outb_p(temp, SMBHSTSTS);#ifdef DEBUG	vt596_dump_regs("Transaction (post)", size);#endif	return result;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/ca68f1193e8fc86470d4222d563d13b5584dc4f8/i2c-viapro.c/buggy/drivers/i2c/busses/i2c-viapro.c