netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Update ucc_geth.c for new workqueue structure
  2006-12-13 23:08 ` [PATCH] Fix phy_read/write redefinition errors in ucc_geth_phy.c timur
@ 2006-12-13 23:08   ` timur
  2006-12-18 16:23     ` Kumar Gala
  0 siblings, 1 reply; 5+ messages in thread
From: timur @ 2006-12-13 23:08 UTC (permalink / raw)
  To: netdev; +Cc: Timur Tabi

From: Timur Tabi <timur@freescale.com>

The workqueue interface changed with David Howell's patch on 11/22/2006
(SHA 65f27f38446e1976cc98fd3004b110fedcddd189).  Several drivers were
updated with that patch to handle the new interface, but ucc_geth.c
was not one of them.  This patch updates ucc_geth.c to support the new
model.

A compiler warning in set_mac_addr() was also fixed.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>

---
 drivers/net/ucc_geth.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 1f05511..d33bb0c 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -29,6 +29,7 @@
 #include <linux/fsl_devices.h>
 #include <linux/ethtool.h>
 #include <linux/mii.h>
+#include <linux/workqueue.h>
 
 #include <asm/of_platform.h>
 #include <asm/uaccess.h>
@@ -472,7 +473,7 @@ static void put_enet_addr_container(stru
 	kfree(enet_addr_cont);
 }
 
-static int set_mac_addr(__be16 __iomem *reg, u8 *mac)
+static void set_mac_addr(__be16 __iomem *reg, u8 *mac)
 {
 	out_be16(&reg[0], ((u16)mac[5] << 8) | mac[4]);
 	out_be16(&reg[1], ((u16)mac[3] << 8) | mac[2]);
@@ -3918,10 +3919,11 @@ static irqreturn_t phy_interrupt(int irq
 }
 
 /* Scheduled by the phy_interrupt/timer to handle PHY changes */
-static void ugeth_phy_change(void *data)
+static void ugeth_phy_change(struct work_struct *work)
 {
-	struct net_device *dev = (struct net_device *)data;
-	struct ucc_geth_private *ugeth = netdev_priv(dev);
+	struct ucc_geth_private *ugeth =
+		container_of(work, struct ucc_geth_private, tq);
+	struct net_device *dev = ugeth->dev;
 	struct ucc_geth *ug_regs;
 	int result = 0;
 
@@ -4078,7 +4080,7 @@ static int ucc_geth_open(struct net_devi
 #endif				/* CONFIG_UGETH_NAPI */
 
 	/* Set up the PHY change work queue */
-	INIT_WORK(&ugeth->tq, ugeth_phy_change, dev);
+	INIT_WORK(&ugeth->tq, ugeth_phy_change);
 
 	init_timer(&ugeth->phy_info_timer);
 	ugeth->phy_info_timer.function = &ugeth_phy_startup_timer;
-- 
1.4.4


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

* Re: [PATCH] Update ucc_geth.c for new workqueue structure
  2006-12-13 23:08   ` [PATCH] Update ucc_geth.c for new workqueue structure timur
@ 2006-12-18 16:23     ` Kumar Gala
  2007-01-05 14:58       ` Kumar Gala
  0 siblings, 1 reply; 5+ messages in thread
From: Kumar Gala @ 2006-12-18 16:23 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Netdev, Timur Tabi

Jeff,

Can you pickup this patch for 2.6.20 as it fixes a compile issue due  
to the workqueue changes.

- kumar

On Dec 13, 2006, at 5:08 PM, timur@freescale.com wrote:

