On Mon, Jan 29, 2007 at 09:36:58AM +0100, Nathael Pajani wrote: > Hi ! > > I agree with you on all the points, but then, I cannot do what I want, as > this > job is for a customer. > > Greg KH a wrote : > >On Thu, Jan 25, 2007 at 10:25:34AM +0100, Nathael Pajani wrote: > >Don't use the generic driver for any real device, it's not made for that > >at all. > That's what the customer is actually doing, and what is found at the end of > the > documentation: Documentation/usb/usb-serial.txt > Generic Serial driver > insmod usbserial vendor=0x#### product=0x####
Yes, that's a good way to get some devices up and running with no kernel changes. But to do it "correct" a kernel driver needs to be written. This driver can be very tiny, as some of the usb-serial drivers show. > >>So I'm "writting" a "fake" driver, which uses most of the generic one, > >>but is not the generic one. > > > >You can do that in very few lines, look at the funsoft.c driver for such > >an example. I recommend doing that. > That's what my driver looks like, whith only probe and disconnect functions > for some stuff. That's great. > >>Why don't I simply modify the generic driver ? > > > >Because I will not let you :) > Of course :) > But this is for a customer with very particular needs, not for the > mainstream kernel. Ok, but it would probably be good to get your "paticular" kernel module in the main tree so you don't have to maintain it over time... > >>Because I need other functionnalities like "static" allocation of tty > >>numbers (just think of the number of cables connected to the PC, and try > >>to immagine yourself trying to find which ttyUSB is which device....) > > > >That's what sysfs and udev solve. > Partly, but the customer does not want udev. Then just look at sysfs for the links. > And I do not see which part in the usb-serial code makes device connected to > port 18 on the machine be ttyUSB18 if it's the first connected device. > It would be ttyUSB0. no? What does "first connected device" mean? It can mean one thing this boot, another thing the next boot :) > Maybe I'm missing something, I'm not accustomed to udev, just told the > client that we should have a look at it for it may solve some parts of > his problem and he told me he does not want udev, so I did not look > further. If he wants to name these devices in a way that will always be the same, no matter what happens on boot, you need to do something like what udev does. That is what it was created for. > >Care to post what you have? > This would be no problem, > If you want I can send it all to you in the end, just ask me. > This is GPL code isn't it ? It sure should be :) So sure, please post it. thanks, greg k-h ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel