if (!(data & HST_STS_DONE)) 
if (!timeout) { dev_err(&a->dev, "Timeout - Trying to KILL transaction!\n"); 
static int ali1563_transaction(struct i2c_adapter * a){	u32 data;	int timeout;	dev_dbg(&a->dev, "Transaction (pre): STS=%02x, CNTL1=%02x, "		"CNTL2=%02x, CMD=%02x, ADD=%02x, DAT0=%02x, DAT1=%02x\n",		inb_p(SMB_HST_STS), inb_p(SMB_HST_CNTL1), inb_p(SMB_HST_CNTL2),		inb_p(SMB_HST_CMD), inb_p(SMB_HST_ADD), inb_p(SMB_HST_DAT0),		inb_p(SMB_HST_DAT1));	data = inb_p(SMB_HST_STS);	if (data & HST_STS_BAD) {		dev_warn(&a->dev,"ali1563: Trying to reset busy device\n");		outb_p(data | HST_STS_BAD,SMB_HST_STS);		data = inb_p(SMB_HST_STS);		if (data & HST_STS_BAD)			return -EBUSY;	}	outb_p(inb_p(SMB_HST_CNTL2) | HST_CNTL2_START, SMB_HST_CNTL2);	timeout = ALI1563_MAX_TIMEOUT;	do		msleep(1);	while (((data = inb_p(SMB_HST_STS)) & HST_STS_BUSY) && --timeout);	dev_dbg(&a->dev, "Transaction (post): STS=%02x, CNTL1=%02x, "		"CNTL2=%02x, CMD=%02x, ADD=%02x, DAT0=%02x, DAT1=%02x\n",		inb_p(SMB_HST_STS), inb_p(SMB_HST_CNTL1), inb_p(SMB_HST_CNTL2),		inb_p(SMB_HST_CMD), inb_p(SMB_HST_ADD), inb_p(SMB_HST_DAT0),		inb_p(SMB_HST_DAT1));	if (timeout && !(data & HST_STS_BAD))		return 0;	dev_warn(&a->dev, "SMBus Error: %s%s%s%s%s\n",		timeout ? "Timeout " : "",		data & HST_STS_FAIL ? "Transaction Failed " : "",		data & HST_STS_BUSERR ? "No response or Bus Collision " : "",		data & HST_STS_DEVERR ? "Device Error " : "",		!(data & HST_STS_DONE) ? "Transaction Never Finished " : "");	if (!(data & HST_STS_DONE))		/* Issue 'kill' to host controller */		outb_p(HST_CNTL2_KILL,SMB_HST_CNTL2);	else		/* Issue timeout to reset all devices on bus */		outb_p(HST_CNTL1_TIMEOUT,SMB_HST_CNTL1);	return -1;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/4a4e5787e0b721021fe0a456ddc987a04cebfc8d/i2c-ali1563.c/buggy/drivers/i2c/busses/i2c-ali1563.c