From: Patrick Mansfield <patmans@us.ibm.com>
To: Patrick Mochel <mochel@osdl.org>
Cc: Jurriaan <thunder7@xs4all.nl>,
linux-kernel@vger.kernel.org, andmike@us.ibm.com
Subject: Re: 2.5.44: problemn when shutting down, drivers/base/power.c and the global_device_list
Date: Sun, 20 Oct 2002 14:59:47 -0700 [thread overview]
Message-ID: <20021020145947.A11444@eng2.beaverton.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0210201117080.963-100000@cherise.pdx.osdl.net>; from mochel@osdl.org on Sun, Oct 20, 2002 at 01:21:29PM -0700
On Sun, Oct 20, 2002 at 01:21:29PM -0700, Patrick Mochel wrote:
>
> On Sat, 19 Oct 2002, Jurriaan wrote:
>
> > DEV: registering device: ID = 'scsi0', name = sym53c8xx
Above is from scsi_set_pci_device() call.
> > scsi0 : sym53c8xx-1.7.3c-20010512
> > DEV: registering device: ID = 'scsi0', name = sym53c8xx
Above are from scsi_register_host().
> > sym53c860-0-<1,*>: FAST-20 SCSI 20.0 MB/s (50.0 ns, offset 8)
> > Vendor: TOSHIBA Model: DVD-ROM SD-M1401 Rev: 1007
> > Type: CD-ROM ANSI SCSI revision: 02
>
> It appears the same device is being added twice. After doing some digging
> in the sym53c8xx and the scsi host code, that suspicion grows, though I'm
> not positively sure how the host is being added twice.
>
Looks like we have two device_register(&shost->host_driverfs_dev) calls,
one in scsi_set_pci_device, and one in scsi_register_host(). I think
Mike meant to delete the one in scsi_register_host, but I can't tell
for certain which one should go away.
And this must might be why I can't shutdown (i.e. no auto reboot).
So in 2.5.44 have:
scsi_register_host() calls
attach [ncr_attach] calls
scsi_register
scsi_set_pci_device calls
device_register(&shost->host_driverfs_dev)
call to device_register() again in scsi_register_host
This removes the scsi_register_host() one, I can shutdown/reboot
with this patch, I didn't dump anything else or try rmmod's:
--- bleed-2.5/drivers/scsi/hosts.c Sat Oct 19 10:30:01 2002
+++ bleed-2.5/drivers/scsi/hosts.c-mine Sun Oct 20 14:46:13 2002
@@ -543,7 +543,6 @@
shost->host_no, dm_name);
/* first register parent with driverfs */
- device_register(&shost->host_driverfs_dev);
scan_scsis(shost, 0, 0, 0, 0);
}
}
> scsi_register_host() then loops through the hosts, and registers all the
> ones that this driver added. (Q: why is that function constantly looping
> through all the scsi hosts just to operate on the one passed in?).
A Scsi_Host_Template is passed in, it loops over Scsi_Hosts to find
everyone that is using the Scsi_Host_Template, the names are confusing
as well as the code.
> The SCSI code is confusing and likely the culprit.
Yes and yes ...
-- Patrick Mansfield
next prev parent reply other threads:[~2002-10-20 21:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-19 15:34 2.5.44: problemn when shutting down, drivers/base/power.c and the global_device_list Jurriaan
2002-10-20 20:21 ` Patrick Mochel
2002-10-20 21:59 ` Patrick Mansfield [this message]
2002-10-21 3:30 ` Mike Anderson
2002-10-21 5:36 ` Jurriaan
2002-10-21 17:33 ` Patrick Mochel
[not found] ` <20021021084425.A29967@eng2.beaverton.ibm.com>
2002-10-21 18:35 ` Jurriaan
2002-10-21 4:26 ` Mike Anderson
-- strict thread matches above, loose matches on Subject: below --
2002-10-20 1:39 ALESSANDRO.SUARDI
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=20021020145947.A11444@eng2.beaverton.ibm.com \
--to=patmans@us.ibm.com \
--cc=andmike@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@osdl.org \
--cc=thunder7@xs4all.nl \
/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