diff options
author | Jesse Brandeburg <jesse.brandeburg@intel.com> | 2006-01-17 18:01:06 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-17 19:15:15 -0500 |
commit | 24180333206519e6b0c4633eab81e773b4527cac (patch) | |
tree | 903edfa6bac60f0583a69614503a6ee1af2711a4 | |
parent | 2610c733023850be2db9fef9c81f851a64bb9f67 (diff) |
[PATCH] e100: Fix TX hang and RMCP Ping issue (due to a microcode loading issue)
e100: Fix TX hang and RMCP Ping issue (due to a microcode loading issue)
Set the end of list bit to cause the hardware's transmit state machine to
work correctly and not prevent management (BMC) traffic.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: John Ronciak <john.ronciak@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
-rw-r--r-- | drivers/net/e100.c | 44 |
1 files changed, 39 insertions, 5 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 4726722a0635..67b99353acfe 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -160,7 +160,7 @@ | |||
160 | 160 | ||
161 | #define DRV_NAME "e100" | 161 | #define DRV_NAME "e100" |
162 | #define DRV_EXT "-NAPI" | 162 | #define DRV_EXT "-NAPI" |
163 | #define DRV_VERSION "3.4.14-k4"DRV_EXT | 163 | #define DRV_VERSION "3.5.10-k2"DRV_EXT |
164 | #define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver" | 164 | #define DRV_DESCRIPTION "Intel(R) PRO/100 Network Driver" |
165 | #define DRV_COPYRIGHT "Copyright(c) 1999-2005 Intel Corporation" | 165 | #define DRV_COPYRIGHT "Copyright(c) 1999-2005 Intel Corporation" |
166 | #define PFX DRV_NAME ": " | 166 | #define PFX DRV_NAME ": " |
@@ -1170,7 +1170,7 @@ static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb) | |||
1170 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ | 1170 | 0x00000000, 0x00000000, 0x00000000, 0x00000000, \ |
1171 | } | 1171 | } |
1172 | 1172 | ||
1173 | static void e100_load_ucode(struct nic *nic, struct cb *cb, struct sk_buff *skb) | 1173 | static void e100_setup_ucode(struct nic *nic, struct cb *cb, struct sk_buff *skb) |
1174 | { | 1174 | { |
1175 | /* *INDENT-OFF* */ | 1175 | /* *INDENT-OFF* */ |
1176 | static struct { | 1176 | static struct { |
@@ -1284,12 +1284,46 @@ static void e100_load_ucode(struct nic *nic, struct cb *cb, struct sk_buff *skb) | |||
1284 | 1284 | ||
1285 | for (i = 0; i < UCODE_SIZE; i++) | 1285 | for (i = 0; i < UCODE_SIZE; i++) |
1286 | cb->u.ucode[i] = cpu_to_le32(ucode[i]); | 1286 | cb->u.ucode[i] = cpu_to_le32(ucode[i]); |
1287 | cb->command = cpu_to_le16(cb_ucode); | 1287 | cb->command = cpu_to_le16(cb_ucode | cb_el); |
1288 | return; | 1288 | return; |
1289 | } | 1289 | } |
1290 | 1290 | ||
1291 | noloaducode: | 1291 | noloaducode: |
1292 | cb->command = cpu_to_le16(cb_nop); | 1292 | cb->command = cpu_to_le16(cb_nop | cb_el); |
1293 | } | ||
1294 | |||
1295 | static inline int e100_exec_cb_wait(struct nic *nic, struct sk_buff *skb, | ||
1296 | void (*cb_prepare)(struct nic *, struct cb *, struct sk_buff *)) | ||
1297 | { | ||
1298 | int err = 0, counter = 50; | ||
1299 | struct cb *cb = nic->cb_to_clean; | ||
1300 | |||
1301 | if ((err = e100_exec_cb(nic, NULL, e100_setup_ucode))) | ||
1302 | DPRINTK(PROBE,ERR, "ucode cmd failed with error %d\n", err); | ||
1303 | |||
1304 | /* must restart cuc */ | ||
1305 | nic->cuc_cmd = cuc_start; | ||
1306 | |||
1307 | /* wait for completion */ | ||
1308 | e100_write_flush(nic); | ||
1309 | udelay(10); | ||
1310 | |||
1311 | /* wait for possibly (ouch) 500ms */ | ||
1312 | while (!(cb->status & cpu_to_le16(cb_complete))) { | ||
1313 | msleep(10); | ||
1314 | if (!--counter) break; | ||
1315 | } | ||
1316 | |||
1317 | /* ack any interupts, something could have been set */ | ||
1318 | writeb(~0, &nic->csr->scb.stat_ack); | ||
1319 | |||
1320 | /* if the command failed, or is not OK, notify and return */ | ||
1321 | if (!counter || !(cb->status & cpu_to_le16(cb_ok))) { | ||
1322 | DPRINTK(PROBE,ERR, "ucode load failed\n"); | ||
1323 | err = -EPERM; | ||
1324 | } | ||
1325 | |||
1326 | return err; | ||
1293 | } | 1327 | } |
1294 | 1328 | ||
1295 | static void e100_setup_iaaddr(struct nic *nic, struct cb *cb, | 1329 | static void e100_setup_iaaddr(struct nic *nic, struct cb *cb, |
@@ -1388,7 +1422,7 @@ static int e100_hw_init(struct nic *nic) | |||
1388 | return err; | 1422 | return err; |
1389 | if((err = e100_exec_cmd(nic, ruc_load_base, 0))) | 1423 | if((err = e100_exec_cmd(nic, ruc_load_base, 0))) |
1390 | return err; | 1424 | return err; |
1391 | if((err = e100_exec_cb(nic, NULL, e100_load_ucode))) | 1425 | if ((err = e100_exec_cb_wait(nic, NULL, e100_setup_ucode))) |
1392 | return err; | 1426 | return err; |
1393 | if((err = e100_exec_cb(nic, NULL, e100_configure))) | 1427 | if((err = e100_exec_cb(nic, NULL, e100_configure))) |
1394 | return err; | 1428 | return err; |