linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Alek Du <alek.du@intel.com>
Cc: linux-ide@vger.kernel.org, jgarzik@pobox.com
Subject: Re: [PATCH] ata: Add Intel SCH PATA support
Date: Sat, 26 Apr 2008 10:30:12 +0100	[thread overview]
Message-ID: <20080426103012.21dcf0fb@core> (raw)
In-Reply-To: <20080426140007.63cfeede@dxy.sh.intel.com>

> +struct sch_80 {
> +       u16 device;
> +};

That seems somewhat overkill

> +       /* 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."

> +       /* 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;)

> +       }
> +       if (!skip_check)
> +               if (!pci_test_config_bits(pdev, &piix_enable_bits[ap->port_no]))
> +                       return -ENOENT;
>         return ata_sff_prereset(link, deadline);
>  }
> 

  reply	other threads:[~2008-04-26  9:37 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 [this message]
2008-04-26 23:51   ` Alek Du
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=20080426103012.21dcf0fb@core \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=alek.du@intel.com \
    --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).