diff options
author | Joe Perches <joe@perches.com> | 2010-02-22 11:56:57 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-26 04:38:34 -0500 |
commit | c1f51212eb809849bdc68a856ae5f424dcf20d9b (patch) | |
tree | 2a01f9e5201d3fc40527c24961b0f888f9e0ed61 /drivers/net/chelsio | |
parent | 003bdb279bb6b212f25ea4e60e0164b6109d3704 (diff) |
drivers/net/chelsio: Use pr_<level>, netif_msg_<type>
Convert CH_<level> and CH_DBG uses to pr_<level> and netif equivalents
Remove CH_<level> and CH_DBG macro definitions
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/chelsio')
-rw-r--r-- | drivers/net/chelsio/common.h | 24 | ||||
-rw-r--r-- | drivers/net/chelsio/cxgb2.c | 18 | ||||
-rw-r--r-- | drivers/net/chelsio/espi.c | 4 | ||||
-rw-r--r-- | drivers/net/chelsio/pm3393.c | 16 | ||||
-rw-r--r-- | drivers/net/chelsio/sge.c | 10 | ||||
-rw-r--r-- | drivers/net/chelsio/subr.c | 32 | ||||
-rw-r--r-- | drivers/net/chelsio/vsc7326.c | 24 |
7 files changed, 56 insertions, 72 deletions
diff --git a/drivers/net/chelsio/common.h b/drivers/net/chelsio/common.h index 9f89fd600643..2d11afe45310 100644 --- a/drivers/net/chelsio/common.h +++ b/drivers/net/chelsio/common.h | |||
@@ -36,6 +36,8 @@ | |||
36 | * * | 36 | * * |
37 | ****************************************************************************/ | 37 | ****************************************************************************/ |
38 | 38 | ||
39 | #define pr_fmt(fmt) "cxgb: " fmt | ||
40 | |||
39 | #ifndef _CXGB_COMMON_H_ | 41 | #ifndef _CXGB_COMMON_H_ |
40 | #define _CXGB_COMMON_H_ | 42 | #define _CXGB_COMMON_H_ |
41 | 43 | ||
@@ -55,28 +57,6 @@ | |||
55 | #define DRV_DESCRIPTION "Chelsio 10Gb Ethernet Driver" | 57 | #define DRV_DESCRIPTION "Chelsio 10Gb Ethernet Driver" |
56 | #define DRV_NAME "cxgb" | 58 | #define DRV_NAME "cxgb" |
57 | #define DRV_VERSION "2.2" | 59 | #define DRV_VERSION "2.2" |
58 | #define PFX DRV_NAME ": " | ||
59 | |||
60 | #define CH_ERR(fmt, ...) printk(KERN_ERR PFX fmt, ## __VA_ARGS__) | ||
61 | #define CH_WARN(fmt, ...) printk(KERN_WARNING PFX fmt, ## __VA_ARGS__) | ||
62 | #define CH_ALERT(fmt, ...) printk(KERN_ALERT PFX fmt, ## __VA_ARGS__) | ||
63 | |||
64 | /* | ||
65 | * More powerful macro that selectively prints messages based on msg_enable. | ||
66 | * For info and debugging messages. | ||
67 | */ | ||
68 | #define CH_MSG(adapter, level, category, fmt, ...) do { \ | ||
69 | if ((adapter)->msg_enable & NETIF_MSG_##category) \ | ||
70 | printk(KERN_##level PFX "%s: " fmt, (adapter)->name, \ | ||
71 | ## __VA_ARGS__); \ | ||
72 | } while (0) | ||
73 | |||
74 | #ifdef DEBUG | ||
75 | # define CH_DBG(adapter, category, fmt, ...) \ | ||
76 | CH_MSG(adapter, DEBUG, category, fmt, ## __VA_ARGS__) | ||
77 | #else | ||
78 | # define CH_DBG(fmt, ...) | ||
79 | #endif | ||
80 | 60 | ||
81 | #define CH_DEVICE(devid, ssid, idx) \ | 61 | #define CH_DEVICE(devid, ssid, idx) \ |
82 | { PCI_VENDOR_ID_CHELSIO, devid, PCI_ANY_ID, ssid, 0, 0, idx } | 62 | { PCI_VENDOR_ID_CHELSIO, devid, PCI_ANY_ID, ssid, 0, 0, idx } |
diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c index a54a32b16498..0f71304e0542 100644 --- a/drivers/net/chelsio/cxgb2.c +++ b/drivers/net/chelsio/cxgb2.c | |||
@@ -974,7 +974,7 @@ void t1_fatal_err(struct adapter *adapter) | |||
974 | t1_sge_stop(adapter->sge); | 974 | t1_sge_stop(adapter->sge); |
975 | t1_interrupts_disable(adapter); | 975 | t1_interrupts_disable(adapter); |
976 | } | 976 | } |
977 | CH_ALERT("%s: encountered fatal error, operation suspended\n", | 977 | pr_alert("%s: encountered fatal error, operation suspended\n", |
978 | adapter->name); | 978 | adapter->name); |
979 | } | 979 | } |
980 | 980 | ||
@@ -1018,7 +1018,7 @@ static int __devinit init_one(struct pci_dev *pdev, | |||
1018 | return err; | 1018 | return err; |
1019 | 1019 | ||
1020 | if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) { | 1020 | if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) { |
1021 | CH_ERR("%s: cannot find PCI device memory base address\n", | 1021 | pr_err("%s: cannot find PCI device memory base address\n", |
1022 | pci_name(pdev)); | 1022 | pci_name(pdev)); |
1023 | err = -ENODEV; | 1023 | err = -ENODEV; |
1024 | goto out_disable_pdev; | 1024 | goto out_disable_pdev; |
@@ -1028,20 +1028,20 @@ static int __devinit init_one(struct pci_dev *pdev, | |||
1028 | pci_using_dac = 1; | 1028 | pci_using_dac = 1; |
1029 | 1029 | ||
1030 | if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) { | 1030 | if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) { |
1031 | CH_ERR("%s: unable to obtain 64-bit DMA for " | 1031 | pr_err("%s: unable to obtain 64-bit DMA for " |
1032 | "consistent allocations\n", pci_name(pdev)); | 1032 | "consistent allocations\n", pci_name(pdev)); |
1033 | err = -ENODEV; | 1033 | err = -ENODEV; |
1034 | goto out_disable_pdev; | 1034 | goto out_disable_pdev; |
1035 | } | 1035 | } |
1036 | 1036 | ||
1037 | } else if ((err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) != 0) { | 1037 | } else if ((err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) != 0) { |
1038 | CH_ERR("%s: no usable DMA configuration\n", pci_name(pdev)); | 1038 | pr_err("%s: no usable DMA configuration\n", pci_name(pdev)); |
1039 | goto out_disable_pdev; | 1039 | goto out_disable_pdev; |
1040 | } | 1040 | } |
1041 | 1041 | ||
1042 | err = pci_request_regions(pdev, DRV_NAME); | 1042 | err = pci_request_regions(pdev, DRV_NAME); |
1043 | if (err) { | 1043 | if (err) { |
1044 | CH_ERR("%s: cannot obtain PCI resources\n", pci_name(pdev)); | 1044 | pr_err("%s: cannot obtain PCI resources\n", pci_name(pdev)); |
1045 | goto out_disable_pdev; | 1045 | goto out_disable_pdev; |
1046 | } | 1046 | } |
1047 | 1047 | ||
@@ -1069,7 +1069,7 @@ static int __devinit init_one(struct pci_dev *pdev, | |||
1069 | 1069 | ||
1070 | adapter->regs = ioremap(mmio_start, mmio_len); | 1070 | adapter->regs = ioremap(mmio_start, mmio_len); |
1071 | if (!adapter->regs) { | 1071 | if (!adapter->regs) { |
1072 | CH_ERR("%s: cannot map device registers\n", | 1072 | pr_err("%s: cannot map device registers\n", |
1073 | pci_name(pdev)); | 1073 | pci_name(pdev)); |
1074 | err = -ENOMEM; | 1074 | err = -ENOMEM; |
1075 | goto out_free_dev; | 1075 | goto out_free_dev; |
@@ -1148,8 +1148,8 @@ static int __devinit init_one(struct pci_dev *pdev, | |||
1148 | for (i = 0; i < bi->port_number; ++i) { | 1148 | for (i = 0; i < bi->port_number; ++i) { |
1149 | err = register_netdev(adapter->port[i].dev); | 1149 | err = register_netdev(adapter->port[i].dev); |
1150 | if (err) | 1150 | if (err) |
1151 | CH_WARN("%s: cannot register net device %s, skipping\n", | 1151 | pr_warning("%s: cannot register net device %s, skipping\n", |
1152 | pci_name(pdev), adapter->port[i].dev->name); | 1152 | pci_name(pdev), adapter->port[i].dev->name); |
1153 | else { | 1153 | else { |
1154 | /* | 1154 | /* |
1155 | * Change the name we use for messages to the name of | 1155 | * Change the name we use for messages to the name of |
@@ -1162,7 +1162,7 @@ static int __devinit init_one(struct pci_dev *pdev, | |||
1162 | } | 1162 | } |
1163 | } | 1163 | } |
1164 | if (!adapter->registered_device_map) { | 1164 | if (!adapter->registered_device_map) { |
1165 | CH_ERR("%s: could not register any net devices\n", | 1165 | pr_err("%s: could not register any net devices\n", |
1166 | pci_name(pdev)); | 1166 | pci_name(pdev)); |
1167 | goto out_release_adapter_res; | 1167 | goto out_release_adapter_res; |
1168 | } | 1168 | } |
diff --git a/drivers/net/chelsio/espi.c b/drivers/net/chelsio/espi.c index 1e0749e000b0..639ff1955739 100644 --- a/drivers/net/chelsio/espi.c +++ b/drivers/net/chelsio/espi.c | |||
@@ -76,7 +76,7 @@ static int tricn_write(adapter_t *adapter, int bundle_addr, int module_addr, | |||
76 | } while (busy && --attempts); | 76 | } while (busy && --attempts); |
77 | 77 | ||
78 | if (busy) | 78 | if (busy) |
79 | CH_ERR("%s: TRICN write timed out\n", adapter->name); | 79 | pr_err("%s: TRICN write timed out\n", adapter->name); |
80 | 80 | ||
81 | return busy; | 81 | return busy; |
82 | } | 82 | } |
@@ -86,7 +86,7 @@ static int tricn_init(adapter_t *adapter) | |||
86 | int i, sme = 1; | 86 | int i, sme = 1; |
87 | 87 | ||
88 | if (!(readl(adapter->regs + A_ESPI_RX_RESET) & F_RX_CLK_STATUS)) { | 88 | if (!(readl(adapter->regs + A_ESPI_RX_RESET) & F_RX_CLK_STATUS)) { |
89 | CH_ERR("%s: ESPI clock not ready\n", adapter->name); | 89 | pr_err("%s: ESPI clock not ready\n", adapter->name); |
90 | return -1; | 90 | return -1; |
91 | } | 91 | } |
92 | 92 | ||
diff --git a/drivers/net/chelsio/pm3393.c b/drivers/net/chelsio/pm3393.c index 33d674f36722..a6eb30a6e2b9 100644 --- a/drivers/net/chelsio/pm3393.c +++ b/drivers/net/chelsio/pm3393.c | |||
@@ -251,8 +251,9 @@ static int pm3393_interrupt_handler(struct cmac *cmac) | |||
251 | /* Read the master interrupt status register. */ | 251 | /* Read the master interrupt status register. */ |
252 | pmread(cmac, SUNI1x10GEXP_REG_MASTER_INTERRUPT_STATUS, | 252 | pmread(cmac, SUNI1x10GEXP_REG_MASTER_INTERRUPT_STATUS, |
253 | &master_intr_status); | 253 | &master_intr_status); |
254 | CH_DBG(cmac->adapter, INTR, "PM3393 intr cause 0x%x\n", | 254 | if (netif_msg_intr(cmac->adapter)) |
255 | master_intr_status); | 255 | dev_dbg(&cmac->adapter->pdev->dev, "PM3393 intr cause 0x%x\n", |
256 | master_intr_status); | ||
256 | 257 | ||
257 | /* TBD XXX Lets just clear everything for now */ | 258 | /* TBD XXX Lets just clear everything for now */ |
258 | pm3393_interrupt_clear(cmac); | 259 | pm3393_interrupt_clear(cmac); |
@@ -776,11 +777,12 @@ static int pm3393_mac_reset(adapter_t * adapter) | |||
776 | successful_reset = (is_pl4_reset_finished && !is_pl4_outof_lock | 777 | successful_reset = (is_pl4_reset_finished && !is_pl4_outof_lock |
777 | && is_xaui_mabc_pll_locked); | 778 | && is_xaui_mabc_pll_locked); |
778 | 779 | ||
779 | CH_DBG(adapter, HW, | 780 | if (netif_msg_hw(adapter)) |
780 | "PM3393 HW reset %d: pl4_reset 0x%x, val 0x%x, " | 781 | dev_dbg(&adapter->pdev->dev, |
781 | "is_pl4_outof_lock 0x%x, xaui_locked 0x%x\n", | 782 | "PM3393 HW reset %d: pl4_reset 0x%x, val 0x%x, " |
782 | i, is_pl4_reset_finished, val, is_pl4_outof_lock, | 783 | "is_pl4_outof_lock 0x%x, xaui_locked 0x%x\n", |
783 | is_xaui_mabc_pll_locked); | 784 | i, is_pl4_reset_finished, val, |
785 | is_pl4_outof_lock, is_xaui_mabc_pll_locked); | ||
784 | } | 786 | } |
785 | return successful_reset ? 0 : 1; | 787 | return successful_reset ? 0 : 1; |
786 | } | 788 | } |
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c index 8e12505ac3aa..71384114a4ed 100644 --- a/drivers/net/chelsio/sge.c +++ b/drivers/net/chelsio/sge.c | |||
@@ -953,7 +953,7 @@ int t1_sge_intr_error_handler(struct sge *sge) | |||
953 | sge->stats.respQ_empty++; | 953 | sge->stats.respQ_empty++; |
954 | if (cause & F_RESPQ_OVERFLOW) { | 954 | if (cause & F_RESPQ_OVERFLOW) { |
955 | sge->stats.respQ_overflow++; | 955 | sge->stats.respQ_overflow++; |
956 | CH_ALERT("%s: SGE response queue overflow\n", | 956 | pr_alert("%s: SGE response queue overflow\n", |
957 | adapter->name); | 957 | adapter->name); |
958 | } | 958 | } |
959 | if (cause & F_FL_EXHAUSTED) { | 959 | if (cause & F_FL_EXHAUSTED) { |
@@ -962,12 +962,12 @@ int t1_sge_intr_error_handler(struct sge *sge) | |||
962 | } | 962 | } |
963 | if (cause & F_PACKET_TOO_BIG) { | 963 | if (cause & F_PACKET_TOO_BIG) { |
964 | sge->stats.pkt_too_big++; | 964 | sge->stats.pkt_too_big++; |
965 | CH_ALERT("%s: SGE max packet size exceeded\n", | 965 | pr_alert("%s: SGE max packet size exceeded\n", |
966 | adapter->name); | 966 | adapter->name); |
967 | } | 967 | } |
968 | if (cause & F_PACKET_MISMATCH) { | 968 | if (cause & F_PACKET_MISMATCH) { |
969 | sge->stats.pkt_mismatch++; | 969 | sge->stats.pkt_mismatch++; |
970 | CH_ALERT("%s: SGE packet mismatch\n", adapter->name); | 970 | pr_alert("%s: SGE packet mismatch\n", adapter->name); |
971 | } | 971 | } |
972 | if (cause & SGE_INT_FATAL) | 972 | if (cause & SGE_INT_FATAL) |
973 | t1_fatal_err(adapter); | 973 | t1_fatal_err(adapter); |
@@ -1101,7 +1101,7 @@ static void unexpected_offload(struct adapter *adapter, struct freelQ *fl) | |||
1101 | 1101 | ||
1102 | pci_dma_sync_single_for_cpu(adapter->pdev, pci_unmap_addr(ce, dma_addr), | 1102 | pci_dma_sync_single_for_cpu(adapter->pdev, pci_unmap_addr(ce, dma_addr), |
1103 | pci_unmap_len(ce, dma_len), PCI_DMA_FROMDEVICE); | 1103 | pci_unmap_len(ce, dma_len), PCI_DMA_FROMDEVICE); |
1104 | CH_ERR("%s: unexpected offload packet, cmd %u\n", | 1104 | pr_err("%s: unexpected offload packet, cmd %u\n", |
1105 | adapter->name, *skb->data); | 1105 | adapter->name, *skb->data); |
1106 | recycle_fl_buf(fl, fl->cidx); | 1106 | recycle_fl_buf(fl, fl->cidx); |
1107 | } | 1107 | } |
@@ -1687,7 +1687,7 @@ static int t1_sge_tx(struct sk_buff *skb, struct adapter *adapter, | |||
1687 | netif_stop_queue(dev); | 1687 | netif_stop_queue(dev); |
1688 | set_bit(dev->if_port, &sge->stopped_tx_queues); | 1688 | set_bit(dev->if_port, &sge->stopped_tx_queues); |
1689 | sge->stats.cmdQ_full[2]++; | 1689 | sge->stats.cmdQ_full[2]++; |
1690 | CH_ERR("%s: Tx ring full while queue awake!\n", | 1690 | pr_err("%s: Tx ring full while queue awake!\n", |
1691 | adapter->name); | 1691 | adapter->name); |
1692 | } | 1692 | } |
1693 | spin_unlock(&q->lock); | 1693 | spin_unlock(&q->lock); |
diff --git a/drivers/net/chelsio/subr.c b/drivers/net/chelsio/subr.c index 2402d372c886..53bde15fc94d 100644 --- a/drivers/net/chelsio/subr.c +++ b/drivers/net/chelsio/subr.c | |||
@@ -90,7 +90,7 @@ int __t1_tpi_write(adapter_t *adapter, u32 addr, u32 value) | |||
90 | tpi_busy = t1_wait_op_done(adapter, A_TPI_CSR, F_TPIRDY, 1, | 90 | tpi_busy = t1_wait_op_done(adapter, A_TPI_CSR, F_TPIRDY, 1, |
91 | TPI_ATTEMPTS, 3); | 91 | TPI_ATTEMPTS, 3); |
92 | if (tpi_busy) | 92 | if (tpi_busy) |
93 | CH_ALERT("%s: TPI write to 0x%x failed\n", | 93 | pr_alert("%s: TPI write to 0x%x failed\n", |
94 | adapter->name, addr); | 94 | adapter->name, addr); |
95 | return tpi_busy; | 95 | return tpi_busy; |
96 | } | 96 | } |
@@ -118,7 +118,7 @@ int __t1_tpi_read(adapter_t *adapter, u32 addr, u32 *valp) | |||
118 | tpi_busy = t1_wait_op_done(adapter, A_TPI_CSR, F_TPIRDY, 1, | 118 | tpi_busy = t1_wait_op_done(adapter, A_TPI_CSR, F_TPIRDY, 1, |
119 | TPI_ATTEMPTS, 3); | 119 | TPI_ATTEMPTS, 3); |
120 | if (tpi_busy) | 120 | if (tpi_busy) |
121 | CH_ALERT("%s: TPI read from 0x%x failed\n", | 121 | pr_alert("%s: TPI read from 0x%x failed\n", |
122 | adapter->name, addr); | 122 | adapter->name, addr); |
123 | else | 123 | else |
124 | *valp = readl(adapter->regs + A_TPI_RD_DATA); | 124 | *valp = readl(adapter->regs + A_TPI_RD_DATA); |
@@ -262,7 +262,7 @@ static int mi1_wait_until_ready(adapter_t *adapter, int mi1_reg) | |||
262 | udelay(10); | 262 | udelay(10); |
263 | } while (busy && --attempts); | 263 | } while (busy && --attempts); |
264 | if (busy) | 264 | if (busy) |
265 | CH_ALERT("%s: MDIO operation timed out\n", adapter->name); | 265 | pr_alert("%s: MDIO operation timed out\n", adapter->name); |
266 | return busy; | 266 | return busy; |
267 | } | 267 | } |
268 | 268 | ||
@@ -581,7 +581,7 @@ int t1_seeprom_read(adapter_t *adapter, u32 addr, __le32 *data) | |||
581 | } while (!(val & F_VPD_OP_FLAG) && --i); | 581 | } while (!(val & F_VPD_OP_FLAG) && --i); |
582 | 582 | ||
583 | if (!(val & F_VPD_OP_FLAG)) { | 583 | if (!(val & F_VPD_OP_FLAG)) { |
584 | CH_ERR("%s: reading EEPROM address 0x%x failed\n", | 584 | pr_err("%s: reading EEPROM address 0x%x failed\n", |
585 | adapter->name, addr); | 585 | adapter->name, addr); |
586 | return -EIO; | 586 | return -EIO; |
587 | } | 587 | } |
@@ -734,8 +734,9 @@ int t1_elmer0_ext_intr_handler(adapter_t *adapter) | |||
734 | break; | 734 | break; |
735 | case CHBT_BOARD_8000: | 735 | case CHBT_BOARD_8000: |
736 | case CHBT_BOARD_CHT110: | 736 | case CHBT_BOARD_CHT110: |
737 | CH_DBG(adapter, INTR, "External interrupt cause 0x%x\n", | 737 | if (netif_msg_intr(adapter)) |
738 | cause); | 738 | dev_dbg(&adapter->pdev->dev, |
739 | "External interrupt cause 0x%x\n", cause); | ||
739 | if (cause & ELMER0_GP_BIT1) { /* PMC3393 INTB */ | 740 | if (cause & ELMER0_GP_BIT1) { /* PMC3393 INTB */ |
740 | struct cmac *mac = adapter->port[0].mac; | 741 | struct cmac *mac = adapter->port[0].mac; |
741 | 742 | ||
@@ -746,8 +747,9 @@ int t1_elmer0_ext_intr_handler(adapter_t *adapter) | |||
746 | 747 | ||
747 | t1_tpi_read(adapter, | 748 | t1_tpi_read(adapter, |
748 | A_ELMER0_GPI_STAT, &mod_detect); | 749 | A_ELMER0_GPI_STAT, &mod_detect); |
749 | CH_MSG(adapter, INFO, LINK, "XPAK %s\n", | 750 | if (netif_msg_link(adapter)) |
750 | mod_detect ? "removed" : "inserted"); | 751 | dev_info(&adapter->pdev->dev, "XPAK %s\n", |
752 | mod_detect ? "removed" : "inserted"); | ||
751 | } | 753 | } |
752 | break; | 754 | break; |
753 | #ifdef CONFIG_CHELSIO_T1_COUGAR | 755 | #ifdef CONFIG_CHELSIO_T1_COUGAR |
@@ -1084,7 +1086,7 @@ static void __devinit init_link_config(struct link_config *lc, | |||
1084 | 1086 | ||
1085 | #ifdef CONFIG_CHELSIO_T1_COUGAR | 1087 | #ifdef CONFIG_CHELSIO_T1_COUGAR |
1086 | if (bi->clock_cspi && !(adapter->cspi = t1_cspi_create(adapter))) { | 1088 | if (bi->clock_cspi && !(adapter->cspi = t1_cspi_create(adapter))) { |
1087 | CH_ERR("%s: CSPI initialization failed\n", | 1089 | pr_err("%s: CSPI initialization failed\n", |
1088 | adapter->name); | 1090 | adapter->name); |
1089 | goto error; | 1091 | goto error; |
1090 | } | 1092 | } |
@@ -1105,20 +1107,20 @@ int __devinit t1_init_sw_modules(adapter_t *adapter, | |||
1105 | 1107 | ||
1106 | adapter->sge = t1_sge_create(adapter, &adapter->params.sge); | 1108 | adapter->sge = t1_sge_create(adapter, &adapter->params.sge); |
1107 | if (!adapter->sge) { | 1109 | if (!adapter->sge) { |
1108 | CH_ERR("%s: SGE initialization failed\n", | 1110 | pr_err("%s: SGE initialization failed\n", |
1109 | adapter->name); | 1111 | adapter->name); |
1110 | goto error; | 1112 | goto error; |
1111 | } | 1113 | } |
1112 | 1114 | ||
1113 | if (bi->espi_nports && !(adapter->espi = t1_espi_create(adapter))) { | 1115 | if (bi->espi_nports && !(adapter->espi = t1_espi_create(adapter))) { |
1114 | CH_ERR("%s: ESPI initialization failed\n", | 1116 | pr_err("%s: ESPI initialization failed\n", |
1115 | adapter->name); | 1117 | adapter->name); |
1116 | goto error; | 1118 | goto error; |
1117 | } | 1119 | } |
1118 | 1120 | ||
1119 | adapter->tp = t1_tp_create(adapter, &adapter->params.tp); | 1121 | adapter->tp = t1_tp_create(adapter, &adapter->params.tp); |
1120 | if (!adapter->tp) { | 1122 | if (!adapter->tp) { |
1121 | CH_ERR("%s: TP initialization failed\n", | 1123 | pr_err("%s: TP initialization failed\n", |
1122 | adapter->name); | 1124 | adapter->name); |
1123 | goto error; | 1125 | goto error; |
1124 | } | 1126 | } |
@@ -1138,14 +1140,14 @@ int __devinit t1_init_sw_modules(adapter_t *adapter, | |||
1138 | adapter->port[i].phy = bi->gphy->create(adapter->port[i].dev, | 1140 | adapter->port[i].phy = bi->gphy->create(adapter->port[i].dev, |
1139 | phy_addr, bi->mdio_ops); | 1141 | phy_addr, bi->mdio_ops); |
1140 | if (!adapter->port[i].phy) { | 1142 | if (!adapter->port[i].phy) { |
1141 | CH_ERR("%s: PHY %d initialization failed\n", | 1143 | pr_err("%s: PHY %d initialization failed\n", |
1142 | adapter->name, i); | 1144 | adapter->name, i); |
1143 | goto error; | 1145 | goto error; |
1144 | } | 1146 | } |
1145 | 1147 | ||
1146 | adapter->port[i].mac = mac = bi->gmac->create(adapter, i); | 1148 | adapter->port[i].mac = mac = bi->gmac->create(adapter, i); |
1147 | if (!mac) { | 1149 | if (!mac) { |
1148 | CH_ERR("%s: MAC %d initialization failed\n", | 1150 | pr_err("%s: MAC %d initialization failed\n", |
1149 | adapter->name, i); | 1151 | adapter->name, i); |
1150 | goto error; | 1152 | goto error; |
1151 | } | 1153 | } |
@@ -1157,7 +1159,7 @@ int __devinit t1_init_sw_modules(adapter_t *adapter, | |||
1157 | if (!t1_is_asic(adapter) || bi->chip_mac == CHBT_MAC_DUMMY) | 1159 | if (!t1_is_asic(adapter) || bi->chip_mac == CHBT_MAC_DUMMY) |
1158 | mac->ops->macaddress_get(mac, hw_addr); | 1160 | mac->ops->macaddress_get(mac, hw_addr); |
1159 | else if (vpd_macaddress_get(adapter, i, hw_addr)) { | 1161 | else if (vpd_macaddress_get(adapter, i, hw_addr)) { |
1160 | CH_ERR("%s: could not read MAC address from VPD ROM\n", | 1162 | pr_err("%s: could not read MAC address from VPD ROM\n", |
1161 | adapter->port[i].dev->name); | 1163 | adapter->port[i].dev->name); |
1162 | goto error; | 1164 | goto error; |
1163 | } | 1165 | } |
diff --git a/drivers/net/chelsio/vsc7326.c b/drivers/net/chelsio/vsc7326.c index 99b51f61fe77..c844111cffeb 100644 --- a/drivers/net/chelsio/vsc7326.c +++ b/drivers/net/chelsio/vsc7326.c | |||
@@ -48,14 +48,14 @@ static void vsc_read(adapter_t *adapter, u32 addr, u32 *val) | |||
48 | i++; | 48 | i++; |
49 | } while (((status & 1) == 0) && (i < 50)); | 49 | } while (((status & 1) == 0) && (i < 50)); |
50 | if (i == 50) | 50 | if (i == 50) |
51 | CH_ERR("Invalid tpi read from MAC, breaking loop.\n"); | 51 | pr_err("Invalid tpi read from MAC, breaking loop.\n"); |
52 | 52 | ||
53 | t1_tpi_read(adapter, (REG_LOCAL_DATA << 2) + 4, &vlo); | 53 | t1_tpi_read(adapter, (REG_LOCAL_DATA << 2) + 4, &vlo); |
54 | t1_tpi_read(adapter, REG_LOCAL_DATA << 2, &vhi); | 54 | t1_tpi_read(adapter, REG_LOCAL_DATA << 2, &vhi); |
55 | 55 | ||
56 | *val = (vhi << 16) | vlo; | 56 | *val = (vhi << 16) | vlo; |
57 | 57 | ||
58 | /* CH_ERR("rd: block: 0x%x sublock: 0x%x reg: 0x%x data: 0x%x\n", | 58 | /* pr_err("rd: block: 0x%x sublock: 0x%x reg: 0x%x data: 0x%x\n", |
59 | ((addr&0xe000)>>13), ((addr&0x1e00)>>9), | 59 | ((addr&0xe000)>>13), ((addr&0x1e00)>>9), |
60 | ((addr&0x01fe)>>1), *val); */ | 60 | ((addr&0x01fe)>>1), *val); */ |
61 | spin_unlock_bh(&adapter->mac_lock); | 61 | spin_unlock_bh(&adapter->mac_lock); |
@@ -66,7 +66,7 @@ static void vsc_write(adapter_t *adapter, u32 addr, u32 data) | |||
66 | spin_lock_bh(&adapter->mac_lock); | 66 | spin_lock_bh(&adapter->mac_lock); |
67 | t1_tpi_write(adapter, (addr << 2) + 4, data & 0xFFFF); | 67 | t1_tpi_write(adapter, (addr << 2) + 4, data & 0xFFFF); |
68 | t1_tpi_write(adapter, addr << 2, (data >> 16) & 0xFFFF); | 68 | t1_tpi_write(adapter, addr << 2, (data >> 16) & 0xFFFF); |
69 | /* CH_ERR("wr: block: 0x%x sublock: 0x%x reg: 0x%x data: 0x%x\n", | 69 | /* pr_err("wr: block: 0x%x sublock: 0x%x reg: 0x%x data: 0x%x\n", |
70 | ((addr&0xe000)>>13), ((addr&0x1e00)>>9), | 70 | ((addr&0xe000)>>13), ((addr&0x1e00)>>9), |
71 | ((addr&0x01fe)>>1), data); */ | 71 | ((addr&0x01fe)>>1), data); */ |
72 | spin_unlock_bh(&adapter->mac_lock); | 72 | spin_unlock_bh(&adapter->mac_lock); |
@@ -225,7 +225,7 @@ static void run_table(adapter_t *adapter, struct init_table *ib, int len) | |||
225 | for (i = 0; i < len; i++) { | 225 | for (i = 0; i < len; i++) { |
226 | if (ib[i].addr == INITBLOCK_SLEEP) { | 226 | if (ib[i].addr == INITBLOCK_SLEEP) { |
227 | udelay( ib[i].data ); | 227 | udelay( ib[i].data ); |
228 | CH_ERR("sleep %d us\n",ib[i].data); | 228 | pr_err("sleep %d us\n",ib[i].data); |
229 | } else | 229 | } else |
230 | vsc_write( adapter, ib[i].addr, ib[i].data ); | 230 | vsc_write( adapter, ib[i].addr, ib[i].data ); |
231 | } | 231 | } |
@@ -241,7 +241,7 @@ static int bist_rd(adapter_t *adapter, int moduleid, int address) | |||
241 | (address != 0x2) && | 241 | (address != 0x2) && |
242 | (address != 0xd) && | 242 | (address != 0xd) && |
243 | (address != 0xe)) | 243 | (address != 0xe)) |
244 | CH_ERR("No bist address: 0x%x\n", address); | 244 | pr_err("No bist address: 0x%x\n", address); |
245 | 245 | ||
246 | data = ((0x00 << 24) | ((address & 0xff) << 16) | (0x00 << 8) | | 246 | data = ((0x00 << 24) | ((address & 0xff) << 16) | (0x00 << 8) | |
247 | ((moduleid & 0xff) << 0)); | 247 | ((moduleid & 0xff) << 0)); |
@@ -251,9 +251,9 @@ static int bist_rd(adapter_t *adapter, int moduleid, int address) | |||
251 | 251 | ||
252 | vsc_read(adapter, REG_RAM_BIST_RESULT, &result); | 252 | vsc_read(adapter, REG_RAM_BIST_RESULT, &result); |
253 | if ((result & (1 << 9)) != 0x0) | 253 | if ((result & (1 << 9)) != 0x0) |
254 | CH_ERR("Still in bist read: 0x%x\n", result); | 254 | pr_err("Still in bist read: 0x%x\n", result); |
255 | else if ((result & (1 << 8)) != 0x0) | 255 | else if ((result & (1 << 8)) != 0x0) |
256 | CH_ERR("bist read error: 0x%x\n", result); | 256 | pr_err("bist read error: 0x%x\n", result); |
257 | 257 | ||
258 | return (result & 0xff); | 258 | return (result & 0xff); |
259 | } | 259 | } |
@@ -268,10 +268,10 @@ static int bist_wr(adapter_t *adapter, int moduleid, int address, int value) | |||
268 | (address != 0x2) && | 268 | (address != 0x2) && |
269 | (address != 0xd) && | 269 | (address != 0xd) && |
270 | (address != 0xe)) | 270 | (address != 0xe)) |
271 | CH_ERR("No bist address: 0x%x\n", address); | 271 | pr_err("No bist address: 0x%x\n", address); |
272 | 272 | ||
273 | if (value > 255) | 273 | if (value > 255) |
274 | CH_ERR("Suspicious write out of range value: 0x%x\n", value); | 274 | pr_err("Suspicious write out of range value: 0x%x\n", value); |
275 | 275 | ||
276 | data = ((0x01 << 24) | ((address & 0xff) << 16) | (value << 8) | | 276 | data = ((0x01 << 24) | ((address & 0xff) << 16) | (value << 8) | |
277 | ((moduleid & 0xff) << 0)); | 277 | ((moduleid & 0xff) << 0)); |
@@ -281,9 +281,9 @@ static int bist_wr(adapter_t *adapter, int moduleid, int address, int value) | |||
281 | 281 | ||
282 | vsc_read(adapter, REG_RAM_BIST_CMD, &result); | 282 | vsc_read(adapter, REG_RAM_BIST_CMD, &result); |
283 | if ((result & (1 << 27)) != 0x0) | 283 | if ((result & (1 << 27)) != 0x0) |
284 | CH_ERR("Still in bist write: 0x%x\n", result); | 284 | pr_err("Still in bist write: 0x%x\n", result); |
285 | else if ((result & (1 << 26)) != 0x0) | 285 | else if ((result & (1 << 26)) != 0x0) |
286 | CH_ERR("bist write error: 0x%x\n", result); | 286 | pr_err("bist write error: 0x%x\n", result); |
287 | 287 | ||
288 | return 0; | 288 | return 0; |
289 | } | 289 | } |
@@ -306,7 +306,7 @@ static int check_bist(adapter_t *adapter, int moduleid) | |||
306 | column = ((bist_rd(adapter,moduleid, 0x0e)<<8) + | 306 | column = ((bist_rd(adapter,moduleid, 0x0e)<<8) + |
307 | (bist_rd(adapter,moduleid, 0x0d))); | 307 | (bist_rd(adapter,moduleid, 0x0d))); |
308 | if ((result & 3) != 0x3) | 308 | if ((result & 3) != 0x3) |
309 | CH_ERR("Result: 0x%x BIST error in ram %d, column: 0x%04x\n", | 309 | pr_err("Result: 0x%x BIST error in ram %d, column: 0x%04x\n", |
310 | result, moduleid, column); | 310 | result, moduleid, column); |
311 | return 0; | 311 | return 0; |
312 | } | 312 | } |