Randy.Dunlap wrote:

> On Wed, 19 Nov 2003 02:40:03 +0800 lrd <[EMAIL PROTECTED]> wrote:
>
> | Hi all:
> | | I'm new to Linux device driver development and am writing a driver for | my USB device. Now, I encounter several problems.
>
> What kind of device is it?


This device is made by me. It's just a board for demo and has 1 Control EP, 2 Bulk EPs.

> | 1. My driver is installed successfully in Linux 2.4.22. But when I | connect my device to the system, it seems that nobody calls my drivers | routines - I think at least the 'probe' routine should be called. Am I | wrong?
>
> Did you modify the module device table to contain your device's ID info?


I think the following lines do this. Those VID/PID are defined by my device and work fine in MS Windows's driver which is written by me.
#define USB_ZBOARD_VENDOR_ID 0x1234
#define USB_ZBOARD_PRODUCT_ID 0x0000
static struct usb_device_id g_ZBoard_IDS [] =
{
{ USB_DEVICE(USB_ZBOARD_VENDOR_ID, USB_ZBOARD_PRODUCT_ID) },
/* "Gadget Zero" firmware runs under Linux */
// { USB_DEVICE(0x0525, 0xa4a0) },
{ } /* Terminating entry */
};


MODULE_DEVICE_TABLE(usb, g_ZBoard_IDS);

> | 2. 'insmod' fails in Linux2.6.0-test9. It says: Invalid module format. | The code is modified to fit the chages from 2.4 to 2.6 and compiled | successfully. Then, what does this message mean? I'm sure the include | paths and the version settings are right. Furthermore, modutils work | fine when I compile & install my 2.6.0-test9.
>
> In 2.6.x, did you insmod mod.o or mod.ko? You must insmod mod.ko.
> If it still says invalid module format, check your $PATH: whether
> it finds modutils (for Linux 2.4.x) or module-init-tools (for 2.6.x)
> first. And check it as root, not as $USER, since they can be (are)
> different.


I run 'man insmod' and find these words: This version of insmod is for kernel 2.5.48 and above.
So, is it ok for me to install my driver in 2.6.0?
Furthermore, I always login as 'root'.


Anyway, thanks for ur reply.

LRD




------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to