dev_err(&chip->pci_dev->dev, "not in normal mode (0x%x)\n", 
dev_err(chip->dev, "not in normal mode (0x%x)\n", 
static int tpm_nsc_recv(struct tpm_chip *chip, u8 * buf, size_t count){	u8 *buffer = buf;	u8 data, *p;	u32 size;	__be32 *native_size;	if (count < 6)		return -EIO;	if (wait_for_stat(chip, NSC_STATUS_F0, NSC_STATUS_F0, &data) < 0) {		dev_err(&chip->pci_dev->dev, "F0 timeout\n");		return -EIO;	}	if ((data =	     inb(chip->vendor->base + NSC_DATA)) != NSC_COMMAND_NORMAL) {		dev_err(&chip->pci_dev->dev, "not in normal mode (0x%x)\n",			data);		return -EIO;	}	/* read the whole packet */	for (p = buffer; p < &buffer[count]; p++) {		if (wait_for_stat		    (chip, NSC_STATUS_OBF, NSC_STATUS_OBF, &data) < 0) {			dev_err(&chip->pci_dev->dev,				"OBF timeout (while reading data)\n");			return -EIO;		}		if (data & NSC_STATUS_F0)			break;		*p = inb(chip->vendor->base + NSC_DATA);	}	if ((data & NSC_STATUS_F0) == 0 &&	(wait_for_stat(chip, NSC_STATUS_F0, NSC_STATUS_F0, &data) < 0)) {		dev_err(&chip->pci_dev->dev, "F0 not set\n");		return -EIO;	}	if ((data = inb(chip->vendor->base + NSC_DATA)) != NSC_COMMAND_EOC) {		dev_err(&chip->pci_dev->dev,			"expected end of command(0x%x)\n", data);		return -EIO;	}	native_size = (__force __be32 *) (buf + 2);	size = be32_to_cpu(*native_size);	if (count < size)		return -EIO;	return size;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/e659a3fe2027b19ecd8abb7ad79253672763454b/tpm_nsc.c/buggy/drivers/char/tpm/tpm_nsc.c