From: Alek Du <alek.du@intel.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-ide@vger.kernel.org, jgarzik@pobox.com
Subject: Re: [PATCH] ata: Add Intel SCH PATA support
Date: Sun, 27 Apr 2008 07:51:15 +0800 [thread overview]
Message-ID: <20080427075115.3ea40204@dxy.sh.intel.com> (raw)
In-Reply-To: <20080426103012.21dcf0fb@core>
Alan,
Thanks for your comments:
On Sat, 26 Apr 2008 17:30:12 +0800
"Alan Cox" <alan@lxorguk.ukuu.org.uk> wrote:
> Re: [PATCH] ata: Add Intel SCH PATA support
>
> > +struct sch_80 {
> > + u16 device;
> > +};
>
> That seems somewhat overkill
I have to consider there would be other PATA controllers work this way.
>
> > + /* Check for specials - Intel SCH chipset */
> > + while (sch->device) {
> > + if (sch->device == pdev->device)
> > + return ATA_CBL_PATA80;
> > + sch++;
>
> PATA_80 means "controller *knows* we are 80 wire". PATA_UNK means
> "controller can't do detect."
I need to force SCH to use PATA 80 pins to enable UDMA5, just like the way ich_laptop force
to use 40 pins.
>
> > + /* Check for specials - Intel SCH chipset */
> > + while (sch->device) {
> > + if (sch->device == pdev->device) {
> > + skip_check = 1;
> > + break;
> > + }
> > + sch++;
>
> This is horrible. If you just defined a new set of methods for your new
> controller (remembering we now have inheritance anyway) you'd just use
> the ata_sff_prereset and remove all the special casing code. At the very
> least write the routine once only;)
>
hmmm... for non-sch chipsets, there is no impact, this will only affect sch. You mean
I should create a ata_sch.c file instead of patching ata_piix.c ?
> > + }
> > + if (!skip_check)
> > + if (!pci_test_config_bits(pdev, &piix_enable_bits[ap->port_no]))
> > + return -ENOENT;
> > return ata_sff_prereset(link, deadline);
> > }
> >
next prev parent reply other threads:[~2008-04-26 23:58 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-26 6:00 [PATCH] ata: Add Intel SCH PATA support Alek Du
2008-04-26 9:30 ` Alan Cox
2008-04-26 23:51 ` Alek Du [this message]
2008-04-27 8:34 ` Alan Cox
2008-04-27 14:03 ` Alek Du
2008-04-27 14:31 ` Alan Cox
2008-04-28 1:20 ` Alek Du
2008-04-28 9:16 ` Alan Cox
2008-04-29 17:22 ` Sergei Shtylyov
2008-04-28 4:05 ` [PATCH] ata: Add Intel SCH PATA support (revised) Alek Du
2008-04-28 8:41 ` Alan Cox
2008-04-28 9:07 ` Alek Du
2008-04-28 9:21 ` Alan Cox
2008-04-28 19:01 ` Bartlomiej Zolnierkiewicz
2008-04-29 0:14 ` Alek Du
2008-04-29 3:41 ` Alek Du
2008-04-29 3:39 ` Alek Du
2008-04-29 16:38 ` Sergei Shtylyov
2008-04-30 2:49 ` Alek Du
2008-04-30 11:17 ` Sergei Shtylyov
2008-04-26 16:46 ` [PATCH] ata: Add Intel SCH PATA support Sergei Shtylyov
2008-04-26 23:32 ` Alek Du
2008-04-26 23:50 ` Alan Cox
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=20080427075115.3ea40204@dxy.sh.intel.com \
--to=alek.du@intel.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jgarzik@pobox.com \
--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).