Re: [PATCH] libata-sff: Don't scan disabled ports when checking for legacy mode.

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

 



Hello,

On Fri, Jan 20, 2017 at 05:58:21PM +0000, Darren Stevens wrote:
> @@ -2429,9 +2429,16 @@ int ata_pci_sff_activate_host(struct ata_host *host,
>     if ((pdev->class >> 8) == PCI_CLASS_STORAGE_IDE) {
>         u8 tmp8, mask;
>  
> -       /* TODO: What if one channel is in native mode ... */
> +       /*
> +        * ATA spec says we should use legacy mode when one
> +        * port is in legacy mode, but disabled ports on some
> +        * PCI hosts appear as fixed legacy ports, e.g SB600/700
> +        * on which the secondary port is not wired, so
> +        * ignore ports that we've marked as 'dummy' during
> +        * this check
> +        */
>         pci_read_config_byte(pdev, PCI_CLASS_PROG, &tmp8);
> -       mask = (1 << 2) | (1 << 0);
> +       mask = (! ata_port_is_dummy(host->ports[1]) << 2) | (!
> ata_port_is_dummy(host->ports[0]) << 0);

The patch is damaged and maybe just using two if statements would read
easier?

Thanks.

-- 
tejun
--
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