[linux-usb-devel] suggation on writing usb driver.

2001-12-10 Thread Pankaj Kumar Soni
Hello All Can anybody tell me what steps i follow to write usb driver for ADC card. I have seen Mouse driver, and it is a bit difficult for me to design ADC driver based on this. Can any one will suggest me some solution. Thanks Pankaj. On Tue, 11 Dec 2001 [EMAIL PROTECTED] wrote : >

Re: [linux-usb-devel] disconnect/ioctl/probe races?

2001-12-10 Thread David Brownell
Catching up on an old thread: From: "Thomas Sailer" <[EMAIL PROTECTED]> > Duncan Sands wrote: > > > races with disconnect. In usb.c there is the usb_disconnect > > function which first calls driver->disconnect, then only later > > Ah ok, you're concerned about the driver ioctl getting called >

Re: [linux-usb-devel] problem with act_altsetting and probing?

2001-12-10 Thread David Brownell
I think usb_find_interface_driver() does something that's a bit iffy, but that can be dealt with by insisting that drivers call usb_set_interface() for any non-deafult setting. Yes, I've had the same thought about how the probing works. - Dave - Original Message - From: "Matthew Dharm

Re: [linux-usb-devel] [RFC] usbfs patch to use the vfs better

2001-12-10 Thread David Brownell
> I've tested this out with usbview and lsusb, which are the only programs > that I have that use the filesystem. Could people with devices that > access the filesystem (like gphoto2 and other libusb based programs) > please test this out and let me know if I've broken anything? I'll see how thi

[linux-usb-devel] [RFC] usbfs patch to use the vfs better

2001-12-10 Thread Greg KH
Hi all, Here's a patch that converts the usbfs code to use the vfs layer much better. The code is based on pcihpfs, driverfs, and ramfs which all are very simple filesystems. It ends up reducing much of the code, and finally the "special" files are easier to understand how they are created :)

Re: [linux-usb-devel] EZUSB firmware uploader, clone or share?

2001-12-10 Thread Oliver Neukum
Am Montag, 10. Dezember 2001 18:41 schrieb David Brownell: > When "struct usb_device" gets suspend/resume methods, > wouldn't such a device just turn its suspend() into a disconnect > so it gets fully re-enumerated on a resume()? > > - Dave Firstly, with current device names you must not do so or

Re: [linux-usb-devel] Newbie developer issues

