struct pci_dev *dev = HWIF(drive)->pci_dev; 
ide_hwif_t *hwif	= drive->hwif; struct pci_dev *dev = hwif->pci_dev; struct hpt_info	*info	= ide_get_hwifdata(hwif); 
static int hpt370_tune_chipset(ide_drive_t *drive, u8 xferspeed){	struct pci_dev *dev = HWIF(drive)->pci_dev;	u8 speed	= hpt3xx_ratefilter(drive, xferspeed);//	u8 speed	= ide_rate_filter(hpt3xx_ratemask(drive), xferspeed);	u8 regfast	= (HWIF(drive)->channel) ? 0x55 : 0x51;	u8 drive_pci	= 0x40 + (drive->dn * 4);	u8 new_fast	= 0, drive_fast = 0;	u32 list_conf	= 0, drive_conf = 0;	u32 conf_mask	= (speed >= XFER_MW_DMA_0) ? 0xc0000000 : 0x30070000;	/*	 * Disable the "fast interrupt" prediction.	 * don't holdoff on interrupts. (== 0x01 despite what the docs say) 	 */	pci_read_config_byte(dev, regfast, &drive_fast);	new_fast = drive_fast;	if (new_fast & 0x02)		new_fast &= ~0x02;#ifdef HPT_DELAY_INTERRUPT	if (new_fast & 0x01)		new_fast &= ~0x01;#else	if ((new_fast & 0x01) == 0)		new_fast |= 0x01;#endif	if (new_fast != drive_fast)		pci_write_config_byte(dev, regfast, new_fast);	list_conf = pci_bus_clock_list(speed, 				       (struct chipset_bus_clock_list_entry *)				       pci_get_drvdata(dev));	pci_read_config_dword(dev, drive_pci, &drive_conf);	list_conf = (list_conf & ~conf_mask) | (drive_conf & conf_mask);		if (speed < XFER_MW_DMA_0) {		list_conf &= ~0x80000000; /* Disable on-chip PIO FIFO/buffer */	}	pci_write_config_dword(dev, drive_pci, list_conf);	return ide_config_drive_speed(drive, speed);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b39b01ffb75e14ed76510e4229ffb575007df0fb/hpt366.c/buggy/drivers/ide/pci/hpt366.c