From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Tejun Heo <tj@kernel.org>
Cc: Jeff Garzik <jeff@garzik.org>,
IDE/ATA development list <linux-ide@vger.kernel.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>, Mark Lord <liml@rtr.ca>,
rob.opensuse.linux@googlemail.com
Subject: Re: [PATCH #upstream-fixes 2/3] pata_hpt366: fix cable detection
Date: Mon, 08 Dec 2008 14:23:16 +0300 [thread overview]
Message-ID: <493D03A4.1090409@ru.mvista.com> (raw)
In-Reply-To: <493CEE74.3060601@kernel.org>
Hello.
Tejun Heo wrote:
> hpt366 is strange in that its cable detection register uses the higher
> bit for master, so the testing should be 2 >> port_no instead of 1 <<
>
For primary -- the cable bits are per-channel, not per-device.
> port_no. Fix it.
>
> Info provided by Alan Cox.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> Index: work/drivers/ata/pata_hpt366.c
> ===================================================================
> --- work.orig/drivers/ata/pata_hpt366.c
> +++ work/drivers/ata/pata_hpt366.c
> @@ -215,7 +215,7 @@ static int hpt36x_cable_detect(struct at
> struct pci_dev *pdev = to_pci_dev(ap->host->dev);
>
> pci_read_config_byte(pdev, 0x5A, &ata66);
> - if (ata66 & (1 << ap->port_no))
> + if (ata66 & (2 >> ap->port_no))
>
HPT36x are single channel per function, so the shift can be removed.
MBR, Sergei
next prev parent reply other threads:[~2008-12-08 11:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-08 9:48 [PATCH #upstream-fixes 1/3] pata_hpt366: fix clock detection Tejun Heo
2008-12-08 9:52 ` [PATCH #upstream-fixes 2/3] pata_hpt366: fix cable detection Tejun Heo
2008-12-08 10:01 ` [PATCH #upstream-fixes 3/3] pata_hpt366: update mode programming Tejun Heo
2008-12-08 11:23 ` Sergei Shtylyov [this message]
2008-12-08 11:44 ` [PATCH #upstream-fixes 2/3] pata_hpt366: fix cable detection Alan Cox
2008-12-08 13:59 ` Sergei Shtylyov
2008-12-08 14:04 ` Sergei Shtylyov
2008-12-09 1:17 ` Tejun Heo
2008-12-09 5:49 ` [PATCH #upstream-fixes 1/3] pata_hpt366: fix clock detection Jeff Garzik
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=493D03A4.1090409@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jeff@garzik.org \
--cc=liml@rtr.ca \
--cc=linux-ide@vger.kernel.org \
--cc=rob.opensuse.linux@googlemail.com \
--cc=tj@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;
as well as URLs for NNTP newsgroup(s).