aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 22:47:50 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 22:47:50 -0400
commit56847d857cb0c3ee78c22ce776a26f88d9ffd4d4 (patch)
treea85bcf204a53e45d26f6a3984f16ddd525eef3e7 /drivers/scsi
parent191a712090bb8a10e6f129360eeed2d68f3d4c9a (diff)
parent8d564368a9a3197f43e56dadf4a18c5738849f94 (diff)
Merge branch 'akpm' (incoming from Andrew)
Merge second batch of fixes from Andrew Morton: - various misc bits - some printk updates - a new "SRAM" driver. - MAINTAINERS updates - the backlight driver queue - checkpatch updates - a few init/ changes - a huge number of drivers/rtc changes - fatfs updates - some lib/idr.c work - some renaming of the random driver interfaces * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (285 commits) net: rename random32 to prandom net/core: remove duplicate statements by do-while loop net/core: rename random32() to prandom_u32() net/netfilter: rename random32() to prandom_u32() net/sched: rename random32() to prandom_u32() net/sunrpc: rename random32() to prandom_u32() scsi: rename random32() to prandom_u32() lguest: rename random32() to prandom_u32() uwb: rename random32() to prandom_u32() video/uvesafb: rename random32() to prandom_u32() mmc: rename random32() to prandom_u32() drbd: rename random32() to prandom_u32() kernel/: rename random32() to prandom_u32() mm/: rename random32() to prandom_u32() lib/: rename random32() to prandom_u32() x86: rename random32() to prandom_u32() x86: pageattr-test: remove srandom32 call uuid: use prandom_bytes() raid6test: use prandom_bytes() sctp: convert sctp_assoc_set_id() to use idr_alloc_cyclic() ...
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/fcoe/fcoe_ctlr.c4
-rw-r--r--drivers/scsi/lpfc/lpfc_hbadisc.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c
index a76247201be5..cd743c545ce9 100644
--- a/drivers/scsi/fcoe/fcoe_ctlr.c
+++ b/drivers/scsi/fcoe/fcoe_ctlr.c
@@ -2161,7 +2161,7 @@ static void fcoe_ctlr_vn_restart(struct fcoe_ctlr *fip)
2161 2161
2162 if (fip->probe_tries < FIP_VN_RLIM_COUNT) { 2162 if (fip->probe_tries < FIP_VN_RLIM_COUNT) {
2163 fip->probe_tries++; 2163 fip->probe_tries++;
2164 wait = random32() % FIP_VN_PROBE_WAIT; 2164 wait = prandom_u32() % FIP_VN_PROBE_WAIT;
2165 } else 2165 } else
2166 wait = FIP_VN_RLIM_INT; 2166 wait = FIP_VN_RLIM_INT;
2167 mod_timer(&fip->timer, jiffies + msecs_to_jiffies(wait)); 2167 mod_timer(&fip->timer, jiffies + msecs_to_jiffies(wait));
@@ -2794,7 +2794,7 @@ static void fcoe_ctlr_vn_timeout(struct fcoe_ctlr *fip)
2794 fcoe_all_vn2vn, 0); 2794 fcoe_all_vn2vn, 0);
2795 fip->port_ka_time = jiffies + 2795 fip->port_ka_time = jiffies +
2796 msecs_to_jiffies(FIP_VN_BEACON_INT + 2796 msecs_to_jiffies(FIP_VN_BEACON_INT +
2797 (random32() % FIP_VN_BEACON_FUZZ)); 2797 (prandom_u32() % FIP_VN_BEACON_FUZZ));
2798 } 2798 }
2799 if (time_before(fip->port_ka_time, next_time)) 2799 if (time_before(fip->port_ka_time, next_time))
2800 next_time = fip->port_ka_time; 2800 next_time = fip->port_ka_time;
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index d7096ad94d3f..bfda18467ee6 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -1732,7 +1732,7 @@ lpfc_check_pending_fcoe_event(struct lpfc_hba *phba, uint8_t unreg_fcf)
1732 * use through a sequence of @fcf_cnt eligible FCF records with equal 1732 * use through a sequence of @fcf_cnt eligible FCF records with equal
1733 * probability. To perform integer manunipulation of random numbers with 1733 * probability. To perform integer manunipulation of random numbers with
1734 * size unit32_t, the lower 16 bits of the 32-bit random number returned 1734 * size unit32_t, the lower 16 bits of the 32-bit random number returned
1735 * from random32() are taken as the random random number generated. 1735 * from prandom_u32() are taken as the random random number generated.
1736 * 1736 *
1737 * Returns true when outcome is for the newly read FCF record should be 1737 * Returns true when outcome is for the newly read FCF record should be
1738 * chosen; otherwise, return false when outcome is for keeping the previously 1738 * chosen; otherwise, return false when outcome is for keeping the previously
@@ -1744,7 +1744,7 @@ lpfc_sli4_new_fcf_random_select(struct lpfc_hba *phba, uint32_t fcf_cnt)
1744 uint32_t rand_num; 1744 uint32_t rand_num;
1745 1745
1746 /* Get 16-bit uniform random number */ 1746 /* Get 16-bit uniform random number */
1747 rand_num = (0xFFFF & random32()); 1747 rand_num = 0xFFFF & prandom_u32();
1748 1748
1749 /* Decision with probability 1/fcf_cnt */ 1749 /* Decision with probability 1/fcf_cnt */
1750 if ((fcf_cnt * rand_num) < 0xFFFF) 1750 if ((fcf_cnt * rand_num) < 0xFFFF)
@@ -2380,7 +2380,7 @@ lpfc_mbx_cmpl_fcf_scan_read_fcf_rec(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
2380 phba->fcf.eligible_fcf_cnt = 1; 2380 phba->fcf.eligible_fcf_cnt = 1;
2381 /* Seeding the random number generator for random selection */ 2381 /* Seeding the random number generator for random selection */
2382 seed = (uint32_t)(0xFFFFFFFF & jiffies); 2382 seed = (uint32_t)(0xFFFFFFFF & jiffies);
2383 srandom32(seed); 2383 prandom_seed(seed);
2384 } 2384 }
2385 spin_unlock_irq(&phba->hbalock); 2385 spin_unlock_irq(&phba->hbalock);
2386 goto read_next_fcf; 2386 goto read_next_fcf;