diff options
Diffstat (limited to 'drivers/net/qlge/qlge_dbg.c')
-rw-r--r-- | drivers/net/qlge/qlge_dbg.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/drivers/net/qlge/qlge_dbg.c b/drivers/net/qlge/qlge_dbg.c index 57df835147e..ff8550d2ca8 100644 --- a/drivers/net/qlge/qlge_dbg.c +++ b/drivers/net/qlge/qlge_dbg.c | |||
@@ -443,8 +443,8 @@ static int ql_get_cam_entries(struct ql_adapter *qdev, u32 * buf) | |||
443 | status = ql_get_mac_addr_reg(qdev, | 443 | status = ql_get_mac_addr_reg(qdev, |
444 | MAC_ADDR_TYPE_CAM_MAC, i, value); | 444 | MAC_ADDR_TYPE_CAM_MAC, i, value); |
445 | if (status) { | 445 | if (status) { |
446 | QPRINTK(qdev, DRV, ERR, | 446 | netif_err(qdev, drv, qdev->ndev, |
447 | "Failed read of mac index register.\n"); | 447 | "Failed read of mac index register.\n"); |
448 | goto err; | 448 | goto err; |
449 | } | 449 | } |
450 | *buf++ = value[0]; /* lower MAC address */ | 450 | *buf++ = value[0]; /* lower MAC address */ |
@@ -455,8 +455,8 @@ static int ql_get_cam_entries(struct ql_adapter *qdev, u32 * buf) | |||
455 | status = ql_get_mac_addr_reg(qdev, | 455 | status = ql_get_mac_addr_reg(qdev, |
456 | MAC_ADDR_TYPE_MULTI_MAC, i, value); | 456 | MAC_ADDR_TYPE_MULTI_MAC, i, value); |
457 | if (status) { | 457 | if (status) { |
458 | QPRINTK(qdev, DRV, ERR, | 458 | netif_err(qdev, drv, qdev->ndev, |
459 | "Failed read of mac index register.\n"); | 459 | "Failed read of mac index register.\n"); |
460 | goto err; | 460 | goto err; |
461 | } | 461 | } |
462 | *buf++ = value[0]; /* lower Mcast address */ | 462 | *buf++ = value[0]; /* lower Mcast address */ |
@@ -479,8 +479,8 @@ static int ql_get_routing_entries(struct ql_adapter *qdev, u32 * buf) | |||
479 | for (i = 0; i < 16; i++) { | 479 | for (i = 0; i < 16; i++) { |
480 | status = ql_get_routing_reg(qdev, i, &value); | 480 | status = ql_get_routing_reg(qdev, i, &value); |
481 | if (status) { | 481 | if (status) { |
482 | QPRINTK(qdev, DRV, ERR, | 482 | netif_err(qdev, drv, qdev->ndev, |
483 | "Failed read of routing index register.\n"); | 483 | "Failed read of routing index register.\n"); |
484 | goto err; | 484 | goto err; |
485 | } else { | 485 | } else { |
486 | *buf++ = value; | 486 | *buf++ = value; |
@@ -736,8 +736,7 @@ int ql_core_dump(struct ql_adapter *qdev, struct ql_mpi_coredump *mpi_coredump) | |||
736 | int i; | 736 | int i; |
737 | 737 | ||
738 | if (!mpi_coredump) { | 738 | if (!mpi_coredump) { |
739 | QPRINTK(qdev, DRV, ERR, | 739 | netif_err(qdev, drv, qdev->ndev, "No memory available.\n"); |
740 | "No memory available.\n"); | ||
741 | return -ENOMEM; | 740 | return -ENOMEM; |
742 | } | 741 | } |
743 | 742 | ||
@@ -749,8 +748,8 @@ int ql_core_dump(struct ql_adapter *qdev, struct ql_mpi_coredump *mpi_coredump) | |||
749 | 748 | ||
750 | status = ql_pause_mpi_risc(qdev); | 749 | status = ql_pause_mpi_risc(qdev); |
751 | if (status) { | 750 | if (status) { |
752 | QPRINTK(qdev, DRV, ERR, | 751 | netif_err(qdev, drv, qdev->ndev, |
753 | "Failed RISC pause. Status = 0x%.08x\n", status); | 752 | "Failed RISC pause. Status = 0x%.08x\n", status); |
754 | goto err; | 753 | goto err; |
755 | } | 754 | } |
756 | 755 | ||
@@ -911,9 +910,9 @@ int ql_core_dump(struct ql_adapter *qdev, struct ql_mpi_coredump *mpi_coredump) | |||
911 | 910 | ||
912 | status = ql_get_serdes_regs(qdev, mpi_coredump); | 911 | status = ql_get_serdes_regs(qdev, mpi_coredump); |
913 | if (status) { | 912 | if (status) { |
914 | QPRINTK(qdev, DRV, ERR, | 913 | netif_err(qdev, drv, qdev->ndev, |
915 | "Failed Dump of Serdes Registers. Status = 0x%.08x\n", | 914 | "Failed Dump of Serdes Registers. Status = 0x%.08x\n", |
916 | status); | 915 | status); |
917 | goto err; | 916 | goto err; |
918 | } | 917 | } |
919 | 918 | ||
@@ -1177,16 +1176,16 @@ int ql_core_dump(struct ql_adapter *qdev, struct ql_mpi_coredump *mpi_coredump) | |||
1177 | /* clear the pause */ | 1176 | /* clear the pause */ |
1178 | status = ql_unpause_mpi_risc(qdev); | 1177 | status = ql_unpause_mpi_risc(qdev); |
1179 | if (status) { | 1178 | if (status) { |
1180 | QPRINTK(qdev, DRV, ERR, | 1179 | netif_err(qdev, drv, qdev->ndev, |
1181 | "Failed RISC unpause. Status = 0x%.08x\n", status); | 1180 | "Failed RISC unpause. Status = 0x%.08x\n", status); |
1182 | goto err; | 1181 | goto err; |
1183 | } | 1182 | } |
1184 | 1183 | ||
1185 | /* Reset the RISC so we can dump RAM */ | 1184 | /* Reset the RISC so we can dump RAM */ |
1186 | status = ql_hard_reset_mpi_risc(qdev); | 1185 | status = ql_hard_reset_mpi_risc(qdev); |
1187 | if (status) { | 1186 | if (status) { |
1188 | QPRINTK(qdev, DRV, ERR, | 1187 | netif_err(qdev, drv, qdev->ndev, |
1189 | "Failed RISC reset. Status = 0x%.08x\n", status); | 1188 | "Failed RISC reset. Status = 0x%.08x\n", status); |
1190 | goto err; | 1189 | goto err; |
1191 | } | 1190 | } |
1192 | 1191 | ||
@@ -1198,8 +1197,9 @@ int ql_core_dump(struct ql_adapter *qdev, struct ql_mpi_coredump *mpi_coredump) | |||
1198 | status = ql_dump_risc_ram_area(qdev, &mpi_coredump->code_ram[0], | 1197 | status = ql_dump_risc_ram_area(qdev, &mpi_coredump->code_ram[0], |
1199 | CODE_RAM_ADDR, CODE_RAM_CNT); | 1198 | CODE_RAM_ADDR, CODE_RAM_CNT); |
1200 | if (status) { | 1199 | if (status) { |
1201 | QPRINTK(qdev, DRV, ERR, | 1200 | netif_err(qdev, drv, qdev->ndev, |
1202 | "Failed Dump of CODE RAM. Status = 0x%.08x\n", status); | 1201 | "Failed Dump of CODE RAM. Status = 0x%.08x\n", |
1202 | status); | ||
1203 | goto err; | 1203 | goto err; |
1204 | } | 1204 | } |
1205 | 1205 | ||
@@ -1212,8 +1212,9 @@ int ql_core_dump(struct ql_adapter *qdev, struct ql_mpi_coredump *mpi_coredump) | |||
1212 | status = ql_dump_risc_ram_area(qdev, &mpi_coredump->memc_ram[0], | 1212 | status = ql_dump_risc_ram_area(qdev, &mpi_coredump->memc_ram[0], |
1213 | MEMC_RAM_ADDR, MEMC_RAM_CNT); | 1213 | MEMC_RAM_ADDR, MEMC_RAM_CNT); |
1214 | if (status) { | 1214 | if (status) { |
1215 | QPRINTK(qdev, DRV, ERR, | 1215 | netif_err(qdev, drv, qdev->ndev, |
1216 | "Failed Dump of MEMC RAM. Status = 0x%.08x\n", status); | 1216 | "Failed Dump of MEMC RAM. Status = 0x%.08x\n", |
1217 | status); | ||
1217 | goto err; | 1218 | goto err; |
1218 | } | 1219 | } |
1219 | err: | 1220 | err: |
@@ -1225,21 +1226,19 @@ err: | |||
1225 | static void ql_get_core_dump(struct ql_adapter *qdev) | 1226 | static void ql_get_core_dump(struct ql_adapter *qdev) |
1226 | { | 1227 | { |
1227 | if (!ql_own_firmware(qdev)) { | 1228 | if (!ql_own_firmware(qdev)) { |
1228 | QPRINTK(qdev, DRV, ERR, "%s: Don't own firmware!\n", | 1229 | netif_err(qdev, drv, qdev->ndev, "Don't own firmware!\n"); |
1229 | qdev->ndev->name); | ||
1230 | return; | 1230 | return; |
1231 | } | 1231 | } |
1232 | 1232 | ||
1233 | if (!netif_running(qdev->ndev)) { | 1233 | if (!netif_running(qdev->ndev)) { |
1234 | QPRINTK(qdev, IFUP, ERR, | 1234 | netif_err(qdev, ifup, qdev->ndev, |
1235 | "Force Coredump can only be done from interface " | 1235 | "Force Coredump can only be done from interface that is up.\n"); |
1236 | "that is up.\n"); | ||
1237 | return; | 1236 | return; |
1238 | } | 1237 | } |
1239 | 1238 | ||
1240 | if (ql_mb_sys_err(qdev)) { | 1239 | if (ql_mb_sys_err(qdev)) { |
1241 | QPRINTK(qdev, IFUP, ERR, | 1240 | netif_err(qdev, ifup, qdev->ndev, |
1242 | "Fail force coredump with ql_mb_sys_err().\n"); | 1241 | "Fail force coredump with ql_mb_sys_err().\n"); |
1243 | return; | 1242 | return; |
1244 | } | 1243 | } |
1245 | } | 1244 | } |
@@ -1334,7 +1333,8 @@ void ql_mpi_core_to_log(struct work_struct *work) | |||
1334 | 1333 | ||
1335 | count = sizeof(struct ql_mpi_coredump) / sizeof(u32); | 1334 | count = sizeof(struct ql_mpi_coredump) / sizeof(u32); |
1336 | tmp = (u32 *)qdev->mpi_coredump; | 1335 | tmp = (u32 *)qdev->mpi_coredump; |
1337 | QPRINTK(qdev, DRV, DEBUG, "Core is dumping to log file!\n"); | 1336 | netif_printk(qdev, drv, KERN_DEBUG, qdev->ndev, |
1337 | "Core is dumping to log file!\n"); | ||
1338 | 1338 | ||
1339 | for (i = 0; i < count; i += 8) { | 1339 | for (i = 0; i < count; i += 8) { |
1340 | printk(KERN_ERR "%.08x: %.08x %.08x %.08x %.08x %.08x " | 1340 | printk(KERN_ERR "%.08x: %.08x %.08x %.08x %.08x %.08x " |