Re: [PATCH 2.6.22-rc4] libata: SiS180 pata support

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

 



On Wed, Jun 06, 2007 at 01:04:17AM +0200, Uwe Koziolek wrote:
> the PATA-port of SiS180 controller does not support a drive present status
> in the pci configspace like the other SiS PATA controllers, check skipped.
> 
> Signed-off-by: Uwe Koziolek <uwe.koziolek@xxxxxxx>
> 
> --- a/drivers/ata/pata_sis.c	2007-06-05 22:17:10.000000000 +0200
> +++ b/drivers/ata/pata_sis.c	2007-06-06 00:06:08.000000000 +0200
> @@ -130,6 +130,20 @@
>  
>  
>  /**
> + *	sis_enables_supported - Check if enable_bits are supported
> + *	@pdev: pci device
> + *
> + *	The combined PATA/SATA controller SiS180 does not support
> + *	the enable_bits in the PCI configspace
> + */
> +
> +static inline int sis_enables_supported(struct pci_dev *pdev)
> +{
> +	return ((pdev->device != 0x0180) && (pdev->device != 0x0181));
> +}
> +
> +
> +/**
>   *	sis_pre_reset		-	probe begin
>   *	@ap: ATA port
>   *	@deadline: deadline jiffies for the operation
> @@ -146,7 +160,8 @@
>  
>  	struct pci_dev *pdev = to_pci_dev(ap->host->dev);
>  
> -	if (!pci_test_config_bits(pdev, &sis_enable_bits[ap->port_no]))
> +	if (sis_enables_supported(pdev) && 
> +	    !pci_test_config_bits(pdev, &sis_enable_bits[ap->port_no]))
>  		return -ENOENT;

Should work, but please split up the operations like I've repeatedly
requested.

For the devices where enable_bits are not supported, you can use the
standard error handler.

Let me know if this needs further explanation.

	Jeff



-
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