linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: udev naming for PATA drives
Date: Wed, 29 Aug 2007 05:05:52 +0000	[thread overview]
Message-ID: <1188363952.3672.23.camel@lov.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.64.0708281957160.3018@fbirervta.pbzchgretzou.qr>


On Wed, 2007-08-29 at 06:30 +0200, Jan Engelhardt wrote:
> On Aug 29 2007 06:11, Kay Sievers wrote:
> >On 8/28/07, Jan Engelhardt <jengelh@computergmbh.de> wrote:
> >> alim15x3.ko:
> >>         /dev/disk/by-id/ata-TOSHIBA_MK2003GAH_73A30603T
> >>
> >> pata_ali.ko:
> >>         /dev/disk/by-id/ata-TOSHIBA_MK2003GA_73A30603T______
> >>         /dev/disk/by-id/scsi-SATA-TOSHIBA_MK2003G73A30603T
> >>
> >> With pata_ali, the model name is truncated, and I've got six odd
> >> underscores (limited scsi layer?). Then, scsi is wrong, but perhaps
> >> acceptable, because it is, indeed, the scsi layer. But SATA is totally
> >> out of place.
> >
> >SCSI, unlike ATA, is limited to 16 chars, yes. So it can't pass the
> >whole string. Recent udev versions call ata_id also for libata drives.
> > But it needs kernel support, which was added for ATA-pass-through.
> >
> >What does:
> >  udevtest /block/sda
> >print on your box?
> 
> <<<
> main: looking at device '/block/sda' from subsystem 'block'
> run_program: 'usb_id -x'
> run_program: '/lib/udev/usb_id' returned with status 1
> run_program: 'scsi_id -g -x -s /block/sda -d /dev/.tmp-8-0'
> run_program: '/lib/udev/scsi_id' (stdout) 'ID_VENDOR=ATA'
> run_program: '/lib/udev/scsi_id' (stdout) 'ID_MODEL=TOSHIBA_MK2003GA'
> run_program: '/lib/udev/scsi_id' (stdout) 'ID_REVISION=AM.0'
> run_program: '/lib/udev/scsi_id' (stdout) 'ID_SERIAL=SATA_TOSHIBA_MK2003G73A30603T'
> run_program: '/lib/udev/scsi_id' (stdout) 'ID_SERIAL_SHORTsA30603T_`<344><377><377><^B>'
> run_program: '/lib/udev/scsi_id' (stdout) 'ID_TYPE=disk'
> run_program: '/lib/udev/scsi_id' (stdout) 'ID_BUS=scsi'
> run_program: '/lib/udev/scsi_id' returned with status 0
> udev_rules_get_name: add symlink 'disk/by-id/scsi-SATA_TOSHIBA_MK2003G73A30603T'
> udev_rules_get_name: 5 untrusted character(s) replaced
> udev_rules_get_name: add symlink 'disk/by-id/ata-TOSHIBA_MK2003GA_73A30603T______'
> run_program: 'path_id /block/sda'
> run_program: '/lib/udev/path_id' (stdout) 'ID_PATH=pci-0000:00:10.0-scsi-0:0:0:0'
> run_program: '/lib/udev/path_id' returned with status 0
> udev_rules_get_name: add symlink 'disk/by-path/pci-0000:00:10.0-scsi-0:0:0:0'
> run_program: 'vol_id --export /dev/.tmp-8-0'
> run_program: '/lib/udev/vol_id' (stderr) '/dev/.tmp-8-0: unknown volume type'
> run_program: '/lib/udev/vol_id' returned with status 4
> run_program: 'edd_id --export /dev/.tmp-8-0'
> run_program: '/lib/udev/edd_id' (stderr) 'no kernel EDD support'
> run_program: '/lib/udev/edd_id' returned with status 2
> udev_rules_get_name: no node name set, will use kernel name 'sda'
> udev_device_event: device '/block/sda' already in database, validate currently present symlinks
> udev_node_add: creating device node '/dev/sda', major = '8', minor = '0', mode = '0640', uid = '0', gid = '6'
> udev_node_add: creating symlink '/dev/disk/by-id/scsi-SATA_TOSHIBA_MK2003G73A30603T' to '../../sda'
> udev_node_add: creating symlink '/dev/disk/by-id/ata-TOSHIBA_MK2003GA_73A30603T______' to '../../sda'
> udev_node_add: creating symlink '/dev/disk/by-path/pci-0000:00:10.0-scsi-0:0:0:0' to '../../sda'
> main: run: 'socket:/org/freedesktop/hal/udev_event'
> main: run: 'socket:/org/kernel/udev/monitor'
> >>>
> 
> So that would explain the six underscores. Some uninitialized char array or so
> seems to be happening.

Yep, it was fixed here:
  http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;hR84454d5f4e7ebe6c7095cf78318020ca9991bf

SERIAL_SHORT is not used anymore, as native SCSI strings are too short
for IDE disk links, and we switched to ATA pass-trough which was added
to make this possible.

> And I also wonder why the ID_MODEL gets truncated by one
> character when copies to ID_SERIAL_SHORT. (The 'A' of MK2003GA is missing.)

They are unfortunately truncated to 15 chars, which should be 16, yes. 

And if you read the native ATA string it has an additional 'H' too,
which does not survive the SCSI layer. :)

Kay


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

  parent reply	other threads:[~2007-08-29  5:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-28 18:05 udev naming for PATA drives Jan Engelhardt
2007-08-29  4:11 ` Kay Sievers
2007-08-29  4:30 ` Jan Engelhardt
2007-08-29  5:05 ` Kay Sievers [this message]
2007-08-29 12:04 ` Jan Engelhardt
2007-08-29 12:12 ` Hannes Reinecke
2007-08-29 12:18 ` Kay Sievers

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=1188363952.3672.23.camel@lov.localdomain \
    --to=kay.sievers@vrfy.org \
    --cc=linux-hotplug@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).