netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ftmac100: fix scheduling while atomic during PHY link status change
@ 2011-04-26 16:32 Adam Jaremko
  2011-04-28  9:11 ` Po-Yu Chuang
  2011-04-29 19:31 ` [PATCH] " David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Adam Jaremko @ 2011-04-26 16:32 UTC (permalink / raw)
  To: Ratbert Po-Yu Chuang(莊博宇); +Cc: ratbert.chuang, netdev

Signed-off-by: Adam Jaremko <adam.jaremko@gmail.com>
---
 drivers/net/ftmac100.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c
index a316619..9bd7746 100644
--- a/drivers/net/ftmac100.c
+++ b/drivers/net/ftmac100.c
@@ -139,11 +139,11 @@ static int ftmac100_reset(struct ftmac100 *priv)
 			 * that hardware reset completed (what the f*ck).
 			 * We still need to wait for a while.
 			 */
-			usleep_range(500, 1000);
+			udelay(500);
 			return 0;
 		}

-		usleep_range(1000, 10000);
+		udelay(1000);
 	}

 	netdev_err(netdev, "software reset failed\n");
@@ -772,7 +772,7 @@ static int ftmac100_mdio_read(struct net_device
*netdev, int phy_id, int reg)
 		if ((phycr & FTMAC100_PHYCR_MIIRD) == 0)
 			return phycr & FTMAC100_PHYCR_MIIRDATA;

-		usleep_range(100, 1000);
+		udelay(100);
 	}

 	netdev_err(netdev, "mdio read timed out\n");
@@ -801,7 +801,7 @@ static void ftmac100_mdio_write(struct net_device
*netdev, int phy_id, int reg,
 		if ((phycr & FTMAC100_PHYCR_MIIWR) == 0)
 			return;

-		usleep_range(100, 1000);
+		udelay(100);
 	}

 	netdev_err(netdev, "mdio write timed out\n");
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] net: ftmac100: fix scheduling while atomic during PHY link status change
  2011-04-26 16:32 [PATCH] net: ftmac100: fix scheduling while atomic during PHY link status change Adam Jaremko
@ 2011-04-28  9:11 ` Po-Yu Chuang
  2011-04-28 17:41   ` [PATCH v2] " Adam Jaremko
  2011-04-29 19:31 ` [PATCH] " David Miller
  1 sibling, 1 reply; 5+ messages in thread
From: Po-Yu Chuang @ 2011-04-28  9:11 UTC (permalink / raw)
  To: Adam Jaremko
  Cc: Ratbert Po-Yu Chuang(莊博宇), netdev,
	David Miller, Eric Dumazet

Hi Adam,

2011/4/27 Adam Jaremko <adam.jaremko@gmail.com>:
> Signed-off-by: Adam Jaremko <adam.jaremko@gmail.com>
> ---
>  drivers/net/ftmac100.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c
> index a316619..9bd7746 100644
> --- a/drivers/net/ftmac100.c
> +++ b/drivers/net/ftmac100.c
> @@ -139,11 +139,11 @@ static int ftmac100_reset(struct ftmac100 *priv)
>                         * that hardware reset completed (what the f*ck).
>                         * We still need to wait for a while.
>                         */
> -                       usleep_range(500, 1000);
> +                       udelay(500);
>                        return 0;
>                }
>
> -               usleep_range(1000, 10000);
> +               udelay(1000);
>        }
>
>        netdev_err(netdev, "software reset failed\n");
> @@ -772,7 +772,7 @@ static int ftmac100_mdio_read(struct net_device
> *netdev, int phy_id, int reg)
>                if ((phycr & FTMAC100_PHYCR_MIIRD) == 0)
>                        return phycr & FTMAC100_PHYCR_MIIRDATA;
>
> -               usleep_range(100, 1000);
> +               udelay(100);
>        }
>
>        netdev_err(netdev, "mdio read timed out\n");
> @@ -801,7 +801,7 @@ static void ftmac100_mdio_write(struct net_device
> *netdev, int phy_id, int reg,
>                if ((phycr & FTMAC100_PHYCR_MIIWR) == 0)
>                        return;
>
> -               usleep_range(100, 1000);
> +               udelay(100);
>        }
>
>        netdev_err(netdev, "mdio write timed out\n");
> --
> 1.7.4.4
>

Not sure if your patch is indeed corrupt or it's my fault
while downloading patch from gmail:

ERROR: patch seems to be corrupt (line wrapped?)
#62: FILE: drivers/net/ftmac100.c:771:
*netdev, int phy_id, int reg)

total: 1 errors, 0 warnings, 31 lines checked

ftmac100-fix.patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.


Except that,

Acked-by: Po-Yu Chuang <ratbert@faraday-tech.com>

best regards,
Po-Yu Chuang

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] net: ftmac100: fix scheduling while atomic during PHY link status change
  2011-04-28  9:11 ` Po-Yu Chuang
