Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Oct 2009 16:06:33 +0200
From:      Bernd Walter <ticso@cicely7.cicely.de>
To:        Hans Petter Selasky <hselasky@c2i.net>
Cc:        Warren Block <wblock@wonkity.com>, freebsd-current@freebsd.org
Subject:   Re: Why does hal think my USB devices are fixed?
Message-ID:  <20091015140633.GD62588@cicely7.cicely.de>
In-Reply-To: <200910141945.09311.hselasky@c2i.net>
References:  <alpine.BSF.2.00.0910141055410.73454@wonkity.com> <200910141945.09311.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 14, 2009 at 07:45:08PM +0200, Hans Petter Selasky wrote:
> On Wednesday 14 October 2009 19:04:07 Warren Block wrote:
> > Fixed as opposed to removable.  hal used to see these USB
> > devices--USB memory sticks, memory cards in a reader--as removable
> > devices.  Which they are.
> >
> > Same computer, same config that used to automount these devices as
> > removable, but now FreeBSD 8.0-RC1 and hal says they are fixed devices:
> >
> > org.freedesktop.hal.storage.mount-fixed no <-- (action, result).
> >
> > Is this be due to the USB system?
> 
> Hi Warren,
> 
> The fixed/removable information is transferred to the PC using a SCSI INQUIRY 
> command. What the device reports or what the CAM layer reports to HAL is not 
> up to the USB stack.

This is a different thing.
SCSI inquiry tells about removeable media.

Just some examples:
USB flash sticks are removeable drives with unremoveable media.
USB harddisks are removeable drives with unremoveable media.
USB card readers are removeable drives with removeable media.
(Plain old) Floppy drives are unremoveable drives with removeable media.
SCSI harddisks are unremoveable drives with unremoveable media.

But even this is not correct anymore.
SATA and SCSI devices can be external and powered off at any time.
In the result this means that every drive might be removeable today.

> The most significant bit of second byte of the INQUIRY response decides if the 
> medium is removable or not.
> 
> See: ustorage_fs_inquiry() in src/sys/dev/usb/storage/ustorage_fs.c
> 
> --HPS
> 
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"

-- 
B.Walter <bernd@bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091015140633.GD62588>