Skip to content

Commit

Permalink
libata-core: Allow translation setting to fail
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Alan Cox authored and Jeff Garzik committed Aug 31, 2007
1 parent 2d8348b commit 18b2466
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3985,6 +3985,11 @@ static unsigned int ata_dev_init_params(struct ata_device *dev,
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 = 0;

DPRINTK("EXIT, err_mask=%x\n", err_mask);
return err_mask;
Expand Down

0 comments on commit 18b2466

Please sign in to comment.