From: Ram Amrani Date: Mon, 20 Feb 2017 20:43:33 +0000 (+0200) Subject: qed: Reserve doorbell BAR space for present CPUs X-Git-Tag: v4.11-rc1~124^2~19^2~6 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=c2dedf8773e873474535bd4a158609b9eda5403d;p=uclinux-h8%2Flinux.git qed: Reserve doorbell BAR space for present CPUs Reserving doorbell BAR space according to the currently active CPUs may result in a bug if disabled CPUs are later enabled but no doorbell space was reserved for them. Signed-off-by: Ram Amrani Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c b/drivers/net/ethernet/qlogic/qed/qed_dev.c index 5ee7f040c50a..d6c5a8165b5f 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_dev.c +++ b/drivers/net/ethernet/qlogic/qed/qed_dev.c @@ -913,7 +913,7 @@ qed_hw_init_pf_doorbell_bar(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt) /* Either EDPM is mandatory, or we are attempting to allocate a * WID per CPU. */ - n_cpus = num_active_cpus(); + n_cpus = num_present_cpus(); rc = qed_hw_init_dpi_size(p_hwfn, p_ptt, pwm_regsize, n_cpus); }