From: Tejun Heo <tj@kernel.org>
To: Alan Cox <alan@linux.intel.com>
Cc: linux-ide@vger.kernel.org, jeff@garzik.org
Subject: Re: [PATCH RFC] ata: Intel IDE-R support
Date: Tue, 17 Aug 2010 18:19:25 +0200 [thread overview]
Message-ID: <4C6AB68D.8000102@kernel.org> (raw)
In-Reply-To: <20100810155559.7620.79711.stgit@localhost.localdomain>
On 08/10/2010 05:56 PM, Alan Cox wrote:
> Intel IDE-R devices are part of the Intel AMT management setup. They don't
> have any special configuration registers or settings so the ata_generic
> driver will support them fully.
>
> Rather than add a huge table of IDs for each chipset and keep sending in
> new ones this patch autodetects them.
>
> (And yes Jeff I'll resurrect the delay patches in a couple of weeks)
>
> Signed-off-by: Alan Cox <alan@linux.intel.com>
...
> +static int is_intel_ider(struct pci_dev *dev)
> +{
> + /* For Intel IDE the value at 0xF8 is only zero on IDE-R
> + interfaces */
> + u32 r;
> + u16 t;
> +
> + pci_read_config_dword(dev, 0xF8, &r);
> + /* Not IDE-R: punt so that ata_(old)piix gets it */
> + if (r != 0)
> + return 0;
> + /* 0xF8 is also be zero on some early Intel IDE devices
> + but they will have a sane timing register */
> + pci_read_config_word(dev, 0x40, &t);
> + if (t != 0)
> + return 0;
> + /* Finally check if the timing register is writable so that
> + we eliminate any early devices hot-docked in a docking
> + station */
> + pci_write_config_word(dev, 0x40, 1);
> + pci_read_config_word(dev, 0x40, &t);
> + if (t) {
> + pci_write_config_word(dev, 0x40, 0);
> + return 0;
> + }
> + return 1;
> +}
This looks scary to me. Is this something documented somewhere? It's
not like we can avoid adding PCI device IDs completely anyway, so I
would suggest just doing it good old fashioned way.
Thanks.
--
tejun
next prev parent reply other threads:[~2010-08-17 16:23 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-10 15:56 [PATCH RFC] ata: Intel IDE-R support Alan Cox
2010-08-10 17:12 ` Sergei Shtylyov
2010-08-10 22:23 ` Alan Cox
2010-08-17 16:19 ` Tejun Heo [this message]
2010-08-17 16:42 ` Alan Cox
2010-08-17 16:30 ` Tejun Heo
2010-08-17 17:01 ` Alan Cox
2010-08-17 16:59 ` Tejun Heo
2010-08-17 18:23 ` Alan Cox
2010-08-18 6:19 ` Tejun Heo
2010-08-18 10:03 ` Alan Cox
2010-08-18 14:10 ` Tejun Heo
2010-08-18 15:15 ` Alan Cox
2010-08-19 9:37 ` Tejun Heo
2010-08-19 10:09 ` Alan Cox
2010-08-19 11:22 ` Tejun Heo
2010-08-19 11:35 ` Kay Sievers
2010-08-19 11:42 ` Tejun Heo
2010-08-19 12:24 ` Kay Sievers
2010-08-19 12:33 ` Tejun Heo
2010-08-19 12:52 ` Kay Sievers
2010-08-19 12:54 ` Tejun Heo
2010-08-19 13:08 ` Kay Sievers
2010-08-19 13:14 ` Tejun Heo
2010-08-19 12:56 ` Tejun Heo
2010-08-19 18:05 ` Jeff Garzik
2010-08-19 11:02 ` Tim Small
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=4C6AB68D.8000102@kernel.org \
--to=tj@kernel.org \
--cc=alan@linux.intel.com \
--cc=jeff@garzik.org \
--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;
as well as URLs for NNTP newsgroup(s).