This is a D-Link DGE-528T driver (gigabit ethernet) patch for newer Linux kernelversions.
The original drivercode is supplied on a CD with the networkcard and serves as a template
for this patch.

MD5 : 96c880efee1b7f51400c4c6749333296  /mnt/cdrom/Driver/LINUX/2.4.x_2.6.x/src/r1000_n.c
SHA1: ac1d839e878f86805a47607081c998d065adca34  /mnt/cdrom/Driver/LINUX/2.4.x_2.6.x/src/r1000_n.c

If you have any questions or problems, please don't hesitate to ask (helpline@matrixstorm.com)...

			THERE IS NO GUARANTEE OR WARANTY FOR EVERYTHING!

 -- Stephan Baerwolf <stephan@matrixstorm.com>
 -- http://www.matrixstorm.com/


Download location:
 http://www.matrixstorm.com/software/linux/200909150000_dlink_dge-528t_kerneldriver.patch

 r1000_n.c |  120 +++++++++++++++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 100 insertions(+), 20 deletions(-)

diff -Nru /mnt/cdrom/Driver/LINUX/2.4.x_2.6.x/src/r1000_n.c ./src/r1000_n.c
--- /mnt/cdrom/Driver/LINUX/2.4.x_2.6.x/src/r1000_n.c	2006-05-17 10:48:48.000000000 +0200
+++ ./src/r1000_n.c	2009-09-17 17:06:05.000000000 +0200
@@ -13,13 +13,17 @@
 #include <linux/timer.h>
 #include <linux/init.h>
 
-
-#define R1000_VERSION "1.02"
-#define RELEASE_DATE "2006/02/23"
+#define R1000_AUTHOR "D-Link (patch by Stephan Baerwolf, stephan@matrixstorm.com)"
+#define R1000_VERSION "1.02-patch2"
+#define RELEASE_DATE "2009/09/17"
 #define MODULENAME "r1000"
-#define R1000_DRIVER_NAME MODULENAME R1000_VERSION ", the Linux device driver for D-Link DGE-528T Gigabit Ethernet Adapter"
+#define R1000_InfoText "D-Link DGE-528T Gigabit Ethernet Adapter (patch by S. Baerwolf, Schwansee)"
+#define R1000_DRIVER_NAME MODULENAME R1000_VERSION ", the Linux device driver for " R1000_InfoText
 #define PFX MODULENAME ": "
 
+#ifndef SA_SHIRQ
+	#define SA_SHIRQ IRQF_SHARED
+#endif
 
 #undef R1000_DEBUG
 #undef R1000_JUMBO_FRAME_SUPPORT
@@ -373,10 +377,12 @@
 };
 
 
-MODULE_AUTHOR ("D-Link");
-MODULE_DESCRIPTION ("Linux device driver for D-Link DGE-528T Gigabit Ethernet Adapter");
-MODULE_PARM (media, "1-" __MODULE_STRING(MAX_UNITS) "i");
+MODULE_AUTHOR (R1000_AUTHOR);
+MODULE_DESCRIPTION (R1000_InfoText);
+module_param_array(media, int, NULL, 0);
+MODULE_PARM_DESC(media, "1-" __MODULE_STRING(MAX_UNITS) "signed integer mediaregister");
 MODULE_LICENSE("GPL");
+MODULE_VERSION(R1000_VERSION);
 
 
 static int r1000_open (struct net_device *dev);
@@ -522,7 +528,11 @@
 void r1000_phy_timer_t_handler( void	*timer_data )
 {
 	struct net_device *dev = (struct net_device *)timer_data;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
 	struct r1000_private *priv = (struct r1000_private *) (dev->priv);
+#else
+	struct r1000_private *priv = (struct r1000_private *) netdev_priv(dev);
+#endif
 	unsigned long ioaddr = priv->ioaddr;
 
 	assert( priv->mcfg > MCFG_METHOD_1 );
@@ -558,7 +568,12 @@
 void r1000_timer_handler( void *timer_data )
 {
 	struct net_device *dev = (struct net_device *)timer_data;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
 	struct r1000_private *priv = (struct r1000_private *) (dev->priv);
+#else
+	struct r1000_private *priv = (struct r1000_private *) netdev_priv(dev);
+#endif
+
 
 	if( (priv->mcfg > MCFG_METHOD_1) && (priv->pcfg < PCFG_METHOD_3) ){
 		DBG_PRINT("FIX PCS -> r1000_phy_timer_t_handler\n");
@@ -612,13 +627,20 @@
 		return -ENOMEM;
 	}
 
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,24)
 	SET_MODULE_OWNER(dev);
+#endif
 
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
 	SET_NETDEV_DEV(dev, &pdev->dev);
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
 	priv = dev->priv;
+#else
+	priv = netdev_priv(dev);
+#endif
+
 
 	// enable device (incl. PCI PM wakeup and hotplug setup)
 	rc = pci_enable_device (pdev);
@@ -780,7 +802,11 @@
 		return i;
 	}
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
 	priv = dev->priv;
+#else
+	priv = netdev_priv(dev);
+#endif
 
 	assert (ioaddr != NULL);
 	assert (dev != NULL);
@@ -813,7 +839,11 @@
 	priv->rt.dev = dev;
 #endif //end #ifdef R1000_DYNAMIC_CONTROL
 
-	priv = dev->priv;				// private data //
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+	priv = dev->priv;
+#else
+	priv = netdev_priv(dev);
+#endif
 	priv->pci_dev 	= pdev;
 	priv->ioaddr 	= ioaddr;
 
@@ -1049,7 +1079,12 @@
 //======================================================================================================
 static int r1000_open (struct net_device *dev)
 {
-	struct r1000_private *priv = dev->priv;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+	struct r1000_private *priv = (struct r1000_private *) (dev->priv);
+#else
+	struct r1000_private *priv = (struct r1000_private *) netdev_priv(dev);
+#endif
+
 	struct pci_dev *pdev = priv->pci_dev;
 	int retval;
 //	u8 diff;
@@ -1137,7 +1172,11 @@
 static void r1000_hw_PHY_reset(struct net_device *dev)
 {
 	int val, phy_reset_expiretime = 50;
-	struct r1000_private *priv = dev->priv;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+	struct r1000_private *priv = (struct r1000_private *) (dev->priv);
+#else
+	struct r1000_private *priv = (struct r1000_private *) netdev_priv(dev);
+#endif
 	unsigned long ioaddr = priv->ioaddr;
 
 	DBG_PRINT("%s: Reset RTL8169s PHY\n", dev->name);
@@ -1165,7 +1204,11 @@
 //======================================================================================================
 static void r1000_hw_PHY_config (struct net_device *dev)
 {
-	struct r1000_private *priv = dev->priv;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+	struct r1000_private *priv = (struct r1000_private *) (dev->priv);
+#else
+	struct r1000_private *priv = (struct r1000_private *) netdev_priv(dev);
+#endif
 	void *ioaddr = (void*)priv->ioaddr;
 
 	DBG_PRINT("priv->mcfg=%d, priv->pcfg=%d\n",priv->mcfg,priv->pcfg);
@@ -1241,7 +1284,11 @@
 //======================================================================================================
 static void r1000_hw_start (struct net_device *dev)
 {
-	struct r1000_private *priv = dev->priv;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+	struct r1000_private *priv = (struct r1000_private *) (dev->priv);
+#else
+	struct r1000_private *priv = (struct r1000_private *) netdev_priv(dev);
+#endif
 	struct pci_dev *pdev = priv->pci_dev;
 	unsigned long ioaddr = priv->ioaddr;
 	u32 i;
@@ -1396,7 +1443,12 @@
 //======================================================================================================
 static void r1000_init_ring (struct net_device *dev)
 {
-	struct r1000_private *priv = dev->priv;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+	struct r1000_private *priv = (struct r1000_private *) (dev->priv);
+#else
+	struct r1000_private *priv = (struct r1000_private *) netdev_priv(dev);
+#endif
+
 	struct pci_dev *pdev = priv->pci_dev;
 	int i;
 	struct sk_buff	*skb;
@@ -1472,7 +1524,12 @@
 //======================================================================================================
 static void r1000_tx_timeout (struct net_device *dev)
 {
-	struct r1000_private *priv = dev->priv;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+	struct r1000_private *priv = (struct r1000_private *) (dev->priv);
+#else
+	struct r1000_private *priv = (struct r1000_private *) netdev_priv(dev);
+#endif
+
 	unsigned long ioaddr = priv->ioaddr;
 	u8 tmp8;
 
@@ -1505,7 +1562,12 @@
 //======================================================================================================
 static int r1000_start_xmit (struct sk_buff *skb, struct net_device *dev)
 {
-	struct r1000_private *priv = dev->priv;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+	struct r1000_private *priv = (struct r1000_private *) (dev->priv);
+#else
+	struct r1000_private *priv = (struct r1000_private *) netdev_priv(dev);
+#endif
+
 	unsigned long ioaddr = priv->ioaddr;
 	struct pci_dev *pdev = priv->pci_dev;
 	int entry = priv->cur_tx % NUM_TX_DESC;
@@ -1746,7 +1808,12 @@
 #endif
 {
 	struct net_device *dev = (struct net_device *) dev_instance;
-	struct r1000_private *priv = dev->priv;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+	struct r1000_private *priv = (struct r1000_private *) (dev->priv);
+#else
+	struct r1000_private *priv = (struct r1000_private *) netdev_priv(dev);
+#endif
+
 	int boguscnt = max_interrupt_work;
 	unsigned long ioaddr = priv->ioaddr;
 	int status = 0;
@@ -1809,7 +1876,11 @@
 //======================================================================================================
 static int r1000_close (struct net_device *dev)
 {
-	struct r1000_private *priv = dev->priv;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+	struct r1000_private *priv = (struct r1000_private *) (dev->priv);
+#else
+	struct r1000_private *priv = (struct r1000_private *) netdev_priv(dev);
+#endif
 	unsigned long ioaddr = priv->ioaddr;
 	int i;
 
@@ -1911,7 +1982,11 @@
 //======================================================================================================
 static void r1000_set_rx_mode (struct net_device *dev)
 {
-	struct r1000_private *priv = dev->priv;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+	struct r1000_private *priv = (struct r1000_private *) (dev->priv);
+#else
+	struct r1000_private *priv = (struct r1000_private *) netdev_priv(dev);
+#endif
 	unsigned long ioaddr = priv->ioaddr;
 	unsigned long flags;
 	u32 mc_filter[2];	/* Multicast hash filter */
@@ -1977,7 +2052,12 @@
 struct net_device_stats *r1000_get_stats(struct net_device *dev)
 
 {
-	struct r1000_private *priv = dev->priv;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
+	struct r1000_private *priv = (struct r1000_private *) (dev->priv);
+#else
+	struct r1000_private *priv = (struct r1000_private *) netdev_priv(dev);
+#endif
+
 
     return &priv->stats;
 }
@@ -2006,7 +2086,7 @@
 //======================================================================================================
 static int __init r1000_init_module (void)
 {
-	return pci_module_init (&r1000_pci_driver);	// pci_register_driver (drv)
+	return pci_register_driver (&r1000_pci_driver);	// pci_register_driver (drv)
 }
 
 
