Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1670407
| From | Vivek Gautam <vivek.gautam@codeaurora.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] phy: brcm-sata: fix a timeout test in init |
| Date | 2017-06-20 10:30 +0200 |
| Message-ID | <tUmHT-6aA-1@gated-at.bofh.it> (permalink) |
| References | <tU2zv-1xF-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 06/19/2017 04:26 PM, Dan Carpenter wrote:
> We want to timeout with try set to zero so this should be a pre-op
> instead of post-op.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/phy/broadcom/phy-brcm-sata.c b/drivers/phy/broadcom/phy-brcm-sata.c
> index ccbc3d994998..48fb016ce689 100644
> --- a/drivers/phy/broadcom/phy-brcm-sata.c
> +++ b/drivers/phy/broadcom/phy-brcm-sata.c
> @@ -329,7 +329,7 @@ static int brcm_nsp_sata_init(struct brcm_sata_port *port)
>
> /* Wait for pll_seq_done bit */
> try = 50;
> - while (try--) {
> + while (--try) {
Do we want to try reading the status 50 times? If yes, won't your change
break that? It will rather run the loop 49 times.
Thanks
Vivek
> val = brcm_sata_phy_rd(base, BLOCK0_REG_BANK,
> BLOCK0_XGXSSTATUS);
> if (val & BLOCK0_XGXSSTATUS_PLL_LOCK)
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] phy: brcm-sata: fix a timeout test in init Dan Carpenter <dan.carpenter@oracle.com> - 2017-06-19 13:00 +0200
Re: [PATCH] phy: brcm-sata: fix a timeout test in init Vivek Gautam <vivek.gautam@codeaurora.org> - 2017-06-20 10:30 +0200
Re: [PATCH] phy: brcm-sata: fix a timeout test in init Dan Carpenter <dan.carpenter@oracle.com> - 2017-06-20 10:50 +0200
Re: [PATCH] phy: brcm-sata: fix a timeout test in init Vivek Gautam <vivek.gautam@codeaurora.org> - 2017-06-20 11:00 +0200
csiph-web