[
  [
    "linux-2.6.23/drivers/net/stmmac/stmmac_main.c.orig", 
    "linux-2.6.23/drivers/net/stmmac/stmmac_main.c", 
    [
      "--- linux-2.6.23/drivers/net/stmmac/stmmac_main.c.orig", 
      "+++ linux-2.6.23/drivers/net/stmmac/stmmac_main.c", 
      "@@ -34,11 +34,20 @@", 
      "#include <linux/phy.h>", 
      "#include <linux/stm/soc.h>", 
      "#include <linux/dma-mapping.h>", 
      "+#include <linux/reboot.h>", 
      "+#include <linux/notifier.h>", 
      "#include \"stmmac.h\"", 
      "", 
      "#define STMMAC_RESOURCE_NAME\t\"stmmaceth\"", 
      "#define PHY_RESOURCE_NAME\t\"stmmacphy\"", 
      "", 
      "+/*", 
      "+   Define a callback for enabling network packet handling outside of the IP-stack.", 
      "+*/", 
      "+typedef int (K_FILTER)(struct sk_buff*);", 
      "+K_FILTER *kfilter_7109;", 
      "+EXPORT_SYMBOL(kfilter_7109);", 
      "+", 
      "#undef STMMAC_DEBUG", 
      "/*#define STMMAC_DEBUG*/", 
      "#ifdef STMMAC_DEBUG", 
      "@@ -1069,6 +1078,7 @@", 
      "struct stmmac_priv *priv = netdev_priv(dev);", 
      "unsigned long ioaddr = dev->base_addr;", 
      "int ret;", 
      "+\tunsigned int value;", 
      "", 
      "/* Check that the MAC address is valid.  If its not, refuse", 
      "* to bring the device up. The user must specify an", 
      "@@ -1089,6 +1099,12 @@", 
      "return -ENODEV;", 
      "}", 
      "", 
      "+\t/* Disable tx and rx and clear any pending interrupts */", 
      "+\tstmmac_mac_disable_tx(dev);", 
      "+\tstmmac_mac_disable_rx(dev);", 
      "+\tvalue = (unsigned int)readl(ioaddr + DMA_STATUS);", 
      "+\twritel((value & 0x1ffff), ioaddr + DMA_STATUS);", 
      "+", 
      "/* Request the IRQ lines */", 
      "ret = request_irq(dev->irq, &stmmac_interrupt,", 
      "IRQF_SHARED, dev->name, dev);", 
      "@@ -1188,41 +1204,7 @@", 
      "*/", 
      "static int stmmac_release(struct net_device *dev)", 
      "{", 
      "-\tstruct stmmac_priv *priv = netdev_priv(dev);", 
      "-", 
      "-\t/* Stop and disconnect the PHY */", 
      "-\tif (priv->phydev) {", 
      "-\t\tphy_stop(priv->phydev);", 
      "-\t\tphy_disconnect(priv->phydev);", 
      "-\t\tpriv->phydev = NULL;", 
      "-\t}", 
      "-", 
      "-\tnetif_stop_queue(dev);", 
      "-\ttasklet_kill(&priv->tx_task);", 
      "-", 
      "-#ifdef CONFIG_STMMAC_TIMER", 
      "-\t/* Stop and release the timer */", 
      "-\tstmmac_close_hw_timer();", 
      "-\tif (priv->tm != NULL)", 
      "-\t\tkfree(priv->tm);", 
      "-#endif", 
      "-", 
      "-\t/* Free the IRQ lines */", 
      "-\tfree_irq(dev->irq, dev);", 
      "-", 
      "-\t/* Stop TX/RX DMA and clear the descriptors */", 
      "-\tstmmac_dma_stop_tx(dev->base_addr);", 
      "-\tstmmac_dma_stop_rx(dev->base_addr);", 
      "-", 
      "-\t/* Release and free the Rx/Tx resources */", 
      "-\tfree_dma_desc_resources(dev);", 
      "-", 
      "-\t/* Disable the MAC core */", 
      "-\tstmmac_mac_disable_tx(dev);", 
      "-\tstmmac_mac_disable_rx(dev);", 
      "-", 
      "-\tnetif_carrier_off(dev);", 
      "-", 
      "+\tif (dev) {};", 
      "return 0;", 
      "}", 
      "", 
      "@@ -1512,7 +1494,15 @@", 
      "priv->xstats.rx_vlan++;", 
      "} /*FIXME*/", 
      "#endif", 
      "-\t\t\tnetif_receive_skb(skb);", 
      "+ \t\t\t// Support for the kreatel UDP filter module", 
      "+                        if (kfilter_7109) {", 
      "+\t\t\t\tif (kfilter_7109(skb)) {", 
      "+\t\t\t\t\tnetif_receive_skb(skb);", 
      "+\t\t\t\t}", 
      "+\t\t\t}", 
      "+\t\t\telse {", 
      "+\t\t\t\tnetif_receive_skb(skb);", 
      "+\t\t\t}", 
      "", 
      "dev->stats.rx_packets++;", 
      "dev->stats.rx_bytes += frame_len;", 
      "@@ -1843,8 +1833,8 @@", 
      "priv->mac_type->ops->get_umac_addr(dev->base_addr, dev->dev_addr, 0);", 
      "", 
      "if (!is_valid_ether_addr(dev->dev_addr)) {", 
      "-\t\tprintk(KERN_WARNING \"\\tno valid MAC address; \"", 
      "-\t\t       \"please, set using ifconfig or nwhwconfig!\\n\");", 
      "+\t\tprintk(KERN_NOTICE \"No valid MAC address yet; \"", 
      "+\t\t       \"it will be set from the console later.\\n\");", 
      "}", 
      "", 
      "ret = register_netdev(dev);", 
      "@@ -1962,6 +1952,13 @@", 
      "return 1;\t\t/* forces exit of driver_for_each_device() */", 
      "}", 
      "", 
      "+static int stmmac_notify_sys(struct notifier_block *this,", 
      "+\t\t\t     unsigned long code, void *unused);", 
      "+", 
      "+static struct notifier_block stmmac_notifier = {", 
      "+\t.notifier_call = stmmac_notify_sys", 
      "+};", 
      "+", 
      "/**", 
      "* stmmac_dvr_probe", 
      "* @pdev: platform device pointer", 
      "@@ -1978,13 +1975,14 @@", 
      "struct stmmac_priv *priv;", 
      "struct plat_stmmacenet_data *plat_dat;", 
      "", 
      "-\tprintk(KERN_DEBUG \"STMMAC driver:\\n\\tplatform registration... \");", 
      "+\tprintk(KERN_DEBUG \"STMMAC driver:\\n\");", 
      "+\tprintk(KERN_DEBUG \"\\tplatform registration... \");", 
      "res = platform_get_resource(pdev, IORESOURCE_MEM, 0);", 
      "if (!res) {", 
      "ret = -ENODEV;", 
      "goto out;", 
      "}", 
      "-\tprintk(KERN_DEBUG \"done!\\n\");", 
      "+\tprintk(\"done!\\n\");", 
      "", 
      "if (!request_mem_region(res->start, (res->end - res->start),", 
      "pdev->name)) {", 
      "@@ -2064,6 +2062,9 @@", 
      "goto out;", 
      "printk(KERN_DEBUG \"\\tMDIO bus registered!\\n\");", 
      "", 
      "+\t/* Register a reboot notifier that will cleanup the driver */", 
      "+\tregister_reboot_notifier(&stmmac_notifier);", 
      "+", 
      "out:", 
      "if (ret < 0) {", 
      "platform_set_drvdata(pdev, NULL);", 
      "@@ -2085,16 +2086,34 @@", 
      "static int stmmac_dvr_remove(struct platform_device *pdev)", 
      "{", 
      "struct net_device *ndev = platform_get_drvdata(pdev);", 
      "+\tstruct stmmac_priv *priv = netdev_priv(ndev);", 
      "struct resource *res;", 
      "", 
      "-\tprintk(KERN_INFO \"%s:\\n\\tremoving driver\", __FUNCTION__);", 
      "+\t/* Free the IRQ lines */", 
      "+\tfree_irq(ndev->irq, ndev);", 
      "", 
      "stmmac_dma_stop_rx(ndev->base_addr);", 
      "stmmac_dma_stop_tx(ndev->base_addr);", 
      "", 
      "+\tif (priv->phydev) {", 
      "+\t\t/* Stop and disconnect the PHY */", 
      "+\t\tphy_stop(priv->phydev);", 
      "+\t\tphy_disconnect(priv->phydev);", 
      "+\t\tpriv->phydev = NULL;", 
      "+\t}", 
      "+\tnetif_stop_queue(ndev);", 
      "+\ttasklet_kill(&priv->tx_task);", 
      "+", 
      "stmmac_mac_disable_rx(ndev);", 
      "stmmac_mac_disable_tx(ndev);", 
      "", 
      "+#ifdef CONFIG_STMMAC_TIMER", 
      "+\t/* Stop and release the timer */", 
      "+\tstmmac_close_hw_timer();", 
      "+\tif (priv->tm != NULL)", 
      "+\t\tkfree(priv->tm);", 
      "+#endif", 
      "+", 
      "netif_carrier_off(ndev);", 
      "", 
      "stmmac_mdio_unregister(ndev);", 
      "@@ -2102,6 +2121,9 @@", 
      "platform_set_drvdata(pdev, NULL);", 
      "unregister_netdev(ndev);", 
      "", 
      "+\t/* Release and free the Rx/Tx resources */", 
      "+\tfree_dma_desc_resources(ndev);", 
      "+", 
      "iounmap((void *)ndev->base_addr);", 
      "res = platform_get_resource(pdev, IORESOURCE_MEM, 0);", 
      "release_mem_region(res->start, (res->end - res->start));", 
      "@@ -2292,6 +2314,16 @@", 
      "return 0;", 
      "}", 
      "", 
      "+static int stmmac_notify_sys(struct notifier_block *this,", 
      "+\t\t\t     unsigned long code, void *unused)", 
      "+{", 
      "+\tif (code == SYS_DOWN || code == SYS_HALT) {", 
      "+\t\tplatform_driver_unregister(&stmmac_driver);", 
      "+\t}", 
      "+", 
      "+\treturn NOTIFY_DONE;", 
      "+}", 
      "+", 
      "__setup(\"stmmaceth=\", stmmac_cmdline_opt);", 
      "#endif", 
      ""
    ]
  ]
]