patch-2.1.120 linux/drivers/net/sdladrv.c

Next file: linux/drivers/net/sdlamain.c
Previous file: linux/drivers/net/sdla_x25.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.119/linux/drivers/net/sdladrv.c linux/drivers/net/sdladrv.c
@@ -421,7 +421,7 @@
  			return err;
 		}
 	}
-	else if (!get_option_index(dpmbase_opt, hw->dpmbase))
+	else if (!get_option_index(dpmbase_opt, virt_to_phys((void *)hw->dpmbase)))
 	{
 		printk(KERN_ERR "%s: memory address 0x%lX is illegal!\n",
 			modname, hw->dpmbase)
@@ -437,7 +437,7 @@
 		return -EINVAL;
 	} 
 	printk(KERN_INFO "%s: dual-port memory window is set at 0x%lX.\n",
-		modname, hw->dpmbase)
+		modname, virt_to_phys(hw->dpmbase))
 	;
 	printk(KERN_INFO "%s: found %luK bytes of on-board memory.\n",
 		modname, hw->memory / 1024)
@@ -495,7 +495,7 @@
 }
 
 /*============================================================================
- * Map shared memory window into SDLA address space.
+ * Map shared memory window into SDLA adress space.
  */
 
 EXPORT_SYMBOL(sdla_mapmem);
@@ -980,7 +980,7 @@
 
 	for (i = opt[0]; i && err; --i)
 	{
-		hw->dpmbase = opt[i];
+		hw->dpmbase = (unsigned long )(phys_to_virt(opt[i]));
 		err = sdla_setdpm(hw);
 	}
 	return err;
@@ -1333,7 +1333,7 @@
 	hw->regs[1] = 0xFF;
 
 	/* Verify configuration options */
-	i = get_option_index(s502a_dpmbase_options, hw->dpmbase);
+	i = get_option_index(s502a_dpmbase_options, virt_to_phys((void *)hw->dpmbase));
 	if (i == 0)
 		return -EINVAL
 	;
@@ -1372,7 +1372,7 @@
 	;
 
 	/* Verify configuration options */
-	i = get_option_index(s508_dpmbase_options, hw->dpmbase);
+	i = get_option_index(s508_dpmbase_options, virt_to_phys((void *)hw->dpmbase));
 	if (i == 0)
 		return -EINVAL
 	;
@@ -1416,7 +1416,7 @@
 	;
 
 	/* Verify configuration options */
-	i = get_option_index(s508_dpmbase_options, hw->dpmbase);
+	i = get_option_index(s508_dpmbase_options, virt_to_phys((void *)hw->dpmbase));
 	if (i == 0)
 		return -EINVAL
 	;
@@ -1458,7 +1458,7 @@
 	;
 
 	/* Verify configuration options */
-	i = get_option_index(s507_dpmbase_options, hw->dpmbase);
+	i = get_option_index(s507_dpmbase_options, virt_to_phys((void *)hw->dpmbase));
 	if (i == 0)
 		return -EINVAL
 	;
@@ -1515,7 +1515,7 @@
 	;
 
 	/* Verify configuration options */
-	i = get_option_index(s508_dpmbase_options, hw->dpmbase);
+	i = get_option_index(s508_dpmbase_options, virt_to_phys((void *)hw->dpmbase));
 	if (i == 0)
 		return -EINVAL
 	;
@@ -1776,7 +1776,7 @@
 	int i;
 
 	for (i = 1; i <= optlist[0]; ++i)
-		if (optlist[i] == optval) return i
+		if ( optlist[i] == optval) return i
 	;
 	return 0;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov