LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-ide@vger.kernel.org
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/8] dtc2278: fix ->io_32bit handling
Date: Sun, 06 Jan 2008 18:02:27 +0100	[thread overview]
Message-ID: <20080106170227.6861.71421.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20080106170220.6861.4814.sendpatchset@localhost.localdomain>

On DTC2278 32-bit I/O has to be enabled for both devices on the port
so always enable it during init time and disallow further changes.

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/ide.c            |    4 ----
 drivers/ide/legacy/dtc2278.c |   12 ++++++------
 2 files changed, 6 insertions(+), 10 deletions(-)

Index: b/drivers/ide/ide.c
===================================================================
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -791,10 +791,6 @@ int set_io_32bit(ide_drive_t *drive, int
 		return -EBUSY;
 
 	drive->io_32bit = arg;
-#ifdef CONFIG_BLK_DEV_DTC2278
-	if (HWIF(drive)->chipset == ide_dtc2278)
-		HWIF(drive)->drives[!drive->select.b.unit].io_32bit = arg;
-#endif /* CONFIG_BLK_DEV_DTC2278 */
 
 	spin_unlock_irq(&ide_lock);
 
Index: b/drivers/ide/legacy/dtc2278.c
===================================================================
--- a/drivers/ide/legacy/dtc2278.c
+++ b/drivers/ide/legacy/dtc2278.c
@@ -84,12 +84,6 @@ static void dtc2278_set_pio_mode(ide_dri
 		/* Actually we do - there is a data sheet available for the
 		   Winbond but does anyone actually care */
 	}
-
-	/*
-	 * 32bit I/O has to be enabled for *both* drives at the same time.
-	 */
-	drive->io_32bit = 1;
-	HWIF(drive)->drives[!drive->select.b.unit].io_32bit = 1;
 }
 
 static int __init dtc2278_probe(void)
@@ -123,18 +117,24 @@ static int __init dtc2278_probe(void)
 	local_irq_restore(flags);
 
 	hwif->serialized = 1;
+	hwif->no_io_32bit = 1;	/* disallow ->io_32bit changes */
 	hwif->chipset = ide_dtc2278;
 	hwif->pio_mask = ATA_PIO4;
 	hwif->set_pio_mode = &dtc2278_set_pio_mode;
 	hwif->drives[0].no_unmask = 1;
 	hwif->drives[1].no_unmask = 1;
+	hwif->drives[0].io_32bit = 1;
+	hwif->drives[1].io_32bit = 1;
 	hwif->mate = mate;
 
 	mate->serialized = 1;
+	mate->no_io_32bit = 1;
 	mate->chipset = ide_dtc2278;
 	mate->pio_mask = ATA_PIO4;
 	mate->drives[0].no_unmask = 1;
 	mate->drives[1].no_unmask = 1;
+	mate->drives[0].io_32bit = 1;
+	mate->drives[1].io_32bit = 1;
 	mate->mate = hwif;
 	mate->channel = 1;
 

  reply	other threads:[~2008-01-06 16:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-06 17:02 [PATCH 0/8] ide: more IDE probing code rework Bartlomiej Zolnierkiewicz
2008-01-06 17:02 ` Bartlomiej Zolnierkiewicz [this message]
2008-01-06 17:02 ` [PATCH 2/8] au1xxx-ide: fix ->io_32bit handling Bartlomiej Zolnierkiewicz
2008-01-06 17:02 ` [PATCH 3/8] atiixp/cs5535/scc_pata: fix "idex=ata66" parameter handling Bartlomiej Zolnierkiewicz
2008-01-06 17:02 ` [PATCH 4/8] macide: remove drive->capacity64 quirk Bartlomiej Zolnierkiewicz
2008-01-06 17:02 ` [PATCH 5/8] ide: always set DMA masks in ide_pci_setup_ports() Bartlomiej Zolnierkiewicz
2008-01-29 20:02   ` Sergei Shtylyov
2008-01-06 17:03 ` [PATCH 6/8] ide: separate PCI specific init from generic init " Bartlomiej Zolnierkiewicz
2008-01-06 17:03 ` [PATCH 7/8] ide: add struct ide_port_info instances to legacy host drivers Bartlomiej Zolnierkiewicz
2008-01-28 20:28   ` Sergei Shtylyov
2008-02-01 23:35     ` Bartlomiej Zolnierkiewicz
2008-02-11 18:36       ` Russell King
2008-02-10 16:07   ` Atsushi Nemoto
2008-02-10 17:04     ` Bartlomiej Zolnierkiewicz
2008-02-10 23:16       ` Bartlomiej Zolnierkiewicz
2008-02-11 12:01         ` Atsushi Nemoto
2008-01-06 17:03 ` [PATCH 8/8] ide: add ->cable_detect method to ide_hwif_t Bartlomiej Zolnierkiewicz
2008-01-12 20:05   ` Sergei Shtylyov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080106170227.6861.71421.sendpatchset@localhost.localdomain \
    --to=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH 1/8] dtc2278: fix ->io_32bit handling' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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