aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlge/qlge_mpi.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-02-09 06:49:52 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-12 16:27:46 -0500
commitae9540f75d5a69e7604cc5391cc0726b3aa82ff6 (patch)
tree434a87a571115a0f9470feaf6346333fb36e88b7 /drivers/net/qlge/qlge_mpi.c
parentf8502ce4f986a8fd486302980285b5e786b8dabe (diff)
drivers/net/qlge: Use netif_printk helpers
Convert QPRINTK macros to netif_<level> equivalents. Expands and standardizes the logging message output. Removes __func__ from most logging messages. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlge/qlge_mpi.c')
-rw-r--r--drivers/net/qlge/qlge_mpi.c183
1 files changed, 88 insertions, 95 deletions
diff --git a/drivers/net/qlge/qlge_mpi.c b/drivers/net/qlge/qlge_mpi.c
index e2c846f17fc7..3c00462a5d22 100644
--- a/drivers/net/qlge/qlge_mpi.c
+++ b/drivers/net/qlge/qlge_mpi.c
@@ -135,7 +135,7 @@ static int ql_get_mb_sts(struct ql_adapter *qdev, struct mbox_params *mbcp)
135 ql_read_mpi_reg(qdev, qdev->mailbox_out + i, 135 ql_read_mpi_reg(qdev, qdev->mailbox_out + i,
136 &mbcp->mbox_out[i]); 136 &mbcp->mbox_out[i]);
137 if (status) { 137 if (status) {
138 QPRINTK(qdev, DRV, ERR, "Failed mailbox read.\n"); 138 netif_err(qdev, drv, qdev->ndev, "Failed mailbox read.\n");
139 break; 139 break;
140 } 140 }
141 } 141 }
@@ -208,7 +208,7 @@ static int ql_idc_req_aen(struct ql_adapter *qdev)
208 int status; 208 int status;
209 struct mbox_params *mbcp = &qdev->idc_mbc; 209 struct mbox_params *mbcp = &qdev->idc_mbc;
210 210
211 QPRINTK(qdev, DRV, ERR, "Enter!\n"); 211 netif_err(qdev, drv, qdev->ndev, "Enter!\n");
212 /* Get the status data and start up a thread to 212 /* Get the status data and start up a thread to
213 * handle the request. 213 * handle the request.
214 */ 214 */
@@ -216,8 +216,8 @@ static int ql_idc_req_aen(struct ql_adapter *qdev)
216 mbcp->out_count = 4; 216 mbcp->out_count = 4;
217 status = ql_get_mb_sts(qdev, mbcp); 217 status = ql_get_mb_sts(qdev, mbcp);
218 if (status) { 218 if (status) {
219 QPRINTK(qdev, DRV, ERR, 219 netif_err(qdev, drv, qdev->ndev,
220 "Could not read MPI, resetting ASIC!\n"); 220 "Could not read MPI, resetting ASIC!\n");
221 ql_queue_asic_error(qdev); 221 ql_queue_asic_error(qdev);
222 } else { 222 } else {
223 /* Begin polled mode early so 223 /* Begin polled mode early so
@@ -240,8 +240,8 @@ static int ql_idc_cmplt_aen(struct ql_adapter *qdev)
240 mbcp->out_count = 4; 240 mbcp->out_count = 4;
241 status = ql_get_mb_sts(qdev, mbcp); 241 status = ql_get_mb_sts(qdev, mbcp);
242 if (status) { 242 if (status) {
243 QPRINTK(qdev, DRV, ERR, 243 netif_err(qdev, drv, qdev->ndev,
244 "Could not read MPI, resetting RISC!\n"); 244 "Could not read MPI, resetting RISC!\n");
245 ql_queue_fw_error(qdev); 245 ql_queue_fw_error(qdev);
246 } else 246 } else
247 /* Wake up the sleeping mpi_idc_work thread that is 247 /* Wake up the sleeping mpi_idc_work thread that is
@@ -259,13 +259,13 @@ static void ql_link_up(struct ql_adapter *qdev, struct mbox_params *mbcp)
259 259
260 status = ql_get_mb_sts(qdev, mbcp); 260 status = ql_get_mb_sts(qdev, mbcp);
261 if (status) { 261 if (status) {
262 QPRINTK(qdev, DRV, ERR, 262 netif_err(qdev, drv, qdev->ndev,
263 "%s: Could not get mailbox status.\n", __func__); 263 "%s: Could not get mailbox status.\n", __func__);
264 return; 264 return;
265 } 265 }
266 266
267 qdev->link_status = mbcp->mbox_out[1]; 267 qdev->link_status = mbcp->mbox_out[1];
268 QPRINTK(qdev, DRV, ERR, "Link Up.\n"); 268 netif_err(qdev, drv, qdev->ndev, "Link Up.\n");
269 269
270 /* If we're coming back from an IDC event 270 /* If we're coming back from an IDC event
271 * then set up the CAM and frame routing. 271 * then set up the CAM and frame routing.
@@ -273,8 +273,8 @@ static void ql_link_up(struct ql_adapter *qdev, struct mbox_params *mbcp)
273 if (test_bit(QL_CAM_RT_SET, &qdev->flags)) { 273 if (test_bit(QL_CAM_RT_SET, &qdev->flags)) {
274 status = ql_cam_route_initialize(qdev); 274 status = ql_cam_route_initialize(qdev);
275 if (status) { 275 if (status) {
276 QPRINTK(qdev, IFUP, ERR, 276 netif_err(qdev, ifup, qdev->ndev,
277 "Failed to init CAM/Routing tables.\n"); 277 "Failed to init CAM/Routing tables.\n");
278 return; 278 return;
279 } else 279 } else
280 clear_bit(QL_CAM_RT_SET, &qdev->flags); 280 clear_bit(QL_CAM_RT_SET, &qdev->flags);
@@ -285,7 +285,7 @@ static void ql_link_up(struct ql_adapter *qdev, struct mbox_params *mbcp)
285 * to our liking. 285 * to our liking.
286 */ 286 */
287 if (!test_bit(QL_PORT_CFG, &qdev->flags)) { 287 if (!test_bit(QL_PORT_CFG, &qdev->flags)) {
288 QPRINTK(qdev, DRV, ERR, "Queue Port Config Worker!\n"); 288 netif_err(qdev, drv, qdev->ndev, "Queue Port Config Worker!\n");
289 set_bit(QL_PORT_CFG, &qdev->flags); 289 set_bit(QL_PORT_CFG, &qdev->flags);
290 /* Begin polled mode early so 290 /* Begin polled mode early so
291 * we don't get another interrupt 291 * we don't get another interrupt
@@ -307,7 +307,7 @@ static void ql_link_down(struct ql_adapter *qdev, struct mbox_params *mbcp)
307 307
308 status = ql_get_mb_sts(qdev, mbcp); 308 status = ql_get_mb_sts(qdev, mbcp);
309 if (status) 309 if (status)
310 QPRINTK(qdev, DRV, ERR, "Link down AEN broken!\n"); 310 netif_err(qdev, drv, qdev->ndev, "Link down AEN broken!\n");
311 311
312 ql_link_off(qdev); 312 ql_link_off(qdev);
313} 313}
@@ -320,9 +320,9 @@ static int ql_sfp_in(struct ql_adapter *qdev, struct mbox_params *mbcp)
320 320
321 status = ql_get_mb_sts(qdev, mbcp); 321 status = ql_get_mb_sts(qdev, mbcp);
322 if (status) 322 if (status)
323 QPRINTK(qdev, DRV, ERR, "SFP in AEN broken!\n"); 323 netif_err(qdev, drv, qdev->ndev, "SFP in AEN broken!\n");
324 else 324 else
325 QPRINTK(qdev, DRV, ERR, "SFP insertion detected.\n"); 325 netif_err(qdev, drv, qdev->ndev, "SFP insertion detected.\n");
326 326
327 return status; 327 return status;
328} 328}
@@ -335,9 +335,9 @@ static int ql_sfp_out(struct ql_adapter *qdev, struct mbox_params *mbcp)
335 335
336 status = ql_get_mb_sts(qdev, mbcp); 336 status = ql_get_mb_sts(qdev, mbcp);
337 if (status) 337 if (status)
338 QPRINTK(qdev, DRV, ERR, "SFP out AEN broken!\n"); 338 netif_err(qdev, drv, qdev->ndev, "SFP out AEN broken!\n");
339 else 339 else
340 QPRINTK(qdev, DRV, ERR, "SFP removal detected.\n"); 340 netif_err(qdev, drv, qdev->ndev, "SFP removal detected.\n");
341 341
342 return status; 342 return status;
343} 343}
@@ -350,13 +350,13 @@ static int ql_aen_lost(struct ql_adapter *qdev, struct mbox_params *mbcp)
350 350
351 status = ql_get_mb_sts(qdev, mbcp); 351 status = ql_get_mb_sts(qdev, mbcp);
352 if (status) 352 if (status)
353 QPRINTK(qdev, DRV, ERR, "Lost AEN broken!\n"); 353 netif_err(qdev, drv, qdev->ndev, "Lost AEN broken!\n");
354 else { 354 else {
355 int i; 355 int i;
356 QPRINTK(qdev, DRV, ERR, "Lost AEN detected.\n"); 356 netif_err(qdev, drv, qdev->ndev, "Lost AEN detected.\n");
357 for (i = 0; i < mbcp->out_count; i++) 357 for (i = 0; i < mbcp->out_count; i++)
358 QPRINTK(qdev, DRV, ERR, "mbox_out[%d] = 0x%.08x.\n", 358 netif_err(qdev, drv, qdev->ndev, "mbox_out[%d] = 0x%.08x.\n",
359 i, mbcp->mbox_out[i]); 359 i, mbcp->mbox_out[i]);
360 360
361 } 361 }
362 362
@@ -371,15 +371,15 @@ static void ql_init_fw_done(struct ql_adapter *qdev, struct mbox_params *mbcp)
371 371
372 status = ql_get_mb_sts(qdev, mbcp); 372 status = ql_get_mb_sts(qdev, mbcp);
373 if (status) { 373 if (status) {
374 QPRINTK(qdev, DRV, ERR, "Firmware did not initialize!\n"); 374 netif_err(qdev, drv, qdev->ndev, "Firmware did not initialize!\n");
375 } else { 375 } else {
376 QPRINTK(qdev, DRV, ERR, "Firmware Revision = 0x%.08x.\n", 376 netif_err(qdev, drv, qdev->ndev, "Firmware Revision = 0x%.08x.\n",
377 mbcp->mbox_out[1]); 377 mbcp->mbox_out[1]);
378 qdev->fw_rev_id = mbcp->mbox_out[1]; 378 qdev->fw_rev_id = mbcp->mbox_out[1];
379 status = ql_cam_route_initialize(qdev); 379 status = ql_cam_route_initialize(qdev);
380 if (status) 380 if (status)
381 QPRINTK(qdev, IFUP, ERR, 381 netif_err(qdev, ifup, qdev->ndev,
382 "Failed to init CAM/Routing tables.\n"); 382 "Failed to init CAM/Routing tables.\n");
383 } 383 }
384} 384}
385 385
@@ -398,8 +398,8 @@ static int ql_mpi_handler(struct ql_adapter *qdev, struct mbox_params *mbcp)
398 mbcp->out_count = 1; 398 mbcp->out_count = 1;
399 status = ql_get_mb_sts(qdev, mbcp); 399 status = ql_get_mb_sts(qdev, mbcp);
400 if (status) { 400 if (status) {
401 QPRINTK(qdev, DRV, ERR, 401 netif_err(qdev, drv, qdev->ndev,
402 "Could not read MPI, resetting ASIC!\n"); 402 "Could not read MPI, resetting ASIC!\n");
403 ql_queue_asic_error(qdev); 403 ql_queue_asic_error(qdev);
404 goto end; 404 goto end;
405 } 405 }
@@ -488,15 +488,14 @@ static int ql_mpi_handler(struct ql_adapter *qdev, struct mbox_params *mbcp)
488 mbcp->mbox_out[0] = MB_CMD_STS_ERR; 488 mbcp->mbox_out[0] = MB_CMD_STS_ERR;
489 return status; 489 return status;
490 } 490 }
491 QPRINTK(qdev, DRV, ERR, 491 netif_err(qdev, drv, qdev->ndev,
492 "Firmware initialization failed.\n"); 492 "Firmware initialization failed.\n");
493 status = -EIO; 493 status = -EIO;
494 ql_queue_fw_error(qdev); 494 ql_queue_fw_error(qdev);
495 break; 495 break;
496 496
497 case AEN_SYS_ERR: 497 case AEN_SYS_ERR:
498 QPRINTK(qdev, DRV, ERR, 498 netif_err(qdev, drv, qdev->ndev, "System Error.\n");
499 "System Error.\n");
500 ql_queue_fw_error(qdev); 499 ql_queue_fw_error(qdev);
501 status = -EIO; 500 status = -EIO;
502 break; 501 break;
@@ -509,8 +508,8 @@ static int ql_mpi_handler(struct ql_adapter *qdev, struct mbox_params *mbcp)
509 /* Need to support AEN 8110 */ 508 /* Need to support AEN 8110 */
510 break; 509 break;
511 default: 510 default:
512 QPRINTK(qdev, DRV, ERR, 511 netif_err(qdev, drv, qdev->ndev,
513 "Unsupported AE %.08x.\n", mbcp->mbox_out[0]); 512 "Unsupported AE %.08x.\n", mbcp->mbox_out[0]);
514 /* Clear the MPI firmware status. */ 513 /* Clear the MPI firmware status. */
515 } 514 }
516end: 515end:
@@ -583,8 +582,8 @@ static int ql_mailbox_command(struct ql_adapter *qdev, struct mbox_params *mbcp)
583 goto done; 582 goto done;
584 } while (time_before(jiffies, count)); 583 } while (time_before(jiffies, count));
585 584
586 QPRINTK(qdev, DRV, ERR, 585 netif_err(qdev, drv, qdev->ndev,
587 "Timed out waiting for mailbox complete.\n"); 586 "Timed out waiting for mailbox complete.\n");
588 status = -ETIMEDOUT; 587 status = -ETIMEDOUT;
589 goto end; 588 goto end;
590 589
@@ -646,8 +645,8 @@ int ql_mb_about_fw(struct ql_adapter *qdev)
646 return status; 645 return status;
647 646
648 if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) { 647 if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) {
649 QPRINTK(qdev, DRV, ERR, 648 netif_err(qdev, drv, qdev->ndev,
650 "Failed about firmware command\n"); 649 "Failed about firmware command\n");
651 status = -EIO; 650 status = -EIO;
652 } 651 }
653 652
@@ -678,8 +677,8 @@ int ql_mb_get_fw_state(struct ql_adapter *qdev)
678 return status; 677 return status;
679 678
680 if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) { 679 if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) {
681 QPRINTK(qdev, DRV, ERR, 680 netif_err(qdev, drv, qdev->ndev,
682 "Failed Get Firmware State.\n"); 681 "Failed Get Firmware State.\n");
683 status = -EIO; 682 status = -EIO;
684 } 683 }
685 684
@@ -688,8 +687,8 @@ int ql_mb_get_fw_state(struct ql_adapter *qdev)
688 * happen. 687 * happen.
689 */ 688 */
690 if (mbcp->mbox_out[1] & 1) { 689 if (mbcp->mbox_out[1] & 1) {
691 QPRINTK(qdev, DRV, ERR, 690 netif_err(qdev, drv, qdev->ndev,
692 "Firmware waiting for initialization.\n"); 691 "Firmware waiting for initialization.\n");
693 status = -EIO; 692 status = -EIO;
694 } 693 }
695 694
@@ -721,8 +720,7 @@ int ql_mb_idc_ack(struct ql_adapter *qdev)
721 return status; 720 return status;
722 721
723 if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) { 722 if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) {
724 QPRINTK(qdev, DRV, ERR, 723 netif_err(qdev, drv, qdev->ndev, "Failed IDC ACK send.\n");
725 "Failed IDC ACK send.\n");
726 status = -EIO; 724 status = -EIO;
727 } 725 }
728 return status; 726 return status;
@@ -753,11 +751,11 @@ int ql_mb_set_port_cfg(struct ql_adapter *qdev)
753 return status; 751 return status;
754 752
755 if (mbcp->mbox_out[0] == MB_CMD_STS_INTRMDT) { 753 if (mbcp->mbox_out[0] == MB_CMD_STS_INTRMDT) {
756 QPRINTK(qdev, DRV, ERR, 754 netif_err(qdev, drv, qdev->ndev,
757 "Port Config sent, wait for IDC.\n"); 755 "Port Config sent, wait for IDC.\n");
758 } else if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) { 756 } else if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) {
759 QPRINTK(qdev, DRV, ERR, 757 netif_err(qdev, drv, qdev->ndev,
760 "Failed Set Port Configuration.\n"); 758 "Failed Set Port Configuration.\n");
761 status = -EIO; 759 status = -EIO;
762 } 760 }
763 return status; 761 return status;
@@ -791,8 +789,7 @@ int ql_mb_dump_ram(struct ql_adapter *qdev, u64 req_dma, u32 addr,
791 return status; 789 return status;
792 790
793 if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) { 791 if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) {
794 QPRINTK(qdev, DRV, ERR, 792 netif_err(qdev, drv, qdev->ndev, "Failed to dump risc RAM.\n");
795 "Failed to dump risc RAM.\n");
796 status = -EIO; 793 status = -EIO;
797 } 794 }
798 return status; 795 return status;
@@ -842,12 +839,12 @@ int ql_mb_get_port_cfg(struct ql_adapter *qdev)
842 return status; 839 return status;
843 840
844 if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) { 841 if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) {
845 QPRINTK(qdev, DRV, ERR, 842 netif_err(qdev, drv, qdev->ndev,
846 "Failed Get Port Configuration.\n"); 843 "Failed Get Port Configuration.\n");
847 status = -EIO; 844 status = -EIO;
848 } else { 845 } else {
849 QPRINTK(qdev, DRV, DEBUG, 846 netif_printk(qdev, drv, KERN_DEBUG, qdev->ndev,
850 "Passed Get Port Configuration.\n"); 847 "Passed Get Port Configuration.\n");
851 qdev->link_config = mbcp->mbox_out[1]; 848 qdev->link_config = mbcp->mbox_out[1];
852 qdev->max_frame_size = mbcp->mbox_out[2]; 849 qdev->max_frame_size = mbcp->mbox_out[2];
853 } 850 }
@@ -874,8 +871,7 @@ int ql_mb_wol_mode(struct ql_adapter *qdev, u32 wol)
874 return status; 871 return status;
875 872
876 if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) { 873 if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) {
877 QPRINTK(qdev, DRV, ERR, 874 netif_err(qdev, drv, qdev->ndev, "Failed to set WOL mode.\n");
878 "Failed to set WOL mode.\n");
879 status = -EIO; 875 status = -EIO;
880 } 876 }
881 return status; 877 return status;
@@ -917,8 +913,7 @@ int ql_mb_wol_set_magic(struct ql_adapter *qdev, u32 enable_wol)
917 return status; 913 return status;
918 914
919 if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) { 915 if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) {
920 QPRINTK(qdev, DRV, ERR, 916 netif_err(qdev, drv, qdev->ndev, "Failed to set WOL mode.\n");
921 "Failed to set WOL mode.\n");
922 status = -EIO; 917 status = -EIO;
923 } 918 }
924 return status; 919 return status;
@@ -944,8 +939,7 @@ static int ql_idc_wait(struct ql_adapter *qdev)
944 wait_for_completion_timeout(&qdev->ide_completion, 939 wait_for_completion_timeout(&qdev->ide_completion,
945 wait_time); 940 wait_time);
946 if (!wait_time) { 941 if (!wait_time) {
947 QPRINTK(qdev, DRV, ERR, 942 netif_err(qdev, drv, qdev->ndev, "IDC Timeout.\n");
948 "IDC Timeout.\n");
949 break; 943 break;
950 } 944 }
951 /* Now examine the response from the IDC process. 945 /* Now examine the response from the IDC process.
@@ -953,18 +947,17 @@ static int ql_idc_wait(struct ql_adapter *qdev)
953 * more wait time. 947 * more wait time.
954 */ 948 */
955 if (mbcp->mbox_out[0] == AEN_IDC_EXT) { 949 if (mbcp->mbox_out[0] == AEN_IDC_EXT) {
956 QPRINTK(qdev, DRV, ERR, 950 netif_err(qdev, drv, qdev->ndev,
957 "IDC Time Extension from function.\n"); 951 "IDC Time Extension from function.\n");
958 wait_time += (mbcp->mbox_out[1] >> 8) & 0x0000000f; 952 wait_time += (mbcp->mbox_out[1] >> 8) & 0x0000000f;
959 } else if (mbcp->mbox_out[0] == AEN_IDC_CMPLT) { 953 } else if (mbcp->mbox_out[0] == AEN_IDC_CMPLT) {
960 QPRINTK(qdev, DRV, ERR, 954 netif_err(qdev, drv, qdev->ndev, "IDC Success.\n");
961 "IDC Success.\n");
962 status = 0; 955 status = 0;
963 break; 956 break;
964 } else { 957 } else {
965 QPRINTK(qdev, DRV, ERR, 958 netif_err(qdev, drv, qdev->ndev,
966 "IDC: Invalid State 0x%.04x.\n", 959 "IDC: Invalid State 0x%.04x.\n",
967 mbcp->mbox_out[0]); 960 mbcp->mbox_out[0]);
968 status = -EIO; 961 status = -EIO;
969 break; 962 break;
970 } 963 }
@@ -993,8 +986,8 @@ int ql_mb_set_led_cfg(struct ql_adapter *qdev, u32 led_config)
993 return status; 986 return status;
994 987
995 if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) { 988 if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) {
996 QPRINTK(qdev, DRV, ERR, 989 netif_err(qdev, drv, qdev->ndev,
997 "Failed to set LED Configuration.\n"); 990 "Failed to set LED Configuration.\n");
998 status = -EIO; 991 status = -EIO;
999 } 992 }
1000 993
@@ -1019,8 +1012,8 @@ int ql_mb_get_led_cfg(struct ql_adapter *qdev)
1019 return status; 1012 return status;
1020 1013
1021 if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) { 1014 if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) {
1022 QPRINTK(qdev, DRV, ERR, 1015 netif_err(qdev, drv, qdev->ndev,
1023 "Failed to get LED Configuration.\n"); 1016 "Failed to get LED Configuration.\n");
1024 status = -EIO; 1017 status = -EIO;
1025 } else 1018 } else
1026 qdev->led_config = mbcp->mbox_out[1]; 1019 qdev->led_config = mbcp->mbox_out[1];
@@ -1050,16 +1043,16 @@ int ql_mb_set_mgmnt_traffic_ctl(struct ql_adapter *qdev, u32 control)
1050 return status; 1043 return status;
1051 1044
1052 if (mbcp->mbox_out[0] == MB_CMD_STS_INVLD_CMD) { 1045 if (mbcp->mbox_out[0] == MB_CMD_STS_INVLD_CMD) {
1053 QPRINTK(qdev, DRV, ERR, 1046 netif_err(qdev, drv, qdev->ndev,
1054 "Command not supported by firmware.\n"); 1047 "Command not supported by firmware.\n");
1055 status = -EINVAL; 1048 status = -EINVAL;
1056 } else if (mbcp->mbox_out[0] == MB_CMD_STS_ERR) { 1049 } else if (mbcp->mbox_out[0] == MB_CMD_STS_ERR) {
1057 /* This indicates that the firmware is 1050 /* This indicates that the firmware is
1058 * already in the state we are trying to 1051 * already in the state we are trying to
1059 * change it to. 1052 * change it to.
1060 */ 1053 */
1061 QPRINTK(qdev, DRV, ERR, 1054 netif_err(qdev, drv, qdev->ndev,
1062 "Command parameters make no change.\n"); 1055 "Command parameters make no change.\n");
1063 } 1056 }
1064 return status; 1057 return status;
1065} 1058}
@@ -1089,12 +1082,12 @@ static int ql_mb_get_mgmnt_traffic_ctl(struct ql_adapter *qdev, u32 *control)
1089 } 1082 }
1090 1083
1091 if (mbcp->mbox_out[0] == MB_CMD_STS_INVLD_CMD) { 1084 if (mbcp->mbox_out[0] == MB_CMD_STS_INVLD_CMD) {
1092 QPRINTK(qdev, DRV, ERR, 1085 netif_err(qdev, drv, qdev->ndev,
1093 "Command not supported by firmware.\n"); 1086 "Command not supported by firmware.\n");
1094 status = -EINVAL; 1087 status = -EINVAL;
1095 } else if (mbcp->mbox_out[0] == MB_CMD_STS_ERR) { 1088 } else if (mbcp->mbox_out[0] == MB_CMD_STS_ERR) {
1096 QPRINTK(qdev, DRV, ERR, 1089 netif_err(qdev, drv, qdev->ndev,
1097 "Failed to get MPI traffic control.\n"); 1090 "Failed to get MPI traffic control.\n");
1098 status = -EIO; 1091 status = -EIO;
1099 } 1092 }
1100 return status; 1093 return status;
@@ -1150,8 +1143,8 @@ void ql_mpi_port_cfg_work(struct work_struct *work)
1150 status = ql_mb_get_port_cfg(qdev); 1143 status = ql_mb_get_port_cfg(qdev);
1151 rtnl_unlock(); 1144 rtnl_unlock();
1152 if (status) { 1145 if (status) {
1153 QPRINTK(qdev, DRV, ERR, 1146 netif_err(qdev, drv, qdev->ndev,
1154 "Bug: Failed to get port config data.\n"); 1147 "Bug: Failed to get port config data.\n");
1155 goto err; 1148 goto err;
1156 } 1149 }
1157 1150
@@ -1164,8 +1157,8 @@ void ql_mpi_port_cfg_work(struct work_struct *work)
1164 qdev->max_frame_size = CFG_DEFAULT_MAX_FRAME_SIZE; 1157 qdev->max_frame_size = CFG_DEFAULT_MAX_FRAME_SIZE;
1165 status = ql_set_port_cfg(qdev); 1158 status = ql_set_port_cfg(qdev);
1166 if (status) { 1159 if (status) {
1167 QPRINTK(qdev, DRV, ERR, 1160 netif_err(qdev, drv, qdev->ndev,
1168 "Bug: Failed to set port config data.\n"); 1161 "Bug: Failed to set port config data.\n");
1169 goto err; 1162 goto err;
1170 } 1163 }
1171end: 1164end:
@@ -1197,8 +1190,8 @@ void ql_mpi_idc_work(struct work_struct *work)
1197 1190
1198 switch (aen) { 1191 switch (aen) {
1199 default: 1192 default:
1200 QPRINTK(qdev, DRV, ERR, 1193 netif_err(qdev, drv, qdev->ndev,
1201 "Bug: Unhandled IDC action.\n"); 1194 "Bug: Unhandled IDC action.\n");
1202 break; 1195 break;
1203 case MB_CMD_PORT_RESET: 1196 case MB_CMD_PORT_RESET:
1204 case MB_CMD_STOP_FW: 1197 case MB_CMD_STOP_FW:
@@ -1213,11 +1206,11 @@ void ql_mpi_idc_work(struct work_struct *work)
1213 if (timeout) { 1206 if (timeout) {
1214 status = ql_mb_idc_ack(qdev); 1207 status = ql_mb_idc_ack(qdev);
1215 if (status) 1208 if (status)
1216 QPRINTK(qdev, DRV, ERR, 1209 netif_err(qdev, drv, qdev->ndev,
1217 "Bug: No pending IDC!\n"); 1210 "Bug: No pending IDC!\n");
1218 } else { 1211 } else {
1219 QPRINTK(qdev, DRV, DEBUG, 1212 netif_printk(qdev, drv, KERN_DEBUG, qdev->ndev,
1220 "IDC ACK not required\n"); 1213 "IDC ACK not required\n");
1221 status = 0; /* success */ 1214 status = 0; /* success */
1222 } 1215 }
1223 break; 1216 break;
@@ -1246,11 +1239,11 @@ void ql_mpi_idc_work(struct work_struct *work)
1246 if (timeout) { 1239 if (timeout) {
1247 status = ql_mb_idc_ack(qdev); 1240 status = ql_mb_idc_ack(qdev);
1248 if (status) 1241 if (status)
1249 QPRINTK(qdev, DRV, ERR, 1242 netif_err(qdev, drv, qdev->ndev,
1250 "Bug: No pending IDC!\n"); 1243 "Bug: No pending IDC!\n");
1251 } else { 1244 } else {
1252 QPRINTK(qdev, DRV, DEBUG, 1245 netif_printk(qdev, drv, KERN_DEBUG, qdev->ndev,
1253 "IDC ACK not required\n"); 1246 "IDC ACK not required\n");
1254 status = 0; /* success */ 1247 status = 0; /* success */
1255 } 1248 }
1256 break; 1249 break;
@@ -1298,12 +1291,12 @@ void ql_mpi_reset_work(struct work_struct *work)
1298 * then there is nothing to do. 1291 * then there is nothing to do.
1299 */ 1292 */
1300 if (!ql_own_firmware(qdev)) { 1293 if (!ql_own_firmware(qdev)) {
1301 QPRINTK(qdev, DRV, ERR, "Don't own firmware!\n"); 1294 netif_err(qdev, drv, qdev->ndev, "Don't own firmware!\n");
1302 return; 1295 return;
1303 } 1296 }
1304 1297
1305 if (!ql_core_dump(qdev, qdev->mpi_coredump)) { 1298 if (!ql_core_dump(qdev, qdev->mpi_coredump)) {
1306 QPRINTK(qdev, DRV, ERR, "Core is dumped!\n"); 1299 netif_err(qdev, drv, qdev->ndev, "Core is dumped!\n");
1307 qdev->core_is_dumped = 1; 1300 qdev->core_is_dumped = 1;
1308 queue_delayed_work(qdev->workqueue, 1301 queue_delayed_work(qdev->workqueue,
1309 &qdev->mpi_core_to_log, 5 * HZ); 1302 &qdev->mpi_core_to_log, 5 * HZ);