@ 2011-04-28 17:41   ` Adam Jaremko
  2011-04-29 19:42     ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Adam Jaremko @ 2011-04-28 17:41 UTC (permalink / raw)
  To: Po-Yu Chuang
  Cc: Ratbert Po-Yu Chuang(莊博宇), netdev,
	David Miller, Eric Dumazet

I think I've sorted my mail client preferences and all should be well now.

Signed-off-by: Adam Jaremko <adam.jaremko@gmail.com>
Acked-by: Po-Yu Chuang <ratbert@faraday-tech.com>
---
 drivers/net/ftmac100.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c
index a316619..9bd7746 100644
--- a/drivers/net/ftmac100.c
+++ b/drivers/net/ftmac100.c
@@ -139,11 +139,11 @@ static int ftmac100_reset(struct ftmac100 *priv)
 			 * that hardware reset completed (what the f*ck).
 			 * We still need to wait for a while.
 			 */
-			usleep_range(500, 1000);
+			udelay(500);
 			return 0;
 		}
 
-		usleep_range(1000, 10000);
+		udelay(1000);
 	}
 
 	netdev_err(netdev, "software reset failed\n");
@@ -772,7 +772,7 @@ static int ftmac100_mdio_read(struct net_device *netdev, int phy_id, int reg)
 		if ((phycr & FTMAC100_PHYCR_MIIRD) == 0)
 			return phycr & FTMAC100_PHYCR_MIIRDATA;
 
-		usleep_range(100, 1000);
+		udelay(100);
 	}
 
 	netdev_err(netdev, "mdio read timed out\n");
@@ -801,7 +801,7 @@ static void ftmac100_mdio_write(struct net_device *netdev, int phy_id, int reg,
 		if ((phycr & FTMAC100_PHYCR_MIIWR) == 0)
 			return;
 
-		usleep_range(100, 1000);
+		udelay(100);
 	}
 
 	netdev_err(netdev, "mdio write timed out\n");
-- 
1.7.4.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] net: ftmac100: fix scheduling while atomic during PHY link status change
  2011-04-26 16:32 [PATCH] net: ftmac100: fix scheduling while atomic during PHY link status change Adam Jaremko
  2011-04-28  9:11 ` Po-Yu Chuang
@ 2011-04-29 19:31 ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2011-04-29 19:31 UTC (permalink / raw)
  To: adam.jaremko; +Cc: ratbert, ratbert.chuang, netdev

From: Adam Jaremko <adam.jaremko@gmail.com>
Date: Tue, 26 Apr 2011 12:32:56 -0400

> @@ -801,7 +801,7 @@ static void ftmac100_mdio_write(struct net_device
> *netdev, int phy_id, int reg,

Your email client corrupted the patch, adding line breaks etc.

Please fix this problem, send a test email to yourself, try to apply
the patch you receive in that test email, and then when that is
working (and only then) resubmit this patch here so I can apply it.

Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] net: ftmac100: fix scheduling while atomic during PHY link status change
  2011-04-28 17:41   ` [PATCH v2] " Adam Jaremko
@ 2011-04-29 19:42     ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2011-04-29 19:42 UTC (permalink / raw)
  To: adam.jaremko; +Cc: ratbert.chuang, ratbert, netdev, eric.dumazet

From: Adam Jaremko <adam.jaremko@gmail.com>
Date: Thu, 28 Apr 2011 13:41:18 -0400

> I think I've sorted my mail client preferences and all should be well now.
> 
> Signed-off-by: Adam Jaremko <adam.jaremko@gmail.com>
> Acked-by: Po-Yu Chuang <ratbert@faraday-tech.com>

This is better, yes, applied.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-04-29 19:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-26 16:32 [PATCH] net: ftmac100: fix scheduling while atomic during PHY link status change Adam Jaremko
2011-04-28  9:11 ` Po-Yu Chuang
2011-04-28 17:41   ` [PATCH v2] " Adam Jaremko
2011-04-29 19:42     ` David Miller
2011-04-29 19:31 ` [PATCH] " David Miller

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).