public inbox for linux-ide@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Darren Stevens <darren@stevens-zone.net>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH] libata-sff: Don't scan disabled ports when checking for legacy mode.
Date: Fri, 20 Jan 2017 15:41:36 -0500	[thread overview]
Message-ID: <20170120204136.GD9280@mtj.duckdns.org> (raw)
In-Reply-To: <497610a8448.441e0a10@auth.smtp.1and1.co.uk>

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

  reply	other threads:[~2017-01-20 20:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-20 17:58 [PATCH] libata-sff: Don't scan disabled ports when checking for legacy mode Darren Stevens
2017-01-20 20:41 ` Tejun Heo [this message]
2017-01-22 19:40   ` Darren Stevens
2017-01-23  8:29 ` [PATCH] " Sergei Shtylyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170120204136.GD9280@mtj.duckdns.org \
    --to=tj@kernel.org \
    --cc=darren@stevens-zone.net \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox