From 98f5097381c09ecd8b937e49ebdb674280990fed Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Mon, 19 Nov 2007 14:33:11 +0000 Subject: [PATCH] --- yaml --- r: 76869 b: refs/heads/master c: b9f8ab2dafba2dc12dd94e5d2db31d5cf495775f h: refs/heads/master i: 76867: 2d35457bd44bad14da99099cdde46d89a78f373c v: v3 --- [refs] | 2 +- trunk/drivers/ata/libata-core.c | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index bb149337361e..3812de6c25a3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bd3adca52bc43b72c75db3e4c7809d47923b154c +refs/heads/master: b9f8ab2dafba2dc12dd94e5d2db31d5cf495775f diff --git a/trunk/drivers/ata/libata-core.c b/trunk/drivers/ata/libata-core.c index 9b7f3c477730..3dd0e942df36 100644 --- a/trunk/drivers/ata/libata-core.c +++ b/trunk/drivers/ata/libata-core.c @@ -4373,7 +4373,14 @@ static unsigned int ata_dev_set_xfermode(struct ata_device *dev) tf.feature = SETFEATURES_XFER; tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE | ATA_TFLAG_POLLING; tf.protocol = ATA_PROT_NODATA; - tf.nsect = dev->xfer_mode; + /* If we are using IORDY we must send the mode setting command */ + if (ata_pio_need_iordy(dev)) + tf.nsect = dev->xfer_mode; + /* If the device has IORDY and the controller does not - turn it off */ + else if (ata_id_has_iordy(dev->id)) + tf.nsect = 0x01; + else /* In the ancient relic department - skip all of this */ + return 0; err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0);