Date: Fri, 11 Jan 2008 16:38:13 -0500 From: Joe Marcus Clarke <marcus@FreeBSD.org> To: Andriy Gapon <avg@icyb.net.ua> Cc: freebsd-gnome@FreeBSD.org Subject: Re: hal: usb flash drive is seen as scsi device Message-ID: <1200087493.55370.72.camel@shumai.marcuscom.com> In-Reply-To: <478757A9.1010406@icyb.net.ua> References: <478757A9.1010406@icyb.net.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-6/mLTFQva2qv92PKLzBH Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2008-01-11 at 13:48 +0200, Andriy Gapon wrote: > Please compare two snippets of lshal output below. > In the first case I have a USB card reader connected, in the second case > I have a USB flash drive connected. In the first case storage.bus is > equal to usb, in the second case it is scsi. >=20 > Looking at the code in hf_scsi_block_device_new() function I think that > value of storage.bus is determined by looking at info.bus values of > parent devices. >=20 > The snippets below show that in the case of the flash drive there is one > "missing link": 'SCSI Host Adapter' is a direct child of 'Mass Storage > Device'. In the case of the card reader there is also 'USB Mass Storage > Interface' between them. The latter has info.bus=3D'usb'. > But in the second case, there is no device with info.bus=3D'usb' at all, > only with info.bus=3D'usb_device'. >=20 > I am not sure if an easy way of teaching hf_scsi_block_device_new() to > recognize usb_device bus would be sufficient. > It is a little bit weird that there is such difference in device > hierarchies for such a similar devices. This is strange. I have a Lexar Jumpdrive (USB flash drive), and I see the full hierarchy. I don't have a card reader with which to compare, though. This may be symptomatic of a bad device. If you run hald as: /usr/local/sbin/hald --daemon=3Dno --verbose=3Dyes You may see some additional warnings. Joe >=20 > --------------Snippet #1, USB card reader---------------------------- > udi =3D '/org/freedesktop/Hal/devices/usb_device_58f_6362_058F312D81B' > info.udi =3D > '/org/freedesktop/Hal/devices/usb_device_58f_6362_058F312D81B' (string) > freebsd.unit =3D 0 (0x0) (int) > freebsd.driver =3D 'umass' (string) > usb_device.num_interfaces =3D 1 (0x1) (int) > usb_device.can_wake_up =3D false (bool) > usb_device.vendor =3D 'Generic' (string) > usb_device.product =3D 'Mass Storage Device' (string) > usb_device.serial =3D '058F312D81B' (string) > usb_device.device_revision_bcd =3D 297 (0x129) (int) > usb_device.vendor_id =3D 1423 (0x58f) (int) > usb_device.product_id =3D 25442 (0x6362) (int) > usb_device.version_bcd =3D 512 (0x200) (int) > usb_device.speed_bcd =3D 294912 (0x48000) (int) > usb_device.port_number =3D 2 (0x2) (int) > usb_device.num_ports =3D 0 (0x0) (int) > usb_device.max_power =3D 250 (0xfa) (int) > usb_device.is_self_powered =3D false (bool) > usb_device.device_protocol =3D 0 (0x0) (int) > usb_device.device_subclass =3D 0 (0x0) (int) > usb_device.device_class =3D 0 (0x0) (int) > usb_device.num_configurations =3D 1 (0x1) (int) > usb_device.configuration_value =3D 1 (0x1) (int) > usb_device.bus_number =3D 1 (0x1) (int) > info.vendor =3D 'Generic' (string) > info.product =3D 'Mass Storage Device' (string) > info.bus =3D 'usb_device' (string) > info.parent =3D '/org/freedesktop/Hal/devices/pci_10de_026e' (string) >=20 > udi =3D '/org/freedesktop/Hal/devices/usb_device_58f_6362_058F312D81B_if0= ' > info.udi =3D > '/org/freedesktop/Hal/devices/usb_device_58f_6362_058F312D81B_if0' (stri= ng) > usb.interface.number =3D 0 (0x0) (int) > usb.interface.protocol =3D 80 (0x50) (int) > usb.interface.subclass =3D 6 (0x6) (int) > usb.interface.class =3D 8 (0x8) (int) > info.product =3D 'USB Mass Storage Interface' (string) > usb.bus_number =3D 1 (0x1) (int) > usb.configuration_value =3D 1 (0x1) (int) > usb.num_configurations =3D 1 (0x1) (int) > usb.device_class =3D 0 (0x0) (int) > usb.device_subclass =3D 0 (0x0) (int) > usb.device_protocol =3D 0 (0x0) (int) > usb.is_self_powered =3D false (bool) > usb.max_power =3D 250 (0xfa) (int) > usb.num_ports =3D 0 (0x0) (int) > usb.port_number =3D 2 (0x2) (int) > usb.speed_bcd =3D 294912 (0x48000) (int) > usb.version_bcd =3D 512 (0x200) (int) > usb.product_id =3D 25442 (0x6362) (int) > usb.vendor_id =3D 1423 (0x58f) (int) > usb.device_revision_bcd =3D 297 (0x129) (int) > usb.serial =3D '058F312D81B' (string) > usb.product =3D 'USB Mass Storage Interface' (string) > usb.vendor =3D 'Generic' (string) > usb.can_wake_up =3D false (bool) > usb.num_interfaces =3D 1 (0x1) (int) > info.bus =3D 'usb' (string) > info.parent =3D > '/org/freedesktop/Hal/devices/usb_device_58f_6362_058F312D81B' (string) >=20 > udi =3D > '/org/freedesktop/Hal/devices/usb_device_58f_6362_058F312D81B_if0_scsi_ho= st' > info.udi =3D > '/org/freedesktop/Hal/devices/usb_device_58f_6362_058F312D81B_if0_scsi_ho= st' > (string) > info.product =3D 'SCSI Host Adapter' (string) > scsi_host.host =3D 6 (0x6) (int) > info.bus =3D 'scsi_host' (string) > info.parent =3D > '/org/freedesktop/Hal/devices/usb_device_58f_6362_058F312D81B_if0' (stri= ng) >=20 > udi =3D '/org/freedesktop/Hal/devices/storage_model_USB_SD_Reader' > info.addons =3D {'hald-addon-storage'} (string list) > block.storage_device =3D > '/org/freedesktop/Hal/devices/storage_model_USB_SD_Reader' (string) > info.udi =3D '/org/freedesktop/Hal/devices/storage_model_USB_SD_Reader' > (string) > block.is_volume =3D false (bool) > block.freebsd.cam_path =3D '6,0,0' (string) > storage.lun =3D 0 (0x0) (int) > storage.firmware_revision =3D '1.00' (string) > info.product =3D 'USB SD Reader' (string) > info.vendor =3D 'Generic' (string) > storage.vendor =3D 'Generic' (string) > storage.model =3D 'USB SD Reader' (string) > storage.physical_device =3D > '/org/freedesktop/Hal/devices/usb_device_58f_6362_058F312D81B_if0' (stri= ng) > storage.no_partitions_hint =3D false (bool) > storage.automount_enabled_hint =3D true (bool) > storage.media_check_enabled =3D true (bool) > storage.hotpluggable =3D true (bool) > storage.requires_eject =3D false (bool) > storage.removable =3D true (bool) > storage.drive_type =3D 'sd_mmc' (string) > storage.bus =3D 'usb' (string) > block.minor =3D 135 (0x87) (int) > block.major =3D 0 (0x0) (int) > block.device =3D '/dev/da0' (string) > info.category =3D 'storage' (string) > info.bus =3D 'block' (string) > info.capabilities =3D {'block', 'storage'} (string list) > freebsd.unit =3D 0 (0x0) (int) > freebsd.driver =3D 'da' (string) > info.parent =3D > '/org/freedesktop/Hal/devices/usb_device_58f_6362_058F312D81B_if0_scsi_ho= st_scsi_device_lun0' > (string) >=20 > --------------Snippet #2, USB Flash Drive--------------------------- >=20 > udi =3D '/org/freedesktop/Hal/devices/usb_device_58f_6387_AYBDZ52Y' > info.udi =3D '/org/freedesktop/Hal/devices/usb_device_58f_6387_AYBDZ52Y= ' > (string) > freebsd.unit =3D 0 (0x0) (int) > freebsd.driver =3D 'umass' (string) > usb_device.num_interfaces =3D 1 (0x1) (int) > usb_device.can_wake_up =3D false (bool) > usb_device.vendor =3D 'Flash' (string) > usb_device.product =3D 'Drive AU_USB20' (string) > usb_device.serial =3D 'AYBDZ52Y' (string) > usb_device.device_revision_bcd =3D 323 (0x143) (int) > usb_device.vendor_id =3D 1423 (0x58f) (int) > usb_device.product_id =3D 25479 (0x6387) (int) > usb_device.version_bcd =3D 512 (0x200) (int) > usb_device.speed_bcd =3D 294912 (0x48000) (int) > usb_device.port_number =3D 2 (0x2) (int) > usb_device.num_ports =3D 0 (0x0) (int) > usb_device.max_power =3D 100 (0x64) (int) > usb_device.is_self_powered =3D false (bool) > usb_device.device_protocol =3D 0 (0x0) (int) > usb_device.device_subclass =3D 0 (0x0) (int) > usb_device.device_class =3D 0 (0x0) (int) > usb_device.num_configurations =3D 1 (0x1) (int) > usb_device.configuration_value =3D 1 (0x1) (int) > usb_device.bus_number =3D 1 (0x1) (int) > info.vendor =3D 'Flash' (string) > info.product =3D 'Drive AU_USB20' (string) > info.bus =3D 'usb_device' (string) > info.parent =3D '/org/freedesktop/Hal/devices/pci_10de_026e' (string) >=20 > udi =3D '/org/freedesktop/Hal/devices/usb_device_58f_6387_AYBDZ52Y_scsi_h= ost' > info.udi =3D > '/org/freedesktop/Hal/devices/usb_device_58f_6387_AYBDZ52Y_scsi_host' > (string) > info.product =3D 'SCSI Host Adapter' (string) > scsi_host.host =3D 6 (0x6) (int) > info.bus =3D 'scsi_host' (string) > info.parent =3D > '/org/freedesktop/Hal/devices/usb_device_58f_6387_AYBDZ52Y' (string) >=20 > udi =3D '/org/freedesktop/Hal/devices/storage_serial___0' > info.addons =3D {'hald-addon-storage'} (string list) > block.storage_device =3D > '/org/freedesktop/Hal/devices/storage_serial___0' (string) > info.udi =3D '/org/freedesktop/Hal/devices/storage_serial___0' (string= ) > block.is_volume =3D false (bool) > storage.serial =3D '^_' (string) > block.freebsd.cam_path =3D '6,0,0' (string) > storage.lun =3D 0 (0x0) (int) > storage.firmware_revision =3D '8.07' (string) > info.product =3D 'Drive AU_USB20' (string) > info.vendor =3D 'Flash' (string) > storage.vendor =3D 'Flash' (string) > storage.model =3D 'Drive AU_USB20' (string) > storage.physical_device =3D > '/org/freedesktop/Hal/devices/usb_device_58f_6387_AYBDZ52Y_scsi_host_scsi= _device_lun0' > (string) > storage.no_partitions_hint =3D false (bool) > storage.automount_enabled_hint =3D true (bool) > storage.media_check_enabled =3D true (bool) > storage.hotpluggable =3D false (bool) > storage.requires_eject =3D false (bool) > storage.removable =3D true (bool) > storage.drive_type =3D 'disk' (string) > storage.bus =3D 'scsi' (string) > block.minor =3D 152 (0x98) (int) > block.major =3D 0 (0x0) (int) > block.device =3D '/dev/da0' (string) > info.category =3D 'storage' (string) > info.bus =3D 'block' (string) > info.capabilities =3D {'block', 'storage'} (string list) > freebsd.unit =3D 0 (0x0) (int) > freebsd.driver =3D 'da' (string) > info.parent =3D > '/org/freedesktop/Hal/devices/usb_device_58f_6387_AYBDZ52Y_scsi_host_scsi= _device_lun0' > (string) >=20 --=20 Joe Marcus Clarke FreeBSD GNOME Team :: gnome@FreeBSD.org FreeNode / #freebsd-gnome http://www.FreeBSD.org/gnome --=-6/mLTFQva2qv92PKLzBH Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQBHh+HFb2iPiv4Uz4cRArPvAJ9UKY7jhD1dkQdl9dBfzoHf3yp8oQCdH8Fq Cxj5qiB6Gvp1nPPqWxteuVA= =hXCr -----END PGP SIGNATURE----- --=-6/mLTFQva2qv92PKLzBH--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1200087493.55370.72.camel>