diff options
author | Robert Love <robert.w.love@intel.com> | 2009-04-01 02:51:50 +0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-04-03 18:22:58 +0400 |
commit | 582b45bc577f78b5bfff3db874594ce2d962b846 (patch) | |
tree | b0cfe95b235aeca9b967cba8446db58b8a102533 /drivers/scsi/libfc/fc_fcp.c | |
parent | 5e5e92df49d4dfbef9ba981297c7f76d189376ac (diff) | |
download | linux-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/libfc/fc_fcp.c')
-rw-r--r-- | drivers/scsi/libfc/fc_fcp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index a5725f3b7ce1..0997e8b1dcea 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c @@ -407,10 +407,12 @@ static void fc_fcp_recv_data(struct fc_fcp_pkt *fsp, struct fc_frame *fp) if (~crc != le32_to_cpu(fr_crc(fp))) { crc_err: - stats = lp->dev_stats[smp_processor_id()]; + stats = fc_lport_get_stats(lp); stats->ErrorFrames++; + /* FIXME - per cpu count, not total count! */ if (stats->InvalidCRCCount++ < 5) - FC_DBG("CRC error on data frame\n"); + printk(KERN_WARNING "CRC error on data frame for port (%6x)\n", + fc_host_port_id(lp->host)); /* * Assume the frame is total garbage. * We may have copied it over the good part @@ -1752,7 +1754,7 @@ int fc_queuecommand(struct scsi_cmnd *sc_cmd, void (*done)(struct scsi_cmnd *)) /* * setup the data direction */ - stats = lp->dev_stats[smp_processor_id()]; + stats = fc_lport_get_stats(lp); if (sc_cmd->sc_data_direction == DMA_FROM_DEVICE) { fsp->req_flags = FC_SRB_READ; stats->InputRequests++; |