diff options
author | Joe Perches <joe@perches.com> | 2013-04-13 15:03:19 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-14 15:41:49 -0400 |
commit | c84d8055e0c9971109f426f6c551e8be644f284b (patch) | |
tree | 11c2d796a655aa9b2f8515de8d45a0ca84329a5b | |
parent | 375d6a1b428e28412913a0ef8e849d27f7d32a1e (diff) |
ucc_geth: Convert ugeth_<level> to pr_<level>
Remove unnecessary macros that duplicate generic
kernel functions.
When a struct net_device is available:
Convert printks to netdev_<level>
Convert netif_msg_<foo> and ugeth_<level> to netif_<level>
Add pr_fmt. Standardize on newlines at end of format.
Remove some duplicated newlines from output.
Coalesce formats.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/freescale/ucc_geth.c | 881 | ||||
-rw-r--r-- | drivers/net/ethernet/freescale/ucc_geth_ethtool.c | 24 |
2 files changed, 403 insertions, 502 deletions
diff --git a/drivers/net/ethernet/freescale/ucc_geth.c b/drivers/net/ethernet/freescale/ucc_geth.c index 0a70bb55d1b0..e04c59818f60 100644 --- a/drivers/net/ethernet/freescale/ucc_geth.c +++ b/drivers/net/ethernet/freescale/ucc_geth.c | |||
@@ -12,6 +12,9 @@ | |||
12 | * Free Software Foundation; either version 2 of the License, or (at your | 12 | * Free Software Foundation; either version 2 of the License, or (at your |
13 | * option) any later version. | 13 | * option) any later version. |
14 | */ | 14 | */ |
15 | |||
16 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
17 | |||
15 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 19 | #include <linux/init.h> |
17 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
@@ -50,12 +53,6 @@ | |||
50 | 53 | ||
51 | #define ugeth_dbg(format, arg...) \ | 54 | #define ugeth_dbg(format, arg...) \ |
52 | ugeth_printk(KERN_DEBUG , format , ## arg) | 55 | ugeth_printk(KERN_DEBUG , format , ## arg) |
53 | #define ugeth_err(format, arg...) \ | ||
54 | ugeth_printk(KERN_ERR , format , ## arg) | ||
55 | #define ugeth_info(format, arg...) \ | ||
56 | ugeth_printk(KERN_INFO , format , ## arg) | ||
57 | #define ugeth_warn(format, arg...) \ | ||
58 | ugeth_printk(KERN_WARNING , format , ## arg) | ||
59 | 56 | ||
60 | #ifdef UGETH_VERBOSE_DEBUG | 57 | #ifdef UGETH_VERBOSE_DEBUG |
61 | #define ugeth_vdbg ugeth_dbg | 58 | #define ugeth_vdbg ugeth_dbg |
@@ -281,7 +278,7 @@ static int fill_init_enet_entries(struct ucc_geth_private *ugeth, | |||
281 | for (i = 0; i < num_entries; i++) { | 278 | for (i = 0; i < num_entries; i++) { |
282 | if ((snum = qe_get_snum()) < 0) { | 279 | if ((snum = qe_get_snum()) < 0) { |
283 | if (netif_msg_ifup(ugeth)) | 280 | if (netif_msg_ifup(ugeth)) |
284 | ugeth_err("fill_init_enet_entries: Can not get SNUM."); | 281 | pr_err("Can not get SNUM\n"); |
285 | return snum; | 282 | return snum; |
286 | } | 283 | } |
287 | if ((i == 0) && skip_page_for_first_entry) | 284 | if ((i == 0) && skip_page_for_first_entry) |
@@ -292,7 +289,7 @@ static int fill_init_enet_entries(struct ucc_geth_private *ugeth, | |||
292 | qe_muram_alloc(thread_size, thread_alignment); | 289 | qe_muram_alloc(thread_size, thread_alignment); |
293 | if (IS_ERR_VALUE(init_enet_offset)) { | 290 | if (IS_ERR_VALUE(init_enet_offset)) { |
294 | if (netif_msg_ifup(ugeth)) | 291 | if (netif_msg_ifup(ugeth)) |
295 | ugeth_err("fill_init_enet_entries: Can not allocate DPRAM memory."); | 292 | pr_err("Can not allocate DPRAM memory\n"); |
296 | qe_put_snum((u8) snum); | 293 | qe_put_snum((u8) snum); |
297 | return -ENOMEM; | 294 | return -ENOMEM; |
298 | } | 295 | } |
@@ -365,10 +362,9 @@ static int dump_init_enet_entries(struct ucc_geth_private *ugeth, | |||
365 | init_enet_offset = | 362 | init_enet_offset = |
366 | (in_be32(p_start) & | 363 | (in_be32(p_start) & |
367 | ENET_INIT_PARAM_PTR_MASK); | 364 | ENET_INIT_PARAM_PTR_MASK); |
368 | ugeth_info("Init enet entry %d:", i); | 365 | pr_info("Init enet entry %d:\n", i); |
369 | ugeth_info("Base address: 0x%08x", | 366 | pr_info("Base address: 0x%08x\n", |
370 | (u32) | 367 | (u32)qe_muram_addr(init_enet_offset)); |
371 | qe_muram_addr(init_enet_offset)); | ||
372 | mem_disp(qe_muram_addr(init_enet_offset), | 368 | mem_disp(qe_muram_addr(init_enet_offset), |
373 | thread_size); | 369 | thread_size); |
374 | } | 370 | } |
@@ -396,8 +392,8 @@ static int hw_clear_addr_in_paddr(struct ucc_geth_private *ugeth, u8 paddr_num) | |||
396 | { | 392 | { |
397 | struct ucc_geth_82xx_address_filtering_pram __iomem *p_82xx_addr_filt; | 393 | struct ucc_geth_82xx_address_filtering_pram __iomem *p_82xx_addr_filt; |
398 | 394 | ||
399 | if (!(paddr_num < NUM_OF_PADDRS)) { | 395 | if (paddr_num >= NUM_OF_PADDRS) { |
400 | ugeth_warn("%s: Illagel paddr_num.", __func__); | 396 | pr_warn("%s: Invalid paddr_num: %u\n", __func__, paddr_num); |
401 | return -EINVAL; | 397 | return -EINVAL; |
402 | } | 398 | } |
403 | 399 | ||
@@ -573,7 +569,7 @@ static void dump_bds(struct ucc_geth_private *ugeth) | |||
573 | length = | 569 | length = |
574 | (ugeth->ug_info->bdRingLenTx[i] * | 570 | (ugeth->ug_info->bdRingLenTx[i] * |
575 | sizeof(struct qe_bd)); | 571 | sizeof(struct qe_bd)); |
576 | ugeth_info("TX BDs[%d]", i); | 572 | pr_info("TX BDs[%d]\n", i); |
577 | mem_disp(ugeth->p_tx_bd_ring[i], length); | 573 | mem_disp(ugeth->p_tx_bd_ring[i], length); |
578 | } | 574 | } |
579 | } | 575 | } |
@@ -582,7 +578,7 @@ static void dump_bds(struct ucc_geth_private *ugeth) | |||
582 | length = | 578 | length = |
583 | (ugeth->ug_info->bdRingLenRx[i] * | 579 | (ugeth->ug_info->bdRingLenRx[i] * |
584 | sizeof(struct qe_bd)); | 580 | sizeof(struct qe_bd)); |
585 | ugeth_info("RX BDs[%d]", i); | 581 | pr_info("RX BDs[%d]\n", i); |
586 | mem_disp(ugeth->p_rx_bd_ring[i], length); | 582 | mem_disp(ugeth->p_rx_bd_ring[i], length); |
587 | } | 583 | } |
588 | } | 584 | } |
@@ -592,93 +588,93 @@ static void dump_regs(struct ucc_geth_private *ugeth) | |||
592 | { | 588 | { |
593 | int i; | 589 | int i; |
594 | 590 | ||
595 | ugeth_info("UCC%d Geth registers:", ugeth->ug_info->uf_info.ucc_num + 1); | 591 | pr_info("UCC%d Geth registers:\n", ugeth->ug_info->uf_info.ucc_num + 1); |
596 | ugeth_info("Base address: 0x%08x", (u32) ugeth->ug_regs); | 592 | pr_info("Base address: 0x%08x\n", (u32)ugeth->ug_regs); |
597 | 593 | ||
598 | ugeth_info("maccfg1 : addr - 0x%08x, val - 0x%08x", | 594 | pr_info("maccfg1 : addr - 0x%08x, val - 0x%08x\n", |
599 | (u32) & ugeth->ug_regs->maccfg1, | 595 | (u32)&ugeth->ug_regs->maccfg1, |
600 | in_be32(&ugeth->ug_regs->maccfg1)); | 596 | in_be32(&ugeth->ug_regs->maccfg1)); |
601 | ugeth_info("maccfg2 : addr - 0x%08x, val - 0x%08x", | 597 | pr_info("maccfg2 : addr - 0x%08x, val - 0x%08x\n", |
602 | (u32) & ugeth->ug_regs->maccfg2, | 598 | (u32)&ugeth->ug_regs->maccfg2, |
603 | in_be32(&ugeth->ug_regs->maccfg2)); | 599 | in_be32(&ugeth->ug_regs->maccfg2)); |
604 | ugeth_info("ipgifg : addr - 0x%08x, val - 0x%08x", | 600 | pr_info("ipgifg : addr - 0x%08x, val - 0x%08x\n", |
605 | (u32) & ugeth->ug_regs->ipgifg, | 601 | (u32)&ugeth->ug_regs->ipgifg, |
606 | in_be32(&ugeth->ug_regs->ipgifg)); | 602 | in_be32(&ugeth->ug_regs->ipgifg)); |
607 | ugeth_info("hafdup : addr - 0x%08x, val - 0x%08x", | 603 | pr_info("hafdup : addr - 0x%08x, val - 0x%08x\n", |
608 | (u32) & ugeth->ug_regs->hafdup, | 604 | (u32)&ugeth->ug_regs->hafdup, |
609 | in_be32(&ugeth->ug_regs->hafdup)); | 605 | in_be32(&ugeth->ug_regs->hafdup)); |
610 | ugeth_info("ifctl : addr - 0x%08x, val - 0x%08x", | 606 | pr_info("ifctl : addr - 0x%08x, val - 0x%08x\n", |
611 | (u32) & ugeth->ug_regs->ifctl, | 607 | (u32)&ugeth->ug_regs->ifctl, |
612 | in_be32(&ugeth->ug_regs->ifctl)); | 608 | in_be32(&ugeth->ug_regs->ifctl)); |
613 | ugeth_info("ifstat : addr - 0x%08x, val - 0x%08x", | 609 | pr_info("ifstat : addr - 0x%08x, val - 0x%08x\n", |
614 | (u32) & ugeth->ug_regs->ifstat, | 610 | (u32)&ugeth->ug_regs->ifstat, |
615 | in_be32(&ugeth->ug_regs->ifstat)); | 611 | in_be32(&ugeth->ug_regs->ifstat)); |
616 | ugeth_info("macstnaddr1: addr - 0x%08x, val - 0x%08x", | 612 | pr_info("macstnaddr1: addr - 0x%08x, val - 0x%08x\n", |
617 | (u32) & ugeth->ug_regs->macstnaddr1, | 613 | (u32)&ugeth->ug_regs->macstnaddr1, |
618 | in_be32(&ugeth->ug_regs->macstnaddr1)); | 614 | in_be32(&ugeth->ug_regs->macstnaddr1)); |
619 | ugeth_info("macstnaddr2: addr - 0x%08x, val - 0x%08x", | 615 | pr_info("macstnaddr2: addr - 0x%08x, val - 0x%08x\n", |
620 | (u32) & ugeth->ug_regs->macstnaddr2, | 616 | (u32)&ugeth->ug_regs->macstnaddr2, |
621 | in_be32(&ugeth->ug_regs->macstnaddr2)); | 617 | in_be32(&ugeth->ug_regs->macstnaddr2)); |
622 | ugeth_info("uempr : addr - 0x%08x, val - 0x%08x", | 618 | pr_info("uempr : addr - 0x%08x, val - 0x%08x\n", |
623 | (u32) & ugeth->ug_regs->uempr, | 619 | (u32)&ugeth->ug_regs->uempr, |
624 | in_be32(&ugeth->ug_regs->uempr)); | 620 | in_be32(&ugeth->ug_regs->uempr)); |
625 | ugeth_info("utbipar : addr - 0x%08x, val - 0x%08x", | 621 | pr_info("utbipar : addr - 0x%08x, val - 0x%08x\n", |
626 | (u32) & ugeth->ug_regs->utbipar, | 622 | (u32)&ugeth->ug_regs->utbipar, |
627 | in_be32(&ugeth->ug_regs->utbipar)); | 623 | in_be32(&ugeth->ug_regs->utbipar)); |
628 | ugeth_info("uescr : addr - 0x%08x, val - 0x%04x", | 624 | pr_info("uescr : addr - 0x%08x, val - 0x%04x\n", |
629 | (u32) & ugeth->ug_regs->uescr, | 625 | (u32)&ugeth->ug_regs->uescr, |
630 | in_be16(&ugeth->ug_regs->uescr)); | 626 | in_be16(&ugeth->ug_regs->uescr)); |
631 | ugeth_info("tx64 : addr - 0x%08x, val - 0x%08x", | 627 | pr_info("tx64 : addr - 0x%08x, val - 0x%08x\n", |
632 | (u32) & ugeth->ug_regs->tx64, | 628 | (u32)&ugeth->ug_regs->tx64, |
633 | in_be32(&ugeth->ug_regs->tx64)); | 629 | in_be32(&ugeth->ug_regs->tx64)); |
634 | ugeth_info("tx127 : addr - 0x%08x, val - 0x%08x", | 630 | pr_info("tx127 : addr - 0x%08x, val - 0x%08x\n", |
635 | (u32) & ugeth->ug_regs->tx127, | 631 | (u32)&ugeth->ug_regs->tx127, |
636 | in_be32(&ugeth->ug_regs->tx127)); | 632 | in_be32(&ugeth->ug_regs->tx127)); |
637 | ugeth_info("tx255 : addr - 0x%08x, val - 0x%08x", | 633 | pr_info("tx255 : addr - 0x%08x, val - 0x%08x\n", |
638 | (u32) & ugeth->ug_regs->tx255, | 634 | (u32)&ugeth->ug_regs->tx255, |
639 | in_be32(&ugeth->ug_regs->tx255)); | 635 | in_be32(&ugeth->ug_regs->tx255)); |
640 | ugeth_info("rx64 : addr - 0x%08x, val - 0x%08x", | 636 | pr_info("rx64 : addr - 0x%08x, val - 0x%08x\n", |
641 | (u32) & ugeth->ug_regs->rx64, | 637 | (u32)&ugeth->ug_regs->rx64, |
642 | in_be32(&ugeth->ug_regs->rx64)); | 638 | in_be32(&ugeth->ug_regs->rx64)); |
643 | ugeth_info("rx127 : addr - 0x%08x, val - 0x%08x", | 639 | pr_info("rx127 : addr - 0x%08x, val - 0x%08x\n", |
644 | (u32) & ugeth->ug_regs->rx127, | 640 | (u32)&ugeth->ug_regs->rx127, |
645 | in_be32(&ugeth->ug_regs->rx127)); | 641 | in_be32(&ugeth->ug_regs->rx127)); |
646 | ugeth_info("rx255 : addr - 0x%08x, val - 0x%08x", | 642 | pr_info("rx255 : addr - 0x%08x, val - 0x%08x\n", |
647 | (u32) & ugeth->ug_regs->rx255, | 643 | (u32)&ugeth->ug_regs->rx255, |
648 | in_be32(&ugeth->ug_regs->rx255)); | 644 | in_be32(&ugeth->ug_regs->rx255)); |
649 | ugeth_info("txok : addr - 0x%08x, val - 0x%08x", | 645 | pr_info("txok : addr - 0x%08x, val - 0x%08x\n", |
650 | (u32) & ugeth->ug_regs->txok, | 646 | (u32)&ugeth->ug_regs->txok, |
651 | in_be32(&ugeth->ug_regs->txok)); | 647 | in_be32(&ugeth->ug_regs->txok)); |
652 | ugeth_info("txcf : addr - 0x%08x, val - 0x%04x", | 648 | pr_info("txcf : addr - 0x%08x, val - 0x%04x\n", |
653 | (u32) & ugeth->ug_regs->txcf, | 649 | (u32)&ugeth->ug_regs->txcf, |
654 | in_be16(&ugeth->ug_regs->txcf)); | 650 | in_be16(&ugeth->ug_regs->txcf)); |
655 | ugeth_info("tmca : addr - 0x%08x, val - 0x%08x", | 651 | pr_info("tmca : addr - 0x%08x, val - 0x%08x\n", |
656 | (u32) & ugeth->ug_regs->tmca, | 652 | (u32)&ugeth->ug_regs->tmca, |
657 | in_be32(&ugeth->ug_regs->tmca)); | 653 | in_be32(&ugeth->ug_regs->tmca)); |
658 | ugeth_info("tbca : addr - 0x%08x, val - 0x%08x", | 654 | pr_info("tbca : addr - 0x%08x, val - 0x%08x\n", |
659 | (u32) & ugeth->ug_regs->tbca, | 655 | (u32)&ugeth->ug_regs->tbca, |
660 | in_be32(&ugeth->ug_regs->tbca)); | 656 | in_be32(&ugeth->ug_regs->tbca)); |
661 | ugeth_info("rxfok : addr - 0x%08x, val - 0x%08x", | 657 | pr_info("rxfok : addr - 0x%08x, val - 0x%08x\n", |
662 | (u32) & ugeth->ug_regs->rxfok, | 658 | (u32)&ugeth->ug_regs->rxfok, |
663 | in_be32(&ugeth->ug_regs->rxfok)); | 659 | in_be32(&ugeth->ug_regs->rxfok)); |
664 | ugeth_info("rxbok : addr - 0x%08x, val - 0x%08x", | 660 | pr_info("rxbok : addr - 0x%08x, val - 0x%08x\n", |
665 | (u32) & ugeth->ug_regs->rxbok, | 661 | (u32)&ugeth->ug_regs->rxbok, |
666 | in_be32(&ugeth->ug_regs->rxbok)); | 662 | in_be32(&ugeth->ug_regs->rxbok)); |
667 | ugeth_info("rbyt : addr - 0x%08x, val - 0x%08x", | 663 | pr_info("rbyt : addr - 0x%08x, val - 0x%08x\n", |
668 | (u32) & ugeth->ug_regs->rbyt, | 664 | (u32)&ugeth->ug_regs->rbyt, |
669 | in_be32(&ugeth->ug_regs->rbyt)); | 665 | in_be32(&ugeth->ug_regs->rbyt)); |
670 | ugeth_info("rmca : addr - 0x%08x, val - 0x%08x", | 666 | pr_info("rmca : addr - 0x%08x, val - 0x%08x\n", |
671 | (u32) & ugeth->ug_regs->rmca, | 667 | (u32)&ugeth->ug_regs->rmca, |
672 | in_be32(&ugeth->ug_regs->rmca)); | 668 | in_be32(&ugeth->ug_regs->rmca)); |
673 | ugeth_info("rbca : addr - 0x%08x, val - 0x%08x", | 669 | pr_info("rbca : addr - 0x%08x, val - 0x%08x\n", |
674 | (u32) & ugeth->ug_regs->rbca, | 670 | (u32)&ugeth->ug_regs->rbca, |
675 | in_be32(&ugeth->ug_regs->rbca)); | 671 | in_be32(&ugeth->ug_regs->rbca)); |
676 | ugeth_info("scar : addr - 0x%08x, val - 0x%08x", | 672 | pr_info("scar : addr - 0x%08x, val - 0x%08x\n", |
677 | (u32) & ugeth->ug_regs->scar, | 673 | (u32)&ugeth->ug_regs->scar, |
678 | in_be32(&ugeth->ug_regs->scar)); | 674 | in_be32(&ugeth->ug_regs->scar)); |
679 | ugeth_info("scam : addr - 0x%08x, val - 0x%08x", | 675 | pr_info("scam : addr - 0x%08x, val - 0x%08x\n", |
680 | (u32) & ugeth->ug_regs->scam, | 676 | (u32)&ugeth->ug_regs->scam, |
681 | in_be32(&ugeth->ug_regs->scam)); | 677 | in_be32(&ugeth->ug_regs->scam)); |
682 | 678 | ||
683 | if (ugeth->p_thread_data_tx) { | 679 | if (ugeth->p_thread_data_tx) { |
684 | int numThreadsTxNumerical; | 680 | int numThreadsTxNumerical; |
@@ -703,13 +699,13 @@ static void dump_regs(struct ucc_geth_private *ugeth) | |||
703 | break; | 699 | break; |
704 | } | 700 | } |
705 | 701 | ||
706 | ugeth_info("Thread data TXs:"); | 702 | pr_info("Thread data TXs:\n"); |
707 | ugeth_info("Base address: 0x%08x", | 703 | pr_info("Base address: 0x%08x\n", |
708 | (u32) ugeth->p_thread_data_tx); | 704 | (u32)ugeth->p_thread_data_tx); |
709 | for (i = 0; i < numThreadsTxNumerical; i++) { | 705 | for (i = 0; i < numThreadsTxNumerical; i++) { |
710 | ugeth_info("Thread data TX[%d]:", i); | 706 | pr_info("Thread data TX[%d]:\n", i); |
711 | ugeth_info("Base address: 0x%08x", | 707 | pr_info("Base address: 0x%08x\n", |
712 | (u32) & ugeth->p_thread_data_tx[i]); | 708 | (u32)&ugeth->p_thread_data_tx[i]); |
713 | mem_disp((u8 *) & ugeth->p_thread_data_tx[i], | 709 | mem_disp((u8 *) & ugeth->p_thread_data_tx[i], |
714 | sizeof(struct ucc_geth_thread_data_tx)); | 710 | sizeof(struct ucc_geth_thread_data_tx)); |
715 | } | 711 | } |
@@ -737,270 +733,260 @@ static void dump_regs(struct ucc_geth_private *ugeth) | |||
737 | break; | 733 | break; |
738 | } | 734 | } |
739 | 735 | ||
740 | ugeth_info("Thread data RX:"); | 736 | pr_info("Thread data RX:\n"); |
741 | ugeth_info("Base address: 0x%08x", | 737 | pr_info("Base address: 0x%08x\n", |
742 | (u32) ugeth->p_thread_data_rx); | 738 | (u32)ugeth->p_thread_data_rx); |
743 | for (i = 0; i < numThreadsRxNumerical; i++) { | 739 | for (i = 0; i < numThreadsRxNumerical; i++) { |
744 | ugeth_info("Thread data RX[%d]:", i); | 740 | pr_info("Thread data RX[%d]:\n", i); |
745 | ugeth_info("Base address: 0x%08x", | 741 | pr_info("Base address: 0x%08x\n", |
746 | (u32) & ugeth->p_thread_data_rx[i]); | 742 | (u32)&ugeth->p_thread_data_rx[i]); |
747 | mem_disp((u8 *) & ugeth->p_thread_data_rx[i], | 743 | mem_disp((u8 *) & ugeth->p_thread_data_rx[i], |
748 | sizeof(struct ucc_geth_thread_data_rx)); | 744 | sizeof(struct ucc_geth_thread_data_rx)); |
749 | } | 745 | } |
750 | } | 746 | } |
751 | if (ugeth->p_exf_glbl_param) { | 747 | if (ugeth->p_exf_glbl_param) { |
752 | ugeth_info("EXF global param:"); | 748 | pr_info("EXF global param:\n"); |
753 | ugeth_info("Base address: 0x%08x", | 749 | pr_info("Base address: 0x%08x\n", |
754 | (u32) ugeth->p_exf_glbl_param); | 750 | (u32)ugeth->p_exf_glbl_param); |
755 | mem_disp((u8 *) ugeth->p_exf_glbl_param, | 751 | mem_disp((u8 *) ugeth->p_exf_glbl_param, |
756 | sizeof(*ugeth->p_exf_glbl_param)); | 752 | sizeof(*ugeth->p_exf_glbl_param)); |
757 | } | 753 | } |
758 | if (ugeth->p_tx_glbl_pram) { | 754 | if (ugeth->p_tx_glbl_pram) { |
759 | ugeth_info("TX global param:"); | 755 | pr_info("TX global param:\n"); |
760 | ugeth_info("Base address: 0x%08x", (u32) ugeth->p_tx_glbl_pram); | 756 | pr_info("Base address: 0x%08x\n", (u32)ugeth->p_tx_glbl_pram); |
761 | ugeth_info("temoder : addr - 0x%08x, val - 0x%04x", | 757 | pr_info("temoder : addr - 0x%08x, val - 0x%04x\n", |
762 | (u32) & ugeth->p_tx_glbl_pram->temoder, | 758 | (u32)&ugeth->p_tx_glbl_pram->temoder, |
763 | in_be16(&ugeth->p_tx_glbl_pram->temoder)); | 759 | in_be16(&ugeth->p_tx_glbl_pram->temoder)); |
764 | ugeth_info("sqptr : addr - 0x%08x, val - 0x%08x", | 760 | pr_info("sqptr : addr - 0x%08x, val - 0x%08x\n", |
765 | (u32) & ugeth->p_tx_glbl_pram->sqptr, | 761 | (u32)&ugeth->p_tx_glbl_pram->sqptr, |
766 | in_be32(&ugeth->p_tx_glbl_pram->sqptr)); | 762 | in_be32(&ugeth->p_tx_glbl_pram->sqptr)); |
767 | ugeth_info("schedulerbasepointer: addr - 0x%08x, val - 0x%08x", | 763 | pr_info("schedulerbasepointer: addr - 0x%08x, val - 0x%08x\n", |
768 | (u32) & ugeth->p_tx_glbl_pram->schedulerbasepointer, | 764 | (u32)&ugeth->p_tx_glbl_pram->schedulerbasepointer, |
769 | in_be32(&ugeth->p_tx_glbl_pram-> | 765 | in_be32(&ugeth->p_tx_glbl_pram->schedulerbasepointer)); |
770 | schedulerbasepointer)); | 766 | pr_info("txrmonbaseptr: addr - 0x%08x, val - 0x%08x\n", |
771 | ugeth_info("txrmonbaseptr: addr - 0x%08x, val - 0x%08x", | 767 | (u32)&ugeth->p_tx_glbl_pram->txrmonbaseptr, |
772 | (u32) & ugeth->p_tx_glbl_pram->txrmonbaseptr, | 768 | in_be32(&ugeth->p_tx_glbl_pram->txrmonbaseptr)); |
773 | in_be32(&ugeth->p_tx_glbl_pram->txrmonbaseptr)); | 769 | pr_info("tstate : addr - 0x%08x, val - 0x%08x\n", |
774 | ugeth_info("tstate : addr - 0x%08x, val - 0x%08x", | 770 | (u32)&ugeth->p_tx_glbl_pram->tstate, |
775 | (u32) & ugeth->p_tx_glbl_pram->tstate, | 771 | in_be32(&ugeth->p_tx_glbl_pram->tstate)); |
776 | in_be32(&ugeth->p_tx_glbl_pram->tstate)); | 772 | pr_info("iphoffset[0] : addr - 0x%08x, val - 0x%02x\n", |
777 | ugeth_info("iphoffset[0] : addr - 0x%08x, val - 0x%02x", | 773 | (u32)&ugeth->p_tx_glbl_pram->iphoffset[0], |
778 | (u32) & ugeth->p_tx_glbl_pram->iphoffset[0], | 774 | ugeth->p_tx_glbl_pram->iphoffset[0]); |
779 | ugeth->p_tx_glbl_pram->iphoffset[0]); | 775 | pr_info("iphoffset[1] : addr - 0x%08x, val - 0x%02x\n", |
780 | ugeth_info("iphoffset[1] : addr - 0x%08x, val - 0x%02x", | 776 | (u32)&ugeth->p_tx_glbl_pram->iphoffset[1], |
781 | (u32) & ugeth->p_tx_glbl_pram->iphoffset[1], | 777 | ugeth->p_tx_glbl_pram->iphoffset[1]); |
782 | ugeth->p_tx_glbl_pram->iphoffset[1]); | 778 | pr_info("iphoffset[2] : addr - 0x%08x, val - 0x%02x\n", |
783 | ugeth_info("iphoffset[2] : addr - 0x%08x, val - 0x%02x", | 779 | (u32)&ugeth->p_tx_glbl_pram->iphoffset[2], |
784 | (u32) & ugeth->p_tx_glbl_pram->iphoffset[2], | 780 | ugeth->p_tx_glbl_pram->iphoffset[2]); |
785 | ugeth->p_tx_glbl_pram->iphoffset[2]); | 781 | pr_info("iphoffset[3] : addr - 0x%08x, val - 0x%02x\n", |
786 | ugeth_info("iphoffset[3] : addr - 0x%08x, val - 0x%02x", | 782 | (u32)&ugeth->p_tx_glbl_pram->iphoffset[3], |
787 | (u32) & ugeth->p_tx_glbl_pram->iphoffset[3], | 783 | ugeth->p_tx_glbl_pram->iphoffset[3]); |
788 | ugeth->p_tx_glbl_pram->iphoffset[3]); | 784 | pr_info("iphoffset[4] : addr - 0x%08x, val - 0x%02x\n", |
789 | ugeth_info("iphoffset[4] : addr - 0x%08x, val - 0x%02x", | 785 | (u32)&ugeth->p_tx_glbl_pram->iphoffset[4], |
790 | (u32) & ugeth->p_tx_glbl_pram->iphoffset[4], | 786 | ugeth->p_tx_glbl_pram->iphoffset[4]); |
791 | ugeth->p_tx_glbl_pram->iphoffset[4]); | 787 | pr_info("iphoffset[5] : addr - 0x%08x, val - 0x%02x\n", |
792 | ugeth_info("iphoffset[5] : addr - 0x%08x, val - 0x%02x", | 788 | (u32)&ugeth->p_tx_glbl_pram->iphoffset[5], |
793 | (u32) & ugeth->p_tx_glbl_pram->iphoffset[5], | 789 | ugeth->p_tx_glbl_pram->iphoffset[5]); |
794 | ugeth->p_tx_glbl_pram->iphoffset[5]); | 790 | pr_info("iphoffset[6] : addr - 0x%08x, val - 0x%02x\n", |
795 | ugeth_info("iphoffset[6] : addr - 0x%08x, val - 0x%02x", | 791 | (u32)&ugeth->p_tx_glbl_pram->iphoffset[6], |
796 | (u32) & ugeth->p_tx_glbl_pram->iphoffset[6], | 792 | ugeth->p_tx_glbl_pram->iphoffset[6]); |
797 | ugeth->p_tx_glbl_pram->iphoffset[6]); | 793 | pr_info("iphoffset[7] : addr - 0x%08x, val - 0x%02x\n", |
798 | ugeth_info("iphoffset[7] : addr - 0x%08x, val - 0x%02x", | 794 | (u32)&ugeth->p_tx_glbl_pram->iphoffset[7], |
799 | (u32) & ugeth->p_tx_glbl_pram->iphoffset[7], | 795 | ugeth->p_tx_glbl_pram->iphoffset[7]); |
800 | ugeth->p_tx_glbl_pram->iphoffset[7]); | 796 | pr_info("vtagtable[0] : addr - 0x%08x, val - 0x%08x\n", |
801 | ugeth_info("vtagtable[0] : addr - 0x%08x, val - 0x%08x", | 797 | (u32)&ugeth->p_tx_glbl_pram->vtagtable[0], |
802 | (u32) & ugeth->p_tx_glbl_pram->vtagtable[0], | 798 | in_be32(&ugeth->p_tx_glbl_pram->vtagtable[0])); |
803 | in_be32(&ugeth->p_tx_glbl_pram->vtagtable[0])); | 799 | pr_info("vtagtable[1] : addr - 0x%08x, val - 0x%08x\n", |
804 | ugeth_info("vtagtable[1] : addr - 0x%08x, val - 0x%08x", | 800 | (u32)&ugeth->p_tx_glbl_pram->vtagtable[1], |
805 | (u32) & ugeth->p_tx_glbl_pram->vtagtable[1], | 801 | in_be32(&ugeth->p_tx_glbl_pram->vtagtable[1])); |
806 | in_be32(&ugeth->p_tx_glbl_pram->vtagtable[1])); | 802 | pr_info("vtagtable[2] : addr - 0x%08x, val - 0x%08x\n", |
807 | ugeth_info("vtagtable[2] : addr - 0x%08x, val - 0x%08x", | 803 | (u32)&ugeth->p_tx_glbl_pram->vtagtable[2], |
808 | (u32) & ugeth->p_tx_glbl_pram->vtagtable[2], | 804 | in_be32(&ugeth->p_tx_glbl_pram->vtagtable[2])); |
809 | in_be32(&ugeth->p_tx_glbl_pram->vtagtable[2])); | 805 | pr_info("vtagtable[3] : addr - 0x%08x, val - 0x%08x\n", |
810 | ugeth_info("vtagtable[3] : addr - 0x%08x, val - 0x%08x", | 806 | (u32)&ugeth->p_tx_glbl_pram->vtagtable[3], |
811 | (u32) & ugeth->p_tx_glbl_pram->vtagtable[3], | 807 | in_be32(&ugeth->p_tx_glbl_pram->vtagtable[3])); |
812 | in_be32(&ugeth->p_tx_glbl_pram->vtagtable[3])); | 808 | pr_info("vtagtable[4] : addr - 0x%08x, val - 0x%08x\n", |
813 | ugeth_info("vtagtable[4] : addr - 0x%08x, val - 0x%08x", | 809 | (u32)&ugeth->p_tx_glbl_pram->vtagtable[4], |
814 | (u32) & ugeth->p_tx_glbl_pram->vtagtable[4], | 810 | in_be32(&ugeth->p_tx_glbl_pram->vtagtable[4])); |
815 | in_be32(&ugeth->p_tx_glbl_pram->vtagtable[4])); | 811 | pr_info("vtagtable[5] : addr - 0x%08x, val - 0x%08x\n", |
816 | ugeth_info("vtagtable[5] : addr - 0x%08x, val - 0x%08x", | 812 | (u32)&ugeth->p_tx_glbl_pram->vtagtable[5], |
817 | (u32) & ugeth->p_tx_glbl_pram->vtagtable[5], | 813 | in_be32(&ugeth->p_tx_glbl_pram->vtagtable[5])); |
818 | in_be32(&ugeth->p_tx_glbl_pram->vtagtable[5])); | 814 | pr_info("vtagtable[6] : addr - 0x%08x, val - 0x%08x\n", |
819 | ugeth_info("vtagtable[6] : addr - 0x%08x, val - 0x%08x", | 815 | (u32)&ugeth->p_tx_glbl_pram->vtagtable[6], |
820 | (u32) & ugeth->p_tx_glbl_pram->vtagtable[6], | 816 | in_be32(&ugeth->p_tx_glbl_pram->vtagtable[6])); |
821 | in_be32(&ugeth->p_tx_glbl_pram->vtagtable[6])); | 817 | pr_info("vtagtable[7] : addr - 0x%08x, val - 0x%08x\n", |
822 | ugeth_info("vtagtable[7] : addr - 0x%08x, val - 0x%08x", | 818 | (u32)&ugeth->p_tx_glbl_pram->vtagtable[7], |
823 | (u32) & ugeth->p_tx_glbl_pram->vtagtable[7], | 819 | in_be32(&ugeth->p_tx_glbl_pram->vtagtable[7])); |
824 | in_be32(&ugeth->p_tx_glbl_pram->vtagtable[7])); | 820 | pr_info("tqptr : addr - 0x%08x, val - 0x%08x\n", |
825 | ugeth_info("tqptr : addr - 0x%08x, val - 0x%08x", | 821 | (u32)&ugeth->p_tx_glbl_pram->tqptr, |
826 | (u32) & ugeth->p_tx_glbl_pram->tqptr, | 822 | in_be32(&ugeth->p_tx_glbl_pram->tqptr)); |
827 | in_be32(&ugeth->p_tx_glbl_pram->tqptr)); | ||
828 | } | 823 | } |
829 | if (ugeth->p_rx_glbl_pram) { | 824 | if (ugeth->p_rx_glbl_pram) { |
830 | ugeth_info("RX global param:"); | 825 | pr_info("RX global param:\n"); |
831 | ugeth_info("Base address: 0x%08x", (u32) ugeth->p_rx_glbl_pram); | 826 | pr_info("Base address: 0x%08x\n", (u32)ugeth->p_rx_glbl_pram); |
832 | ugeth_info("remoder : addr - 0x%08x, val - 0x%08x", | 827 | pr_info("remoder : addr - 0x%08x, val - 0x%08x\n", |
833 | (u32) & ugeth->p_rx_glbl_pram->remoder, | 828 | (u32)&ugeth->p_rx_glbl_pram->remoder, |
834 | in_be32(&ugeth->p_rx_glbl_pram->remoder)); | 829 | in_be32(&ugeth->p_rx_glbl_pram->remoder)); |
835 | ugeth_info("rqptr : addr - 0x%08x, val - 0x%08x", | 830 | pr_info("rqptr : addr - 0x%08x, val - 0x%08x\n", |
836 | (u32) & ugeth->p_rx_glbl_pram->rqptr, | 831 | (u32)&ugeth->p_rx_glbl_pram->rqptr, |
837 | in_be32(&ugeth->p_rx_glbl_pram->rqptr)); | 832 | in_be32(&ugeth->p_rx_glbl_pram->rqptr)); |
838 | ugeth_info("typeorlen : addr - 0x%08x, val - 0x%04x", | 833 | pr_info("typeorlen : addr - 0x%08x, val - 0x%04x\n", |
839 | (u32) & ugeth->p_rx_glbl_pram->typeorlen, | 834 | (u32)&ugeth->p_rx_glbl_pram->typeorlen, |
840 | in_be16(&ugeth->p_rx_glbl_pram->typeorlen)); | 835 | in_be16(&ugeth->p_rx_glbl_pram->typeorlen)); |
841 | ugeth_info("rxgstpack : addr - 0x%08x, val - 0x%02x", | 836 | pr_info("rxgstpack : addr - 0x%08x, val - 0x%02x\n", |
842 | (u32) & ugeth->p_rx_glbl_pram->rxgstpack, | 837 | (u32)&ugeth->p_rx_glbl_pram->rxgstpack, |
843 | ugeth->p_rx_glbl_pram->rxgstpack); | 838 | ugeth->p_rx_glbl_pram->rxgstpack); |
844 | ugeth_info("rxrmonbaseptr : addr - 0x%08x, val - 0x%08x", | 839 | pr_info("rxrmonbaseptr : addr - 0x%08x, val - 0x%08x\n", |
845 | (u32) & ugeth->p_rx_glbl_pram->rxrmonbaseptr, | 840 | (u32)&ugeth->p_rx_glbl_pram->rxrmonbaseptr, |
846 | in_be32(&ugeth->p_rx_glbl_pram->rxrmonbaseptr)); | 841 | in_be32(&ugeth->p_rx_glbl_pram->rxrmonbaseptr)); |
847 | ugeth_info("intcoalescingptr: addr - 0x%08x, val - 0x%08x", | 842 | pr_info("intcoalescingptr: addr - 0x%08x, val - 0x%08x\n", |
848 | (u32) & ugeth->p_rx_glbl_pram->intcoalescingptr, | 843 | (u32)&ugeth->p_rx_glbl_pram->intcoalescingptr, |
849 | in_be32(&ugeth->p_rx_glbl_pram->intcoalescingptr)); | 844 | in_be32(&ugeth->p_rx_glbl_pram->intcoalescingptr)); |
850 | ugeth_info("rstate : addr - 0x%08x, val - 0x%02x", | 845 | pr_info("rstate : addr - 0x%08x, val - 0x%02x\n", |
851 | (u32) & ugeth->p_rx_glbl_pram->rstate, | 846 | (u32)&ugeth->p_rx_glbl_pram->rstate, |
852 | ugeth->p_rx_glbl_pram->rstate); | 847 | ugeth->p_rx_glbl_pram->rstate); |
853 | ugeth_info("mrblr : addr - 0x%08x, val - 0x%04x", | 848 | pr_info("mrblr : addr - 0x%08x, val - 0x%04x\n", |
854 | (u32) & ugeth->p_rx_glbl_pram->mrblr, | 849 | (u32)&ugeth->p_rx_glbl_pram->mrblr, |
855 | in_be16(&ugeth->p_rx_glbl_pram->mrblr)); | 850 | in_be16(&ugeth->p_rx_glbl_pram->mrblr)); |
856 | ugeth_info("rbdqptr : addr - 0x%08x, val - 0x%08x", | 851 | pr_info("rbdqptr : addr - 0x%08x, val - 0x%08x\n", |
857 | (u32) & ugeth->p_rx_glbl_pram->rbdqptr, | 852 | (u32)&ugeth->p_rx_glbl_pram->rbdqptr, |
858 | in_be32(&ugeth->p_rx_glbl_pram->rbdqptr)); | 853 | in_be32(&ugeth->p_rx_glbl_pram->rbdqptr)); |
859 | ugeth_info("mflr : addr - 0x%08x, val - 0x%04x", | 854 | pr_info("mflr : addr - 0x%08x, val - 0x%04x\n", |
860 | (u32) & ugeth->p_rx_glbl_pram->mflr, | 855 | (u32)&ugeth->p_rx_glbl_pram->mflr, |
861 | in_be16(&ugeth->p_rx_glbl_pram->mflr)); | 856 | in_be16(&ugeth->p_rx_glbl_pram->mflr)); |
862 | ugeth_info("minflr : addr - 0x%08x, val - 0x%04x", | 857 | pr_info("minflr : addr - 0x%08x, val - 0x%04x\n", |
863 | (u32) & ugeth->p_rx_glbl_pram->minflr, | 858 | (u32)&ugeth->p_rx_glbl_pram->minflr, |
864 | in_be16(&ugeth->p_rx_glbl_pram->minflr)); | 859 | in_be16(&ugeth->p_rx_glbl_pram->minflr)); |
865 | ugeth_info("maxd1 : addr - 0x%08x, val - 0x%04x", | 860 | pr_info("maxd1 : addr - 0x%08x, val - 0x%04x\n", |
866 | (u32) & ugeth->p_rx_glbl_pram->maxd1, | 861 | (u32)&ugeth->p_rx_glbl_pram->maxd1, |
867 | in_be16(&ugeth->p_rx_glbl_pram->maxd1)); | 862 | in_be16(&ugeth->p_rx_glbl_pram->maxd1)); |
868 | ugeth_info("maxd2 : addr - 0x%08x, val - 0x%04x", | 863 | pr_info("maxd2 : addr - 0x%08x, val - 0x%04x\n", |
869 | (u32) & ugeth->p_rx_glbl_pram->maxd2, | 864 | (u32)&ugeth->p_rx_glbl_pram->maxd2, |
870 | in_be16(&ugeth->p_rx_glbl_pram->maxd2)); | 865 | in_be16(&ugeth->p_rx_glbl_pram->maxd2)); |
871 | ugeth_info("ecamptr : addr - 0x%08x, val - 0x%08x", | 866 | pr_info("ecamptr : addr - 0x%08x, val - 0x%08x\n", |
872 | (u32) & ugeth->p_rx_glbl_pram->ecamptr, | 867 | (u32)&ugeth->p_rx_glbl_pram->ecamptr, |
873 | in_be32(&ugeth->p_rx_glbl_pram->ecamptr)); | 868 | in_be32(&ugeth->p_rx_glbl_pram->ecamptr)); |
874 | ugeth_info("l2qt : addr - 0x%08x, val - 0x%08x", | 869 | pr_info("l2qt : addr - 0x%08x, val - 0x%08x\n", |
875 | (u32) & ugeth->p_rx_glbl_pram->l2qt, | 870 | (u32)&ugeth->p_rx_glbl_pram->l2qt, |
876 | in_be32(&ugeth->p_rx_glbl_pram->l2qt)); | 871 | in_be32(&ugeth->p_rx_glbl_pram->l2qt)); |
877 | ugeth_info("l3qt[0] : addr - 0x%08x, val - 0x%08x", | 872 | pr_info("l3qt[0] : addr - 0x%08x, val - 0x%08x\n", |
878 | (u32) & ugeth->p_rx_glbl_pram->l3qt[0], | 873 | (u32)&ugeth->p_rx_glbl_pram->l3qt[0], |
879 | in_be32(&ugeth->p_rx_glbl_pram->l3qt[0])); | 874 | in_be32(&ugeth->p_rx_glbl_pram->l3qt[0])); |
880 | ugeth_info("l3qt[1] : addr - 0x%08x, val - 0x%08x", | 875 | pr_info("l3qt[1] : addr - 0x%08x, val - 0x%08x\n", |
881 | (u32) & ugeth->p_rx_glbl_pram->l3qt[1], | 876 | (u32)&ugeth->p_rx_glbl_pram->l3qt[1], |
882 | in_be32(&ugeth->p_rx_glbl_pram->l3qt[1])); | 877 | in_be32(&ugeth->p_rx_glbl_pram->l3qt[1])); |
883 | ugeth_info("l3qt[2] : addr - 0x%08x, val - 0x%08x", | 878 | pr_info("l3qt[2] : addr - 0x%08x, val - 0x%08x\n", |
884 | (u32) & ugeth->p_rx_glbl_pram->l3qt[2], | 879 | (u32)&ugeth->p_rx_glbl_pram->l3qt[2], |
885 | in_be32(&ugeth->p_rx_glbl_pram->l3qt[2])); | 880 | in_be32(&ugeth->p_rx_glbl_pram->l3qt[2])); |
886 | ugeth_info("l3qt[3] : addr - 0x%08x, val - 0x%08x", | 881 | pr_info("l3qt[3] : addr - 0x%08x, val - 0x%08x\n", |
887 | (u32) & ugeth->p_rx_glbl_pram->l3qt[3], | 882 | (u32)&ugeth->p_rx_glbl_pram->l3qt[3], |
888 | in_be32(&ugeth->p_rx_glbl_pram->l3qt[3])); | 883 | in_be32(&ugeth->p_rx_glbl_pram->l3qt[3])); |
889 | ugeth_info("l3qt[4] : addr - 0x%08x, val - 0x%08x", | 884 | pr_info("l3qt[4] : addr - 0x%08x, val - 0x%08x\n", |
890 | (u32) & ugeth->p_rx_glbl_pram->l3qt[4], | 885 | (u32)&ugeth->p_rx_glbl_pram->l3qt[4], |
891 | in_be32(&ugeth->p_rx_glbl_pram->l3qt[4])); | 886 | in_be32(&ugeth->p_rx_glbl_pram->l3qt[4])); |
892 | ugeth_info("l3qt[5] : addr - 0x%08x, val - 0x%08x", | 887 | pr_info("l3qt[5] : addr - 0x%08x, val - 0x%08x\n", |
893 | (u32) & ugeth->p_rx_glbl_pram->l3qt[5], | 888 | (u32)&ugeth->p_rx_glbl_pram->l3qt[5], |
894 | in_be32(&ugeth->p_rx_glbl_pram->l3qt[5])); | 889 | in_be32(&ugeth->p_rx_glbl_pram->l3qt[5])); |
895 | ugeth_info("l3qt[6] : addr - 0x%08x, val - 0x%08x", | 890 | pr_info("l3qt[6] : addr - 0x%08x, val - 0x%08x\n", |
896 | (u32) & ugeth->p_rx_glbl_pram->l3qt[6], | 891 | (u32)&ugeth->p_rx_glbl_pram->l3qt[6], |
897 | in_be32(&ugeth->p_rx_glbl_pram->l3qt[6])); | 892 | in_be32(&ugeth->p_rx_glbl_pram->l3qt[6])); |
898 | ugeth_info("l3qt[7] : addr - 0x%08x, val - 0x%08x", | 893 | pr_info("l3qt[7] : addr - 0x%08x, val - 0x%08x\n", |
899 | (u32) & ugeth->p_rx_glbl_pram->l3qt[7], | 894 | (u32)&ugeth->p_rx_glbl_pram->l3qt[7], |
900 | in_be32(&ugeth->p_rx_glbl_pram->l3qt[7])); | 895 | in_be32(&ugeth->p_rx_glbl_pram->l3qt[7])); |
901 | ugeth_info("vlantype : addr - 0x%08x, val - 0x%04x", | 896 | pr_info("vlantype : addr - 0x%08x, val - 0x%04x\n", |
902 | (u32) & ugeth->p_rx_glbl_pram->vlantype, | 897 | (u32)&ugeth->p_rx_glbl_pram->vlantype, |
903 | in_be16(&ugeth->p_rx_glbl_pram->vlantype)); | 898 | in_be16(&ugeth->p_rx_glbl_pram->vlantype)); |
904 | ugeth_info("vlantci : addr - 0x%08x, val - 0x%04x", | 899 | pr_info("vlantci : addr - 0x%08x, val - 0x%04x\n", |
905 | (u32) & ugeth->p_rx_glbl_pram->vlantci, | 900 | (u32)&ugeth->p_rx_glbl_pram->vlantci, |
906 | in_be16(&ugeth->p_rx_glbl_pram->vlantci)); | 901 | in_be16(&ugeth->p_rx_glbl_pram->vlantci)); |
907 | for (i = 0; i < 64; i++) | 902 | for (i = 0; i < 64; i++) |
908 | ugeth_info | 903 | pr_info("addressfiltering[%d]: addr - 0x%08x, val - 0x%02x\n", |
909 | ("addressfiltering[%d]: addr - 0x%08x, val - 0x%02x", | 904 | i, |
910 | i, | 905 | (u32)&ugeth->p_rx_glbl_pram->addressfiltering[i], |
911 | (u32) & ugeth->p_rx_glbl_pram->addressfiltering[i], | 906 | ugeth->p_rx_glbl_pram->addressfiltering[i]); |
912 | ugeth->p_rx_glbl_pram->addressfiltering[i]); | 907 | pr_info("exfGlobalParam : addr - 0x%08x, val - 0x%08x\n", |
913 | ugeth_info("exfGlobalParam : addr - 0x%08x, val - 0x%08x", | 908 | (u32)&ugeth->p_rx_glbl_pram->exfGlobalParam, |
914 | (u32) & ugeth->p_rx_glbl_pram->exfGlobalParam, | 909 | in_be32(&ugeth->p_rx_glbl_pram->exfGlobalParam)); |
915 | in_be32(&ugeth->p_rx_glbl_pram->exfGlobalParam)); | ||
916 | } | 910 | } |
917 | if (ugeth->p_send_q_mem_reg) { | 911 | if (ugeth->p_send_q_mem_reg) { |
918 | ugeth_info("Send Q memory registers:"); | 912 | pr_info("Send Q memory registers:\n"); |
919 | ugeth_info("Base address: 0x%08x", | 913 | pr_info("Base address: 0x%08x\n", (u32)ugeth->p_send_q_mem_reg); |
920 | (u32) ugeth->p_send_q_mem_reg); | ||
921 | for (i = 0; i < ugeth->ug_info->numQueuesTx; i++) { | 914 | for (i = 0; i < ugeth->ug_info->numQueuesTx; i++) { |
922 | ugeth_info("SQQD[%d]:", i); | 915 | pr_info("SQQD[%d]:\n", i); |
923 | ugeth_info("Base address: 0x%08x", | 916 | pr_info("Base address: 0x%08x\n", |
924 | (u32) & ugeth->p_send_q_mem_reg->sqqd[i]); | 917 | (u32)&ugeth->p_send_q_mem_reg->sqqd[i]); |
925 | mem_disp((u8 *) & ugeth->p_send_q_mem_reg->sqqd[i], | 918 | mem_disp((u8 *) & ugeth->p_send_q_mem_reg->sqqd[i], |
926 | sizeof(struct ucc_geth_send_queue_qd)); | 919 | sizeof(struct ucc_geth_send_queue_qd)); |
927 | } | 920 | } |
928 | } | 921 | } |
929 | if (ugeth->p_scheduler) { | 922 | if (ugeth->p_scheduler) { |
930 | ugeth_info("Scheduler:"); | 923 | pr_info("Scheduler:\n"); |
931 | ugeth_info("Base address: 0x%08x", (u32) ugeth->p_scheduler); | 924 | pr_info("Base address: 0x%08x\n", (u32)ugeth->p_scheduler); |
932 | mem_disp((u8 *) ugeth->p_scheduler, | 925 | mem_disp((u8 *) ugeth->p_scheduler, |
933 | sizeof(*ugeth->p_scheduler)); | 926 | sizeof(*ugeth->p_scheduler)); |
934 | } | 927 | } |
935 | if (ugeth->p_tx_fw_statistics_pram) { | 928 | if (ugeth->p_tx_fw_statistics_pram) { |
936 | ugeth_info("TX FW statistics pram:"); | 929 | pr_info("TX FW statistics pram:\n"); |
937 | ugeth_info("Base address: 0x%08x", | 930 | pr_info("Base address: 0x%08x\n", |
938 | (u32) ugeth->p_tx_fw_statistics_pram); | 931 | (u32)ugeth->p_tx_fw_statistics_pram); |
939 | mem_disp((u8 *) ugeth->p_tx_fw_statistics_pram, | 932 | mem_disp((u8 *) ugeth->p_tx_fw_statistics_pram, |
940 | sizeof(*ugeth->p_tx_fw_statistics_pram)); | 933 | sizeof(*ugeth->p_tx_fw_statistics_pram)); |
941 | } | 934 | } |
942 | if (ugeth->p_rx_fw_statistics_pram) { | 935 | if (ugeth->p_rx_fw_statistics_pram) { |
943 | ugeth_info("RX FW statistics pram:"); | 936 | pr_info("RX FW statistics pram:\n"); |
944 | ugeth_info("Base address: 0x%08x", | 937 | pr_info("Base address: 0x%08x\n", |
945 | (u32) ugeth->p_rx_fw_statistics_pram); | 938 | (u32)ugeth->p_rx_fw_statistics_pram); |
946 | mem_disp((u8 *) ugeth->p_rx_fw_statistics_pram, | 939 | mem_disp((u8 *) ugeth->p_rx_fw_statistics_pram, |
947 | sizeof(*ugeth->p_rx_fw_statistics_pram)); | 940 | sizeof(*ugeth->p_rx_fw_statistics_pram)); |
948 | } | 941 | } |
949 | if (ugeth->p_rx_irq_coalescing_tbl) { | 942 | if (ugeth->p_rx_irq_coalescing_tbl) { |
950 | ugeth_info("RX IRQ coalescing tables:"); | 943 | pr_info("RX IRQ coalescing tables:\n"); |
951 | ugeth_info("Base address: 0x%08x", | 944 | pr_info("Base address: 0x%08x\n", |
952 | (u32) ugeth->p_rx_irq_coalescing_tbl); | 945 | (u32)ugeth->p_rx_irq_coalescing_tbl); |
953 | for (i = 0; i < ugeth->ug_info->numQueuesRx; i++) { | 946 | for (i = 0; i < ugeth->ug_info->numQueuesRx; i++) { |
954 | ugeth_info("RX IRQ coalescing table entry[%d]:", i); | 947 | pr_info("RX IRQ coalescing table entry[%d]:\n", i); |
955 | ugeth_info("Base address: 0x%08x", | 948 | pr_info("Base address: 0x%08x\n", |
956 | (u32) & ugeth->p_rx_irq_coalescing_tbl-> | 949 | (u32)&ugeth->p_rx_irq_coalescing_tbl-> |
957 | coalescingentry[i]); | 950 | coalescingentry[i]); |
958 | ugeth_info | 951 | pr_info("interruptcoalescingmaxvalue: addr - 0x%08x, val - 0x%08x\n", |
959 | ("interruptcoalescingmaxvalue: addr - 0x%08x, val - 0x%08x", | 952 | (u32)&ugeth->p_rx_irq_coalescing_tbl-> |
960 | (u32) & ugeth->p_rx_irq_coalescing_tbl-> | 953 | coalescingentry[i].interruptcoalescingmaxvalue, |
961 | coalescingentry[i].interruptcoalescingmaxvalue, | 954 | in_be32(&ugeth->p_rx_irq_coalescing_tbl-> |
962 | in_be32(&ugeth->p_rx_irq_coalescing_tbl-> | 955 | coalescingentry[i]. |
963 | coalescingentry[i]. | 956 | interruptcoalescingmaxvalue)); |
964 | interruptcoalescingmaxvalue)); | 957 | pr_info("interruptcoalescingcounter : addr - 0x%08x, val - 0x%08x\n", |
965 | ugeth_info | 958 | (u32)&ugeth->p_rx_irq_coalescing_tbl-> |
966 | ("interruptcoalescingcounter : addr - 0x%08x, val - 0x%08x", | 959 | coalescingentry[i].interruptcoalescingcounter, |
967 | (u32) & ugeth->p_rx_irq_coalescing_tbl-> | 960 | in_be32(&ugeth->p_rx_irq_coalescing_tbl-> |
968 | coalescingentry[i].interruptcoalescingcounter, | 961 | coalescingentry[i]. |
969 | in_be32(&ugeth->p_rx_irq_coalescing_tbl-> | 962 | interruptcoalescingcounter)); |
970 | coalescingentry[i]. | ||
971 | interruptcoalescingcounter)); | ||
972 | } | 963 | } |
973 | } | 964 | } |
974 | if (ugeth->p_rx_bd_qs_tbl) { | 965 | if (ugeth->p_rx_bd_qs_tbl) { |
975 | ugeth_info("RX BD QS tables:"); | 966 | pr_info("RX BD QS tables:\n"); |
976 | ugeth_info("Base address: 0x%08x", (u32) ugeth->p_rx_bd_qs_tbl); | 967 | pr_info("Base address: 0x%08x\n", (u32)ugeth->p_rx_bd_qs_tbl); |
977 | for (i = 0; i < ugeth->ug_info->numQueuesRx; i++) { | 968 | for (i = 0; i < ugeth->ug_info->numQueuesRx; i++) { |
978 | ugeth_info("RX BD QS table[%d]:", i); | 969 | pr_info("RX BD QS table[%d]:\n", i); |
979 | ugeth_info("Base address: 0x%08x", | 970 | pr_info("Base address: 0x%08x\n", |
980 | (u32) & ugeth->p_rx_bd_qs_tbl[i]); | 971 | (u32)&ugeth->p_rx_bd_qs_tbl[i]); |
981 | ugeth_info | 972 | pr_info("bdbaseptr : addr - 0x%08x, val - 0x%08x\n", |
982 | ("bdbaseptr : addr - 0x%08x, val - 0x%08x", | 973 | (u32)&ugeth->p_rx_bd_qs_tbl[i].bdbaseptr, |
983 | (u32) & ugeth->p_rx_bd_qs_tbl[i].bdbaseptr, | 974 | in_be32(&ugeth->p_rx_bd_qs_tbl[i].bdbaseptr)); |
984 | in_be32(&ugeth->p_rx_bd_qs_tbl[i].bdbaseptr)); | 975 | pr_info("bdptr : addr - 0x%08x, val - 0x%08x\n", |
985 | ugeth_info | 976 | (u32)&ugeth->p_rx_bd_qs_tbl[i].bdptr, |
986 | ("bdptr : addr - 0x%08x, val - 0x%08x", | 977 | in_be32(&ugeth->p_rx_bd_qs_tbl[i].bdptr)); |
987 | (u32) & ugeth->p_rx_bd_qs_tbl[i].bdptr, | 978 | pr_info("externalbdbaseptr: addr - 0x%08x, val - 0x%08x\n", |
988 | in_be32(&ugeth->p_rx_bd_qs_tbl[i].bdptr)); | 979 | (u32)&ugeth->p_rx_bd_qs_tbl[i].externalbdbaseptr, |
989 | ugeth_info | 980 | in_be32(&ugeth->p_rx_bd_qs_tbl[i]. |
990 | ("externalbdbaseptr: addr - 0x%08x, val - 0x%08x", | 981 | externalbdbaseptr)); |
991 | (u32) & ugeth->p_rx_bd_qs_tbl[i].externalbdbaseptr, | 982 | pr_info("externalbdptr : addr - 0x%08x, val - 0x%08x\n", |
992 | in_be32(&ugeth->p_rx_bd_qs_tbl[i]. | 983 | (u32)&ugeth->p_rx_bd_qs_tbl[i].externalbdptr, |
993 | externalbdbaseptr)); | 984 | in_be32(&ugeth->p_rx_bd_qs_tbl[i].externalbdptr)); |
994 | ugeth_info | 985 | pr_info("ucode RX Prefetched BDs:\n"); |
995 | ("externalbdptr : addr - 0x%08x, val - 0x%08x", | 986 | pr_info("Base address: 0x%08x\n", |
996 | (u32) & ugeth->p_rx_bd_qs_tbl[i].externalbdptr, | 987 | (u32)qe_muram_addr(in_be32 |
997 | in_be32(&ugeth->p_rx_bd_qs_tbl[i].externalbdptr)); | 988 | (&ugeth->p_rx_bd_qs_tbl[i]. |
998 | ugeth_info("ucode RX Prefetched BDs:"); | 989 | bdbaseptr))); |
999 | ugeth_info("Base address: 0x%08x", | ||
1000 | (u32) | ||
1001 | qe_muram_addr(in_be32 | ||
1002 | (&ugeth->p_rx_bd_qs_tbl[i]. | ||
1003 | bdbaseptr))); | ||
1004 | mem_disp((u8 *) | 990 | mem_disp((u8 *) |
1005 | qe_muram_addr(in_be32 | 991 | qe_muram_addr(in_be32 |
1006 | (&ugeth->p_rx_bd_qs_tbl[i]. | 992 | (&ugeth->p_rx_bd_qs_tbl[i]. |
@@ -1010,9 +996,9 @@ static void dump_regs(struct ucc_geth_private *ugeth) | |||
1010 | } | 996 | } |
1011 | if (ugeth->p_init_enet_param_shadow) { | 997 | if (ugeth->p_init_enet_param_shadow) { |
1012 | int size; | 998 | int size; |
1013 | ugeth_info("Init enet param shadow:"); | 999 | pr_info("Init enet param shadow:\n"); |
1014 | ugeth_info("Base address: 0x%08x", | 1000 | pr_info("Base address: 0x%08x\n", |
1015 | (u32) ugeth->p_init_enet_param_shadow); | 1001 | (u32) ugeth->p_init_enet_param_shadow); |
1016 | mem_disp((u8 *) ugeth->p_init_enet_param_shadow, | 1002 | mem_disp((u8 *) ugeth->p_init_enet_param_shadow, |
1017 | sizeof(*ugeth->p_init_enet_param_shadow)); | 1003 | sizeof(*ugeth->p_init_enet_param_shadow)); |
1018 | 1004 | ||
@@ -1392,12 +1378,11 @@ static int adjust_enet_interface(struct ucc_geth_private *ugeth) | |||
1392 | struct phy_device *tbiphy; | 1378 | struct phy_device *tbiphy; |
1393 | 1379 | ||
1394 | if (!ug_info->tbi_node) | 1380 | if (!ug_info->tbi_node) |
1395 | ugeth_warn("TBI mode requires that the device " | 1381 | pr_warn("TBI mode requires that the device tree specify a tbi-handle\n"); |
1396 | "tree specify a tbi-handle\n"); | ||
1397 | 1382 | ||
1398 | tbiphy = of_phy_find_device(ug_info->tbi_node); | 1383 | tbiphy = of_phy_find_device(ug_info->tbi_node); |
1399 | if (!tbiphy) | 1384 | if (!tbiphy) |
1400 | ugeth_warn("Could not get TBI device\n"); | 1385 | pr_warn("Could not get TBI device\n"); |
1401 | 1386 | ||
1402 | value = phy_read(tbiphy, ENET_TBI_MII_CR); | 1387 | value = phy_read(tbiphy, ENET_TBI_MII_CR); |
1403 | value &= ~0x1000; /* Turn off autonegotiation */ | 1388 | value &= ~0x1000; /* Turn off autonegotiation */ |
@@ -1409,8 +1394,7 @@ static int adjust_enet_interface(struct ucc_geth_private *ugeth) | |||
1409 | ret_val = init_preamble_length(ug_info->prel, &ug_regs->maccfg2); | 1394 | ret_val = init_preamble_length(ug_info->prel, &ug_regs->maccfg2); |
1410 | if (ret_val != 0) { | 1395 | if (ret_val != 0) { |
1411 | if (netif_msg_probe(ugeth)) | 1396 | if (netif_msg_probe(ugeth)) |
1412 | ugeth_err("%s: Preamble length must be between 3 and 7 inclusive.", | 1397 | pr_err("Preamble length must be between 3 and 7 inclusive\n"); |
1413 | __func__); | ||
1414 | return ret_val; | 1398 | return ret_val; |
1415 | } | 1399 | } |
1416 | 1400 | ||
@@ -1520,7 +1504,7 @@ static int ugeth_enable(struct ucc_geth_private *ugeth, enum comm_dir mode) | |||
1520 | /* check if the UCC number is in range. */ | 1504 | /* check if the UCC number is in range. */ |
1521 | if (ugeth->ug_info->uf_info.ucc_num >= UCC_MAX_NUM) { | 1505 | if (ugeth->ug_info->uf_info.ucc_num >= UCC_MAX_NUM) { |
1522 | if (netif_msg_probe(ugeth)) | 1506 | if (netif_msg_probe(ugeth)) |
1523 | ugeth_err("%s: ucc_num out of range.", __func__); | 1507 | pr_err("ucc_num out of range\n"); |
1524 | return -EINVAL; | 1508 | return -EINVAL; |
1525 | } | 1509 | } |
1526 | 1510 | ||
@@ -1549,7 +1533,7 @@ static int ugeth_disable(struct ucc_geth_private *ugeth, enum comm_dir mode) | |||
1549 | /* check if the UCC number is in range. */ | 1533 | /* check if the UCC number is in range. */ |
1550 | if (ugeth->ug_info->uf_info.ucc_num >= UCC_MAX_NUM) { | 1534 | if (ugeth->ug_info->uf_info.ucc_num >= UCC_MAX_NUM) { |
1551 | if (netif_msg_probe(ugeth)) | 1535 | if (netif_msg_probe(ugeth)) |
1552 | ugeth_err("%s: ucc_num out of range.", __func__); | 1536 | pr_err("ucc_num out of range\n"); |
1553 | return -EINVAL; | 1537 | return -EINVAL; |
1554 | } | 1538 | } |
1555 | 1539 | ||
@@ -1648,7 +1632,7 @@ static void adjust_link(struct net_device *dev) | |||
1648 | break; | 1632 | break; |
1649 | default: | 1633 | default: |
1650 | if (netif_msg_link(ugeth)) | 1634 | if (netif_msg_link(ugeth)) |
1651 | ugeth_warn( | 1635 | pr_warn( |
1652 | "%s: Ack! Speed (%d) is not 10/100/1000!", | 1636 | "%s: Ack! Speed (%d) is not 10/100/1000!", |
1653 | dev->name, phydev->speed); | 1637 | dev->name, phydev->speed); |
1654 | break; | 1638 | break; |
@@ -2103,8 +2087,7 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth) | |||
2103 | if (!((uf_info->bd_mem_part == MEM_PART_SYSTEM) || | 2087 | if (!((uf_info->bd_mem_part == MEM_PART_SYSTEM) || |
2104 | (uf_info->bd_mem_part == MEM_PART_MURAM))) { | 2088 | (uf_info->bd_mem_part == MEM_PART_MURAM))) { |
2105 | if (netif_msg_probe(ugeth)) | 2089 | if (netif_msg_probe(ugeth)) |
2106 | ugeth_err("%s: Bad memory partition value.", | 2090 | pr_err("Bad memory partition value\n"); |
2107 | __func__); | ||
2108 | return -EINVAL; | 2091 | return -EINVAL; |
2109 | } | 2092 | } |
2110 | 2093 | ||
@@ -2114,9 +2097,7 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth) | |||
2114 | (ug_info->bdRingLenRx[i] % | 2097 | (ug_info->bdRingLenRx[i] % |
2115 | UCC_GETH_RX_BD_RING_SIZE_ALIGNMENT)) { | 2098 | UCC_GETH_RX_BD_RING_SIZE_ALIGNMENT)) { |
2116 | if (netif_msg_probe(ugeth)) | 2099 | if (netif_msg_probe(ugeth)) |
2117 | ugeth_err | 2100 | pr_err("Rx BD ring length must be multiple of 4, no smaller than 8\n"); |
2118 | ("%s: Rx BD ring length must be multiple of 4, no smaller than 8.", | ||
2119 | __func__); | ||
2120 | return -EINVAL; | 2101 | return -EINVAL; |
2121 | } | 2102 | } |
2122 | } | 2103 | } |
@@ -2125,9 +2106,7 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth) | |||
2125 | for (i = 0; i < ug_info->numQueuesTx; i++) { | 2106 | for (i = 0; i < ug_info->numQueuesTx; i++) { |
2126 | if (ug_info->bdRingLenTx[i] < UCC_GETH_TX_BD_RING_SIZE_MIN) { | 2107 | if (ug_info->bdRingLenTx[i] < UCC_GETH_TX_BD_RING_SIZE_MIN) { |
2127 | if (netif_msg_probe(ugeth)) | 2108 | if (netif_msg_probe(ugeth)) |
2128 | ugeth_err | 2109 | pr_err("Tx BD ring length must be no smaller than 2\n"); |
2129 | ("%s: Tx BD ring length must be no smaller than 2.", | ||
2130 | __func__); | ||
2131 | return -EINVAL; | 2110 | return -EINVAL; |
2132 | } | 2111 | } |
2133 | } | 2112 | } |
@@ -2136,23 +2115,21 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth) | |||
2136 | if ((uf_info->max_rx_buf_length == 0) || | 2115 | if ((uf_info->max_rx_buf_length == 0) || |
2137 | (uf_info->max_rx_buf_length % UCC_GETH_MRBLR_ALIGNMENT)) { | 2116 | (uf_info->max_rx_buf_length % UCC_GETH_MRBLR_ALIGNMENT)) { |
2138 | if (netif_msg_probe(ugeth)) | 2117 | if (netif_msg_probe(ugeth)) |
2139 | ugeth_err | 2118 | pr_err("max_rx_buf_length must be non-zero multiple of 128\n"); |
2140 | ("%s: max_rx_buf_length must be non-zero multiple of 128.", | ||
2141 | __func__); | ||
2142 | return -EINVAL; | 2119 | return -EINVAL; |
2143 | } | 2120 | } |
2144 | 2121 | ||
2145 | /* num Tx queues */ | 2122 | /* num Tx queues */ |
2146 | if (ug_info->numQueuesTx > NUM_TX_QUEUES) { | 2123 | if (ug_info->numQueuesTx > NUM_TX_QUEUES) { |
2147 | if (netif_msg_probe(ugeth)) | 2124 | if (netif_msg_probe(ugeth)) |
2148 | ugeth_err("%s: number of tx queues too large.", __func__); | 2125 | pr_err("number of tx queues too large\n"); |
2149 | return -EINVAL; | 2126 | return -EINVAL; |
2150 | } | 2127 | } |
2151 | 2128 | ||
2152 | /* num Rx queues */ | 2129 | /* num Rx queues */ |
2153 | if (ug_info->numQueuesRx > NUM_RX_QUEUES) { | 2130 | if (ug_info->numQueuesRx > NUM_RX_QUEUES) { |
2154 | if (netif_msg_probe(ugeth)) | 2131 | if (netif_msg_probe(ugeth)) |
2155 | ugeth_err("%s: number of rx queues too large.", __func__); | 2132 | pr_err("number of rx queues too large\n"); |
2156 | return -EINVAL; | 2133 | return -EINVAL; |
2157 | } | 2134 | } |
2158 | 2135 | ||
@@ -2160,10 +2137,7 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth) | |||
2160 | for (i = 0; i < UCC_GETH_VLAN_PRIORITY_MAX; i++) { | 2137 | for (i = 0; i < UCC_GETH_VLAN_PRIORITY_MAX; i++) { |
2161 | if (ug_info->l2qt[i] >= ug_info->numQueuesRx) { | 2138 | if (ug_info->l2qt[i] >= ug_info->numQueuesRx) { |
2162 | if (netif_msg_probe(ugeth)) | 2139 | if (netif_msg_probe(ugeth)) |
2163 | ugeth_err | 2140 | pr_err("VLAN priority table entry must not be larger than number of Rx queues\n"); |
2164 | ("%s: VLAN priority table entry must not be" | ||
2165 | " larger than number of Rx queues.", | ||
2166 | __func__); | ||
2167 | return -EINVAL; | 2141 | return -EINVAL; |
2168 | } | 2142 | } |
2169 | } | 2143 | } |
@@ -2172,18 +2146,14 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth) | |||
2172 | for (i = 0; i < UCC_GETH_IP_PRIORITY_MAX; i++) { | 2146 | for (i = 0; i < UCC_GETH_IP_PRIORITY_MAX; i++) { |
2173 | if (ug_info->l3qt[i] >= ug_info->numQueuesRx) { | 2147 | if (ug_info->l3qt[i] >= ug_info->numQueuesRx) { |
2174 | if (netif_msg_probe(ugeth)) | 2148 | if (netif_msg_probe(ugeth)) |
2175 | ugeth_err | 2149 | pr_err("IP priority table entry must not be larger than number of Rx queues\n"); |
2176 | ("%s: IP priority table entry must not be" | ||
2177 | " larger than number of Rx queues.", | ||
2178 | __func__); | ||
2179 | return -EINVAL; | 2150 | return -EINVAL; |
2180 | } | 2151 | } |
2181 | } | 2152 | } |
2182 | 2153 | ||
2183 | if (ug_info->cam && !ug_info->ecamptr) { | 2154 | if (ug_info->cam && !ug_info->ecamptr) { |
2184 | if (netif_msg_probe(ugeth)) | 2155 | if (netif_msg_probe(ugeth)) |
2185 | ugeth_err("%s: If cam mode is chosen, must supply cam ptr.", | 2156 | pr_err("If cam mode is chosen, must supply cam ptr\n"); |
2186 | __func__); | ||
2187 | return -EINVAL; | 2157 | return -EINVAL; |
2188 | } | 2158 | } |
2189 | 2159 | ||
@@ -2191,9 +2161,7 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth) | |||
2191 | UCC_GETH_NUM_OF_STATION_ADDRESSES_1) && | 2161 | UCC_GETH_NUM_OF_STATION_ADDRESSES_1) && |
2192 | ug_info->rxExtendedFiltering) { | 2162 | ug_info->rxExtendedFiltering) { |
2193 | if (netif_msg_probe(ugeth)) | 2163 | if (netif_msg_probe(ugeth)) |
2194 | ugeth_err("%s: Number of station addresses greater than 1 " | 2164 | pr_err("Number of station addresses greater than 1 not allowed in extended parsing mode\n"); |
2195 | "not allowed in extended parsing mode.", | ||
2196 | __func__); | ||
2197 | return -EINVAL; | 2165 | return -EINVAL; |
2198 | } | 2166 | } |
2199 | 2167 | ||
@@ -2207,7 +2175,7 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth) | |||
2207 | /* Initialize the general fast UCC block. */ | 2175 | /* Initialize the general fast UCC block. */ |
2208 | if (ucc_fast_init(uf_info, &ugeth->uccf)) { | 2176 | if (ucc_fast_init(uf_info, &ugeth->uccf)) { |
2209 | if (netif_msg_probe(ugeth)) | 2177 | if (netif_msg_probe(ugeth)) |
2210 | ugeth_err("%s: Failed to init uccf.", __func__); | 2178 | pr_err("Failed to init uccf\n"); |
2211 | return -ENOMEM; | 2179 | return -ENOMEM; |
2212 | } | 2180 | } |
2213 | 2181 | ||
@@ -2222,7 +2190,7 @@ static int ucc_struct_init(struct ucc_geth_private *ugeth) | |||
2222 | ugeth->ug_regs = ioremap(uf_info->regs, sizeof(*ugeth->ug_regs)); | 2190 | ugeth->ug_regs = ioremap(uf_info->regs, sizeof(*ugeth->ug_regs)); |
2223 | if (!ugeth->ug_regs) { | 2191 | if (!ugeth->ug_regs) { |
2224 | if (netif_msg_probe(ugeth)) | 2192 | if (netif_msg_probe(ugeth)) |
2225 | ugeth_err("%s: Failed to ioremap regs.", __func__); | 2193 | pr_err("Failed to ioremap regs\n"); |
2226 | return -ENOMEM; | 2194 | return -ENOMEM; |
2227 | } | 2195 | } |
2228 | 2196 | ||
@@ -2273,9 +2241,7 @@ static int ucc_geth_alloc_tx(struct ucc_geth_private *ugeth) | |||
2273 | } | 2241 | } |
2274 | if (!ugeth->p_tx_bd_ring[j]) { | 2242 | if (!ugeth->p_tx_bd_ring[j]) { |
2275 | if (netif_msg_ifup(ugeth)) | 2243 | if (netif_msg_ifup(ugeth)) |
2276 | ugeth_err | 2244 | pr_err("Can not allocate memory for Tx bd rings\n"); |
2277 | ("%s: Can not allocate memory for Tx bd rings.", | ||
2278 | __func__); | ||
2279 | return -ENOMEM; | 2245 | return -ENOMEM; |
2280 | } | 2246 | } |
2281 | /* Zero unused end of bd ring, according to spec */ | 2247 | /* Zero unused end of bd ring, according to spec */ |
@@ -2293,8 +2259,7 @@ static int ucc_geth_alloc_tx(struct ucc_geth_private *ugeth) | |||
2293 | 2259 | ||
2294 | if (ugeth->tx_skbuff[j] == NULL) { | 2260 | if (ugeth->tx_skbuff[j] == NULL) { |
2295 | if (netif_msg_ifup(ugeth)) | 2261 | if (netif_msg_ifup(ugeth)) |
2296 | ugeth_err("%s: Could not allocate tx_skbuff", | 2262 | pr_err("Could not allocate tx_skbuff\n"); |
2297 | __func__); | ||
2298 | return -ENOMEM; | 2263 | return -ENOMEM; |
2299 | } | 2264 | } |
2300 | 2265 | ||
@@ -2353,9 +2318,7 @@ static int ucc_geth_alloc_rx(struct ucc_geth_private *ugeth) | |||
2353 | } | 2318 | } |
2354 | if (!ugeth->p_rx_bd_ring[j]) { | 2319 | if (!ugeth->p_rx_bd_ring[j]) { |
2355 | if (netif_msg_ifup(ugeth)) | 2320 | if (netif_msg_ifup(ugeth)) |
2356 | ugeth_err | 2321 | pr_err("Can not allocate memory for Rx bd rings\n"); |
2357 | ("%s: Can not allocate memory for Rx bd rings.", | ||
2358 | __func__); | ||
2359 | return -ENOMEM; | 2322 | return -ENOMEM; |
2360 | } | 2323 | } |
2361 | } | 2324 | } |
@@ -2369,8 +2332,7 @@ static int ucc_geth_alloc_rx(struct ucc_geth_private *ugeth) | |||
2369 | 2332 | ||
2370 | if (ugeth->rx_skbuff[j] == NULL) { | 2333 | if (ugeth->rx_skbuff[j] == NULL) { |
2371 | if (netif_msg_ifup(ugeth)) | 2334 | if (netif_msg_ifup(ugeth)) |
2372 | ugeth_err("%s: Could not allocate rx_skbuff", | 2335 | pr_err("Could not allocate rx_skbuff\n"); |
2373 | __func__); | ||
2374 | return -ENOMEM; | 2336 | return -ENOMEM; |
2375 | } | 2337 | } |
2376 | 2338 | ||
@@ -2438,8 +2400,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
2438 | break; | 2400 | break; |
2439 | default: | 2401 | default: |
2440 | if (netif_msg_ifup(ugeth)) | 2402 | if (netif_msg_ifup(ugeth)) |
2441 | ugeth_err("%s: Bad number of Rx threads value.", | 2403 | pr_err("Bad number of Rx threads value\n"); |
2442 | __func__); | ||
2443 | return -EINVAL; | 2404 | return -EINVAL; |
2444 | break; | 2405 | break; |
2445 | } | 2406 | } |
@@ -2462,8 +2423,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
2462 | break; | 2423 | break; |
2463 | default: | 2424 | default: |
2464 | if (netif_msg_ifup(ugeth)) | 2425 | if (netif_msg_ifup(ugeth)) |
2465 | ugeth_err("%s: Bad number of Tx threads value.", | 2426 | pr_err("Bad number of Tx threads value\n"); |
2466 | __func__); | ||
2467 | return -EINVAL; | 2427 | return -EINVAL; |
2468 | break; | 2428 | break; |
2469 | } | 2429 | } |
@@ -2512,8 +2472,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
2512 | &ug_regs->ipgifg); | 2472 | &ug_regs->ipgifg); |
2513 | if (ret_val != 0) { | 2473 | if (ret_val != 0) { |
2514 | if (netif_msg_ifup(ugeth)) | 2474 | if (netif_msg_ifup(ugeth)) |
2515 | ugeth_err("%s: IPGIFG initialization parameter too large.", | 2475 | pr_err("IPGIFG initialization parameter too large\n"); |
2516 | __func__); | ||
2517 | return ret_val; | 2476 | return ret_val; |
2518 | } | 2477 | } |
2519 | 2478 | ||
@@ -2529,8 +2488,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
2529 | &ug_regs->hafdup); | 2488 | &ug_regs->hafdup); |
2530 | if (ret_val != 0) { | 2489 | if (ret_val != 0) { |
2531 | if (netif_msg_ifup(ugeth)) | 2490 | if (netif_msg_ifup(ugeth)) |
2532 | ugeth_err("%s: Half Duplex initialization parameter too large.", | 2491 | pr_err("Half Duplex initialization parameter too large\n"); |
2533 | __func__); | ||
2534 | return ret_val; | 2492 | return ret_val; |
2535 | } | 2493 | } |
2536 | 2494 | ||
@@ -2567,9 +2525,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
2567 | UCC_GETH_TX_GLOBAL_PRAM_ALIGNMENT); | 2525 | UCC_GETH_TX_GLOBAL_PRAM_ALIGNMENT); |
2568 | if (IS_ERR_VALUE(ugeth->tx_glbl_pram_offset)) { | 2526 | if (IS_ERR_VALUE(ugeth->tx_glbl_pram_offset)) { |
2569 | if (netif_msg_ifup(ugeth)) | 2527 | if (netif_msg_ifup(ugeth)) |
2570 | ugeth_err | 2528 | pr_err("Can not allocate DPRAM memory for p_tx_glbl_pram\n"); |
2571 | ("%s: Can not allocate DPRAM memory for p_tx_glbl_pram.", | ||
2572 | __func__); | ||
2573 | return -ENOMEM; | 2529 | return -ENOMEM; |
2574 | } | 2530 | } |
2575 | ugeth->p_tx_glbl_pram = | 2531 | ugeth->p_tx_glbl_pram = |
@@ -2589,9 +2545,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
2589 | UCC_GETH_THREAD_DATA_ALIGNMENT); | 2545 | UCC_GETH_THREAD_DATA_ALIGNMENT); |
2590 | if (IS_ERR_VALUE(ugeth->thread_dat_tx_offset)) { | 2546 | if (IS_ERR_VALUE(ugeth->thread_dat_tx_offset)) { |
2591 | if (netif_msg_ifup(ugeth)) | 2547 | if (netif_msg_ifup(ugeth)) |
2592 | ugeth_err | 2548 | pr_err("Can not allocate DPRAM memory for p_thread_data_tx\n"); |
2593 | ("%s: Can not allocate DPRAM memory for p_thread_data_tx.", | ||
2594 | __func__); | ||
2595 | return -ENOMEM; | 2549 | return -ENOMEM; |
2596 | } | 2550 | } |
2597 | 2551 | ||
@@ -2618,9 +2572,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
2618 | UCC_GETH_SEND_QUEUE_QUEUE_DESCRIPTOR_ALIGNMENT); | 2572 | UCC_GETH_SEND_QUEUE_QUEUE_DESCRIPTOR_ALIGNMENT); |
2619 | if (IS_ERR_VALUE(ugeth->send_q_mem_reg_offset)) { | 2573 | if (IS_ERR_VALUE(ugeth->send_q_mem_reg_offset)) { |
2620 | if (netif_msg_ifup(ugeth)) | 2574 | if (netif_msg_ifup(ugeth)) |
2621 | ugeth_err | 2575 | pr_err("Can not allocate DPRAM memory for p_send_q_mem_reg\n"); |
2622 | ("%s: Can not allocate DPRAM memory for p_send_q_mem_reg.", | ||
2623 | __func__); | ||
2624 | return -ENOMEM; | 2576 | return -ENOMEM; |
2625 | } | 2577 | } |
2626 | 2578 | ||
@@ -2661,9 +2613,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
2661 | UCC_GETH_SCHEDULER_ALIGNMENT); | 2613 | UCC_GETH_SCHEDULER_ALIGNMENT); |
2662 | if (IS_ERR_VALUE(ugeth->scheduler_offset)) { | 2614 | if (IS_ERR_VALUE(ugeth->scheduler_offset)) { |
2663 | if (netif_msg_ifup(ugeth)) | 2615 | if (netif_msg_ifup(ugeth)) |
2664 | ugeth_err | 2616 | pr_err("Can not allocate DPRAM memory for p_scheduler\n"); |
2665 | ("%s: Can not allocate DPRAM memory for p_scheduler.", | ||
2666 | __func__); | ||
2667 | return -ENOMEM; | 2617 | return -ENOMEM; |
2668 | } | 2618 | } |
2669 | 2619 | ||
@@ -2710,10 +2660,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
2710 | UCC_GETH_TX_STATISTICS_ALIGNMENT); | 2660 | UCC_GETH_TX_STATISTICS_ALIGNMENT); |
2711 | if (IS_ERR_VALUE(ugeth->tx_fw_statistics_pram_offset)) { | 2661 | if (IS_ERR_VALUE(ugeth->tx_fw_statistics_pram_offset)) { |
2712 | if (netif_msg_ifup(ugeth)) | 2662 | if (netif_msg_ifup(ugeth)) |
2713 | ugeth_err | 2663 | pr_err("Can not allocate DPRAM memory for p_tx_fw_statistics_pram\n"); |
2714 | ("%s: Can not allocate DPRAM memory for" | ||
2715 | " p_tx_fw_statistics_pram.", | ||
2716 | __func__); | ||
2717 | return -ENOMEM; | 2664 | return -ENOMEM; |
2718 | } | 2665 | } |
2719 | ugeth->p_tx_fw_statistics_pram = | 2666 | ugeth->p_tx_fw_statistics_pram = |
@@ -2750,9 +2697,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
2750 | UCC_GETH_RX_GLOBAL_PRAM_ALIGNMENT); | 2697 | UCC_GETH_RX_GLOBAL_PRAM_ALIGNMENT); |
2751 | if (IS_ERR_VALUE(ugeth->rx_glbl_pram_offset)) { | 2698 | if (IS_ERR_VALUE(ugeth->rx_glbl_pram_offset)) { |
2752 | if (netif_msg_ifup(ugeth)) | 2699 | if (netif_msg_ifup(ugeth)) |
2753 | ugeth_err | 2700 | pr_err("Can not allocate DPRAM memory for p_rx_glbl_pram\n"); |
2754 | ("%s: Can not allocate DPRAM memory for p_rx_glbl_pram.", | ||
2755 | __func__); | ||
2756 | return -ENOMEM; | 2701 | return -ENOMEM; |
2757 | } | 2702 | } |
2758 | ugeth->p_rx_glbl_pram = | 2703 | ugeth->p_rx_glbl_pram = |
@@ -2771,9 +2716,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
2771 | UCC_GETH_THREAD_DATA_ALIGNMENT); | 2716 | UCC_GETH_THREAD_DATA_ALIGNMENT); |
2772 | if (IS_ERR_VALUE(ugeth->thread_dat_rx_offset)) { | 2717 | if (IS_ERR_VALUE(ugeth->thread_dat_rx_offset)) { |
2773 | if (netif_msg_ifup(ugeth)) | 2718 | if (netif_msg_ifup(ugeth)) |
2774 | ugeth_err | 2719 | pr_err("Can not allocate DPRAM memory for p_thread_data_rx\n"); |
2775 | ("%s: Can not allocate DPRAM memory for p_thread_data_rx.", | ||
2776 | __func__); | ||
2777 | return -ENOMEM; | 2720 | return -ENOMEM; |
2778 | } | 2721 | } |
2779 | 2722 | ||
@@ -2794,9 +2737,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
2794 | UCC_GETH_RX_STATISTICS_ALIGNMENT); | 2737 | UCC_GETH_RX_STATISTICS_ALIGNMENT); |
2795 | if (IS_ERR_VALUE(ugeth->rx_fw_statistics_pram_offset)) { | 2738 | if (IS_ERR_VALUE(ugeth->rx_fw_statistics_pram_offset)) { |
2796 | if (netif_msg_ifup(ugeth)) | 2739 | if (netif_msg_ifup(ugeth)) |
2797 | ugeth_err | 2740 | pr_err("Can not allocate DPRAM memory for p_rx_fw_statistics_pram\n"); |
2798 | ("%s: Can not allocate DPRAM memory for" | ||
2799 | " p_rx_fw_statistics_pram.", __func__); | ||
2800 | return -ENOMEM; | 2741 | return -ENOMEM; |
2801 | } | 2742 | } |
2802 | ugeth->p_rx_fw_statistics_pram = | 2743 | ugeth->p_rx_fw_statistics_pram = |
@@ -2816,9 +2757,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
2816 | + 4, UCC_GETH_RX_INTERRUPT_COALESCING_ALIGNMENT); | 2757 | + 4, UCC_GETH_RX_INTERRUPT_COALESCING_ALIGNMENT); |
2817 | if (IS_ERR_VALUE(ugeth->rx_irq_coalescing_tbl_offset)) { | 2758 | if (IS_ERR_VALUE(ugeth->rx_irq_coalescing_tbl_offset)) { |
2818 | if (netif_msg_ifup(ugeth)) | 2759 | if (netif_msg_ifup(ugeth)) |
2819 | ugeth_err | 2760 | pr_err("Can not allocate DPRAM memory for p_rx_irq_coalescing_tbl\n"); |
2820 | ("%s: Can not allocate DPRAM memory for" | ||
2821 | " p_rx_irq_coalescing_tbl.", __func__); | ||
2822 | return -ENOMEM; | 2761 | return -ENOMEM; |
2823 | } | 2762 | } |
2824 | 2763 | ||
@@ -2884,9 +2823,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
2884 | UCC_GETH_RX_BD_QUEUES_ALIGNMENT); | 2823 | UCC_GETH_RX_BD_QUEUES_ALIGNMENT); |
2885 | if (IS_ERR_VALUE(ugeth->rx_bd_qs_tbl_offset)) { | 2824 | if (IS_ERR_VALUE(ugeth->rx_bd_qs_tbl_offset)) { |
2886 | if (netif_msg_ifup(ugeth)) | 2825 | if (netif_msg_ifup(ugeth)) |
2887 | ugeth_err | 2826 | pr_err("Can not allocate DPRAM memory for p_rx_bd_qs_tbl\n"); |
2888 | ("%s: Can not allocate DPRAM memory for p_rx_bd_qs_tbl.", | ||
2889 | __func__); | ||
2890 | return -ENOMEM; | 2827 | return -ENOMEM; |
2891 | } | 2828 | } |
2892 | 2829 | ||
@@ -2961,8 +2898,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
2961 | if (ug_info->rxExtendedFiltering) { | 2898 | if (ug_info->rxExtendedFiltering) { |
2962 | if (!ug_info->extendedFilteringChainPointer) { | 2899 | if (!ug_info->extendedFilteringChainPointer) { |
2963 | if (netif_msg_ifup(ugeth)) | 2900 | if (netif_msg_ifup(ugeth)) |
2964 | ugeth_err("%s: Null Extended Filtering Chain Pointer.", | 2901 | pr_err("Null Extended Filtering Chain Pointer\n"); |
2965 | __func__); | ||
2966 | return -EINVAL; | 2902 | return -EINVAL; |
2967 | } | 2903 | } |
2968 | 2904 | ||
@@ -2973,9 +2909,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
2973 | UCC_GETH_RX_EXTENDED_FILTERING_GLOBAL_PARAMETERS_ALIGNMENT); | 2909 | UCC_GETH_RX_EXTENDED_FILTERING_GLOBAL_PARAMETERS_ALIGNMENT); |
2974 | if (IS_ERR_VALUE(ugeth->exf_glbl_param_offset)) { | 2910 | if (IS_ERR_VALUE(ugeth->exf_glbl_param_offset)) { |
2975 | if (netif_msg_ifup(ugeth)) | 2911 | if (netif_msg_ifup(ugeth)) |
2976 | ugeth_err | 2912 | pr_err("Can not allocate DPRAM memory for p_exf_glbl_param\n"); |
2977 | ("%s: Can not allocate DPRAM memory for" | ||
2978 | " p_exf_glbl_param.", __func__); | ||
2979 | return -ENOMEM; | 2913 | return -ENOMEM; |
2980 | } | 2914 | } |
2981 | 2915 | ||
@@ -3020,9 +2954,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
3020 | if (!(ugeth->p_init_enet_param_shadow = | 2954 | if (!(ugeth->p_init_enet_param_shadow = |
3021 | kmalloc(sizeof(struct ucc_geth_init_pram), GFP_KERNEL))) { | 2955 | kmalloc(sizeof(struct ucc_geth_init_pram), GFP_KERNEL))) { |
3022 | if (netif_msg_ifup(ugeth)) | 2956 | if (netif_msg_ifup(ugeth)) |
3023 | ugeth_err | 2957 | pr_err("Can not allocate memory for p_UccInitEnetParamShadows\n"); |
3024 | ("%s: Can not allocate memory for" | ||
3025 | " p_UccInitEnetParamShadows.", __func__); | ||
3026 | return -ENOMEM; | 2958 | return -ENOMEM; |
3027 | } | 2959 | } |
3028 | /* Zero out *p_init_enet_param_shadow */ | 2960 | /* Zero out *p_init_enet_param_shadow */ |
@@ -3055,8 +2987,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
3055 | (ug_info->largestexternallookupkeysize != | 2987 | (ug_info->largestexternallookupkeysize != |
3056 | QE_FLTR_LARGEST_EXTERNAL_TABLE_LOOKUP_KEY_SIZE_16_BYTES)) { | 2988 | QE_FLTR_LARGEST_EXTERNAL_TABLE_LOOKUP_KEY_SIZE_16_BYTES)) { |
3057 | if (netif_msg_ifup(ugeth)) | 2989 | if (netif_msg_ifup(ugeth)) |
3058 | ugeth_err("%s: Invalid largest External Lookup Key Size.", | 2990 | pr_err("Invalid largest External Lookup Key Size\n"); |
3059 | __func__); | ||
3060 | return -EINVAL; | 2991 | return -EINVAL; |
3061 | } | 2992 | } |
3062 | ugeth->p_init_enet_param_shadow->largestexternallookupkeysize = | 2993 | ugeth->p_init_enet_param_shadow->largestexternallookupkeysize = |
@@ -3081,8 +3012,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
3081 | , size, UCC_GETH_THREAD_RX_PRAM_ALIGNMENT, | 3012 | , size, UCC_GETH_THREAD_RX_PRAM_ALIGNMENT, |
3082 | ug_info->riscRx, 1)) != 0) { | 3013 | ug_info->riscRx, 1)) != 0) { |
3083 | if (netif_msg_ifup(ugeth)) | 3014 | if (netif_msg_ifup(ugeth)) |
3084 | ugeth_err("%s: Can not fill p_init_enet_param_shadow.", | 3015 | pr_err("Can not fill p_init_enet_param_shadow\n"); |
3085 | __func__); | ||
3086 | return ret_val; | 3016 | return ret_val; |
3087 | } | 3017 | } |
3088 | 3018 | ||
@@ -3096,8 +3026,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
3096 | UCC_GETH_THREAD_TX_PRAM_ALIGNMENT, | 3026 | UCC_GETH_THREAD_TX_PRAM_ALIGNMENT, |
3097 | ug_info->riscTx, 0)) != 0) { | 3027 | ug_info->riscTx, 0)) != 0) { |
3098 | if (netif_msg_ifup(ugeth)) | 3028 | if (netif_msg_ifup(ugeth)) |
3099 | ugeth_err("%s: Can not fill p_init_enet_param_shadow.", | 3029 | pr_err("Can not fill p_init_enet_param_shadow\n"); |
3100 | __func__); | ||
3101 | return ret_val; | 3030 | return ret_val; |
3102 | } | 3031 | } |
3103 | 3032 | ||
@@ -3105,8 +3034,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
3105 | for (i = 0; i < ug_info->numQueuesRx; i++) { | 3034 | for (i = 0; i < ug_info->numQueuesRx; i++) { |
3106 | if ((ret_val = rx_bd_buffer_set(ugeth, (u8) i)) != 0) { | 3035 | if ((ret_val = rx_bd_buffer_set(ugeth, (u8) i)) != 0) { |
3107 | if (netif_msg_ifup(ugeth)) | 3036 | if (netif_msg_ifup(ugeth)) |
3108 | ugeth_err("%s: Can not fill Rx bds with buffers.", | 3037 | pr_err("Can not fill Rx bds with buffers\n"); |
3109 | __func__); | ||
3110 | return ret_val; | 3038 | return ret_val; |
3111 | } | 3039 | } |
3112 | } | 3040 | } |
@@ -3115,9 +3043,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) | |||
3115 | init_enet_pram_offset = qe_muram_alloc(sizeof(struct ucc_geth_init_pram), 4); | 3043 | init_enet_pram_offset = qe_muram_alloc(sizeof(struct ucc_geth_init_pram), 4); |
3116 | if (IS_ERR_VALUE(init_enet_pram_offset)) { | 3044 | if (IS_ERR_VALUE(init_enet_pram_offset)) { |
3117 | if (netif_msg_ifup(ugeth)) | 3045 | if (netif_msg_ifup(ugeth)) |
3118 | ugeth_err | 3046 | pr_err("Can not allocate DPRAM memory for p_init_enet_pram\n"); |
3119 | ("%s: Can not allocate DPRAM memory for p_init_enet_pram.", | ||
3120 | __func__); | ||
3121 | return -ENOMEM; | 3047 | return -ENOMEM; |
3122 | } | 3048 | } |
3123 | p_init_enet_pram = | 3049 | p_init_enet_pram = |
@@ -3266,8 +3192,8 @@ static int ucc_geth_rx(struct ucc_geth_private *ugeth, u8 rxQ, int rx_work_limit | |||
3266 | (!(bd_status & (R_F | R_L))) || | 3192 | (!(bd_status & (R_F | R_L))) || |
3267 | (bd_status & R_ERRORS_FATAL)) { | 3193 | (bd_status & R_ERRORS_FATAL)) { |
3268 | if (netif_msg_rx_err(ugeth)) | 3194 | if (netif_msg_rx_err(ugeth)) |
3269 | ugeth_err("%s, %d: ERROR!!! skb - 0x%08x", | 3195 | pr_err("%d: ERROR!!! skb - 0x%08x\n", |
3270 | __func__, __LINE__, (u32) skb); | 3196 | __LINE__, (u32)skb); |
3271 | dev_kfree_skb(skb); | 3197 | dev_kfree_skb(skb); |
3272 | 3198 | ||
3273 | ugeth->rx_skbuff[rxQ][ugeth->skb_currx[rxQ]] = NULL; | 3199 | ugeth->rx_skbuff[rxQ][ugeth->skb_currx[rxQ]] = NULL; |
@@ -3290,7 +3216,7 @@ static int ucc_geth_rx(struct ucc_geth_private *ugeth, u8 rxQ, int rx_work_limit | |||
3290 | skb = get_new_skb(ugeth, bd); | 3216 | skb = get_new_skb(ugeth, bd); |
3291 | if (!skb) { | 3217 | if (!skb) { |
3292 | if (netif_msg_rx_err(ugeth)) | 3218 | if (netif_msg_rx_err(ugeth)) |
3293 | ugeth_warn("%s: No Rx Data Buffer", __func__); | 3219 | pr_warn("No Rx Data Buffer\n"); |
3294 | dev->stats.rx_dropped++; | 3220 | dev->stats.rx_dropped++; |
3295 | break; | 3221 | break; |
3296 | } | 3222 | } |
@@ -3481,25 +3407,19 @@ static int ucc_geth_init_mac(struct ucc_geth_private *ugeth) | |||
3481 | 3407 | ||
3482 | err = ucc_struct_init(ugeth); | 3408 | err = ucc_struct_init(ugeth); |
3483 | if (err) { | 3409 | if (err) { |
3484 | if (netif_msg_ifup(ugeth)) | 3410 | netif_err(ugeth, ifup, dev, "Cannot configure internal struct, aborting\n"); |
3485 | ugeth_err("%s: Cannot configure internal struct, " | ||
3486 | "aborting.", dev->name); | ||
3487 | goto err; | 3411 | goto err; |
3488 | } | 3412 | } |
3489 | 3413 | ||
3490 | err = ucc_geth_startup(ugeth); | 3414 | err = ucc_geth_startup(ugeth); |
3491 | if (err) { | 3415 | if (err) { |
3492 | if (netif_msg_ifup(ugeth)) | 3416 | netif_err(ugeth, ifup, dev, "Cannot configure net device, aborting\n"); |
3493 | ugeth_err("%s: Cannot configure net device, aborting.", | ||
3494 | dev->name); | ||
3495 | goto err; | 3417 | goto err; |
3496 | } | 3418 | } |
3497 | 3419 | ||
3498 | err = adjust_enet_interface(ugeth); | 3420 | err = adjust_enet_interface(ugeth); |
3499 | if (err) { | 3421 | if (err) { |
3500 | if (netif_msg_ifup(ugeth)) | 3422 | netif_err(ugeth, ifup, dev, "Cannot configure net device, aborting\n"); |
3501 | ugeth_err("%s: Cannot configure net device, aborting.", | ||
3502 | dev->name); | ||
3503 | goto err; | 3423 | goto err; |
3504 | } | 3424 | } |
3505 | 3425 | ||
@@ -3516,8 +3436,7 @@ static int ucc_geth_init_mac(struct ucc_geth_private *ugeth) | |||
3516 | 3436 | ||
3517 | err = ugeth_enable(ugeth, COMM_DIR_RX_AND_TX); | 3437 | err = ugeth_enable(ugeth, COMM_DIR_RX_AND_TX); |
3518 | if (err) { | 3438 | if (err) { |
3519 | if (netif_msg_ifup(ugeth)) | 3439 | netif_err(ugeth, ifup, dev, "Cannot enable net device, aborting\n"); |
3520 | ugeth_err("%s: Cannot enable net device, aborting.", dev->name); | ||
3521 | goto err; | 3440 | goto err; |
3522 | } | 3441 | } |
3523 | 3442 | ||
@@ -3538,35 +3457,27 @@ static int ucc_geth_open(struct net_device *dev) | |||
3538 | 3457 | ||
3539 | /* Test station address */ | 3458 | /* Test station address */ |
3540 | if (dev->dev_addr[0] & ENET_GROUP_ADDR) { | 3459 | if (dev->dev_addr[0] & ENET_GROUP_ADDR) { |
3541 | if (netif_msg_ifup(ugeth)) | 3460 | netif_err(ugeth, ifup, dev, |
3542 | ugeth_err("%s: Multicast address used for station " | 3461 | "Multicast address used for station address - is this what you wanted?\n"); |
3543 | "address - is this what you wanted?", | ||
3544 | __func__); | ||
3545 | return -EINVAL; | 3462 | return -EINVAL; |
3546 | } | 3463 | } |
3547 | 3464 | ||
3548 | err = init_phy(dev); | 3465 | err = init_phy(dev); |
3549 | if (err) { | 3466 | if (err) { |
3550 | if (netif_msg_ifup(ugeth)) | 3467 | netif_err(ugeth, ifup, dev, "Cannot initialize PHY, aborting\n"); |
3551 | ugeth_err("%s: Cannot initialize PHY, aborting.", | ||
3552 | dev->name); | ||
3553 | return err; | 3468 | return err; |
3554 | } | 3469 | } |
3555 | 3470 | ||
3556 | err = ucc_geth_init_mac(ugeth); | 3471 | err = ucc_geth_init_mac(ugeth); |
3557 | if (err) { | 3472 | if (err) { |
3558 | if (netif_msg_ifup(ugeth)) | 3473 | netif_err(ugeth, ifup, dev, "Cannot initialize MAC, aborting\n"); |
3559 | ugeth_err("%s: Cannot initialize MAC, aborting.", | ||
3560 | dev->name); | ||
3561 | goto err; | 3474 | goto err; |
3562 | } | 3475 | } |
3563 | 3476 | ||
3564 | err = request_irq(ugeth->ug_info->uf_info.irq, ucc_geth_irq_handler, | 3477 | err = request_irq(ugeth->ug_info->uf_info.irq, ucc_geth_irq_handler, |
3565 | 0, "UCC Geth", dev); | 3478 | 0, "UCC Geth", dev); |
3566 | if (err) { | 3479 | if (err) { |
3567 | if (netif_msg_ifup(ugeth)) | 3480 | netif_err(ugeth, ifup, dev, "Cannot get IRQ for net device, aborting\n"); |
3568 | ugeth_err("%s: Cannot get IRQ for net device, aborting.", | ||
3569 | dev->name); | ||
3570 | goto err; | 3481 | goto err; |
3571 | } | 3482 | } |
3572 | 3483 | ||
@@ -3704,8 +3615,7 @@ static int ucc_geth_resume(struct platform_device *ofdev) | |||
3704 | 3615 | ||
3705 | err = ucc_geth_init_mac(ugeth); | 3616 | err = ucc_geth_init_mac(ugeth); |
3706 | if (err) { | 3617 | if (err) { |
3707 | ugeth_err("%s: Cannot initialize MAC, aborting.", | 3618 | netdev_err(ndev, "Cannot initialize MAC, aborting\n"); |
3708 | ndev->name); | ||
3709 | return err; | 3619 | return err; |
3710 | } | 3620 | } |
3711 | } | 3621 | } |
@@ -3825,8 +3735,7 @@ static int ucc_geth_probe(struct platform_device* ofdev) | |||
3825 | ug_info = &ugeth_info[ucc_num]; | 3735 | ug_info = &ugeth_info[ucc_num]; |
3826 | if (ug_info == NULL) { | 3736 | if (ug_info == NULL) { |
3827 | if (netif_msg_probe(&debug)) | 3737 | if (netif_msg_probe(&debug)) |
3828 | ugeth_err("%s: [%d] Missing additional data!", | 3738 | pr_err("[%d] Missing additional data!\n", ucc_num); |
3829 | __func__, ucc_num); | ||
3830 | return -ENODEV; | 3739 | return -ENODEV; |
3831 | } | 3740 | } |
3832 | 3741 | ||
@@ -3837,8 +3746,7 @@ static int ucc_geth_probe(struct platform_device* ofdev) | |||
3837 | ug_info->uf_info.rx_clock = qe_clock_source(sprop); | 3746 | ug_info->uf_info.rx_clock = qe_clock_source(sprop); |
3838 | if ((ug_info->uf_info.rx_clock < QE_CLK_NONE) || | 3747 | if ((ug_info->uf_info.rx_clock < QE_CLK_NONE) || |
3839 | (ug_info->uf_info.rx_clock > QE_CLK24)) { | 3748 | (ug_info->uf_info.rx_clock > QE_CLK24)) { |
3840 | printk(KERN_ERR | 3749 | pr_err("invalid rx-clock-name property\n"); |
3841 | "ucc_geth: invalid rx-clock-name property\n"); | ||
3842 | return -EINVAL; | 3750 | return -EINVAL; |
3843 | } | 3751 | } |
3844 | } else { | 3752 | } else { |
@@ -3846,13 +3754,11 @@ static int ucc_geth_probe(struct platform_device* ofdev) | |||
3846 | if (!prop) { | 3754 | if (!prop) { |
3847 | /* If both rx-clock-name and rx-clock are missing, | 3755 | /* If both rx-clock-name and rx-clock are missing, |
3848 | we want to tell people to use rx-clock-name. */ | 3756 | we want to tell people to use rx-clock-name. */ |
3849 | printk(KERN_ERR | 3757 | pr_err("missing rx-clock-name property\n"); |
3850 | "ucc_geth: missing rx-clock-name property\n"); | ||
3851 | return -EINVAL; | 3758 | return -EINVAL; |
3852 | } | 3759 | } |
3853 | if ((*prop < QE_CLK_NONE) || (*prop > QE_CLK24)) { | 3760 | if ((*prop < QE_CLK_NONE) || (*prop > QE_CLK24)) { |
3854 | printk(KERN_ERR | 3761 | pr_err("invalid rx-clock propperty\n"); |
3855 | "ucc_geth: invalid rx-clock propperty\n"); | ||
3856 | return -EINVAL; | 3762 | return -EINVAL; |
3857 | } | 3763 | } |
3858 | ug_info->uf_info.rx_clock = *prop; | 3764 | ug_info->uf_info.rx_clock = *prop; |
@@ -3863,20 +3769,17 @@ static int ucc_geth_probe(struct platform_device* ofdev) | |||
3863 | ug_info->uf_info.tx_clock = qe_clock_source(sprop); | 3769 | ug_info->uf_info.tx_clock = qe_clock_source(sprop); |
3864 | if ((ug_info->uf_info.tx_clock < QE_CLK_NONE) || | 3770 | if ((ug_info->uf_info.tx_clock < QE_CLK_NONE) || |
3865 | (ug_info->uf_info.tx_clock > QE_CLK24)) { | 3771 | (ug_info->uf_info.tx_clock > QE_CLK24)) { |
3866 | printk(KERN_ERR | 3772 | pr_err("invalid tx-clock-name property\n"); |
3867 | "ucc_geth: invalid tx-clock-name property\n"); | ||
3868 | return -EINVAL; | 3773 | return -EINVAL; |
3869 | } | 3774 | } |
3870 | } else { | 3775 | } else { |
3871 | prop = of_get_property(np, "tx-clock", NULL); | 3776 | prop = of_get_property(np, "tx-clock", NULL); |
3872 | if (!prop) { | 3777 | if (!prop) { |
3873 | printk(KERN_ERR | 3778 | pr_err("missing tx-clock-name property\n"); |
3874 | "ucc_geth: missing tx-clock-name property\n"); | ||
3875 | return -EINVAL; | 3779 | return -EINVAL; |
3876 | } | 3780 | } |
3877 | if ((*prop < QE_CLK_NONE) || (*prop > QE_CLK24)) { | 3781 | if ((*prop < QE_CLK_NONE) || (*prop > QE_CLK24)) { |
3878 | printk(KERN_ERR | 3782 | pr_err("invalid tx-clock property\n"); |
3879 | "ucc_geth: invalid tx-clock property\n"); | ||
3880 | return -EINVAL; | 3783 | return -EINVAL; |
3881 | } | 3784 | } |
3882 | ug_info->uf_info.tx_clock = *prop; | 3785 | ug_info->uf_info.tx_clock = *prop; |
@@ -3949,7 +3852,7 @@ static int ucc_geth_probe(struct platform_device* ofdev) | |||
3949 | } | 3852 | } |
3950 | 3853 | ||
3951 | if (netif_msg_probe(&debug)) | 3854 | if (netif_msg_probe(&debug)) |
3952 | printk(KERN_INFO "ucc_geth: UCC%1d at 0x%8x (irq = %d)\n", | 3855 | pr_info("UCC%1d at 0x%8x (irq = %d)\n", |
3953 | ug_info->uf_info.ucc_num + 1, ug_info->uf_info.regs, | 3856 | ug_info->uf_info.ucc_num + 1, ug_info->uf_info.regs, |
3954 | ug_info->uf_info.irq); | 3857 | ug_info->uf_info.irq); |
3955 | 3858 | ||
@@ -3988,8 +3891,8 @@ static int ucc_geth_probe(struct platform_device* ofdev) | |||
3988 | err = register_netdev(dev); | 3891 | err = register_netdev(dev); |
3989 | if (err) { | 3892 | if (err) { |
3990 | if (netif_msg_probe(ugeth)) | 3893 | if (netif_msg_probe(ugeth)) |
3991 | ugeth_err("%s: Cannot register net device, aborting.", | 3894 | pr_err("%s: Cannot register net device, aborting\n", |
3992 | dev->name); | 3895 | dev->name); |
3993 | free_netdev(dev); | 3896 | free_netdev(dev); |
3994 | return err; | 3897 | return err; |
3995 | } | 3898 | } |
@@ -4047,7 +3950,7 @@ static int __init ucc_geth_init(void) | |||
4047 | int i, ret; | 3950 | int i, ret; |
4048 | 3951 | ||
4049 | if (netif_msg_drv(&debug)) | 3952 | if (netif_msg_drv(&debug)) |
4050 | printk(KERN_INFO "ucc_geth: " DRV_DESC "\n"); | 3953 | pr_info(DRV_DESC "\n"); |
4051 | for (i = 0; i < 8; i++) | 3954 | for (i = 0; i < 8; i++) |
4052 | memcpy(&(ugeth_info[i]), &ugeth_primary_info, | 3955 | memcpy(&(ugeth_info[i]), &ugeth_primary_info, |
4053 | sizeof(ugeth_primary_info)); | 3956 | sizeof(ugeth_primary_info)); |
diff --git a/drivers/net/ethernet/freescale/ucc_geth_ethtool.c b/drivers/net/ethernet/freescale/ucc_geth_ethtool.c index 1ebf7128ec04..e79aaf9ae52a 100644 --- a/drivers/net/ethernet/freescale/ucc_geth_ethtool.c +++ b/drivers/net/ethernet/freescale/ucc_geth_ethtool.c | |||
@@ -38,7 +38,7 @@ | |||
38 | 38 | ||
39 | #include "ucc_geth.h" | 39 | #include "ucc_geth.h" |
40 | 40 | ||
41 | static char hw_stat_gstrings[][ETH_GSTRING_LEN] = { | 41 | static const char hw_stat_gstrings[][ETH_GSTRING_LEN] = { |
42 | "tx-64-frames", | 42 | "tx-64-frames", |
43 | "tx-65-127-frames", | 43 | "tx-65-127-frames", |
44 | "tx-128-255-frames", | 44 | "tx-128-255-frames", |
@@ -59,7 +59,7 @@ static char hw_stat_gstrings[][ETH_GSTRING_LEN] = { | |||
59 | "rx-dropped-frames", | 59 | "rx-dropped-frames", |
60 | }; | 60 | }; |
61 | 61 | ||
62 | static char tx_fw_stat_gstrings[][ETH_GSTRING_LEN] = { | 62 | static const char tx_fw_stat_gstrings[][ETH_GSTRING_LEN] = { |
63 | "tx-single-collision", | 63 | "tx-single-collision", |
64 | "tx-multiple-collision", | 64 | "tx-multiple-collision", |
65 | "tx-late-collsion", | 65 | "tx-late-collsion", |
@@ -74,7 +74,7 @@ static char tx_fw_stat_gstrings[][ETH_GSTRING_LEN] = { | |||
74 | "tx-jumbo-frames", | 74 | "tx-jumbo-frames", |
75 | }; | 75 | }; |
76 | 76 | ||
77 | static char rx_fw_stat_gstrings[][ETH_GSTRING_LEN] = { | 77 | static const char rx_fw_stat_gstrings[][ETH_GSTRING_LEN] = { |
78 | "rx-crc-errors", | 78 | "rx-crc-errors", |
79 | "rx-alignment-errors", | 79 | "rx-alignment-errors", |
80 | "rx-in-range-length-errors", | 80 | "rx-in-range-length-errors", |
@@ -160,8 +160,7 @@ uec_set_pauseparam(struct net_device *netdev, | |||
160 | if (ugeth->phydev->autoneg) { | 160 | if (ugeth->phydev->autoneg) { |
161 | if (netif_running(netdev)) { | 161 | if (netif_running(netdev)) { |
162 | /* FIXME: automatically restart */ | 162 | /* FIXME: automatically restart */ |
163 | printk(KERN_INFO | 163 | netdev_info(netdev, "Please re-open the interface\n"); |
164 | "Please re-open the interface.\n"); | ||
165 | } | 164 | } |
166 | } else { | 165 | } else { |
167 | struct ucc_geth_info *ug_info = ugeth->ug_info; | 166 | struct ucc_geth_info *ug_info = ugeth->ug_info; |
@@ -240,18 +239,18 @@ uec_set_ringparam(struct net_device *netdev, | |||
240 | int queue = 0, ret = 0; | 239 | int queue = 0, ret = 0; |
241 | 240 | ||
242 | if (ring->rx_pending < UCC_GETH_RX_BD_RING_SIZE_MIN) { | 241 | if (ring->rx_pending < UCC_GETH_RX_BD_RING_SIZE_MIN) { |
243 | printk("%s: RxBD ring size must be no smaller than %d.\n", | 242 | netdev_info(netdev, "RxBD ring size must be no smaller than %d\n", |
244 | netdev->name, UCC_GETH_RX_BD_RING_SIZE_MIN); | 243 | UCC_GETH_RX_BD_RING_SIZE_MIN); |
245 | return -EINVAL; | 244 | return -EINVAL; |
246 | } | 245 | } |
247 | if (ring->rx_pending % UCC_GETH_RX_BD_RING_SIZE_ALIGNMENT) { | 246 | if (ring->rx_pending % UCC_GETH_RX_BD_RING_SIZE_ALIGNMENT) { |
248 | printk("%s: RxBD ring size must be multiple of %d.\n", | 247 | netdev_info(netdev, "RxBD ring size must be multiple of %d\n", |
249 | netdev->name, UCC_GETH_RX_BD_RING_SIZE_ALIGNMENT); | 248 | UCC_GETH_RX_BD_RING_SIZE_ALIGNMENT); |
250 | return -EINVAL; | 249 | return -EINVAL; |
251 | } | 250 | } |
252 | if (ring->tx_pending < UCC_GETH_TX_BD_RING_SIZE_MIN) { | 251 | if (ring->tx_pending < UCC_GETH_TX_BD_RING_SIZE_MIN) { |
253 | printk("%s: TxBD ring size must be no smaller than %d.\n", | 252 | netdev_info(netdev, "TxBD ring size must be no smaller than %d\n", |
254 | netdev->name, UCC_GETH_TX_BD_RING_SIZE_MIN); | 253 | UCC_GETH_TX_BD_RING_SIZE_MIN); |
255 | return -EINVAL; | 254 | return -EINVAL; |
256 | } | 255 | } |
257 | 256 | ||
@@ -260,8 +259,7 @@ uec_set_ringparam(struct net_device *netdev, | |||
260 | 259 | ||
261 | if (netif_running(netdev)) { | 260 | if (netif_running(netdev)) { |
262 | /* FIXME: restart automatically */ | 261 | /* FIXME: restart automatically */ |
263 | printk(KERN_INFO | 262 | netdev_info(netdev, "Please re-open the interface\n"); |
264 | "Please re-open the interface.\n"); | ||
265 | } | 263 | } |
266 | 264 | ||
267 | return ret; | 265 | return ret; |