aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/chelsio/cxgb/cxgb2.c28
-rw-r--r--drivers/net/ethernet/chelsio/cxgb/sge.c6
-rw-r--r--drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c42
-rw-r--r--drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c54
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c2
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c23
6 files changed, 66 insertions, 89 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb/cxgb2.c b/drivers/net/ethernet/chelsio/cxgb/cxgb2.c
index c8fdeaae56c0..20d2085f61c5 100644
--- a/drivers/net/ethernet/chelsio/cxgb/cxgb2.c
+++ b/drivers/net/ethernet/chelsio/cxgb/cxgb2.c
@@ -131,7 +131,7 @@ static void t1_set_rxmode(struct net_device *dev)
131static void link_report(struct port_info *p) 131static void link_report(struct port_info *p)
132{ 132{
133 if (!netif_carrier_ok(p->dev)) 133 if (!netif_carrier_ok(p->dev))
134 printk(KERN_INFO "%s: link down\n", p->dev->name); 134 netdev_info(p->dev, "link down\n");
135 else { 135 else {
136 const char *s = "10Mbps"; 136 const char *s = "10Mbps";
137 137
@@ -141,9 +141,9 @@ static void link_report(struct port_info *p)
141 case SPEED_100: s = "100Mbps"; break; 141 case SPEED_100: s = "100Mbps"; break;
142 } 142 }
143 143
144 printk(KERN_INFO "%s: link up, %s, %s-duplex\n", 144 netdev_info(p->dev, "link up, %s, %s-duplex\n",
145 p->dev->name, s, 145 s, p->link_config.duplex == DUPLEX_FULL
146 p->link_config.duplex == DUPLEX_FULL ? "full" : "half"); 146 ? "full" : "half");
147 } 147 }
148} 148}
149 149
@@ -976,19 +976,13 @@ static const struct net_device_ops cxgb_netdev_ops = {
976 976
977static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent) 977static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
978{ 978{
979 static int version_printed;
980
981 int i, err, pci_using_dac = 0; 979 int i, err, pci_using_dac = 0;
982 unsigned long mmio_start, mmio_len; 980 unsigned long mmio_start, mmio_len;
983 const struct board_info *bi; 981 const struct board_info *bi;
984 struct adapter *adapter = NULL; 982 struct adapter *adapter = NULL;
985 struct port_info *pi; 983 struct port_info *pi;
986 984
987 if (!version_printed) { 985 pr_info_once("%s - version %s\n", DRV_DESCRIPTION, DRV_VERSION);
988 printk(KERN_INFO "%s - version %s\n", DRV_DESCRIPTION,
989 DRV_VERSION);
990 ++version_printed;
991 }
992 986
993 err = pci_enable_device(pdev); 987 err = pci_enable_device(pdev);
994 if (err) 988 if (err)
@@ -1124,8 +1118,8 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1124 for (i = 0; i < bi->port_number; ++i) { 1118 for (i = 0; i < bi->port_number; ++i) {
1125 err = register_netdev(adapter->port[i].dev); 1119 err = register_netdev(adapter->port[i].dev);
1126 if (err) 1120 if (err)
1127 pr_warning("%s: cannot register net device %s, skipping\n", 1121 pr_warn("%s: cannot register net device %s, skipping\n",
1128 pci_name(pdev), adapter->port[i].dev->name); 1122 pci_name(pdev), adapter->port[i].dev->name);
1129 else { 1123 else {
1130 /* 1124 /*
1131 * Change the name we use for messages to the name of 1125 * Change the name we use for messages to the name of
@@ -1143,10 +1137,10 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1143 goto out_release_adapter_res; 1137 goto out_release_adapter_res;
1144 } 1138 }
1145 1139
1146 printk(KERN_INFO "%s: %s (rev %d), %s %dMHz/%d-bit\n", adapter->name, 1140 pr_info("%s: %s (rev %d), %s %dMHz/%d-bit\n",
1147 bi->desc, adapter->params.chip_revision, 1141 adapter->name, bi->desc, adapter->params.chip_revision,
1148 adapter->params.pci.is_pcix ? "PCIX" : "PCI", 1142 adapter->params.pci.is_pcix ? "PCIX" : "PCI",
1149 adapter->params.pci.speed, adapter->params.pci.width); 1143 adapter->params.pci.speed, adapter->params.pci.width);
1150 1144
1151 /* 1145 /*
1152 * Set the T1B ASIC and memory clocks. 1146 * Set the T1B ASIC and memory clocks.
diff --git a/drivers/net/ethernet/chelsio/cxgb/sge.c b/drivers/net/ethernet/chelsio/cxgb/sge.c
index d84872e88171..482976925154 100644
--- a/drivers/net/ethernet/chelsio/cxgb/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb/sge.c
@@ -1822,8 +1822,8 @@ netdev_tx_t t1_start_xmit(struct sk_buff *skb, struct net_device *dev)
1822 */ 1822 */
1823 if (unlikely(skb->len < ETH_HLEN || 1823 if (unlikely(skb->len < ETH_HLEN ||
1824 skb->len > dev->mtu + eth_hdr_len(skb->data))) { 1824 skb->len > dev->mtu + eth_hdr_len(skb->data))) {
1825 pr_debug("%s: packet size %d hdr %d mtu%d\n", dev->name, 1825 netdev_dbg(dev, "packet size %d hdr %d mtu%d\n",
1826 skb->len, eth_hdr_len(skb->data), dev->mtu); 1826 skb->len, eth_hdr_len(skb->data), dev->mtu);
1827 dev_kfree_skb_any(skb); 1827 dev_kfree_skb_any(skb);
1828 return NETDEV_TX_OK; 1828 return NETDEV_TX_OK;
1829 } 1829 }
@@ -1831,7 +1831,7 @@ netdev_tx_t t1_start_xmit(struct sk_buff *skb, struct net_device *dev)
1831 if (skb->ip_summed == CHECKSUM_PARTIAL && 1831 if (skb->ip_summed == CHECKSUM_PARTIAL &&
1832 ip_hdr(skb)->protocol == IPPROTO_UDP) { 1832 ip_hdr(skb)->protocol == IPPROTO_UDP) {
1833 if (unlikely(skb_checksum_help(skb))) { 1833 if (unlikely(skb_checksum_help(skb))) {
1834 pr_debug("%s: unable to do udp checksum\n", dev->name); 1834 netdev_dbg(dev, "unable to do udp checksum\n");
1835 dev_kfree_skb_any(skb); 1835 dev_kfree_skb_any(skb);
1836 return NETDEV_TX_OK; 1836 return NETDEV_TX_OK;
1837 } 1837 }
diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
index f15ee326d5c1..2b5e62193cea 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c
@@ -29,6 +29,9 @@
29 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 29 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30 * SOFTWARE. 30 * SOFTWARE.
31 */ 31 */
32
33#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
34
32#include <linux/module.h> 35#include <linux/module.h>
33#include <linux/moduleparam.h> 36#include <linux/moduleparam.h>
34#include <linux/init.h> 37#include <linux/init.h>
@@ -153,7 +156,7 @@ struct workqueue_struct *cxgb3_wq;
153static void link_report(struct net_device *dev) 156static void link_report(struct net_device *dev)
154{ 157{
155 if (!netif_carrier_ok(dev)) 158 if (!netif_carrier_ok(dev))
156 printk(KERN_INFO "%s: link down\n", dev->name); 159 netdev_info(dev, "link down\n");
157 else { 160 else {
158 const char *s = "10Mbps"; 161 const char *s = "10Mbps";
159 const struct port_info *p = netdev_priv(dev); 162 const struct port_info *p = netdev_priv(dev);
@@ -170,8 +173,9 @@ static void link_report(struct net_device *dev)
170 break; 173 break;
171 } 174 }
172 175
173 printk(KERN_INFO "%s: link up, %s, %s-duplex\n", dev->name, s, 176 netdev_info(dev, "link up, %s, %s-duplex\n",
174 p->link_config.duplex == DUPLEX_FULL ? "full" : "half"); 177 s, p->link_config.duplex == DUPLEX_FULL
178 ? "full" : "half");
175 } 179 }
176} 180}
177 181
@@ -318,10 +322,10 @@ void t3_os_phymod_changed(struct adapter *adap, int port_id)
318 const struct port_info *pi = netdev_priv(dev); 322 const struct port_info *pi = netdev_priv(dev);
319 323
320 if (pi->phy.modtype == phy_modtype_none) 324 if (pi->phy.modtype == phy_modtype_none)
321 printk(KERN_INFO "%s: PHY module unplugged\n", dev->name); 325 netdev_info(dev, "PHY module unplugged\n");
322 else 326 else
323 printk(KERN_INFO "%s: %s PHY module inserted\n", dev->name, 327 netdev_info(dev, "%s PHY module inserted\n",
324 mod_str[pi->phy.modtype]); 328 mod_str[pi->phy.modtype]);
325} 329}
326 330
327static void cxgb_set_rxmode(struct net_device *dev) 331static void cxgb_set_rxmode(struct net_device *dev)
@@ -1422,8 +1426,7 @@ static int cxgb_open(struct net_device *dev)
1422 if (is_offload(adapter) && !ofld_disable) { 1426 if (is_offload(adapter) && !ofld_disable) {
1423 err = offload_open(dev); 1427 err = offload_open(dev);
1424 if (err) 1428 if (err)
1425 printk(KERN_WARNING 1429 pr_warn("Could not initialize offload capabilities\n");
1426 "Could not initialize offload capabilities\n");
1427 } 1430 }
1428 1431
1429 netif_set_real_num_tx_queues(dev, pi->nqsets); 1432 netif_set_real_num_tx_queues(dev, pi->nqsets);
@@ -3132,14 +3135,13 @@ static void print_port_info(struct adapter *adap, const struct adapter_info *ai)
3132 3135
3133 if (!test_bit(i, &adap->registered_device_map)) 3136 if (!test_bit(i, &adap->registered_device_map))
3134 continue; 3137 continue;
3135 printk(KERN_INFO "%s: %s %s %sNIC (rev %d) %s%s\n", 3138 netdev_info(dev, "%s %s %sNIC (rev %d) %s%s\n",
3136 dev->name, ai->desc, pi->phy.desc, 3139 ai->desc, pi->phy.desc,
3137 is_offload(adap) ? "R" : "", adap->params.rev, buf, 3140 is_offload(adap) ? "R" : "", adap->params.rev, buf,
3138 (adap->flags & USING_MSIX) ? " MSI-X" : 3141 (adap->flags & USING_MSIX) ? " MSI-X" :
3139 (adap->flags & USING_MSI) ? " MSI" : ""); 3142 (adap->flags & USING_MSI) ? " MSI" : "");
3140 if (adap->name == dev->name && adap->params.vpd.mclk) 3143 if (adap->name == dev->name && adap->params.vpd.mclk)
3141 printk(KERN_INFO 3144 pr_info("%s: %uMB CM, %uMB PMTX, %uMB PMRX, S/N: %s\n",
3142 "%s: %uMB CM, %uMB PMTX, %uMB PMRX, S/N: %s\n",
3143 adap->name, t3_mc7_size(&adap->cm) >> 20, 3145 adap->name, t3_mc7_size(&adap->cm) >> 20,
3144 t3_mc7_size(&adap->pmtx) >> 20, 3146 t3_mc7_size(&adap->pmtx) >> 20,
3145 t3_mc7_size(&adap->pmrx) >> 20, 3147 t3_mc7_size(&adap->pmrx) >> 20,
@@ -3177,24 +3179,18 @@ static void cxgb3_init_iscsi_mac(struct net_device *dev)
3177 NETIF_F_IPV6_CSUM | NETIF_F_HIGHDMA) 3179 NETIF_F_IPV6_CSUM | NETIF_F_HIGHDMA)
3178static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent) 3180static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
3179{ 3181{
3180 static int version_printed;
3181
3182 int i, err, pci_using_dac = 0; 3182 int i, err, pci_using_dac = 0;
3183 resource_size_t mmio_start, mmio_len; 3183 resource_size_t mmio_start, mmio_len;
3184 const struct adapter_info *ai; 3184 const struct adapter_info *ai;
3185 struct adapter *adapter = NULL; 3185 struct adapter *adapter = NULL;
3186 struct port_info *pi; 3186 struct port_info *pi;
3187 3187
3188 if (!version_printed) { 3188 pr_info_once("%s - version %s\n", DRV_DESC, DRV_VERSION);
3189 printk(KERN_INFO "%s - version %s\n", DRV_DESC, DRV_VERSION);
3190 ++version_printed;
3191 }
3192 3189
3193 if (!cxgb3_wq) { 3190 if (!cxgb3_wq) {
3194 cxgb3_wq = create_singlethread_workqueue(DRV_NAME); 3191 cxgb3_wq = create_singlethread_workqueue(DRV_NAME);
3195 if (!cxgb3_wq) { 3192 if (!cxgb3_wq) {
3196 printk(KERN_ERR DRV_NAME 3193 pr_err("cannot initialize work queue\n");
3197 ": cannot initialize work queue\n");
3198 return -ENOMEM; 3194 return -ENOMEM;
3199 } 3195 }
3200 } 3196 }
diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c
index 3f1f5018c66e..91d02eb51b8b 100644
--- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c
+++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c
@@ -30,6 +30,8 @@
30 * SOFTWARE. 30 * SOFTWARE.
31 */ 31 */
32 32
33#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
34
33#include <linux/list.h> 35#include <linux/list.h>
34#include <linux/slab.h> 36#include <linux/slab.h>
35#include <net/neighbour.h> 37#include <net/neighbour.h>
@@ -235,8 +237,7 @@ static int cxgb_ulp_iscsi_ctl(struct adapter *adapter, unsigned int req,
235 if ((val >> S_MAXRXDATA) != 0x3f60) { 237 if ((val >> S_MAXRXDATA) != 0x3f60) {
236 val &= (M_RXCOALESCESIZE << S_RXCOALESCESIZE); 238 val &= (M_RXCOALESCESIZE << S_RXCOALESCESIZE);
237 val |= V_MAXRXDATA(0x3f60); 239 val |= V_MAXRXDATA(0x3f60);
238 printk(KERN_INFO 240 pr_info("%s, iscsi set MaxRxData to 16224 (0x%x)\n",
239 "%s, iscsi set MaxRxData to 16224 (0x%x).\n",
240 adapter->name, val); 241 adapter->name, val);
241 t3_write_reg(adapter, A_TP_PARA_REG2, val); 242 t3_write_reg(adapter, A_TP_PARA_REG2, val);
242 } 243 }
@@ -256,8 +257,7 @@ static int cxgb_ulp_iscsi_ctl(struct adapter *adapter, unsigned int req,
256 for (i = 0; i < 4; i++) 257 for (i = 0; i < 4; i++)
257 val |= (uiip->pgsz_factor[i] & 0xF) << (8 * i); 258 val |= (uiip->pgsz_factor[i] & 0xF) << (8 * i);
258 if (val && (val != t3_read_reg(adapter, A_ULPRX_ISCSI_PSZ))) { 259 if (val && (val != t3_read_reg(adapter, A_ULPRX_ISCSI_PSZ))) {
259 printk(KERN_INFO 260 pr_info("%s, setting iscsi pgsz 0x%x, %u,%u,%u,%u\n",
260 "%s, setting iscsi pgsz 0x%x, %u,%u,%u,%u.\n",
261 adapter->name, val, uiip->pgsz_factor[0], 261 adapter->name, val, uiip->pgsz_factor[0],
262 uiip->pgsz_factor[1], uiip->pgsz_factor[2], 262 uiip->pgsz_factor[1], uiip->pgsz_factor[2],
263 uiip->pgsz_factor[3]); 263 uiip->pgsz_factor[3]);
@@ -709,8 +709,7 @@ static int do_smt_write_rpl(struct t3cdev *dev, struct sk_buff *skb)
709 struct cpl_smt_write_rpl *rpl = cplhdr(skb); 709 struct cpl_smt_write_rpl *rpl = cplhdr(skb);
710 710
711 if (rpl->status != CPL_ERR_NONE) 711 if (rpl->status != CPL_ERR_NONE)
712 printk(KERN_ERR 712 pr_err("Unexpected SMT_WRITE_RPL status %u for entry %u\n",
713 "Unexpected SMT_WRITE_RPL status %u for entry %u\n",
714 rpl->status, GET_TID(rpl)); 713 rpl->status, GET_TID(rpl));
715 714
716 return CPL_RET_BUF_DONE; 715 return CPL_RET_BUF_DONE;
@@ -721,8 +720,7 @@ static int do_l2t_write_rpl(struct t3cdev *dev, struct sk_buff *skb)
721 struct cpl_l2t_write_rpl *rpl = cplhdr(skb); 720 struct cpl_l2t_write_rpl *rpl = cplhdr(skb);
722 721
723 if (rpl->status != CPL_ERR_NONE) 722 if (rpl->status != CPL_ERR_NONE)
724 printk(KERN_ERR 723 pr_err("Unexpected L2T_WRITE_RPL status %u for entry %u\n",
725 "Unexpected L2T_WRITE_RPL status %u for entry %u\n",
726 rpl->status, GET_TID(rpl)); 724 rpl->status, GET_TID(rpl));
727 725
728 return CPL_RET_BUF_DONE; 726 return CPL_RET_BUF_DONE;
@@ -733,8 +731,7 @@ static int do_rte_write_rpl(struct t3cdev *dev, struct sk_buff *skb)
733 struct cpl_rte_write_rpl *rpl = cplhdr(skb); 731 struct cpl_rte_write_rpl *rpl = cplhdr(skb);
734 732
735 if (rpl->status != CPL_ERR_NONE) 733 if (rpl->status != CPL_ERR_NONE)
736 printk(KERN_ERR 734 pr_err("Unexpected RTE_WRITE_RPL status %u for entry %u\n",
737 "Unexpected RTE_WRITE_RPL status %u for entry %u\n",
738 rpl->status, GET_TID(rpl)); 735 rpl->status, GET_TID(rpl));
739 736
740 return CPL_RET_BUF_DONE; 737 return CPL_RET_BUF_DONE;
@@ -754,7 +751,7 @@ static int do_act_open_rpl(struct t3cdev *dev, struct sk_buff *skb)
754 t3c_tid-> 751 t3c_tid->
755 ctx); 752 ctx);
756 } else { 753 } else {
757 printk(KERN_ERR "%s: received clientless CPL command 0x%x\n", 754 pr_err("%s: received clientless CPL command 0x%x\n",
758 dev->name, CPL_ACT_OPEN_RPL); 755 dev->name, CPL_ACT_OPEN_RPL);
759 return CPL_RET_BUF_DONE | CPL_RET_BAD_MSG; 756 return CPL_RET_BUF_DONE | CPL_RET_BAD_MSG;
760 } 757 }
@@ -772,7 +769,7 @@ static int do_stid_rpl(struct t3cdev *dev, struct sk_buff *skb)
772 return t3c_tid->client->handlers[p->opcode] (dev, skb, 769 return t3c_tid->client->handlers[p->opcode] (dev, skb,
773 t3c_tid->ctx); 770 t3c_tid->ctx);
774 } else { 771 } else {
775 printk(KERN_ERR "%s: received clientless CPL command 0x%x\n", 772 pr_err("%s: received clientless CPL command 0x%x\n",
776 dev->name, p->opcode); 773 dev->name, p->opcode);
777 return CPL_RET_BUF_DONE | CPL_RET_BAD_MSG; 774 return CPL_RET_BUF_DONE | CPL_RET_BAD_MSG;
778 } 775 }
@@ -790,7 +787,7 @@ static int do_hwtid_rpl(struct t3cdev *dev, struct sk_buff *skb)
790 return t3c_tid->client->handlers[p->opcode] 787 return t3c_tid->client->handlers[p->opcode]
791 (dev, skb, t3c_tid->ctx); 788 (dev, skb, t3c_tid->ctx);
792 } else { 789 } else {
793 printk(KERN_ERR "%s: received clientless CPL command 0x%x\n", 790 pr_err("%s: received clientless CPL command 0x%x\n",
794 dev->name, p->opcode); 791 dev->name, p->opcode);
795 return CPL_RET_BUF_DONE | CPL_RET_BAD_MSG; 792 return CPL_RET_BUF_DONE | CPL_RET_BAD_MSG;
796 } 793 }
@@ -817,7 +814,7 @@ static int do_cr(struct t3cdev *dev, struct sk_buff *skb)
817 return t3c_tid->client->handlers[CPL_PASS_ACCEPT_REQ] 814 return t3c_tid->client->handlers[CPL_PASS_ACCEPT_REQ]
818 (dev, skb, t3c_tid->ctx); 815 (dev, skb, t3c_tid->ctx);
819 } else { 816 } else {
820 printk(KERN_ERR "%s: received clientless CPL command 0x%x\n", 817 pr_err("%s: received clientless CPL command 0x%x\n",
821 dev->name, CPL_PASS_ACCEPT_REQ); 818 dev->name, CPL_PASS_ACCEPT_REQ);
822 return CPL_RET_BUF_DONE | CPL_RET_BAD_MSG; 819 return CPL_RET_BUF_DONE | CPL_RET_BAD_MSG;
823 } 820 }
@@ -911,7 +908,7 @@ static int do_act_establish(struct t3cdev *dev, struct sk_buff *skb)
911 return t3c_tid->client->handlers[CPL_ACT_ESTABLISH] 908 return t3c_tid->client->handlers[CPL_ACT_ESTABLISH]
912 (dev, skb, t3c_tid->ctx); 909 (dev, skb, t3c_tid->ctx);
913 } else { 910 } else {
914 printk(KERN_ERR "%s: received clientless CPL command 0x%x\n", 911 pr_err("%s: received clientless CPL command 0x%x\n",
915 dev->name, CPL_ACT_ESTABLISH); 912 dev->name, CPL_ACT_ESTABLISH);
916 return CPL_RET_BUF_DONE | CPL_RET_BAD_MSG; 913 return CPL_RET_BUF_DONE | CPL_RET_BAD_MSG;
917 } 914 }
@@ -957,7 +954,7 @@ static int do_term(struct t3cdev *dev, struct sk_buff *skb)
957 return t3c_tid->client->handlers[opcode] (dev, skb, 954 return t3c_tid->client->handlers[opcode] (dev, skb,
958 t3c_tid->ctx); 955 t3c_tid->ctx);
959 } else { 956 } else {
960 printk(KERN_ERR "%s: received clientless CPL command 0x%x\n", 957 pr_err("%s: received clientless CPL command 0x%x\n",
961 dev->name, opcode); 958 dev->name, opcode);
962 return CPL_RET_BUF_DONE | CPL_RET_BAD_MSG; 959 return CPL_RET_BUF_DONE | CPL_RET_BAD_MSG;
963 } 960 }
@@ -994,8 +991,7 @@ static struct notifier_block nb = {
994 */ 991 */
995static int do_bad_cpl(struct t3cdev *dev, struct sk_buff *skb) 992static int do_bad_cpl(struct t3cdev *dev, struct sk_buff *skb)
996{ 993{
997 printk(KERN_ERR "%s: received bad CPL command 0x%x\n", dev->name, 994 pr_err("%s: received bad CPL command 0x%x\n", dev->name, *skb->data);
998 *skb->data);
999 return CPL_RET_BUF_DONE | CPL_RET_BAD_MSG; 995 return CPL_RET_BUF_DONE | CPL_RET_BAD_MSG;
1000} 996}
1001 997
@@ -1013,8 +1009,8 @@ void t3_register_cpl_handler(unsigned int opcode, cpl_handler_func h)
1013 if (opcode < NUM_CPL_CMDS) 1009 if (opcode < NUM_CPL_CMDS)
1014 cpl_handlers[opcode] = h ? h : do_bad_cpl; 1010 cpl_handlers[opcode] = h ? h : do_bad_cpl;
1015 else 1011 else
1016 printk(KERN_ERR "T3C: handler registration for " 1012 pr_err("T3C: handler registration for opcode %x failed\n",
1017 "opcode %x failed\n", opcode); 1013 opcode);
1018} 1014}
1019 1015
1020EXPORT_SYMBOL(t3_register_cpl_handler); 1016EXPORT_SYMBOL(t3_register_cpl_handler);
@@ -1033,9 +1029,8 @@ static int process_rx(struct t3cdev *dev, struct sk_buff **skbs, int n)
1033 if (ret & CPL_RET_UNKNOWN_TID) { 1029 if (ret & CPL_RET_UNKNOWN_TID) {
1034 union opcode_tid *p = cplhdr(skb); 1030 union opcode_tid *p = cplhdr(skb);
1035 1031
1036 printk(KERN_ERR "%s: CPL message (opcode %u) had " 1032 pr_err("%s: CPL message (opcode %u) had unknown TID %u\n",
1037 "unknown TID %u\n", dev->name, opcode, 1033 dev->name, opcode, G_TID(ntohl(p->opcode_tid)));
1038 G_TID(ntohl(p->opcode_tid)));
1039 } 1034 }
1040#endif 1035#endif
1041 if (ret & CPL_RET_BUF_DONE) 1036 if (ret & CPL_RET_BUF_DONE)
@@ -1099,7 +1094,7 @@ static void set_l2t_ix(struct t3cdev *tdev, u32 tid, struct l2t_entry *e)
1099 1094
1100 skb = alloc_skb(sizeof(*req), GFP_ATOMIC); 1095 skb = alloc_skb(sizeof(*req), GFP_ATOMIC);
1101 if (!skb) { 1096 if (!skb) {
1102 printk(KERN_ERR "%s: cannot allocate skb!\n", __func__); 1097 pr_err("%s: cannot allocate skb!\n", __func__);
1103 return; 1098 return;
1104 } 1099 }
1105 skb->priority = CPL_PRIORITY_CONTROL; 1100 skb->priority = CPL_PRIORITY_CONTROL;
@@ -1132,23 +1127,22 @@ static void cxgb_redirect(struct dst_entry *old, struct neighbour *old_neigh,
1132 if (!is_offloading(olddev)) 1127 if (!is_offloading(olddev))
1133 return; 1128 return;
1134 if (!is_offloading(newdev)) { 1129 if (!is_offloading(newdev)) {
1135 printk(KERN_WARNING "%s: Redirect to non-offload " 1130 pr_warn("%s: Redirect to non-offload device ignored\n",
1136 "device ignored.\n", __func__); 1131 __func__);
1137 return; 1132 return;
1138 } 1133 }
1139 tdev = dev2t3cdev(olddev); 1134 tdev = dev2t3cdev(olddev);
1140 BUG_ON(!tdev); 1135 BUG_ON(!tdev);
1141 if (tdev != dev2t3cdev(newdev)) { 1136 if (tdev != dev2t3cdev(newdev)) {
1142 printk(KERN_WARNING "%s: Redirect to different " 1137 pr_warn("%s: Redirect to different offload device ignored\n",
1143 "offload device ignored.\n", __func__); 1138 __func__);
1144 return; 1139 return;
1145 } 1140 }
1146 1141
1147 /* Add new L2T entry */ 1142 /* Add new L2T entry */
1148 e = t3_l2t_get(tdev, new, newdev, daddr); 1143 e = t3_l2t_get(tdev, new, newdev, daddr);
1149 if (!e) { 1144 if (!e) {
1150 printk(KERN_ERR "%s: couldn't allocate new l2t entry!\n", 1145 pr_err("%s: couldn't allocate new l2t entry!\n", __func__);
1151 __func__);
1152 return; 1146 return;
1153 } 1147 }
1154 1148
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index f0718e1a8369..aa63b66823e5 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -5131,7 +5131,7 @@ static int __init cxgb4_init_module(void)
5131 /* Debugfs support is optional, just warn if this fails */ 5131 /* Debugfs support is optional, just warn if this fails */
5132 cxgb4_debugfs_root = debugfs_create_dir(KBUILD_MODNAME, NULL); 5132 cxgb4_debugfs_root = debugfs_create_dir(KBUILD_MODNAME, NULL);
5133 if (!cxgb4_debugfs_root) 5133 if (!cxgb4_debugfs_root)
5134 pr_warning("could not create debugfs entry, continuing\n"); 5134 pr_warn("could not create debugfs entry, continuing\n");
5135 5135
5136 ret = pci_register_driver(&cxgb4_driver); 5136 ret = pci_register_driver(&cxgb4_driver);
5137 if (ret < 0) 5137 if (ret < 0)
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
index 0188df705719..56b46ab2d4c5 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
@@ -33,6 +33,8 @@
33 * SOFTWARE. 33 * SOFTWARE.
34 */ 34 */
35 35
36#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
37
36#include <linux/module.h> 38#include <linux/module.h>
37#include <linux/moduleparam.h> 39#include <linux/moduleparam.h>
38#include <linux/init.h> 40#include <linux/init.h>
@@ -196,11 +198,10 @@ void t4vf_os_link_changed(struct adapter *adapter, int pidx, int link_ok)
196 break; 198 break;
197 } 199 }
198 200
199 printk(KERN_INFO "%s: link up, %s, full-duplex, %s PAUSE\n", 201 netdev_info(dev, "link up, %s, full-duplex, %s PAUSE\n", s, fc);
200 dev->name, s, fc);
201 } else { 202 } else {
202 netif_carrier_off(dev); 203 netif_carrier_off(dev);
203 printk(KERN_INFO "%s: link down\n", dev->name); 204 netdev_info(dev, "link down\n");
204 } 205 }
205} 206}
206 207
@@ -2465,8 +2466,6 @@ static const struct net_device_ops cxgb4vf_netdev_ops = {
2465static int cxgb4vf_pci_probe(struct pci_dev *pdev, 2466static int cxgb4vf_pci_probe(struct pci_dev *pdev,
2466 const struct pci_device_id *ent) 2467 const struct pci_device_id *ent)
2467{ 2468{
2468 static int version_printed;
2469
2470 int pci_using_dac; 2469 int pci_using_dac;
2471 int err, pidx; 2470 int err, pidx;
2472 unsigned int pmask; 2471 unsigned int pmask;
@@ -2478,10 +2477,7 @@ static int cxgb4vf_pci_probe(struct pci_dev *pdev,
2478 * Print our driver banner the first time we're called to initialize a 2477 * Print our driver banner the first time we're called to initialize a
2479 * device. 2478 * device.
2480 */ 2479 */
2481 if (version_printed == 0) { 2480 pr_info_once("%s - version %s\n", DRV_DESC, DRV_VERSION);
2482 printk(KERN_INFO "%s - version %s\n", DRV_DESC, DRV_VERSION);
2483 version_printed = 1;
2484 }
2485 2481
2486 /* 2482 /*
2487 * Initialize generic PCI device state. 2483 * Initialize generic PCI device state.
@@ -2920,18 +2916,15 @@ static int __init cxgb4vf_module_init(void)
2920 * Vet our module parameters. 2916 * Vet our module parameters.
2921 */ 2917 */
2922 if (msi != MSI_MSIX && msi != MSI_MSI) { 2918 if (msi != MSI_MSIX && msi != MSI_MSI) {
2923 printk(KERN_WARNING KBUILD_MODNAME 2919 pr_warn("bad module parameter msi=%d; must be %d (MSI-X or MSI) or %d (MSI)\n",
2924 ": bad module parameter msi=%d; must be %d" 2920 msi, MSI_MSIX, MSI_MSI);
2925 " (MSI-X or MSI) or %d (MSI)\n",
2926 msi, MSI_MSIX, MSI_MSI);
2927 return -EINVAL; 2921 return -EINVAL;
2928 } 2922 }
2929 2923
2930 /* Debugfs support is optional, just warn if this fails */ 2924 /* Debugfs support is optional, just warn if this fails */
2931 cxgb4vf_debugfs_root = debugfs_create_dir(KBUILD_MODNAME, NULL); 2925 cxgb4vf_debugfs_root = debugfs_create_dir(KBUILD_MODNAME, NULL);
2932 if (IS_ERR_OR_NULL(cxgb4vf_debugfs_root)) 2926 if (IS_ERR_OR_NULL(cxgb4vf_debugfs_root))
2933 printk(KERN_WARNING KBUILD_MODNAME ": could not create" 2927 pr_warn("could not create debugfs entry, continuing\n");
2934 " debugfs entry, continuing\n");
2935 2928
2936 ret = pci_register_driver(&cxgb4vf_driver); 2929 ret = pci_register_driver(&cxgb4vf_driver);
2937 if (ret < 0 && !IS_ERR_OR_NULL(cxgb4vf_debugfs_root)) 2930 if (ret < 0 && !IS_ERR_OR_NULL(cxgb4vf_debugfs_root))