Re: controlling LED's on USB flash drives

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

 



On 4/18/06, Ryan Dewberry <s25205634@xxxxxxxxxx> wrote:
> Sharath wrote:
>
> >----- Original Message ----
> >From: Mandeep Sandhu <mandeep.stinger@xxxxxxxxx>
> >To: Sharath <sharath_75@xxxxxxxxx>
> >Cc: kernelnewbies <kernelnewbies@xxxxxxxxxxxx>
> >Sent: Tuesday, April 18, 2006 5:20:51 PM
> >Subject: Re: controlling LED's on USB flash drives
> >
> >On 4/18/06, Sharath <sharath_75@xxxxxxxxx> wrote:
> >
> >
> >>Hi Mandeep,
> >>
> >>----- Original Message ----
> >>From: Mandeep Sandhu <mandeep.stinger@xxxxxxxxx>
> >>To: kernelnewbies <kernelnewbies@xxxxxxxxxxxx>
> >>Sent: Tuesday, April 18, 2006 3:52:50 PM
> >>Subject: Re: controlling LED's on USB flash drives
> >>
> >>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?
> >>
> >>This would depend on the electronics of the drive however, the LED status is set by the controller on the USB device. This status is commnunicated to it by the UBS protocol. Whena device is inserted, there are softwrae drivers that control the device and later it is mount onto a location in the filesystem.
> >>
> >> The two drivers for the hardware are:
> >> ehci_hcd
> >> uhci_hcd
> >>
> >>
>
>
> You're forgetting ohci which is the standard set by compaq i believe.
I'm new to usb world so don't know about it....but removing ohci
didn't switch of
the "little" light! :)

>
>
> >
> >You're correct. Removing ehci_hcd switched off the LED. I guess
> >removing this module
> >must be powering off the device. I'll look into the cleanup code to
> >confirm this.
> >
> >Thanks.
> >
> >The only problem being that modules is used to control the other usb devices - mouse etc nd would cause them to cease functioning..
> >
> >-Sharath
> >
> >
> >
> >
> >
> Not to mention that module unloading can be dangerous...
>
> There is ofcourse an alternative.. the break-the-little-light
> alternative,you wont know the difference between on and off in the future.

yep! thats for sure :)

>
>
> Sorry for the sarcasm...its been a long day.
>
>
> --
> 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