From: Sujith <m.sujith@gmail.com>
To: "Martin Schleier" <drahemmaps@gmx.net>
Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>,
linux-wireless@vger.kernel.org, dsd@gentoo.org,
linville@tuxdriver.com, kune@deine-taler.de,
linux-usb@vger.kernel.org, stern@rowland.harvard.edu,
gregkh@suse.de
Subject: Override endpoint attributes (was: RE: [PATCH] zd1211rw: change endpoint types of EP_REGS_OUT and EP_INT_IN from interrupt to bulk)
Date: Sun, 6 Feb 2011 17:37:10 +0530 [thread overview]
Message-ID: <19790.36590.884287.572619@gargle.gargle.HOWL> (raw)
In-Reply-To: <20110206102710.152130@gmx.net>
Martin Schleier wrote:
> Interesting, I know that interrupt and bulk endpoints share a lot of
> common logic so I can see how this should work. But is it really
> possible [and more to the point: sane?!] to override the endpoint
> descriptors?
>
> I know that usb_submit_urb checks [when config_usb_debug is enabled]
> if the xfertype of the submitted urb matches the one of the endpoint,
> so I wonder I started to wonder if we are fooling "just" the code
> here, or ourselves in the process?
>
> > ath9k_htc does the same thing (see ath/ath9k/hif_usb.c).
> > It does seem to be working properly but I am wondering if the
> > USB subsystem has to be updated after the driver messes around with bmAttributes.
> > (lsusb would still show the endpoint type as INT).
> >
> > You have a usb_reset_configuration() call before changing
> > the endpoint type, why is that necessary ? And would that
> > reset the endpoints as well ?
> Huh, has this already catched on?
Well, for ath9k_htc, the FW changes the descriptor type after it is
transferred to the target. The USB devs suggested that usb_device_reset()
should be called by the driver in such cases, but in ath9k_htc's case,
the device is disconnected and the error message "device firmware changed"
is displayed.
Agreed, this is a dirty hack - but is there any way for a driver to make the USB
subsystem re-configure the endpoints ?
Sujith
next prev parent reply other threads:[~2011-02-06 12:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-06 10:27 Override endpoint attributes (was: RE: [PATCH] zd1211rw: change endpoint types of EP_REGS_OUT and EP_INT_IN from interrupt to bulk) Martin Schleier
2011-02-06 11:33 ` Jussi Kivilinna
2011-02-06 12:07 ` Sujith [this message]
2011-02-06 15:46 ` Alan Stern
2011-02-06 16:15 ` Sujith
2011-02-06 20:04 ` Alan Stern
2011-02-08 12:03 ` Jussi Kivilinna
2011-02-08 15:21 ` Alan Stern
2011-02-08 19:08 ` Jussi Kivilinna
2011-02-09 2:28 ` Sujith
2011-02-09 15:19 ` Alan Stern
2011-02-09 16:30 ` Sujith
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=19790.36590.884287.572619@gargle.gargle.HOWL \
--to=m.sujith@gmail.com \
--cc=drahemmaps@gmx.net \
--cc=dsd@gentoo.org \
--cc=gregkh@suse.de \
--cc=jussi.kivilinna@mbnet.fi \
--cc=kune@deine-taler.de \
--cc=linux-usb@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--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