> From: Timur Tabi <timur@freescale.com>
>
> The workqueue interface changed with David Howell's patch on  
> 11/22/2006
> (SHA 65f27f38446e1976cc98fd3004b110fedcddd189).  Several drivers were
> updated with that patch to handle the new interface, but ucc_geth.c
> was not one of them.  This patch updates ucc_geth.c to support the new
> model.
>
> A compiler warning in set_mac_addr() was also fixed.
>
> Signed-off-by: Timur Tabi <timur@freescale.com>
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>
> ---
>  drivers/net/ucc_geth.c |   12 +++++++-----
>  1 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
> index 1f05511..d33bb0c 100644
> --- a/drivers/net/ucc_geth.c
> +++ b/drivers/net/ucc_geth.c
> @@ -29,6 +29,7 @@
>  #include <linux/fsl_devices.h>
>  #include <linux/ethtool.h>
>  #include <linux/mii.h>
> +#include <linux/workqueue.h>
>
>  #include <asm/of_platform.h>
>  #include <asm/uaccess.h>
> @@ -472,7 +473,7 @@ static void put_enet_addr_container(stru
>  	kfree(enet_addr_cont);
>  }
>
> -static int set_mac_addr(__be16 __iomem *reg, u8 *mac)
> +static void set_mac_addr(__be16 __iomem *reg, u8 *mac)
>  {
>  	out_be16(&reg[0], ((u16)mac[5] << 8) | mac[4]);
>  	out_be16(&reg[1], ((u16)mac[3] << 8) | mac[2]);
> @@ -3918,10 +3919,11 @@ static irqreturn_t phy_interrupt(int irq
>  }
>
>  /* Scheduled by the phy_interrupt/timer to handle PHY changes */
> -static void ugeth_phy_change(void *data)
> +static void ugeth_phy_change(struct work_struct *work)
>  {
> -	struct net_device *dev = (struct net_device *)data;
> -	struct ucc_geth_private *ugeth = netdev_priv(dev);
> +	struct ucc_geth_private *ugeth =
> +		container_of(work, struct ucc_geth_private, tq);
> +	struct net_device *dev = ugeth->dev;
>  	struct ucc_geth *ug_regs;
>  	int result = 0;
>
> @@ -4078,7 +4080,7 @@ static int ucc_geth_open(struct net_devi
>  #endif				/* CONFIG_UGETH_NAPI */
>
>  	/* Set up the PHY change work queue */
> -	INIT_WORK(&ugeth->tq, ugeth_phy_change, dev);
> +	INIT_WORK(&ugeth->tq, ugeth_phy_change);
>
>  	init_timer(&ugeth->phy_info_timer);
>  	ugeth->phy_info_timer.function = &ugeth_phy_startup_timer;
> -- 
> 1.4.4
>
> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

* Re: [PATCH] Update ucc_geth.c for new workqueue structure
  2006-12-18 16:23     ` Kumar Gala
@ 2007-01-05 14:58       ` Kumar Gala
  0 siblings, 0 replies; 5+ messages in thread
From: Kumar Gala @ 2007-01-05 14:58 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Netdev, Timur Tabi

Jeff,

Friendly reminder that this should go in for 2.6.20

- k

On Dec 18, 2006, at 10:23 AM, Kumar Gala wrote:

> Jeff,
>
> Can you pickup this patch for 2.6.20 as it fixes a compile issue  
> due to the workqueue changes.
>
> - kumar
>
> On Dec 13, 2006, at 5:08 PM, timur@freescale.com wrote:
>
>> From: Timur Tabi <timur@freescale.com>
>>
>> The workqueue interface changed with David Howell's patch on  
>> 11/22/2006
>> (SHA 65f27f38446e1976cc98fd3004b110fedcddd189).  Several drivers were
>> updated with that patch to handle the new interface, but ucc_geth.c
>> was not one of them.  This patch updates ucc_geth.c to support the  
>> new
>> model.
>>
>> A compiler warning in set_mac_addr() was also fixed.
>>
>> Signed-off-by: Timur Tabi <timur@freescale.com>
>> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>>
>> ---
>>  drivers/net/ucc_geth.c |   12 +++++++-----
>>  1 files changed, 7 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
>> index 1f05511..d33bb0c 100644
>> --- a/drivers/net/ucc_geth.c
>> +++ b/drivers/net/ucc_geth.c
>> @@ -29,6 +29,7 @@
>>  #include <linux/fsl_devices.h>
>>  #include <linux/ethtool.h>
>>  #include <linux/mii.h>
>> +#include <linux/workqueue.h>
>>
>>  #include <asm/of_platform.h>
>>  #include <asm/uaccess.h>
>> @@ -472,7 +473,7 @@ static void put_enet_addr_container(stru
>>  	kfree(enet_addr_cont);
>>  }
>>
>> -static int set_mac_addr(__be16 __iomem *reg, u8 *mac)
>> +static void set_mac_addr(__be16 __iomem *reg, u8 *mac)
>>  {
>>  	out_be16(&reg[0], ((u16)mac[5] << 8) | mac[4]);
>>  	out_be16(&reg[1], ((u16)mac[3] << 8) | mac[2]);
>> @@ -3918,10 +3919,11 @@ static irqreturn_t phy_interrupt(int irq
>>  }
>>
>>  /* Scheduled by the phy_interrupt/timer to handle PHY changes */
>> -static void ugeth_phy_change(void *data)
>> +static void ugeth_phy_change(struct work_struct *work)
>>  {
>> -	struct net_device *dev = (struct net_device *)data;
>> -	struct ucc_geth_private *ugeth = netdev_priv(dev);
>> +	struct ucc_geth_private *ugeth =
>> +		container_of(work, struct ucc_geth_private, tq);
>> +	struct net_device *dev = ugeth->dev;
>>  	struct ucc_geth *ug_regs;
>>  	int result = 0;
>>
>> @@ -4078,7 +4080,7 @@ static int ucc_geth_open(struct net_devi
>>  #endif				/* CONFIG_UGETH_NAPI */
>>
>>  	/* Set up the PHY change work queue */
>> -	INIT_WORK(&ugeth->tq, ugeth_phy_change, dev);
>> +	INIT_WORK(&ugeth->tq, ugeth_phy_change);
>>
>>  	init_timer(&ugeth->phy_info_timer);
>>  	ugeth->phy_info_timer.function = &ugeth_phy_startup_timer;
>> -- 
>> 1.4.4
>>
>> -
>> To unsubscribe from this list: send the line "unsubscribe netdev" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

* [PATCH] Update ucc_geth.c for new workqueue structure
@ 2007-01-09 18:31 timur
  2007-01-18 17:04 ` Jeff Garzik
  0 siblings, 1 reply; 5+ messages in thread
From: timur @ 2007-01-09 18:31 UTC (permalink / raw)
  To: netdev; +Cc: Timur Tabi

From: Timur Tabi <timur@freescale.com>

The workqueue interface changed with David Howell's patch on 11/22/2006
(SHA 65f27f38446e1976cc98fd3004b110fedcddd189).  Several drivers were
updated with that patch to handle the new interface, but ucc_geth.c
was not one of them.  This patch updates ucc_geth.c to support the new
model.

A compiler warning in set_mac_addr() was also fixed.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>

---
 drivers/net/ucc_geth.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 1f05511..d33bb0c 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -29,6 +29,7 @@
 #include <linux/fsl_devices.h>
 #include <linux/ethtool.h>
 #include <linux/mii.h>
+#include <linux/workqueue.h>
 
 #include <asm/of_platform.h>
 #include <asm/uaccess.h>
@@ -472,7 +473,7 @@ static void put_enet_addr_container(stru
 	kfree(enet_addr_cont);
 }
 
-static int set_mac_addr(__be16 __iomem *reg, u8 *mac)
+static void set_mac_addr(__be16 __iomem *reg, u8 *mac)
 {
 	out_be16(&reg[0], ((u16)mac[5] << 8) | mac[4]);
 	out_be16(&reg[1], ((u16)mac[3] << 8) | mac[2]);
@@ -3918,10 +3919,11 @@ static irqreturn_t phy_interrupt(int irq
 }
 
 /* Scheduled by the phy_interrupt/timer to handle PHY changes */
-static void ugeth_phy_change(void *data)
+static void ugeth_phy_change(struct work_struct *work)
 {
-	struct net_device *dev = (struct net_device *)data;
-	struct ucc_geth_private *ugeth = netdev_priv(dev);
+	struct ucc_geth_private *ugeth =
+		container_of(work, struct ucc_geth_private, tq);
+	struct net_device *dev = ugeth->dev;
 	struct ucc_geth *ug_regs;
 	int result = 0;
 
@@ -4078,7 +4080,7 @@ static int ucc_geth_open(struct net_devi
 #endif				/* CONFIG_UGETH_NAPI */
 
 	/* Set up the PHY change work queue */
-	INIT_WORK(&ugeth->tq, ugeth_phy_change, dev);
+	INIT_WORK(&ugeth->tq, ugeth_phy_change);
 
 	init_timer(&ugeth->phy_info_timer);
 	ugeth->phy_info_timer.function = &ugeth_phy_startup_timer;
-- 
1.4.4


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

* Re: [PATCH] Update ucc_geth.c for new workqueue structure
  2007-01-09 18:31 [PATCH] Update ucc_geth.c for new workqueue structure timur
@ 2007-01-18 17:04 ` Jeff Garzik
  0 siblings, 0 replies; 5+ messages in thread
From: Jeff Garzik @ 2007-01-18 17:04 UTC (permalink / raw)
  To: timur; +Cc: netdev

timur@freescale.com wrote:
> From: Timur Tabi <timur@freescale.com>
> 
> The workqueue interface changed with David Howell's patch on 11/22/2006
> (SHA 65f27f38446e1976cc98fd3004b110fedcddd189).  Several drivers were
> updated with that patch to handle the new interface, but ucc_geth.c
> was not one of them.  This patch updates ucc_geth.c to support the new
> model.
> 
> A compiler warning in set_mac_addr() was also fixed.
> 
> Signed-off-by: Timur Tabi <timur@freescale.com>
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> 
> ---
>  drivers/net/ucc_geth.c |   12 +++++++-----
>  1 files changed, 7 insertions(+), 5 deletions(-)

applied



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

end of thread, other threads:[~2007-01-18 17:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-09 18:31 [PATCH] Update ucc_geth.c for new workqueue structure timur
2007-01-18 17:04 ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2006-12-13 23:08 ucc_geth patches timur
2006-12-13 23:08 ` [PATCH] Fix phy_read/write redefinition errors in ucc_geth_phy.c timur
2006-12-13 23:08   ` [PATCH] Update ucc_geth.c for new workqueue structure timur
2006-12-18 16:23     ` Kumar Gala
2007-01-05 14:58       ` Kumar Gala

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