Patchwork [01/20] ata_piix: SITRE handling fix

login
register
mail settings
Submitter Bartlomiej Zolnierkiewicz
Date Feb. 8, 2011, 12:23 p.m.
Message ID <20110208122337.19110.8889.sendpatchset@linux-mhg7.site>
Download mbox | patch
Permalink /patch/82324/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Bartlomiej Zolnierkiewicz - Feb. 8, 2011, 12:23 p.m.
From 7b6d27a9d65fef8795fdeee3733316450f840aa6 Mon Sep 17 00:00:00 2001
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Date: Tue, 8 Feb 2011 12:39:24 +0100
Subject: [PATCH 01/20] ata_piix: SITRE handling fix

Set SITRE bit also in master-only configurations.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ata/ata_piix.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
Bartlomiej Zolnierkiewicz - Feb. 8, 2011, 1:02 p.m.
On Tue, Feb 8, 2011 at 2:04 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> On Tue, 08 Feb 2011 13:23:37 +0100
> Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
>
>> >From 7b6d27a9d65fef8795fdeee3733316450f840aa6 Mon Sep 17 00:00:00 2001
>> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
>> Date: Tue, 8 Feb 2011 12:39:24 +0100
>> Subject: [PATCH 01/20] ata_piix: SITRE handling fix
>>
>> Set SITRE bit also in master-only configurations.
>
> Why ?

Mainly to match other PIIX-alike drivers and make further changes easier..
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alan Cox - Feb. 8, 2011, 1:04 p.m.
On Tue, 08 Feb 2011 13:23:37 +0100
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:

> >From 7b6d27a9d65fef8795fdeee3733316450f840aa6 Mon Sep 17 00:00:00 2001
> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Date: Tue, 8 Feb 2011 12:39:24 +0100
> Subject: [PATCH 01/20] ata_piix: SITRE handling fix
> 
> Set SITRE bit also in master-only configurations.

Why ?
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 6cb14ca..0f4856d 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -751,8 +751,6 @@  static void piix_set_piomode(struct ata_port *ap, struct ata_device *adev)
 	if (is_slave) {
 		/* clear TIME1|IE1|PPE1|DTE1 */
 		master_data &= 0xff0f;
-		/* Enable SITRE (separate slave timing register) */
-		master_data |= 0x4000;
 		/* enable PPE1, IE1 and TIME1 as needed */
 		master_data |= (control << 4);
 		pci_read_config_byte(dev, slave_port, &slave_data);
@@ -770,6 +768,9 @@  static void piix_set_piomode(struct ata_port *ap, struct ata_device *adev)
 			(timings[pio][0] << 12) |
 			(timings[pio][1] << 8);
 	}
+
+	/* Enable SITRE (separate slave timing register) */
+	master_data |= 0x4000;
 	pci_write_config_word(dev, master_port, master_data);
 	if (is_slave)
 		pci_write_config_byte(dev, slave_port, slave_data);