Re: Getting driver module name from device node?

2010-06-22 Thread arshad hussain
lshal command can spit out some interesting stuff too.
This is what i got for my network card.

Thanks

-- snip ---
udi = '/org/freedesktop/Hal/devices/pci_14e4_169c'
  info.linux.driver = 'tg3'  (string)
  info.parent = '/org/freedesktop/Hal/devices/pci_1002_4371'  (string)
  info.product = 'NetXtreme BCM5788 Gigabit Ethernet'  (string)
  info.subsystem = 'pci'  (string)
  info.udi = '/org/freedesktop/Hal/devices/pci_14e4_169c'  (string)
  info.vendor = 'Broadcom Corporation'  (string)
  linux.hotplug_type = 2  (0x2)  (int)
  linux.subsystem = 'pci'  (string)
  linux.sysfs_path =
'/sys/devices/pci:00/:00:14.4/:02:01.0'  (string)
  pci.device_class = 2  (0x2)  (int)
  pci.device_protocol = 0  (0x0)  (int)
  pci.device_subclass = 0  (0x0)  (int)
  pci.linux.sysfs_path =
'/sys/devices/pci:00/:00:14.4/:02:01.0'  (string)
  pci.product = 'NetXtreme BCM5788 Gigabit Ethernet'  (string)
  pci.product_id = 5788  (0x169c)  (int)
  pci.subsys_product_id = 12427  (0x308b)  (int)
  pci.subsys_vendor = 'Hewlett-Packard Company'  (string)
  pci.subsys_vendor_id = 4156  (0x103c)  (int)
  pci.vendor = 'Broadcom Corporation'  (string)
  pci.vendor_id = 5348  (0x14e4)  (int)
--- snip end ---

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Getting driver module name from device node?

2010-06-02 Thread Tapas Mishra
Mayank any question is not dumb.Had it been so many of us would not
have been subscribed to this list.

On Thu, Jun 3, 2010 at 12:34 AM, Mayank Kaushik  wrote:
> I found this for network devices:
>
> ls -l /sys/class/net/eth0/device/driver
>
> lrwxrwxrwx 1 root root 0 2006-02-09 14:16 /sys/class/net/eth0/device/driver
> -> ../../../../bus/pci/drivers/e1000
>
> which is what I had been looking for.
>
>
> On Tue, May 18, 2010 at 5:14 PM, Mayank Kaushik 
> wrote:
>>
>> Hi everyone,
>>
>> Sorry if this is a dumb question. For a device node in the /dev directory,
>> how do i figure out which driver is handling that node? I'm looking for a
>> way to do this from the shell prompt.
>>
>> Thanks,
>> -Mayank
>
>
>
> --
> Regards,
> Mayank
>



-- 
Tapas

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ



Re: Getting driver module name from device node?

2010-06-02 Thread Mayank Kaushik
I found this for network devices:

ls -l /sys/class/net/eth0/device/driver

lrwxrwxrwx 1 root root 0 2006-02-09 14:16 /sys/class/net/eth0/device/driver
-> ../../../../bus/pci/drivers/e1000

which is what I had been looking for.


On Tue, May 18, 2010 at 5:14 PM, Mayank Kaushik wrote:

> Hi everyone,
>
> Sorry if this is a dumb question. For a device node in the /dev directory,
> how do i figure out which driver is handling that node? I'm looking for a
> way to do this from the shell prompt.
>
> Thanks,
> -Mayank
>



-- 
Regards,
Mayank


Re: Getting driver module name from device node?

2010-05-18 Thread Joel Fernandes
Hi Mayank,

Depending on the device, you can use sysfs (/sys) for this.

Your email address says "utexas", are you currently studying at a uni in
texas? I'm joining CS this fall at UTDallas =)

cheers,
Joel

On Wed, May 19, 2010 at 3:44 AM, Mayank Kaushik 
 wrote:

> Hi everyone,
>
> Sorry if this is a dumb question. For a device node in the /dev directory,
> how do i figure out which driver is handling that node? I'm looking for a
> way to do this from the shell prompt.
>
> Thanks,
> -Mayank
>


Getting driver module name from device node?

2010-05-18 Thread Mayank Kaushik
Hi everyone,

Sorry if this is a dumb question. For a device node in the /dev directory,
how do i figure out which driver is handling that node? I'm looking for a
way to do this from the shell prompt.

Thanks,
-Mayank