diff options
author | Robert Love <robert.w.love@intel.com> | 2009-03-31 22:51:50 (GMT) |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-04-03 14:22:58 (GMT) |
commit | 582b45bc577f78b5bfff3db874594ce2d962b846 (patch) | |
tree | b0cfe95b235aeca9b967cba8446db58b8a102533 /drivers/scsi/fcoe/fcoe_sw.c | |
parent | 5e5e92df49d4dfbef9ba981297c7f76d189376ac (diff) | |
download | linux-fsl-qoriq-582b45bc577f78b5bfff3db874594ce2d962b846.tar.xz |
[SCSI] fcoe: Use per-CPU kernel function for dev_stats instead of an array
Remove the hotplug creation of dev_stats, we allocate for all possible CPUs
now when we allocate the lport.
v2: Durring the 2.6.30 merge window, before these patches were comitted,
'percpu_ptr' was renamed 'per_cpu_ptr'. This latest update updates this
patch for the name change.
Signed-off-by: Yi Zou <yi.zou@intel.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/fcoe/fcoe_sw.c')
-rw-r--r-- | drivers/scsi/fcoe/fcoe_sw.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/scsi/fcoe/fcoe_sw.c b/drivers/scsi/fcoe/fcoe_sw.c index 2bbbe3c..a675390 100644 --- a/drivers/scsi/fcoe/fcoe_sw.c +++ b/drivers/scsi/fcoe/fcoe_sw.c @@ -113,8 +113,6 @@ static struct scsi_host_template fcoe_sw_shost_template = { */ static int fcoe_sw_lport_config(struct fc_lport *lp) { - int i = 0; - lp->link_up = 0; lp->qfull = 0; lp->max_retry_count = 3; @@ -123,12 +121,7 @@ static int fcoe_sw_lport_config(struct fc_lport *lp) lp->service_params = (FCP_SPPF_INIT_FCN | FCP_SPPF_RD_XRDY_DIS | FCP_SPPF_RETRY | FCP_SPPF_CONF_COMPL); - /* - * allocate per cpu stats block - */ - for_each_online_cpu(i) - lp->dev_stats[i] = kzalloc(sizeof(struct fcoe_dev_stats), - GFP_KERNEL); + fc_lport_init_stats(lp); /* lport fc_lport related configuration */ fc_lport_config(lp); @@ -311,7 +304,6 @@ static inline int fcoe_sw_em_config(struct fc_lport *lp) */ static int fcoe_sw_destroy(struct net_device *netdev) { - int cpu; struct fc_lport *lp = NULL; struct fcoe_softc *fc; u8 flogi_maddr[ETH_ALEN]; @@ -363,8 +355,7 @@ static int fcoe_sw_destroy(struct net_device *netdev) fcoe_clean_pending_queue(lp); /* Free memory used by statistical counters */ - for_each_online_cpu(cpu) - kfree(lp->dev_stats[cpu]); + fc_lport_free_stats(lp); /* Release the net_device and Scsi_Host */ dev_put(fc->real_dev); |