Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH 8/11] ide-pmac: remove extra good status wait from pmac_ide_do_setfeature()
Date: Mon, 23 Jul 2007 08:02:08 +1000	[thread overview]
Message-ID: <1185141728.5439.69.camel@localhost.localdomain> (raw)
In-Reply-To: <200707222032.28467.bzolnier@gmail.com>

On Sun, 2007-07-22 at 20:32 +0200, Bartlomiej Zolnierkiewicz wrote:
> Don't check for good device status before executing the command in
> pmac_ide_do_setfeature() (ide_config_drive_speed() doesn't do this).
> 
> It is a job of upper layers to guarantee that the device is ready to
> accept new command before we get here.

I had issues in those areas ... I'd like to keep a warning at least or
something in there for now.

Ben.

> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> ---
>  drivers/ide/ppc/pmac.c |   12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
> 
> Index: b/drivers/ide/ppc/pmac.c
> ===================================================================
> --- a/drivers/ide/ppc/pmac.c
> +++ b/drivers/ide/ppc/pmac.c
> @@ -547,16 +547,6 @@ pmac_ide_do_setfeature(ide_drive_t *driv
>  	SELECT_DRIVE(drive);
>  	SELECT_MASK(drive, 0);
>  	udelay(1);
> -	/* Get rid of pending error state */
> -	(void) hwif->INB(IDE_STATUS_REG);
> -	/* Timeout bumped for some powerbooks */
> -	if (wait_for_ready(drive, 2000)) {
> -		/* Timeout bumped for some powerbooks */
> -		printk(KERN_ERR "%s: pmac_ide_do_setfeature disk not ready "
> -			"before SET_FEATURE!\n", drive->name);
> -		goto out;
> -	}
> -	udelay(10);
>  	hwif->OUTB(drive->ctl | 2, IDE_CONTROL_REG);
>  	hwif->OUTB(command, IDE_NSECTOR_REG);
>  	hwif->OUTB(SETFEATURES_XFER, IDE_FEATURE_REG);
> @@ -568,7 +558,7 @@ pmac_ide_do_setfeature(ide_drive_t *driv
>  	if (result)
>  		printk(KERN_ERR "%s: pmac_ide_do_setfeature disk not ready "
>  			"after SET_FEATURE !\n", drive->name);
> -out:
> +
>  	SELECT_MASK(drive, 0);
>  	if (result == 0) {
>  		drive->id->dma_ultra &= ~0xFF00;


      reply	other threads:[~2007-07-22 22:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-22 18:32 [PATCH 8/11] ide-pmac: remove extra good status wait from pmac_ide_do_setfeature() Bartlomiej Zolnierkiewicz
2007-07-22 22:02 ` Benjamin Herrenschmidt [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=1185141728.5439.69.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=bzolnier@gmail.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