Problem with PCI Driver on Ubuntu 10.10 i386
Murali N
nalajala.murali at gmail.com
Wed Feb 23 19:09:24 EST 2011
Hi,
On Wed, Feb 23, 2011 at 2:12 PM, Adhyas Avasthi <adhyas at gmail.com> wrote:
> Hi Murali
>
> Thanks for the response. Sorry, I should have sent dmesg output earlier.
> Yes, the module is loaded in lsmod.
> Here is the additional output from dmesg after I inserted the module.
>
> - Adhyas
>
> On Wed, Feb 23, 2011 at 11:50 AM, Murali N <nalajala.murali at gmail.com> wrote:
>> Hi,
>>
>> On Wed, Feb 23, 2011 at 12:10 PM, Adhyas Avasthi <adhyas at gmail.com> wrote:
>>> I am trying to develop a very basic PCI device driver for a dummy
>>> device I have created in qemu. The device has no functionality except
>>> that it sits on the PCI bus behind two bridges (bridge 0 on root bus,
>>> bridge 1 only device behind bridge 0, and device behind bridge 1 as
>>> the only device). It is a single function do nothing device with one
>>> MMIO BAR of 0x10000 size. The BAR is initialized by the kernel at some
>>> MMIO location but the device is not disabled, as there is no driver. I
>>> have used one of the available vendor ids for my work.
>>>
>>> My driver is not loaded automatically, so I load the driver manually
>>> after the boot of the VM, and then issues a rescan of the entire PCI
>>> bus using "echo 1 > /sys/bus/pci/rescan", but nothing happens. The
>>> probe function of my driver is never invoked, neither does the device
>>> gets visible in lspci output.
>>>
>>> Can someone help me identify what I might be doing wrong?
>>>
>>> I have attached the driver code, the lspci output, the lspci -H1
>>> output, the lspci -H1 -xxx -s 02:02.0 output that details the
>>> registers of the device.
>>>
>>> --
>>> Adhyas
>>> ********************************************************************
>>> Two types have compatible type if their types are the same.
>>> — ANSI C Standard, 3.1.2.6.
>>> ********************************************************************
>>>
>>> _______________________________________________
>>> Kernelnewbies mailing list
>>> Kernelnewbies at kernelnewbies.org
>>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>>
>>>
>>
>> Once you loaded manually, did you see any errors in dmesg while
>> inserting the module?
>> what is the output of 'lsmod'? is your driver present in the list?
>>
>> Can you please post the dmesg after you loaded the module manually.
>>
>> --
>> Regards,
>> Murali N
>>
>
>
>
> --
> Adhyas
> ********************************************************************
> Two types have compatible type if their types are the same.
> — ANSI C Standard, 3.1.2.6.
> ********************************************************************
>
i am suspecting the 'dummy_pci_tbl' values. How did you populate the
device table?
#define DUMMY_VENDOR_ID 0xFFF0
#define DUMMY_DEVICE_ID 0x8748
#define DUMMY_CLASS_ID 0x0880 // ??
these values are specific to PCI device which is already on your system?
Finally please include MODULE_LICENSE("GPL"); to remove the taint errors.
--
Regards,
Murali N
More information about the Kernelnewbies
mailing list