[lkml]   [2002]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    SubjectRe: 2.5.44: problemn when shutting down, drivers/base/power.c and the global_device_list
    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_set_pci_device calls
    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
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:30    [W:0.023 / U:38.536 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site