[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>
This commit is contained in:
committed by
James Bottomley
parent
5e5e92df49
commit
582b45bc57
@ -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++;
|
||||
|
Reference in New Issue
Block a user