linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH pata-2.6] hpt366: simplify UltraDMA filtering (take 2)
Date: Mon, 7 May 2007 20:24:13 +0200	[thread overview]
Message-ID: <200705072024.13695.bzolnier@gmail.com> (raw)
In-Reply-To: <463E2720.500@ru.mvista.com>

On Sunday 06 May 2007, Sergei Shtylyov wrote:
> Hello, I wrote:
> > Simplify UltraDMA mode filtering in the driver:
> 
> > - make use of the newly introduced 'udma_mask' field of 'ide_pci_device_t' to
> >   set the correct hwif->ultra_mask, modifying init_setup_hpt366() to select
> >   the correct mask based on the chip revision;
> 
> > - replace 'max_mode' field of the 'struct hpt_info' with 'max_ultra' specifying
> >   the maximum UltraDMA mode allowed;
> 
> > - rewrite hpt3xx_udma_filter() to differ the filters based on the 'chip_type'
> >   field, and only use it for HPT366 and HPT370[A] where it's really necessary.
> > 
> > Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
> > 
> > Index: linux-2.6/drivers/ide/pci/hpt366.c
> > ===================================================================
> > --- linux-2.6.orig/drivers/ide/pci/hpt366.c
> > +++ linux-2.6/drivers/ide/pci/hpt366.c
> > @@ -1502,9 +1490,33 @@ static int __devinit init_setup_hpt366(s
> >  
> >  	pci_read_config_byte(dev, PCI_REVISION_ID, &rev);
> >  
> > -	if (rev > 6)
> > +	switch (rev) {
> > +	case 0:
> > +	case 1:
> > +	case 2:
> > +		/*
> > +		 * HPT36x chips are single channel and
> > +		 * do not seem to have the channel enable bit...
> > +		 */
> > +		d->channels = 1;
> > +		d->enablebits[0].reg = 0;
> > +
> > +		d->udma_mask = HPT366_ALLOW_ATA66_3 ?
> > +			      (HPT366_ALLOW_ATA66_4 ? 0x1f : 0x0f) : 0x07;
> > +		break;
> > +	case 3:
> > +	case 4:
> > +		d->udma_mask = HPT370_ALLOW_ATA100_5 ? 0x3f : 0x1f;
> > +		break;
> > +	default:
> >  		rev = 6;
> > -		
> > +		/* fall thru */
> > +	case 5:
> > +	case 6:
> > +		d->udma_mask = HPT372_ALLOW_ATA133_6 ? 0x7f : 0x3f;
> > +		break;
> > +	}
> > +
> >  	d->name = chipset_names[rev];
> >  
> >  	pci_set_drvdata(dev, info[rev]);
> > @@ -1512,12 +1524,7 @@ static int __devinit init_setup_hpt366(s
> >  	if (rev > 2)
> >  		goto init_single;
> >  
> > -	/*
> > -	 * HPT36x chips are single channel and
> > -	 * do not seem to have the channel enable bit...
> > -	 */
> >  	d->channels = 1;
> 
>     Duh, don't know how this slipped in!
>     Bart, could you please this duplicate line?

done (duplicate line has been removed)

      reply	other threads:[~2007-05-07 18:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-05 20:24 [PATCH pata-2.6] hpt366: simplify UltraDMA filtering (take 2) Sergei Shtylyov
2007-05-05 21:12 ` Bartlomiej Zolnierkiewicz
2007-05-06 19:06 ` Sergei Shtylyov
2007-05-07 18:24   ` Bartlomiej Zolnierkiewicz [this message]

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=200705072024.13695.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=sshtylyov@ru.mvista.com \
    /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).