diff options
author | Dave Olson <dave.olson@qlogic.com> | 2008-01-08 04:51:46 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-01-25 17:17:43 -0500 |
commit | ddb70c83a5ce439271f1699e52a97785a8b45b81 (patch) | |
tree | dec9a6a75c595a5348c7970cadd40465b59a4fef /drivers/infiniband/hw | |
parent | 359193ef433061515fe24d57e5bd5a1318d71bc3 (diff) |
IB/ipath: Minor cleanup of unused fields and chip-specific errors
Clean up some unused header fields, minor related cleanup.
Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_iba6120.c | 79 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_kernel.h | 5 |
2 files changed, 25 insertions, 59 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_iba6120.c b/drivers/infiniband/hw/ipath/ipath_iba6120.c index 597192e912de..c7a2f50824c0 100644 --- a/drivers/infiniband/hw/ipath/ipath_iba6120.c +++ b/drivers/infiniband/hw/ipath/ipath_iba6120.c | |||
@@ -373,10 +373,28 @@ static const struct ipath_hwerror_msgs ipath_6120_hwerror_msgs[] = { | |||
373 | INFINIPATH_HWE_TXEMEMPARITYERR_PIOPBC) \ | 373 | INFINIPATH_HWE_TXEMEMPARITYERR_PIOPBC) \ |
374 | << INFINIPATH_HWE_TXEMEMPARITYERR_SHIFT) | 374 | << INFINIPATH_HWE_TXEMEMPARITYERR_SHIFT) |
375 | 375 | ||
376 | static int ipath_pe_txe_recover(struct ipath_devdata *); | ||
377 | static void ipath_pe_put_tid_2(struct ipath_devdata *, u64 __iomem *, | 376 | static void ipath_pe_put_tid_2(struct ipath_devdata *, u64 __iomem *, |
378 | u32, unsigned long); | 377 | u32, unsigned long); |
379 | 378 | ||
379 | /* | ||
380 | * On platforms using this chip, and not having ordered WC stores, we | ||
381 | * can get TXE parity errors due to speculative reads to the PIO buffers, | ||
382 | * and this, due to a chip bug can result in (many) false parity error | ||
383 | * reports. So it's a debug print on those, and an info print on systems | ||
384 | * where the speculative reads don't occur. | ||
385 | */ | ||
386 | static void ipath_pe_txe_recover(struct ipath_devdata *dd) | ||
387 | { | ||
388 | if (ipath_unordered_wc()) | ||
389 | ipath_dbg("Recovering from TXE PIO parity error\n"); | ||
390 | else { | ||
391 | ++ipath_stats.sps_txeparity; | ||
392 | dev_info(&dd->pcidev->dev, | ||
393 | "Recovering from TXE PIO parity error\n"); | ||
394 | } | ||
395 | } | ||
396 | |||
397 | |||
380 | /** | 398 | /** |
381 | * ipath_pe_handle_hwerrors - display hardware errors. | 399 | * ipath_pe_handle_hwerrors - display hardware errors. |
382 | * @dd: the infinipath device | 400 | * @dd: the infinipath device |
@@ -456,35 +474,11 @@ static void ipath_pe_handle_hwerrors(struct ipath_devdata *dd, char *msg, | |||
456 | * occur if a processor speculative read is done to the PIO | 474 | * occur if a processor speculative read is done to the PIO |
457 | * buffer while we are sending a packet, for example. | 475 | * buffer while we are sending a packet, for example. |
458 | */ | 476 | */ |
459 | if ((hwerrs & TXE_PIO_PARITY) && ipath_pe_txe_recover(dd)) | 477 | if (hwerrs & TXE_PIO_PARITY) { |
478 | ipath_pe_txe_recover(dd); | ||
460 | hwerrs &= ~TXE_PIO_PARITY; | 479 | hwerrs &= ~TXE_PIO_PARITY; |
461 | if (hwerrs) { | 480 | } |
462 | /* | 481 | if (!hwerrs) { |
463 | * if any set that we aren't ignoring only make the | ||
464 | * complaint once, in case it's stuck or recurring, | ||
465 | * and we get here multiple times | ||
466 | * Force link down, so switch knows, and | ||
467 | * LEDs are turned off | ||
468 | */ | ||
469 | if (dd->ipath_flags & IPATH_INITTED) { | ||
470 | ipath_set_linkstate(dd, IPATH_IB_LINKDOWN); | ||
471 | ipath_setup_pe_setextled(dd, | ||
472 | INFINIPATH_IBCS_L_STATE_DOWN, | ||
473 | INFINIPATH_IBCS_LT_STATE_DISABLED); | ||
474 | ipath_dev_err(dd, "Fatal Hardware Error (freeze " | ||
475 | "mode), no longer usable, SN %.16s\n", | ||
476 | dd->ipath_serial); | ||
477 | isfatal = 1; | ||
478 | } | ||
479 | /* | ||
480 | * Mark as having had an error for driver, and also | ||
481 | * for /sys and status word mapped to user programs. | ||
482 | * This marks unit as not usable, until reset | ||
483 | */ | ||
484 | *dd->ipath_statusp &= ~IPATH_STATUS_IB_READY; | ||
485 | *dd->ipath_statusp |= IPATH_STATUS_HWERROR; | ||
486 | dd->ipath_flags &= ~IPATH_INITTED; | ||
487 | } else { | ||
488 | static u32 freeze_cnt; | 482 | static u32 freeze_cnt; |
489 | 483 | ||
490 | freeze_cnt++; | 484 | freeze_cnt++; |
@@ -1569,33 +1563,6 @@ static void ipath_pe_read_counters(struct ipath_devdata *dd, | |||
1569 | cntrs->RxDlidFltrCnt = 0; | 1563 | cntrs->RxDlidFltrCnt = 0; |
1570 | } | 1564 | } |
1571 | 1565 | ||
1572 | /* | ||
1573 | * On platforms using this chip, and not having ordered WC stores, we | ||
1574 | * can get TXE parity errors due to speculative reads to the PIO buffers, | ||
1575 | * and this, due to a chip bug can result in (many) false parity error | ||
1576 | * reports. So it's a debug print on those, and an info print on systems | ||
1577 | * where the speculative reads don't occur. | ||
1578 | * Because we can get lots of false errors, we have no upper limit | ||
1579 | * on recovery attempts on those platforms. | ||
1580 | */ | ||
1581 | static int ipath_pe_txe_recover(struct ipath_devdata *dd) | ||
1582 | { | ||
1583 | if (ipath_unordered_wc()) | ||
1584 | ipath_dbg("Recovering from TXE PIO parity error\n"); | ||
1585 | else { | ||
1586 | int cnt = ++ipath_stats.sps_txeparity; | ||
1587 | if (cnt >= IPATH_MAX_PARITY_ATTEMPTS) { | ||
1588 | if (cnt == IPATH_MAX_PARITY_ATTEMPTS) | ||
1589 | ipath_dev_err(dd, | ||
1590 | "Too many attempts to recover from " | ||
1591 | "TXE parity, giving up\n"); | ||
1592 | return 0; | ||
1593 | } | ||
1594 | dev_info(&dd->pcidev->dev, | ||
1595 | "Recovering from TXE PIO parity error\n"); | ||
1596 | } | ||
1597 | return 1; | ||
1598 | } | ||
1599 | 1566 | ||
1600 | /* no interrupt fallback for these chips */ | 1567 | /* no interrupt fallback for these chips */ |
1601 | static int ipath_pe_nointr_fallback(struct ipath_devdata *dd) | 1568 | static int ipath_pe_nointr_fallback(struct ipath_devdata *dd) |
diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h index 3da8dd79d26e..31d79e246aa0 100644 --- a/drivers/infiniband/hw/ipath/ipath_kernel.h +++ b/drivers/infiniband/hw/ipath/ipath_kernel.h | |||
@@ -396,14 +396,13 @@ struct ipath_devdata { | |||
396 | unsigned long ipath_wc_len; | 396 | unsigned long ipath_wc_len; |
397 | /* ref count for each pkey */ | 397 | /* ref count for each pkey */ |
398 | atomic_t ipath_pkeyrefs[4]; | 398 | atomic_t ipath_pkeyrefs[4]; |
399 | /* shadow copy of all exptids physaddr; used only by funcsim */ | ||
400 | u64 *ipath_tidsimshadow; | ||
401 | /* shadow copy of struct page *'s for exp tid pages */ | 399 | /* shadow copy of struct page *'s for exp tid pages */ |
402 | struct page **ipath_pageshadow; | 400 | struct page **ipath_pageshadow; |
403 | /* shadow copy of dma handles for exp tid pages */ | 401 | /* shadow copy of dma handles for exp tid pages */ |
404 | dma_addr_t *ipath_physshadow; | 402 | dma_addr_t *ipath_physshadow; |
405 | u64 __iomem *ipath_egrtidbase; | 403 | u64 __iomem *ipath_egrtidbase; |
406 | /* lock to workaround chip bug 9437 */ | 404 | /* lock to workaround chip bug 9437 and others */ |
405 | spinlock_t ipath_kernel_tid_lock; | ||
407 | spinlock_t ipath_tid_lock; | 406 | spinlock_t ipath_tid_lock; |
408 | spinlock_t ipath_sendctrl_lock; | 407 | spinlock_t ipath_sendctrl_lock; |
409 | 408 | ||