aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-03-03 22:22:45 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-03 22:22:45 -0500
commit46153552b43675dd4057cd526331b5bd10f39c7d (patch)
tree62b6055ee61e320dc10ea81903abbe2e7553bf4e /drivers
parentf90fdc3cce3d8c8ed09615dc68cb789655078803 (diff)
parentf71e130966ba429dbd24be08ddbcdf263df9a5ad (diff)
Merge branch 'net-const'
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/pcmcia/cm4000_cs.c24
-rw-r--r--drivers/char/pcmcia/cm4040_cs.c23
-rw-r--r--drivers/ide/legacy/ide-cs.c1
-rw-r--r--drivers/mtd/redboot.c22
-rw-r--r--drivers/net/3c59x.c4
-rw-r--r--drivers/net/8139cp.c2
-rw-r--r--drivers/net/8139too.c4
-rw-r--r--drivers/net/bnx2.c10
-rw-r--r--drivers/net/bnx2_fw.h84
-rw-r--r--drivers/net/bonding/bond_alb.c2
-rw-r--r--drivers/net/bonding/bond_main.c2
-rw-r--r--drivers/net/chelsio/subr.c2
-rw-r--r--drivers/net/dgrs.c2
-rw-r--r--drivers/net/dgrs_firmware.c4
-rw-r--r--drivers/net/dl2k.c4
-rw-r--r--drivers/net/eepro100.c4
-rw-r--r--drivers/net/epic100.c4
-rw-r--r--drivers/net/fealnx.c2
-rw-r--r--drivers/net/hamachi.c2
-rw-r--r--drivers/net/natsemi.c4
-rw-r--r--drivers/net/ne2k-pci.c2
-rw-r--r--drivers/net/ns83820.c2
-rw-r--r--drivers/net/pcmcia/3c574_cs.c2
-rw-r--r--drivers/net/pcmcia/3c589_cs.c2
-rw-r--r--drivers/net/pcmcia/axnet_cs.c1
-rw-r--r--drivers/net/pcmcia/fmvj18x_cs.c2
-rw-r--r--drivers/net/pcmcia/nmclan_cs.c2
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c2
-rw-r--r--drivers/net/pcmcia/smc91c92_cs.c4
-rw-r--r--drivers/net/pcmcia/xirc2ps_cs.c2
-rw-r--r--drivers/net/pcnet32.c6
-rw-r--r--drivers/net/phy/phy.c2
-rw-r--r--drivers/net/plip.c4
-rw-r--r--drivers/net/ppp_synctty.c2
-rw-r--r--drivers/net/r8169.c4
-rw-r--r--drivers/net/s2io.c8
-rw-r--r--drivers/net/sb1000.c2
-rw-r--r--drivers/net/sis190.c2
-rw-r--r--drivers/net/sis900.c8
-rw-r--r--drivers/net/skfp/fplustm.c14
-rw-r--r--drivers/net/skfp/pcmplc.c4
-rw-r--r--drivers/net/skfp/skfddi.c2
-rw-r--r--drivers/net/starfire.c4
-rw-r--r--drivers/net/sundance.c4
-rw-r--r--drivers/net/sungem_phy.c2
-rw-r--r--drivers/net/tg3.c4
-rw-r--r--drivers/net/typhoon.c2
-rw-r--r--drivers/net/wireless/hostap/hostap_cs.c5
-rw-r--r--drivers/net/yellowfin.c6
-rw-r--r--drivers/pcmcia/ds.c40
-rw-r--r--drivers/scsi/aha152x.c85
-rw-r--r--drivers/scsi/aha152x.h2
-rw-r--r--drivers/scsi/jazz_esp.c21
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.c29
-rw-r--r--drivers/scsi/pcmcia/aha152x_stub.c4
-rw-r--r--drivers/scsi/scsi_error.c4
-rw-r--r--drivers/scsi/scsi_lib.c2
-rw-r--r--drivers/scsi/scsi_scan.c16
-rw-r--r--drivers/scsi/scsi_transport_fc.c3
-rw-r--r--drivers/scsi/sg.c2
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_hipd.c2
61 files changed, 287 insertions, 235 deletions
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index 649677b5dc36..5fdf18515433 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -13,11 +13,12 @@
13 * 13 *
14 * (C) 2000,2001,2002,2003,2004 Omnikey AG 14 * (C) 2000,2001,2002,2003,2004 Omnikey AG
15 * 15 *
16 * (C) 2005 Harald Welte <laforge@gnumonks.org> 16 * (C) 2005-2006 Harald Welte <laforge@gnumonks.org>
17 * - Adhere to Kernel CodingStyle 17 * - Adhere to Kernel CodingStyle
18 * - Port to 2.6.13 "new" style PCMCIA 18 * - Port to 2.6.13 "new" style PCMCIA
19 * - Check for copy_{from,to}_user return values 19 * - Check for copy_{from,to}_user return values
20 * - Use nonseekable_open() 20 * - Use nonseekable_open()
21 * - add class interface for udev device creation
21 * 22 *
22 * All rights reserved. Licensed under dual BSD/GPL license. 23 * All rights reserved. Licensed under dual BSD/GPL license.
23 */ 24 */
@@ -56,7 +57,7 @@ module_param(pc_debug, int, 0600);
56#else 57#else
57#define DEBUGP(n, rdr, x, args...) 58#define DEBUGP(n, rdr, x, args...)
58#endif 59#endif
59static char *version = "cm4000_cs.c v2.4.0gm5 - All bugs added by Harald Welte"; 60static char *version = "cm4000_cs.c v2.4.0gm6 - All bugs added by Harald Welte";
60 61
61#define T_1SEC (HZ) 62#define T_1SEC (HZ)
62#define T_10MSEC msecs_to_jiffies(10) 63#define T_10MSEC msecs_to_jiffies(10)
@@ -156,6 +157,7 @@ struct cm4000_dev {
156 /*queue*/ 4*sizeof(wait_queue_head_t)) 157 /*queue*/ 4*sizeof(wait_queue_head_t))
157 158
158static dev_link_t *dev_table[CM4000_MAX_DEV]; 159static dev_link_t *dev_table[CM4000_MAX_DEV];
160static struct class *cmm_class;
159 161
160/* This table doesn't use spaces after the comma between fields and thus 162/* This table doesn't use spaces after the comma between fields and thus
161 * violates CodingStyle. However, I don't really think wrapping it around will 163 * violates CodingStyle. However, I don't really think wrapping it around will
@@ -1937,6 +1939,9 @@ static int cm4000_attach(struct pcmcia_device *p_dev)
1937 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; 1939 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
1938 cm4000_config(link, i); 1940 cm4000_config(link, i);
1939 1941
1942 class_device_create(cmm_class, NULL, MKDEV(major, i), NULL,
1943 "cmm%d", i);
1944
1940 return 0; 1945 return 0;
1941} 1946}
1942 1947
@@ -1962,6 +1967,8 @@ static void cm4000_detach(struct pcmcia_device *p_dev)
1962 dev_table[devno] = NULL; 1967 dev_table[devno] = NULL;
1963 kfree(dev); 1968 kfree(dev);
1964 1969
1970 class_device_destroy(cmm_class, MKDEV(major, devno));
1971
1965 return; 1972 return;
1966} 1973}
1967 1974
@@ -1995,8 +2002,18 @@ static struct pcmcia_driver cm4000_driver = {
1995 2002
1996static int __init cmm_init(void) 2003static int __init cmm_init(void)
1997{ 2004{
2005 int rc;
2006
1998 printk(KERN_INFO "%s\n", version); 2007 printk(KERN_INFO "%s\n", version);
1999 pcmcia_register_driver(&cm4000_driver); 2008
2009 cmm_class = class_create(THIS_MODULE, "cardman_4000");
2010 if (!cmm_class)
2011 return -1;
2012
2013 rc = pcmcia_register_driver(&cm4000_driver);
2014 if (rc < 0)
2015 return rc;
2016
2000 major = register_chrdev(0, DEVICE_NAME, &cm4000_fops); 2017 major = register_chrdev(0, DEVICE_NAME, &cm4000_fops);
2001 if (major < 0) { 2018 if (major < 0) {
2002 printk(KERN_WARNING MODULE_NAME 2019 printk(KERN_WARNING MODULE_NAME
@@ -2012,6 +2029,7 @@ static void __exit cmm_exit(void)
2012 printk(KERN_INFO MODULE_NAME ": unloading\n"); 2029 printk(KERN_INFO MODULE_NAME ": unloading\n");
2013 pcmcia_unregister_driver(&cm4000_driver); 2030 pcmcia_unregister_driver(&cm4000_driver);
2014 unregister_chrdev(major, DEVICE_NAME); 2031 unregister_chrdev(major, DEVICE_NAME);
2032 class_destroy(cmm_class);
2015}; 2033};
2016 2034
2017module_init(cmm_init); 2035module_init(cmm_init);
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c
index 46eb371bf17e..466e33bab029 100644
--- a/drivers/char/pcmcia/cm4040_cs.c
+++ b/drivers/char/pcmcia/cm4040_cs.c
@@ -3,12 +3,13 @@
3 * 3 *
4 * (c) 2000-2004 Omnikey AG (http://www.omnikey.com/) 4 * (c) 2000-2004 Omnikey AG (http://www.omnikey.com/)
5 * 5 *
6 * (C) 2005 Harald Welte <laforge@gnumonks.org> 6 * (C) 2005-2006 Harald Welte <laforge@gnumonks.org>
7 * - add support for poll() 7 * - add support for poll()
8 * - driver cleanup 8 * - driver cleanup
9 * - add waitqueues 9 * - add waitqueues
10 * - adhere to linux kernel coding style and policies 10 * - adhere to linux kernel coding style and policies
11 * - support 2.6.13 "new style" pcmcia interface 11 * - support 2.6.13 "new style" pcmcia interface
12 * - add class interface for udev device creation
12 * 13 *
13 * The device basically is a USB CCID compliant device that has been 14 * The device basically is a USB CCID compliant device that has been
14 * attached to an I/O-Mapped FIFO. 15 * attached to an I/O-Mapped FIFO.
@@ -53,7 +54,7 @@ module_param(pc_debug, int, 0600);
53#endif 54#endif
54 55
55static char *version = 56static char *version =
56"OMNIKEY CardMan 4040 v1.1.0gm4 - All bugs added by Harald Welte"; 57"OMNIKEY CardMan 4040 v1.1.0gm5 - All bugs added by Harald Welte";
57 58
58#define CCID_DRIVER_BULK_DEFAULT_TIMEOUT (150*HZ) 59#define CCID_DRIVER_BULK_DEFAULT_TIMEOUT (150*HZ)
59#define CCID_DRIVER_ASYNC_POWERUP_TIMEOUT (35*HZ) 60#define CCID_DRIVER_ASYNC_POWERUP_TIMEOUT (35*HZ)
@@ -67,6 +68,7 @@ static char *version =
67static void reader_release(dev_link_t *link); 68static void reader_release(dev_link_t *link);
68 69
69static int major; 70static int major;
71static struct class *cmx_class;
70 72
71#define BS_READABLE 0x01 73#define BS_READABLE 0x01
72#define BS_WRITABLE 0x02 74#define BS_WRITABLE 0x02
@@ -696,6 +698,9 @@ static int reader_attach(struct pcmcia_device *p_dev)
696 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; 698 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
697 reader_config(link, i); 699 reader_config(link, i);
698 700
701 class_device_create(cmx_class, NULL, MKDEV(major, i), NULL,
702 "cmx%d", i);
703
699 return 0; 704 return 0;
700} 705}
701 706
@@ -721,6 +726,8 @@ static void reader_detach(struct pcmcia_device *p_dev)
721 dev_table[devno] = NULL; 726 dev_table[devno] = NULL;
722 kfree(dev); 727 kfree(dev);
723 728
729 class_device_destroy(cmx_class, MKDEV(major, devno));
730
724 return; 731 return;
725} 732}
726 733
@@ -755,8 +762,17 @@ static struct pcmcia_driver reader_driver = {
755 762
756static int __init cm4040_init(void) 763static int __init cm4040_init(void)
757{ 764{
765 int rc;
766
758 printk(KERN_INFO "%s\n", version); 767 printk(KERN_INFO "%s\n", version);
759 pcmcia_register_driver(&reader_driver); 768 cmx_class = class_create(THIS_MODULE, "cardman_4040");
769 if (!cmx_class)
770 return -1;
771
772 rc = pcmcia_register_driver(&reader_driver);
773 if (rc < 0)
774 return rc;
775
760 major = register_chrdev(0, DEVICE_NAME, &reader_fops); 776 major = register_chrdev(0, DEVICE_NAME, &reader_fops);
761 if (major < 0) { 777 if (major < 0) {
762 printk(KERN_WARNING MODULE_NAME 778 printk(KERN_WARNING MODULE_NAME
@@ -771,6 +787,7 @@ static void __exit cm4040_exit(void)
771 printk(KERN_INFO MODULE_NAME ": unloading\n"); 787 printk(KERN_INFO MODULE_NAME ": unloading\n");
772 pcmcia_unregister_driver(&reader_driver); 788 pcmcia_unregister_driver(&reader_driver);
773 unregister_chrdev(major, DEVICE_NAME); 789 unregister_chrdev(major, DEVICE_NAME);
790 class_destroy(cmx_class);
774} 791}
775 792
776module_init(cm4040_init); 793module_init(cm4040_init);
diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c
index 4c2af9020905..6213bd3caee5 100644
--- a/drivers/ide/legacy/ide-cs.c
+++ b/drivers/ide/legacy/ide-cs.c
@@ -445,6 +445,7 @@ static struct pcmcia_device_id ide_ids[] = {
445 PCMCIA_DEVICE_PROD_ID12("PCMCIA", "PnPIDE", 0x281f1c5d, 0x0c694728), 445 PCMCIA_DEVICE_PROD_ID12("PCMCIA", "PnPIDE", 0x281f1c5d, 0x0c694728),
446 PCMCIA_DEVICE_PROD_ID12("SHUTTLE TECHNOLOGY LTD.", "PCCARD-IDE/ATAPI Adapter", 0x4a3f0ba0, 0x322560e1), 446 PCMCIA_DEVICE_PROD_ID12("SHUTTLE TECHNOLOGY LTD.", "PCCARD-IDE/ATAPI Adapter", 0x4a3f0ba0, 0x322560e1),
447 PCMCIA_DEVICE_PROD_ID12("TOSHIBA", "MK2001MPL", 0xb4585a1a, 0x3489e003), 447 PCMCIA_DEVICE_PROD_ID12("TOSHIBA", "MK2001MPL", 0xb4585a1a, 0x3489e003),
448 PCMCIA_DEVICE_PROD_ID1("TRANSCEND 512M ", 0xd0909443),
448 PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852), 449 PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852),
449 PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209), 450 PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209),
450 PCMCIA_DEVICE_PROD_ID12("STI", "Flash 5.0", 0xbf2df18d, 0x8cb57a0e), 451 PCMCIA_DEVICE_PROD_ID12("STI", "Flash 5.0", 0xbf2df18d, 0x8cb57a0e),
diff --git a/drivers/mtd/redboot.c b/drivers/mtd/redboot.c
index d01b6a9198e0..8815c8dbef2d 100644
--- a/drivers/mtd/redboot.c
+++ b/drivers/mtd/redboot.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * $Id: redboot.c,v 1.18 2005/11/07 11:14:21 gleixner Exp $ 2 * $Id: redboot.c,v 1.19 2005/12/01 10:03:51 dwmw2 Exp $
3 * 3 *
4 * Parse RedBoot-style Flash Image System (FIS) tables and 4 * Parse RedBoot-style Flash Image System (FIS) tables and
5 * produce a Linux partition array to match. 5 * produce a Linux partition array to match.
@@ -92,10 +92,10 @@ static int parse_redboot_partitions(struct mtd_info *master,
92 if (!memcmp(buf[i].name, "FIS directory", 14)) { 92 if (!memcmp(buf[i].name, "FIS directory", 14)) {
93 /* This is apparently the FIS directory entry for the 93 /* This is apparently the FIS directory entry for the
94 * FIS directory itself. The FIS directory size is 94 * FIS directory itself. The FIS directory size is
95 * one erase block, if the buf[i].size field is 95 * one erase block; if the buf[i].size field is
96 * swab32(erasesize) then we know we are looking at 96 * swab32(erasesize) then we know we are looking at
97 * a byte swapped FIS directory - swap all the entries! 97 * a byte swapped FIS directory - swap all the entries!
98 * (NOTE: this is 'size' not 'data_length', size is 98 * (NOTE: this is 'size' not 'data_length'; size is
99 * the full size of the entry.) 99 * the full size of the entry.)
100 */ 100 */
101 if (swab32(buf[i].size) == master->erasesize) { 101 if (swab32(buf[i].size) == master->erasesize) {
@@ -104,15 +104,13 @@ static int parse_redboot_partitions(struct mtd_info *master,
104 /* The unsigned long fields were written with the 104 /* The unsigned long fields were written with the
105 * wrong byte sex, name and pad have no byte sex. 105 * wrong byte sex, name and pad have no byte sex.
106 */ 106 */
107# define do_swab32(x) (x) = swab32(x) 107 swab32s(&buf[j].flash_base);
108 do_swab32(buf[j].flash_base); 108 swab32s(&buf[j].mem_base);
109 do_swab32(buf[j].mem_base); 109 swab32s(&buf[j].size);
110 do_swab32(buf[j].size); 110 swab32s(&buf[j].entry_point);
111 do_swab32(buf[j].entry_point); 111 swab32s(&buf[j].data_length);
112 do_swab32(buf[j].data_length); 112 swab32s(&buf[j].desc_cksum);
113 do_swab32(buf[j].desc_cksum); 113 swab32s(&buf[j].file_cksum);
114 do_swab32(buf[j].file_cksum);
115# undef do_swab32
116 } 114 }
117 } 115 }
118 break; 116 break;
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index 9e8897976a69..5d11a06ecb2c 100644
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -842,7 +842,7 @@ enum xcvr_types {
842 XCVR_100baseFx, XCVR_MII=6, XCVR_NWAY=8, XCVR_ExtMII=9, XCVR_Default=10, 842 XCVR_100baseFx, XCVR_MII=6, XCVR_NWAY=8, XCVR_ExtMII=9, XCVR_Default=10,
843}; 843};
844 844
845static struct media_table { 845static const struct media_table {
846 char *name; 846 char *name;
847 unsigned int media_bits:16, /* Bits to set in Wn4_Media register. */ 847 unsigned int media_bits:16, /* Bits to set in Wn4_Media register. */
848 mask:8, /* The transceiver-present bit in Wn3_Config.*/ 848 mask:8, /* The transceiver-present bit in Wn3_Config.*/
@@ -1446,7 +1446,7 @@ static int __devinit vortex_probe1(struct device *gendev,
1446 } 1446 }
1447 1447
1448 { 1448 {
1449 static const char * ram_split[] = {"5:3", "3:1", "1:1", "3:5"}; 1449 static const char * const ram_split[] = {"5:3", "3:1", "1:1", "3:5"};
1450 unsigned int config; 1450 unsigned int config;
1451 EL3WINDOW(3); 1451 EL3WINDOW(3);
1452 vp->available_media = ioread16(ioaddr + Wn3_Options); 1452 vp->available_media = ioread16(ioaddr + Wn3_Options);
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index dd410496aadb..ce99845d8266 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -1276,7 +1276,7 @@ static int cp_change_mtu(struct net_device *dev, int new_mtu)
1276} 1276}
1277#endif /* BROKEN */ 1277#endif /* BROKEN */
1278 1278
1279static char mii_2_8139_map[8] = { 1279static const char mii_2_8139_map[8] = {
1280 BasicModeCtrl, 1280 BasicModeCtrl,
1281 BasicModeStatus, 1281 BasicModeStatus,
1282 0, 1282 0,
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c
index 2beac55b57d6..e58d4c50c2e1 100644
--- a/drivers/net/8139too.c
+++ b/drivers/net/8139too.c
@@ -229,7 +229,7 @@ typedef enum {
229 229
230 230
231/* indexed by board_t, above */ 231/* indexed by board_t, above */
232static struct { 232static const struct {
233 const char *name; 233 const char *name;
234 u32 hw_flags; 234 u32 hw_flags;
235} board_info[] __devinitdata = { 235} board_info[] __devinitdata = {
@@ -1192,7 +1192,7 @@ static int __devinit read_eeprom (void __iomem *ioaddr, int location, int addr_l
1192#define mdio_delay() RTL_R8(Config4) 1192#define mdio_delay() RTL_R8(Config4)
1193 1193
1194 1194
1195static char mii_2_8139_map[8] = { 1195static const char mii_2_8139_map[8] = {
1196 BasicModeCtrl, 1196 BasicModeCtrl,
1197 BasicModeStatus, 1197 BasicModeStatus,
1198 0, 1198 0,
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index a24200d0a616..b787b6582e50 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -46,7 +46,7 @@ typedef enum {
46} board_t; 46} board_t;
47 47
48/* indexed by board_t, above */ 48/* indexed by board_t, above */
49static struct { 49static const struct {
50 char *name; 50 char *name;
51} board_info[] __devinitdata = { 51} board_info[] __devinitdata = {
52 { "Broadcom NetXtreme II BCM5706 1000Base-T" }, 52 { "Broadcom NetXtreme II BCM5706 1000Base-T" },
@@ -3476,7 +3476,7 @@ bnx2_test_registers(struct bnx2 *bp)
3476{ 3476{
3477 int ret; 3477 int ret;
3478 int i; 3478 int i;
3479 static struct { 3479 static const struct {
3480 u16 offset; 3480 u16 offset;
3481 u16 flags; 3481 u16 flags;
3482 u32 rw_mask; 3482 u32 rw_mask;
@@ -3891,7 +3891,7 @@ reg_test_err:
3891static int 3891static int
3892bnx2_do_mem_test(struct bnx2 *bp, u32 start, u32 size) 3892bnx2_do_mem_test(struct bnx2 *bp, u32 start, u32 size)
3893{ 3893{
3894 static u32 test_pattern[] = { 0x00000000, 0xffffffff, 0x55555555, 3894 static const u32 test_pattern[] = { 0x00000000, 0xffffffff, 0x55555555,
3895 0xaaaaaaaa , 0xaa55aa55, 0x55aa55aa }; 3895 0xaaaaaaaa , 0xaa55aa55, 0x55aa55aa };
3896 int i; 3896 int i;
3897 3897
@@ -3916,7 +3916,7 @@ bnx2_test_memory(struct bnx2 *bp)
3916{ 3916{
3917 int ret = 0; 3917 int ret = 0;
3918 int i; 3918 int i;
3919 static struct { 3919 static const struct {
3920 u32 offset; 3920 u32 offset;
3921 u32 len; 3921 u32 len;
3922 } mem_tbl[] = { 3922 } mem_tbl[] = {
@@ -5122,7 +5122,7 @@ static struct {
5122 5122
5123#define STATS_OFFSET32(offset_name) (offsetof(struct statistics_block, offset_name) / 4) 5123#define STATS_OFFSET32(offset_name) (offsetof(struct statistics_block, offset_name) / 4)
5124 5124
5125static unsigned long bnx2_stats_offset_arr[BNX2_NUM_STATS] = { 5125static const unsigned long bnx2_stats_offset_arr[BNX2_NUM_STATS] = {
5126 STATS_OFFSET32(stat_IfHCInOctets_hi), 5126 STATS_OFFSET32(stat_IfHCInOctets_hi),
5127 STATS_OFFSET32(stat_IfHCInBadOctets_hi), 5127 STATS_OFFSET32(stat_IfHCInBadOctets_hi),
5128 STATS_OFFSET32(stat_IfHCOutOctets_hi), 5128 STATS_OFFSET32(stat_IfHCOutOctets_hi),
diff --git a/drivers/net/bnx2_fw.h b/drivers/net/bnx2_fw.h
index 0c21bd849814..8158974c35a8 100644
--- a/drivers/net/bnx2_fw.h
+++ b/drivers/net/bnx2_fw.h
@@ -14,20 +14,20 @@
14 * accompanying it. 14 * accompanying it.
15 */ 15 */
16 16
17static int bnx2_COM_b06FwReleaseMajor = 0x1; 17static const int bnx2_COM_b06FwReleaseMajor = 0x1;
18static int bnx2_COM_b06FwReleaseMinor = 0x0; 18static const int bnx2_COM_b06FwReleaseMinor = 0x0;
19static int bnx2_COM_b06FwReleaseFix = 0x0; 19static const int bnx2_COM_b06FwReleaseFix = 0x0;
20static u32 bnx2_COM_b06FwStartAddr = 0x080008b4; 20static const u32 bnx2_COM_b06FwStartAddr = 0x080008b4;
21static u32 bnx2_COM_b06FwTextAddr = 0x08000000; 21static const u32 bnx2_COM_b06FwTextAddr = 0x08000000;
22static int bnx2_COM_b06FwTextLen = 0x57bc; 22static const int bnx2_COM_b06FwTextLen = 0x57bc;
23static u32 bnx2_COM_b06FwDataAddr = 0x08005840; 23static const u32 bnx2_COM_b06FwDataAddr = 0x08005840;
24static int bnx2_COM_b06FwDataLen = 0x0; 24static const int bnx2_COM_b06FwDataLen = 0x0;
25static u32 bnx2_COM_b06FwRodataAddr = 0x080057c0; 25static const u32 bnx2_COM_b06FwRodataAddr = 0x080057c0;
26static int bnx2_COM_b06FwRodataLen = 0x58; 26static const int bnx2_COM_b06FwRodataLen = 0x58;
27static u32 bnx2_COM_b06FwBssAddr = 0x08005860; 27static const u32 bnx2_COM_b06FwBssAddr = 0x08005860;
28static int bnx2_COM_b06FwBssLen = 0x88; 28static const int bnx2_COM_b06FwBssLen = 0x88;
29static u32 bnx2_COM_b06FwSbssAddr = 0x08005840; 29static const u32 bnx2_COM_b06FwSbssAddr = 0x08005840;
30static int bnx2_COM_b06FwSbssLen = 0x1c; 30static const int bnx2_COM_b06FwSbssLen = 0x1c;
31static u32 bnx2_COM_b06FwText[(0x57bc/4) + 1] = { 31static u32 bnx2_COM_b06FwText[(0x57bc/4) + 1] = {
32 0x0a00022d, 0x00000000, 0x00000000, 0x0000000d, 0x636f6d20, 0x322e352e, 32 0x0a00022d, 0x00000000, 0x00000000, 0x0000000d, 0x636f6d20, 0x322e352e,
33 0x38000000, 0x02050802, 0x00000000, 0x00000003, 0x00000014, 0x00000032, 33 0x38000000, 0x02050802, 0x00000000, 0x00000003, 0x00000014, 0x00000032,
@@ -2325,20 +2325,20 @@ static u32 bnx2_rv2p_proc2[] = {
2325 0x0000000c, 0x29520000, 0x00000018, 0x80000002, 0x0000000c, 0x29800000, 2325 0x0000000c, 0x29520000, 0x00000018, 0x80000002, 0x0000000c, 0x29800000,
2326 0x00000018, 0x00570000 }; 2326 0x00000018, 0x00570000 };
2327 2327
2328static int bnx2_TPAT_b06FwReleaseMajor = 0x1; 2328static const int bnx2_TPAT_b06FwReleaseMajor = 0x1;
2329static int bnx2_TPAT_b06FwReleaseMinor = 0x0; 2329static const int bnx2_TPAT_b06FwReleaseMinor = 0x0;
2330static int bnx2_TPAT_b06FwReleaseFix = 0x0; 2330static const int bnx2_TPAT_b06FwReleaseFix = 0x0;
2331static u32 bnx2_TPAT_b06FwStartAddr = 0x08000860; 2331static const u32 bnx2_TPAT_b06FwStartAddr = 0x08000860;
2332static u32 bnx2_TPAT_b06FwTextAddr = 0x08000800; 2332static const u32 bnx2_TPAT_b06FwTextAddr = 0x08000800;
2333static int bnx2_TPAT_b06FwTextLen = 0x122c; 2333static const int bnx2_TPAT_b06FwTextLen = 0x122c;
2334static u32 bnx2_TPAT_b06FwDataAddr = 0x08001a60; 2334static const u32 bnx2_TPAT_b06FwDataAddr = 0x08001a60;
2335static int bnx2_TPAT_b06FwDataLen = 0x0; 2335static const int bnx2_TPAT_b06FwDataLen = 0x0;
2336static u32 bnx2_TPAT_b06FwRodataAddr = 0x00000000; 2336static const u32 bnx2_TPAT_b06FwRodataAddr = 0x00000000;
2337static int bnx2_TPAT_b06FwRodataLen = 0x0; 2337static const int bnx2_TPAT_b06FwRodataLen = 0x0;
2338static u32 bnx2_TPAT_b06FwBssAddr = 0x08001aa0; 2338static const u32 bnx2_TPAT_b06FwBssAddr = 0x08001aa0;
2339static int bnx2_TPAT_b06FwBssLen = 0x250; 2339static const int bnx2_TPAT_b06FwBssLen = 0x250;
2340static u32 bnx2_TPAT_b06FwSbssAddr = 0x08001a60; 2340static const u32 bnx2_TPAT_b06FwSbssAddr = 0x08001a60;
2341static int bnx2_TPAT_b06FwSbssLen = 0x34; 2341static const int bnx2_TPAT_b06FwSbssLen = 0x34;
2342static u32 bnx2_TPAT_b06FwText[(0x122c/4) + 1] = { 2342static u32 bnx2_TPAT_b06FwText[(0x122c/4) + 1] = {
2343 0x0a000218, 0x00000000, 0x00000000, 0x0000000d, 0x74706174, 0x20322e35, 2343 0x0a000218, 0x00000000, 0x00000000, 0x0000000d, 0x74706174, 0x20322e35,
2344 0x2e313100, 0x02050b01, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 2344 0x2e313100, 0x02050b01, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
@@ -2540,20 +2540,20 @@ static u32 bnx2_TPAT_b06FwRodata[(0x0/4) + 1] = { 0x0 };
2540static u32 bnx2_TPAT_b06FwBss[(0x250/4) + 1] = { 0x0 }; 2540static u32 bnx2_TPAT_b06FwBss[(0x250/4) + 1] = { 0x0 };
2541static u32 bnx2_TPAT_b06FwSbss[(0x34/4) + 1] = { 0x0 }; 2541static u32 bnx2_TPAT_b06FwSbss[(0x34/4) + 1] = { 0x0 };
2542 2542
2543static int bnx2_TXP_b06FwReleaseMajor = 0x1; 2543static const int bnx2_TXP_b06FwReleaseMajor = 0x1;
2544static int bnx2_TXP_b06FwReleaseMinor = 0x0; 2544static const int bnx2_TXP_b06FwReleaseMinor = 0x0;
2545static int bnx2_TXP_b06FwReleaseFix = 0x0; 2545static const int bnx2_TXP_b06FwReleaseFix = 0x0;
2546static u32 bnx2_TXP_b06FwStartAddr = 0x080034b0; 2546static const u32 bnx2_TXP_b06FwStartAddr = 0x080034b0;
2547static u32 bnx2_TXP_b06FwTextAddr = 0x08000000; 2547static const u32 bnx2_TXP_b06FwTextAddr = 0x08000000;
2548static int bnx2_TXP_b06FwTextLen = 0x5748; 2548static const int bnx2_TXP_b06FwTextLen = 0x5748;
2549static u32 bnx2_TXP_b06FwDataAddr = 0x08005760; 2549static const u32 bnx2_TXP_b06FwDataAddr = 0x08005760;
2550static int bnx2_TXP_b06FwDataLen = 0x0; 2550static const int bnx2_TXP_b06FwDataLen = 0x0;
2551static u32 bnx2_TXP_b06FwRodataAddr = 0x00000000; 2551static const u32 bnx2_TXP_b06FwRodataAddr = 0x00000000;
2552static int bnx2_TXP_b06FwRodataLen = 0x0; 2552static const int bnx2_TXP_b06FwRodataLen = 0x0;
2553static u32 bnx2_TXP_b06FwBssAddr = 0x080057a0; 2553static const u32 bnx2_TXP_b06FwBssAddr = 0x080057a0;
2554static int bnx2_TXP_b06FwBssLen = 0x1c4; 2554static const int bnx2_TXP_b06FwBssLen = 0x1c4;
2555static u32 bnx2_TXP_b06FwSbssAddr = 0x08005760; 2555static const u32 bnx2_TXP_b06FwSbssAddr = 0x08005760;
2556static int bnx2_TXP_b06FwSbssLen = 0x38; 2556static const int bnx2_TXP_b06FwSbssLen = 0x38;
2557static u32 bnx2_TXP_b06FwText[(0x5748/4) + 1] = { 2557static u32 bnx2_TXP_b06FwText[(0x5748/4) + 1] = {
2558 0x0a000d2c, 0x00000000, 0x00000000, 0x0000000d, 0x74787020, 0x322e352e, 2558 0x0a000d2c, 0x00000000, 0x00000000, 0x0000000d, 0x74787020, 0x322e352e,
2559 0x38000000, 0x02050800, 0x0000000a, 0x000003e8, 0x0000ea60, 0x00000000, 2559 0x38000000, 0x02050800, 0x0000000a, 0x000003e8, 0x0000ea60, 0x00000000,
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index f2a63186ae05..e83bc825f6af 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -1261,7 +1261,7 @@ int bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev)
1261 struct ethhdr *eth_data; 1261 struct ethhdr *eth_data;
1262 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond)); 1262 struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
1263 struct slave *tx_slave = NULL; 1263 struct slave *tx_slave = NULL;
1264 static u32 ip_bcast = 0xffffffff; 1264 static const u32 ip_bcast = 0xffffffff;
1265 int hash_size = 0; 1265 int hash_size = 0;
1266 int do_tx_balance = 1; 1266 int do_tx_balance = 1;
1267 u32 hash_index = 0; 1267 u32 hash_index = 0;
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 623c87a83615..2d0ac169a86c 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -131,7 +131,7 @@ MODULE_PARM_DESC(arp_ip_target, "arp targets in n.n.n.n form");
131 131
132/*----------------------------- Global variables ----------------------------*/ 132/*----------------------------- Global variables ----------------------------*/
133 133
134static const char *version = 134static const char * const version =
135 DRV_DESCRIPTION ": v" DRV_VERSION " (" DRV_RELDATE ")\n"; 135 DRV_DESCRIPTION ": v" DRV_VERSION " (" DRV_RELDATE ")\n";
136 136
137LIST_HEAD(bond_dev_list); 137LIST_HEAD(bond_dev_list);
diff --git a/drivers/net/chelsio/subr.c b/drivers/net/chelsio/subr.c
index 1ebb5d149aef..12e4e96dba2d 100644
--- a/drivers/net/chelsio/subr.c
+++ b/drivers/net/chelsio/subr.c
@@ -686,7 +686,7 @@ int t1_init_hw_modules(adapter_t *adapter)
686 */ 686 */
687static void __devinit get_pci_mode(adapter_t *adapter, struct chelsio_pci_params *p) 687static void __devinit get_pci_mode(adapter_t *adapter, struct chelsio_pci_params *p)
688{ 688{
689 static unsigned short speed_map[] = { 33, 66, 100, 133 }; 689 static const unsigned short speed_map[] = { 33, 66, 100, 133 };
690 u32 pci_mode; 690 u32 pci_mode;
691 691
692 pci_read_config_dword(adapter->pdev, A_PCICFG_MODE, &pci_mode); 692 pci_read_config_dword(adapter->pdev, A_PCICFG_MODE, &pci_mode);
diff --git a/drivers/net/dgrs.c b/drivers/net/dgrs.c
index 70b47e4c4e9c..32d13166c6e8 100644
--- a/drivers/net/dgrs.c
+++ b/drivers/net/dgrs.c
@@ -993,7 +993,7 @@ dgrs_download(struct net_device *dev0)
993 int is; 993 int is;
994 unsigned long i; 994 unsigned long i;
995 995
996 static int iv2is[16] = { 996 static const int iv2is[16] = {
997 0, 0, 0, ES4H_IS_INT3, 997 0, 0, 0, ES4H_IS_INT3,
998 0, ES4H_IS_INT5, 0, ES4H_IS_INT7, 998 0, ES4H_IS_INT5, 0, ES4H_IS_INT7,
999 0, 0, ES4H_IS_INT10, ES4H_IS_INT11, 999 0, 0, ES4H_IS_INT10, ES4H_IS_INT11,
diff --git a/drivers/net/dgrs_firmware.c b/drivers/net/dgrs_firmware.c
index 1e49e1e1f201..8c20d4c99937 100644
--- a/drivers/net/dgrs_firmware.c
+++ b/drivers/net/dgrs_firmware.c
@@ -1,4 +1,4 @@
1static int dgrs_firmnum = 550; 1static const int dgrs_firmnum = 550;
2static char dgrs_firmver[] = "$Version$"; 2static char dgrs_firmver[] = "$Version$";
3static char dgrs_firmdate[] = "11/16/96 03:45:15"; 3static char dgrs_firmdate[] = "11/16/96 03:45:15";
4static unsigned char dgrs_code[] __initdata = { 4static unsigned char dgrs_code[] __initdata = {
@@ -9963,4 +9963,4 @@ static unsigned char dgrs_code[] __initdata = {
9963 109,46,99,0,114,99,0,0,48,120,0,0, 9963 109,46,99,0,114,99,0,0,48,120,0,0,
9964 0,0,0,0,0,0,0,0,0,0,0,0 9964 0,0,0,0,0,0,0,0,0,0,0,0
9965 } ; 9965 } ;
9966static int dgrs_ncode = 119520 ; 9966static const int dgrs_ncode = 119520 ;
diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c
index 430c628279b3..6376b63d9b17 100644
--- a/drivers/net/dl2k.c
+++ b/drivers/net/dl2k.c
@@ -90,8 +90,8 @@ module_param(tx_coalesce, int, 0); /* HW xmit count each TxDMAComplete */
90#define EnableInt() \ 90#define EnableInt() \
91writew(DEFAULT_INTR, ioaddr + IntEnable) 91writew(DEFAULT_INTR, ioaddr + IntEnable)
92 92
93static int max_intrloop = 50; 93static const int max_intrloop = 50;
94static int multicast_filter_limit = 0x40; 94static const int multicast_filter_limit = 0x40;
95 95
96static int rio_open (struct net_device *dev); 96static int rio_open (struct net_device *dev);
97static void rio_timer (unsigned long data); 97static void rio_timer (unsigned long data);
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c
index 8c62ced2c9b2..467fc861360d 100644
--- a/drivers/net/eepro100.c
+++ b/drivers/net/eepro100.c
@@ -27,7 +27,7 @@
27 rx_align support: enables rx DMA without causing unaligned accesses. 27 rx_align support: enables rx DMA without causing unaligned accesses.
28*/ 28*/
29 29
30static const char *version = 30static const char * const version =
31"eepro100.c:v1.09j-t 9/29/99 Donald Becker http://www.scyld.com/network/eepro100.html\n" 31"eepro100.c:v1.09j-t 9/29/99 Donald Becker http://www.scyld.com/network/eepro100.html\n"
32"eepro100.c: $Revision: 1.36 $ 2000/11/17 Modified by Andrey V. Savochkin <saw@saw.sw.com.sg> and others\n"; 32"eepro100.c: $Revision: 1.36 $ 2000/11/17 Modified by Andrey V. Savochkin <saw@saw.sw.com.sg> and others\n";
33 33
@@ -469,7 +469,7 @@ static const char i82558_config_cmd[CONFIG_DATA_SIZE] = {
469 0x31, 0x05, }; 469 0x31, 0x05, };
470 470
471/* PHY media interface chips. */ 471/* PHY media interface chips. */
472static const char *phys[] = { 472static const char * const phys[] = {
473 "None", "i82553-A/B", "i82553-C", "i82503", 473 "None", "i82553-A/B", "i82553-C", "i82503",
474 "DP83840", "80c240", "80c24", "i82555", 474 "DP83840", "80c240", "80c24", "i82555",
475 "unknown-8", "unknown-9", "DP83840A", "unknown-11", 475 "unknown-8", "unknown-9", "DP83840A", "unknown-11",
diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c
index f119ec4e89ea..2f7b86837fe8 100644
--- a/drivers/net/epic100.c
+++ b/drivers/net/epic100.c
@@ -225,7 +225,7 @@ struct epic_chip_info {
225 225
226 226
227/* indexed by chip_t */ 227/* indexed by chip_t */
228static struct epic_chip_info pci_id_tbl[] = { 228static const struct epic_chip_info pci_id_tbl[] = {
229 { "SMSC EPIC/100 83c170", 229 { "SMSC EPIC/100 83c170",
230 EPIC_IOTYPE, EPIC_TOTAL_SIZE, TYPE2_INTR | NO_MII | MII_PWRDWN }, 230 EPIC_IOTYPE, EPIC_TOTAL_SIZE, TYPE2_INTR | NO_MII | MII_PWRDWN },
231 { "SMSC EPIC/100 83c170", 231 { "SMSC EPIC/100 83c170",
@@ -291,7 +291,7 @@ enum CommandBits {
291 RxDone | RxStarted | RxEarlyWarn | RxOverflow | RxFull) 291 RxDone | RxStarted | RxEarlyWarn | RxOverflow | RxFull)
292#define EpicNormalEvent (0x0000ffff & ~EpicNapiEvent) 292#define EpicNormalEvent (0x0000ffff & ~EpicNapiEvent)
293 293
294static u16 media2miictl[16] = { 294static const u16 media2miictl[16] = {
295 0, 0x0C00, 0x0C00, 0x2000, 0x0100, 0x2100, 0, 0, 295 0, 0x0C00, 0x0C00, 0x2000, 0x0100, 0x2100, 0, 0,
296 0, 0, 0, 0, 0, 0, 0, 0 }; 296 0, 0, 0, 0, 0, 0, 0, 0 };
297 297
diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c
index 55dbe9a3fd56..a8449265e5fd 100644
--- a/drivers/net/fealnx.c
+++ b/drivers/net/fealnx.c
@@ -160,7 +160,7 @@ struct chip_info {
160 int flags; 160 int flags;
161}; 161};
162 162
163static struct chip_info skel_netdrv_tbl[] = { 163static const struct chip_info skel_netdrv_tbl[] = {
164 {"100/10M Ethernet PCI Adapter", 136, HAS_MII_XCVR}, 164 {"100/10M Ethernet PCI Adapter", 136, HAS_MII_XCVR},
165 {"100/10M Ethernet PCI Adapter", 136, HAS_CHIP_XCVR}, 165 {"100/10M Ethernet PCI Adapter", 136, HAS_CHIP_XCVR},
166 {"1000/100/10M Ethernet PCI Adapter", 136, HAS_MII_XCVR}, 166 {"1000/100/10M Ethernet PCI Adapter", 136, HAS_MII_XCVR},
diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c
index bc9a3bf8d560..0ea4cb4a0d80 100644
--- a/drivers/net/hamachi.c
+++ b/drivers/net/hamachi.c
@@ -427,7 +427,7 @@ that case.
427static void hamachi_timer(unsigned long data); 427static void hamachi_timer(unsigned long data);
428 428
429enum capability_flags {CanHaveMII=1, }; 429enum capability_flags {CanHaveMII=1, };
430static struct chip_info { 430static const struct chip_info {
431 u16 vendor_id, device_id, device_id_mask, pad; 431 u16 vendor_id, device_id, device_id_mask, pad;
432 const char *name; 432 const char *name;
433 void (*media_timer)(unsigned long data); 433 void (*media_timer)(unsigned long data);
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index 9d6d2548c2d3..01920648fc38 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -189,7 +189,7 @@ static int mtu;
189 189
190/* Maximum number of multicast addresses to filter (vs. rx-all-multicast). 190/* Maximum number of multicast addresses to filter (vs. rx-all-multicast).
191 This chip uses a 512 element hash table based on the Ethernet CRC. */ 191 This chip uses a 512 element hash table based on the Ethernet CRC. */
192static int multicast_filter_limit = 100; 192static const int multicast_filter_limit = 100;
193 193
194/* Set the copy breakpoint for the copy-only-tiny-frames scheme. 194/* Set the copy breakpoint for the copy-only-tiny-frames scheme.
195 Setting to > 1518 effectively disables this feature. */ 195 Setting to > 1518 effectively disables this feature. */
@@ -374,7 +374,7 @@ enum pcistuff {
374 374
375 375
376/* array of board data directly indexed by pci_tbl[x].driver_data */ 376/* array of board data directly indexed by pci_tbl[x].driver_data */
377static struct { 377static const struct {
378 const char *name; 378 const char *name;
379 unsigned long flags; 379 unsigned long flags;
380} natsemi_pci_info[] __devinitdata = { 380} natsemi_pci_info[] __devinitdata = {
diff --git a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c
index d11821dd86ed..e3ebb5803b02 100644
--- a/drivers/net/ne2k-pci.c
+++ b/drivers/net/ne2k-pci.c
@@ -117,7 +117,7 @@ enum ne2k_pci_chipsets {
117}; 117};
118 118
119 119
120static struct { 120static const struct {
121 char *name; 121 char *name;
122 int flags; 122 int flags;
123} pci_clone_list[] __devinitdata = { 123} pci_clone_list[] __devinitdata = {
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c
index 253cf018dfba..0fede50abd3e 100644
--- a/drivers/net/ns83820.c
+++ b/drivers/net/ns83820.c
@@ -652,7 +652,7 @@ static void FASTCALL(phy_intr(struct net_device *ndev));
652static void fastcall phy_intr(struct net_device *ndev) 652static void fastcall phy_intr(struct net_device *ndev)
653{ 653{
654 struct ns83820 *dev = PRIV(ndev); 654 struct ns83820 *dev = PRIV(ndev);
655 static char *speeds[] = { "10", "100", "1000", "1000(?)", "1000F" }; 655 static const char *speeds[] = { "10", "100", "1000", "1000(?)", "1000F" };
656 u32 cfg, new_cfg; 656 u32 cfg, new_cfg;
657 u32 tbisr, tanar, tanlpar; 657 u32 tbisr, tanar, tanlpar;
658 int speed, fullduplex, newlinkstate; 658 int speed, fullduplex, newlinkstate;
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c
index 48774efeec71..ce90becb8bdf 100644
--- a/drivers/net/pcmcia/3c574_cs.c
+++ b/drivers/net/pcmcia/3c574_cs.c
@@ -341,7 +341,7 @@ static void tc574_detach(struct pcmcia_device *p_dev)
341#define CS_CHECK(fn, ret) \ 341#define CS_CHECK(fn, ret) \
342 do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) 342 do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
343 343
344static char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"}; 344static const char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"};
345 345
346static void tc574_config(dev_link_t *link) 346static void tc574_config(dev_link_t *link)
347{ 347{
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c
index c4abc9365f8e..3dba50849da7 100644
--- a/drivers/net/pcmcia/3c589_cs.c
+++ b/drivers/net/pcmcia/3c589_cs.c
@@ -116,7 +116,7 @@ struct el3_private {
116 spinlock_t lock; 116 spinlock_t lock;
117}; 117};
118 118
119static char *if_names[] = { "auto", "10baseT", "10base2", "AUI" }; 119static const char *if_names[] = { "auto", "10baseT", "10base2", "AUI" };
120 120
121/*====================================================================*/ 121/*====================================================================*/
122 122
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index 01ddfc8cce3f..aa5581369399 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -806,6 +806,7 @@ static struct pcmcia_device_id axnet_ids[] = {
806 PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0309), 806 PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0309),
807 PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1106), 807 PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1106),
808 PCMCIA_DEVICE_MANF_CARD(0x8a01, 0xc1ab), 808 PCMCIA_DEVICE_MANF_CARD(0x8a01, 0xc1ab),
809 PCMCIA_DEVICE_PROD_ID12("AmbiCom,Inc.", "Fast Ethernet PC Card(AMB8110)", 0x49b020a7, 0x119cc9fc),
809 PCMCIA_DEVICE_PROD_ID124("Fast Ethernet", "16-bit PC Card", "AX88190", 0xb4be14e3, 0x9a12eb6a, 0xab9be5ef), 810 PCMCIA_DEVICE_PROD_ID124("Fast Ethernet", "16-bit PC Card", "AX88190", 0xb4be14e3, 0x9a12eb6a, 0xab9be5ef),
810 PCMCIA_DEVICE_PROD_ID12("ASIX", "AX88190", 0x0959823b, 0xab9be5ef), 811 PCMCIA_DEVICE_PROD_ID12("ASIX", "AX88190", 0x0959823b, 0xab9be5ef),
811 PCMCIA_DEVICE_PROD_ID12("Billionton", "LNA-100B", 0x552ab682, 0xbc3b87e1), 812 PCMCIA_DEVICE_PROD_ID12("Billionton", "LNA-100B", 0x552ab682, 0xbc3b87e1),
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c
index 28fe2fb4d6c0..b7ac14ba8877 100644
--- a/drivers/net/pcmcia/fmvj18x_cs.c
+++ b/drivers/net/pcmcia/fmvj18x_cs.c
@@ -309,7 +309,7 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
309static int mfc_try_io_port(dev_link_t *link) 309static int mfc_try_io_port(dev_link_t *link)
310{ 310{
311 int i, ret; 311 int i, ret;
312 static kio_addr_t serial_base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 }; 312 static const kio_addr_t serial_base[5] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8, 0x0 };
313 313
314 for (i = 0; i < 5; i++) { 314 for (i = 0; i < 5; i++) {
315 link->io.BasePort2 = serial_base[i]; 315 link->io.BasePort2 = serial_base[i];
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c
index 4a232254a497..787176c57fd9 100644
--- a/drivers/net/pcmcia/nmclan_cs.c
+++ b/drivers/net/pcmcia/nmclan_cs.c
@@ -388,7 +388,7 @@ static char *version =
388DRV_NAME " " DRV_VERSION " (Roger C. Pao)"; 388DRV_NAME " " DRV_VERSION " (Roger C. Pao)";
389#endif 389#endif
390 390
391static char *if_names[]={ 391static const char *if_names[]={
392 "Auto", "10baseT", "BNC", 392 "Auto", "10baseT", "BNC",
393}; 393};
394 394
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index 736dff5fa93c..b46e5f703efa 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -66,7 +66,7 @@
66 66
67#define PCNET_RDC_TIMEOUT (2*HZ/100) /* Max wait in jiffies for Tx RDC */ 67#define PCNET_RDC_TIMEOUT (2*HZ/100) /* Max wait in jiffies for Tx RDC */
68 68
69static char *if_names[] = { "auto", "10baseT", "10base2"}; 69static const char *if_names[] = { "auto", "10baseT", "10base2"};
70 70
71#ifdef PCMCIA_DEBUG 71#ifdef PCMCIA_DEBUG
72static int pc_debug = PCMCIA_DEBUG; 72static int pc_debug = PCMCIA_DEBUG;
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index 0122415dfeef..8839c4faafd6 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -59,7 +59,7 @@
59 59
60/*====================================================================*/ 60/*====================================================================*/
61 61
62static char *if_names[] = { "auto", "10baseT", "10base2"}; 62static const char *if_names[] = { "auto", "10baseT", "10base2"};
63 63
64/* Module parameters */ 64/* Module parameters */
65 65
@@ -777,7 +777,7 @@ free_cfg_mem:
777static int osi_config(dev_link_t *link) 777static int osi_config(dev_link_t *link)
778{ 778{
779 struct net_device *dev = link->priv; 779 struct net_device *dev = link->priv;
780 static kio_addr_t com[4] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 }; 780 static const kio_addr_t com[4] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 };
781 int i, j; 781 int i, j;
782 782
783 link->conf.Attributes |= CONF_ENABLE_SPKR; 783 link->conf.Attributes |= CONF_ENABLE_SPKR;
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index 593d8adee891..eed496803fe4 100644
--- a/drivers/net/pcmcia/xirc2ps_cs.c
+++ b/drivers/net/pcmcia/xirc2ps_cs.c
@@ -208,7 +208,7 @@ enum xirc_cmd { /* Commands */
208#define XIRCREG45_REV 15 /* Revision Register (rd) */ 208#define XIRCREG45_REV 15 /* Revision Register (rd) */
209#define XIRCREG50_IA 8 /* Individual Address (8-13) */ 209#define XIRCREG50_IA 8 /* Individual Address (8-13) */
210 210
211static char *if_names[] = { "Auto", "10BaseT", "10Base2", "AUI", "100BaseT" }; 211static const char *if_names[] = { "Auto", "10BaseT", "10Base2", "AUI", "100BaseT" };
212 212
213/**************** 213/****************
214 * All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If 214 * All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
index 8f6cf8c896a4..7e900572eaf8 100644
--- a/drivers/net/pcnet32.c
+++ b/drivers/net/pcnet32.c
@@ -26,7 +26,7 @@
26#define DRV_RELDATE "01.Nov.2005" 26#define DRV_RELDATE "01.Nov.2005"
27#define PFX DRV_NAME ": " 27#define PFX DRV_NAME ": "
28 28
29static const char *version = 29static const char * const version =
30DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " tsbogend@alpha.franken.de\n"; 30DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " tsbogend@alpha.franken.de\n";
31 31
32#include <linux/module.h> 32#include <linux/module.h>
@@ -109,7 +109,7 @@ static int rx_copybreak = 200;
109 * table to translate option values from tulip 109 * table to translate option values from tulip
110 * to internal options 110 * to internal options
111 */ 111 */
112static unsigned char options_mapping[] = { 112static const unsigned char options_mapping[] = {
113 PCNET32_PORT_ASEL, /* 0 Auto-select */ 113 PCNET32_PORT_ASEL, /* 0 Auto-select */
114 PCNET32_PORT_AUI, /* 1 BNC/AUI */ 114 PCNET32_PORT_AUI, /* 1 BNC/AUI */
115 PCNET32_PORT_AUI, /* 2 AUI/BNC */ 115 PCNET32_PORT_AUI, /* 2 AUI/BNC */
@@ -733,7 +733,7 @@ static int pcnet32_loopback_test(struct net_device *dev, uint64_t *data1)
733 int rc; /* return code */ 733 int rc; /* return code */
734 int size; /* size of packets */ 734 int size; /* size of packets */
735 unsigned char *packet; /* source packet data */ 735 unsigned char *packet; /* source packet data */
736 static int data_len = 60; /* length of source packets */ 736 static const int data_len = 60; /* length of source packets */
737 unsigned long flags; 737 unsigned long flags;
738 unsigned long ticks; 738 unsigned long ticks;
739 739
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 1474b7c5ac0b..33cec2dab942 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -132,7 +132,7 @@ struct phy_setting {
132}; 132};
133 133
134/* A mapping of all SUPPORTED settings to speed/duplex */ 134/* A mapping of all SUPPORTED settings to speed/duplex */
135static struct phy_setting settings[] = { 135static const struct phy_setting settings[] = {
136 { 136 {
137 .speed = 10000, 137 .speed = 10000,
138 .duplex = DUPLEX_FULL, 138 .duplex = DUPLEX_FULL,
diff --git a/drivers/net/plip.c b/drivers/net/plip.c
index 87ee3271b17d..d4449d6d1fe4 100644
--- a/drivers/net/plip.c
+++ b/drivers/net/plip.c
@@ -123,7 +123,7 @@ static const char version[] = "NET3 PLIP version 2.4-parport gniibe@mri.co.jp\n"
123#ifndef NET_DEBUG 123#ifndef NET_DEBUG
124#define NET_DEBUG 1 124#define NET_DEBUG 1
125#endif 125#endif
126static unsigned int net_debug = NET_DEBUG; 126static const unsigned int net_debug = NET_DEBUG;
127 127
128#define ENABLE(irq) if (irq != -1) enable_irq(irq) 128#define ENABLE(irq) if (irq != -1) enable_irq(irq)
129#define DISABLE(irq) if (irq != -1) disable_irq(irq) 129#define DISABLE(irq) if (irq != -1) disable_irq(irq)
@@ -351,7 +351,7 @@ static int plip_bh_timeout_error(struct net_device *dev, struct net_local *nl,
351typedef int (*plip_func)(struct net_device *dev, struct net_local *nl, 351typedef int (*plip_func)(struct net_device *dev, struct net_local *nl,
352 struct plip_local *snd, struct plip_local *rcv); 352 struct plip_local *snd, struct plip_local *rcv);
353 353
354static plip_func connection_state_table[] = 354static const plip_func connection_state_table[] =
355{ 355{
356 plip_none, 356 plip_none,
357 plip_receive_packet, 357 plip_receive_packet,
diff --git a/drivers/net/ppp_synctty.c b/drivers/net/ppp_synctty.c
index 33cb8254e79d..33255fe8031e 100644
--- a/drivers/net/ppp_synctty.c
+++ b/drivers/net/ppp_synctty.c
@@ -108,7 +108,7 @@ static void
108ppp_print_hex (register __u8 * out, const __u8 * in, int count) 108ppp_print_hex (register __u8 * out, const __u8 * in, int count)
109{ 109{
110 register __u8 next_ch; 110 register __u8 next_ch;
111 static char hex[] = "0123456789ABCDEF"; 111 static const char hex[] = "0123456789ABCDEF";
112 112
113 while (count-- > 0) { 113 while (count-- > 0) {
114 next_ch = *in++; 114 next_ch = *in++;
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 8cc0d0bbdf50..0ad3310290f1 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -113,11 +113,11 @@ static int media[MAX_UNITS] = { -1, -1, -1, -1, -1, -1, -1, -1 };
113static int num_media = 0; 113static int num_media = 0;
114 114
115/* Maximum events (Rx packets, etc.) to handle at each interrupt. */ 115/* Maximum events (Rx packets, etc.) to handle at each interrupt. */
116static int max_interrupt_work = 20; 116static const int max_interrupt_work = 20;
117 117
118/* Maximum number of multicast addresses to filter (vs. Rx-all-multicast). 118/* Maximum number of multicast addresses to filter (vs. Rx-all-multicast).
119 The RTL chips use a 64 element hash table based on the Ethernet CRC. */ 119 The RTL chips use a 64 element hash table based on the Ethernet CRC. */
120static int multicast_filter_limit = 32; 120static const int multicast_filter_limit = 32;
121 121
122/* MAC address length */ 122/* MAC address length */
123#define MAC_ADDR_LEN 6 123#define MAC_ADDR_LEN 6
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 0db218c2dbeb..99ce70dfe9c8 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -223,7 +223,7 @@ static void s2io_vlan_rx_kill_vid(struct net_device *dev, unsigned long vid)
223#define SWITCH_SIGN 0xA5A5A5A5A5A5A5A5ULL 223#define SWITCH_SIGN 0xA5A5A5A5A5A5A5A5ULL
224#define END_SIGN 0x0 224#define END_SIGN 0x0
225 225
226static u64 herc_act_dtx_cfg[] = { 226static const u64 herc_act_dtx_cfg[] = {
227 /* Set address */ 227 /* Set address */
228 0x8000051536750000ULL, 0x80000515367500E0ULL, 228 0x8000051536750000ULL, 0x80000515367500E0ULL,
229 /* Write data */ 229 /* Write data */
@@ -244,7 +244,7 @@ static u64 herc_act_dtx_cfg[] = {
244 END_SIGN 244 END_SIGN
245}; 245};
246 246
247static u64 xena_mdio_cfg[] = { 247static const u64 xena_mdio_cfg[] = {
248 /* Reset PMA PLL */ 248 /* Reset PMA PLL */
249 0xC001010000000000ULL, 0xC0010100000000E0ULL, 249 0xC001010000000000ULL, 0xC0010100000000E0ULL,
250 0xC0010100008000E4ULL, 250 0xC0010100008000E4ULL,
@@ -254,7 +254,7 @@ static u64 xena_mdio_cfg[] = {
254 END_SIGN 254 END_SIGN
255}; 255};
256 256
257static u64 xena_dtx_cfg[] = { 257static const u64 xena_dtx_cfg[] = {
258 0x8000051500000000ULL, 0x80000515000000E0ULL, 258 0x8000051500000000ULL, 0x80000515000000E0ULL,
259 0x80000515D93500E4ULL, 0x8001051500000000ULL, 259 0x80000515D93500E4ULL, 0x8001051500000000ULL,
260 0x80010515000000E0ULL, 0x80010515001E00E4ULL, 260 0x80010515000000E0ULL, 0x80010515001E00E4ULL,
@@ -282,7 +282,7 @@ static u64 xena_dtx_cfg[] = {
282 * Constants for Fixing the MacAddress problem seen mostly on 282 * Constants for Fixing the MacAddress problem seen mostly on
283 * Alpha machines. 283 * Alpha machines.
284 */ 284 */
285static u64 fix_mac[] = { 285static const u64 fix_mac[] = {
286 0x0060000000000000ULL, 0x0060600000000000ULL, 286 0x0060000000000000ULL, 0x0060600000000000ULL,
287 0x0040600000000000ULL, 0x0000600000000000ULL, 287 0x0040600000000000ULL, 0x0000600000000000ULL,
288 0x0020600000000000ULL, 0x0060600000000000ULL, 288 0x0020600000000000ULL, 0x0060600000000000ULL,
diff --git a/drivers/net/sb1000.c b/drivers/net/sb1000.c
index 76139478c3df..66cf226c4ee3 100644
--- a/drivers/net/sb1000.c
+++ b/drivers/net/sb1000.c
@@ -59,7 +59,7 @@ static char version[] = "sb1000.c:v1.1.2 6/01/98 (fventuri@mediaone.net)\n";
59#ifdef SB1000_DEBUG 59#ifdef SB1000_DEBUG
60static int sb1000_debug = SB1000_DEBUG; 60static int sb1000_debug = SB1000_DEBUG;
61#else 61#else
62static int sb1000_debug = 1; 62static const int sb1000_debug = 1;
63#endif 63#endif
64 64
65static const int SB1000_IO_EXTENT = 8; 65static const int SB1000_IO_EXTENT = 8;
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
index ed4bc91638d2..31dd3f036fa8 100644
--- a/drivers/net/sis190.c
+++ b/drivers/net/sis190.c
@@ -366,7 +366,7 @@ static const u32 sis190_intr_mask =
366 * Maximum number of multicast addresses to filter (vs. Rx-all-multicast). 366 * Maximum number of multicast addresses to filter (vs. Rx-all-multicast).
367 * The chips use a 64 element hash table based on the Ethernet CRC. 367 * The chips use a 64 element hash table based on the Ethernet CRC.
368 */ 368 */
369static int multicast_filter_limit = 32; 369static const int multicast_filter_limit = 32;
370 370
371static void __mdio_cmd(void __iomem *ioaddr, u32 ctl) 371static void __mdio_cmd(void __iomem *ioaddr, u32 ctl)
372{ 372{
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c
index 7a952fe60be2..a1cb07cdb60f 100644
--- a/drivers/net/sis900.c
+++ b/drivers/net/sis900.c
@@ -100,7 +100,7 @@ enum {
100 SIS_900 = 0, 100 SIS_900 = 0,
101 SIS_7016 101 SIS_7016
102}; 102};
103static char * card_names[] = { 103static const char * card_names[] = {
104 "SiS 900 PCI Fast Ethernet", 104 "SiS 900 PCI Fast Ethernet",
105 "SiS 7016 PCI Fast Ethernet" 105 "SiS 7016 PCI Fast Ethernet"
106}; 106};
@@ -115,7 +115,7 @@ MODULE_DEVICE_TABLE (pci, sis900_pci_tbl);
115 115
116static void sis900_read_mode(struct net_device *net_dev, int *speed, int *duplex); 116static void sis900_read_mode(struct net_device *net_dev, int *speed, int *duplex);
117 117
118static struct mii_chip_info { 118static const struct mii_chip_info {
119 const char * name; 119 const char * name;
120 u16 phy_id0; 120 u16 phy_id0;
121 u16 phy_id1; 121 u16 phy_id1;
@@ -400,7 +400,7 @@ static int __devinit sis900_probe(struct pci_dev *pci_dev,
400 void *ring_space; 400 void *ring_space;
401 long ioaddr; 401 long ioaddr;
402 int i, ret; 402 int i, ret;
403 char *card_name = card_names[pci_id->driver_data]; 403 const char *card_name = card_names[pci_id->driver_data];
404 const char *dev_name = pci_name(pci_dev); 404 const char *dev_name = pci_name(pci_dev);
405 405
406/* when built into the kernel, we only print version if device is found */ 406/* when built into the kernel, we only print version if device is found */
@@ -1275,7 +1275,7 @@ static void sis900_timer(unsigned long data)
1275 struct net_device *net_dev = (struct net_device *)data; 1275 struct net_device *net_dev = (struct net_device *)data;
1276 struct sis900_private *sis_priv = net_dev->priv; 1276 struct sis900_private *sis_priv = net_dev->priv;
1277 struct mii_phy *mii_phy = sis_priv->mii; 1277 struct mii_phy *mii_phy = sis_priv->mii;
1278 static int next_tick = 5*HZ; 1278 static const int next_tick = 5*HZ;
1279 u16 status; 1279 u16 status;
1280 1280
1281 if (!sis_priv->autong_complete){ 1281 if (!sis_priv->autong_complete){
diff --git a/drivers/net/skfp/fplustm.c b/drivers/net/skfp/fplustm.c
index a2ed47f1cc70..a4b2b6975d6c 100644
--- a/drivers/net/skfp/fplustm.c
+++ b/drivers/net/skfp/fplustm.c
@@ -89,21 +89,21 @@ static const u_short my_sagp = 0xffff ; /* short group address (n.u.) */
89/* 89/*
90 * useful interrupt bits 90 * useful interrupt bits
91 */ 91 */
92static int mac_imsk1u = FM_STXABRS | FM_STXABRA0 | FM_SXMTABT ; 92static const int mac_imsk1u = FM_STXABRS | FM_STXABRA0 | FM_SXMTABT ;
93static int mac_imsk1l = FM_SQLCKS | FM_SQLCKA0 | FM_SPCEPDS | FM_SPCEPDA0| 93static const int mac_imsk1l = FM_SQLCKS | FM_SQLCKA0 | FM_SPCEPDS | FM_SPCEPDA0|
94 FM_STBURS | FM_STBURA0 ; 94 FM_STBURS | FM_STBURA0 ;
95 95
96 /* delete FM_SRBFL after tests */ 96 /* delete FM_SRBFL after tests */
97static int mac_imsk2u = FM_SERRSF | FM_SNFSLD | FM_SRCVOVR | FM_SRBFL | 97static const int mac_imsk2u = FM_SERRSF | FM_SNFSLD | FM_SRCVOVR | FM_SRBFL |
98 FM_SMYCLM ; 98 FM_SMYCLM ;
99static int mac_imsk2l = FM_STRTEXR | FM_SDUPCLM | FM_SFRMCTR | 99static const int mac_imsk2l = FM_STRTEXR | FM_SDUPCLM | FM_SFRMCTR |
100 FM_SERRCTR | FM_SLSTCTR | 100 FM_SERRCTR | FM_SLSTCTR |
101 FM_STRTEXP | FM_SMULTDA | FM_SRNGOP ; 101 FM_STRTEXP | FM_SMULTDA | FM_SRNGOP ;
102 102
103static int mac_imsk3u = FM_SRCVOVR2 | FM_SRBFL2 ; 103static const int mac_imsk3u = FM_SRCVOVR2 | FM_SRBFL2 ;
104static int mac_imsk3l = FM_SRPERRQ2 | FM_SRPERRQ1 ; 104static const int mac_imsk3l = FM_SRPERRQ2 | FM_SRPERRQ1 ;
105 105
106static int mac_beacon_imsk2u = FM_SOTRBEC | FM_SMYBEC | FM_SBEC | 106static const int mac_beacon_imsk2u = FM_SOTRBEC | FM_SMYBEC | FM_SBEC |
107 FM_SLOCLM | FM_SHICLM | FM_SMYCLM | FM_SCLM ; 107 FM_SLOCLM | FM_SHICLM | FM_SMYCLM | FM_SCLM ;
108 108
109 109
diff --git a/drivers/net/skfp/pcmplc.c b/drivers/net/skfp/pcmplc.c
index cd0aa4c151b0..74e129f3ce92 100644
--- a/drivers/net/skfp/pcmplc.c
+++ b/drivers/net/skfp/pcmplc.c
@@ -186,7 +186,7 @@ static const struct plt {
186 * Do we need the EBUF error during signaling, too, to detect SUPERNET_3 186 * Do we need the EBUF error during signaling, too, to detect SUPERNET_3
187 * PLL bug? 187 * PLL bug?
188 */ 188 */
189static int plc_imsk_na = PL_PCM_CODE | PL_TRACE_PROP | PL_PCM_BREAK | 189static const int plc_imsk_na = PL_PCM_CODE | PL_TRACE_PROP | PL_PCM_BREAK |
190 PL_PCM_ENABLED | PL_SELF_TEST | PL_EBUF_ERR; 190 PL_PCM_ENABLED | PL_SELF_TEST | PL_EBUF_ERR;
191#else /* SUPERNET_3 */ 191#else /* SUPERNET_3 */
192/* 192/*
@@ -195,7 +195,7 @@ static int plc_imsk_na = PL_PCM_CODE | PL_TRACE_PROP | PL_PCM_BREAK |
195static int plc_imsk_na = PL_PCM_CODE | PL_TRACE_PROP | PL_PCM_BREAK | 195static int plc_imsk_na = PL_PCM_CODE | PL_TRACE_PROP | PL_PCM_BREAK |
196 PL_PCM_ENABLED | PL_SELF_TEST ; 196 PL_PCM_ENABLED | PL_SELF_TEST ;
197#endif /* SUPERNET_3 */ 197#endif /* SUPERNET_3 */
198static int plc_imsk_act = PL_PCM_CODE | PL_TRACE_PROP | PL_PCM_BREAK | 198static const int plc_imsk_act = PL_PCM_CODE | PL_TRACE_PROP | PL_PCM_BREAK |
199 PL_PCM_ENABLED | PL_SELF_TEST | PL_EBUF_ERR; 199 PL_PCM_ENABLED | PL_SELF_TEST | PL_EBUF_ERR;
200 200
201/* external functions */ 201/* external functions */
diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c
index 4b5ed2c63177..c7fb6133047e 100644
--- a/drivers/net/skfp/skfddi.c
+++ b/drivers/net/skfp/skfddi.c
@@ -67,7 +67,7 @@
67/* each new release!!! */ 67/* each new release!!! */
68#define VERSION "2.07" 68#define VERSION "2.07"
69 69
70static const char *boot_msg = 70static const char * const boot_msg =
71 "SysKonnect FDDI PCI Adapter driver v" VERSION " for\n" 71 "SysKonnect FDDI PCI Adapter driver v" VERSION " for\n"
72 " SK-55xx/SK-58xx adapters (SK-NET FDDI-FP/UP/LP)"; 72 " SK-55xx/SK-58xx adapters (SK-NET FDDI-FP/UP/LP)";
73 73
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c
index ed5458c45446..35b18057fbdd 100644
--- a/drivers/net/starfire.c
+++ b/drivers/net/starfire.c
@@ -201,7 +201,7 @@ static int max_interrupt_work = 20;
201static int mtu; 201static int mtu;
202/* Maximum number of multicast addresses to filter (vs. rx-all-multicast). 202/* Maximum number of multicast addresses to filter (vs. rx-all-multicast).
203 The Starfire has a 512 element hash table based on the Ethernet CRC. */ 203 The Starfire has a 512 element hash table based on the Ethernet CRC. */
204static int multicast_filter_limit = 512; 204static const int multicast_filter_limit = 512;
205/* Whether to do TCP/UDP checksums in hardware */ 205/* Whether to do TCP/UDP checksums in hardware */
206static int enable_hw_cksum = 1; 206static int enable_hw_cksum = 1;
207 207
@@ -463,7 +463,7 @@ static struct pci_device_id starfire_pci_tbl[] = {
463MODULE_DEVICE_TABLE(pci, starfire_pci_tbl); 463MODULE_DEVICE_TABLE(pci, starfire_pci_tbl);
464 464
465/* A chip capabilities table, matching the CH_xxx entries in xxx_pci_tbl[] above. */ 465/* A chip capabilities table, matching the CH_xxx entries in xxx_pci_tbl[] above. */
466static struct chip_info { 466static const struct chip_info {
467 const char *name; 467 const char *name;
468 int drv_flags; 468 int drv_flags;
469} netdrv_tbl[] __devinitdata = { 469} netdrv_tbl[] __devinitdata = {
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
index 8cdeb5cbab5b..61eec46cb111 100644
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -106,7 +106,7 @@
106static int debug = 1; /* 1 normal messages, 0 quiet .. 7 verbose. */ 106static int debug = 1; /* 1 normal messages, 0 quiet .. 7 verbose. */
107/* Maximum number of multicast addresses to filter (vs. rx-all-multicast). 107/* Maximum number of multicast addresses to filter (vs. rx-all-multicast).
108 Typical is a 64 element hash table based on the Ethernet CRC. */ 108 Typical is a 64 element hash table based on the Ethernet CRC. */
109static int multicast_filter_limit = 32; 109static const int multicast_filter_limit = 32;
110 110
111/* Set the copy breakpoint for the copy-only-tiny-frames scheme. 111/* Set the copy breakpoint for the copy-only-tiny-frames scheme.
112 Setting to > 1518 effectively disables this feature. 112 Setting to > 1518 effectively disables this feature.
@@ -298,7 +298,7 @@ enum {
298struct pci_id_info { 298struct pci_id_info {
299 const char *name; 299 const char *name;
300}; 300};
301static struct pci_id_info pci_id_tbl[] = { 301static const struct pci_id_info pci_id_tbl[] = {
302 {"D-Link DFE-550TX FAST Ethernet Adapter"}, 302 {"D-Link DFE-550TX FAST Ethernet Adapter"},
303 {"D-Link DFE-550FX 100Mbps Fiber-optics Adapter"}, 303 {"D-Link DFE-550FX 100Mbps Fiber-optics Adapter"},
304 {"D-Link DFE-580TX 4 port Server Adapter"}, 304 {"D-Link DFE-580TX 4 port Server Adapter"},
diff --git a/drivers/net/sungem_phy.c b/drivers/net/sungem_phy.c
index d3ddb41d6e5c..cb0aba95d4e3 100644
--- a/drivers/net/sungem_phy.c
+++ b/drivers/net/sungem_phy.c
@@ -39,7 +39,7 @@
39#include "sungem_phy.h" 39#include "sungem_phy.h"
40 40
41/* Link modes of the BCM5400 PHY */ 41/* Link modes of the BCM5400 PHY */
42static int phy_BCM5400_link_table[8][3] = { 42static const int phy_BCM5400_link_table[8][3] = {
43 { 0, 0, 0 }, /* No link */ 43 { 0, 0, 0 }, /* No link */
44 { 0, 0, 0 }, /* 10BT Half Duplex */ 44 { 0, 0, 0 }, /* 10BT Half Duplex */
45 { 1, 0, 0 }, /* 10BT Full Duplex */ 45 { 1, 0, 0 }, /* 10BT Full Duplex */
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index e8e92c853e89..83ff5994a8d5 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -7785,7 +7785,7 @@ static int tg3_test_link(struct tg3 *tp)
7785} 7785}
7786 7786
7787/* Only test the commonly used registers */ 7787/* Only test the commonly used registers */
7788static int tg3_test_registers(struct tg3 *tp) 7788static const int tg3_test_registers(struct tg3 *tp)
7789{ 7789{
7790 int i, is_5705; 7790 int i, is_5705;
7791 u32 offset, read_mask, write_mask, val, save_val, read_val; 7791 u32 offset, read_mask, write_mask, val, save_val, read_val;
@@ -7999,7 +7999,7 @@ out:
7999 7999
8000static int tg3_do_mem_test(struct tg3 *tp, u32 offset, u32 len) 8000static int tg3_do_mem_test(struct tg3 *tp, u32 offset, u32 len)
8001{ 8001{
8002 static u32 test_pattern[] = { 0x00000000, 0xffffffff, 0xaa55a55a }; 8002 static const u32 test_pattern[] = { 0x00000000, 0xffffffff, 0xaa55a55a };
8003 int i; 8003 int i;
8004 u32 j; 8004 u32 j;
8005 8005
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c
index 4c76cb794bfb..cde35dd87906 100644
--- a/drivers/net/typhoon.c
+++ b/drivers/net/typhoon.c
@@ -178,7 +178,7 @@ enum typhoon_cards {
178}; 178};
179 179
180/* directly indexed by enum typhoon_cards, above */ 180/* directly indexed by enum typhoon_cards, above */
181static struct typhoon_card_info typhoon_card_info[] __devinitdata = { 181static const struct typhoon_card_info typhoon_card_info[] __devinitdata = {
182 { "3Com Typhoon (3C990-TX)", 182 { "3Com Typhoon (3C990-TX)",
183 TYPHOON_CRYPTO_NONE}, 183 TYPHOON_CRYPTO_NONE},
184 { "3Com Typhoon (3CR990-TX-95)", 184 { "3Com Typhoon (3CR990-TX-95)",
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index 8bc0b528548f..f8f4503475f9 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -877,7 +877,6 @@ static struct pcmcia_device_id hostap_cs_ids[] = {
877 PCMCIA_DEVICE_MANF_CARD(0x0101, 0x0777), 877 PCMCIA_DEVICE_MANF_CARD(0x0101, 0x0777),
878 PCMCIA_DEVICE_MANF_CARD(0x0126, 0x8000), 878 PCMCIA_DEVICE_MANF_CARD(0x0126, 0x8000),
879 PCMCIA_DEVICE_MANF_CARD(0x0138, 0x0002), 879 PCMCIA_DEVICE_MANF_CARD(0x0138, 0x0002),
880 PCMCIA_DEVICE_MANF_CARD(0x0156, 0x0002),
881 PCMCIA_DEVICE_MANF_CARD(0x0250, 0x0002), 880 PCMCIA_DEVICE_MANF_CARD(0x0250, 0x0002),
882 PCMCIA_DEVICE_MANF_CARD(0x026f, 0x030b), 881 PCMCIA_DEVICE_MANF_CARD(0x026f, 0x030b),
883 PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1612), 882 PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1612),
@@ -891,6 +890,10 @@ static struct pcmcia_device_id hostap_cs_ids[] = {
891 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0002), 890 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0002),
892 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0005), 891 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0005),
893 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0010), 892 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0010),
893 PCMCIA_DEVICE_MANF_CARD_PROD_ID1(0x0156, 0x0002, "INTERSIL",
894 0x74c5e40d),
895 PCMCIA_DEVICE_MANF_CARD_PROD_ID1(0x0156, 0x0002, "Intersil",
896 0x4b801a17),
894 PCMCIA_MFC_DEVICE_PROD_ID12(0, "SanDisk", "ConnectPlus", 897 PCMCIA_MFC_DEVICE_PROD_ID12(0, "SanDisk", "ConnectPlus",
895 0x7a954bd9, 0x74be00c6), 898 0x7a954bd9, 0x74be00c6),
896 PCMCIA_DEVICE_PROD_ID1234( 899 PCMCIA_DEVICE_PROD_ID1234(
diff --git a/drivers/net/yellowfin.c b/drivers/net/yellowfin.c
index 1c2506535f7e..75d56bfef0ee 100644
--- a/drivers/net/yellowfin.c
+++ b/drivers/net/yellowfin.c
@@ -69,8 +69,8 @@ static int fifo_cfg = 0x0020; /* Bypass external Tx FIFO. */
69static int dma_ctrl = 0x00CAC277; /* Override when loading module! */ 69static int dma_ctrl = 0x00CAC277; /* Override when loading module! */
70static int fifo_cfg = 0x0028; 70static int fifo_cfg = 0x0028;
71#else 71#else
72static int dma_ctrl = 0x004A0263; /* Constrained by errata */ 72static const int dma_ctrl = 0x004A0263; /* Constrained by errata */
73static int fifo_cfg = 0x0020; /* Bypass external Tx FIFO. */ 73static const int fifo_cfg = 0x0020; /* Bypass external Tx FIFO. */
74#endif 74#endif
75 75
76/* Set the copy breakpoint for the copy-only-tiny-frames scheme. 76/* Set the copy breakpoint for the copy-only-tiny-frames scheme.
@@ -266,7 +266,7 @@ struct pci_id_info {
266 int drv_flags; /* Driver use, intended as capability flags. */ 266 int drv_flags; /* Driver use, intended as capability flags. */
267}; 267};
268 268
269static struct pci_id_info pci_id_tbl[] = { 269static const struct pci_id_info pci_id_tbl[] = {
270 {"Yellowfin G-NIC Gigabit Ethernet", { 0x07021000, 0xffffffff}, 270 {"Yellowfin G-NIC Gigabit Ethernet", { 0x07021000, 0xffffffff},
271 PCI_IOTYPE, YELLOWFIN_SIZE, 271 PCI_IOTYPE, YELLOWFIN_SIZE,
272 FullTxStatus | IsGigabit | HasMulticastBug | HasMACAddrBug | DontUseEeprom}, 272 FullTxStatus | IsGigabit | HasMulticastBug | HasMACAddrBug | DontUseEeprom},
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 0a424a4e8187..54ad93daca3c 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -352,11 +352,20 @@ static void pcmcia_release_dev(struct device *dev)
352 kfree(p_dev); 352 kfree(p_dev);
353} 353}
354 354
355static void pcmcia_add_pseudo_device(struct pcmcia_socket *s)
356{
357 if (!s->pcmcia_state.device_add_pending) {
358 s->pcmcia_state.device_add_pending = 1;
359 schedule_work(&s->device_add);
360 }
361 return;
362}
355 363
356static int pcmcia_device_probe(struct device * dev) 364static int pcmcia_device_probe(struct device * dev)
357{ 365{
358 struct pcmcia_device *p_dev; 366 struct pcmcia_device *p_dev;
359 struct pcmcia_driver *p_drv; 367 struct pcmcia_driver *p_drv;
368 struct pcmcia_device_id *did;
360 struct pcmcia_socket *s; 369 struct pcmcia_socket *s;
361 int ret = 0; 370 int ret = 0;
362 371
@@ -392,6 +401,19 @@ static int pcmcia_device_probe(struct device * dev)
392 } 401 }
393 402
394 ret = p_drv->probe(p_dev); 403 ret = p_drv->probe(p_dev);
404 if (ret)
405 goto put_module;
406
407 /* handle pseudo multifunction devices:
408 * there are at most two pseudo multifunction devices.
409 * if we're matching against the first, schedule a
410 * call which will then check whether there are two
411 * pseudo devices, and if not, add the second one.
412 */
413 did = (struct pcmcia_device_id *) p_dev->dev.driver_data;
414 if ((did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) &&
415 (p_dev->socket->device_count == 1) && (p_dev->device_no == 0))
416 pcmcia_add_pseudo_device(p_dev->socket);
395 417
396 put_module: 418 put_module:
397 if (ret) 419 if (ret)
@@ -660,15 +682,6 @@ static void pcmcia_delayed_add_pseudo_device(void *data)
660 s->pcmcia_state.device_add_pending = 0; 682 s->pcmcia_state.device_add_pending = 0;
661} 683}
662 684
663static inline void pcmcia_add_pseudo_device(struct pcmcia_socket *s)
664{
665 if (!s->pcmcia_state.device_add_pending) {
666 s->pcmcia_state.device_add_pending = 1;
667 schedule_work(&s->device_add);
668 }
669 return;
670}
671
672static int pcmcia_requery(struct device *dev, void * _data) 685static int pcmcia_requery(struct device *dev, void * _data)
673{ 686{
674 struct pcmcia_device *p_dev = to_pcmcia_dev(dev); 687 struct pcmcia_device *p_dev = to_pcmcia_dev(dev);
@@ -755,15 +768,6 @@ static inline int pcmcia_devmatch(struct pcmcia_device *dev,
755 } 768 }
756 769
757 if (did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) { 770 if (did->match_flags & PCMCIA_DEV_ID_MATCH_DEVICE_NO) {
758 /* handle pseudo multifunction devices:
759 * there are at most two pseudo multifunction devices.
760 * if we're matching against the first, schedule a
761 * call which will then check whether there are two
762 * pseudo devices, and if not, add the second one.
763 */
764 if (dev->device_no == 0)
765 pcmcia_add_pseudo_device(dev->socket);
766
767 if (dev->device_no != did->device_no) 771 if (dev->device_no != did->device_no)
768 return 0; 772 return 0;
769 } 773 }
diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c
index cb2ee25f213f..531a1f9ceb51 100644
--- a/drivers/scsi/aha152x.c
+++ b/drivers/scsi/aha152x.c
@@ -1260,16 +1260,15 @@ static void free_hard_reset_SCs(struct Scsi_Host *shpnt, Scsi_Cmnd **SCs)
1260 * Reset the bus 1260 * Reset the bus
1261 * 1261 *
1262 */ 1262 */
1263static int aha152x_bus_reset(Scsi_Cmnd *SCpnt) 1263static int aha152x_bus_reset_host(struct Scsi_Host *shpnt)
1264{ 1264{
1265 struct Scsi_Host *shpnt = SCpnt->device->host;
1266 unsigned long flags; 1265 unsigned long flags;
1267 1266
1268 DO_LOCK(flags); 1267 DO_LOCK(flags);
1269 1268
1270#if defined(AHA152X_DEBUG) 1269#if defined(AHA152X_DEBUG)
1271 if(HOSTDATA(shpnt)->debug & debug_eh) { 1270 if(HOSTDATA(shpnt)->debug & debug_eh) {
1272 printk(DEBUG_LEAD "aha152x_bus_reset(%p)", CMDINFO(SCpnt), SCpnt); 1271 printk(KERN_DEBUG "scsi%d: bus reset", shpnt->host_no);
1273 show_queues(shpnt); 1272 show_queues(shpnt);
1274 } 1273 }
1275#endif 1274#endif
@@ -1277,14 +1276,14 @@ static int aha152x_bus_reset(Scsi_Cmnd *SCpnt)
1277 free_hard_reset_SCs(shpnt, &ISSUE_SC); 1276 free_hard_reset_SCs(shpnt, &ISSUE_SC);
1278 free_hard_reset_SCs(shpnt, &DISCONNECTED_SC); 1277 free_hard_reset_SCs(shpnt, &DISCONNECTED_SC);
1279 1278
1280 DPRINTK(debug_eh, DEBUG_LEAD "resetting bus\n", CMDINFO(SCpnt)); 1279 DPRINTK(debug_eh, KERN_DEBUG "scsi%d: resetting bus\n", shpnt->host_no);
1281 1280
1282 SETPORT(SCSISEQ, SCSIRSTO); 1281 SETPORT(SCSISEQ, SCSIRSTO);
1283 mdelay(256); 1282 mdelay(256);
1284 SETPORT(SCSISEQ, 0); 1283 SETPORT(SCSISEQ, 0);
1285 mdelay(DELAY); 1284 mdelay(DELAY);
1286 1285
1287 DPRINTK(debug_eh, DEBUG_LEAD "bus resetted\n", CMDINFO(SCpnt)); 1286 DPRINTK(debug_eh, KERN_DEBUG "scsi%d: bus resetted\n", shpnt->host_no);
1288 1287
1289 setup_expected_interrupts(shpnt); 1288 setup_expected_interrupts(shpnt);
1290 if(HOSTDATA(shpnt)->commands==0) 1289 if(HOSTDATA(shpnt)->commands==0)
@@ -1295,6 +1294,14 @@ static int aha152x_bus_reset(Scsi_Cmnd *SCpnt)
1295 return SUCCESS; 1294 return SUCCESS;
1296} 1295}
1297 1296
1297/*
1298 * Reset the bus
1299 *
1300 */
1301static int aha152x_bus_reset(Scsi_Cmnd *SCpnt)
1302{
1303 return aha152x_bus_reset_host(SCpnt->device->host);
1304}
1298 1305
1299/* 1306/*
1300 * Restore default values to the AIC-6260 registers and reset the fifos 1307 * Restore default values to the AIC-6260 registers and reset the fifos
@@ -1337,23 +1344,28 @@ static void reset_ports(struct Scsi_Host *shpnt)
1337 * Reset the host (bus and controller) 1344 * Reset the host (bus and controller)
1338 * 1345 *
1339 */ 1346 */
1340int aha152x_host_reset(Scsi_Cmnd * SCpnt) 1347int aha152x_host_reset_host(struct Scsi_Host *shpnt)
1341{ 1348{
1342#if defined(AHA152X_DEBUG) 1349 DPRINTK(debug_eh, KERN_DEBUG "scsi%d: host reset\n", shpnt->host_no);
1343 struct Scsi_Host *shpnt = SCpnt->device->host;
1344#endif
1345
1346 DPRINTK(debug_eh, DEBUG_LEAD "aha152x_host_reset(%p)\n", CMDINFO(SCpnt), SCpnt);
1347 1350
1348 aha152x_bus_reset(SCpnt); 1351 aha152x_bus_reset_host(shpnt);
1349 1352
1350 DPRINTK(debug_eh, DEBUG_LEAD "resetting ports\n", CMDINFO(SCpnt)); 1353 DPRINTK(debug_eh, KERN_DEBUG "scsi%d: resetting ports\n", shpnt->host_no);
1351 reset_ports(SCpnt->device->host); 1354 reset_ports(shpnt);
1352 1355
1353 return SUCCESS; 1356 return SUCCESS;
1354} 1357}
1355 1358
1356/* 1359/*
1360 * Reset the host (bus and controller)
1361 *
1362 */
1363static int aha152x_host_reset(Scsi_Cmnd *SCpnt)
1364{
1365 return aha152x_host_reset_host(SCpnt->device->host);
1366}
1367
1368/*
1357 * Return the "logical geometry" 1369 * Return the "logical geometry"
1358 * 1370 *
1359 */ 1371 */
@@ -1431,22 +1443,18 @@ static void run(void)
1431{ 1443{
1432 int i; 1444 int i;
1433 for (i = 0; i<ARRAY_SIZE(aha152x_host); i++) { 1445 for (i = 0; i<ARRAY_SIZE(aha152x_host); i++) {
1434 struct Scsi_Host *shpnt = aha152x_host[i]; 1446 is_complete(aha152x_host[i]);
1435 if (shpnt && HOSTDATA(shpnt)->service) {
1436 HOSTDATA(shpnt)->service=0;
1437 is_complete(shpnt);
1438 }
1439 } 1447 }
1440} 1448}
1441 1449
1442/* 1450/*
1443 * Interrupts handler 1451 * Interrupt handler
1444 * 1452 *
1445 */ 1453 */
1446
1447static irqreturn_t intr(int irqno, void *dev_id, struct pt_regs *regs) 1454static irqreturn_t intr(int irqno, void *dev_id, struct pt_regs *regs)
1448{ 1455{
1449 struct Scsi_Host *shpnt = lookup_irq(irqno); 1456 struct Scsi_Host *shpnt = lookup_irq(irqno);
1457 unsigned long flags;
1450 unsigned char rev, dmacntrl0; 1458 unsigned char rev, dmacntrl0;
1451 1459
1452 if (!shpnt) { 1460 if (!shpnt) {
@@ -1472,23 +1480,23 @@ static irqreturn_t intr(int irqno, void *dev_id, struct pt_regs *regs)
1472 if ((rev == 0xFF) && (dmacntrl0 == 0xFF)) 1480 if ((rev == 0xFF) && (dmacntrl0 == 0xFF))
1473 return IRQ_NONE; 1481 return IRQ_NONE;
1474 1482
1483 if( TESTLO(DMASTAT, INTSTAT) )
1484 return IRQ_NONE;
1485
1475 /* no more interrupts from the controller, while we're busy. 1486 /* no more interrupts from the controller, while we're busy.
1476 INTEN is restored by the BH handler */ 1487 INTEN is restored by the BH handler */
1477 CLRBITS(DMACNTRL0, INTEN); 1488 CLRBITS(DMACNTRL0, INTEN);
1478 1489
1479#if 0 1490 DO_LOCK(flags);
1480 /* check if there is already something to be 1491 if( HOSTDATA(shpnt)->service==0 ) {
1481 serviced; should not happen */ 1492 HOSTDATA(shpnt)->service=1;
1482 if(HOSTDATA(shpnt)->service) { 1493
1483 printk(KERN_ERR "aha152x%d: lost interrupt (%d)\n", HOSTNO, HOSTDATA(shpnt)->service); 1494 /* Poke the BH handler */
1484 show_queues(shpnt); 1495 INIT_WORK(&aha152x_tq, (void *) run, NULL);
1496 schedule_work(&aha152x_tq);
1485 } 1497 }
1486#endif 1498 DO_UNLOCK(flags);
1487 1499
1488 /* Poke the BH handler */
1489 HOSTDATA(shpnt)->service++;
1490 INIT_WORK(&aha152x_tq, (void *) run, NULL);
1491 schedule_work(&aha152x_tq);
1492 return IRQ_HANDLED; 1500 return IRQ_HANDLED;
1493} 1501}
1494 1502
@@ -2527,7 +2535,18 @@ static void is_complete(struct Scsi_Host *shpnt)
2527 unsigned long flags; 2535 unsigned long flags;
2528 int pending; 2536 int pending;
2529 2537
2538 if(!shpnt)
2539 return;
2540
2530 DO_LOCK(flags); 2541 DO_LOCK(flags);
2542
2543 if( HOSTDATA(shpnt)->service==0 ) {
2544 DO_UNLOCK(flags);
2545 return;
2546 }
2547
2548 HOSTDATA(shpnt)->service = 0;
2549
2531 if(HOSTDATA(shpnt)->in_intr) { 2550 if(HOSTDATA(shpnt)->in_intr) {
2532 DO_UNLOCK(flags); 2551 DO_UNLOCK(flags);
2533 /* aha152x_error never returns.. */ 2552 /* aha152x_error never returns.. */
diff --git a/drivers/scsi/aha152x.h b/drivers/scsi/aha152x.h
index d277613af29b..d2add24d02a3 100644
--- a/drivers/scsi/aha152x.h
+++ b/drivers/scsi/aha152x.h
@@ -332,6 +332,6 @@ struct aha152x_setup {
332 332
333struct Scsi_Host *aha152x_probe_one(struct aha152x_setup *); 333struct Scsi_Host *aha152x_probe_one(struct aha152x_setup *);
334void aha152x_release(struct Scsi_Host *); 334void aha152x_release(struct Scsi_Host *);
335int aha152x_host_reset(Scsi_Cmnd *); 335int aha152x_host_reset_host(struct Scsi_Host *);
336 336
337#endif /* _AHA152X_H */ 337#endif /* _AHA152X_H */
diff --git a/drivers/scsi/jazz_esp.c b/drivers/scsi/jazz_esp.c
index 23728d1c980c..fcd304e11c26 100644
--- a/drivers/scsi/jazz_esp.c
+++ b/drivers/scsi/jazz_esp.c
@@ -65,27 +65,6 @@ static int jazz_esp_release(struct Scsi_Host *shost)
65 return 0; 65 return 0;
66} 66}
67 67
68static struct scsi_host_template driver_template = {
69 .proc_name = "jazz_esp",
70 .proc_info = &esp_proc_info,
71 .name = "ESP 100/100a/200",
72 .detect = jazz_esp_detect,
73 .slave_alloc = esp_slave_alloc,
74 .slave_destroy = esp_slave_destroy,
75 .release = jazz_esp_release,
76 .info = esp_info,
77 .queuecommand = esp_queue,
78 .eh_abort_handler = esp_abort,
79 .eh_bus_reset_handler = esp_reset,
80 .can_queue = 7,
81 .this_id = 7,
82 .sg_tablesize = SG_ALL,
83 .cmd_per_lun = 1,
84 .use_clustering = DISABLE_CLUSTERING,
85};
86
87#include "scsi_module.c"
88
89/***************************************************************** Detection */ 68/***************************************************************** Detection */
90static int jazz_esp_detect(struct scsi_host_template *tpnt) 69static int jazz_esp_detect(struct scsi_host_template *tpnt)
91{ 70{
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c
index 7de267e14458..4f39dd01936d 100644
--- a/drivers/scsi/megaraid/megaraid_sas.c
+++ b/drivers/scsi/megaraid/megaraid_sas.c
@@ -793,6 +793,20 @@ megasas_queue_command(struct scsi_cmnd *scmd, void (*done) (struct scsi_cmnd *))
793 return 0; 793 return 0;
794} 794}
795 795
796static int megasas_slave_configure(struct scsi_device *sdev)
797{
798 /*
799 * Don't export physical disk devices to the disk driver.
800 *
801 * FIXME: Currently we don't export them to the midlayer at all.
802 * That will be fixed once LSI engineers have audited the
803 * firmware for possible issues.
804 */
805 if (sdev->channel < MEGASAS_MAX_PD_CHANNELS && sdev->type == TYPE_DISK)
806 return -ENXIO;
807 return 0;
808}
809
796/** 810/**
797 * megasas_wait_for_outstanding - Wait for all outstanding cmds 811 * megasas_wait_for_outstanding - Wait for all outstanding cmds
798 * @instance: Adapter soft state 812 * @instance: Adapter soft state
@@ -943,6 +957,7 @@ static struct scsi_host_template megasas_template = {
943 .module = THIS_MODULE, 957 .module = THIS_MODULE,
944 .name = "LSI Logic SAS based MegaRAID driver", 958 .name = "LSI Logic SAS based MegaRAID driver",
945 .proc_name = "megaraid_sas", 959 .proc_name = "megaraid_sas",
960 .slave_configure = megasas_slave_configure,
946 .queuecommand = megasas_queue_command, 961 .queuecommand = megasas_queue_command,
947 .eh_device_reset_handler = megasas_reset_device, 962 .eh_device_reset_handler = megasas_reset_device,
948 .eh_bus_reset_handler = megasas_reset_bus_host, 963 .eh_bus_reset_handler = megasas_reset_bus_host,
@@ -1071,20 +1086,6 @@ megasas_complete_cmd(struct megasas_instance *instance, struct megasas_cmd *cmd,
1071 break; 1086 break;
1072 } 1087 }
1073 1088
1074 /*
1075 * Don't export physical disk devices to mid-layer.
1076 */
1077 if (!MEGASAS_IS_LOGICAL(cmd->scmd) &&
1078 (hdr->cmd_status == MFI_STAT_OK) &&
1079 (cmd->scmd->cmnd[0] == INQUIRY)) {
1080
1081 if (((*(u8 *) cmd->scmd->request_buffer) & 0x1F) ==
1082 TYPE_DISK) {
1083 cmd->scmd->result = DID_BAD_TARGET << 16;
1084 exception = 1;
1085 }
1086 }
1087
1088 case MFI_CMD_LD_READ: 1089 case MFI_CMD_LD_READ:
1089 case MFI_CMD_LD_WRITE: 1090 case MFI_CMD_LD_WRITE:
1090 1091
diff --git a/drivers/scsi/pcmcia/aha152x_stub.c b/drivers/scsi/pcmcia/aha152x_stub.c
index 0c9edb7051f4..5609847e254a 100644
--- a/drivers/scsi/pcmcia/aha152x_stub.c
+++ b/drivers/scsi/pcmcia/aha152x_stub.c
@@ -275,10 +275,8 @@ static int aha152x_resume(struct pcmcia_device *dev)
275 275
276 link->state &= ~DEV_SUSPEND; 276 link->state &= ~DEV_SUSPEND;
277 if (link->state & DEV_CONFIG) { 277 if (link->state & DEV_CONFIG) {
278 Scsi_Cmnd tmp;
279 pcmcia_request_configuration(link->handle, &link->conf); 278 pcmcia_request_configuration(link->handle, &link->conf);
280 tmp.device->host = info->host; 279 aha152x_host_reset_host(info->host);
281 aha152x_host_reset(&tmp);
282 } 280 }
283 281
284 return 0; 282 return 0;
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 5cc97b721661..ff82ccfbb106 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -1308,7 +1308,7 @@ int scsi_decide_disposition(struct scsi_cmnd *scmd)
1308 * the request was not marked fast fail. Note that above, 1308 * the request was not marked fast fail. Note that above,
1309 * even if the request is marked fast fail, we still requeue 1309 * even if the request is marked fast fail, we still requeue
1310 * for queue congestion conditions (QUEUE_FULL or BUSY) */ 1310 * for queue congestion conditions (QUEUE_FULL or BUSY) */
1311 if ((++scmd->retries) < scmd->allowed 1311 if ((++scmd->retries) <= scmd->allowed
1312 && !blk_noretry_request(scmd->request)) { 1312 && !blk_noretry_request(scmd->request)) {
1313 return NEEDS_RETRY; 1313 return NEEDS_RETRY;
1314 } else { 1314 } else {
@@ -1433,7 +1433,7 @@ static void scsi_eh_flush_done_q(struct list_head *done_q)
1433 list_del_init(&scmd->eh_entry); 1433 list_del_init(&scmd->eh_entry);
1434 if (scsi_device_online(scmd->device) && 1434 if (scsi_device_online(scmd->device) &&
1435 !blk_noretry_request(scmd->request) && 1435 !blk_noretry_request(scmd->request) &&
1436 (++scmd->retries < scmd->allowed)) { 1436 (++scmd->retries <= scmd->allowed)) {
1437 SCSI_LOG_ERROR_RECOVERY(3, printk("%s: flush" 1437 SCSI_LOG_ERROR_RECOVERY(3, printk("%s: flush"
1438 " retry cmd: %p\n", 1438 " retry cmd: %p\n",
1439 current->comm, 1439 current->comm,
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 4362dcde74af..701a328f7beb 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1498,7 +1498,7 @@ static void scsi_kill_request(struct request *req, request_queue_t *q)
1498static void scsi_softirq_done(struct request *rq) 1498static void scsi_softirq_done(struct request *rq)
1499{ 1499{
1500 struct scsi_cmnd *cmd = rq->completion_data; 1500 struct scsi_cmnd *cmd = rq->completion_data;
1501 unsigned long wait_for = cmd->allowed * cmd->timeout_per_command; 1501 unsigned long wait_for = (cmd->allowed + 1) * cmd->timeout_per_command;
1502 int disposition; 1502 int disposition;
1503 1503
1504 INIT_LIST_HEAD(&cmd->eh_entry); 1504 INIT_LIST_HEAD(&cmd->eh_entry);
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 5acb83ca5ae5..f9ecc3dea7df 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -752,8 +752,20 @@ static int scsi_add_lun(struct scsi_device *sdev, char *inq_result, int *bflags)
752 752
753 transport_configure_device(&sdev->sdev_gendev); 753 transport_configure_device(&sdev->sdev_gendev);
754 754
755 if (sdev->host->hostt->slave_configure) 755 if (sdev->host->hostt->slave_configure) {
756 sdev->host->hostt->slave_configure(sdev); 756 int ret = sdev->host->hostt->slave_configure(sdev);
757 if (ret) {
758 /*
759 * if LLDD reports slave not present, don't clutter
760 * console with alloc failure messages
761 */
762 if (ret != -ENXIO) {
763 sdev_printk(KERN_ERR, sdev,
764 "failed to configure device\n");
765 }
766 return SCSI_SCAN_NO_RESPONSE;
767 }
768 }
757 769
758 /* 770 /*
759 * Ok, the device is now all set up, we can 771 * Ok, the device is now all set up, we can
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index f2c9acf11bd0..929032e370db 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -1498,8 +1498,7 @@ fc_remote_port_add(struct Scsi_Host *shost, int channel,
1498 } 1498 }
1499 1499
1500 /* Search the bindings array */ 1500 /* Search the bindings array */
1501 if (likely((ids->roles & FC_RPORT_ROLE_FCP_TARGET) && 1501 if (fc_host_tgtid_bind_type(shost) != FC_TGTID_BIND_NONE) {
1502 (fc_host_tgtid_bind_type(shost) != FC_TGTID_BIND_NONE))) {
1503 1502
1504 /* search for a matching consistent binding */ 1503 /* search for a matching consistent binding */
1505 1504
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 2a547538d444..5a0a19322d01 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -2162,7 +2162,7 @@ sg_link_reserve(Sg_fd * sfp, Sg_request * srp, int size)
2162 2162
2163 srp->res_used = 1; 2163 srp->res_used = 1;
2164 SCSI_LOG_TIMEOUT(4, printk("sg_link_reserve: size=%d\n", size)); 2164 SCSI_LOG_TIMEOUT(4, printk("sg_link_reserve: size=%d\n", size));
2165 rem = size = (size + 1) & (~1); /* round to even for aha1542 */ 2165 rem = size;
2166 2166
2167 for (k = 0; k < rsv_schp->k_use_sg; ++k, ++sg) { 2167 for (k = 0; k < rsv_schp->k_use_sg; ++k, ++sg) {
2168 num = sg->length; 2168 num = sg->length;
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c
index f4854c33f48d..2627000ca653 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
@@ -919,6 +919,8 @@ static int sym_prepare_setting(struct Scsi_Host *shost, struct sym_hcb *np, stru
919 919
920 tp->usrflags |= (SYM_DISC_ENABLED | SYM_TAGS_ENABLED); 920 tp->usrflags |= (SYM_DISC_ENABLED | SYM_TAGS_ENABLED);
921 tp->usrtags = SYM_SETUP_MAX_TAG; 921 tp->usrtags = SYM_SETUP_MAX_TAG;
922 tp->usr_width = np->maxwide;
923 tp->usr_period = 9;
922 924
923 sym_nvram_setup_target(tp, i, nvram); 925 sym_nvram_setup_target(tp, i, nvram);
924 926