linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathieu Chouquet-Stringer <mchouque@free.fr>
To: linux-kernel@vger.kernel.org
Cc: linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com
Subject: class_device_add error in SCSI with 2.6.17-rc2-g52824b6b
Date: Wed, 19 Apr 2006 23:31:29 +0200	[thread overview]
Message-ID: <20060419213129.GA9148@localhost> (raw)

	Hello James,

While booting 2.6.17-rc2-g52824b6b on an alpha (a 164LX clone), I get
the following error messages for every sd devices that get registered:

sd 0:0:0:0: Attached scsi disk sda
kobject_add failed for 0:0: with -EEXIST, don't try to register things with the same name in the same directory.
fffffc0000e4bc88 0000000000100100 fffffc000045c398 fffffc0000ec9910 
       fffffc0000ec9910 0000000000000000 fffffc0000688080 0000000000100100 
       fffffc0000488b84 fffffc0000ec9910 fffffc0000ec9500 fffffc0000ec9900 
       fffffc0000ec1800 0000000000000000 fffffc0000ec18e8 fffffc0000ec1a18 
       0000000000000000 ffffffffffffffea fffffc000045ac8c fffffc0000ec18e8 
       0000000000000000 fffffc0000687f50 fffffc0000683d48 0000000000000000 
Trace:
[<fffffc000045c398>] class_device_add+0xb4/0x388
[<fffffc0000488b84>] sd_probe+0x154/0x4cc
[<fffffc000045ac8c>] driver_probe_device+0x6c/0xf0
[<fffffc000045ae90>] __driver_attach+0x9c/0x11c
[<fffffc0000459bac>] bus_for_each_dev+0x5c/0xb0
[<fffffc000045adf4>] __driver_attach+0x0/0x11c
[<fffffc000045af3c>] driver_attach+0x2c/0x40
[<fffffc000045a390>] bus_add_driver+0xa8/0x1d4
[<fffffc000045b644>] driver_register+0xa8/0xc0
[<fffffc0000476018>] scsi_register_driver+0x24/0x38
[<fffffc0000310200>] init+0x11c/0x360
[<fffffc0000311598>] kernel_thread+0x28/0x90
[<fffffc0000311580>] kernel_thread+0x10/0x90


Looking at 'git whatchanged' for drivers/scsi/sd.c, I guess (just a wild
guess, I'll bisect tomorrow if needed) this patch probably broke the
whole thing:

diff-tree 6bdaa1f17dd32ec62345c7b57842f53e6278a2fa (from
5baba830e93732e802dc7e0a362eb730e1917f58)
Author: James Bottomley <James.Bottomley@steeleye.com>
Date:   Sat Mar 18 14:14:21 2006 -0600

    [SCSI] allow displaying and setting of cache type via sysfs

    I think I promised to do this two years ago

    This patch adds a scsi_disk class with the cache type and FUA
    parameters, so user land application can easily obtain them without
    having to parse dmesg.  It also allows setting the cache type (use with
    care...)

    This patch is a bit dangerous because I've replaced the disk kref with a
    class device reference ...

    Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>


Looking at the backtrace, this portion of the patch appears to be
failing:

@@ -1566,7 +1642,16 @@ static int sd_probe(struct device *dev)
        if (error)
                goto out_put;

+       class_device_initialize(&sdkp->cdev);
+       sdkp->cdev.dev = &sdp->sdev_gendev;
+       sdkp->cdev.class = &sd_disk_class;
+       strncpy(sdkp->cdev.class_id, sdp->sdev_gendev.bus_id, BUS_ID_SIZE);
+
+       if (class_device_add(&sdkp->cdev))
+               goto out_put;
+
        get_device(&sdp->sdev_gendev);
+
        sdkp->device = sdp;
        sdkp->driver = &sd_template;
        sdkp->disk = gd;


I'll look some more at the whole thing tomorrow as I'm not familiar at
all with kobject/sysfs...

Cheers,

-- 
Mathieu Chouquet-Stringer                         mchouque@free.fr


             reply	other threads:[~2006-04-19 21:32 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-19 21:31 Mathieu Chouquet-Stringer [this message]
2006-04-19 21:58 ` class_device_add error in SCSI with 2.6.17-rc2-g52824b6b Bob Tracy
2006-04-19 22:17   ` Mathieu Chouquet-Stringer
2006-04-20 10:14   ` Mathieu Chouquet-Stringer
2006-04-20 10:57     ` Mathieu Chouquet-Stringer
2006-04-20 17:11     ` strncpy (maybe others) broken on Alpha Mathieu Chouquet-Stringer
2006-04-20 20:55       ` Mathieu Chouquet-Stringer
2006-04-20 21:24         ` Ivan Kokshaysky
2006-04-20 21:27           ` Mathieu Chouquet-Stringer
2006-04-20 21:40           ` Bob Tracy
2006-04-20 21:57           ` Mathieu Chouquet-Stringer
2006-04-21  2:43             ` Bob Tracy
2006-04-21  8:15               ` Mathieu Chouquet-Stringer
2006-04-21  9:21                 ` Mathieu Chouquet-Stringer
2006-04-21  9:50                   ` Mathieu Chouquet-Stringer
2006-04-21 11:41                     ` Bob Tracy
2006-04-21 11:55                       ` Mathieu Chouquet-Stringer
2006-04-21 14:22                         ` Ivan Kokshaysky
2006-04-21 19:37                           ` Bob Tracy
2006-04-21 21:12                             ` Ivan Kokshaysky
2006-04-21 22:49                               ` Bob Tracy
2006-04-22  8:47                                 ` Mathieu Chouquet-Stringer
2006-04-22  8:45                           ` Mathieu Chouquet-Stringer
2006-04-22 10:39                     ` Bryan Østergaard
2006-04-20 21:22       ` Ivan Kokshaysky
2006-04-20 21:25         ` Mathieu Chouquet-Stringer

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=20060419213129.GA9148@localhost \
    --to=mchouque@free.fr \
    --cc=James.Bottomley@SteelEye.com \
    --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;
as well as URLs for NNTP newsgroup(s).