aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/chelsio/subr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/chelsio/subr.c')
-rw-r--r--drivers/net/chelsio/subr.c32
1 files changed, 17 insertions, 15 deletions
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 }