From: Andrew Patterson <andrew.patterson@hp.com>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: ens Axboe <jens.axboe@oracle.com>,
"Mike Miller (OS Dev)" <mikem@beardog.cca.cpqcorp.net>,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
LKML-SCSI <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH 1/1] cciss: resubmit export uid, model, vendor, rev to sysfs
Date: Thu, 09 Apr 2009 12:07:13 -0600 [thread overview]
Message-ID: <1239300433.19984.270.camel@grinch> (raw)
In-Reply-To: <ac3eb2510904091005q13e5b5a1j3907de22ad3df70c@mail.gmail.com>
On Thu, 2009-04-09 at 10:05 -0700, Kay Sievers wrote:
> On Thu, Apr 9, 2009 at 09:57, Andrew Patterson <andrew.patterson@hp.com> wrote:
> > On Thu, 2009-04-09 at 07:19 -0700, Kay Sievers wrote:
>
> >> I would need to see the output of:
> >> /sbin/udevadm info --attribute-walk --path=/block/<disk-name>
>
> > looking at device '/block/cciss!c0d0':
> > KERNEL=="cciss!c0d0"
> > SUBSYSTEM=="block"
> > DRIVER==""
> > ATTR{range}=="16"
> > ATTR{ext_range}=="16"
> > ATTR{removable}=="0"
> > ATTR{ro}=="0"
> > ATTR{size}=="286611840"
> > ATTR{capability}=="10"
>
> The block device needs a parent, please assign the cciss bus device.
> It's the driverfs_dev in the genhd struct.
>
This is already done in cciss_add_disk():
disk->fops = &cciss_fops;
disk->private_data = &h->drv[drv_index];
disk->driverfs_dev = &h->drv[drv_index].dev;
I think my problem is I was assigning cciss_bus_type to the controller,
not the block device. I have fixed that.
> Please provide the output again, it will get much larger then.
>
> Also, please disable CONFIG_SYSFS_DEPRECATED* in your kernel config.
>
Done.
# /sbin/udevadm info --attribute-walk "--path=/block/cciss!c0d0"
Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
'/devices/pci0000:4f/0000:4f:00.0/0000:50:00.0/0000:51:04.0/0000:8b:00.0/cciss0/c0d0/block/cciss!c0d0':
KERNEL=="cciss!c0d0"
SUBSYSTEM=="block"
DRIVER==""
ATTR{range}=="16"
ATTR{ext_range}=="16"
ATTR{removable}=="0"
ATTR{ro}=="0"
ATTR{size}=="286611840"
ATTR{capability}=="10"
ATTR{stat}==" 29 37 2112 52 0 0
0 0 0 52 52"
looking at parent device
'/devices/pci0000:4f/0000:4f:00.0/0000:50:00.0/0000:51:04.0/0000:8b:00.0/cciss0/c0d0':
KERNELS=="c0d0"
SUBSYSTEMS=="cciss"
DRIVERS==""
ATTRS{unique_id}=="600508B1001044424654324558350012"
ATTRS{model}=="LOGICAL VOLUME "
ATTRS{vendor}=="HP "
ATTRS{rev}=="5.20"
looking at parent device
'/devices/pci0000:4f/0000:4f:00.0/0000:50:00.0/0000:51:04.0/0000:8b:00.0/cciss0':
KERNELS=="cciss0"
SUBSYSTEMS==""
DRIVERS==""
looking at parent device
'/devices/pci0000:4f/0000:4f:00.0/0000:50:00.0/0000:51:04.0/0000:8b:00.0':
KERNELS=="0000:8b:00.0"
SUBSYSTEMS=="pci"
DRIVERS=="cciss"
ATTRS{vendor}=="0x103c"
ATTRS{device}=="0x3230"
ATTRS{subsystem_vendor}=="0x103c"
ATTRS{subsystem_device}=="0x3223"
ATTRS{class}=="0x010400"
ATTRS{irq}=="67"
ATTRS{local_cpus}=="ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff"
ATTRS{local_cpulist}=="0-511"
ATTRS{modalias}=="pci:v0000103Cd00003230sv0000103Csd00003223bc01sc04i00"
ATTRS{numa_node}=="-1"
ATTRS{broken_parity_status}=="0"
ATTRS{msi_bus}==""
looking at parent device
'/devices/pci0000:4f/0000:4f:00.0/0000:50:00.0/0000:51:04.0':
KERNELS=="0000:51:04.0"
SUBSYSTEMS=="pci"
DRIVERS=="pcieport-driver"
ATTRS{vendor}=="0x111d"
ATTRS{device}=="0x801c"
ATTRS{subsystem_vendor}=="0x0000"
ATTRS{subsystem_device}=="0x0000"
ATTRS{class}=="0x060400"
ATTRS{irq}=="53"
ATTRS{local_cpus}=="ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff"
ATTRS{local_cpulist}=="0-511"
ATTRS{modalias}=="pci:v0000111Dd0000801Csv00000000sd00000000bc06sc04i00"
ATTRS{numa_node}=="-1"
ATTRS{broken_parity_status}=="0"
ATTRS{msi_bus}=="1"
looking at parent device
'/devices/pci0000:4f/0000:4f:00.0/0000:50:00.0':
KERNELS=="0000:50:00.0"
SUBSYSTEMS=="pci"
DRIVERS=="pcieport-driver"
ATTRS{vendor}=="0x111d"
ATTRS{device}=="0x801c"
ATTRS{subsystem_vendor}=="0x0000"
ATTRS{subsystem_device}=="0x0000"
ATTRS{class}=="0x060400"
ATTRS{irq}=="0"
ATTRS{local_cpus}=="ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff"
ATTRS{local_cpulist}=="0-511"
ATTRS{modalias}=="pci:v0000111Dd0000801Csv00000000sd00000000bc06sc04i00"
ATTRS{numa_node}=="-1"
ATTRS{broken_parity_status}=="0"
ATTRS{msi_bus}=="1"
looking at parent device '/devices/pci0000:4f/0000:4f:00.0':
KERNELS=="0000:4f:00.0"
SUBSYSTEMS=="pci"
DRIVERS=="pcieport-driver"
ATTRS{vendor}=="0x103c"
ATTRS{device}=="0x403b"
ATTRS{subsystem_vendor}=="0x0000"
ATTRS{subsystem_device}=="0x0000"
ATTRS{class}=="0x060400"
ATTRS{irq}=="51"
ATTRS{local_cpus}=="ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff"
ATTRS{local_cpulist}=="0-511"
ATTRS{modalias}=="pci:v0000103Cd0000403Bsv00000000sd00000000bc06sc04i00"
ATTRS{numa_node}=="-1"
ATTRS{broken_parity_status}=="0"
ATTRS{msi_bus}=="1"
looking at parent device '/devices/pci0000:4f':
KERNELS=="pci0000:4f"
SUBSYSTEMS==""
DRIVERS==""
> Thanks,
> Kay
Thanks for looking at this.
Andrew
next prev parent reply other threads:[~2009-04-09 18:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-07 18:04 [PATCH 1/1] cciss: resubmit export uid, model, vendor, rev to sysfs Mike Miller (OS Dev)
2009-04-08 6:19 ` Jens Axboe
2009-04-08 8:13 ` Jens Axboe
2009-04-08 14:53 ` Mike Miller (OS Dev)
2009-04-08 12:26 ` Kay Sievers
2009-04-08 16:24 ` Andrew Patterson
2009-04-08 16:34 ` Kay Sievers
[not found] ` <1239258160.19984.217.camel@grinch>
[not found] ` <ac3eb2510904090719n730dededp54b25390a9087a79@mail.gmail.com>
[not found] ` <1239296221.19984.218.camel@grinch>
[not found] ` <ac3eb2510904091005q13e5b5a1j3907de22ad3df70c@mail.gmail.com>
2009-04-09 18:07 ` Andrew Patterson [this message]
2009-04-09 18:12 ` Kay Sievers
2009-04-10 4:52 ` Andrew Morton
2009-04-10 5:08 ` Andrew Patterson
2009-04-10 5:17 ` Andrew Morton
2009-04-10 17:19 ` Andrew Patterson
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=1239300433.19984.270.camel@grinch \
--to=andrew.patterson@hp.com \
--cc=akpm@linux-foundation.org \
--cc=jens.axboe@oracle.com \
--cc=kay.sievers@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mikem@beardog.cca.cpqcorp.net \
/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