aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-15 17:06:58 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-15 17:06:58 -0400
commita52cefc80fc92981592c688d1c8067442afe4cec (patch)
treead119b5a4f5e4a257779c0ef324b5c9354c915f1 /drivers/net
parentfba956c46a72f9e7503fd464ffee43c632307e31 (diff)
parent4acad72ded8e3f0211bd2a762e23c28229c61a51 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (42 commits) [IPV6]: Consolidate the ip6_pol_route_(input|output) pair [TCP]: Make snd_cwnd_cnt 32-bit [TCP]: Update the /proc/net/tcp documentation [NETNS]: Don't panic on creating the namespace's loopback [NEIGH]: Ensure that pneigh_lookup is protected with RTNL [INET]: kmalloc+memset -> kzalloc in frag_alloc_queue [ISDN]: Fix compile with CONFIG_ISDN_X25 disabled. [IPV6]: Replace sk_buff ** with sk_buff * in input handlers [SELINUX]: Update for netfilter ->hook() arg changes. [INET]: Consolidate the xxx_put [INET]: Small cleanup for xxx_put after evictor consolidation [INET]: Consolidate the xxx_evictor [INET]: Consolidate the xxx_frag_destroy [INET]: Consolidate xxx_the secret_rebuild [INET]: Consolidate the xxx_frag_kill [INET]: Collect common frag sysctl variables together [INET]: Collect frag queues management objects together [INET]: Move common fields from frag_queues in one place. [TG3]: Fix performance regression on 5705. [ISDN]: Remove local copy of device name to make sure renames work. ...
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/loopback.c11
-rw-r--r--drivers/net/niu.c19
-rw-r--r--drivers/net/tg3.c10
3 files changed, 22 insertions, 18 deletions
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index be25aa33971c..662b8d16803c 100644
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -265,17 +265,16 @@ static __net_init int loopback_net_init(struct net *net)
265 if (err) 265 if (err)
266 goto out_free_netdev; 266 goto out_free_netdev;
267 267
268 err = 0;
269 net->loopback_dev = dev; 268 net->loopback_dev = dev;
269 return 0;
270 270
271out:
272 if (err)
273 panic("loopback: Failed to register netdevice: %d\n", err);
274 return err;
275 271
276out_free_netdev: 272out_free_netdev:
277 free_netdev(dev); 273 free_netdev(dev);
278 goto out; 274out:
275 if (net == &init_net)
276 panic("loopback: Failed to register netdevice: %d\n", err);
277 return err;
279} 278}
280 279
281static __net_exit void loopback_net_exit(struct net *net) 280static __net_exit void loopback_net_exit(struct net *net)
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 43bfe7e6b6f5..ed1f9bbb2a32 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -6123,19 +6123,19 @@ static int __devinit niu_pci_probe_sprom(struct niu *np)
6123 val = nr64(ESPC_PHY_TYPE); 6123 val = nr64(ESPC_PHY_TYPE);
6124 switch (np->port) { 6124 switch (np->port) {
6125 case 0: 6125 case 0:
6126 val = (val & ESPC_PHY_TYPE_PORT0) >> 6126 val8 = (val & ESPC_PHY_TYPE_PORT0) >>
6127 ESPC_PHY_TYPE_PORT0_SHIFT; 6127 ESPC_PHY_TYPE_PORT0_SHIFT;
6128 break; 6128 break;
6129 case 1: 6129 case 1:
6130 val = (val & ESPC_PHY_TYPE_PORT1) >> 6130 val8 = (val & ESPC_PHY_TYPE_PORT1) >>
6131 ESPC_PHY_TYPE_PORT1_SHIFT; 6131 ESPC_PHY_TYPE_PORT1_SHIFT;
6132 break; 6132 break;
6133 case 2: 6133 case 2:
6134 val = (val & ESPC_PHY_TYPE_PORT2) >> 6134 val8 = (val & ESPC_PHY_TYPE_PORT2) >>
6135 ESPC_PHY_TYPE_PORT2_SHIFT; 6135 ESPC_PHY_TYPE_PORT2_SHIFT;
6136 break; 6136 break;
6137 case 3: 6137 case 3:
6138 val = (val & ESPC_PHY_TYPE_PORT3) >> 6138 val8 = (val & ESPC_PHY_TYPE_PORT3) >>
6139 ESPC_PHY_TYPE_PORT3_SHIFT; 6139 ESPC_PHY_TYPE_PORT3_SHIFT;
6140 break; 6140 break;
6141 default: 6141 default:
@@ -6143,9 +6143,9 @@ static int __devinit niu_pci_probe_sprom(struct niu *np)
6143 np->port); 6143 np->port);
6144 return -EINVAL; 6144 return -EINVAL;
6145 } 6145 }
6146 niudbg(PROBE, "SPROM: PHY type %llx\n", (unsigned long long) val); 6146 niudbg(PROBE, "SPROM: PHY type %x\n", val8);
6147 6147
6148 switch (val) { 6148 switch (val8) {
6149 case ESPC_PHY_TYPE_1G_COPPER: 6149 case ESPC_PHY_TYPE_1G_COPPER:
6150 /* 1G copper, MII */ 6150 /* 1G copper, MII */
6151 np->flags &= ~(NIU_FLAGS_FIBER | 6151 np->flags &= ~(NIU_FLAGS_FIBER |
@@ -6175,8 +6175,7 @@ static int __devinit niu_pci_probe_sprom(struct niu *np)
6175 break; 6175 break;
6176 6176
6177 default: 6177 default:
6178 dev_err(np->device, PFX "Bogus SPROM phy type %llu\n", 6178 dev_err(np->device, PFX "Bogus SPROM phy type %u\n", val8);
6179 (unsigned long long) val);
6180 return -EINVAL; 6179 return -EINVAL;
6181 } 6180 }
6182 6181
@@ -6213,7 +6212,7 @@ static int __devinit niu_pci_probe_sprom(struct niu *np)
6213 val = nr64(ESPC_MOD_STR_LEN); 6212 val = nr64(ESPC_MOD_STR_LEN);
6214 niudbg(PROBE, "SPROM: MOD_STR_LEN[%llu]\n", 6213 niudbg(PROBE, "SPROM: MOD_STR_LEN[%llu]\n",
6215 (unsigned long long) val); 6214 (unsigned long long) val);
6216 if (val > 8 * 4) 6215 if (val >= 8 * 4)
6217 return -EINVAL; 6216 return -EINVAL;
6218 6217
6219 for (i = 0; i < val; i += 4) { 6218 for (i = 0; i < val; i += 4) {
@@ -6229,7 +6228,7 @@ static int __devinit niu_pci_probe_sprom(struct niu *np)
6229 val = nr64(ESPC_BD_MOD_STR_LEN); 6228 val = nr64(ESPC_BD_MOD_STR_LEN);
6230 niudbg(PROBE, "SPROM: BD_MOD_STR_LEN[%llu]\n", 6229 niudbg(PROBE, "SPROM: BD_MOD_STR_LEN[%llu]\n",
6231 (unsigned long long) val); 6230 (unsigned long long) val);
6232 if (val > 4 * 4) 6231 if (val >= 4 * 4)
6233 return -EINVAL; 6232 return -EINVAL;
6234 6233
6235 for (i = 0; i < val; i += 4) { 6234 for (i = 0; i < val; i += 4) {
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 76efb3feffbf..014dc2cfe4d6 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -64,8 +64,8 @@
64 64
65#define DRV_MODULE_NAME "tg3" 65#define DRV_MODULE_NAME "tg3"
66#define PFX DRV_MODULE_NAME ": " 66#define PFX DRV_MODULE_NAME ": "
67#define DRV_MODULE_VERSION "3.83" 67#define DRV_MODULE_VERSION "3.84"
68#define DRV_MODULE_RELDATE "October 10, 2007" 68#define DRV_MODULE_RELDATE "October 12, 2007"
69 69
70#define TG3_DEF_MAC_MODE 0 70#define TG3_DEF_MAC_MODE 0
71#define TG3_DEF_RX_MODE 0 71#define TG3_DEF_RX_MODE 0
@@ -5056,6 +5056,12 @@ static void tg3_restore_pci_state(struct tg3 *tp)
5056 5056
5057 pci_write_config_dword(tp->pdev, TG3PCI_COMMAND, tp->pci_cmd); 5057 pci_write_config_dword(tp->pdev, TG3PCI_COMMAND, tp->pci_cmd);
5058 5058
5059 if (!(tp->tg3_flags2 & TG3_FLG2_PCI_EXPRESS)) {
5060 pci_write_config_byte(tp->pdev, PCI_CACHE_LINE_SIZE,
5061 tp->pci_cacheline_sz);
5062 pci_write_config_byte(tp->pdev, PCI_LATENCY_TIMER,
5063 tp->pci_lat_timer);
5064 }
5059 /* Make sure PCI-X relaxed ordering bit is clear. */ 5065 /* Make sure PCI-X relaxed ordering bit is clear. */
5060 if (tp->pcix_cap) { 5066 if (tp->pcix_cap) {
5061 u16 pcix_cmd; 5067 u16 pcix_cmd;