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_ctlr.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_ctlr.c')
-rw-r--r-- | drivers/scsi/fcoe/fcoe_ctlr.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c index d68d57241ee6..2ebe03a4b51d 100644 --- a/drivers/scsi/fcoe/fcoe_ctlr.c +++ b/drivers/scsi/fcoe/fcoe_ctlr.c | |||
@@ -788,11 +788,11 @@ static unsigned long fcoe_ctlr_age_fcfs(struct fcoe_ctlr *fip) | |||
788 | unsigned long deadline; | 788 | unsigned long deadline; |
789 | unsigned long sel_time = 0; | 789 | unsigned long sel_time = 0; |
790 | struct list_head del_list; | 790 | struct list_head del_list; |
791 | struct fcoe_dev_stats *stats; | 791 | struct fc_stats *stats; |
792 | 792 | ||
793 | INIT_LIST_HEAD(&del_list); | 793 | INIT_LIST_HEAD(&del_list); |
794 | 794 | ||
795 | stats = per_cpu_ptr(fip->lp->dev_stats, get_cpu()); | 795 | stats = per_cpu_ptr(fip->lp->stats, get_cpu()); |
796 | 796 | ||
797 | list_for_each_entry_safe(fcf, next, &fip->fcfs, list) { | 797 | list_for_each_entry_safe(fcf, next, &fip->fcfs, list) { |
798 | deadline = fcf->time + fcf->fka_period + fcf->fka_period / 2; | 798 | deadline = fcf->time + fcf->fka_period + fcf->fka_period / 2; |
@@ -1104,8 +1104,8 @@ static void fcoe_ctlr_recv_els(struct fcoe_ctlr *fip, struct sk_buff *skb) | |||
1104 | struct fc_frame_header *fh = NULL; | 1104 | struct fc_frame_header *fh = NULL; |
1105 | struct fip_desc *desc; | 1105 | struct fip_desc *desc; |
1106 | struct fip_encaps *els; | 1106 | struct fip_encaps *els; |
1107 | struct fcoe_dev_stats *stats; | ||
1108 | struct fcoe_fcf *sel; | 1107 | struct fcoe_fcf *sel; |
1108 | struct fc_stats *stats; | ||
1109 | enum fip_desc_type els_dtype = 0; | 1109 | enum fip_desc_type els_dtype = 0; |
1110 | u8 els_op; | 1110 | u8 els_op; |
1111 | u8 sub; | 1111 | u8 sub; |
@@ -1249,7 +1249,7 @@ static void fcoe_ctlr_recv_els(struct fcoe_ctlr *fip, struct sk_buff *skb) | |||
1249 | fr_dev(fp) = lport; | 1249 | fr_dev(fp) = lport; |
1250 | fr_encaps(fp) = els_dtype; | 1250 | fr_encaps(fp) = els_dtype; |
1251 | 1251 | ||
1252 | stats = per_cpu_ptr(lport->dev_stats, get_cpu()); | 1252 | stats = per_cpu_ptr(lport->stats, get_cpu()); |
1253 | stats->RxFrames++; | 1253 | stats->RxFrames++; |
1254 | stats->RxWords += skb->len / FIP_BPW; | 1254 | stats->RxWords += skb->len / FIP_BPW; |
1255 | put_cpu(); | 1255 | put_cpu(); |
@@ -1353,7 +1353,7 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip, | |||
1353 | ntoh24(vp->fd_fc_id)); | 1353 | ntoh24(vp->fd_fc_id)); |
1354 | if (vn_port && (vn_port == lport)) { | 1354 | if (vn_port && (vn_port == lport)) { |
1355 | mutex_lock(&fip->ctlr_mutex); | 1355 | mutex_lock(&fip->ctlr_mutex); |
1356 | per_cpu_ptr(lport->dev_stats, | 1356 | per_cpu_ptr(lport->stats, |
1357 | get_cpu())->VLinkFailureCount++; | 1357 | get_cpu())->VLinkFailureCount++; |
1358 | put_cpu(); | 1358 | put_cpu(); |
1359 | fcoe_ctlr_reset(fip); | 1359 | fcoe_ctlr_reset(fip); |
@@ -1383,8 +1383,7 @@ static void fcoe_ctlr_recv_clr_vlink(struct fcoe_ctlr *fip, | |||
1383 | * followed by physical port | 1383 | * followed by physical port |
1384 | */ | 1384 | */ |
1385 | mutex_lock(&fip->ctlr_mutex); | 1385 | mutex_lock(&fip->ctlr_mutex); |
1386 | per_cpu_ptr(lport->dev_stats, | 1386 | per_cpu_ptr(lport->stats, get_cpu())->VLinkFailureCount++; |
1387 | get_cpu())->VLinkFailureCount++; | ||
1388 | put_cpu(); | 1387 | put_cpu(); |
1389 | fcoe_ctlr_reset(fip); | 1388 | fcoe_ctlr_reset(fip); |
1390 | mutex_unlock(&fip->ctlr_mutex); | 1389 | mutex_unlock(&fip->ctlr_mutex); |