linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
To: Ronny Buchmann <ronny-lkml@vlugnet.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, Marko Kreen <marko@l-t.ee>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [OOPS] 2.4.22 / HPT372N
Date: Fri, 12 Sep 2003 18:35:12 +0200	[thread overview]
Message-ID: <200309121835.12649.bzolnier@elka.pw.edu.pl> (raw)
In-Reply-To: <200309121726.01792.ronny-lkml@vlugnet.org>

On Friday 12 of September 2003 17:26, Ronny Buchmann wrote:
> Am Freitag 12 September 2003 16:42 schrieben Sie:
> > On Friday 12 of September 2003 16:24, Ronny Buchmann wrote:
> > > Am Freitag 12 September 2003 14:58 schrieb Bartlomiej Zolnierkiewicz:
> > > > On Friday 12 of September 2003 12:48, Alan Cox wrote:
> > > > > On Gwe, 2003-09-12 at 10:41, Ronny Buchmann wrote:
> > > > > > -	d->channels = 1;
> > > > > > +	d->channels = 2;
> > > > >
> > > > > Need to work out which 372N and others are dual channel but yes
> > > >
> > > > No, "d->channels = 1" is only executed for orginal HPT366 which has
> > > > separate PCI configurations for first and second channel.  For
> > > > HPT372N you have correct value in hpt366.h - ".channels = 2".
>
> Some of the HPT372N (including mine) have the same device id as the HPT366
> (0004), they differ only in revision (rev 6 is 372N).
>
> (this logic is already used in other functions)
>
> --- linux-2.4.22-ac1/drivers/ide/pci/hpt366.c.orig	2003-09-11
> 21:29:06.000000000 +0200 +++
> linux-2.4.22-ac1/drivers/ide/pci/hpt366.c	2003-09-12 17:13:31.000000000
> +0200 @@ -1343,7 +1343,7 @@
>  	u8 pin1 = 0, pin2 = 0;
>  	unsigned int class_rev;
>  	static char *chipset_names[] = {"HPT366", "HPT366",  "HPT368",
> -				 "HPT370", "HPT370A", "HPT372"};
> +				 "HPT370", "HPT370A", "HPT372", "HPT372N"};
>
>  	if (PCI_FUNC(dev->devfn) & 1)
>  		return;
> @@ -1351,16 +1351,11 @@
>  	pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev);
>  	class_rev &= 0xff;
>
> -	/* New ident 372N reports revision 1. We could do the
> -	   io port based type identification instead perhaps (DID, RID) */
> -
> -	if(d->device == PCI_DEVICE_ID_TTI_HPT372N)
> -		class_rev = 5;
> -
> -	if(class_rev < 6)
> +	if(class_rev <= 6)
>  		d->name = chipset_names[class_rev];
>
>  	switch(class_rev) {
> +		case 6:
>  		case 5:
>  		case 4:
>  		case 3: ide_setup_pci_device(dev, d);
>
> Since the 372N with the new id (0009) is set up with init_setup_37x(),
> "class_rev = 5" is never executed.
>
> So the second part of the previous patch is wrong.

Looks good, thanks.

--bartlomiej



  reply	other threads:[~2003-09-12 16:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-09 12:06 [OOPS] 2.4.22 / HPT372N Ronny Buchmann
2003-09-11 12:34 ` Marko Kreen
2003-09-12  9:41   ` Ronny Buchmann
2003-09-12 10:48     ` Alan Cox
2003-09-12 12:32       ` Ronny Buchmann
2003-09-12 12:46         ` Alan Cox
2003-09-12 12:58       ` Bartlomiej Zolnierkiewicz
2003-09-12 14:24         ` Ronny Buchmann
2003-09-12 14:42           ` Bartlomiej Zolnierkiewicz
2003-09-12 15:26             ` Ronny Buchmann
2003-09-12 16:35               ` Bartlomiej Zolnierkiewicz [this message]
2003-09-12 20:32     ` Ronny Buchmann
  -- strict thread matches above, loose matches on Subject: below --
2003-09-04 19:07 Marko Kreen
2003-09-04 21:46 ` Alan Cox
2003-09-05 14:54   ` Marko Kreen
2003-09-05 21:51     ` 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=200309121835.12649.bzolnier@elka.pw.edu.pl \
    --to=b.zolnierkiewicz@elka.pw.edu.pl \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marko@l-t.ee \
    --cc=ronny-lkml@vlugnet.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).