From: Arseniy Lartsev <ars3n@yandex.ru>
To: Oliver Neukum <oliver@neukum.org>
Cc: Alan Stern <stern@rowland.harvard.edu>,
USB list <linux-usb@vger.kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: PROBLEM: USB ACM device does not work
Date: Wed, 1 Jul 2009 15:24:55 +0400 [thread overview]
Message-ID: <200907011525.00689.ars3n@yandex.ru> (raw)
In-Reply-To: <200907011256.47550.oliver@neukum.org>
[-- Attachment #1: Type: text/plain, Size: 2425 bytes --]
On Wednesday 01 July 2009 14:56:46 Oliver Neukum wrote:
> > + ep = (usb_pipein(acm->rx_endpoint) ? acm->dev->ep_in :
> > acm->dev->ep_out) + [usb_pipeendpoint(acm->rx_endpoint)];
> > + if (usb_endpoint_xfer_int(&ep->desc))
> > + usb_fill_int_urb(rcv->urb, acm->dev,
> > + acm->rx_endpoint,
> > + buf->base,
> > + acm->readsize,
> > + acm_read_bulk, rcv, 0xff);
>
> The patch is good except for this.
> We should make sure this interval matches usbcore's value.
> Would you care to redo it with that change?
Am I right that 0xff here should be changed to ep->desc.bInterval (and to
epwrite->bInterval in the other call to usb_fill_int_urb)?
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -387,6 +387,7 @@ static void acm_rx_tasklet(unsigned long
struct acm_ru *rcv;
unsigned long flags;
unsigned char throttled;
+ struct usb_host_endpoint *ep;
dbg("Entering acm_rx_tasklet");
@@ -462,11 +463,20 @@ urbs:
rcv->buffer = buf;
- usb_fill_bulk_urb(rcv->urb, acm->dev,
- acm->rx_endpoint,
- buf->base,
- acm->readsize,
- acm_read_bulk, rcv);
+ ep = (usb_pipein(acm->rx_endpoint) ? acm->dev->ep_in : acm->dev->ep_out)
+ [usb_pipeendpoint(acm->rx_endpoint)];
+ if (usb_endpoint_xfer_int(&ep->desc))
+ usb_fill_int_urb(rcv->urb, acm->dev,
+ acm->rx_endpoint,
+ buf->base,
+ acm->readsize,
+ acm_read_bulk, rcv, ep->desc.bInterval);
+ else
+ usb_fill_bulk_urb(rcv->urb, acm->dev,
+ acm->rx_endpoint,
+ buf->base,
+ acm->readsize,
+ acm_read_bulk, rcv);
rcv->urb->transfer_dma = buf->dma;
rcv->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
@@ -1227,9 +1237,14 @@ made_compressed_probe:
goto alloc_fail7;
}
- usb_fill_bulk_urb(snd->urb, usb_dev,
- usb_sndbulkpipe(usb_dev, epwrite->bEndpointAddress),
- NULL, acm->writesize, acm_write_bulk, snd);
+ if (usb_endpoint_xfer_int(epwrite))
+ usb_fill_int_urb(snd->urb, usb_dev,
+ usb_sndbulkpipe(usb_dev, epwrite->bEndpointAddress),
+ NULL, acm->writesize, acm_write_bulk, snd, epwrite->bInterval);
+ else
+ usb_fill_bulk_urb(snd->urb, usb_dev,
+ usb_sndbulkpipe(usb_dev, epwrite->bEndpointAddress),
+ NULL, acm->writesize, acm_write_bulk, snd);
snd->urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
snd->instance = acm;
}
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 315 bytes --]
next prev parent reply other threads:[~2009-07-01 11:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-28 18:29 Arseniy Lartsev
2009-06-28 20:20 ` Oliver Neukum
2009-06-28 20:37 ` Arseniy Lartsev
2009-06-28 20:58 ` Oliver Neukum
2009-06-29 11:43 ` Arseniy Lartsev
2009-06-29 13:07 ` Oliver Neukum
2009-06-29 13:35 ` Arseniy Lartsev
2009-06-30 7:22 ` Oliver Neukum
2009-06-30 20:09 ` Arseniy Lartsev
2009-06-30 21:01 ` Alan Stern
2009-07-01 9:01 ` Arseniy Lartsev
2009-07-01 10:56 ` Oliver Neukum
2009-07-01 11:24 ` Arseniy Lartsev [this message]
2009-07-01 11:37 ` Oliver Neukum
2009-07-01 12:27 ` [PATCH] cdc-acm: work around some broken devices Arseniy Lartsev
2009-07-01 13:56 ` Greg KH
2009-07-01 14:03 ` Oliver Neukum
2009-07-01 14:34 ` Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200907011525.00689.ars3n@yandex.ru \
--to=ars3n@yandex.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oliver@neukum.org \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®