Patchwork [25/68] it8213: always program control bits

login
register
mail settings
Submitter Bartlomiej Zolnierkiewicz
Date Jan. 29, 2010, 4:05 p.m.
Message ID <20100129160551.21495.52656.sendpatchset@localhost>
Download mbox | patch
Permalink /patch/43941/
State RFC
Delegated to: David Miller
Headers show

Comments

Bartlomiej Zolnierkiewicz - Jan. 29, 2010, 4:05 p.m.
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: [PATCH] it8213: always program control bits

This matches behavior of libata pata_it8213 host driver.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/it8213.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

--
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
Sergei Shtylyov - Jan. 29, 2010, 5:36 p.m.
Hello.

Bartlomiej Zolnierkiewicz wrote:

> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Subject: [PATCH] it8213: always program control bits
>
> This matches behavior of libata pata_it8213 host driver.
>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> ---
>  drivers/ide/it8213.c |    6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> Index: b/drivers/ide/it8213.c
> ===================================================================
> --- a/drivers/ide/it8213.c
> +++ b/drivers/ide/it8213.c
> @@ -55,15 +55,13 @@ static void it8213_set_pio_mode(ide_hwif
>  	if (is_slave) {
>  		master_data |=  0x4000;
>  		master_data &= ~0x0070;
> -		if (pio > 1)
> -			master_data = master_data | (control << 4);
> +		master_data = master_data | (control << 4);
>   

    master_data |= control << 4; /* it's C after all */

>  		pci_read_config_byte(dev, slave_port, &slave_data);
>  		slave_data = slave_data & 0xf0;
>  		slave_data = slave_data | (timings[pio][0] << 2) | timings[pio][1];
>  	} else {
>  		master_data &= ~0x3307;
> -		if (pio > 1)
> -			master_data = master_data | control;
> +		master_data = master_data | control;
>   

    master_data |= control;

>  		master_data = master_data | (timings[pio][0] << 12) | (timings[pio][1] << 8);
>   

MBR, Sergei

--
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

Index: b/drivers/ide/it8213.c
===================================================================
--- a/drivers/ide/it8213.c
+++ b/drivers/ide/it8213.c
@@ -55,15 +55,13 @@  static void it8213_set_pio_mode(ide_hwif
 	if (is_slave) {
 		master_data |=  0x4000;
 		master_data &= ~0x0070;
-		if (pio > 1)
-			master_data = master_data | (control << 4);
+		master_data = master_data | (control << 4);
 		pci_read_config_byte(dev, slave_port, &slave_data);
 		slave_data = slave_data & 0xf0;
 		slave_data = slave_data | (timings[pio][0] << 2) | timings[pio][1];
 	} else {
 		master_data &= ~0x3307;
-		if (pio > 1)
-			master_data = master_data | control;
+		master_data = master_data | control;
 		master_data = master_data | (timings[pio][0] << 12) | (timings[pio][1] << 8);
 	}
 	pci_write_config_word(dev, master_port, master_data);