<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    I'm writing a udev rule that I want to run only when something is
    plugged into a USB port<br>
    <br>
    <b><small><font face="Courier New, Courier, monospace">ACTION!="add",
          GOTO="end01"<br>
          <br>
          BUS=="usb",RUN+="/lib/libexec/usb-load %b %s{idVendor}
          %s{idProduct}", $attr{idVendor}, $s{idProduct}<br>
          <br>
          SUBSYSTEM!="net", BUS!="usb", GOTO="end01"<br>
          <br>
          SYSFS{idProduct}=="9700", SYSFS{idVendor}=="0fe6", <br>
          KERNEL=="*", RUN+="/sbin/modprobe dm9601"<br>
          <br>
          LABEL="end01"<br>
        </font></small></b><br>
    <br>
    My goal is to load the necessary modules on this system.&nbsp; The
    problem is that the perl script 'usb-load' is not executed.&nbsp;&nbsp; I can
    easily remove the BUS=="usb" part and have it run on all devices and
    it can look at devpath to see USB.&nbsp; The problem is that this would
    be cpu intensive.&nbsp;&nbsp; I want it to execute whenever a usb-serial,
    usb-modem, or usb-storage device is attached.&nbsp;&nbsp; In some cases the
    kernel does not know that a certain vId and pId is attached to a
    driver and I have to load it myself.&nbsp; You see that example where I
    am having to load the dm9601 driver for a usb-net device.&nbsp;&nbsp; I see
    the same for usb-storage.&nbsp; Some USB sticks the kernel loads
    usb-storage for some it does not know to. If I capture the vId and
    pId I can then look it up and load up the correct one.<br>
    <br>
    Chris<br>
    <br>
    <br>
    <br>
    <br>
    <br>
  </body>
</html>