From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH 2/4] it8213/piix/slc90e66: don't change DMA settings when programming PIO
Date: Sun, 22 Jul 2007 20:47:08 +0200 [thread overview]
Message-ID: <200707222047.08128.bzolnier@gmail.com> (raw)
In-Reply-To: <46A0F17B.3080702@ru.mvista.com>
On Friday 20 July 2007, Sergei Shtylyov wrote:
> Bartlomiej Zolnierkiewicz wrote:
>
> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
>
> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
added
> > Index: b/drivers/ide/pci/it8213.c
> > ===================================================================
> > --- a/drivers/ide/pci/it8213.c
> > +++ b/drivers/ide/pci/it8213.c
> > @@ -134,6 +134,11 @@ static int it8213_tune_chipset(ide_drive
> > u16 reg4042, reg4a;
> > u8 reg48, reg54, reg55;
> >
> > + if (speed >= XFER_PIO_0 && speed <= XFER_PIO_4) {
> > + it8213_tune_pio(drive, speed - XFER_PIO_0);
> > + return ide_config_drive_speed(drive, speed);
> > + }
> > +
> > pci_read_config_word(dev, maslave, ®4042);
> > pci_read_config_byte(dev, 0x48, ®48);
> > pci_read_config_word(dev, 0x4a, ®4a);
> > @@ -153,12 +158,6 @@ static int it8213_tune_chipset(ide_drive
> > case XFER_MW_DMA_1:
> > case XFER_SW_DMA_2:
> > break;
> > - case XFER_PIO_4:
> > - case XFER_PIO_3:
> > - case XFER_PIO_2:
> > - case XFER_PIO_1:
> > - case XFER_PIO_0:
> > - break;
>
> Erm, why nmot just change this part, i.e. call it8213_tune_pio() and
> ide_config_drive_speed() here? Would have been simpler...
to get rid of unnecessary PCI reads
> > default:
> > return -1;
> > }
> > @@ -190,10 +189,7 @@ static int it8213_tune_chipset(ide_drive
> > pci_write_config_byte(dev, 0x55, (u8) reg55 & ~w_flag);
> > }
> >
> > - if (speed > XFER_PIO_4)
> > - it8213_tune_pio(drive, it8213_dma_2_pio(speed));
> > - else
> > - it8213_tune_pio(drive, speed - XFER_PIO_0);
> > + it8213_tune_pio(drive, it8213_dma_2_pio(speed));
> >
> > return ide_config_drive_speed(drive, speed);
> > }
> [...]
>
> The same comment for 2 other drivers...
ditto
prev parent reply other threads:[~2007-07-22 18:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-20 10:25 [PATCH 2/4] it8213/piix/slc90e66: don't change DMA settings when programming PIO Bartlomiej Zolnierkiewicz
2007-07-20 17:31 ` Sergei Shtylyov
2007-07-22 18:47 ` 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=200707222047.08128.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).