qlnx_def.h (318657) | qlnx_def.h (318659) |
---|---|
1/* 2 * Copyright (c) 2017-2018 Cavium, Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 10 unchanged lines hidden (view full) --- 19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 * POSSIBILITY OF SUCH DAMAGE. 26 * | 1/* 2 * Copyright (c) 2017-2018 Cavium, Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * --- 10 unchanged lines hidden (view full) --- 19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 25 * POSSIBILITY OF SUCH DAMAGE. 26 * |
27 * $FreeBSD: stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h 318657 2017-05-22 19:22:06Z davidcs $ | 27 * $FreeBSD: stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h 318659 2017-05-22 19:28:38Z davidcs $ |
28 * 29 */ 30 31 32 33/* 34 * File: qlnx_def.h 35 * Author : David C Somayajulu, Cavium Inc., San Jose, CA 95131. --- 442 unchanged lines hidden (view full) --- 478#define for_each_rss(i) for (i = 0; i < ha->num_rss; i++) 479 480/* 481 * Debug Related 482 */ 483 484#ifdef QLNX_DEBUG 485 | 28 * 29 */ 30 31 32 33/* 34 * File: qlnx_def.h 35 * Author : David C Somayajulu, Cavium Inc., San Jose, CA 95131. --- 442 unchanged lines hidden (view full) --- 478#define for_each_rss(i) for (i = 0; i < ha->num_rss; i++) 479 480/* 481 * Debug Related 482 */ 483 484#ifdef QLNX_DEBUG 485 |
486#define QL_DPRINT1(ha, x) if (ha->dbg_level & 0x0001) device_printf x 487#define QL_DPRINT2(ha, x) if (ha->dbg_level & 0x0002) device_printf x 488#define QL_DPRINT3(ha, x) if (ha->dbg_level & 0x0004) device_printf x 489#define QL_DPRINT4(ha, x) if (ha->dbg_level & 0x0008) device_printf x 490#define QL_DPRINT5(ha, x) if (ha->dbg_level & 0x0010) device_printf x 491#define QL_DPRINT6(ha, x) if (ha->dbg_level & 0x0020) device_printf x 492#define QL_DPRINT7(ha, x) if (ha->dbg_level & 0x0040) device_printf x 493#define QL_DPRINT8(ha, x) if (ha->dbg_level & 0x0080) device_printf x 494#define QL_DPRINT9(ha, x) if (ha->dbg_level & 0x0100) device_printf x 495#define QL_DPRINT11(ha, x) if (ha->dbg_level & 0x0400) device_printf x 496#define QL_DPRINT12(ha, x) if (ha->dbg_level & 0x0800) device_printf x 497#define QL_DPRINT13(ha, x) if (ha->dbg_level & 0x1000) device_printf x 498#define QL_DPRINT14(ha, x) if (ha->dbg_level & 0x2000) device_printf x | 486#define QL_DPRINT1(ha, x, ...) \ 487 do { \ 488 if ((ha)->dbg_level & 0x0001) { \ 489 device_printf ((ha)->pci_dev, \ 490 "[%s:%d]" x, \ 491 __func__, __LINE__, \ 492 ## __VA_ARGS__); \ 493 } \ 494 } while (0) |
499 | 495 |
496#define QL_DPRINT2(ha, x, ...) \ 497 do { \ 498 if ((ha)->dbg_level & 0x0002) { \ 499 device_printf ((ha)->pci_dev, \ 500 "[%s:%d]" x, \ 501 __func__, __LINE__, \ 502 ## __VA_ARGS__); \ 503 } \ 504 } while (0) 505 506#define QL_DPRINT3(ha, x, ...) \ 507 do { \ 508 if ((ha)->dbg_level & 0x0004) { \ 509 device_printf ((ha)->pci_dev, \ 510 "[%s:%d]" x, \ 511 __func__, __LINE__, \ 512 ## __VA_ARGS__); \ 513 } \ 514 } while (0) 515 516#define QL_DPRINT4(ha, x, ...) \ 517 do { \ 518 if ((ha)->dbg_level & 0x0008) { \ 519 device_printf ((ha)->pci_dev, \ 520 "[%s:%d]" x, \ 521 __func__, __LINE__, \ 522 ## __VA_ARGS__); \ 523 } \ 524 } while (0) 525 526#define QL_DPRINT5(ha, x, ...) \ 527 do { \ 528 if ((ha)->dbg_level & 0x0010) { \ 529 device_printf ((ha)->pci_dev, \ 530 "[%s:%d]" x, \ 531 __func__, __LINE__, \ 532 ## __VA_ARGS__); \ 533 } \ 534 } while (0) 535 536#define QL_DPRINT6(ha, x, ...) \ 537 do { \ 538 if ((ha)->dbg_level & 0x0020) { \ 539 device_printf ((ha)->pci_dev, \ 540 "[%s:%d]" x, \ 541 __func__, __LINE__, \ 542 ## __VA_ARGS__); \ 543 } \ 544 } while (0) 545 546#define QL_DPRINT7(ha, x, ...) \ 547 do { \ 548 if ((ha)->dbg_level & 0x0040) { \ 549 device_printf ((ha)->pci_dev, \ 550 "[%s:%d]" x, \ 551 __func__, __LINE__, \ 552 ## __VA_ARGS__); \ 553 } \ 554 } while (0) 555 556#define QL_DPRINT8(ha, x, ...) \ 557 do { \ 558 if ((ha)->dbg_level & 0x0080) { \ 559 device_printf ((ha)->pci_dev, \ 560 "[%s:%d]" x, \ 561 __func__, __LINE__, \ 562 ## __VA_ARGS__); \ 563 } \ 564 } while (0) 565 566#define QL_DPRINT9(ha, x, ...) \ 567 do { \ 568 if ((ha)->dbg_level & 0x0100) { \ 569 device_printf ((ha)->pci_dev, \ 570 "[%s:%d]" x, \ 571 __func__, __LINE__, \ 572 ## __VA_ARGS__); \ 573 } \ 574 } while (0) 575 576#define QL_DPRINT11(ha, x, ...) \ 577 do { \ 578 if ((ha)->dbg_level & 0x0400) { \ 579 device_printf ((ha)->pci_dev, \ 580 "[%s:%d]" x, \ 581 __func__, __LINE__, \ 582 ## __VA_ARGS__); \ 583 } \ 584 } while (0) 585 586#define QL_DPRINT12(ha, x, ...) \ 587 do { \ 588 if ((ha)->dbg_level & 0x0800) { \ 589 device_printf ((ha)->pci_dev, \ 590 "[%s:%d]" x, \ 591 __func__, __LINE__, \ 592 ## __VA_ARGS__); \ 593 } \ 594 } while (0) 595 596#define QL_DPRINT13(ha, x, ...) \ 597 do { \ 598 if ((ha)->dbg_level & 0x1000) { \ 599 device_printf ((ha)->pci_dev, \ 600 "[%s:%d]" x, \ 601 __func__, __LINE__, \ 602 ## __VA_ARGS__); \ 603 } \ 604 } while (0) 605 606 |
|
500#else 501 | 607#else 608 |
502#define QL_DPRINT1(ha, x) 503#define QL_DPRINT2(ha, x) 504#define QL_DPRINT3(ha, x) 505#define QL_DPRINT4(ha, x) 506#define QL_DPRINT5(ha, x) 507#define QL_DPRINT6(ha, x) 508#define QL_DPRINT7(ha, x) 509#define QL_DPRINT8(ha, x) 510#define QL_DPRINT9(ha, x) 511#define QL_DPRINT11(ha, x) 512#define QL_DPRINT12(ha, x) 513#define QL_DPRINT13(ha, x) 514#define QL_DPRINT14(ha, x) | 609#define QL_DPRINT1(ha, x, ...) 610#define QL_DPRINT2(ha, x, ...) 611#define QL_DPRINT3(ha, x, ...) 612#define QL_DPRINT4(ha, x, ...) 613#define QL_DPRINT5(ha, x, ...) 614#define QL_DPRINT6(ha, x, ...) 615#define QL_DPRINT7(ha, x, ...) 616#define QL_DPRINT8(ha, x, ...) 617#define QL_DPRINT9(ha, x, ...) 618#define QL_DPRINT11(ha, x, ...) 619#define QL_DPRINT12(ha, x, ...) 620#define QL_DPRINT13(ha, x, ...) |
515 516#endif /* #ifdef QLNX_DEBUG */ 517 518#define QL_ASSERT(ha, x, y) if (!x) panic y 519 520#define QL_ERR_INJECT(ha, val) (ha->err_inject == val) 521#define QL_RESET_ERR_INJECT(ha, val) {if (ha->err_inject == val) ha->err_inject = 0;} 522#define QL_ERR_INJCT_TX_INT_DIFF 0x0001 --- 79 unchanged lines hidden --- | 621 622#endif /* #ifdef QLNX_DEBUG */ 623 624#define QL_ASSERT(ha, x, y) if (!x) panic y 625 626#define QL_ERR_INJECT(ha, val) (ha->err_inject == val) 627#define QL_RESET_ERR_INJECT(ha, val) {if (ha->err_inject == val) ha->err_inject = 0;} 628#define QL_ERR_INJCT_TX_INT_DIFF 0x0001 --- 79 unchanged lines hidden --- |