Re: controlling LED's on USB flash drives

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/21/06, Anita Tailor <tailor.anita@xxxxxxxxx> wrote:
>
>
>
> On 20/04/06, Mandeep Sandhu <mandeep.stinger@xxxxxxxxx> wrote:
> > On 4/18/06, Greg KH <greg@xxxxxxxxx> wrote:
> > > On Tue, Apr 18, 2006 at 11:22:50AM +0530, Mandeep Sandhu wrote:
> > > > On 4/18/06, Greg KH < greg@xxxxxxxxx> wrote:
> > > > > On Tue, Apr 18, 2006 at 10:26:05AM +0530, Mandeep Sandhu wrote:
> > > > > > Hi all,
> > > > > >
> > > > > > How does one control the behavior of the LED's present on the
> various usb
> > > > > > flash drives. Is it controlled solely by software or is it like
> that
> > > > > > the usb host controller
> > > > > > controls the LED's operation. eg: when I write to my flash drive
> the
> > > > > > the LED blinks.
> > > > > > Is this done via some usb driver or does the usb host controller
> does
> > > > > > that for us
> > > > > > when we issue a write command to the drive? Is usbled.c under
> drivers/usb/misc
> > > > > > responsible for controlling this operation? Any pointers are
> welcome.
> > > > >
> > > > > No, there is no way to control it, it's up to the device itself.
> > > >
> > > > Well, Greg, the reason I was asking was because I wanted to know if
> the LED
> > > > of my drive could be switched off when I umount it. In windows I
> noticed that
> > > > the LED is switched off when the drive is ready to be unplugged. Is it
> that they
> > > > might be removing power to the drive? Could we acheive a similar
> result?
> > >
> > > Yes, Windows is removing power to that specific port.
> > >
> > > And yes, we can also do that if you want (unloading the whole USB host
> > > controller driver is overkill and not recommended, as it will prevent
> > > any other USB device from working in your machine.)
> > >
> > > See the archives of the linux-usb-devel and linux-pm mailing lists for a
> > > pointer to a program that lets you turn off the power for some USB hub
> > > ports (note that it will not work on all hardware.)
> > >
> > Just one more question...before I go on my "hunt for the RED OKTOBER(LED)"
> :)
> >
> > Does "unmounting" mean the device can no longer be used? because it
> > makes sense to
> > turn off the LED only then...to indicate that the system no longer
> > recognizes this device.
> >
> > Or is that we still do some raw I/O from/to it? Then I think switching
> > off the LED is not
> > the right thing to do.
> >
> > > good luck,
> >
> > thanks. I'll need loads fo it!
> > >
>
>    I think sending  start/stop (1Bh) SCSI command to the flash drive turn
> off the LED if it's handling is present in the firmware of the flash drive .
> I tried this and it is working with my flash drive.
>
>  There is a section on the LED page in  Hut1_11.pdf  (available on
> www.usb.org).
>  I think these commands can used to control behavior of LED's present on
> device .
>
Thanks Anita. I'll look at the docs to see if the commands are vendor
dependent. The device
that I have is a SanDisk (Cruizer mini).

-mandeep
>  -Anita
>
>
> > >
>
>
>
>
> > --
> > Kernelnewbies: Help each other learn about the Linux kernel.
> > Archive:       http://mail.nl.linux.org/kernelnewbies/
> > FAQ:           http://kernelnewbies.org/faq/
> >
> >
>
>

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux