aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fcoe
diff options
context:
space:
mode:
authorVasu Dev <vasu.dev@intel.com>2011-07-27 18:11:05 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-07-28 04:13:51 -0400
commit980f5156ab2d75e0462f3811e8a92acd06b0577b (patch)
treebb54a2b9093f817ddb5a8e04cd584f6df8133188 /drivers/scsi/fcoe
parent320036e083bb2a0f60820b51cb9f0bfa651ee62f (diff)
[SCSI] fcoe: add fip retry to avoid missing critical keep alive
Use pending queue to retry FIP frame in case its tx fails and use common pending queue for both fcoe and fip frames using fcoe_port_send. Signed-off-by: Vasu Dev <vasu.dev@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/fcoe')
-rw-r--r--drivers/scsi/fcoe/fcoe.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 945df21ac017..528b86bca491 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -487,6 +487,19 @@ static int fcoe_fip_recv(struct sk_buff *skb, struct net_device *netdev,
487} 487}
488 488
489/** 489/**
490 * fcoe_port_send() - Send an Ethernet-encapsulated FIP/FCoE frame
491 * @port: The FCoE port
492 * @skb: The FIP/FCoE packet to be sent
493 */
494static void fcoe_port_send(struct fcoe_port *port, struct sk_buff *skb)
495{
496 if (port->fcoe_pending_queue.qlen)
497 fcoe_check_wait_queue(port->lport, skb);
498 else if (fcoe_start_io(skb))
499 fcoe_check_wait_queue(port->lport, skb);
500}
501
502/**
490 * fcoe_fip_send() - Send an Ethernet-encapsulated FIP frame 503 * fcoe_fip_send() - Send an Ethernet-encapsulated FIP frame
491 * @fip: The FCoE controller 504 * @fip: The FCoE controller
492 * @skb: The FIP packet to be sent 505 * @skb: The FIP packet to be sent
@@ -494,7 +507,7 @@ static int fcoe_fip_recv(struct sk_buff *skb, struct net_device *netdev,
494static void fcoe_fip_send(struct fcoe_ctlr *fip, struct sk_buff *skb) 507static void fcoe_fip_send(struct fcoe_ctlr *fip, struct sk_buff *skb)
495{ 508{
496 skb->dev = fcoe_from_ctlr(fip)->netdev; 509 skb->dev = fcoe_from_ctlr(fip)->netdev;
497 dev_queue_xmit(skb); 510 fcoe_port_send(lport_priv(fip->lp), skb);
498} 511}
499 512
500/** 513/**
@@ -1575,11 +1588,7 @@ int fcoe_xmit(struct fc_lport *lport, struct fc_frame *fp)
1575 1588
1576 /* send down to lld */ 1589 /* send down to lld */
1577 fr_dev(fp) = lport; 1590 fr_dev(fp) = lport;
1578 if (port->fcoe_pending_queue.qlen) 1591 fcoe_port_send(port, skb);
1579 fcoe_check_wait_queue(lport, skb);
1580 else if (fcoe_start_io(skb))
1581 fcoe_check_wait_queue(lport, skb);
1582
1583 return 0; 1592 return 0;
1584} 1593}
1585 1594