Re: [PATCH] pata_pdc2027x: Restore various updates done on the driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alan Cox wrote:
> - Use of cable_detect method
> - ata_pci_default_filter needed on PATA100 ops
> - Filter for UDMA 133 errata from vendor (not enabled in this diff but
> added ready)
> 
> Signed-off-by: Alan Cox <alan@xxxxxxxxxx>
> 
 <snip>
>  
>  /**
> + *	pdc2720x_mode_filter	-	mode selection filter
> + *	@adev: ATA device
> + *	@mask: list of modes proposed
> + *
> + *	Block UDMA on devices that cause trouble with this controller.
> + */
> +
> +static unsigned long pdc2027x_mode_filter(struct ata_device *adev, unsigned long mask)
> +{
> +	unsigned char model_num[ATA_ID_PROD_LEN + 1];
> +	struct ata_device *pair = ata_dev_pair(adev);
> +	
> +	if (adev->class != ATA_DEV_ATA || adev->devno == 0 || pair == NULL)
> +		return ata_pci_default_filter(adev, mask);
> +
> +	/* Check for slave of a Maxtor at UDMA6 */
> +	ata_id_c_string(pair->id, model_num, ATA_ID_PROD,
> +			  ATA_ID_PROD_LEN + 1);
> +	/* If the master is a maxtor in UDMA6 then the slave should not use UDMA 6 */
> +	if(strstr(model_num, "Maxtor") == 0 && pair->dma_mode == XFER_UDMA_6)
> +		mask &= ~ (1 << (6 + ATA_SHIFT_UDMA));

Some Maxtor drives have "Maxtor" while others have "MAXTOR" in the IDENTIFY data.
Should we check both "Maxtor" and "MAXTOR" here?

--
albert

> +	
> +	return ata_pci_default_filter(adev, mask);
> +}
> +
> +/**


-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux