<p>On Aug 15, 2014 8:28 AM, "Jaret Flores" <<a href="mailto:jarflores@gmail.com">jarflores@gmail.com</a>> wrote:<br>
><br>
> Well...I guess I've learned my lesson. I apologize for asking the<br>
> previous question related to the Eudyptula Challenge. I did not read<br>
> the August 2014 status report well enough and did not realize it was<br>
> against the rules to ask questions the community. It was not my<br>
> intention to start off my interactions with the community on the wrong<br>
> foot.<br>
></p>
<p>Its part of the fun to find out yourself how to do this task. i have taken the longest time and maximum number of attempts for this task.but when finally little tells you that task is complete , you will get a feeling of achievement and you will also say "sh** .. it was this easy...". <br>
i hope i have not broken the rules by replying....<br><br><br></p>
<p>> If it is any consolation, the main reason I asked is that I thought<br>
> there might be an outside module, or something else, in the kernel<br>
> affecting my particular usb driver module. Since this (possible)<br>
> "outside interference" wasn't directly related to the understanding of<br>
> code within the module itself (which I wrote on my own), I thought it<br>
> would OK to get some input on where to go.<br>
><br>
> My apologies again for the question and I hope I can interact with you<br>
> all in a more positive light in the future.<br>
> -Jaret<br>
><br>
> On Thu, Aug 14, 2014 at 3:21 PM, Jaret Flores <<a href="mailto:jarflores@gmail.com">jarflores@gmail.com</a>> wrote:<br>
> > I know I am not supposed to get too much help on the eudyptula<br>
> > challenges, but I can't seem to figure this last thing out.<br>
> ><br>
> > The goal is to write (the skeleton of) a usb driver module that loads<br>
> > and registers the driver when a usb keyboard is plugged in. What I<br>
> > have so far does exactly that except that the struct usb_driver:<br>
> ><br>
> > 1) probe function is not called (neither via keyboard plugin nor when<br>
> > module is loaded manually with modprobe).<br>
> > 2) disconnect function is called only after the module is unloaded<br>
> > (with rmmod) AND THEN the keyboard is unplugged.<br>
> ><br>
> > From ldd3:<br>
> > for probe: "This function is called by the USB core when it thinks it<br>
> > has a struct usb_interface that this driver can handle."<br>
> > for disconnect: "This function is called by the USB core when the<br>
> > struct usb_interface has been removed from the system or when the<br>
> > driver is being unloaded from the USB core."<br>
> ><br>
> > From the quotes, it seems the kernel does not think my driver is valid<br>
> > to handle the keyboard (though 2 may not actually be abnormal<br>
> > behavior). I am thinking, perhaps the struct usb_device_id table is<br>
> > wrong or incomplete:<br>
> ><br>
> > static struct usb_device_id hw_id_table[] = {<br>
> > {USB_INTERFACE_INFO(USB_INTERFACE_CLASS_HID,<br>
> > USB_INTERFACE_SUBCLASS_BOOT, USB_INTERFACE_PROTOCOL_KEYBOARD)},<br>
> > {}<br>
> > };<br>
> ><br>
> > MODULE_DEVICE_TABLE(usb, hw_id_table);<br>
> ><br>
> > There is also a USB_DEVICE_INFO() macro, but I cannot seem to find a<br>
> > file analogous to include/uapi/linux/hid.h which (would) define the<br>
> > arguments to USB_DEVICE_INFO(). Is this the problem? Or am I missing<br>
> > something else?<br>
> ><br>
> > Thanks for the info,<br>
> > Jaret<br>
><br>
> _______________________________________________<br>
> Kernelnewbies mailing list<br>
> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</p>