linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	linux-media@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-usb@vger.kernel.org, tglx@linutronix.de,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: USB: note that usb_fill_int_urb() can be used used for ISOC urbs.
Date: Wed, 20 Jun 2018 18:02:00 +0200	[thread overview]
Message-ID: <20180620160200.vxdq4o2azkftpfqs@linutronix.de> (raw)

On 2018-06-20 11:35:05 [-0400], Alan Stern wrote:
> > diff --git a/include/linux/usb.h b/include/linux/usb.h
> > index 4cdd515a4385..c3a8bd586121 100644
> > --- a/include/linux/usb.h
> > +++ b/include/linux/usb.h
> > @@ -1657,7 +1657,8 @@ static inline void usb_fill_bulk_urb(struct urb *urb,
> >   *	the endpoint descriptor's bInterval value.
> >   *
> >   * Initializes a interrupt urb with the proper information needed to submit
> > - * it to a device.
> > + * it to a device. This function can also be used to initialize an isochronous
> > + * urb.
> 
> No, no!  This function can _help_ initialize an isochronous URB, but
> that's all.  It would be better to create an explicit 
> usb_fill_isoc_urb() routine, and even that would have to be incomplete.

Yes, incomplete. I read incomplete as some additional fields have to be
set which are not set yet. But for FS you write…

> There are two problems with using usb_fill_int_urb() to initialize an 
> isochronous URB:
> 
> 	The calculation of the interval value is wrong for full-speed
> 	devices.

Why wrong?

> 	The routine does not set urb->number_of_packets or
> 	urb->iso_frame_desc[].

Yes.

> Alan Stern

Sebastian
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2018-06-20 16:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20 16:02 Sebastian Andrzej Siewior [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-06-20 17:23 USB: note that usb_fill_int_urb() can be used used for ISOC urbs Alan Stern
2018-06-20 16:49 Sebastian Andrzej Siewior
2018-06-20 16:21 Alan Stern
2018-06-20 15:35 Alan Stern
2018-06-20 15:20 Sebastian Andrzej Siewior

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=20180620160200.vxdq4o2azkftpfqs@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).