aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_intr.c
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@pathscale.com>2007-03-15 17:44:55 -0400
committerRoland Dreier <rolandd@cisco.com>2007-04-18 23:20:55 -0400
commit8ec1077b35359c973f4b1de7c516be570a6df495 (patch)
tree21ba8b8099034a35a1fb4f8bf301223b1be4af73 /drivers/infiniband/hw/ipath/ipath_intr.c
parent6f5c407460bba332d6bee52e19f2305539395511 (diff)
IB/ipath: Change packet problems vs chip errors handling and reporting
Some types of packet errors are moderately common with longer IB cables and large clusters, and are not reported with prints by other IB HCA drivers. This suppresses those messages unless the new __IPATH_ERRPKTDBG bit is set in ipath_debug. Reporting of temporarily disabled frequent error interrupts was also made clearer We also distinguish between chip errors, and bad packets sent or received in the wording of the messages. Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_intr.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_intr.c57
1 files changed, 40 insertions, 17 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_intr.c b/drivers/infiniband/hw/ipath/ipath_intr.c
index 72b9e279d19..037b8e27642 100644
--- a/drivers/infiniband/hw/ipath/ipath_intr.c
+++ b/drivers/infiniband/hw/ipath/ipath_intr.c
@@ -403,10 +403,13 @@ static void handle_supp_msgs(struct ipath_devdata *dd,
403 * happens so often we never want to count it. 403 * happens so often we never want to count it.
404 */ 404 */
405 if (dd->ipath_lasterror & ~INFINIPATH_E_IBSTATUSCHANGED) { 405 if (dd->ipath_lasterror & ~INFINIPATH_E_IBSTATUSCHANGED) {
406 ipath_decode_err(msg, sizeof msg, dd->ipath_lasterror & 406 int iserr;
407 ~INFINIPATH_E_IBSTATUSCHANGED); 407 iserr = ipath_decode_err(msg, sizeof msg,
408 dd->ipath_lasterror &
409 ~INFINIPATH_E_IBSTATUSCHANGED);
408 if (dd->ipath_lasterror & 410 if (dd->ipath_lasterror &
409 ~(INFINIPATH_E_RRCVEGRFULL | INFINIPATH_E_RRCVHDRFULL)) 411 ~(INFINIPATH_E_RRCVEGRFULL |
412 INFINIPATH_E_RRCVHDRFULL | INFINIPATH_E_PKTERRS))
410 ipath_dev_err(dd, "Suppressed %u messages for " 413 ipath_dev_err(dd, "Suppressed %u messages for "
411 "fast-repeating errors (%s) (%llx)\n", 414 "fast-repeating errors (%s) (%llx)\n",
412 supp_msgs, msg, 415 supp_msgs, msg,
@@ -420,8 +423,13 @@ static void handle_supp_msgs(struct ipath_devdata *dd,
420 * them. So only complain about these at debug 423 * them. So only complain about these at debug
421 * level. 424 * level.
422 */ 425 */
423 ipath_dbg("Suppressed %u messages for %s\n", 426 if (iserr)
424 supp_msgs, msg); 427 ipath_dbg("Suppressed %u messages for %s\n",
428 supp_msgs, msg);
429 else
430 ipath_cdbg(ERRPKT,
431 "Suppressed %u messages for %s\n",
432 supp_msgs, msg);
425 } 433 }
426 } 434 }
427} 435}
@@ -462,7 +470,7 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs)
462{ 470{
463 char msg[512]; 471 char msg[512];
464 u64 ignore_this_time = 0; 472 u64 ignore_this_time = 0;
465 int i; 473 int i, iserr = 0;
466 int chkerrpkts = 0, noprint = 0; 474 int chkerrpkts = 0, noprint = 0;
467 unsigned supp_msgs; 475 unsigned supp_msgs;
468 476
@@ -502,6 +510,7 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs)
502 } 510 }
503 511
504 if (supp_msgs == 250000) { 512 if (supp_msgs == 250000) {
513 int s_iserr;
505 /* 514 /*
506 * It's not entirely reasonable assuming that the errors set 515 * It's not entirely reasonable assuming that the errors set
507 * in the last clear period are all responsible for the 516 * in the last clear period are all responsible for the
@@ -511,17 +520,17 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs)
511 dd->ipath_maskederrs |= dd->ipath_lasterror | errs; 520 dd->ipath_maskederrs |= dd->ipath_lasterror | errs;
512 ipath_write_kreg(dd, dd->ipath_kregs->kr_errormask, 521 ipath_write_kreg(dd, dd->ipath_kregs->kr_errormask,
513 ~dd->ipath_maskederrs); 522 ~dd->ipath_maskederrs);
514 ipath_decode_err(msg, sizeof msg, 523 s_iserr = ipath_decode_err(msg, sizeof msg,
515 (dd->ipath_maskederrs & ~dd-> 524 (dd->ipath_maskederrs & ~dd->
516 ipath_ignorederrs)); 525 ipath_ignorederrs));
517 526
518 if ((dd->ipath_maskederrs & ~dd->ipath_ignorederrs) & 527 if ((dd->ipath_maskederrs & ~dd->ipath_ignorederrs) &
519 ~(INFINIPATH_E_RRCVEGRFULL | INFINIPATH_E_RRCVHDRFULL)) 528 ~(INFINIPATH_E_RRCVEGRFULL |
520 ipath_dev_err(dd, "Disabling error(s) %llx because " 529 INFINIPATH_E_RRCVHDRFULL | INFINIPATH_E_PKTERRS))
521 "occurring too frequently (%s)\n", 530 ipath_dev_err(dd, "Temporarily disabling "
522 (unsigned long long) 531 "error(s) %llx reporting; too frequent (%s)\n",
523 (dd->ipath_maskederrs & 532 (unsigned long long) (dd->ipath_maskederrs &
524 ~dd->ipath_ignorederrs), msg); 533 ~dd->ipath_ignorederrs), msg);
525 else { 534 else {
526 /* 535 /*
527 * rcvegrfull and rcvhdrqfull are "normal", 536 * rcvegrfull and rcvhdrqfull are "normal",
@@ -530,8 +539,15 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs)
530 * processing them. So only complain about 539 * processing them. So only complain about
531 * these at debug level. 540 * these at debug level.
532 */ 541 */
533 ipath_dbg("Disabling frequent queue full errors " 542 if (s_iserr)
534 "(%s)\n", msg); 543 ipath_dbg("Temporarily disabling reporting "
544 "too frequent queue full errors (%s)\n",
545 msg);
546 else
547 ipath_cdbg(ERRPKT,
548 "Temporarily disabling reporting too"
549 " frequent packet errors (%s)\n",
550 msg);
535 } 551 }
536 552
537 /* 553 /*
@@ -589,6 +605,8 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs)
589 ipath_stats.sps_crcerrs++; 605 ipath_stats.sps_crcerrs++;
590 chkerrpkts = 1; 606 chkerrpkts = 1;
591 } 607 }
608 iserr = errs & ~(E_SUM_PKTERRS | INFINIPATH_E_PKTERRS);
609
592 610
593 /* 611 /*
594 * We don't want to print these two as they happen, or we can make 612 * We don't want to print these two as they happen, or we can make
@@ -677,8 +695,13 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs)
677 *dd->ipath_statusp &= ~IPATH_STATUS_IB_CONF; 695 *dd->ipath_statusp &= ~IPATH_STATUS_IB_CONF;
678 } 696 }
679 697
680 if (!noprint && *msg) 698 if (!noprint && *msg) {
681 ipath_dev_err(dd, "%s error\n", msg); 699 if (iserr)
700 ipath_dev_err(dd, "%s error\n", msg);
701 else
702 dev_info(&dd->pcidev->dev, "%s packet problems\n",
703 msg);
704 }
682 if (dd->ipath_state_wanted & dd->ipath_flags) { 705 if (dd->ipath_state_wanted & dd->ipath_flags) {
683 ipath_cdbg(VERBOSE, "driver wanted state %x, iflags now %x, " 706 ipath_cdbg(VERBOSE, "driver wanted state %x, iflags now %x, "
684 "waking\n", dd->ipath_state_wanted, 707 "waking\n", dd->ipath_state_wanted,