diff options
Diffstat (limited to 'drivers/scsi/libfc/fc_lport.c')
-rw-r--r-- | drivers/scsi/libfc/fc_lport.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index 2ae50a1188e6..b8178ef398d7 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport.c @@ -267,10 +267,10 @@ EXPORT_SYMBOL(fc_get_host_speed); struct fc_host_statistics *fc_get_host_stats(struct Scsi_Host *shost) { - int i; struct fc_host_statistics *fcoe_stats; struct fc_lport *lp = shost_priv(shost); struct timespec v0, v1; + unsigned int cpu; fcoe_stats = &lp->host_stats; memset(fcoe_stats, 0, sizeof(struct fc_host_statistics)); @@ -279,10 +279,11 @@ struct fc_host_statistics *fc_get_host_stats(struct Scsi_Host *shost) jiffies_to_timespec(lp->boot_time, &v1); fcoe_stats->seconds_since_last_reset = (v0.tv_sec - v1.tv_sec); - for_each_online_cpu(i) { - struct fcoe_dev_stats *stats = lp->dev_stats[i]; - if (stats == NULL) - continue; + for_each_possible_cpu(cpu) { + struct fcoe_dev_stats *stats; + + stats = per_cpu_ptr(lp->dev_stats, cpu); + fcoe_stats->tx_frames += stats->TxFrames; fcoe_stats->tx_words += stats->TxWords; fcoe_stats->rx_frames += stats->RxFrames; @@ -762,10 +763,11 @@ static void fc_lport_recv_flogi_req(struct fc_seq *sp_in, remote_wwpn = get_unaligned_be64(&flp->fl_wwpn); if (remote_wwpn == lport->wwpn) { FC_DBG("FLOGI from port with same WWPN %llx " - "possible configuration error\n", remote_wwpn); + "possible configuration error\n", + (unsigned long long)remote_wwpn); goto out; } - FC_DBG("FLOGI from port WWPN %llx\n", remote_wwpn); + FC_DBG("FLOGI from port WWPN %llx\n", (unsigned long long)remote_wwpn); /* * XXX what is the right thing to do for FIDs? |