From: Jamie Lenehan <lenehan@twibble.org>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-scsi@vger.kernel.org, dc395x@twibble.org
Subject: Re: [PATCH] introduce scsi_host_alloc
Date: Fri, 6 Jun 2003 21:40:18 +1000 [thread overview]
Message-ID: <20030606114018.GA20458@twibble.org> (raw)
In-Reply-To: <20030606080103.GC18838@lst.de>
On Fri, Jun 06, 2003 at 10:01:03AM +0200, Christoph Hellwig wrote:
> Rediffed version, with Mike's isp fix and taking the new
> scsi_add_host users in usb in account.
>
> Currently this is juist a new name for scsi_register, but we make
> sure new-style drivers never call scsi_register/scsi_unregister
> but always scsi_host_alloc/scsi_host_put in this patch so the
> next patch can introduce code specific to legacy drivers in
> the former. Also cleanup scsi_register/scsi_host_alloc a bit.
I think I made the dc395x driver new style init as of 2.5.70-bk9 (if
what scsi_mid_low_api.txt calls "hotplug" style is new style then it
is). So it'll need to be updated as well.
Patch against 2.5.70-bk9. Untested, just modified the names as per
your other changes.
diff -du -r a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
--- a/drivers/scsi/dc395x.c 2003-06-06 21:27:00.000000000 +1000
+++ b/drivers/scsi/dc395x.c 2003-06-06 21:28:47.000000000 +1000
@@ -5726,9 +5726,9 @@
/*
*$$$$$$$$$$$ MEMORY ALLOCATE FOR ADAPTER CONTROL BLOCK $$$$$$$$$$$$
*/
- host = scsi_register(host_template, sizeof(struct AdapterCtlBlk));
+ host = scsi_host_alloc(host_template, sizeof(struct AdapterCtlBlk));
if (!host) {
- dprintkl(KERN_INFO, "pSH scsi_register ERROR\n");
+ dprintkl(KERN_INFO, "pSH scsi_host_alloc ERROR\n");
return 0;
}
DC395x_print_eeprom_settings(index);
@@ -5736,7 +5736,7 @@
pACB = (struct AdapterCtlBlk *) host->hostdata;
if (DC395x_initACB(host, io_port, irq, index)) {
- scsi_unregister(host);
+ scsi_host_put(host);
return 0;
}
DC395x_print_config(pACB);
@@ -5755,7 +5755,7 @@
} else {
dprintkl(KERN_INFO, "DC395x_initAdapter initial ERROR\n");
- scsi_unregister(host);
+ scsi_host_put(host);
host = NULL;
}
return host;
--
Jamie Lenehan Work Phone: +61 3 9843 8817
lenehan@twibble.org Work Email: jamie.lenehan@activcard.com.au
next prev parent reply other threads:[~2003-06-06 11:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-06 8:01 [PATCH] introduce scsi_host_alloc Christoph Hellwig
2003-06-06 11:40 ` Jamie Lenehan [this message]
2003-06-06 11:43 ` Christoph Hellwig
2003-06-06 20:24 ` Luben Tuikov
2003-06-06 20:30 ` Luben Tuikov
2003-06-06 20:42 ` Christoph Hellwig
2003-06-06 23:20 ` Luben Tuikov
2003-06-07 6:44 ` Christoph Hellwig
2003-06-07 18:55 ` Luben Tuikov
-- strict thread matches above, loose matches on Subject: below --
2003-06-03 20:32 Christoph Hellwig
2003-06-05 20:50 ` Mike Anderson
2003-06-05 21:24 ` Christoph Hellwig
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=20030606114018.GA20458@twibble.org \
--to=lenehan@twibble.org \
--cc=dc395x@twibble.org \
--cc=hch@lst.de \
--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