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

Commit d427e836 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

ide: fix host drivers missing hwif->chipset initialization



ide_find_port() now depends on ->chipset being set for occupied ide_hwifs[]
slots so all host drivers have to initialize hwif->chipset properly.

This patch fixes a regression on hosts with > 1 port or with a single port
but no devices attached to it for an affected host drivers.

Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 343a3451
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ static int __init bastide_register(unsigned int base, unsigned int aux, int irq)

	hw.io_ports.ctl_addr = aux + (6 * 0x20);
	hw.irq = irq;
	hw.chipset = ide_generic;

	hwif = ide_find_port();
	if (hwif == NULL)
+1 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ static int __init ide_arm_init(void)
	memset(&hw, 0, sizeof(hw));
	ide_std_init_ports(&hw, base, ctl);
	hw.irq = IDE_ARM_IRQ;
	hw.chipset = ide_generic;

	hwif = ide_find_port();
	if (hwif) {
+1 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ static int idepnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
	memset(&hw, 0, sizeof(hw));
	ide_std_init_ports(&hw, base, ctl);
	hw.irq = pnp_irq(dev, 0);
	hw.chipset = ide_generic;

	hwif = ide_find_port();
	if (hwif) {
+1 −0
Original line number Diff line number Diff line
@@ -1664,6 +1664,7 @@ static void ide_legacy_init_one(u8 *idx, hw_regs_t *hw, u8 port_no,

	ide_std_init_ports(hw, base, ctl);
	hw->irq = irq;
	hw->chipset = d->chipset;

	hwif = ide_find_port_slot(d);
	if (hwif) {
+2 −0
Original line number Diff line number Diff line
@@ -138,6 +138,8 @@ static void __init buddha_setup_ports(hw_regs_t *hw, unsigned long base,

	hw->irq = IRQ_AMIGA_PORTS;
	hw->ack_intr = ack_intr;

	hw->chipset = ide_generic;
}

    /*
Loading