From: Doug Ledford <dledford@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: "Justin T. Gibbs" <gibbs@scsiguy.com>,
James Bottomley <James.Bottomley@steeleye.com>,
linux-scsi@vger.kernel.org
Subject: Re: Aic7xxx v6.2.22 and Aic79xx v1.3.0Alpha2 Released
Date: Thu, 12 Dec 2002 15:20:52 -0500 [thread overview]
Message-ID: <20021212202052.GC8842@redhat.com> (raw)
In-Reply-To: <20021211181745.A30253@infradead.org>
[-- Attachment #1: Type: text/plain, Size: 545 bytes --]
On Wed, Dec 11, 2002 at 06:17:46PM +0000, Christoph Hellwig wrote:
>
> Yupp, it currently crashes when I have both compiled in. Dough, any chance
> you could fix that? A PCI driver is not supposed to stop over already
> claimed device.
If you've got a test machine, the attached patch would I think fix the
problem. Let me know if it does in fact work for you and I'll commit it
to the tree.
--
Doug Ledford <dledford@redhat.com> 919-754-3700 x44233
Red Hat, Inc.
1801 Varsity Dr.
Raleigh, NC 27606
[-- Attachment #2: aic-playnice.patch --]
[-- Type: text/plain, Size: 3647 bytes --]
===== drivers/scsi/aic7xxx_old.c 1.37 vs edited =====
--- 1.37/drivers/scsi/aic7xxx_old.c Fri Nov 22 00:34:44 2002
+++ edited/drivers/scsi/aic7xxx_old.c Thu Dec 12 13:35:23 2002
@@ -9246,12 +9246,22 @@
{
/* duplicate PCI entry, skip it */
kfree(temp_p);
- temp_p = NULL;
+ continue;
}
current_p = current_p->next;
}
- if ( temp_p == NULL )
+ if(!pci_request_regions(temp_p->pdev, "aic7xxx"))
+ {
+ printk("aic7xxx: <%s> at PCI %d/%d/%d\n",
+ board_names[aic_pdevs[i].board_name_index],
+ temp_p->pci_bus,
+ PCI_SLOT(temp_p->pci_device_fn),
+ PCI_FUNC(temp_p->pci_device_fn));
+ printk("aic7xxx: I/O ports already in use, ignoring.\n");
+ kfree(temp_p);
continue;
+ }
+
if (aic7xxx_verbose & VERBOSE_PROBE2)
printk("aic7xxx: <%s> at PCI %d/%d\n",
board_names[aic_pdevs[i].board_name_index],
@@ -9283,20 +9293,6 @@
pci_write_config_dword(pdev, DEVCONFIG, devconfig);
#endif /* AIC7XXX_STRICT_PCI_SETUP */
- if(temp_p->base && !request_region(temp_p->base, MAXREG - MINREG,
- "aic7xxx"))
- {
- printk("aic7xxx: <%s> at PCI %d/%d/%d\n",
- board_names[aic_pdevs[i].board_name_index],
- temp_p->pci_bus,
- PCI_SLOT(temp_p->pci_device_fn),
- PCI_FUNC(temp_p->pci_device_fn));
- printk("aic7xxx: I/O ports already in use, ignoring.\n");
- kfree(temp_p);
- temp_p = NULL;
- continue;
- }
-
temp_p->unpause = INTEN;
temp_p->pause = temp_p->unpause | PAUSE;
if ( ((temp_p->base == 0) &&
@@ -9309,9 +9305,7 @@
PCI_SLOT(temp_p->pci_device_fn),
PCI_FUNC(temp_p->pci_device_fn));
printk("aic7xxx: Controller disabled by BIOS, ignoring.\n");
- kfree(temp_p);
- temp_p = NULL;
- continue;
+ goto skip_pci_controller;
}
#ifdef MMAPIO
@@ -9353,9 +9347,7 @@
PCI_SLOT(temp_p->pci_device_fn),
PCI_FUNC(temp_p->pci_device_fn));
printk("aic7xxx: Controller disabled by BIOS, ignoring.\n");
- kfree(temp_p);
- temp_p = NULL;
- continue;
+ goto skip_pci_controller;
}
}
}
@@ -9398,10 +9390,7 @@
if (aic7xxx_chip_reset(temp_p) == -1)
{
- release_region(temp_p->base, MAXREG - MINREG);
- kfree(temp_p);
- temp_p = NULL;
- continue;
+ goto skip_pci_controller;
}
/*
* Very quickly put the term setting back into the register since
@@ -9687,6 +9676,10 @@
}
temp_p->next = NULL;
found++;
+ continue;
+skip_pci_controller:
+ pci_release_regions(temp_p->pdev);
+ kfree(temp_p);
} /* Found an Adaptec PCI device. */
else /* Well, we found one, but we couldn't get any memory */
{
@@ -10969,14 +10962,16 @@
if(p->irq)
free_irq(p->irq, p);
- if(p->base)
- release_region(p->base, MAXREG - MINREG);
#ifdef MMAPIO
if(p->maddr)
{
iounmap((void *) (((unsigned long) p->maddr) & PAGE_MASK));
}
#endif /* MMAPIO */
+ if(!p->pdev)
+ release_region(p->base, MAXREG - MINREG);
+ else
+ pci_release_regions(p->pdev);
prev = NULL;
next = first_aic7xxx;
while(next != NULL)
next prev parent reply other threads:[~2002-12-12 20:20 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-09 23:53 Aic7xxx v6.2.22 and Aic79xx v1.3.0Alpha2 Released Justin T. Gibbs
2002-12-10 0:12 ` Christoph Hellwig
2002-12-10 0:33 ` Justin T. Gibbs
2002-12-10 13:14 ` Christoph Hellwig
2002-12-10 16:02 ` James Bottomley
2002-12-10 20:03 ` Justin T. Gibbs
2002-12-10 20:58 ` James Bottomley
[not found] ` <20021211135855.A19325@infradead.org>
2002-12-11 15:18 ` Justin T. Gibbs
2002-12-11 15:39 ` Christoph Hellwig
2002-12-11 16:08 ` Justin T. Gibbs
2002-12-11 16:23 ` Christoph Hellwig
2002-12-12 7:16 ` Jens Axboe
2002-12-12 17:20 ` Justin T. Gibbs
2002-12-12 17:38 ` Jens Axboe
2002-12-13 21:06 ` Christoph Hellwig
2002-12-14 10:42 ` Jens Axboe
2002-12-11 17:06 ` Alan Cox
2002-12-11 17:31 ` Justin T. Gibbs
2002-12-11 18:17 ` Christoph Hellwig
2002-12-11 20:23 ` Justin T. Gibbs
2002-12-12 20:20 ` Doug Ledford [this message]
2002-12-12 20:39 ` Christoph Hellwig
2002-12-12 21:06 ` Justin T. Gibbs
2002-12-13 21:02 ` Christoph Hellwig
2002-12-13 21:23 ` Doug Ledford
2002-12-13 21:37 ` Justin T. Gibbs
2002-12-13 21:51 ` Christoph Hellwig
2002-12-13 22:52 ` Doug Ledford
2002-12-13 23:08 ` Justin T. Gibbs
2002-12-13 23:20 ` Doug Ledford
2002-12-13 23:32 ` Justin T. Gibbs
2002-12-14 21:55 ` Gérard Roudier
2002-12-14 23:29 ` Justin T. Gibbs
2002-12-19 18:56 ` scsi_scan.c complaints Doug Ledford
2002-12-21 1:29 ` Doug Ledford
2002-12-12 5:51 ` Aic7xxx v6.2.22 and Aic79xx v1.3.0Alpha2 Released Andrew Morton
2002-12-12 14:51 ` James Bottomley
-- strict thread matches above, loose matches on Subject: below --
2002-12-14 5:57 Milton D. Miller II
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=20021212202052.GC8842@redhat.com \
--to=dledford@redhat.com \
--cc=James.Bottomley@steeleye.com \
--cc=gibbs@scsiguy.com \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.