linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 15/21] sgiioc4: always init hwif->io_ports
@ 2007-11-18 22:26 Bartlomiej Zolnierkiewicz
  2007-11-27 12:55 ` Sergei Shtylyov
  0 siblings, 1 reply; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-11-18 22:26 UTC (permalink / raw)
  To: linux-ide; +Cc: Jeremy Higdon


'if (hwif->io_ports[IDE_DATA_OFFSET] != cmd_base)' is always true.

Cc: Jeremy Higdon <jeremy@sgi.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/pci/sgiioc4.c |   15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

Index: b/drivers/ide/pci/sgiioc4.c
===================================================================
--- a/drivers/ide/pci/sgiioc4.c
+++ b/drivers/ide/pci/sgiioc4.c
@@ -593,6 +593,7 @@ sgiioc4_ide_setup_pci_device(struct pci_
 	ide_hwif_t *hwif;
 	int h;
 	u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
+	hw_regs_t hw;
 
 	/*
 	 * Find an empty HWIF; if none available, return -ENOMEM.
@@ -632,15 +633,11 @@ sgiioc4_ide_setup_pci_device(struct pci_
 		return -ENOMEM;
 	}
 
-	if (hwif->io_ports[IDE_DATA_OFFSET] != cmd_base) {
-		hw_regs_t hw;
-
-		/* Initialize the IO registers */
-		memset(&hw, 0, sizeof(hw));
-		sgiioc4_init_hwif_ports(&hw, cmd_base, ctl, irqport);
-		memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports));
-		hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET];
-	}
+	/* Initialize the IO registers */
+	memset(&hw, 0, sizeof(hw));
+	sgiioc4_init_hwif_ports(&hw, cmd_base, ctl, irqport);
+	memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports));
+	hwif->noprobe = 0;
 
 	hwif->irq = dev->irq;
 	hwif->chipset = ide_pci;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 15/21] sgiioc4: always init hwif->io_ports
  2007-11-18 22:26 [PATCH 15/21] sgiioc4: always init hwif->io_ports Bartlomiej Zolnierkiewicz
@ 2007-11-27 12:55 ` Sergei Shtylyov
  0 siblings, 0 replies; 2+ messages in thread
From: Sergei Shtylyov @ 2007-11-27 12:55 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, Jeremy Higdon

Bartlomiej Zolnierkiewicz wrote:

> 'if (hwif->io_ports[IDE_DATA_OFFSET] != cmd_base)' is always true.

> Cc: Jeremy Higdon <jeremy@sgi.com>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

MBR, Sergei


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-27 12:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-18 22:26 [PATCH 15/21] sgiioc4: always init hwif->io_ports Bartlomiej Zolnierkiewicz
2007-11-27 12:55 ` Sergei Shtylyov

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