struct pci_dev *dev	= HWIF(drive)->pci_dev; 
ide_hwif_t *hwif	= drive->hwif; struct hpt_info *info	= ide_get_hwifdata(hwif); 
static u8 hpt3xx_ratefilter (ide_drive_t *drive, u8 speed){	struct pci_dev *dev	= HWIF(drive)->pci_dev;	u8 mode			= hpt3xx_ratemask(drive);	if (drive->media != ide_disk)		return min(speed, (u8)XFER_PIO_4);	switch(mode) {		case 0x04:			speed = min(speed, (u8)XFER_UDMA_6);			break;		case 0x03:			speed = min(speed, (u8)XFER_UDMA_5);			if (hpt_minimum_revision(dev, 5))				break;			if (check_in_drive_lists(drive, bad_ata100_5))				speed = min(speed, (u8)XFER_UDMA_4);			break;		case 0x02:			speed = min(speed, (u8)XFER_UDMA_4);	/*	 * CHECK ME, Does this need to be set to 5 ??	 */			if (hpt_minimum_revision(dev, 3))				break;			if ((check_in_drive_lists(drive, bad_ata66_4)) ||			    (!(HPT366_ALLOW_ATA66_4)))				speed = min(speed, (u8)XFER_UDMA_3);			if ((check_in_drive_lists(drive, bad_ata66_3)) ||			    (!(HPT366_ALLOW_ATA66_3)))				speed = min(speed, (u8)XFER_UDMA_2);			break;		case 0x01:			speed = min(speed, (u8)XFER_UDMA_2);	/*	 * CHECK ME, Does this need to be set to 5 ??	 */			if (hpt_minimum_revision(dev, 3))				break;			if (check_in_drive_lists(drive, bad_ata33))				speed = min(speed, (u8)XFER_MW_DMA_2);			break;		case 0x00:		default:			speed = min(speed, (u8)XFER_MW_DMA_2);			break;	}	return speed;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b39b01ffb75e14ed76510e4229ffb575007df0fb/hpt366.c/buggy/drivers/ide/pci/hpt366.c