2001-12-10 Thread Steven Toth
Georg, thanks for the feedback >Fill the memory with another pattern (eg. 0xaa or such). If it >is changed, it definitely came from the device. Another hint >would be the length of each frame. Sorry, my fault, I should I said, I already tried that but I'm still getting zero's (indicating t

Re: [linux-usb-devel] Newbie developer issues

2001-12-10 Thread Georg Acher
On Mon, Dec 10, 2001 at 08:27:30PM +, Steven Toth wrote: > Question 1. I'm submitting the ISO tranfer URBs which are all coming back > (via completion handler) with the correct number of packets - but they are > all empty. No errors, status is fine, frame count is increasing as expected >

[linux-usb-devel] Newbie developer issues

2001-12-10 Thread Steven Toth
Hi, I'm stuck on a project and I wondered if any of you kind chaps might be able to help? (platform = kernel 2.4.16 using usb-uhci) I'm writing a device driver (GPL) for the PrimaScan icam320 webcam (based on the existing driver for dabusb). I'm using sniffusb 0.13 to intercept the windows<->

Re: [linux-usb-devel] Re: Q: device(file) permissions for USB

2001-12-10 Thread Johannes Erdfelt
On Mon, Dec 10, 2001, David Brownell <[EMAIL PROTECTED]> wrote: > > I also never advocated removing topology information. We already have it > > via an ioctl call. I just don't want topology exposed in the directory > > structure for usbdevfs. > > > > In that case, we're forcing the information o

Re: [linux-usb-devel] Re: Q: device(file) permissions for USB

2001-12-10 Thread David Brownell
> I also never advocated removing topology information. We already have it > via an ioctl call. I just don't want topology exposed in the directory > structure for usbdevfs. > > In that case, we're forcing the information on everyone if they care or > not, and most programs don't care. Hmm ... t

Re: [linux-usb-devel] Re: Q: device(file) permissions for USB

2001-12-10 Thread David Brownell
> but anyway, why limit usbdevfs to only devices which don't have kernel > drivers? the end user should be able to decide what should drive a > certain device, right? That's a familiar issue. Even if there's a kernel driver for one interface, a user mode one might be appropriate for a different

Re: [linux-usb-devel] Re: Q: device(file) permissions for USB

2001-12-10 Thread Greg KH
On Mon, Dec 10, 2001 at 02:21:18PM -0500, Dan Streetman wrote: > > but anyway, why limit usbdevfs to only devices which don't have kernel > drivers? the end user should be able to decide what should drive a > certain device, right? I agree. I just didn't know of any devices that did this. Tha

Re: [linux-usb-devel] Re: Q: device(file) permissions for USB

2001-12-10 Thread Dan Streetman
On Mon, 10 Dec 2001, Greg KH wrote: >On Mon, Dec 10, 2001 at 12:00:31PM -0500, Dan Streetman wrote: >> >> On Fri, 7 Dec 2001, Greg KH wrote: >> >> >I don't know of anyone using the usbdevfs interface on devices that have >> >a kernel driver associated with it. Does anyone else? >> >> Yes, me. I

Re: [linux-usb-devel] Re: Q: device(file) permissions for USB

2001-12-10 Thread David Brownell
I want to see that patch get integrated too, into the 2.4.x tree, to make the "gphoto2" users' lives easier. They'll be able to disconnect "dc2xx". It needs a locking update yet ... :) - Dave - Original Message - From: "Dan Streetman" <[EMAIL PROTECTED]> To: "Greg KH" <[EMAIL PROTECT

Re: [linux-usb-devel] EZUSB firmware uploader, clone or share?

2001-12-10 Thread David Brownell
When "struct usb_device" gets suspend/resume methods, wouldn't such a device just turn its suspend() into a disconnect so it gets fully re-enumerated on a resume()? - Dave - Original Message - From: "Oliver Neukum" <[EMAIL PROTECTED]> To: "Greg KH" <[EMAIL PROTECTED]>; "Lars Doelle" <[E

Re: [linux-usb-devel] Re: Q: device(file) permissions for USB

2001-12-10 Thread Johannes Erdfelt
On Mon, Dec 10, 2001, Dan Streetman <[EMAIL PROTECTED]> wrote: > > On Sat, 8 Dec 2001, Johannes Erdfelt wrote: > > >The rest of the USB code just doesn't care. I think exposing it via > >usbdevfs will just complicate things where it isn't needed. > > If multiple identical devices are connected,

Re: [linux-usb-devel] Re: Q: device(file) permissions for USB

2001-12-10 Thread Greg KH
On Mon, Dec 10, 2001 at 12:00:31PM -0500, Dan Streetman wrote: > > On Fri, 7 Dec 2001, Greg KH wrote: > > >I don't know of anyone using the usbdevfs interface on devices that have > >a kernel driver associated with it. Does anyone else? > > Yes, me. I have to talk via usbdevfs to HID devices.

Re: [linux-usb-devel] Re: Q: device(file) permissions for USB

2001-12-10 Thread Dan Streetman
On Sat, 8 Dec 2001, Johannes Erdfelt wrote: >The rest of the USB code just doesn't care. I think exposing it via >usbdevfs will just complicate things where it isn't needed. If multiple identical devices are connected, topology is the one and only way for the user to differentiate between the d

Re: [linux-usb-devel] Re: Q: device(file) permissions for USB

2001-12-10 Thread Dan Streetman
On Fri, 7 Dec 2001, Greg KH wrote: >I don't know of anyone using the usbdevfs interface on devices that have >a kernel driver associated with it. Does anyone else? Yes, me. I have to talk via usbdevfs to HID devices. Of course I have to either not build the HID module at all (and then my HID

[linux-usb-devel] Need Help on USB.

2001-12-10 Thread Pankaj Kumar Soni
Hello All Can anybody tell me how this usbmouse works?? that is in linux/drivers/usb directory. I want to write a usb driver for my usb ADC card how i will proceed... Any suggation will be helpful for me. Thanks Pankaj. On Mon, 10 Dec 2001 [EMAIL PROTECTED] wrote : > Send linux-usb-d

Re: [linux-usb-devel] EZUSB firmware uploader, clone or share?

2001-12-10 Thread Oliver Neukum
Am Montag, 10. Dezember 2001 11:10 schrieb Alan Cox: > > > I can see that being possible. For that obscure case you'd probably > > > have to mlock stuff. > > > > For this obscure case, would the situation be different if the firmware > > was in kernel space? > > It would still be unswappable so yo

Re: [linux-usb-devel] EZUSB firmware uploader, clone or share?

2001-12-10 Thread Brad Hards
Alan Cox wrote: > > > Does this apply to the firmware files only ? Could we come to the situation > > that the kernel wants to page out to the firmwareless device to free ram for >reading > > the firmware ? > > In the unusual case of having to feed firmware to a usb storage device then > I can

Re: [linux-usb-devel] EZUSB firmware uploader, clone or share?

2001-12-10 Thread Alan Cox
> > I can see that being possible. For that obscure case you'd probably have to > > mlock stuff. > For this obscure case, would the situation be different if the firmware was in > kernel space? It would still be unswappable so you might as well mlock it into user space I suspect. __

Re: [linux-usb-devel] EZUSB firmware uploader, clone or share?

2001-12-10 Thread Alan Cox
> Does this apply to the firmware files only ? Could we come to the situation > that the kernel wants to page out to the firmwareless device to free ram for reading > the firmware ? In the unusual case of having to feed firmware to a usb storage device then I can see that being possible. For that

Re: [linux-usb-devel] EZUSB firmware uploader, clone or share?

2001-12-10 Thread Oliver Neukum
Am Montag, 10. Dezember 2001 10:05 schrieb Alan Cox: > > power management ? I dimly remember somebody mentioning a storage device > > with firmware download on this list. IIRC the kernel may have dirty pages > > around while going to power safe. (Thanks to nbd, the same line of > > thought applies

Re: [linux-usb-devel] EZUSB firmware uploader, clone or share?

2001-12-10 Thread Alan Cox
> power management ? I dimly remember somebody mentioning a storage device > with firmware download on this list. IIRC the kernel may have dirty pages around > while going to power safe. (Thanks to nbd, the same line of thought applies to >network > devices) Power management ends up being a depe

Re: [linux-usb-devel] EZUSB firmware uploader, clone or share?

2001-12-10 Thread Oliver Neukum
> The decision was made not to have a generic uploader. Like David said, > firmware downloads should be done from userspace. The current > usb-serial drivers will be soon converted to this method, and the ezusb > code removed. Can we deal with devices that need their firmware reloaded due to p

Re: [linux-usb-devel] Re: USB SE401 module locking in Linux 2.4.16

2001-12-10 Thread Oliver Neukum
Am Sonntag, 9. Dezember 2001 23:35 schrieb Jeroen Vreeken: > Hi, > > I see no problem with this patch, > Johannes can you apply this patch? It fails however, to do proper reference counting during probe() and disconnect(). A patch to do that is included. Regards Oliver -