/* We need to apply some minimal filtering for old controllers and at least one breed of Transcend SSD. Return the updated mask.  */
static unsigned long via_mode_filter(struct ata_device *dev, unsigned long mask)
/* We need to apply some minimal filtering for old controllers and at least one breed of Transcend SSD. Return the updated mask.  */
static unsigned long via_mode_filter(struct ata_device *dev, unsigned long mask)
{
	struct ata_host *host = dev->link->ap->host;
	const struct via_isa_bridge *config = host->private_data;
	unsigned char model_num[ATA_ID_PROD_LEN + 1];
	if (config->id == PCI_DEVICE_ID_VIA_82C586_0) {
		ata_id_c_string(dev->id, model_num, ATA_ID_PROD, sizeof(model_num));
		if (strcmp(model_num, "TS64GSSD25-M") == 0) {
			ata_dev_printk(dev, KERN_WARNING,
	"disabling UDMA mode due to reported lockups with this device.\n");
			mask &= ~ ATA_MASK_UDMA;
		}
	}
	return ata_bmdma_mode_filter(dev, mask);
}