mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jules Maselbas <jmaselbas@kalray.eu>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/5] usb: dwc2: Make dwc2_wait_bit_set wait all bits in mask
Date: Mon, 15 Mar 2021 09:51:47 +0100	[thread overview]
Message-ID: <20210315085147.GN23724@pengutronix.de> (raw)
In-Reply-To: <20210312162432.9189-1-jmaselbas@kalray.eu>

On Fri, Mar 12, 2021 at 05:24:28PM +0100, Jules Maselbas wrote:
> The dwc2_wait_bit_set() wasn't waiting for all bits in the mask to be
> set but was waiting for only one bit set a mask.
> This is not the expected behavior as stated in the function's comment.
> 
> The function dwc2_wait_bit_set() is always called with a mask of only
> one bit.
> 
> Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>
> ---
>  drivers/usb/dwc2/core.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h
> index 780efb262..fa9d6ae95 100644
> --- a/drivers/usb/dwc2/core.h
> +++ b/drivers/usb/dwc2/core.h
> @@ -532,7 +532,7 @@ static inline int dwc2_wait_bit_set(struct dwc2 *dwc2, u32 offset, u32 mask,
>  			    u32 timeout)
>  {
>  	return wait_on_timeout(timeout * USECOND,
> -			dwc2_readl(dwc2, offset) & mask);
> +			(dwc2_readl(dwc2, offset) & mask) == mask);
>  }
>  
>  /**
> -- 
> 2.17.1
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


      parent reply	other threads:[~2021-03-15  8:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12 16:24 Jules Maselbas
2021-03-12 16:24 ` [PATCH 2/5] usb: dwc2: Replace pr_info with dev_warn Jules Maselbas
2021-03-12 16:24 ` [PATCH 3/5] usb: dwc2: Rework dwc2_wait_for_mode to use wait_on_timeout Jules Maselbas
2021-03-12 16:24 ` [PATCH 4/5] usb: dwc2: Move wait_for_mode and iddig_filter_enabled to core Jules Maselbas
2021-03-12 16:24 ` [PATCH 5/5] usb: dwc2: Rework wait for host mode during core reset Jules Maselbas
2021-03-15  8:51 ` Sascha Hauer [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=20210315085147.GN23724@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=jmaselbas@kalray.eu \
    /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