From: tobias@gambas-buch.de (Tobias Boege)
To: kernelnewbies@lists.kernelnewbies.org
Subject: [PATCH] usb: Fix switch statement in ohci-tmio.c
Date: Thu, 14 Aug 2014 21:04:16 +0200 [thread overview]
Message-ID: <20140814190416.GE833@aurora> (raw)
In-Reply-To: <1408039556-23622-1-git-send-email-xerofoify@gmail.com>
On Thu, 14 Aug 2014, Nicholas Krause wrote:
> I am fixing the bug on at the link, https://bugzilla.kernel.org/show_bug.cgi?id=79931.
> This bug report states that in the function, tmio_hc_stop the switch has no needed breaks.
> Further more this patch fixes this bug by adding the needed breaks.
>
> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
> ---
> drivers/usb/host/ohci-tmio.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/usb/host/ohci-tmio.c b/drivers/usb/host/ohci-tmio.c
> index bb40958..d2b5382 100644
> --- a/drivers/usb/host/ohci-tmio.c
> +++ b/drivers/usb/host/ohci-tmio.c
> @@ -100,12 +100,16 @@ static void tmio_stop_hc(struct platform_device *dev)
> switch (ohci->num_ports) {
> default:
> dev_err(&dev->dev, "Unsupported amount of ports: %d\n", ohci->num_ports);
> + break;
> case 3:
> pm |= CCR_PM_USBPW3;
> + break;
> case 2:
> pm |= CCR_PM_USBPW2;
> + break;
> case 1:
> pm |= CCR_PM_USBPW1;
> + break;
> }
> tmio_iowrite8(0, tmio->ccr + CCR_INTC);
> tmio_iowrite8(0, tmio->ccr + CCR_ILME);
> --
> 1.9.1
>
Hmm, I don't know, man. The problem might as well (or even more likely) be
the defines:
#define CCR_PM_USBPW1 0x0004
#define CCR_PM_USBPW2 0x0008
#define CCR_PM_USBPW3 0x0008
which perfectly explain the warning and CCR_PM_USBPW3 needing to be 0x0010
would make more sense if you look at the "switch" head. Alas, I have no idea
about the stuff going on there, so this remains speculation.
However, maybe you can prove me wrong? If not, keep in mind that a bug
reporter doesn't necessarily provide a correct guide to fixing the bug.
[ Also, please consider just how *many* people gave you the (still surpris-
ingly friendly formulated) advice to be silent for a while. Don't make me
look up the procmailrc syntax again... ]
Regards,
Tobi
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
prev parent reply other threads:[~2014-08-14 19:04 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-14 18:05 [PATCH] usb: Fix switch statement in ohci-tmio.c Nicholas Krause
2014-08-14 18:06 ` Nick Krause
2014-08-14 18:13 ` Kristofer Hallin
2014-08-14 18:18 ` Nick Krause
2014-08-14 18:36 ` Lucas Tanure
2014-08-14 20:51 ` Valdis.Kletnieks at vt.edu
2014-08-14 21:00 ` Nick Krause
2014-08-14 21:03 ` Mandeep Sandhu
2014-08-14 21:13 ` Nick Krause
2014-08-14 21:38 ` Valdis.Kletnieks at vt.edu
2014-08-14 22:12 ` Nick Krause
2014-08-14 23:46 ` Nick Krause
2014-08-15 2:16 ` Greg Freemyer
2014-08-15 2:29 ` Nick Krause
2014-08-15 2:42 ` Nick Krause
2014-08-15 3:37 ` Nick Krause
2014-08-15 3:42 ` Jaret Flores
2014-08-15 3:43 ` Nick Krause
2014-08-15 4:21 ` Nick Krause
2014-08-14 19:04 ` Tobias Boege [this message]
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=20140814190416.GE833@aurora \
--to=tobias@gambas-buch.de \
--cc=kernelnewbies@lists.kernelnewbies.org \
/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).