diff options
author | Vasu Dev <vasu.dev@intel.com> | 2012-05-25 13:26:43 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-07-20 03:31:47 -0400 |
commit | 1bd49b482077e231842352621169dedff1f41931 (patch) | |
tree | 7505af722b6391c6199b153527b1d777105277a7 /drivers/scsi/fcoe/fcoe.c | |
parent | e58abb0ca423fc7adcf70bee018723b87c9e38c2 (diff) |
[SCSI] libfc, fcoe, bnx2fc: cleanup fcoe_dev_stats
The libfc is used by fcoe but fcoe agnostic,
and therefore should not have any fcoe references.
So renaming fcoe_dev_stats from libfc as its for fc_stats.
After that libfc is fcoe string free except some strings for
Open-FCoE.org.
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Acked-by : Robert Love <robert.w.love@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Acked-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/fcoe/fcoe.c')
-rw-r--r-- | drivers/scsi/fcoe/fcoe.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index fe30b1b65e1d..2b065d26a5ae 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c | |||
@@ -1529,7 +1529,7 @@ static int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev, | |||
1529 | 1529 | ||
1530 | return 0; | 1530 | return 0; |
1531 | err: | 1531 | err: |
1532 | per_cpu_ptr(lport->dev_stats, get_cpu())->ErrorFrames++; | 1532 | per_cpu_ptr(lport->stats, get_cpu())->ErrorFrames++; |
1533 | put_cpu(); | 1533 | put_cpu(); |
1534 | err2: | 1534 | err2: |
1535 | kfree_skb(skb); | 1535 | kfree_skb(skb); |
@@ -1569,7 +1569,7 @@ static int fcoe_xmit(struct fc_lport *lport, struct fc_frame *fp) | |||
1569 | struct ethhdr *eh; | 1569 | struct ethhdr *eh; |
1570 | struct fcoe_crc_eof *cp; | 1570 | struct fcoe_crc_eof *cp; |
1571 | struct sk_buff *skb; | 1571 | struct sk_buff *skb; |
1572 | struct fcoe_dev_stats *stats; | 1572 | struct fc_stats *stats; |
1573 | struct fc_frame_header *fh; | 1573 | struct fc_frame_header *fh; |
1574 | unsigned int hlen; /* header length implies the version */ | 1574 | unsigned int hlen; /* header length implies the version */ |
1575 | unsigned int tlen; /* trailer length */ | 1575 | unsigned int tlen; /* trailer length */ |
@@ -1680,7 +1680,7 @@ static int fcoe_xmit(struct fc_lport *lport, struct fc_frame *fp) | |||
1680 | skb_shinfo(skb)->gso_size = 0; | 1680 | skb_shinfo(skb)->gso_size = 0; |
1681 | } | 1681 | } |
1682 | /* update tx stats: regardless if LLD fails */ | 1682 | /* update tx stats: regardless if LLD fails */ |
1683 | stats = per_cpu_ptr(lport->dev_stats, get_cpu()); | 1683 | stats = per_cpu_ptr(lport->stats, get_cpu()); |
1684 | stats->TxFrames++; | 1684 | stats->TxFrames++; |
1685 | stats->TxWords += wlen; | 1685 | stats->TxWords += wlen; |
1686 | put_cpu(); | 1686 | put_cpu(); |
@@ -1714,7 +1714,7 @@ static inline int fcoe_filter_frames(struct fc_lport *lport, | |||
1714 | struct fcoe_interface *fcoe; | 1714 | struct fcoe_interface *fcoe; |
1715 | struct fc_frame_header *fh; | 1715 | struct fc_frame_header *fh; |
1716 | struct sk_buff *skb = (struct sk_buff *)fp; | 1716 | struct sk_buff *skb = (struct sk_buff *)fp; |
1717 | struct fcoe_dev_stats *stats; | 1717 | struct fc_stats *stats; |
1718 | 1718 | ||
1719 | /* | 1719 | /* |
1720 | * We only check CRC if no offload is available and if it is | 1720 | * We only check CRC if no offload is available and if it is |
@@ -1745,7 +1745,7 @@ static inline int fcoe_filter_frames(struct fc_lport *lport, | |||
1745 | return 0; | 1745 | return 0; |
1746 | } | 1746 | } |
1747 | 1747 | ||
1748 | stats = per_cpu_ptr(lport->dev_stats, get_cpu()); | 1748 | stats = per_cpu_ptr(lport->stats, get_cpu()); |
1749 | stats->InvalidCRCCount++; | 1749 | stats->InvalidCRCCount++; |
1750 | if (stats->InvalidCRCCount < 5) | 1750 | if (stats->InvalidCRCCount < 5) |
1751 | printk(KERN_WARNING "fcoe: dropping frame with CRC error\n"); | 1751 | printk(KERN_WARNING "fcoe: dropping frame with CRC error\n"); |
@@ -1762,7 +1762,7 @@ static void fcoe_recv_frame(struct sk_buff *skb) | |||
1762 | u32 fr_len; | 1762 | u32 fr_len; |
1763 | struct fc_lport *lport; | 1763 | struct fc_lport *lport; |
1764 | struct fcoe_rcv_info *fr; | 1764 | struct fcoe_rcv_info *fr; |
1765 | struct fcoe_dev_stats *stats; | 1765 | struct fc_stats *stats; |
1766 | struct fcoe_crc_eof crc_eof; | 1766 | struct fcoe_crc_eof crc_eof; |
1767 | struct fc_frame *fp; | 1767 | struct fc_frame *fp; |
1768 | struct fcoe_port *port; | 1768 | struct fcoe_port *port; |
@@ -1793,7 +1793,7 @@ static void fcoe_recv_frame(struct sk_buff *skb) | |||
1793 | */ | 1793 | */ |
1794 | hp = (struct fcoe_hdr *) skb_network_header(skb); | 1794 | hp = (struct fcoe_hdr *) skb_network_header(skb); |
1795 | 1795 | ||
1796 | stats = per_cpu_ptr(lport->dev_stats, get_cpu()); | 1796 | stats = per_cpu_ptr(lport->stats, get_cpu()); |
1797 | if (unlikely(FC_FCOE_DECAPS_VER(hp) != FC_FCOE_VER)) { | 1797 | if (unlikely(FC_FCOE_DECAPS_VER(hp) != FC_FCOE_VER)) { |
1798 | if (stats->ErrorFrames < 5) | 1798 | if (stats->ErrorFrames < 5) |
1799 | printk(KERN_WARNING "fcoe: FCoE version " | 1799 | printk(KERN_WARNING "fcoe: FCoE version " |
@@ -1970,7 +1970,7 @@ static int fcoe_device_notification(struct notifier_block *notifier, | |||
1970 | struct fcoe_ctlr *ctlr; | 1970 | struct fcoe_ctlr *ctlr; |
1971 | struct fcoe_interface *fcoe; | 1971 | struct fcoe_interface *fcoe; |
1972 | struct fcoe_port *port; | 1972 | struct fcoe_port *port; |
1973 | struct fcoe_dev_stats *stats; | 1973 | struct fc_stats *stats; |
1974 | u32 link_possible = 1; | 1974 | u32 link_possible = 1; |
1975 | u32 mfs; | 1975 | u32 mfs; |
1976 | int rc = NOTIFY_OK; | 1976 | int rc = NOTIFY_OK; |
@@ -2024,7 +2024,7 @@ static int fcoe_device_notification(struct notifier_block *notifier, | |||
2024 | if (link_possible && !fcoe_link_ok(lport)) | 2024 | if (link_possible && !fcoe_link_ok(lport)) |
2025 | fcoe_ctlr_link_up(ctlr); | 2025 | fcoe_ctlr_link_up(ctlr); |
2026 | else if (fcoe_ctlr_link_down(ctlr)) { | 2026 | else if (fcoe_ctlr_link_down(ctlr)) { |
2027 | stats = per_cpu_ptr(lport->dev_stats, get_cpu()); | 2027 | stats = per_cpu_ptr(lport->stats, get_cpu()); |
2028 | stats->LinkFailureCount++; | 2028 | stats->LinkFailureCount++; |
2029 | put_cpu(); | 2029 | put_cpu(); |
2030 | fcoe_clean_pending_queue(lport); | 2030 | fcoe_clean_pending_queue(lport); |