aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_fcoe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_fcoe.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_fcoe.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/drivers/net/ixgbe/ixgbe_fcoe.c b/drivers/net/ixgbe/ixgbe_fcoe.c
index 45182ab41d6b..84e1194e0833 100644
--- a/drivers/net/ixgbe/ixgbe_fcoe.c
+++ b/drivers/net/ixgbe/ixgbe_fcoe.c
@@ -25,7 +25,6 @@
25 25
26*******************************************************************************/ 26*******************************************************************************/
27 27
28
29#include "ixgbe.h" 28#include "ixgbe.h"
30#ifdef CONFIG_IXGBE_DCB 29#ifdef CONFIG_IXGBE_DCB
31#include "ixgbe_dcb_82599.h" 30#include "ixgbe_dcb_82599.h"
@@ -165,20 +164,20 @@ int ixgbe_fcoe_ddp_get(struct net_device *netdev, u16 xid,
165 164
166 adapter = netdev_priv(netdev); 165 adapter = netdev_priv(netdev);
167 if (xid >= IXGBE_FCOE_DDP_MAX) { 166 if (xid >= IXGBE_FCOE_DDP_MAX) {
168 DPRINTK(DRV, WARNING, "xid=0x%x out-of-range\n", xid); 167 e_warn("xid=0x%x out-of-range\n", xid);
169 return 0; 168 return 0;
170 } 169 }
171 170
172 fcoe = &adapter->fcoe; 171 fcoe = &adapter->fcoe;
173 if (!fcoe->pool) { 172 if (!fcoe->pool) {
174 DPRINTK(DRV, WARNING, "xid=0x%x no ddp pool for fcoe\n", xid); 173 e_warn("xid=0x%x no ddp pool for fcoe\n", xid);
175 return 0; 174 return 0;
176 } 175 }
177 176
178 ddp = &fcoe->ddp[xid]; 177 ddp = &fcoe->ddp[xid];
179 if (ddp->sgl) { 178 if (ddp->sgl) {
180 DPRINTK(DRV, ERR, "xid 0x%x w/ non-null sgl=%p nents=%d\n", 179 e_err("xid 0x%x w/ non-null sgl=%p nents=%d\n",
181 xid, ddp->sgl, ddp->sgc); 180 xid, ddp->sgl, ddp->sgc);
182 return 0; 181 return 0;
183 } 182 }
184 ixgbe_fcoe_clear_ddp(ddp); 183 ixgbe_fcoe_clear_ddp(ddp);
@@ -186,14 +185,14 @@ int ixgbe_fcoe_ddp_get(struct net_device *netdev, u16 xid,
186 /* setup dma from scsi command sgl */ 185 /* setup dma from scsi command sgl */
187 dmacount = pci_map_sg(adapter->pdev, sgl, sgc, DMA_FROM_DEVICE); 186 dmacount = pci_map_sg(adapter->pdev, sgl, sgc, DMA_FROM_DEVICE);
188 if (dmacount == 0) { 187 if (dmacount == 0) {
189 DPRINTK(DRV, ERR, "xid 0x%x DMA map error\n", xid); 188 e_err("xid 0x%x DMA map error\n", xid);
190 return 0; 189 return 0;
191 } 190 }
192 191
193 /* alloc the udl from our ddp pool */ 192 /* alloc the udl from our ddp pool */
194 ddp->udl = pci_pool_alloc(fcoe->pool, GFP_KERNEL, &ddp->udp); 193 ddp->udl = pci_pool_alloc(fcoe->pool, GFP_KERNEL, &ddp->udp);
195 if (!ddp->udl) { 194 if (!ddp->udl) {
196 DPRINTK(DRV, ERR, "failed allocated ddp context\n"); 195 e_err("failed allocated ddp context\n");
197 goto out_noddp_unmap; 196 goto out_noddp_unmap;
198 } 197 }
199 ddp->sgl = sgl; 198 ddp->sgl = sgl;
@@ -206,10 +205,9 @@ int ixgbe_fcoe_ddp_get(struct net_device *netdev, u16 xid,
206 while (len) { 205 while (len) {
207 /* max number of buffers allowed in one DDP context */ 206 /* max number of buffers allowed in one DDP context */
208 if (j >= IXGBE_BUFFCNT_MAX) { 207 if (j >= IXGBE_BUFFCNT_MAX) {
209 netif_err(adapter, drv, adapter->netdev, 208 e_err("xid=%x:%d,%d,%d:addr=%llx "
210 "xid=%x:%d,%d,%d:addr=%llx " 209 "not enough descriptors\n",
211 "not enough descriptors\n", 210 xid, i, j, dmacount, (u64)addr);
212 xid, i, j, dmacount, (u64)addr);
213 goto out_noddp_free; 211 goto out_noddp_free;
214 } 212 }
215 213
@@ -387,8 +385,8 @@ int ixgbe_fso(struct ixgbe_adapter *adapter,
387 struct fc_frame_header *fh; 385 struct fc_frame_header *fh;
388 386
389 if (skb_is_gso(skb) && (skb_shinfo(skb)->gso_type != SKB_GSO_FCOE)) { 387 if (skb_is_gso(skb) && (skb_shinfo(skb)->gso_type != SKB_GSO_FCOE)) {
390 DPRINTK(DRV, ERR, "Wrong gso type %d:expecting SKB_GSO_FCOE\n", 388 e_err("Wrong gso type %d:expecting SKB_GSO_FCOE\n",
391 skb_shinfo(skb)->gso_type); 389 skb_shinfo(skb)->gso_type);
392 return -EINVAL; 390 return -EINVAL;
393 } 391 }
394 392
@@ -414,7 +412,7 @@ int ixgbe_fso(struct ixgbe_adapter *adapter,
414 fcoe_sof_eof |= IXGBE_ADVTXD_FCOEF_SOF; 412 fcoe_sof_eof |= IXGBE_ADVTXD_FCOEF_SOF;
415 break; 413 break;
416 default: 414 default:
417 DPRINTK(DRV, WARNING, "unknown sof = 0x%x\n", sof); 415 e_warn("unknown sof = 0x%x\n", sof);
418 return -EINVAL; 416 return -EINVAL;
419 } 417 }
420 418
@@ -441,7 +439,7 @@ int ixgbe_fso(struct ixgbe_adapter *adapter,
441 fcoe_sof_eof |= IXGBE_ADVTXD_FCOEF_EOF_A; 439 fcoe_sof_eof |= IXGBE_ADVTXD_FCOEF_EOF_A;
442 break; 440 break;
443 default: 441 default:
444 DPRINTK(DRV, WARNING, "unknown eof = 0x%x\n", eof); 442 e_warn("unknown eof = 0x%x\n", eof);
445 return -EINVAL; 443 return -EINVAL;
446 } 444 }
447 445
@@ -517,8 +515,7 @@ void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter)
517 adapter->pdev, IXGBE_FCPTR_MAX, 515 adapter->pdev, IXGBE_FCPTR_MAX,
518 IXGBE_FCPTR_ALIGN, PAGE_SIZE); 516 IXGBE_FCPTR_ALIGN, PAGE_SIZE);
519 if (!fcoe->pool) 517 if (!fcoe->pool)
520 DPRINTK(DRV, ERR, 518 e_err("failed to allocated FCoE DDP pool\n");
521 "failed to allocated FCoE DDP pool\n");
522 519
523 spin_lock_init(&fcoe->lock); 520 spin_lock_init(&fcoe->lock);
524 } 521 }
@@ -614,7 +611,7 @@ int ixgbe_fcoe_enable(struct net_device *netdev)
614 if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) 611 if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED)
615 goto out_enable; 612 goto out_enable;
616 613
617 DPRINTK(DRV, INFO, "Enabling FCoE offload features.\n"); 614 e_info("Enabling FCoE offload features.\n");
618 if (netif_running(netdev)) 615 if (netif_running(netdev))
619 netdev->netdev_ops->ndo_stop(netdev); 616 netdev->netdev_ops->ndo_stop(netdev);
620 617
@@ -660,7 +657,7 @@ int ixgbe_fcoe_disable(struct net_device *netdev)
660 if (!(adapter->flags & IXGBE_FLAG_FCOE_ENABLED)) 657 if (!(adapter->flags & IXGBE_FLAG_FCOE_ENABLED))
661 goto out_disable; 658 goto out_disable;
662 659
663 DPRINTK(DRV, INFO, "Disabling FCoE offload features.\n"); 660 e_info("Disabling FCoE offload features.\n");
664 if (netif_running(netdev)) 661 if (netif_running(netdev))
665 netdev->netdev_ops->ndo_stop(netdev); 662 netdev->netdev_ops->ndo_stop(netdev);
666 663