linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH] libata-core: Allow translation setting to fail
Date: Fri, 31 Aug 2007 03:38:51 -0400	[thread overview]
Message-ID: <46D7C58B.8020009@garzik.org> (raw)
In-Reply-To: <20070808142849.7927173d@the-village.bc.nu>

Alan Cox wrote:
> On some early drives (pre ATA1) this feature is not supported. If it
> fails then we know the drive geometry is the hardware geometry and the
> one we tried to set anyway so just carry on.
> 
> Signed-off-by: Alan Cox <alan@redhat.com>
> 
> diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.23rc1-mm1/drivers/ata/libata-core.c linux-2.6.23rc1-mm1/drivers/ata/libata-core.c
> --- linux.vanilla-2.6.23rc1-mm1/drivers/ata/libata-core.c	2007-07-26 15:02:57.000000000 +0100
> +++ linux-2.6.23rc1-mm1/drivers/ata/libata-core.c	2007-08-08 13:38:39.257549616 +0100
> @@ -4081,6 +4170,11 @@
>  	tf.device |= (heads - 1) & 0x0f; /* max head = num. of heads - 1 */
>  
>  	err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0);
> +	/* A clean abort indicates an original or just out of spec drive
> +	   and we should continue as we issue the setup based on the
> +	   drive reported working geometry */
> +	if (err_mask == AC_ERR_DEV && (tf.feature & ATA_ABORTED))
> +		err_mask &= ~AC_ERR_DEV;

applied, after changing the above quoted line to 'err_mask = 0'.



      reply	other threads:[~2007-08-31  7:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-08 13:28 [PATCH] libata-core: Allow translation setting to fail Alan Cox
2007-08-31  7:38 ` Jeff Garzik [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=46D7C58B.8020009@garzik.org \
    --to=jeff@garzik.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --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;
as well as URLs for NNTP newsgroup(s).