Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1221237
| Path | csiph.com!goblin2!goblin.stu.neva.ru!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | David Miller <davem@davemloft.net> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] net: stmmac: Use msleep rather then udelay for reset delay |
| Date | Wed, 09 Sep 2015 07:50:01 +0200 |
| Message-ID | <q6GqB-2fO-1@gated-at.bofh.it> (permalink) |
| References | <q5Kwh-3cv-3@gated-at.bofh.it> |
| X-Original-To | sjoerd.simons@collabora.co.uk |
| X-Mailer | Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) |
| MIME-Version | 1.0 |
| Content-Type | Text/Plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| X-Greylist | Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 08 Sep 2015 22:40:58 -0700 (PDT) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 17 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | peppe.cavallaro@st.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org |
| X-Original-Date | Tue, 08 Sep 2015 22:40:57 -0700 (PDT) |
| X-Original-Message-ID | <20150908.224057.2198007286151115292.davem@davemloft.net> |
| X-Original-References | <1441554659-8419-1-git-send-email-sjoerd.simons@collabora.co.uk> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1221237 |
Show key headers only | View raw
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 linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH] net: stmmac: Use msleep rather then udelay for reset delay David Miller <davem@davemloft.net> - 2015-09-09 07:50 +0200
csiph-web