linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: petkovbb@gmail.com
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH 03/10] ide-atapi: teach ide atapi about drive->waiting_for_dma
Date: Wed, 17 Sep 2008 09:32:08 -0700	[thread overview]
Message-ID: <200809170932.08442.bzolnier@gmail.com> (raw)
In-Reply-To: <20080917100512.GA28378@gollum.tnic>

On Wednesday 17 September 2008 03:05:12 Borislav Petkov wrote:
> Hi,
> 
> On Mon, Sep 15, 2008 at 08:15:51PM +0200, Bartlomiej Zolnierkiewicz wrote:
> > On Sunday 14 September 2008 13:35:51 Borislav Petkov wrote:
> > > This is in preparation for converting ide-cd to generic code. The actual
> > > rewiring will be done later after the issue_pc/transfer_pc code knows all about
> > > ide-cd.
> > > 
> > > There should be no functional change resulting from this patch.
> > > 
> > > Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
> > > ---
> > >  drivers/ide/ide-atapi.c |   16 +++++++++++++---
> > >  1 files changed, 13 insertions(+), 3 deletions(-)
> > > 
> > > diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
> > > index d557841..763acd7 100644
> > > --- a/drivers/ide/ide-atapi.c
> > > +++ b/drivers/ide/ide-atapi.c
> > > @@ -487,7 +487,13 @@ static ide_startstop_t ide_transfer_pc(ide_drive_t *drive)
> > >  	ide_startstop_t startstop;
> > >  	u8 ireason;
> > >  
> > > -	if (ide_wait_stat(&startstop, drive, ATA_DRQ, ATA_BUSY, WAIT_READY)) {
> > > +	if ((drive->media == ide_cdrom || drive->media == ide_optical) &&
> > > +	    (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT)) {
> > > +		if (drive->dma)
> > > +			drive->waiting_for_dma = 1;
> > > +	}
> > 
> > We really want to do this for all ATAPI devices (as a bugfix).
> > 
> > > +	else if (ide_wait_stat(&startstop, drive, ATA_DRQ, ATA_BUSY,
> > > +			       WAIT_READY)) {
> > 
> > IIRC similar check was removed from ide-cd so maybe this one
> > is also unnecessary?

[ actually, I mistook it for cdrom_start_packet_command() check ]

> Well, according to SFF8020, this chunk is for drives which don't support the
> "Accelerated DRQ" command packet DRQ type and those drives can set the DRQ bit
> as late as 10ms after receiving the PACKET command and I guess those are really
> old. I don't know whether it will be completely safe to remove it - for that

In this case we may as well do the wait on ide-cd devices.

Thanks,
Bart

  reply	other threads:[~2008-09-17 16:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-14 11:35 [PATCH 00/10] ide-cd: use generic ide_issue_pc Borislav Petkov
2008-09-14 11:35 ` [PATCH 01/10] ide: add ide_drive_t.dma flag Borislav Petkov
2008-09-15 17:51   ` Bartlomiej Zolnierkiewicz
2008-09-14 11:35 ` [PATCH 02/10] ide-cd: move cdrom_info.dma to ide_drive_t.dma Borislav Petkov
2008-09-15 17:54   ` Bartlomiej Zolnierkiewicz
2008-09-14 11:35 ` [PATCH 03/10] ide-atapi: teach ide atapi about drive->waiting_for_dma Borislav Petkov
2008-09-15 18:15   ` Bartlomiej Zolnierkiewicz
2008-09-17 10:05     ` Borislav Petkov
2008-09-17 16:32       ` Bartlomiej Zolnierkiewicz [this message]
2008-09-14 11:35 ` [PATCH 04/10] ide-atapi: assign taskfile flags per device type Borislav Petkov
2008-09-15 17:54   ` Bartlomiej Zolnierkiewicz
2008-09-14 11:35 ` [PATCH 05/10] ide-atapi: accomodate transfer length to ide-cd Borislav Petkov
2008-09-15 18:15   ` Bartlomiej Zolnierkiewicz
2008-09-14 11:35 ` [PATCH 06/10] ide-atapi: add a DEV_IS_IDECD macro Borislav Petkov
2008-09-15 18:19   ` Bartlomiej Zolnierkiewicz
2008-09-14 11:35 ` [PATCH 07/10] ide-atapi: prepare ide-cd expiry handler Borislav Petkov
2008-09-15 18:25   ` Bartlomiej Zolnierkiewicz
2008-09-14 11:35 ` [PATCH 08/10] ide-atapi: accomodate to ide-cd-specific handlers Borislav Petkov
2008-09-14 11:35 ` [PATCH 09/10] ide-atapi: protect ide_atapi_pc pointer from ide-cd code path Borislav Petkov
2008-09-14 11:35 ` [PATCH 10/10] ide-cd: use generic ide_issue_pc Borislav Petkov
2008-09-15 18:30 ` [PATCH 00/10] " Bartlomiej Zolnierkiewicz

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=200809170932.08442.bzolnier@gmail.com \
    --to=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=petkovbb@gmail.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).