Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1221237 > unrolled thread
| Started by | David Miller <davem@davemloft.net> |
|---|---|
| First post | 2015-09-09 07:50 +0200 |
| Last post | 2015-09-09 07:50 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] net: stmmac: Use msleep rather then udelay for reset delay David Miller <davem@davemloft.net> - 2015-09-09 07:50 +0200
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2015-09-09 07:50 +0200 |
| Subject | Re: [PATCH] net: stmmac: Use msleep rather then udelay for reset delay |
| Message-ID | <q6GqB-2fO-1@gated-at.bofh.it> |
From: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Date: Sun, 6 Sep 2015 17:50:59 +0200
> @@ -161,11 +161,16 @@ int stmmac_mdio_reset(struct mii_bus *bus)
>
> if (!gpio_request(reset_gpio, "mdio-reset")) {
> gpio_direction_output(reset_gpio, active_low ? 1 : 0);
> - udelay(data->delays[0]);
> + if (data->delays[0])
> + msleep((data->delays[0] + 999) / 1000);
Please use something like DIV_ROUND_UP(..., USEC_PER_MSEC) or similar.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web