On Sun, 09 Jul 2006 23:09:10 +0200 Jon K Hellan <[EMAIL PROTECTED]> wrote:
| > The driver is tiny, so it could be something simple. | | Looks like I was right. The callback to usb_fill_bulk_urb in | anydata_open (l.74 in drivers/usb/serial/anydata.c) should be | usb_serial_generic_read_bulk_callback, not write. With this fixed, I can | talk to the modem when the anydata converter is attached to ttyUSB0. I think you're right. Either, or it's a typo or the author was using this only to cleanup. But have to be fixed if it doesn't work. --- Anydata is using usb_serial_generic_write_bulk_callback() for its read URB, but it should use usb_serial_generic_read_bulk_callback() instead (it's a read URB, isn't it?). Reported by Jon K Hellan <[EMAIL PROTECTED]>. Signed-off-by: Luiz Fernando N. Capitulino <[EMAIL PROTECTED]> --- drivers/usb/serial/anydata.c | 2 +- drivers/usb/serial/generic.c | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/usb/serial/anydata.c b/drivers/usb/serial/anydata.c index 343f6f2..dadf283 100644 --- a/drivers/usb/serial/anydata.c +++ b/drivers/usb/serial/anydata.c @@ -71,7 +71,7 @@ static int anydata_open(struct usb_seria port->bulk_in_endpointAddress), port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length, - usb_serial_generic_write_bulk_callback, port); + usb_serial_generic_read_bulk_callback, port); result = usb_submit_urb(port->read_urb, GFP_KERNEL); if (result) dev_err(&port->dev, diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 945b8bb..99872e1 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c @@ -285,6 +285,7 @@ void usb_serial_generic_read_bulk_callba if (result) dev_err(&port->dev, "%s - failed resubmitting read urb, error %d\n", __FUNCTION__, result); } +EXPORT_SYMBOL_GPL(usb_serial_generic_read_bulk_callback); void usb_serial_generic_write_bulk_callback (struct urb *urb, struct pt_regs *regs) { -- 1.4.0 -- Luiz Fernando N. Capitulino ------------------------------------------------------------------------- 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