From: Marion Steiner <msteiner@rbg.informatik.tu-darmstadt.de>
To: garloff@suse.de,
Marion Steiner <msteiner@rbg.informatik.tu-darmstadt.de>
Cc: linux-kernel@vger.kernel.org,
Linux SCSI list <linux-scsi@vger.kernel.org>
Subject: Re: SCSI-Problem with AM53C974
Date: Wed, 20 Mar 2002 15:01:12 +0100 [thread overview]
Message-ID: <200203201401.g2KE1Cs00998@orion.steiner.local> (raw)
In-Reply-To: <20020318123038.B19273@gum01m.etpnet.phys.tue.nl>
In linux.dev.kernel, Kurt Garloff wrote:
>Can you try the attached patch please? Patch is against 2.4.18.
>
>It makes the AM53C974 driver register its IO-space and will make detection
>fail, if there are no adapters found with available IO-space.
>
>The tmscsim driver (which I maintain) does already register its IO space
>correctly, so this patch should make sure that not both of them try to drive
>the same piece of hardware.
>
>Please report back, whether it works, so I can ask Marcelo to include it.
OK, I found a littler bug in it, that's why on my first try it didn't
work. There was a "!" missing in the if statement whether the region is
free. So the driver failed if the region was free and succeeded if it was
busy.
But now it seems to work well, so including it in the kernel would be
great.
CU
Marion Steiner
Here the corrected patch:
--- linux-2.4.18.ipt_fixes2.ix86/drivers/scsi/AM53C974.c.orig Sun Sep 30 21:26:07 2001
+++ linux-2.4.18.ipt_fixes2.ix86/drivers/scsi/AM53C974.c Mon Mar 18 11:59:31 2002
@@ -732,6 +732,12 @@
hostdata->disconnecting = 0;
hostdata->dma_busy = 0;
+ if (!request_region (instance->io_port, 128, "AM53C974")) {
+ printk ("AM53C974 (scsi%d): Could not get IO region %04lx. Detaching ...\n",
+ instance->host_no, instance->io_port);
+ scsi_unregister(instance);
+ return 0;
+ }
/* Set up an interrupt handler if we aren't already sharing an IRQ
with another board */
for (search = first_host;
search && (((the_template != NULL) && (search->hostt !=
the_template)) ||
@@ -2441,6 +2447,7 @@
static int AM53C974_release(struct Scsi_Host *shp)
{
free_irq(shp->irq, shp);
+ release_region(shp->io_port, 128);
scsi_unregister(shp);
return 0;
}
next prev parent reply other threads:[~2002-03-20 14:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-17 14:39 Marion Steiner
2002-03-17 22:58 ` Matthias Andree
2002-03-18 0:05 ` Kurt Garloff
2002-03-18 11:44 ` Marion Steiner
2002-03-18 11:30 ` Kurt Garloff
2002-03-18 11:43 ` Kurt Garloff
2002-03-18 14:51 ` Marion Steiner
2002-03-20 14:01 ` Marion Steiner [this message]
2002-03-20 17:03 ` Kurt Garloff
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=200203201401.g2KE1Cs00998@orion.steiner.local \
--to=msteiner@rbg.informatik.tu-darmstadt.de \
--cc=garloff@suse.de \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®