Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Feb 2006 21:17:14 +0300 (MSK)
From:      Dmitry Morozovsky <marck@rinet.ru>
To:        freebsd-stable@freebsd.org
Subject:   Re: USB Flash reader under RELENG_6: force GEOM rescan
Message-ID:  <20060209210748.L87003@woozle.rinet.ru>
In-Reply-To: <200602091804.k19I41RN023914@lurza.secnetix.de>
References:  <200602091804.k19I41RN023914@lurza.secnetix.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 9 Feb 2006, Oliver Fromme wrote:

OF> Dmitry Morozovsky <marck@rinet.ru> wrote:
OF>  > I have USB multi-LUN flash reader which is identified under RELENG_6 as
OF>  > umass0: GENERIC USB Storage Device, rev 2.00/1.8a, addr 2
OF>  > da0 at umass-sim0 bus 0 target 0 lun 0
OF>  > da0: <GENERIC USB Storage-CFC I19B> Removable Direct Access SCSI-0 device 
OF>  > da0: 40.000MB/s transfers
OF>  > da0: Attempt to query device size failed: NOT READY, Medium not present
OF>  > [...]
OF>  > when I insert flash into one of slots, I need to rescan da* providers, as 
OF>  > usually there is slice1 which should be mounted. 
OF> 
OF> The problem is that devfs isn't "triggered", therefore it
OF> doesn't notice that a new device appeared, so no new nodes
OF> are created.

Yes I understand this. What I currently fail to understand ;-)
is why devfs isn't triggered on read requests (possibly only on 'magic' areas 
like the very start of each provider, such as when fdisk or bsdlabel is 
running)?


OF>  > How can I achieve this? camcomtrol rescan does not help, and for now I've found 
OF>  > only *very* ugly workaround like
OF>  > 
OF>  > dd if=/dev/da0 of=/dev/da0 count=1 
OF>  > 
OF>  > which results in error, but actually create GEOMs
OF> 
OF> The following should work as well, without giving an error:
OF> 
OF> dd if=/dev/null of=/dev/da0 count=0
OF> 
OF> It opens the device for writing (without actually writing
OF> anything) and immediately closes it again, which causes
OF> devfs to be "triggered".

Aha, actually, it works. Thanks.

OF> I don't think there's currently a real fix for the problem,
OF> I'm afraid.

Before any kind of 'real fix' we should determine 'The Right Way[tm]' I 
think...

Sincerely,
D.Marck                                     [DM5020, MCK-RIPE, DM3-RIPN]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru ***
------------------------------------------------------------------------



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