More on hotplug issue w/HAL

Matthew Mastracci matt at aclaro.com
Fri Jan 9 03:08:48 EET 2004


On Thu, 2004-01-08 at 16:31, David Zeuthen wrote:
> On Thu, 2004-01-08 at 02:37, Matthew Mastracci wrote:
> > > Disregarding media detection for a while, does all your devices show up
> > > with the latest CVS version?
> > 
> > Works perfectly.  Tested startup and hotplug.  My card reader appears as
> > a multi-LUN SCSI device w/multiple SCSI interfaces, as expected.  See
> > attached screenshot for gorgeous details.  ;)
> > 
> 
> Rock. I suppose media detection doesn't work yet, no?

Not yet - where might I find the code to do this?  To be more specific,
it *does* work on hotplug or initial scan - it's just when the media
itself is removed or inserted (versus removing or inserting the CF
reader itself on the USB bus), nothing changes in HAL.

I've been playing around with SCSI device detection.  The easiest way to
do it seems to be just open()ing the root block device (note that
open()ing the partitions may still succeed if the media was removed
without umount-ing).  If you've got floppy code working, you're probably
already doing this.

BTW - I've noticed that the floppy drive doesn't appear anywhere within
sysfs.  I'm guessing that this is a kernel issue - there doesn't seem to
be a device class for it at all!  

This brings me to a different point - should there be a few virtual
device nodes *above* the current devices in HAL today?  The current HAL
architecture is very PCI-centric.  I would imagine tree below to be the
ideal:

+ Non-System Items
   + ???  Are there any ???
+ System Devices
   + Legacy Serial Ports
      + Serial Port
      + Serial Port
   + Legacy Parallel Ports
      + Parallel Port
      + Parallel Port
   + Floppy Drive Controller
      + Floppy Drive
   + I2C Bus
      + Some monitoring device
   + PCI Bus
      + On-board PCI Device 1
      + On-board PCI Device 2
      + On-board PCI Device 3
      + AGP Bridge
          + Superfast Video Card
      + External PCI Bridge
          + PCI Card 1
          + PCI Card 2
          + PCI Card 3

Unfortunately, it looks like there are a few device classes that are
missing bus entries in sysfs (ie: missing kernel support).  For example,
none of the legacy floppy/serial/parallel ports appear in there.  I
suppose that someone just needs to do the grunt work of writing the
sysfs classes.  :)

-- 
Matthew Mastracci <matt at aclaro.com>




More information about the xdg mailing list