I have done some change. Con you tell me where is the problem? Te source code:
static void fx2000_write_bulk_callback (struct urb *urb) { struct usb_id75 *dev = (struct usb_id75 *)urb->context; dbg(__FUNCTION__ " - minor %d", dev->minor); printk("<1>Fx2000: writecallback\n"); if ((urb->status != -ENOENT) && (urb->status != -ECONNRESET)) { dbg(__FUNCTION__ " - nonzero write bulk status received: %d", urb->status); printk("<1>Fx2000: writecallback err=%i\n",urb->status); return; } printk("<1>Fx2000: writecallback no err\n"); return; } static void *fx2000_probe(struct usb_device *udev, unsigned int ifnum, const struct usb_device_id *id) { /* * The probe procedure is pretty standard. Device matching has already * been performed based on the id_table structure (defined later) */ struct fx2000_device *scanner; int err; int pipe,maxp; dbg("Fx2000: probe: vendor id 0x%x, device id 0x%x ifnum:%d", udev->descriptor.idVendor, udev->descriptor.idProduct, ifnum); /* We don't handle multiple configurations */ if (udev->descriptor.bNumConfigurations != 1) return NULL; printk("<1>fx2000: probe: vendor id 0x%x, device id 0x%x ifnum:%d\n", udev->descriptor.idVendor, udev->descriptor.idProduct, ifnum); /* allocate and zero a new data structure for the new device */ scanner = kmalloc(sizeof(struct fx2000_device), GFP_KERNEL); if (!scanner) return NULL; /* failure */ memset(scanner, 0, sizeof(*scanner)); printk("<1>Fx2000: memoryOK\n"); scanner->udev=udev; /* fill the URB data structure using the FILL_INT_URB macro */ pipe = usb_sndbulkpipe(udev,6); maxp = usb_maxpacket(udev, pipe, usb_pipeout(pipe)); if (maxp > 64) maxp = 64; FILL_BULK_URB(&scanner->sendUrb, udev, pipe, scanner->pipeOut, maxp, fx2000_write_bulk_callback, scanner); pipe = usb_rcvbulkpipe(udev,5); FILL_BULK_URB(&scanner->receiveUrb, udev, pipe, scanner->pipeIn, maxp, NULL, scanner); // provo a trasferire scanner->pipeOut[0]=0x00; scanner->pipeOut[1]=0x00; .....//command scanner->pipeOut[16]=0x00; scanner->pipeOut[17]=0x00; err=usb_submit_urb (&scanner->sendUrb); if (err) printk("<1>Fx2000: send pipe=%i\n",err); /*err=usb_submit_urb (&scanner->receiveUrb); printk(KERN_INFO "Fx2000: recv pipe=%i\n",err);*/ /* register the URB within the USB subsystem */ if (usb_submit_urb(&scanner->sendUrb)) { kfree(scanner); return NULL; } /* announce yourself */ printk("<1>Fx2000: probe successful\n"); /* * here you might MOD_INC_USE_COUNT; if you do, you'll need to unplug * the device or the devices before being able to unload the module */ /* and return the new structure */ return scanner; } And the /var/log/messages file: Jan 11 12:21:03 Linux kernel: usb.c: registered new driver fx2000 Jan 11 12:21:03 Linux kernel: fx2000: probe: vendor id 0xc43, device id 0x200 ifnum:0 Jan 11 12:21:03 Linux kernel: Fx2000: memoryOK Jan 11 12:21:03 Linux kernel: usb-uhci.c: ENXIO c0030300, flags 0, urb c4220008, burb c4220008 Jan 11 12:21:03 Linux kernel: usb-uhci.c: interrupt, status 3, frame# 2007 Jan 11 12:21:03 Linux kernel: Fx2000: writecallback Jan 11 12:21:03 Linux kernel: Fx2000: writecallback err=-110 Jan 11 12:21:07 Linux kernel: usb.c: deregistering driver fx2000 T.I.A. Giorgio Alboni ----- Original Message ----- From: "Greg KH" <[EMAIL PROTECTED]> To: "Ing. Giorgio Alboni" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, January 10, 2002 10:18 PM Subject: Re: [linux-usb-devel] Fx2000 scanner driver > On Thu, Jan 10, 2002 at 05:21:40PM +0100, Ing. Giorgio Alboni wrote: > > Dear usb developers, > > > > i'm new in USB driver develop. I'm trying to write a driver for our fingerprint scanner. > > I start from dabusb driver and Linux device driver 2nd Ed demo usb driver. > > The system is able to find the scanner and call the fx2000_probe function (see code below). > > I wrote a inline command for test purpos. Whit this I receive the error: > > > > ENXIO c0030300, flags 0, urb c1580000, burb c1580000 > > > > Where is the problem? > > T.I.A. > > I don't see any code in the attached function that would print out that > error message. When does the error happen, when your probe() is called? > > greg k-h > > _______________________________________________ > [EMAIL PROTECTED] > To unsubscribe, use the last form field at: > https://lists.sourceforge.net/lists/listinfo/linux-usb-devel > _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel