USB Flash reader under RELENG_6: force GEOM rescan
Dmitry Morozovsky
marck at rinet.ru
Thu Feb 9 10:17:17 PST 2006
On Thu, 9 Feb 2006, Oliver Fromme wrote:
OF> Dmitry Morozovsky <marck at 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 at rinet.ru ***
------------------------------------------------------------------------
More information about the freebsd-stable
mailing list