patch for ibm 405ep emac driver in linux-2.4.22 and 2.4.23

Davey daveywu at transengines.com
Tue Dec 23 18:10:21 EST 2003


stefan, Matt,

Some time ago Stefan and I had reported that both ethernet interfaces cannot work well together. Sorry I have lost all old mails when I reinstall my computer.
We have find that this problem is caused by that the base address of eht1 is wrong set. Follow by my patch for linux-2.4.22 and linux-2.4.23. I have test the patch and it work well.

Davey Wu
2003-12-23

-----------------------------------------------------------------------------------------------------------------
diff -Nur /home/davey/linuxppc/drivers/net/ibm_emac/ibm_ocp_enet.c ibm_emac/ibm_ocp_enet.c
--- /home/davey/linuxppc/drivers/net/ibm_emac/ibm_ocp_enet.c 2003-11-24 16:07:49.000000000 +0800
+++ ibm_emac/ibm_ocp_enet.c 2003-12-21 15:59:26.000000000 +0800
@@ -1151,7 +1151,7 @@
  rc = request_irq(dev->irq, emac_mac_irq, 0, "OCP EMAC MAC", dev);
  if (rc != 0)
   goto bail;
- rc = request_irq(fep->wol_irq, emac_wakeup_irq, 0, "OCP EMAC Wakeup", dev);
+ rc = request_irq(fep->wol_irq, emac_wakeup_irq, SA_SHIRQ, "OCP EMAC Wakeup", dev);
  if (rc != 0) {
   free_irq(dev->irq, dev);
   goto bail;
@@ -1237,6 +1237,9 @@
  struct net_device *mdio_ndev = NULL;
  int commac_reg = 0;
  u32 phy_map;
+ // add by larry porter
+ static int emac_index = 0;
+ //////////////////////////////////
  
  emacdata = (struct ocp_func_emac_data *)ocpdev->def->additions;
  if (emacdata == NULL) {
@@ -1292,6 +1295,14 @@
  if (rc != 0)
   goto bail;
  commac_reg = 1;
+ 
+ //add by larry porter
+ emac_index += 1;
+ if(emac_index == 2)
+ {
+  ocpdev->def->paddr = 0xef600900;
+ }
+ //////////////////////////////////////
 
  /* Map our MMIOs */
  ep->emacp = (volatile emac_t *)ioremap(ocpdev->def->paddr, sizeof (emac_t));
------------------------------------------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ibm_emac.patch
Type: application/octet-stream
Size: 1203 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20031223/b9b83ab7/attachment.obj 


More information about the Linuxppc-embedded mailing list