PowerPC: ibm_newemac minor fixes.
Subsystems (2)
cover PowerPC: ibm_newemac minor fixes.
These patches have some minor ibm_newemac fixes.
Thanks,
Valentine.
PATCH 1/3 PowerPC: ibm_newemac correct opb_bus_freq value
The EMAC4_MR1_OBCI(freq) macro expects freg in MHz, while opb_bus_freq is kept in Hz. Correct this.
--- drivers/net/ibm_newemac/core.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
drivers/net/ibm_newemac/core.c +1 -1
@@ -402,7 +402,7 @@ static u32 __emac_calc_base_mr1(struct estatic u32 __emac4_calc_base_mr1 (struct emac_instance *dev,int tx_size,int rx_size) {u32 ret =EMAC_MR1_VLE |EMAC_MR1_IST |EMAC4_MR1_TR | -EMAC4_MR1_OBCI (dev->opb_bus_freq); +EMAC4_MR1_OBCI (dev->opb_bus_freq /1000000 );DBG2 (dev,"__emac4_calc_base_mr1" NL );
PATCH 2/3 PowerPC: ibm_newemac tah_ph typo fix
In reply to Valentine BarshakThis patch fixes a typo in ibm_newemac/core.c
(tah_port should be used instead of tah_ph)
--- drivers/net/ibm_newemac/core.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
drivers/net/ibm_newemac/core.c +1 -1
@@ -2427,7 +2427,7 @@ static int __devinit emac_init_config(stif (emac_read_uint_prop (np,"tah-device" , &dev->tah_ph,0 )) dev->tah_ph =0 ;if (emac_read_uint_prop (np,"tah-channel" , &dev->tah_port,0 )) - dev->tah_ph =0 ; + dev->tah_port =0 ;if (emac_read_uint_prop (np,"mdio-device" , &dev->mdio_ph,0 )) dev->mdio_ph =0 ;if (emac_read_uint_prop (np,"zmii-device" , &dev->zmii_ph,0 ))
PATCH 3/3 PowerPC: ibm_newemac call dev_set_drvdata() before tah_reset()
In reply to Valentine BarshakThe patch moves dev_set_drvdata(&ofdev->dev, dev) up before tah_reset(ofdev) is called to avoid a NULL pointer dereference, since tah_reset uses drvdata.
--- drivers/net/ibm_newemac/tah.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-)
drivers/net/ibm_newemac/tah.c +2 -1
@@ -116,13 +116,14 @@ static int __devinit tah_probe(struct of goto err_free; } +dev_set_drvdata (&ofdev->dev, dev); +/* Initialize TAH and enable IPv4 checksum verification, no TSO yet */ tah_reset (ofdev);printk (KERN_INFO "TAH %s initialized\n" , ofdev->node->full_name);wmb (); -dev_set_drvdata (&ofdev->dev, dev);return 0 ;
Quoted 1 line · Valentine Barshak
These patches have some minor
ibm_newemacfixes.
All 3 patches look good, thanks. I'll sign them off and forward them to Jeff in my next batch.
Jeff, did you already pick up my previous drop of EMAC patches from last week for .25 or not ? If not, I will resend the whole lot along with Valentine's patches sometime next week.
Cheers,
Ben.
Quoted 10 lines · Benjamin Herrenschmidt
Quoted 1 line · Valentine Barshak
These patches have some minor
ibm_newemacfixes.All 3 patches look good, thanks. I'll sign them off and forward them to Jeff in my next batch.
Jeff, did you already pick up my previous drop of EMAC patches from last week for .25 or not ? If not, I will resend the whole lot along with Valentine's patches sometime next week.
Just got back from Thanksgiving holiday, and am about to go through the lot that's sitting in my inbox.
Just let me know what you would prefer me to do, starting from today.
Jeff
Quoted 8 lines · Jeff Garzik
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 1 line · Valentine Barshak
These patches have some minor
ibm_newemacfixes.All 3 patches look good, thanks. I'll sign them off and forward them to Jeff in my next batch.
Quoted 8 lines
Quoted 3 lines
Jeff, did you already pick up my previous drop of EMAC patches from last week for .25 or not ? If not, I will resend the whole lot along with Valentine's patches sometime next week.
Just got back from Thanksgiving holiday, and am about to go through the lot that's sitting in my inbox.
Just let me know what you would prefer me to do, starting from today.
Then wait for my next batch and ignore previous patches, except the one titled "ibm_newemac: Fix possible lockup on close" which is a 2.6.24 bug fix.
Thanks !
Cheers,
Ben.