Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f8e8483 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

sgiioc4: always init hwif->io_ports



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

Cc: Jeremy Higdon <jeremy@sgi.com>
Acked-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent b0d5bc27
Loading
Loading
Loading
Loading
+6 −9
Original line number Original line Diff line number Diff line
@@ -593,6 +593,7 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev)
	ide_hwif_t *hwif;
	ide_hwif_t *hwif;
	int h;
	int h;
	u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
	u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
	hw_regs_t hw;


	/*
	/*
	 * Find an empty HWIF; if none available, return -ENOMEM.
	 * Find an empty HWIF; if none available, return -ENOMEM.
@@ -632,15 +633,11 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev)
		return -ENOMEM;
		return -ENOMEM;
	}
	}


	if (hwif->io_ports[IDE_DATA_OFFSET] != cmd_base) {
		hw_regs_t hw;

	/* Initialize the IO registers */
	/* Initialize the IO registers */
	memset(&hw, 0, sizeof(hw));
	memset(&hw, 0, sizeof(hw));
	sgiioc4_init_hwif_ports(&hw, cmd_base, ctl, irqport);
	sgiioc4_init_hwif_ports(&hw, cmd_base, ctl, irqport);
	memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports));
	memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports));
		hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET];
	hwif->noprobe = 0;
	}


	hwif->irq = dev->irq;
	hwif->irq = dev->irq;
	hwif->chipset = ide_pci;
	hwif->chipset = ide_pci;