* [PATCH] libata-core: Allow translation setting to fail
@ 2007-08-08 13:28 Alan Cox
2007-08-31 7:38 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Alan Cox @ 2007-08-08 13:28 UTC (permalink / raw)
To: linux-ide, jeff
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;
DPRINTK("EXIT, err_mask=%x\n", err_mask);
return err_mask;
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] libata-core: Allow translation setting to fail
2007-08-08 13:28 [PATCH] libata-core: Allow translation setting to fail Alan Cox
@ 2007-08-31 7:38 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-08-31 7:38 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-ide
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'.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-31 7:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-08 13:28 [PATCH] libata-core: Allow translation setting to fail Alan Cox
2007-08-31 7:38 ` Jeff Garzik
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).