Re: Extend device driver?
On Sat, Sep 10, 2016 at 04:41:34PM +0200, Pol Eyschen wrote: > Hi everyone, > > I want to implement some custom functions of my mouse (Madcatz RAT5) in > Linux, e.g custom DPI-values. As this requires writing over USB to the > firmware of the mouse I was thinking of writing a module to accomplish > this. However I don't want to reimplement a whole mouse-driver,so I > wanted to ask if there is a possibility of binding the device to 2 > modules or having my module extend usbhid, so that my module would only > be used to perform these custom operations while usbhid stays in charge > of the whole "mouse business". Please just use the hidraw userspace driver/library instead, that way you don't have to unbind the kernel driver and everything should work just fine without having to touch the kernel at all. Hope this helps, greg k-h ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Extend device driver?
Hi everyone, I want to implement some custom functions of my mouse (Madcatz RAT5) in Linux, e.g custom DPI-values. As this requires writing over USB to the firmware of the mouse I was thinking of writing a module to accomplish this. However I don't want to reimplement a whole mouse-driver,so I wanted to ask if there is a possibility of binding the device to 2 modules or having my module extend usbhid, so that my module would only be used to perform these custom operations while usbhid stays in charge of the whole "mouse business". Thanks Pol ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: Extend device driver?
You may want to look at http://www.signal11.us/oss/hidapi/ too, it has nice interface to HID device and supports libusb and hidraw backends (y) Regards, 2016-09-10 12:14 GMT-03:00 Greg KH: > On Sat, Sep 10, 2016 at 04:41:34PM +0200, Pol Eyschen wrote: >> Hi everyone, >> >> I want to implement some custom functions of my mouse (Madcatz RAT5) in >> Linux, e.g custom DPI-values. As this requires writing over USB to the >> firmware of the mouse I was thinking of writing a module to accomplish >> this. However I don't want to reimplement a whole mouse-driver,so I >> wanted to ask if there is a possibility of binding the device to 2 >> modules or having my module extend usbhid, so that my module would only >> be used to perform these custom operations while usbhid stays in charge >> of the whole "mouse business". > > Please just use the hidraw userspace driver/library instead, that way > you don't have to unbind the kernel driver and everything should work > just fine without having to touch the kernel at all. > > Hope this helps, > > greg k-h > > ___ > Kernelnewbies mailing list > Kernelnewbies@kernelnewbies.org > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies -- "Do or do not. There is no try" Yoda Master ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Status/Progress of CherryTrail / BayTrail support in mainline Linux kernel
Hi, sorry for asking a possibly obvious question, but: Why is support for Cherry Trail / Bay Trail so bad in the mainline kernel? Is this being worked on? And where can one help or track the progress with improving this? Recently, I bought a Win10 netbook to install Linux on. It's a beautiful small device with a fanless Z3735F CPU. Just right for my kids as their first own computer. After using Intel hardware since several years without a hitch, it was surprising to find this not being fully supported by current 2016 Linux distributions. The Wifi is not running at all, lost the network with a Wifi stick that works fine on RPi and the system freezes every now and then for no reproducible reasons. Googling around, all I found were similar complaints by other Linux users and a confusing array of incomplete third-party driver projects not ready for mainline, like this one: https://github.com/hadess/rtl8723bs/issues/96 Also, there's a litany of "don't buy Cherry Trail or Bay Trail devices for Linux" articles, which probably would have been helpful to read before buying that fateful device. This is sad to watch. I tried to find a different device for my kids, but all of the netbook-like devices on the market now share this problem. A whole generation of very interesting devices appears to be lost for Linux users. Is there hope for this device class or does one have to stick to Core i CPUs for the time being? Kind regards, Hanno ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Linux Security Module listsecurity (and security xattr hooks) only one called?
In security/security.c (see here: https://github.com/torvalds/linux/blob/835c92d43b29eb354abdbd5475308a474d7efdfa/security/security.c ) Looking at this: int security_inode_listsecurity(struct inode *inode, char *buffer, size_t buffer_size) { if (unlikely(IS_PRIVATE(inode))) return 0; return call_int_hook(inode_listsecurity, 0, inode, buffer, buffer_size); } One would expect all stacked security module to be called. However, when looking at this: #define call_int_hook(FUNC, IRC, ...) ({\ int RC = IRC; \ do {\ struct security_hook_list *P; \ \ list_for_each_entry(P, _hook_heads.FUNC, list) { \ RC = P->hook.FUNC(__VA_ARGS__); \ if (RC != 0)\ break; \ } \ } while (0);\ RC; \ }) If one of the module return a non-zero value, the other are not called. That means that the list of security of xattr is not built (or rather that it only contains the first module being called), as the lenght of inserted element is returned. Similarly for setsecurity and getsecurity, it seems that only one module will be called as if the given module does not support the security xattr, it returns -EOPNOTSUPP (instead I believe the next module being called, until one supporting the attribute is met). What is the rational here? I could change the code to support multiple security xattr, but don't want to do so before I understand why it was done like this. Any help is welcome. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
memblock_reserve or memblock_remove to reserve a page
I want to reserve a physical memory page with a fixed PFN. I do not want this page to be used by anyone else. I am calling memblock_reserve() to supposedly reserve the page. I am writing some content into this page. What I see is that during some runs the content of this page is modified (either fully or sometimes partially). In few runs, I see it as intact. Is it expected that even after calling memblock_reserve() the kernel can allocate this physical page for any other purpose? How is memblock_remove() different from memblock_reserve? I tried reading up but didn't see any useful information. What I understood is memblock_remove will completely remove from kernel's allocation mechanism. Should I then be using remove instead of reserve? -Thanks Nikhil ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Confused about rtnl routing mutex scalability
Greetings All, I am curious as it after reading the network code for a while it seems that to me at least the rtnl mutex lock is a bottleneck. Is there any reason that we are still using a global mutex for all routing changes in the networking stack for the Linux kernel or does it actually scale only, seems to me that it is causing nothing but problems with deadlocks related to it or issues with locking timeouts on separate netdev routing tables for two different networks. Is this just me or does this lock actually cause serious issues or can do so. Regards, Nick ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Re: memblock_reserve or memblock_remove to reserve a page
Hi, I want to reserve a physical memory page with a fixed PFN. I do not want this page to be used by anyone else. I am calling memblock_reserve() to supposedly reserve the page. I am writing some content into this page. What I see is that during some runs the content of this page is modified (either fully or sometimes partially). In few runs, I see it as intact. Is it expected that even after calling memblock_reserve() the kernel can allocate this physical page for any other purpose? How is memblock_remove() different from memblock_reserve? I tried reading up but didn't see any useful information. What I understood is memblock_remove will completely remove from kernel's allocation mechanism. Should I then be using remove instead of reserve? -Thanks Nikhil ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies