Commit e9e42faf authored by Alan Cox's avatar Alan Cox Committed by James Bottomley

[SCSI] initio: Fix merge fallout

Fix IRQ reporting - just assign the ->pci_dev pointer earlier and use the
pci_dev irq field rather than keeping a private one

Init the spinlock as it works better on SMP that way
Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 0fec02c9
...@@ -665,7 +665,7 @@ static void initio_init(struct initio_host * host, u8 *bios_addr) ...@@ -665,7 +665,7 @@ static void initio_init(struct initio_host * host, u8 *bios_addr)
host->max_tags[i] = 0xFF; host->max_tags[i] = 0xFF;
} /* for */ } /* for */
printk("i91u: PCI Base=0x%04X, IRQ=%d, BIOS=0x%04X0, SCSI ID=%d\n", printk("i91u: PCI Base=0x%04X, IRQ=%d, BIOS=0x%04X0, SCSI ID=%d\n",
host->addr, host->irq, host->addr, host->pci_dev->irq,
host->bios_addr, host->scsi_id); host->bios_addr, host->scsi_id);
/* Reset SCSI Bus */ /* Reset SCSI Bus */
if (host->config & HCC_SCSI_RESET) { if (host->config & HCC_SCSI_RESET) {
...@@ -2891,6 +2891,8 @@ static int initio_probe_one(struct pci_dev *pdev, ...@@ -2891,6 +2891,8 @@ static int initio_probe_one(struct pci_dev *pdev,
goto out_release_region; goto out_release_region;
} }
host->pci_dev = pdev;
host->num_scbs = num_scb; host->num_scbs = num_scb;
host->scb = scb; host->scb = scb;
host->next_pending = scb; host->next_pending = scb;
...@@ -2905,6 +2907,7 @@ static int initio_probe_one(struct pci_dev *pdev, ...@@ -2905,6 +2907,7 @@ static int initio_probe_one(struct pci_dev *pdev,
host->scb_end = tmp; host->scb_end = tmp;
host->first_avail = scb; host->first_avail = scb;
host->last_avail = prev; host->last_avail = prev;
spin_lock_init(&host->avail_lock);
initio_init(host, phys_to_virt(bios_seg << 4)); initio_init(host, phys_to_virt(bios_seg << 4));
...@@ -2928,7 +2931,6 @@ static int initio_probe_one(struct pci_dev *pdev, ...@@ -2928,7 +2931,6 @@ static int initio_probe_one(struct pci_dev *pdev,
} }
pci_set_drvdata(pdev, shost); pci_set_drvdata(pdev, shost);
host->pci_dev = pdev;
error = scsi_add_host(shost, &pdev->dev); error = scsi_add_host(shost, &pdev->dev);
if (error) if (error)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment