mmiowb() is now implied by spin_unlock() on architectures that require it, so there is no reason to call it from driver code. This patch was generated using coccinelle: @mmiowb@ @@ - mmiowb(); and invoked as: $ for d in drivers include/linux/qed sound; do \ spatch --include-headers --sp-file mmiowb.cocci --dir $d --in-place; done NOTE: mmiowb() has only ever guaranteed ordering in conjunction with spin_unlock(). However, pairing each mmiowb() removal in this patch with the corresponding call to spin_unlock() is not at all trivial, so there is a small chance that this change may regress any drivers incorrectly relying on mmiowb() to order MMIO writes between CPUs using lock-free synchronisation. If you've ended up bisecting to this commit, you can reintroduce the mmiowb() calls using wmb() instead, which should restore the old behaviour on all architectures other than some esoteric ia64 systems.
Unified · Split
| @@ -303,8 +303,6 @@ static void post_se_instr(struct nitrox_softreq *sr, · 302 unmodified lines | |||
| 303 | 303 | ||
| 304 | /* Ring doorbell with count 1 */ | 304 | /* Ring doorbell with count 1 */ |
| 305 | writeq(1, cmdq->dbell_csr_addr); | 305 | writeq(1, cmdq->dbell_csr_addr); |
| 306 | /* orders the doorbell rings */ | ||
| 307 | mmiowb(); | ||
| 308 | 306 | ||
| 309 | cmdq->write_idx = incr_index(idx, 1, ndev->qlen); | 307 | cmdq->write_idx = incr_index(idx, 1, ndev->qlen); |
| 310 | 308 | ||
| @@ -599,8 +597,6 @@ void pkt_slc_resp_tasklet(unsigned long data) · 288 unmodified lines | |||
| 599 | * MSI-X interrupt generates if Completion count > Threshold | 597 | * MSI-X interrupt generates if Completion count > Threshold |
| 600 | */ | 598 | */ |
| 601 | writeq(slc_cnts.value, cmdq->compl_cnt_csr_addr); | 599 | writeq(slc_cnts.value, cmdq->compl_cnt_csr_addr); |
| 602 | /* order the writes */ | ||
| 603 | mmiowb(); | ||
| 604 | 600 | ||
| 605 | if (atomic_read(&cmdq->backlog_count)) | 601 | if (atomic_read(&cmdq->backlog_count)) |
| 606 | schedule_work(&cmdq->backlog_qflush); | 602 | schedule_work(&cmdq->backlog_qflush); |
| @@ -327,7 +327,6 @@ static void txx9dmac_reset_chan(struct txx9dmac_chan *dc) · 326 unmodified lines | |||
| 327 | channel_writel(dc, SAIR, 0); | 327 | channel_writel(dc, SAIR, 0); |
| 328 | channel_writel(dc, DAIR, 0); | 328 | channel_writel(dc, DAIR, 0); |
| 329 | channel_writel(dc, CCR, 0); | 329 | channel_writel(dc, CCR, 0); |
| 330 | mmiowb(); | ||
| 331 | } | 330 | } |
| 332 | 331 | ||
| 333 | /* Called with dc->lock held and bh disabled */ | 332 | /* Called with dc->lock held and bh disabled */ |
| @@ -954,7 +953,6 @@ static void txx9dmac_chain_dynamic(struct txx9dmac_chan *dc, · 620 unmodified lines | |||
| 954 | dma_sync_single_for_device(chan2parent(&dc->chan), | 953 | dma_sync_single_for_device(chan2parent(&dc->chan), |
| 955 | prev->txd.phys, ddev->descsize, | 954 | prev->txd.phys, ddev->descsize, |
| 956 | DMA_TO_DEVICE); | 955 | DMA_TO_DEVICE); |
| 957 | mmiowb(); | ||
| 958 | if (!(channel_readl(dc, CSR) & TXX9_DMA_CSR_CHNEN) && | 956 | if (!(channel_readl(dc, CSR) & TXX9_DMA_CSR_CHNEN) && |
| 959 | channel_read_CHAR(dc) == prev->txd.phys) | 957 | channel_read_CHAR(dc) == prev->txd.phys) |
| 960 | /* Restart chain DMA */ | 958 | /* Restart chain DMA */ |
| @@ -1080,7 +1078,6 @@ static void txx9dmac_free_chan_resources(struct dma_chan *chan) · 119 unmodified lines | |||
| 1080 | static void txx9dmac_off(struct txx9dmac_dev *ddev) | 1078 | static void txx9dmac_off(struct txx9dmac_dev *ddev) |
| 1081 | { | 1079 | { |
| 1082 | dma_writel(ddev, MCR, 0); | 1080 | dma_writel(ddev, MCR, 0); |
| 1083 | mmiowb(); | ||
| 1084 | } | 1081 | } |
| 1085 | 1082 | ||
| 1086 | static int __init txx9dmac_chan_probe(struct platform_device *pdev) | 1083 | static int __init txx9dmac_chan_probe(struct platform_device *pdev) |
| @@ -2939,7 +2939,6 @@ static void set_multichannel_mask(struct fw_ohci *ohci, u64 channels) · 2938 unmodified lines | |||
| 2939 | reg_write(ohci, OHCI1394_IRMultiChanMaskLoClear, ~lo); | 2939 | reg_write(ohci, OHCI1394_IRMultiChanMaskLoClear, ~lo); |
| 2940 | reg_write(ohci, OHCI1394_IRMultiChanMaskHiSet, hi); | 2940 | reg_write(ohci, OHCI1394_IRMultiChanMaskHiSet, hi); |
| 2941 | reg_write(ohci, OHCI1394_IRMultiChanMaskLoSet, lo); | 2941 | reg_write(ohci, OHCI1394_IRMultiChanMaskLoSet, lo); |
| 2942 | mmiowb(); | ||
| 2943 | ohci->mc_channels = channels; | 2942 | ohci->mc_channels = channels; |
| 2944 | } | 2943 | } |
| 2945 | 2944 | ||
| @@ -182,7 +182,6 @@ static void g4x_write_infoframe(struct intel_encoder *encoder, · 181 unmodified lines | |||
| 182 | 182 | ||
| 183 | I915_WRITE(VIDEO_DIP_CTL, val); | 183 | I915_WRITE(VIDEO_DIP_CTL, val); |
| 184 | 184 | ||
| 185 | mmiowb(); | ||
| 186 | for (i = 0; i < len; i += 4) { | 185 | for (i = 0; i < len; i += 4) { |
| 187 | I915_WRITE(VIDEO_DIP_DATA, *data); | 186 | I915_WRITE(VIDEO_DIP_DATA, *data); |
| 188 | data++; | 187 | data++; |
| @@ -190,7 +189,6 @@ static void g4x_write_infoframe(struct intel_encoder *encoder, · 1 unmodified line | |||
| 190 | /* Write every possible data byte to force correct ECC calculation. */ | 189 | /* Write every possible data byte to force correct ECC calculation. */ |
| 191 | for (; i < VIDEO_DIP_DATA_SIZE; i += 4) | 190 | for (; i < VIDEO_DIP_DATA_SIZE; i += 4) |
| 192 | I915_WRITE(VIDEO_DIP_DATA, 0); | 191 | I915_WRITE(VIDEO_DIP_DATA, 0); |
| 193 | mmiowb(); | ||
| 194 | 192 | ||
| 195 | val |= g4x_infoframe_enable(type); | 193 | val |= g4x_infoframe_enable(type); |
| 196 | val &= ~VIDEO_DIP_FREQ_MASK; | 194 | val &= ~VIDEO_DIP_FREQ_MASK; |
| @@ -237,7 +235,6 @@ static void ibx_write_infoframe(struct intel_encoder *encoder, · 40 unmodified lines | |||
| 237 | 235 | ||
| 238 | I915_WRITE(reg, val); | 236 | I915_WRITE(reg, val); |
| 239 | 237 | ||
| 240 | mmiowb(); | ||
| 241 | for (i = 0; i < len; i += 4) { | 238 | for (i = 0; i < len; i += 4) { |
| 242 | I915_WRITE(TVIDEO_DIP_DATA(intel_crtc->pipe), *data); | 239 | I915_WRITE(TVIDEO_DIP_DATA(intel_crtc->pipe), *data); |
| 243 | data++; | 240 | data++; |
| @@ -245,7 +242,6 @@ static void ibx_write_infoframe(struct intel_encoder *encoder, · 1 unmodified line | |||
| 245 | /* Write every possible data byte to force correct ECC calculation. */ | 242 | /* Write every possible data byte to force correct ECC calculation. */ |
| 246 | for (; i < VIDEO_DIP_DATA_SIZE; i += 4) | 243 | for (; i < VIDEO_DIP_DATA_SIZE; i += 4) |
| 247 | I915_WRITE(TVIDEO_DIP_DATA(intel_crtc->pipe), 0); | 244 | I915_WRITE(TVIDEO_DIP_DATA(intel_crtc->pipe), 0); |
| 248 | mmiowb(); | ||
| 249 | 245 | ||
| 250 | val |= g4x_infoframe_enable(type); | 246 | val |= g4x_infoframe_enable(type); |
| 251 | val &= ~VIDEO_DIP_FREQ_MASK; | 247 | val &= ~VIDEO_DIP_FREQ_MASK; |
| @@ -298,7 +294,6 @@ static void cpt_write_infoframe(struct intel_encoder *encoder, · 46 unmodified lines | |||
| 298 | 294 | ||
| 299 | I915_WRITE(reg, val); | 295 | I915_WRITE(reg, val); |
| 300 | 296 | ||
| 301 | mmiowb(); | ||
| 302 | for (i = 0; i < len; i += 4) { | 297 | for (i = 0; i < len; i += 4) { |
| 303 | I915_WRITE(TVIDEO_DIP_DATA(intel_crtc->pipe), *data); | 298 | I915_WRITE(TVIDEO_DIP_DATA(intel_crtc->pipe), *data); |
| 304 | data++; | 299 | data++; |
| @@ -306,7 +301,6 @@ static void cpt_write_infoframe(struct intel_encoder *encoder, · 1 unmodified line | |||
| 306 | /* Write every possible data byte to force correct ECC calculation. */ | 301 | /* Write every possible data byte to force correct ECC calculation. */ |
| 307 | for (; i < VIDEO_DIP_DATA_SIZE; i += 4) | 302 | for (; i < VIDEO_DIP_DATA_SIZE; i += 4) |
| 308 | I915_WRITE(TVIDEO_DIP_DATA(intel_crtc->pipe), 0); | 303 | I915_WRITE(TVIDEO_DIP_DATA(intel_crtc->pipe), 0); |
| 309 | mmiowb(); | ||
| 310 | 304 | ||
| 311 | val |= g4x_infoframe_enable(type); | 305 | val |= g4x_infoframe_enable(type); |
| 312 | val &= ~VIDEO_DIP_FREQ_MASK; | 306 | val &= ~VIDEO_DIP_FREQ_MASK; |
| @@ -352,7 +346,6 @@ static void vlv_write_infoframe(struct intel_encoder *encoder, · 39 unmodified lines | |||
| 352 | 346 | ||
| 353 | I915_WRITE(reg, val); | 347 | I915_WRITE(reg, val); |
| 354 | 348 | ||
| 355 | mmiowb(); | ||
| 356 | for (i = 0; i < len; i += 4) { | 349 | for (i = 0; i < len; i += 4) { |
| 357 | I915_WRITE(VLV_TVIDEO_DIP_DATA(intel_crtc->pipe), *data); | 350 | I915_WRITE(VLV_TVIDEO_DIP_DATA(intel_crtc->pipe), *data); |
| 358 | data++; | 351 | data++; |
| @@ -360,7 +353,6 @@ static void vlv_write_infoframe(struct intel_encoder *encoder, · 1 unmodified line | |||
| 360 | /* Write every possible data byte to force correct ECC calculation. */ | 353 | /* Write every possible data byte to force correct ECC calculation. */ |
| 361 | for (; i < VIDEO_DIP_DATA_SIZE; i += 4) | 354 | for (; i < VIDEO_DIP_DATA_SIZE; i += 4) |
| 362 | I915_WRITE(VLV_TVIDEO_DIP_DATA(intel_crtc->pipe), 0); | 355 | I915_WRITE(VLV_TVIDEO_DIP_DATA(intel_crtc->pipe), 0); |
| 363 | mmiowb(); | ||
| 364 | 356 | ||
| 365 | val |= g4x_infoframe_enable(type); | 357 | val |= g4x_infoframe_enable(type); |
| 366 | val &= ~VIDEO_DIP_FREQ_MASK; | 358 | val &= ~VIDEO_DIP_FREQ_MASK; |
| @@ -406,7 +398,6 @@ static void hsw_write_infoframe(struct intel_encoder *encoder, · 39 unmodified lines | |||
| 406 | val &= ~hsw_infoframe_enable(type); | 398 | val &= ~hsw_infoframe_enable(type); |
| 407 | I915_WRITE(ctl_reg, val); | 399 | I915_WRITE(ctl_reg, val); |
| 408 | 400 | ||
| 409 | mmiowb(); | ||
| 410 | for (i = 0; i < len; i += 4) { | 401 | for (i = 0; i < len; i += 4) { |
| 411 | I915_WRITE(hsw_dip_data_reg(dev_priv, cpu_transcoder, | 402 | I915_WRITE(hsw_dip_data_reg(dev_priv, cpu_transcoder, |
| 412 | type, i >> 2), *data); | 403 | type, i >> 2), *data); |
| @@ -416,7 +407,6 @@ static void hsw_write_infoframe(struct intel_encoder *encoder, · 3 unmodified lines | |||
| 416 | for (; i < data_size; i += 4) | 407 | for (; i < data_size; i += 4) |
| 417 | I915_WRITE(hsw_dip_data_reg(dev_priv, cpu_transcoder, | 408 | I915_WRITE(hsw_dip_data_reg(dev_priv, cpu_transcoder, |
| 418 | type, i >> 2), 0); | 409 | type, i >> 2), 0); |
| 419 | mmiowb(); | ||
| 420 | 410 | ||
| 421 | val |= hsw_infoframe_enable(type); | 411 | val |= hsw_infoframe_enable(type); |
| 422 | I915_WRITE(ctl_reg, val); | 412 | I915_WRITE(ctl_reg, val); |
| @@ -156,7 +156,6 @@ static u16 tx4939ide_check_error_ints(ide_hwif_t *hwif) · 155 unmodified lines | |||
| 156 | u16 sysctl = tx4939ide_readw(base, TX4939IDE_Sys_Ctl); | 156 | u16 sysctl = tx4939ide_readw(base, TX4939IDE_Sys_Ctl); |
| 157 | 157 | ||
| 158 | tx4939ide_writew(sysctl | 0x4000, base, TX4939IDE_Sys_Ctl); | 158 | tx4939ide_writew(sysctl | 0x4000, base, TX4939IDE_Sys_Ctl); |
| 159 | mmiowb(); | ||
| 160 | /* wait 12GBUSCLK (typ. 60ns @ GBUS200MHz, max 270ns) */ | 159 | /* wait 12GBUSCLK (typ. 60ns @ GBUS200MHz, max 270ns) */ |
| 161 | ndelay(270); | 160 | ndelay(270); |
| 162 | tx4939ide_writew(sysctl, base, TX4939IDE_Sys_Ctl); | 161 | tx4939ide_writew(sysctl, base, TX4939IDE_Sys_Ctl); |
| @@ -396,7 +395,6 @@ static void tx4939ide_init_hwif(ide_hwif_t *hwif) · 233 unmodified lines | |||
| 396 | 395 | ||
| 397 | /* Soft Reset */ | 396 | /* Soft Reset */ |
| 398 | tx4939ide_writew(0x8000, base, TX4939IDE_Sys_Ctl); | 397 | tx4939ide_writew(0x8000, base, TX4939IDE_Sys_Ctl); |
| 399 | mmiowb(); | ||
| 400 | /* at least 20 GBUSCLK (typ. 100ns @ GBUS200MHz, max 450ns) */ | 398 | /* at least 20 GBUSCLK (typ. 100ns @ GBUS200MHz, max 450ns) */ |
| 401 | ndelay(450); | 399 | ndelay(450); |
| 402 | tx4939ide_writew(0x0000, base, TX4939IDE_Sys_Ctl); | 400 | tx4939ide_writew(0x0000, base, TX4939IDE_Sys_Ctl); |
| @@ -8365,7 +8365,6 @@ static inline void clear_recv_intr(struct hfi1_ctxtdata *rcd) · 8364 unmodified lines | |||
| 8365 | struct hfi1_devdata *dd = rcd->dd; | 8365 | struct hfi1_devdata *dd = rcd->dd; |
| 8366 | u32 addr = CCE_INT_CLEAR + (8 * rcd->ireg); | 8366 | u32 addr = CCE_INT_CLEAR + (8 * rcd->ireg); |
| 8367 | 8367 | ||
| 8368 | mmiowb(); | ||
| 8369 | write_csr(dd, addr, rcd->imask); | 8368 | write_csr(dd, addr, rcd->imask); |
| 8370 | /* force the above write on the chip and get a value back */ | 8369 | /* force the above write on the chip and get a value back */ |
| 8371 | (void)read_csr(dd, addr); | 8370 | (void)read_csr(dd, addr); |
| @@ -11803,12 +11802,10 @@ void update_usrhead(struct hfi1_ctxtdata *rcd, u32 hd, u32 updegr, u32 egrhd, · 3431 unmodified lines | |||
| 11803 | << RCV_EGR_INDEX_HEAD_HEAD_SHIFT; | 11802 | << RCV_EGR_INDEX_HEAD_HEAD_SHIFT; |
| 11804 | write_uctxt_csr(dd, ctxt, RCV_EGR_INDEX_HEAD, reg); | 11803 | write_uctxt_csr(dd, ctxt, RCV_EGR_INDEX_HEAD, reg); |
| 11805 | } | 11804 | } |
| 11806 | mmiowb(); | ||
| 11807 | reg = ((u64)rcv_intr_count << RCV_HDR_HEAD_COUNTER_SHIFT) | | 11805 | reg = ((u64)rcv_intr_count << RCV_HDR_HEAD_COUNTER_SHIFT) | |
| 11808 | (((u64)hd & RCV_HDR_HEAD_HEAD_MASK) | 11806 | (((u64)hd & RCV_HDR_HEAD_HEAD_MASK) |
| 11809 | << RCV_HDR_HEAD_HEAD_SHIFT); | 11807 | << RCV_HDR_HEAD_HEAD_SHIFT); |
| 11810 | write_uctxt_csr(dd, ctxt, RCV_HDR_HEAD, reg); | 11808 | write_uctxt_csr(dd, ctxt, RCV_HDR_HEAD, reg); |
| 11811 | mmiowb(); | ||
| 11812 | } | 11809 | } |
| 11813 | 11810 | ||
| 11814 | u32 hdrqempty(struct hfi1_ctxtdata *rcd) | 11811 | u32 hdrqempty(struct hfi1_ctxtdata *rcd) |
| @@ -1578,7 +1578,6 @@ void hfi1_sc_wantpiobuf_intr(struct send_context *sc, u32 needint) · 1577 unmodified lines | |||
| 1578 | sc_del_credit_return_intr(sc); | 1578 | sc_del_credit_return_intr(sc); |
| 1579 | trace_hfi1_wantpiointr(sc, needint, sc->credit_ctrl); | 1579 | trace_hfi1_wantpiointr(sc, needint, sc->credit_ctrl); |
| 1580 | if (needint) { | 1580 | if (needint) { |
| 1581 | mmiowb(); | ||
| 1582 | sc_return_credits(sc); | 1581 | sc_return_credits(sc); |
| 1583 | } | 1582 | } |
| 1584 | } | 1583 | } |
| @@ -1750,8 +1750,6 @@ static int hns_roce_v1_post_mbox(struct hns_roce_dev *hr_dev, u64 in_param, · 1749 unmodified lines | |||
| 1750 | 1750 | ||
| 1751 | writel(val, hcr + 5); | 1751 | writel(val, hcr + 5); |
| 1752 | 1752 | ||
| 1753 | mmiowb(); | ||
| 1754 | |||
| 1755 | return 0; | 1753 | return 0; |
| 1756 | } | 1754 | } |
| 1757 | 1755 | ||
| @@ -3744,12 +3744,6 @@ out: · 3743 unmodified lines | |||
| 3744 | writel_relaxed(qp->doorbell_qpn, | 3744 | writel_relaxed(qp->doorbell_qpn, |
| 3745 | to_mdev(ibqp->device)->uar_map + MLX4_SEND_DOORBELL); | 3745 | to_mdev(ibqp->device)->uar_map + MLX4_SEND_DOORBELL); |
| 3746 | 3746 | ||
| 3747 | /* | ||
| 3748 | * Make sure doorbells don't leak out of SQ spinlock | ||
| 3749 | * and reach the HCA out of order. | ||
| 3750 | */ | ||
| 3751 | mmiowb(); | ||
| 3752 | |||
| 3753 | stamp_send_wqe(qp, ind + qp->sq_spare_wqes - 1); | 3747 | stamp_send_wqe(qp, ind + qp->sq_spare_wqes - 1); |
| 3754 | 3748 | ||
| 3755 | qp->sq_next_wqe = ind; | 3749 | qp->sq_next_wqe = ind; |
| @@ -5123,7 +5123,6 @@ out: · 5122 unmodified lines | |||
| 5123 | /* Make sure doorbells don't leak out of SQ spinlock | 5123 | /* Make sure doorbells don't leak out of SQ spinlock |
| 5124 | * and reach the HCA out of order. | 5124 | * and reach the HCA out of order. |
| 5125 | */ | 5125 | */ |
| 5126 | mmiowb(); | ||
| 5127 | bf->offset ^= bf->buf_size; | 5126 | bf->offset ^= bf->buf_size; |
| 5128 | } | 5127 | } |
| 5129 | 5128 | ||
| @@ -292,12 +292,6 @@ static int mthca_cmd_post(struct mthca_dev *dev, · 291 unmodified lines | |||
| 292 | err = mthca_cmd_post_hcr(dev, in_param, out_param, in_modifier, | 292 | err = mthca_cmd_post_hcr(dev, in_param, out_param, in_modifier, |
| 293 | op_modifier, op, token, event); | 293 | op_modifier, op, token, event); |
| 294 | 294 | ||
| 295 | /* | ||
| 296 | * Make sure that our HCR writes don't get mixed in with | ||
| 297 | * writes from another CPU starting a FW command. | ||
| 298 | */ | ||
| 299 | mmiowb(); | ||
| 300 | |||
| 301 | mutex_unlock(&dev->cmd.hcr_mutex); | 295 | mutex_unlock(&dev->cmd.hcr_mutex); |
| 302 | return err; | 296 | return err; |
| 303 | } | 297 | } |
| @@ -211,11 +211,6 @@ static inline void update_cons_index(struct mthca_dev *dev, struct mthca_cq *cq, · 210 unmodified lines | |||
| 211 | mthca_write64(MTHCA_TAVOR_CQ_DB_INC_CI | cq->cqn, incr - 1, | 211 | mthca_write64(MTHCA_TAVOR_CQ_DB_INC_CI | cq->cqn, incr - 1, |
| 212 | dev->kar + MTHCA_CQ_DOORBELL, | 212 | dev->kar + MTHCA_CQ_DOORBELL, |
| 213 | MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); | 213 | MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); |
| 214 | /* | ||
| 215 | * Make sure doorbells don't leak out of CQ spinlock | ||
| 216 | * and reach the HCA out of order: | ||
| 217 | */ | ||
| 218 | mmiowb(); | ||
| 219 | } | 214 | } |
| 220 | } | 215 | } |
| 221 | 216 | ||
| @@ -1809,11 +1809,6 @@ out: · 1808 unmodified lines | |||
| 1809 | (qp->qpn << 8) | size0, | 1809 | (qp->qpn << 8) | size0, |
| 1810 | dev->kar + MTHCA_SEND_DOORBELL, | 1810 | dev->kar + MTHCA_SEND_DOORBELL, |
| 1811 | MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); | 1811 | MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); |
| 1812 | /* | ||
| 1813 | * Make sure doorbells don't leak out of SQ spinlock | ||
| 1814 | * and reach the HCA out of order: | ||
| 1815 | */ | ||
| 1816 | mmiowb(); | ||
| 1817 | } | 1812 | } |
| 1818 | 1813 | ||
| 1819 | qp->sq.next_ind = ind; | 1814 | qp->sq.next_ind = ind; |
| @@ -1924,12 +1919,6 @@ out: · 104 unmodified lines | |||
| 1924 | qp->rq.next_ind = ind; | 1919 | qp->rq.next_ind = ind; |
| 1925 | qp->rq.head += nreq; | 1920 | qp->rq.head += nreq; |
| 1926 | 1921 | ||
| 1927 | /* | ||
| 1928 | * Make sure doorbells don't leak out of RQ spinlock and reach | ||
| 1929 | * the HCA out of order: | ||
| 1930 | */ | ||
| 1931 | mmiowb(); | ||
| 1932 | |||
| 1933 | spin_unlock_irqrestore(&qp->rq.lock, flags); | 1922 | spin_unlock_irqrestore(&qp->rq.lock, flags); |
| 1934 | return err; | 1923 | return err; |
| 1935 | } | 1924 | } |
| @@ -2164,12 +2153,6 @@ out: · 228 unmodified lines | |||
| 2164 | MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); | 2153 | MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); |
| 2165 | } | 2154 | } |
| 2166 | 2155 | ||
| 2167 | /* | ||
| 2168 | * Make sure doorbells don't leak out of SQ spinlock and reach | ||
| 2169 | * the HCA out of order: | ||
| 2170 | */ | ||
| 2171 | mmiowb(); | ||
| 2172 | |||
| 2173 | spin_unlock_irqrestore(&qp->sq.lock, flags); | 2156 | spin_unlock_irqrestore(&qp->sq.lock, flags); |
| 2174 | return err; | 2157 | return err; |
| 2175 | } | 2158 | } |
| @@ -570,12 +570,6 @@ int mthca_tavor_post_srq_recv(struct ib_srq *ibsrq, const struct ib_recv_wr *wr, · 569 unmodified lines | |||
| 570 | MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); | 570 | MTHCA_GET_DOORBELL_LOCK(&dev->doorbell_lock)); |
| 571 | } | 571 | } |
| 572 | 572 | ||
| 573 | /* | ||
| 574 | * Make sure doorbells don't leak out of SRQ spinlock and | ||
| 575 | * reach the HCA out of order: | ||
| 576 | */ | ||
| 577 | mmiowb(); | ||
| 578 | |||
| 579 | spin_unlock_irqrestore(&srq->lock, flags); | 573 | spin_unlock_irqrestore(&srq->lock, flags); |
| 580 | return err; | 574 | return err; |
| 581 | } | 575 | } |
| @@ -773,9 +773,6 @@ static void doorbell_cq(struct qedr_cq *cq, u32 cons, u8 flags) · 772 unmodified lines | |||
| 773 | cq->db.data.agg_flags = flags; | 773 | cq->db.data.agg_flags = flags; |
| 774 | cq->db.data.value = cpu_to_le32(cons); | 774 | cq->db.data.value = cpu_to_le32(cons); |
| 775 | writeq(cq->db.raw, cq->db_addr); | 775 | writeq(cq->db.raw, cq->db_addr); |
| 776 | |||
| 777 | /* Make sure write would stick */ | ||
| 778 | mmiowb(); | ||
| 779 | } | 776 | } |
| 780 | 777 | ||
| 781 | int qedr_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags) | 778 | int qedr_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags) |
| @@ -2084,8 +2081,6 @@ static int qedr_update_qp_state(struct qedr_dev *dev, · 1302 unmodified lines | |||
| 2084 | 2081 | ||
| 2085 | if (rdma_protocol_roce(&dev->ibdev, 1)) { | 2082 | if (rdma_protocol_roce(&dev->ibdev, 1)) { |
| 2086 | writel(qp->rq.db_data.raw, qp->rq.db); | 2083 | writel(qp->rq.db_data.raw, qp->rq.db); |
| 2087 | /* Make sure write takes effect */ | ||
| 2088 | mmiowb(); | ||
| 2089 | } | 2084 | } |
| 2090 | break; | 2085 | break; |
| 2091 | case QED_ROCE_QP_STATE_ERR: | 2086 | case QED_ROCE_QP_STATE_ERR: |
| @@ -3502,9 +3497,6 @@ int qedr_post_send(struct ib_qp *ibqp, const struct ib_send_wr *wr, · 1410 unmodified lines | |||
| 3502 | smp_wmb(); | 3497 | smp_wmb(); |
| 3503 | writel(qp->sq.db_data.raw, qp->sq.db); | 3498 | writel(qp->sq.db_data.raw, qp->sq.db); |
| 3504 | 3499 | ||
| 3505 | /* Make sure write sticks */ | ||
| 3506 | mmiowb(); | ||
| 3507 | |||
| 3508 | spin_unlock_irqrestore(&qp->q_lock, flags); | 3500 | spin_unlock_irqrestore(&qp->q_lock, flags); |
| 3509 | 3501 | ||
| 3510 | return rc; | 3502 | return rc; |
| @@ -3695,12 +3687,8 @@ int qedr_post_recv(struct ib_qp *ibqp, const struct ib_recv_wr *wr, · 184 unmodified lines | |||
| 3695 | 3687 | ||
| 3696 | writel(qp->rq.db_data.raw, qp->rq.db); | 3688 | writel(qp->rq.db_data.raw, qp->rq.db); |
| 3697 | 3689 | ||
| 3698 | /* Make sure write sticks */ | ||
| 3699 | mmiowb(); | ||
| 3700 | |||
| 3701 | if (rdma_protocol_iwarp(&dev->ibdev, 1)) { | 3690 | if (rdma_protocol_iwarp(&dev->ibdev, 1)) { |
| 3702 | writel(qp->rq.iwarp_db2_data.raw, qp->rq.iwarp_db2); | 3691 | writel(qp->rq.iwarp_db2_data.raw, qp->rq.iwarp_db2); |
| 3703 | mmiowb(); | ||
| 3704 | } | 3692 | } |
| 3705 | 3693 | ||
| 3706 | wr = wr->next; | 3694 | wr = wr->next; |
| @@ -1884,7 +1884,6 @@ static void qib_6120_put_tid(struct qib_devdata *dd, u64 __iomem *tidptr, · 1883 unmodified lines | |||
| 1884 | qib_write_kreg(dd, kr_scratch, 0xfeeddeaf); | 1884 | qib_write_kreg(dd, kr_scratch, 0xfeeddeaf); |
| 1885 | writel(pa, tidp32); | 1885 | writel(pa, tidp32); |
| 1886 | qib_write_kreg(dd, kr_scratch, 0xdeadbeef); | 1886 | qib_write_kreg(dd, kr_scratch, 0xdeadbeef); |
| 1887 | mmiowb(); | ||
| 1888 | spin_unlock_irqrestore(tidlockp, flags); | 1887 | spin_unlock_irqrestore(tidlockp, flags); |
| 1889 | } | 1888 | } |
| 1890 | 1889 | ||
| @@ -1928,7 +1927,6 @@ static void qib_6120_put_tid_2(struct qib_devdata *dd, u64 __iomem *tidptr, · 37 unmodified lines | |||
| 1928 | pa |= 2 << 29; | 1927 | pa |= 2 << 29; |
| 1929 | } | 1928 | } |
| 1930 | writel(pa, tidp32); | 1929 | writel(pa, tidp32); |
| 1931 | mmiowb(); | ||
| 1932 | } | 1930 | } |
| 1933 | 1931 | ||
| 1934 | 1932 | ||
| @@ -2053,9 +2051,7 @@ static void qib_update_6120_usrhead(struct qib_ctxtdata *rcd, u64 hd, · 118 unmodified lines | |||
| 2053 | { | 2051 | { |
| 2054 | if (updegr) | 2052 | if (updegr) |
| 2055 | qib_write_ureg(rcd->dd, ur_rcvegrindexhead, egrhd, rcd->ctxt); | 2053 | qib_write_ureg(rcd->dd, ur_rcvegrindexhead, egrhd, rcd->ctxt); |
| 2056 | mmiowb(); | ||
| 2057 | qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt); | 2054 | qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt); |
| 2058 | mmiowb(); | ||
| 2059 | } | 2055 | } |
| 2060 | 2056 | ||
| 2061 | static u32 qib_6120_hdrqempty(struct qib_ctxtdata *rcd) | 2057 | static u32 qib_6120_hdrqempty(struct qib_ctxtdata *rcd) |
| @@ -2175,7 +2175,6 @@ static void qib_7220_put_tid(struct qib_devdata *dd, u64 __iomem *tidptr, · 2174 unmodified lines | |||
| 2175 | pa = chippa; | 2175 | pa = chippa; |
| 2176 | } | 2176 | } |
| 2177 | writeq(pa, tidptr); | 2177 | writeq(pa, tidptr); |
| 2178 | mmiowb(); | ||
| 2179 | } | 2178 | } |
| 2180 | 2179 | ||
| 2181 | /** | 2180 | /** |
| @@ -2704,9 +2703,7 @@ static void qib_update_7220_usrhead(struct qib_ctxtdata *rcd, u64 hd, · 522 unmodified lines | |||
| 2704 | { | 2703 | { |
| 2705 | if (updegr) | 2704 | if (updegr) |
| 2706 | qib_write_ureg(rcd->dd, ur_rcvegrindexhead, egrhd, rcd->ctxt); | 2705 | qib_write_ureg(rcd->dd, ur_rcvegrindexhead, egrhd, rcd->ctxt); |
| 2707 | mmiowb(); | ||
| 2708 | qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt); | 2706 | qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt); |
| 2709 | mmiowb(); | ||
| 2710 | } | 2707 | } |
| 2711 | 2708 | ||
| 2712 | static u32 qib_7220_hdrqempty(struct qib_ctxtdata *rcd) | 2709 | static u32 qib_7220_hdrqempty(struct qib_ctxtdata *rcd) |
| @@ -3793,7 +3793,6 @@ static void qib_7322_put_tid(struct qib_devdata *dd, u64 __iomem *tidptr, · 3792 unmodified lines | |||
| 3793 | pa = chippa; | 3793 | pa = chippa; |
| 3794 | } | 3794 | } |
| 3795 | writeq(pa, tidptr); | 3795 | writeq(pa, tidptr); |
| 3796 | mmiowb(); | ||
| 3797 | } | 3796 | } |
| 3798 | 3797 | ||
| 3799 | /** | 3798 | /** |
| @@ -4440,10 +4439,8 @@ static void qib_update_7322_usrhead(struct qib_ctxtdata *rcd, u64 hd, · 640 unmodified lines | |||
| 4440 | adjust_rcv_timeout(rcd, npkts); | 4439 | adjust_rcv_timeout(rcd, npkts); |
| 4441 | if (updegr) | 4440 | if (updegr) |
| 4442 | qib_write_ureg(rcd->dd, ur_rcvegrindexhead, egrhd, rcd->ctxt); | 4441 | qib_write_ureg(rcd->dd, ur_rcvegrindexhead, egrhd, rcd->ctxt); |
| 4443 | mmiowb(); | ||
| 4444 | qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt); | 4442 | qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt); |
| 4445 | qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt); | 4443 | qib_write_ureg(rcd->dd, ur_rcvhdrhead, hd, rcd->ctxt); |
| 4446 | mmiowb(); | ||
| 4447 | } | 4444 | } |
| 4448 | 4445 | ||
| 4449 | static u32 qib_7322_hdrqempty(struct qib_ctxtdata *rcd) | 4446 | static u32 qib_7322_hdrqempty(struct qib_ctxtdata *rcd) |
| @@ -1068,7 +1068,6 @@ static int qib_sd_setvals(struct qib_devdata *dd) · 1067 unmodified lines | |||
| 1068 | for (idx = 0; idx < NUM_DDS_REGS; ++idx) { | 1068 | for (idx = 0; idx < NUM_DDS_REGS; ++idx) { |
| 1069 | data = ((dds_reg_map & 0xF) << 4) | TX_FAST_ELT; | 1069 | data = ((dds_reg_map & 0xF) << 4) | TX_FAST_ELT; |
| 1070 | writeq(data, iaddr + idx); | 1070 | writeq(data, iaddr + idx); |
| 1071 | mmiowb(); | ||
| 1072 | qib_read_kreg32(dd, kr_scratch); | 1071 | qib_read_kreg32(dd, kr_scratch); |
| 1073 | dds_reg_map >>= 4; | 1072 | dds_reg_map >>= 4; |
| 1074 | for (midx = 0; midx < DDS_ROWS; ++midx) { | 1073 | for (midx = 0; midx < DDS_ROWS; ++midx) { |
| @@ -1076,7 +1075,6 @@ static int qib_sd_setvals(struct qib_devdata *dd) · 1 unmodified line | |||
| 1076 | 1075 | ||
| 1077 | data = dds_init_vals[midx].reg_vals[idx]; | 1076 | data = dds_init_vals[midx].reg_vals[idx]; |
| 1078 | writeq(data, daddr); | 1077 | writeq(data, daddr); |
| 1079 | mmiowb(); | ||
| 1080 | qib_read_kreg32(dd, kr_scratch); | 1078 | qib_read_kreg32(dd, kr_scratch); |
| 1081 | } /* End inner for (vals for this reg, each row) */ | 1079 | } /* End inner for (vals for this reg, each row) */ |
| 1082 | } /* end outer for (regs to be stored) */ | 1080 | } /* end outer for (regs to be stored) */ |
| @@ -1098,13 +1096,11 @@ static int qib_sd_setvals(struct qib_devdata *dd) · 15 unmodified lines | |||
| 1098 | didx = idx + min_idx; | 1096 | didx = idx + min_idx; |
| 1099 | /* Store the next RXEQ register address */ | 1097 | /* Store the next RXEQ register address */ |
| 1100 | writeq(rxeq_init_vals[idx].rdesc, iaddr + didx); | 1098 | writeq(rxeq_init_vals[idx].rdesc, iaddr + didx); |
| 1101 | mmiowb(); | ||
| 1102 | qib_read_kreg32(dd, kr_scratch); | 1099 | qib_read_kreg32(dd, kr_scratch); |
| 1103 | /* Iterate through RXEQ values */ | 1100 | /* Iterate through RXEQ values */ |
| 1104 | for (vidx = 0; vidx < 4; vidx++) { | 1101 | for (vidx = 0; vidx < 4; vidx++) { |
| 1105 | data = rxeq_init_vals[idx].rdata[vidx]; | 1102 | data = rxeq_init_vals[idx].rdata[vidx]; |
| 1106 | writeq(data, taddr + (vidx << 6) + idx); | 1103 | writeq(data, taddr + (vidx << 6) + idx); |
| 1107 | mmiowb(); | ||
| 1108 | qib_read_kreg32(dd, kr_scratch); | 1104 | qib_read_kreg32(dd, kr_scratch); |
| 1109 | } | 1105 | } |
| 1110 | } /* end outer for (Reg-writes for RXEQ) */ | 1106 | } /* end outer for (Reg-writes for RXEQ) */ |
| @@ -46,7 +46,6 @@ static int read_i2c_reg(void __iomem *addr, u8 index, u8 *data) · 45 unmodified lines | |||
| 46 | u32 tmp = index; | 46 | u32 tmp = index; |
| 47 | 47 | ||
| 48 | iowrite32((tmp << 17) | IIC_READ, addr + IIC_CSR2); | 48 | iowrite32((tmp << 17) | IIC_READ, addr + IIC_CSR2); |
| 49 | mmiowb(); | ||
| 50 | udelay(45); /* wait at least 43 usec for NEW_CYCLE to clear */ | 49 | udelay(45); /* wait at least 43 usec for NEW_CYCLE to clear */ |
| 51 | if (ioread32(addr + IIC_CSR2) & NEW_CYCLE) | 50 | if (ioread32(addr + IIC_CSR2) & NEW_CYCLE) |
| 52 | return -EIO; /* error: NEW_CYCLE not cleared */ | 51 | return -EIO; /* error: NEW_CYCLE not cleared */ |
| @@ -77,7 +76,6 @@ static int write_i2c_reg(void __iomem *addr, u8 index, u8 data) · 24 unmodified lines | |||
| 77 | u32 tmp = index; | 76 | u32 tmp = index; |
| 78 | 77 | ||
| 79 | iowrite32((tmp << 17) | IIC_WRITE | data, addr + IIC_CSR2); | 78 | iowrite32((tmp << 17) | IIC_WRITE | data, addr + IIC_CSR2); |
| 80 | mmiowb(); | ||
| 81 | udelay(65); /* wait at least 63 usec for NEW_CYCLE to clear */ | 79 | udelay(65); /* wait at least 63 usec for NEW_CYCLE to clear */ |
| 82 | if (ioread32(addr + IIC_CSR2) & NEW_CYCLE) | 80 | if (ioread32(addr + IIC_CSR2) & NEW_CYCLE) |
| 83 | return -EIO; /* error: NEW_CYCLE not cleared */ | 81 | return -EIO; /* error: NEW_CYCLE not cleared */ |
| @@ -104,7 +102,6 @@ static void write_i2c_reg_nowait(void __iomem *addr, u8 index, u8 data) · 20 unmodified lines | |||
| 104 | u32 tmp = index; | 102 | u32 tmp = index; |
| 105 | 103 | ||
| 106 | iowrite32((tmp << 17) | IIC_WRITE | data, addr + IIC_CSR2); | 104 | iowrite32((tmp << 17) | IIC_WRITE | data, addr + IIC_CSR2); |
| 107 | mmiowb(); | ||
| 108 | } | 105 | } |
| 109 | 106 | ||
| 110 | /** | 107 | /** |
| @@ -264,7 +261,6 @@ static irqreturn_t dt3155_irq_handler_even(int irq, void *dev_id) · 153 unmodified lines | |||
| 264 | FLD_DN_ODD | FLD_DN_EVEN | | 261 | FLD_DN_ODD | FLD_DN_EVEN | |
| 265 | CAP_CONT_EVEN | CAP_CONT_ODD, | 262 | CAP_CONT_EVEN | CAP_CONT_ODD, |
| 266 | ipd->regs + CSR1); | 263 | ipd->regs + CSR1); |
| 267 | mmiowb(); | ||
| 268 | } | 264 | } |
| 269 | 265 | ||
| 270 | spin_lock(&ipd->lock); | 266 | spin_lock(&ipd->lock); |
| @@ -282,7 +278,6 @@ static irqreturn_t dt3155_irq_handler_even(int irq, void *dev_id) · 11 unmodified lines | |||
| 282 | iowrite32(dma_addr + ipd->width, ipd->regs + ODD_DMA_START); | 278 | iowrite32(dma_addr + ipd->width, ipd->regs + ODD_DMA_START); |
| 283 | iowrite32(ipd->width, ipd->regs + EVEN_DMA_STRIDE); | 279 | iowrite32(ipd->width, ipd->regs + EVEN_DMA_STRIDE); |
| 284 | iowrite32(ipd->width, ipd->regs + ODD_DMA_STRIDE); | 280 | iowrite32(ipd->width, ipd->regs + ODD_DMA_STRIDE); |
| 285 | mmiowb(); | ||
| 286 | } | 281 | } |
| 287 | 282 | ||
| 288 | /* enable interrupts, clear all irq flags */ | 283 | /* enable interrupts, clear all irq flags */ |
| @@ -437,12 +432,10 @@ static int dt3155_init_board(struct dt3155_priv *pd) · 148 unmodified lines | |||
| 437 | /* resetting the adapter */ | 432 | /* resetting the adapter */ |
| 438 | iowrite32(ADDR_ERR_ODD | ADDR_ERR_EVEN | FLD_CRPT_ODD | FLD_CRPT_EVEN | | 433 | iowrite32(ADDR_ERR_ODD | ADDR_ERR_EVEN | FLD_CRPT_ODD | FLD_CRPT_EVEN | |
| 439 | FLD_DN_ODD | FLD_DN_EVEN, pd->regs + CSR1); | 434 | FLD_DN_ODD | FLD_DN_EVEN, pd->regs + CSR1); |
| 440 | mmiowb(); | ||
| 441 | msleep(20); | 435 | msleep(20); |
| 442 | 436 | ||
| 443 | /* initializing adapter registers */ | 437 | /* initializing adapter registers */ |
| 444 | iowrite32(FIFO_EN | SRST, pd->regs + CSR1); | 438 | iowrite32(FIFO_EN | SRST, pd->regs + CSR1); |
| 445 | mmiowb(); | ||
| 446 | iowrite32(0xEEEEEE01, pd->regs + EVEN_PIXEL_FMT); | 439 | iowrite32(0xEEEEEE01, pd->regs + EVEN_PIXEL_FMT); |
| 447 | iowrite32(0xEEEEEE01, pd->regs + ODD_PIXEL_FMT); | 440 | iowrite32(0xEEEEEE01, pd->regs + ODD_PIXEL_FMT); |
| 448 | iowrite32(0x00000020, pd->regs + FIFO_TRIGER); | 441 | iowrite32(0x00000020, pd->regs + FIFO_TRIGER); |
| @@ -454,7 +447,6 @@ static int dt3155_init_board(struct dt3155_priv *pd) · 5 unmodified lines | |||
| 454 | iowrite32(0, pd->regs + MASK_LENGTH); | 447 | iowrite32(0, pd->regs + MASK_LENGTH); |
| 455 | iowrite32(0x0005007C, pd->regs + FIFO_FLAG_CNT); | 448 | iowrite32(0x0005007C, pd->regs + FIFO_FLAG_CNT); |
| 456 | iowrite32(0x01010101, pd->regs + IIC_CLK_DUR); | 449 | iowrite32(0x01010101, pd->regs + IIC_CLK_DUR); |
| 457 | mmiowb(); | ||
| 458 | 450 | ||
| 459 | /* verifying that we have a DT3155 board (not just a SAA7116 chip) */ | 451 | /* verifying that we have a DT3155 board (not just a SAA7116 chip) */ |
| 460 | read_i2c_reg(pd->regs, DT_ID, &tmp); | 452 | read_i2c_reg(pd->regs, DT_ID, &tmp); |
| @@ -644,7 +644,6 @@ static int jmb38x_ms_reset(struct jmb38x_ms_host *host) · 643 unmodified lines | |||
| 644 | writel(HOST_CONTROL_RESET_REQ | HOST_CONTROL_CLOCK_EN | 644 | writel(HOST_CONTROL_RESET_REQ | HOST_CONTROL_CLOCK_EN |
| 645 | | readl(host->addr + HOST_CONTROL), | 645 | | readl(host->addr + HOST_CONTROL), |
| 646 | host->addr + HOST_CONTROL); | 646 | host->addr + HOST_CONTROL); |
| 647 | mmiowb(); | ||
| 648 | 647 | ||
| 649 | for (cnt = 0; cnt < 20; ++cnt) { | 648 | for (cnt = 0; cnt < 20; ++cnt) { |
| 650 | if (!(HOST_CONTROL_RESET_REQ | 649 | if (!(HOST_CONTROL_RESET_REQ |
| @@ -659,7 +658,6 @@ reset_next: · 8 unmodified lines | |||
| 659 | writel(HOST_CONTROL_RESET | HOST_CONTROL_CLOCK_EN | 658 | writel(HOST_CONTROL_RESET | HOST_CONTROL_CLOCK_EN |
| 660 | | readl(host->addr + HOST_CONTROL), | 659 | | readl(host->addr + HOST_CONTROL), |
| 661 | host->addr + HOST_CONTROL); | 660 | host->addr + HOST_CONTROL); |
| 662 | mmiowb(); | ||
| 663 | 661 | ||
| 664 | for (cnt = 0; cnt < 20; ++cnt) { | 662 | for (cnt = 0; cnt < 20; ++cnt) { |
| 665 | if (!(HOST_CONTROL_RESET | 663 | if (!(HOST_CONTROL_RESET |
| @@ -672,7 +670,6 @@ reset_next: · 6 unmodified lines | |||
| 672 | return -EIO; | 670 | return -EIO; |
| 673 | 671 | ||
| 674 | reset_ok: | 672 | reset_ok: |
| 675 | mmiowb(); | ||
| 676 | writel(INT_STATUS_ALL, host->addr + INT_SIGNAL_ENABLE); | 673 | writel(INT_STATUS_ALL, host->addr + INT_SIGNAL_ENABLE); |
| 677 | writel(INT_STATUS_ALL, host->addr + INT_STATUS_ENABLE); | 674 | writel(INT_STATUS_ALL, host->addr + INT_STATUS_ENABLE); |
| 678 | return 0; | 675 | return 0; |
| @@ -1009,7 +1006,6 @@ static void jmb38x_ms_remove(struct pci_dev *dev) · 330 unmodified lines | |||
| 1009 | tasklet_kill(&host->notify); | 1006 | tasklet_kill(&host->notify); |
| 1010 | writel(0, host->addr + INT_SIGNAL_ENABLE); | 1007 | writel(0, host->addr + INT_SIGNAL_ENABLE); |
| 1011 | writel(0, host->addr + INT_STATUS_ENABLE); | 1008 | writel(0, host->addr + INT_STATUS_ENABLE); |
| 1012 | mmiowb(); | ||
| 1013 | dev_dbg(&jm->pdev->dev, "interrupts off\n"); | 1009 | dev_dbg(&jm->pdev->dev, "interrupts off\n"); |
| 1014 | spin_lock_irqsave(&host->lock, flags); | 1010 | spin_lock_irqsave(&host->lock, flags); |
| 1015 | if (host->req) { | 1011 | if (host->req) { |
| @@ -156,7 +156,6 @@ ioc4_clock_calibrate(struct ioc4_driver_data *idd) · 155 unmodified lines | |||
| 156 | 156 | ||
| 157 | /* Reset to power-on state */ | 157 | /* Reset to power-on state */ |
| 158 | writel(0, &idd->idd_misc_regs->int_out.raw); | 158 | writel(0, &idd->idd_misc_regs->int_out.raw); |
| 159 | mmiowb(); | ||
| 160 | 159 | ||
| 161 | /* Set up square wave */ | 160 | /* Set up square wave */ |
| 162 | int_out.raw = 0; | 161 | int_out.raw = 0; |
| @@ -164,7 +163,6 @@ ioc4_clock_calibrate(struct ioc4_driver_data *idd) · 1 unmodified line | |||
| 164 | int_out.fields.mode = IOC4_INT_OUT_MODE_TOGGLE; | 163 | int_out.fields.mode = IOC4_INT_OUT_MODE_TOGGLE; |
| 165 | int_out.fields.diag = 0; | 164 | int_out.fields.diag = 0; |
| 166 | writel(int_out.raw, &idd->idd_misc_regs->int_out.raw); | 165 | writel(int_out.raw, &idd->idd_misc_regs->int_out.raw); |
| 167 | mmiowb(); | ||
| 168 | 166 | ||
| 169 | /* Check square wave period averaged over some number of cycles */ | 167 | /* Check square wave period averaged over some number of cycles */ |
| 170 | start = ktime_get_ns(); | 168 | start = ktime_get_ns(); |
| @@ -350,9 +350,6 @@ static void mei_me_hw_reset_release(struct mei_device *dev) · 349 unmodified lines | |||
| 350 | hcsr |= H_IG; | 350 | hcsr |= H_IG; |
| 351 | hcsr &= ~H_RST; | 351 | hcsr &= ~H_RST; |
| 352 | mei_hcsr_set(dev, hcsr); | 352 | mei_hcsr_set(dev, hcsr); |
| 353 | |||
| 354 | /* complete this write before we set host ready on another CPU */ | ||
| 355 | mmiowb(); | ||
| 356 | } | 353 | } |
| 357 | 354 | ||
| 358 | /** | 355 | /** |
| @@ -403,7 +403,6 @@ static void tifm_7xx1_remove(struct pci_dev *dev) · 402 unmodified lines | |||
| 403 | fm->eject = tifm_7xx1_dummy_eject; | 403 | fm->eject = tifm_7xx1_dummy_eject; |
| 404 | fm->has_ms_pif = tifm_7xx1_dummy_has_ms_pif; | 404 | fm->has_ms_pif = tifm_7xx1_dummy_has_ms_pif; |
| 405 | writel(TIFM_IRQ_SETALL, fm->addr + FM_CLEAR_INTERRUPT_ENABLE); | 405 | writel(TIFM_IRQ_SETALL, fm->addr + FM_CLEAR_INTERRUPT_ENABLE); |
| 406 | mmiowb(); | ||
| 407 | free_irq(dev->irq, fm); | 406 | free_irq(dev->irq, fm); |
| 408 | 407 | ||
| 409 | tifm_remove_adapter(fm); | 408 | tifm_remove_adapter(fm); |
| @@ -967,7 +967,6 @@ static void alcor_timeout_timer(struct work_struct *work) · 966 unmodified lines | |||
| 967 | alcor_request_complete(host, 0); | 967 | alcor_request_complete(host, 0); |
| 968 | } | 968 | } |
| 969 | 969 | ||
| 970 | mmiowb(); | ||
| 971 | mutex_unlock(&host->cmd_mutex); | 970 | mutex_unlock(&host->cmd_mutex); |
| 972 | } | 971 | } |
| 973 | 972 | ||
| @@ -1807,7 +1807,6 @@ void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) · 1806 unmodified lines | |||
| 1807 | sdhci_send_command(host, mrq->cmd); | 1807 | sdhci_send_command(host, mrq->cmd); |
| 1808 | } | 1808 | } |
| 1809 | 1809 | ||
| 1810 | mmiowb(); | ||
| 1811 | spin_unlock_irqrestore(&host->lock, flags); | 1810 | spin_unlock_irqrestore(&host->lock, flags); |
| 1812 | } | 1811 | } |
| 1813 | EXPORT_SYMBOL_GPL(sdhci_request); | 1812 | EXPORT_SYMBOL_GPL(sdhci_request); |
| @@ -2010,8 +2009,6 @@ void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) · 196 unmodified lines | |||
| 2010 | */ | 2009 | */ |
| 2011 | if (host->quirks & SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS) | 2010 | if (host->quirks & SDHCI_QUIRK_RESET_CMD_DATA_ON_IOS) |
| 2012 | sdhci_do_reset(host, SDHCI_RESET_CMD | SDHCI_RESET_DATA); | 2011 | sdhci_do_reset(host, SDHCI_RESET_CMD | SDHCI_RESET_DATA); |
| 2013 | |||
| 2014 | mmiowb(); | ||
| 2015 | } | 2012 | } |
| 2016 | EXPORT_SYMBOL_GPL(sdhci_set_ios); | 2013 | EXPORT_SYMBOL_GPL(sdhci_set_ios); |
| 2017 | 2014 | ||
| @@ -2105,7 +2102,6 @@ static void sdhci_enable_sdio_irq_nolock(struct sdhci_host *host, int enable) · 87 unmodified lines | |||
| 2105 | 2102 | ||
| 2106 | sdhci_writel(host, host->ier, SDHCI_INT_ENABLE); | 2103 | sdhci_writel(host, host->ier, SDHCI_INT_ENABLE); |
| 2107 | sdhci_writel(host, host->ier, SDHCI_SIGNAL_ENABLE); | 2104 | sdhci_writel(host, host->ier, SDHCI_SIGNAL_ENABLE); |
| 2108 | mmiowb(); | ||
| 2109 | } | 2105 | } |
| 2110 | } | 2106 | } |
| 2111 | 2107 | ||
| @@ -2353,7 +2349,6 @@ void sdhci_send_tuning(struct sdhci_host *host, u32 opcode) · 241 unmodified lines | |||
| 2353 | 2349 | ||
| 2354 | host->tuning_done = 0; | 2350 | host->tuning_done = 0; |
| 2355 | 2351 | ||
| 2356 | mmiowb(); | ||
| 2357 | spin_unlock_irqrestore(&host->lock, flags); | 2352 | spin_unlock_irqrestore(&host->lock, flags); |
| 2358 | 2353 | ||
| 2359 | /* Wait for Buffer Read Ready interrupt */ | 2354 | /* Wait for Buffer Read Ready interrupt */ |
| @@ -2705,7 +2700,6 @@ static bool sdhci_request_done(struct sdhci_host *host) · 345 unmodified lines | |||
| 2705 | 2700 | ||
| 2706 | host->mrqs_done[i] = NULL; | 2701 | host->mrqs_done[i] = NULL; |
| 2707 | 2702 | ||
| 2708 | mmiowb(); | ||
| 2709 | spin_unlock_irqrestore(&host->lock, flags); | 2703 | spin_unlock_irqrestore(&host->lock, flags); |
| 2710 | 2704 | ||
| 2711 | mmc_request_done(host->mmc, mrq); | 2705 | mmc_request_done(host->mmc, mrq); |
| @@ -2739,7 +2733,6 @@ static void sdhci_timeout_timer(struct timer_list *t) · 27 unmodified lines | |||
| 2739 | sdhci_finish_mrq(host, host->cmd->mrq); | 2733 | sdhci_finish_mrq(host, host->cmd->mrq); |
| 2740 | } | 2734 | } |
| 2741 | 2735 | ||
| 2742 | mmiowb(); | ||
| 2743 | spin_unlock_irqrestore(&host->lock, flags); | 2736 | spin_unlock_irqrestore(&host->lock, flags); |
| 2744 | } | 2737 | } |
| 2745 | 2738 | ||
| @@ -2770,7 +2763,6 @@ static void sdhci_timeout_data_timer(struct timer_list *t) · 24 unmodified lines | |||
| 2770 | } | 2763 | } |
| 2771 | } | 2764 | } |
| 2772 | 2765 | ||
| 2773 | mmiowb(); | ||
| 2774 | spin_unlock_irqrestore(&host->lock, flags); | 2766 | spin_unlock_irqrestore(&host->lock, flags); |
| 2775 | } | 2767 | } |
| 2776 | 2768 | ||
| @@ -3251,7 +3243,6 @@ int sdhci_resume_host(struct sdhci_host *host) · 474 unmodified lines | |||
| 3251 | mmc->ops->set_ios(mmc, &mmc->ios); | 3243 | mmc->ops->set_ios(mmc, &mmc->ios); |
| 3252 | } else { | 3244 | } else { |
| 3253 | sdhci_init(host, (host->mmc->pm_flags & MMC_PM_KEEP_POWER)); | 3245 | sdhci_init(host, (host->mmc->pm_flags & MMC_PM_KEEP_POWER)); |
| 3254 | mmiowb(); | ||
| 3255 | } | 3246 | } |
| 3256 | 3247 | ||
| 3257 | if (host->irq_wake_enabled) { | 3248 | if (host->irq_wake_enabled) { |
| @@ -3391,7 +3382,6 @@ void sdhci_cqe_enable(struct mmc_host *mmc) · 133 unmodified lines | |||
| 3391 | mmc_hostname(mmc), host->ier, | 3382 | mmc_hostname(mmc), host->ier, |
| 3392 | sdhci_readl(host, SDHCI_INT_STATUS)); | 3383 | sdhci_readl(host, SDHCI_INT_STATUS)); |
| 3393 | 3384 | ||
| 3394 | mmiowb(); | ||
| 3395 | spin_unlock_irqrestore(&host->lock, flags); | 3385 | spin_unlock_irqrestore(&host->lock, flags); |
| 3396 | } | 3386 | } |
| 3397 | EXPORT_SYMBOL_GPL(sdhci_cqe_enable); | 3387 | EXPORT_SYMBOL_GPL(sdhci_cqe_enable); |
| @@ -3416,7 +3406,6 @@ void sdhci_cqe_disable(struct mmc_host *mmc, bool recovery) · 18 unmodified lines | |||
| 3416 | mmc_hostname(mmc), host->ier, | 3406 | mmc_hostname(mmc), host->ier, |
| 3417 | sdhci_readl(host, SDHCI_INT_STATUS)); | 3407 | sdhci_readl(host, SDHCI_INT_STATUS)); |
| 3418 | 3408 | ||
| 3419 | mmiowb(); | ||
| 3420 | spin_unlock_irqrestore(&host->lock, flags); | 3409 | spin_unlock_irqrestore(&host->lock, flags); |
| 3421 | } | 3410 | } |
| 3422 | EXPORT_SYMBOL_GPL(sdhci_cqe_disable); | 3411 | EXPORT_SYMBOL_GPL(sdhci_cqe_disable); |
| @@ -4255,8 +4244,6 @@ int __sdhci_add_host(struct sdhci_host *host) · 832 unmodified lines | |||
| 4255 | goto unirq; | 4244 | goto unirq; |
| 4256 | } | 4245 | } |
| 4257 | 4246 | ||
| 4258 | mmiowb(); | ||
| 4259 | |||
| 4260 | ret = mmc_add_host(mmc); | 4247 | ret = mmc_add_host(mmc); |
| 4261 | if (ret) | 4248 | if (ret) |
| 4262 | goto unled; | 4249 | goto unled; |
| @@ -889,7 +889,6 @@ static int tifm_sd_initialize_host(struct tifm_sd *host) · 888 unmodified lines | |||
| 889 | struct tifm_dev *sock = host->dev; | 889 | struct tifm_dev *sock = host->dev; |
| 890 | 890 | ||
| 891 | writel(0, sock->addr + SOCK_MMCSD_INT_ENABLE); | 891 | writel(0, sock->addr + SOCK_MMCSD_INT_ENABLE); |
| 892 | mmiowb(); | ||
| 893 | host->clk_div = 61; | 892 | host->clk_div = 61; |
| 894 | host->clk_freq = 20000000; | 893 | host->clk_freq = 20000000; |
| 895 | writel(TIFM_MMCSD_RESET, sock->addr + SOCK_MMCSD_SYSTEM_CONTROL); | 894 | writel(TIFM_MMCSD_RESET, sock->addr + SOCK_MMCSD_SYSTEM_CONTROL); |
| @@ -940,7 +939,6 @@ static int tifm_sd_initialize_host(struct tifm_sd *host) · 44 unmodified lines | |||
| 940 | writel(TIFM_MMCSD_CERR | TIFM_MMCSD_BRS | TIFM_MMCSD_EOC | 939 | writel(TIFM_MMCSD_CERR | TIFM_MMCSD_BRS | TIFM_MMCSD_EOC |
| 941 | | TIFM_MMCSD_ERRMASK, | 940 | | TIFM_MMCSD_ERRMASK, |
| 942 | sock->addr + SOCK_MMCSD_INT_ENABLE); | 941 | sock->addr + SOCK_MMCSD_INT_ENABLE); |
| 943 | mmiowb(); | ||
| 944 | 942 | ||
| 945 | return 0; | 943 | return 0; |
| 946 | } | 944 | } |
| @@ -1005,7 +1003,6 @@ static void tifm_sd_remove(struct tifm_dev *sock) · 58 unmodified lines | |||
| 1005 | spin_lock_irqsave(&sock->lock, flags); | 1003 | spin_lock_irqsave(&sock->lock, flags); |
| 1006 | host->eject = 1; | 1004 | host->eject = 1; |
| 1007 | writel(0, sock->addr + SOCK_MMCSD_INT_ENABLE); | 1005 | writel(0, sock->addr + SOCK_MMCSD_INT_ENABLE); |
| 1008 | mmiowb(); | ||
| 1009 | spin_unlock_irqrestore(&sock->lock, flags); | 1006 | spin_unlock_irqrestore(&sock->lock, flags); |
| 1010 | 1007 | ||
| 1011 | tasklet_kill(&host->finish_tasklet); | 1008 | tasklet_kill(&host->finish_tasklet); |
| @@ -686,7 +686,6 @@ static void via_sdc_request(struct mmc_host *mmc, struct mmc_request *mrq) · 685 unmodified lines | |||
| 686 | via_sdc_send_command(host, mrq->cmd); | 686 | via_sdc_send_command(host, mrq->cmd); |
| 687 | } | 687 | } |
| 688 | 688 | ||
| 689 | mmiowb(); | ||
| 690 | spin_unlock_irqrestore(&host->lock, flags); | 689 | spin_unlock_irqrestore(&host->lock, flags); |
| 691 | } | 690 | } |
| 692 | 691 | ||
| @@ -711,7 +710,6 @@ static void via_sdc_set_power(struct via_crdr_mmc_host *host, · 18 unmodified lines | |||
| 711 | gatt &= ~VIA_CRDR_PCICLKGATT_PAD_PWRON; | 710 | gatt &= ~VIA_CRDR_PCICLKGATT_PAD_PWRON; |
| 712 | writeb(gatt, host->pcictrl_mmiobase + VIA_CRDR_PCICLKGATT); | 711 | writeb(gatt, host->pcictrl_mmiobase + VIA_CRDR_PCICLKGATT); |
| 713 | 712 | ||
| 714 | mmiowb(); | ||
| 715 | spin_unlock_irqrestore(&host->lock, flags); | 713 | spin_unlock_irqrestore(&host->lock, flags); |
| 716 | 714 | ||
| 717 | via_pwron_sleep(host); | 715 | via_pwron_sleep(host); |
| @@ -770,7 +768,6 @@ static void via_sdc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) · 52 unmodified lines | |||
| 770 | if (readb(addrbase + VIA_CRDR_PCISDCCLK) != clock) | 768 | if (readb(addrbase + VIA_CRDR_PCISDCCLK) != clock) |
| 771 | writeb(clock, addrbase + VIA_CRDR_PCISDCCLK); | 769 | writeb(clock, addrbase + VIA_CRDR_PCISDCCLK); |
| 772 | 770 | ||
| 773 | mmiowb(); | ||
| 774 | spin_unlock_irqrestore(&host->lock, flags); | 771 | spin_unlock_irqrestore(&host->lock, flags); |
| 775 | 772 | ||
| 776 | if (ios->power_mode != MMC_POWER_OFF) | 773 | if (ios->power_mode != MMC_POWER_OFF) |
| @@ -830,7 +827,6 @@ static void via_reset_pcictrl(struct via_crdr_mmc_host *host) · 53 unmodified lines | |||
| 830 | via_restore_pcictrlreg(host); | 827 | via_restore_pcictrlreg(host); |
| 831 | via_restore_sdcreg(host); | 828 | via_restore_sdcreg(host); |
| 832 | 829 | ||
| 833 | mmiowb(); | ||
| 834 | spin_unlock_irqrestore(&host->lock, flags); | 830 | spin_unlock_irqrestore(&host->lock, flags); |
| 835 | } | 831 | } |
| 836 | 832 | ||
| @@ -925,7 +921,6 @@ static irqreturn_t via_sdc_isr(int irq, void *dev_id) · 88 unmodified lines | |||
| 925 | 921 | ||
| 926 | result = IRQ_HANDLED; | 922 | result = IRQ_HANDLED; |
| 927 | 923 | ||
| 928 | mmiowb(); | ||
| 929 | out: | 924 | out: |
| 930 | spin_unlock(&sdhost->lock); | 925 | spin_unlock(&sdhost->lock); |
| 931 | 926 | ||
| @@ -960,7 +955,6 @@ static void via_sdc_timeout(struct timer_list *t) · 28 unmodified lines | |||
| 960 | } | 955 | } |
| 961 | } | 956 | } |
| 962 | 957 | ||
| 963 | mmiowb(); | ||
| 964 | spin_unlock_irqrestore(&sdhost->lock, flags); | 958 | spin_unlock_irqrestore(&sdhost->lock, flags); |
| 965 | } | 959 | } |
| 966 | 960 | ||
| @@ -1012,7 +1006,6 @@ static void via_sdc_card_detect(struct work_struct *work) · 45 unmodified lines | |||
| 1012 | tasklet_schedule(&host->finish_tasklet); | 1006 | tasklet_schedule(&host->finish_tasklet); |
| 1013 | } | 1007 | } |
| 1014 | 1008 | ||
| 1015 | mmiowb(); | ||
| 1016 | spin_unlock_irqrestore(&host->lock, flags); | 1009 | spin_unlock_irqrestore(&host->lock, flags); |
| 1017 | 1010 | ||
| 1018 | via_reset_pcictrl(host); | 1011 | via_reset_pcictrl(host); |
| @@ -1020,7 +1013,6 @@ static void via_sdc_card_detect(struct work_struct *work) · 1 unmodified line | |||
| 1020 | spin_lock_irqsave(&host->lock, flags); | 1013 | spin_lock_irqsave(&host->lock, flags); |
| 1021 | } | 1014 | } |
| 1022 | 1015 | ||
| 1023 | mmiowb(); | ||
| 1024 | spin_unlock_irqrestore(&host->lock, flags); | 1016 | spin_unlock_irqrestore(&host->lock, flags); |
| 1025 | 1017 | ||
| 1026 | via_print_pcictrl(host); | 1018 | via_print_pcictrl(host); |
| @@ -1188,7 +1180,6 @@ static void via_sd_remove(struct pci_dev *pcidev) · 161 unmodified lines | |||
| 1188 | 1180 | ||
| 1189 | /* Disable generating further interrupts */ | 1181 | /* Disable generating further interrupts */ |
| 1190 | writeb(0x0, sdhost->pcictrl_mmiobase + VIA_CRDR_PCIINTCTRL); | 1182 | writeb(0x0, sdhost->pcictrl_mmiobase + VIA_CRDR_PCIINTCTRL); |
| 1191 | mmiowb(); | ||
| 1192 | 1183 | ||
| 1193 | if (sdhost->mrq) { | 1184 | if (sdhost->mrq) { |
| 1194 | pr_err("%s: Controller removed during " | 1185 | pr_err("%s: Controller removed during " |
| @@ -1197,7 +1188,6 @@ static void via_sd_remove(struct pci_dev *pcidev) · 2 unmodified lines | |||
| 1197 | /* make sure all DMA is stopped */ | 1188 | /* make sure all DMA is stopped */ |
| 1198 | writel(VIA_CRDR_DMACTRL_SFTRST, | 1189 | writel(VIA_CRDR_DMACTRL_SFTRST, |
| 1199 | sdhost->ddma_mmiobase + VIA_CRDR_DMACTRL); | 1190 | sdhost->ddma_mmiobase + VIA_CRDR_DMACTRL); |
| 1200 | mmiowb(); | ||
| 1201 | sdhost->mrq->cmd->error = -ENOMEDIUM; | 1191 | sdhost->mrq->cmd->error = -ENOMEDIUM; |
| 1202 | if (sdhost->mrq->stop) | 1192 | if (sdhost->mrq->stop) |
| 1203 | sdhost->mrq->stop->error = -ENOMEDIUM; | 1193 | sdhost->mrq->stop->error = -ENOMEDIUM; |
| @@ -45,7 +45,6 @@ static inline void r852_write_reg(struct r852_device *dev, · 44 unmodified lines | |||
| 45 | int address, uint8_t value) | 45 | int address, uint8_t value) |
| 46 | { | 46 | { |
| 47 | writeb(value, dev->mmio + address); | 47 | writeb(value, dev->mmio + address); |
| 48 | mmiowb(); | ||
| 49 | } | 48 | } |
| 50 | 49 | ||
| 51 | 50 | ||
| @@ -61,7 +60,6 @@ static inline void r852_write_reg_dword(struct r852_device *dev, · 9 unmodified lines | |||
| 61 | int address, uint32_t value) | 60 | int address, uint32_t value) |
| 62 | { | 61 | { |
| 63 | writel(cpu_to_le32(value), dev->mmio + address); | 62 | writel(cpu_to_le32(value), dev->mmio + address); |
| 64 | mmiowb(); | ||
| 65 | } | 63 | } |
| 66 | 64 | ||
| 67 | /* returns pointer to our private structure */ | 65 | /* returns pointer to our private structure */ |
| @@ -159,7 +159,6 @@ static void txx9ndfmc_cmd_ctrl(struct nand_chip *chip, int cmd, · 158 unmodified lines | |||
| 159 | if ((ctrl & NAND_CTRL_CHANGE) && cmd == NAND_CMD_NONE) | 159 | if ((ctrl & NAND_CTRL_CHANGE) && cmd == NAND_CMD_NONE) |
| 160 | txx9ndfmc_write(dev, 0, TXX9_NDFDTR); | 160 | txx9ndfmc_write(dev, 0, TXX9_NDFDTR); |
| 161 | } | 161 | } |
| 162 | mmiowb(); | ||
| 163 | } | 162 | } |
| 164 | 163 | ||
| 165 | static int txx9ndfmc_dev_ready(struct nand_chip *chip) | 164 | static int txx9ndfmc_dev_ready(struct nand_chip *chip) |
| @@ -613,7 +613,6 @@ static irqreturn_t greth_interrupt(int irq, void *dev_id) · 612 unmodified lines | |||
| 613 | napi_schedule(&greth->napi); | 613 | napi_schedule(&greth->napi); |
| 614 | } | 614 | } |
| 615 | 615 | ||
| 616 | mmiowb(); | ||
| 617 | spin_unlock(&greth->devlock); | 616 | spin_unlock(&greth->devlock); |
| 618 | 617 | ||
| 619 | return retval; | 618 | return retval; |
| @@ -345,8 +345,6 @@ static void slic_set_rx_mode(struct net_device *dev) · 344 unmodified lines | |||
| 345 | if (sdev->promisc != set_promisc) { | 345 | if (sdev->promisc != set_promisc) { |
| 346 | sdev->promisc = set_promisc; | 346 | sdev->promisc = set_promisc; |
| 347 | slic_configure_rcv(sdev); | 347 | slic_configure_rcv(sdev); |
| 348 | /* make sure writes to receiver cant leak out of the lock */ | ||
| 349 | mmiowb(); | ||
| 350 | } | 348 | } |
| 351 | spin_unlock_bh(&sdev->link_lock); | 349 | spin_unlock_bh(&sdev->link_lock); |
| 352 | } | 350 | } |
| @@ -1461,8 +1459,6 @@ static netdev_tx_t slic_xmit(struct sk_buff *skb, struct net_device *dev) · 1108 unmodified lines | |||
| 1461 | 1459 | ||
| 1462 | if (slic_get_free_tx_descs(txq) < SLIC_MAX_REQ_TX_DESCS) | 1460 | if (slic_get_free_tx_descs(txq) < SLIC_MAX_REQ_TX_DESCS) |
| 1463 | netif_stop_queue(dev); | 1461 | netif_stop_queue(dev); |
| 1464 | /* make sure writes to io-memory cant leak out of tx queue lock */ | ||
| 1465 | mmiowb(); | ||
| 1466 | 1462 | ||
| 1467 | return NETDEV_TX_OK; | 1463 | return NETDEV_TX_OK; |
| 1468 | drop_skb: | 1464 | drop_skb: |
| @@ -2016,7 +2016,6 @@ void ena_com_aenq_intr_handler(struct ena_com_dev *dev, void *data) · 2015 unmodified lines | |||
| 2016 | mb(); | 2016 | mb(); |
| 2017 | writel_relaxed((u32)aenq->head, | 2017 | writel_relaxed((u32)aenq->head, |
| 2018 | dev->reg_bar + ENA_REGS_AENQ_HEAD_DB_OFF); | 2018 | dev->reg_bar + ENA_REGS_AENQ_HEAD_DB_OFF); |
| 2019 | mmiowb(); | ||
| 2020 | } | 2019 | } |
| 2021 | 2020 | ||
| 2022 | int ena_com_dev_reset(struct ena_com_dev *ena_dev, | 2021 | int ena_com_dev_reset(struct ena_com_dev *ena_dev, |
| @@ -2439,7 +2439,6 @@ static netdev_tx_t atl1_xmit_frame(struct sk_buff *skb, · 2438 unmodified lines | |||
| 2439 | atl1_tx_map(adapter, skb, ptpd); | 2439 | atl1_tx_map(adapter, skb, ptpd); |
| 2440 | atl1_tx_queue(adapter, count, ptpd); | 2440 | atl1_tx_queue(adapter, count, ptpd); |
| 2441 | atl1_update_mailbox(adapter); | 2441 | atl1_update_mailbox(adapter); |
| 2442 | mmiowb(); | ||
| 2443 | return NETDEV_TX_OK; | 2442 | return NETDEV_TX_OK; |
| 2444 | } | 2443 | } |
| 2445 | 2444 | ||
| @@ -908,7 +908,6 @@ static netdev_tx_t atl2_xmit_frame(struct sk_buff *skb, · 907 unmodified lines | |||
| 908 | ATL2_WRITE_REGW(&adapter->hw, REG_MB_TXD_WR_IDX, | 908 | ATL2_WRITE_REGW(&adapter->hw, REG_MB_TXD_WR_IDX, |
| 909 | (adapter->txd_write_ptr >> 2)); | 909 | (adapter->txd_write_ptr >> 2)); |
| 910 | 910 | ||
| 911 | mmiowb(); | ||
| 912 | dev_consume_skb_any(skb); | 911 | dev_consume_skb_any(skb); |
| 913 | return NETDEV_TX_OK; | 912 | return NETDEV_TX_OK; |
| 914 | } | 913 | } |
| @@ -3305,8 +3305,6 @@ next_rx: · 3304 unmodified lines | |||
| 3305 | 3305 | ||
| 3306 | BNX2_WR(bp, rxr->rx_bseq_addr, rxr->rx_prod_bseq); | 3306 | BNX2_WR(bp, rxr->rx_bseq_addr, rxr->rx_prod_bseq); |
| 3307 | 3307 | ||
| 3308 | mmiowb(); | ||
| 3309 | |||
| 3310 | return rx_pkt; | 3308 | return rx_pkt; |
| 3311 | 3309 | ||
| 3312 | } | 3310 | } |
| @@ -6723,8 +6721,6 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev) · 3410 unmodified lines | |||
| 6723 | BNX2_WR16(bp, txr->tx_bidx_addr, prod); | 6721 | BNX2_WR16(bp, txr->tx_bidx_addr, prod); |
| 6724 | BNX2_WR(bp, txr->tx_bseq_addr, txr->tx_prod_bseq); | 6722 | BNX2_WR(bp, txr->tx_bseq_addr, txr->tx_prod_bseq); |
| 6725 | 6723 | ||
| 6726 | mmiowb(); | ||
| 6727 | |||
| 6728 | txr->tx_prod = prod; | 6724 | txr->tx_prod = prod; |
| 6729 | 6725 | ||
| 6730 | if (unlikely(bnx2_tx_avail(bp, txr) <= MAX_SKB_FRAGS)) { | 6726 | if (unlikely(bnx2_tx_avail(bp, txr) <= MAX_SKB_FRAGS)) { |
| @@ -4166,8 +4166,6 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev) · 4165 unmodified lines | |||
| 4166 | 4166 | ||
| 4167 | DOORBELL_RELAXED(bp, txdata->cid, txdata->tx_db.raw); | 4167 | DOORBELL_RELAXED(bp, txdata->cid, txdata->tx_db.raw); |
| 4168 | 4168 | ||
| 4169 | mmiowb(); | ||
| 4170 | |||
| 4171 | txdata->tx_bd_prod += nbd; | 4169 | txdata->tx_bd_prod += nbd; |
| 4172 | 4170 | ||
| 4173 | if (unlikely(bnx2x_tx_avail(bp, txdata) < MAX_DESC_PER_TX_PKT)) { | 4171 | if (unlikely(bnx2x_tx_avail(bp, txdata) < MAX_DESC_PER_TX_PKT)) { |
| @@ -527,8 +527,6 @@ static inline void bnx2x_update_rx_prod(struct bnx2x *bp, · 526 unmodified lines | |||
| 527 | REG_WR_RELAXED(bp, fp->ustorm_rx_prods_offset + i * 4, | 527 | REG_WR_RELAXED(bp, fp->ustorm_rx_prods_offset + i * 4, |
| 528 | ((u32 *)&rx_prods)[i]); | 528 | ((u32 *)&rx_prods)[i]); |
| 529 | 529 | ||
| 530 | mmiowb(); | ||
| 531 | |||
| 532 | DP(NETIF_MSG_RX_STATUS, | 530 | DP(NETIF_MSG_RX_STATUS, |
| 533 | "queue[%d]: wrote bd_prod %u cqe_prod %u sge_prod %u\n", | 531 | "queue[%d]: wrote bd_prod %u cqe_prod %u sge_prod %u\n", |
| 534 | fp->index, bd_prod, rx_comp_prod, rx_sge_prod); | 532 | fp->index, bd_prod, rx_comp_prod, rx_sge_prod); |
| @@ -653,7 +651,6 @@ static inline void bnx2x_igu_ack_sb_gen(struct bnx2x *bp, u8 igu_sb_id, · 118 unmodified lines | |||
| 653 | REG_WR(bp, igu_addr, cmd_data.sb_id_and_flags); | 651 | REG_WR(bp, igu_addr, cmd_data.sb_id_and_flags); |
| 654 | 652 | ||
| 655 | /* Make sure that ACK is written */ | 653 | /* Make sure that ACK is written */ |
| 656 | mmiowb(); | ||
| 657 | barrier(); | 654 | barrier(); |
| 658 | } | 655 | } |
| 659 | 656 | ||
| @@ -674,7 +671,6 @@ static inline void bnx2x_hc_ack_sb(struct bnx2x *bp, u8 sb_id, · 14 unmodified lines | |||
| 674 | REG_WR(bp, hc_addr, (*(u32 *)&igu_ack)); | 671 | REG_WR(bp, hc_addr, (*(u32 *)&igu_ack)); |
| 675 | 672 | ||
| 676 | /* Make sure that ACK is written */ | 673 | /* Make sure that ACK is written */ |
| 677 | mmiowb(); | ||
| 678 | barrier(); | 674 | barrier(); |
| 679 | } | 675 | } |
| 680 | 676 | ||
| @@ -2623,7 +2623,6 @@ static int bnx2x_run_loopback(struct bnx2x *bp, int loopback_mode) · 2622 unmodified lines | |||
| 2623 | wmb(); | 2623 | wmb(); |
| 2624 | DOORBELL_RELAXED(bp, txdata->cid, txdata->tx_db.raw); | 2624 | DOORBELL_RELAXED(bp, txdata->cid, txdata->tx_db.raw); |
| 2625 | 2625 | ||
| 2626 | mmiowb(); | ||
| 2627 | barrier(); | 2626 | barrier(); |
| 2628 | 2627 | ||
| 2629 | num_pkts++; | 2628 | num_pkts++; |
| @@ -869,9 +869,6 @@ static void bnx2x_hc_int_disable(struct bnx2x *bp) · 868 unmodified lines | |||
| 869 | "write %x to HC %d (addr 0x%x)\n", | 869 | "write %x to HC %d (addr 0x%x)\n", |
| 870 | val, port, addr); | 870 | val, port, addr); |
| 871 | 871 | ||
| 872 | /* flush all outstanding writes */ | ||
| 873 | mmiowb(); | ||
| 874 | |||
| 875 | REG_WR(bp, addr, val); | 872 | REG_WR(bp, addr, val); |
| 876 | if (REG_RD(bp, addr) != val) | 873 | if (REG_RD(bp, addr) != val) |
| 877 | BNX2X_ERR("BUG! Proper val not read from IGU!\n"); | 874 | BNX2X_ERR("BUG! Proper val not read from IGU!\n"); |
| @@ -887,9 +884,6 @@ static void bnx2x_igu_int_disable(struct bnx2x *bp) · 9 unmodified lines | |||
| 887 | 884 | ||
| 888 | DP(NETIF_MSG_IFDOWN, "write %x to IGU\n", val); | 885 | DP(NETIF_MSG_IFDOWN, "write %x to IGU\n", val); |
| 889 | 886 | ||
| 890 | /* flush all outstanding writes */ | ||
| 891 | mmiowb(); | ||
| 892 | |||
| 893 | REG_WR(bp, IGU_REG_PF_CONFIGURATION, val); | 887 | REG_WR(bp, IGU_REG_PF_CONFIGURATION, val); |
| 894 | if (REG_RD(bp, IGU_REG_PF_CONFIGURATION) != val) | 888 | if (REG_RD(bp, IGU_REG_PF_CONFIGURATION) != val) |
| 895 | BNX2X_ERR("BUG! Proper val not read from IGU!\n"); | 889 | BNX2X_ERR("BUG! Proper val not read from IGU!\n"); |
| @@ -1595,7 +1589,6 @@ static void bnx2x_hc_int_enable(struct bnx2x *bp) · 699 unmodified lines | |||
| 1595 | /* | 1589 | /* |
| 1596 | * Ensure that HC_CONFIG is written before leading/trailing edge config | 1590 | * Ensure that HC_CONFIG is written before leading/trailing edge config |
| 1597 | */ | 1591 | */ |
| 1598 | mmiowb(); | ||
| 1599 | barrier(); | 1592 | barrier(); |
| 1600 | 1593 | ||
| 1601 | if (!CHIP_IS_E1(bp)) { | 1594 | if (!CHIP_IS_E1(bp)) { |
| @@ -1611,9 +1604,6 @@ static void bnx2x_hc_int_enable(struct bnx2x *bp) · 9 unmodified lines | |||
| 1611 | REG_WR(bp, HC_REG_TRAILING_EDGE_0 + port*8, val); | 1604 | REG_WR(bp, HC_REG_TRAILING_EDGE_0 + port*8, val); |
| 1612 | REG_WR(bp, HC_REG_LEADING_EDGE_0 + port*8, val); | 1605 | REG_WR(bp, HC_REG_LEADING_EDGE_0 + port*8, val); |
| 1613 | } | 1606 | } |
| 1614 | |||
| 1615 | /* Make sure that interrupts are indeed enabled from here on */ | ||
| 1616 | mmiowb(); | ||
| 1617 | } | 1607 | } |
| 1618 | 1608 | ||
| 1619 | static void bnx2x_igu_int_enable(struct bnx2x *bp) | 1609 | static void bnx2x_igu_int_enable(struct bnx2x *bp) |
| @@ -1674,9 +1664,6 @@ static void bnx2x_igu_int_enable(struct bnx2x *bp) · 54 unmodified lines | |||
| 1674 | 1664 | ||
| 1675 | REG_WR(bp, IGU_REG_TRAILING_EDGE_LATCH, val); | 1665 | REG_WR(bp, IGU_REG_TRAILING_EDGE_LATCH, val); |
| 1676 | REG_WR(bp, IGU_REG_LEADING_EDGE_LATCH, val); | 1666 | REG_WR(bp, IGU_REG_LEADING_EDGE_LATCH, val); |
| 1677 | |||
| 1678 | /* Make sure that interrupts are indeed enabled from here on */ | ||
| 1679 | mmiowb(); | ||
| 1680 | } | 1667 | } |
| 1681 | 1668 | ||
| 1682 | void bnx2x_int_enable(struct bnx2x *bp) | 1669 | void bnx2x_int_enable(struct bnx2x *bp) |
| @@ -3833,7 +3820,6 @@ static void bnx2x_sp_prod_update(struct bnx2x *bp) · 2150 unmodified lines | |||
| 3833 | 3820 | ||
| 3834 | REG_WR16_RELAXED(bp, BAR_XSTRORM_INTMEM + XSTORM_SPQ_PROD_OFFSET(func), | 3821 | REG_WR16_RELAXED(bp, BAR_XSTRORM_INTMEM + XSTORM_SPQ_PROD_OFFSET(func), |
| 3835 | bp->spq_prod_idx); | 3822 | bp->spq_prod_idx); |
| 3836 | mmiowb(); | ||
| 3837 | } | 3823 | } |
| 3838 | 3824 | ||
| 3839 | /** | 3825 | /** |
| @@ -5244,7 +5230,6 @@ static void bnx2x_update_eq_prod(struct bnx2x *bp, u16 prod) · 1404 unmodified lines | |||
| 5244 | { | 5230 | { |
| 5245 | /* No memory barriers */ | 5231 | /* No memory barriers */ |
| 5246 | storm_memset_eq_prod(bp, prod, BP_FUNC(bp)); | 5232 | storm_memset_eq_prod(bp, prod, BP_FUNC(bp)); |
| 5247 | mmiowb(); | ||
| 5248 | } | 5233 | } |
| 5249 | 5234 | ||
| 5250 | static int bnx2x_cnic_handle_cfc_del(struct bnx2x *bp, u32 cid, | 5235 | static int bnx2x_cnic_handle_cfc_del(struct bnx2x *bp, u32 cid, |
| @@ -6513,7 +6498,6 @@ void bnx2x_nic_init_cnic(struct bnx2x *bp) · 1262 unmodified lines | |||
| 6513 | 6498 | ||
| 6514 | /* flush all */ | 6499 | /* flush all */ |
| 6515 | mb(); | 6500 | mb(); |
| 6516 | mmiowb(); | ||
| 6517 | } | 6501 | } |
| 6518 | 6502 | ||
| 6519 | void bnx2x_pre_irq_nic_init(struct bnx2x *bp) | 6503 | void bnx2x_pre_irq_nic_init(struct bnx2x *bp) |
| @@ -6553,7 +6537,6 @@ void bnx2x_post_irq_nic_init(struct bnx2x *bp, u32 load_code) · 33 unmodified lines | |||
| 6553 | 6537 | ||
| 6554 | /* flush all before enabling interrupts */ | 6538 | /* flush all before enabling interrupts */ |
| 6555 | mb(); | 6539 | mb(); |
| 6556 | mmiowb(); | ||
| 6557 | 6540 | ||
| 6558 | bnx2x_int_enable(bp); | 6541 | bnx2x_int_enable(bp); |
| 6559 | 6542 | ||
| @@ -7775,12 +7758,10 @@ void bnx2x_igu_clear_sb_gen(struct bnx2x *bp, u8 func, u8 idu_sb_id, bool is_pf) · 1215 unmodified lines | |||
| 7775 | DP(NETIF_MSG_HW, "write 0x%08x to IGU(via GRC) addr 0x%x\n", | 7758 | DP(NETIF_MSG_HW, "write 0x%08x to IGU(via GRC) addr 0x%x\n", |
| 7776 | data, igu_addr_data); | 7759 | data, igu_addr_data); |
| 7777 | REG_WR(bp, igu_addr_data, data); | 7760 | REG_WR(bp, igu_addr_data, data); |
| 7778 | mmiowb(); | ||
| 7779 | barrier(); | 7761 | barrier(); |
| 7780 | DP(NETIF_MSG_HW, "write 0x%08x to IGU(via GRC) addr 0x%x\n", | 7762 | DP(NETIF_MSG_HW, "write 0x%08x to IGU(via GRC) addr 0x%x\n", |
| 7781 | ctl, igu_addr_ctl); | 7763 | ctl, igu_addr_ctl); |
| 7782 | REG_WR(bp, igu_addr_ctl, ctl); | 7764 | REG_WR(bp, igu_addr_ctl, ctl); |
| 7783 | mmiowb(); | ||
| 7784 | barrier(); | 7765 | barrier(); |
| 7785 | 7766 | ||
| 7786 | /* wait for clean up to finish */ | 7767 | /* wait for clean up to finish */ |
| @@ -9550,7 +9531,6 @@ static void bnx2x_set_234_gates(struct bnx2x *bp, bool close) · 1763 unmodified lines | |||
| 9550 | 9531 | ||
| 9551 | DP(NETIF_MSG_HW | NETIF_MSG_IFUP, "%s gates #2, #3 and #4\n", | 9532 | DP(NETIF_MSG_HW | NETIF_MSG_IFUP, "%s gates #2, #3 and #4\n", |
| 9552 | close ? "closing" : "opening"); | 9533 | close ? "closing" : "opening"); |
| 9553 | mmiowb(); | ||
| 9554 | } | 9534 | } |
| 9555 | 9535 | ||
| 9556 | #define SHARED_MF_CLP_MAGIC 0x80000000 /* `magic' bit */ | 9536 | #define SHARED_MF_CLP_MAGIC 0x80000000 /* `magic' bit */ |
| @@ -9674,7 +9654,6 @@ static void bnx2x_pxp_prep(struct bnx2x *bp) · 117 unmodified lines | |||
| 9674 | if (!CHIP_IS_E1(bp)) { | 9654 | if (!CHIP_IS_E1(bp)) { |
| 9675 | REG_WR(bp, PXP2_REG_RD_START_INIT, 0); | 9655 | REG_WR(bp, PXP2_REG_RD_START_INIT, 0); |
| 9676 | REG_WR(bp, PXP2_REG_RQ_RBC_DONE, 0); | 9656 | REG_WR(bp, PXP2_REG_RQ_RBC_DONE, 0); |
| 9677 | mmiowb(); | ||
| 9678 | } | 9657 | } |
| 9679 | } | 9658 | } |
| 9680 | 9659 | ||
| @@ -9774,16 +9753,13 @@ static void bnx2x_process_kill_chip_reset(struct bnx2x *bp, bool global) · 93 unmodified lines | |||
| 9774 | reset_mask1 & (~not_reset_mask1)); | 9753 | reset_mask1 & (~not_reset_mask1)); |
| 9775 | 9754 | ||
| 9776 | barrier(); | 9755 | barrier(); |
| 9777 | mmiowb(); | ||
| 9778 | 9756 | ||
| 9779 | REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET, | 9757 | REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET, |
| 9780 | reset_mask2 & (~stay_reset2)); | 9758 | reset_mask2 & (~stay_reset2)); |
| 9781 | 9759 | ||
| 9782 | barrier(); | 9760 | barrier(); |
| 9783 | mmiowb(); | ||
| 9784 | 9761 | ||
| 9785 | REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET, reset_mask1); | 9762 | REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_1_SET, reset_mask1); |
| 9786 | mmiowb(); | ||
| 9787 | } | 9763 | } |
| 9788 | 9764 | ||
| 9789 | /** | 9765 | /** |
| @@ -9867,9 +9843,6 @@ static int bnx2x_process_kill(struct bnx2x *bp, bool global) · 77 unmodified lines | |||
| 9867 | REG_WR(bp, MISC_REG_UNPREPARED, 0); | 9843 | REG_WR(bp, MISC_REG_UNPREPARED, 0); |
| 9868 | barrier(); | 9844 | barrier(); |
| 9869 | 9845 | ||
| 9870 | /* Make sure all is written to the chip before the reset */ | ||
| 9871 | mmiowb(); | ||
| 9872 | |||
| 9873 | /* Wait for 1ms to empty GLUE and PCI-E core queues, | 9846 | /* Wait for 1ms to empty GLUE and PCI-E core queues, |
| 9874 | * PSWHST, GRC and PSWRD Tetris buffer. | 9847 | * PSWHST, GRC and PSWRD Tetris buffer. |
| 9875 | */ | 9848 | */ |
| @@ -14828,7 +14801,6 @@ static int bnx2x_drv_ctl(struct net_device *dev, struct drv_ctl_info *ctl) · 4952 unmodified lines | |||
| 14828 | if (rc) | 14801 | if (rc) |
| 14829 | break; | 14802 | break; |
| 14830 | 14803 | ||
| 14831 | mmiowb(); | ||
| 14832 | barrier(); | 14804 | barrier(); |
| 14833 | 14805 | ||
| 14834 | /* Start accepting on iSCSI L2 ring */ | 14806 | /* Start accepting on iSCSI L2 ring */ |
| @@ -14863,7 +14835,6 @@ static int bnx2x_drv_ctl(struct net_device *dev, struct drv_ctl_info *ctl) · 28 unmodified lines | |||
| 14863 | if (!bnx2x_wait_sp_comp(bp, sp_bits)) | 14835 | if (!bnx2x_wait_sp_comp(bp, sp_bits)) |
| 14864 | BNX2X_ERR("rx_mode completion timed out!\n"); | 14836 | BNX2X_ERR("rx_mode completion timed out!\n"); |
| 14865 | 14837 | ||
| 14866 | mmiowb(); | ||
| 14867 | barrier(); | 14838 | barrier(); |
| 14868 | 14839 | ||
| 14869 | /* Unset iSCSI L2 MAC */ | 14840 | /* Unset iSCSI L2 MAC */ |
| @@ -5039,7 +5039,6 @@ static inline int bnx2x_q_init(struct bnx2x *bp, · 5038 unmodified lines | |||
| 5039 | /* As no ramrod is sent, complete the command immediately */ | 5039 | /* As no ramrod is sent, complete the command immediately */ |
| 5040 | o->complete_cmd(bp, o, BNX2X_Q_CMD_INIT); | 5040 | o->complete_cmd(bp, o, BNX2X_Q_CMD_INIT); |
| 5041 | 5041 | ||
| 5042 | mmiowb(); | ||
| 5043 | smp_mb(); | 5042 | smp_mb(); |
| 5044 | 5043 | ||
| 5045 | return 0; | 5044 | return 0; |
| @@ -100,13 +100,11 @@ static void bnx2x_vf_igu_ack_sb(struct bnx2x *bp, struct bnx2x_virtf *vf, · 99 unmodified lines | |||
| 100 | DP(NETIF_MSG_HW, "write 0x%08x to IGU(via GRC) addr 0x%x\n", | 100 | DP(NETIF_MSG_HW, "write 0x%08x to IGU(via GRC) addr 0x%x\n", |
| 101 | cmd_data.sb_id_and_flags, igu_addr_data); | 101 | cmd_data.sb_id_and_flags, igu_addr_data); |
| 102 | REG_WR(bp, igu_addr_data, cmd_data.sb_id_and_flags); | 102 | REG_WR(bp, igu_addr_data, cmd_data.sb_id_and_flags); |
| 103 | mmiowb(); | ||
| 104 | barrier(); | 103 | barrier(); |
| 105 | 104 | ||
| 106 | DP(NETIF_MSG_HW, "write 0x%08x to IGU(via GRC) addr 0x%x\n", | 105 | DP(NETIF_MSG_HW, "write 0x%08x to IGU(via GRC) addr 0x%x\n", |
| 107 | ctl, igu_addr_ctl); | 106 | ctl, igu_addr_ctl); |
| 108 | REG_WR(bp, igu_addr_ctl, ctl); | 107 | REG_WR(bp, igu_addr_ctl, ctl); |
| 109 | mmiowb(); | ||
| 110 | barrier(); | 108 | barrier(); |
| 111 | } | 109 | } |
| 112 | 110 | ||
| @@ -172,8 +172,6 @@ static int bnx2x_send_msg2pf(struct bnx2x *bp, u8 *done, dma_addr_t msg_mapping) · 171 unmodified lines | |||
| 172 | /* Trigger the PF FW */ | 172 | /* Trigger the PF FW */ |
| 173 | writeb_relaxed(1, &zone_data->trigger.vf_pf_channel.addr_valid); | 173 | writeb_relaxed(1, &zone_data->trigger.vf_pf_channel.addr_valid); |
| 174 | 174 | ||
| 175 | mmiowb(); | ||
| 176 | |||
| 177 | /* Wait for PF to complete */ | 175 | /* Wait for PF to complete */ |
| 178 | while ((tout >= 0) && (!*done)) { | 176 | while ((tout >= 0) && (!*done)) { |
| 179 | msleep(interval); | 177 | msleep(interval); |
| @@ -1179,7 +1177,6 @@ static void bnx2x_vf_mbx_resp_send_msg(struct bnx2x *bp, · 999 unmodified lines | |||
| 1179 | 1177 | ||
| 1180 | /* ack the FW */ | 1178 | /* ack the FW */ |
| 1181 | storm_memset_vf_mbx_ack(bp, vf->abs_vfid); | 1179 | storm_memset_vf_mbx_ack(bp, vf->abs_vfid); |
| 1182 | mmiowb(); | ||
| 1183 | 1180 | ||
| 1184 | /* copy the response header including status-done field, | 1181 | /* copy the response header including status-done field, |
| 1185 | * must be last dmae, must be after FW is acked | 1182 | * must be last dmae, must be after FW is acked |
| @@ -2174,7 +2171,6 @@ static void bnx2x_vf_mbx_request(struct bnx2x *bp, struct bnx2x_virtf *vf, · 988 unmodified lines | |||
| 2174 | */ | 2171 | */ |
| 2175 | storm_memset_vf_mbx_ack(bp, vf->abs_vfid); | 2172 | storm_memset_vf_mbx_ack(bp, vf->abs_vfid); |
| 2176 | /* Firmware ack should be written before unlocking channel */ | 2173 | /* Firmware ack should be written before unlocking channel */ |
| 2177 | mmiowb(); | ||
| 2178 | bnx2x_unlock_vf_pf_channel(bp, vf, mbx->first_tlv.tl.type); | 2174 | bnx2x_unlock_vf_pf_channel(bp, vf, mbx->first_tlv.tl.type); |
| 2179 | } | 2175 | } |
| 2180 | } | 2176 | } |
| @@ -556,8 +556,6 @@ normal_tx: · 555 unmodified lines | |||
| 556 | 556 | ||
| 557 | tx_done: | 557 | tx_done: |
| 558 | 558 | ||
| 559 | mmiowb(); | ||
| 560 | |||
| 561 | if (unlikely(bnxt_tx_avail(bp, txr) <= MAX_SKB_FRAGS + 1)) { | 559 | if (unlikely(bnxt_tx_avail(bp, txr) <= MAX_SKB_FRAGS + 1)) { |
| 562 | if (skb->xmit_more && !tx_buf->is_push) | 560 | if (skb->xmit_more && !tx_buf->is_push) |
| 563 | bnxt_db_write(bp, &txr->tx_db, prod); | 561 | bnxt_db_write(bp, &txr->tx_db, prod); |
| @@ -2123,7 +2121,6 @@ static int bnxt_poll(struct napi_struct *napi, int budget) · 1559 unmodified lines | |||
| 2123 | &dim_sample); | 2121 | &dim_sample); |
| 2124 | net_dim(&cpr->dim, dim_sample); | 2122 | net_dim(&cpr->dim, dim_sample); |
| 2125 | } | 2123 | } |
| 2126 | mmiowb(); | ||
| 2127 | return work_done; | 2124 | return work_done; |
| 2128 | } | 2125 | } |
| 2129 | 2126 | ||
| @@ -1073,7 +1073,6 @@ static void tg3_int_reenable(struct tg3_napi *tnapi) · 1072 unmodified lines | |||
| 1073 | struct tg3 *tp = tnapi->tp; | 1073 | struct tg3 *tp = tnapi->tp; |
| 1074 | 1074 | ||
| 1075 | tw32_mailbox(tnapi->int_mbox, tnapi->last_tag << 24); | 1075 | tw32_mailbox(tnapi->int_mbox, tnapi->last_tag << 24); |
| 1076 | mmiowb(); | ||
| 1077 | 1076 | ||
| 1078 | /* When doing tagged status, this work check is unnecessary. | 1077 | /* When doing tagged status, this work check is unnecessary. |
| 1079 | * The last_tag we write above tells the chip which piece of | 1078 | * The last_tag we write above tells the chip which piece of |
| @@ -6999,7 +6998,6 @@ next_pkt_nopost: · 5919 unmodified lines | |||
| 6999 | tw32_rx_mbox(TG3_RX_JMB_PROD_IDX_REG, | 6998 | tw32_rx_mbox(TG3_RX_JMB_PROD_IDX_REG, |
| 7000 | tpr->rx_jmb_prod_idx); | 6999 | tpr->rx_jmb_prod_idx); |
| 7001 | } | 7000 | } |
| 7002 | mmiowb(); | ||
| 7003 | } else if (work_mask) { | 7001 | } else if (work_mask) { |
| 7004 | /* rx_std_buffers[] and rx_jmb_buffers[] entries must be | 7002 | /* rx_std_buffers[] and rx_jmb_buffers[] entries must be |
| 7005 | * updated before the producer indices can be updated. | 7003 | * updated before the producer indices can be updated. |
| @@ -7210,8 +7208,6 @@ static int tg3_poll_work(struct tg3_napi *tnapi, int work_done, int budget) · 204 unmodified lines | |||
| 7210 | tw32_rx_mbox(TG3_RX_JMB_PROD_IDX_REG, | 7208 | tw32_rx_mbox(TG3_RX_JMB_PROD_IDX_REG, |
| 7211 | dpr->rx_jmb_prod_idx); | 7209 | dpr->rx_jmb_prod_idx); |
| 7212 | 7210 | ||
| 7213 | mmiowb(); | ||
| 7214 | |||
| 7215 | if (err) | 7211 | if (err) |
| 7216 | tw32_f(HOSTCC_MODE, tp->coal_now); | 7212 | tw32_f(HOSTCC_MODE, tp->coal_now); |
| 7217 | } | 7213 | } |
| @@ -7278,7 +7274,6 @@ static int tg3_poll_msix(struct napi_struct *napi, int budget) · 60 unmodified lines | |||
| 7278 | HOSTCC_MODE_ENABLE | | 7274 | HOSTCC_MODE_ENABLE | |
| 7279 | tnapi->coal_now); | 7275 | tnapi->coal_now); |
| 7280 | } | 7276 | } |
| 7281 | mmiowb(); | ||
| 7282 | break; | 7277 | break; |
| 7283 | } | 7278 | } |
| 7284 | } | 7279 | } |
| @@ -8159,7 +8154,6 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) · 874 unmodified lines | |||
| 8159 | if (!skb->xmit_more || netif_xmit_stopped(txq)) { | 8154 | if (!skb->xmit_more || netif_xmit_stopped(txq)) { |
| 8160 | /* Packets are ready, update Tx producer idx on card. */ | 8155 | /* Packets are ready, update Tx producer idx on card. */ |
| 8161 | tw32_tx_mbox(tnapi->prodmbox, entry); | 8156 | tw32_tx_mbox(tnapi->prodmbox, entry); |
| 8162 | mmiowb(); | ||
| 8163 | } | 8157 | } |
| 8164 | 8158 | ||
| 8165 | return NETDEV_TX_OK; | 8159 | return NETDEV_TX_OK; |
| @@ -38,9 +38,6 @@ int lio_cn6xxx_soft_reset(struct octeon_device *oct) · 37 unmodified lines | |||
| 38 | lio_pci_readq(oct, CN6XXX_CIU_SOFT_RST); | 38 | lio_pci_readq(oct, CN6XXX_CIU_SOFT_RST); |
| 39 | lio_pci_writeq(oct, 1, CN6XXX_CIU_SOFT_RST); | 39 | lio_pci_writeq(oct, 1, CN6XXX_CIU_SOFT_RST); |
| 40 | 40 | ||
| 41 | /* make sure that the reset is written before starting timer */ | ||
| 42 | mmiowb(); | ||
| 43 | |||
| 44 | /* Wait for 10ms as Octeon resets. */ | 41 | /* Wait for 10ms as Octeon resets. */ |
| 45 | mdelay(100); | 42 | mdelay(100); |
| 46 | 43 | ||
| @@ -487,9 +484,6 @@ void lio_cn6xxx_disable_interrupt(struct octeon_device *oct, · 440 unmodified lines | |||
| 487 | 484 | ||
| 488 | /* Disable Interrupts */ | 485 | /* Disable Interrupts */ |
| 489 | writeq(0, cn6xxx->intr_enb_reg64); | 486 | writeq(0, cn6xxx->intr_enb_reg64); |
| 490 | |||
| 491 | /* make sure interrupts are really disabled */ | ||
| 492 | mmiowb(); | ||
| 493 | } | 487 | } |
| 494 | 488 | ||
| 495 | static void lio_cn6xxx_get_pcie_qlmport(struct octeon_device *oct) | 489 | static void lio_cn6xxx_get_pcie_qlmport(struct octeon_device *oct) |
| @@ -555,10 +549,6 @@ static int lio_cn6xxx_process_droq_intr_regs(struct octeon_device *oct) · 59 unmodified lines | |||
| 555 | value &= ~(1 << oq_no); | 549 | value &= ~(1 << oq_no); |
| 556 | octeon_write_csr(oct, reg, value); | 550 | octeon_write_csr(oct, reg, value); |
| 557 | 551 | ||
| 558 | /* Ensure that the enable register is written. | ||
| 559 | */ | ||
| 560 | mmiowb(); | ||
| 561 | |||
| 562 | spin_unlock(&cn6xxx->lock_for_droq_int_enb_reg); | 552 | spin_unlock(&cn6xxx->lock_for_droq_int_enb_reg); |
| 563 | } | 553 | } |
| 564 | } | 554 | } |
| @@ -1449,7 +1449,6 @@ void lio_enable_irq(struct octeon_droq *droq, struct octeon_instr_queue *iq) · 1448 unmodified lines | |||
| 1449 | iq->pkt_in_done -= iq->pkts_processed; | 1449 | iq->pkt_in_done -= iq->pkts_processed; |
| 1450 | iq->pkts_processed = 0; | 1450 | iq->pkts_processed = 0; |
| 1451 | /* this write needs to be flushed before we release the lock */ | 1451 | /* this write needs to be flushed before we release the lock */ |
| 1452 | mmiowb(); | ||
| 1453 | spin_unlock_bh(&iq->lock); | 1452 | spin_unlock_bh(&iq->lock); |
| 1454 | oct = iq->oct_dev; | 1453 | oct = iq->oct_dev; |
| 1455 | } | 1454 | } |
| @@ -513,8 +513,6 @@ int octeon_retry_droq_refill(struct octeon_droq *droq) · 512 unmodified lines | |||
| 513 | */ | 513 | */ |
| 514 | wmb(); | 514 | wmb(); |
| 515 | writel(desc_refilled, droq->pkts_credit_reg); | 515 | writel(desc_refilled, droq->pkts_credit_reg); |
| 516 | /* make sure mmio write completes */ | ||
| 517 | mmiowb(); | ||
| 518 | 516 | ||
| 519 | if (pkts_credit + desc_refilled >= CN23XX_SLI_DEF_BP) | 517 | if (pkts_credit + desc_refilled >= CN23XX_SLI_DEF_BP) |
| 520 | reschedule = 0; | 518 | reschedule = 0; |
| @@ -712,8 +710,6 @@ octeon_droq_fast_process_packets(struct octeon_device *oct, · 191 unmodified lines | |||
| 712 | */ | 710 | */ |
| 713 | wmb(); | 711 | wmb(); |
| 714 | writel(desc_refilled, droq->pkts_credit_reg); | 712 | writel(desc_refilled, droq->pkts_credit_reg); |
| 715 | /* make sure mmio write completes */ | ||
| 716 | mmiowb(); | ||
| 717 | } | 713 | } |
| 718 | } | 714 | } |
| 719 | } /* for (each packet)... */ | 715 | } /* for (each packet)... */ |
| @@ -278,7 +278,6 @@ ring_doorbell(struct octeon_device *oct, struct octeon_instr_queue *iq) · 277 unmodified lines | |||
| 278 | if (atomic_read(&oct->status) == OCT_DEV_RUNNING) { | 278 | if (atomic_read(&oct->status) == OCT_DEV_RUNNING) { |
| 279 | writel(iq->fill_cnt, iq->doorbell_reg); | 279 | writel(iq->fill_cnt, iq->doorbell_reg); |
| 280 | /* make sure doorbell write goes through */ | 280 | /* make sure doorbell write goes through */ |
| 281 | mmiowb(); | ||
| 282 | iq->fill_cnt = 0; | 281 | iq->fill_cnt = 0; |
| 283 | iq->last_db_time = jiffies; | 282 | iq->last_db_time = jiffies; |
| 284 | return; | 283 | return; |
| @@ -3270,11 +3270,6 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb, · 3269 unmodified lines | |||
| 3270 | if (!skb->xmit_more || | 3270 | if (!skb->xmit_more || |
| 3271 | netif_xmit_stopped(netdev_get_tx_queue(netdev, 0))) { | 3271 | netif_xmit_stopped(netdev_get_tx_queue(netdev, 0))) { |
| 3272 | writel(tx_ring->next_to_use, hw->hw_addr + tx_ring->tdt); | 3272 | writel(tx_ring->next_to_use, hw->hw_addr + tx_ring->tdt); |
| 3273 | /* we need this if more than one processor can write to | ||
| 3274 | * our tail at a time, it synchronizes IO on IA64/Altix | ||
| 3275 | * systems | ||
| 3276 | */ | ||
| 3277 | mmiowb(); | ||
| 3278 | } | 3273 | } |
| 3279 | } else { | 3274 | } else { |
| 3280 | dev_kfree_skb_any(skb); | 3275 | dev_kfree_skb_any(skb); |
| @@ -3816,7 +3816,6 @@ static void e1000_flush_tx_ring(struct e1000_adapter *adapter) · 3815 unmodified lines | |||
| 3816 | if (tx_ring->next_to_use == tx_ring->count) | 3816 | if (tx_ring->next_to_use == tx_ring->count) |
| 3817 | tx_ring->next_to_use = 0; | 3817 | tx_ring->next_to_use = 0; |
| 3818 | ew32(TDT(0), tx_ring->next_to_use); | 3818 | ew32(TDT(0), tx_ring->next_to_use); |
| 3819 | mmiowb(); | ||
| 3820 | usleep_range(200, 250); | 3819 | usleep_range(200, 250); |
| 3821 | } | 3820 | } |
| 3822 | 3821 | ||
| @@ -5904,12 +5903,6 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb, · 2081 unmodified lines | |||
| 5904 | tx_ring->next_to_use); | 5903 | tx_ring->next_to_use); |
| 5905 | else | 5904 | else |
| 5906 | writel(tx_ring->next_to_use, tx_ring->tail); | 5905 | writel(tx_ring->next_to_use, tx_ring->tail); |
| 5907 | |||
| 5908 | /* we need this if more than one processor can write | ||
| 5909 | * to our tail at a time, it synchronizes IO on | ||
| 5910 | *IA64/Altix systems | ||
| 5911 | */ | ||
| 5912 | mmiowb(); | ||
| 5913 | } | 5906 | } |
| 5914 | } else { | 5907 | } else { |
| 5915 | dev_kfree_skb_any(skb); | 5908 | dev_kfree_skb_any(skb); |
| @@ -321,8 +321,6 @@ static void fm10k_mask_aer_comp_abort(struct pci_dev *pdev) · 320 unmodified lines | |||
| 321 | pci_read_config_dword(pdev, pos + PCI_ERR_UNCOR_MASK, &err_mask); | 321 | pci_read_config_dword(pdev, pos + PCI_ERR_UNCOR_MASK, &err_mask); |
| 322 | err_mask |= PCI_ERR_UNC_COMP_ABORT; | 322 | err_mask |= PCI_ERR_UNC_COMP_ABORT; |
| 323 | pci_write_config_dword(pdev, pos + PCI_ERR_UNCOR_MASK, err_mask); | 323 | pci_write_config_dword(pdev, pos + PCI_ERR_UNCOR_MASK, err_mask); |
| 324 | |||
| 325 | mmiowb(); | ||
| 326 | } | 324 | } |
| 327 | 325 | ||
| 328 | int fm10k_iov_resume(struct pci_dev *pdev) | 326 | int fm10k_iov_resume(struct pci_dev *pdev) |
| @@ -1037,11 +1037,6 @@ static void fm10k_tx_map(struct fm10k_ring *tx_ring, · 1036 unmodified lines | |||
| 1037 | /* notify HW of packet */ | 1037 | /* notify HW of packet */ |
| 1038 | if (netif_xmit_stopped(txring_txq(tx_ring)) || !skb->xmit_more) { | 1038 | if (netif_xmit_stopped(txring_txq(tx_ring)) || !skb->xmit_more) { |
| 1039 | writel(i, tx_ring->tail); | 1039 | writel(i, tx_ring->tail); |
| 1040 | |||
| 1041 | /* we need this if more than one processor can write to our tail | ||
| 1042 | * at a time, it synchronizes IO on IA64/Altix systems | ||
| 1043 | */ | ||
| 1044 | mmiowb(); | ||
| 1045 | } | 1040 | } |
| 1046 | 1041 | ||
| 1047 | return; | 1042 | return; |
| @@ -3471,11 +3471,6 @@ static inline int i40e_tx_map(struct i40e_ring *tx_ring, struct sk_buff *skb, · 3470 unmodified lines | |||
| 3471 | /* notify HW of packet */ | 3471 | /* notify HW of packet */ |
| 3472 | if (netif_xmit_stopped(txring_txq(tx_ring)) || !skb->xmit_more) { | 3472 | if (netif_xmit_stopped(txring_txq(tx_ring)) || !skb->xmit_more) { |
| 3473 | writel(i, tx_ring->tail); | 3473 | writel(i, tx_ring->tail); |
| 3474 | |||
| 3475 | /* we need this if more than one processor can write to our tail | ||
| 3476 | * at a time, it synchronizes IO on IA64/Altix systems | ||
| 3477 | */ | ||
| 3478 | mmiowb(); | ||
| 3479 | } | 3474 | } |
| 3480 | 3475 | ||
| 3481 | return 0; | 3476 | return 0; |
| @@ -2360,11 +2360,6 @@ static inline void iavf_tx_map(struct iavf_ring *tx_ring, struct sk_buff *skb, · 2359 unmodified lines | |||
| 2360 | /* notify HW of packet */ | 2360 | /* notify HW of packet */ |
| 2361 | if (netif_xmit_stopped(txring_txq(tx_ring)) || !skb->xmit_more) { | 2361 | if (netif_xmit_stopped(txring_txq(tx_ring)) || !skb->xmit_more) { |
| 2362 | writel(i, tx_ring->tail); | 2362 | writel(i, tx_ring->tail); |
| 2363 | |||
| 2364 | /* we need this if more than one processor can write to our tail | ||
| 2365 | * at a time, it synchronizes IO on IA64/Altix systems | ||
| 2366 | */ | ||
| 2367 | mmiowb(); | ||
| 2368 | } | 2363 | } |
| 2369 | 2364 | ||
| 2370 | return; | 2365 | return; |
| @@ -1356,11 +1356,6 @@ ice_tx_map(struct ice_ring *tx_ring, struct ice_tx_buf *first, · 1355 unmodified lines | |||
| 1356 | /* notify HW of packet */ | 1356 | /* notify HW of packet */ |
| 1357 | if (netif_xmit_stopped(txring_txq(tx_ring)) || !skb->xmit_more) { | 1357 | if (netif_xmit_stopped(txring_txq(tx_ring)) || !skb->xmit_more) { |
| 1358 | writel(i, tx_ring->tail); | 1358 | writel(i, tx_ring->tail); |
| 1359 | |||
| 1360 | /* we need this if more than one processor can write to our tail | ||
| 1361 | * at a time, it synchronizes IO on IA64/Altix systems | ||
| 1362 | */ | ||
| 1363 | mmiowb(); | ||
| 1364 | } | 1359 | } |
| 1365 | 1360 | ||
| 1366 | return; | 1361 | return; |
| @@ -6028,11 +6028,6 @@ static int igb_tx_map(struct igb_ring *tx_ring, · 6027 unmodified lines | |||
| 6028 | 6028 | ||
| 6029 | if (netif_xmit_stopped(txring_txq(tx_ring)) || !skb->xmit_more) { | 6029 | if (netif_xmit_stopped(txring_txq(tx_ring)) || !skb->xmit_more) { |
| 6030 | writel(i, tx_ring->tail); | 6030 | writel(i, tx_ring->tail); |
| 6031 | |||
| 6032 | /* we need this if more than one processor can write to our tail | ||
| 6033 | * at a time, it synchronizes IO on IA64/Altix systems | ||
| 6034 | */ | ||
| 6035 | mmiowb(); | ||
| 6036 | } | 6031 | } |
| 6037 | return 0; | 6032 | return 0; |
| 6038 | 6033 | ||
| @@ -2279,10 +2279,6 @@ static inline void igbvf_tx_queue_adv(struct igbvf_adapter *adapter, · 2278 unmodified lines | |||
| 2279 | tx_ring->buffer_info[first].next_to_watch = tx_desc; | 2279 | tx_ring->buffer_info[first].next_to_watch = tx_desc; |
| 2280 | tx_ring->next_to_use = i; | 2280 | tx_ring->next_to_use = i; |
| 2281 | writel(i, adapter->hw.hw_addr + tx_ring->tail); | 2281 | writel(i, adapter->hw.hw_addr + tx_ring->tail); |
| 2282 | /* we need this if more than one processor can write to our tail | ||
| 2283 | * at a time, it synchronizes IO on IA64/Altix systems | ||
| 2284 | */ | ||
| 2285 | mmiowb(); | ||
| 2286 | } | 2282 | } |
| 2287 | 2283 | ||
| 2288 | static netdev_tx_t igbvf_xmit_frame_ring_adv(struct sk_buff *skb, | 2284 | static netdev_tx_t igbvf_xmit_frame_ring_adv(struct sk_buff *skb, |
| @@ -892,11 +892,6 @@ static int igc_tx_map(struct igc_ring *tx_ring, · 891 unmodified lines | |||
| 892 | 892 | ||
| 893 | if (netif_xmit_stopped(txring_txq(tx_ring)) || !skb->xmit_more) { | 893 | if (netif_xmit_stopped(txring_txq(tx_ring)) || !skb->xmit_more) { |
| 894 | writel(i, tx_ring->tail); | 894 | writel(i, tx_ring->tail); |
| 895 | |||
| 896 | /* we need this if more than one processor can write to our tail | ||
| 897 | * at a time, it synchronizes IO on IA64/Altix systems | ||
| 898 | */ | ||
| 899 | mmiowb(); | ||
| 900 | } | 895 | } |
| 901 | 896 | ||
| 902 | return 0; | 897 | return 0; |
| @@ -8299,11 +8299,6 @@ static int ixgbe_tx_map(struct ixgbe_ring *tx_ring, · 8298 unmodified lines | |||
| 8299 | 8299 | ||
| 8300 | if (netif_xmit_stopped(txring_txq(tx_ring)) || !skb->xmit_more) { | 8300 | if (netif_xmit_stopped(txring_txq(tx_ring)) || !skb->xmit_more) { |
| 8301 | writel(i, tx_ring->tail); | 8301 | writel(i, tx_ring->tail); |
| 8302 | |||
| 8303 | /* we need this if more than one processor can write to our tail | ||
| 8304 | * at a time, it synchronizes IO on IA64/Altix systems | ||
| 8305 | */ | ||
| 8306 | mmiowb(); | ||
| 8307 | } | 8302 | } |
| 8308 | 8303 | ||
| 8309 | return 0; | 8304 | return 0; |
| @@ -1139,9 +1139,6 @@ static inline void sky2_put_idx(struct sky2_hw *hw, unsigned q, u16 idx) · 1138 unmodified lines | |||
| 1139 | /* Make sure write' to descriptors are complete before we tell hardware */ | 1139 | /* Make sure write' to descriptors are complete before we tell hardware */ |
| 1140 | wmb(); | 1140 | wmb(); |
| 1141 | sky2_write16(hw, Y2_QADDR(q, PREF_UNIT_PUT_IDX), idx); | 1141 | sky2_write16(hw, Y2_QADDR(q, PREF_UNIT_PUT_IDX), idx); |
| 1142 | |||
| 1143 | /* Synchronize I/O on since next processor may write to tail */ | ||
| 1144 | mmiowb(); | ||
| 1145 | } | 1142 | } |
| 1146 | 1143 | ||
| 1147 | 1144 | ||
| @@ -1354,7 +1351,6 @@ stopped: · 206 unmodified lines | |||
| 1354 | 1351 | ||
| 1355 | /* reset the Rx prefetch unit */ | 1352 | /* reset the Rx prefetch unit */ |
| 1356 | sky2_write32(hw, Y2_QADDR(rxq, PREF_UNIT_CTRL), PREF_UNIT_RST_SET); | 1353 | sky2_write32(hw, Y2_QADDR(rxq, PREF_UNIT_CTRL), PREF_UNIT_RST_SET); |
| 1357 | mmiowb(); | ||
| 1358 | } | 1354 | } |
| 1359 | 1355 | ||
| 1360 | /* Clean out receive buffer area, assumes receiver hardware stopped */ | 1356 | /* Clean out receive buffer area, assumes receiver hardware stopped */ |
| @@ -129,10 +129,6 @@ static int mlx4_reset_slave(struct mlx4_dev *dev) · 128 unmodified lines | |||
| 129 | comm_flags = rst_req << COM_CHAN_RST_REQ_OFFSET; | 129 | comm_flags = rst_req << COM_CHAN_RST_REQ_OFFSET; |
| 130 | __raw_writel((__force u32)cpu_to_be32(comm_flags), | 130 | __raw_writel((__force u32)cpu_to_be32(comm_flags), |
| 131 | (__iomem char *)priv->mfunc.comm + MLX4_COMM_CHAN_FLAGS); | 131 | (__iomem char *)priv->mfunc.comm + MLX4_COMM_CHAN_FLAGS); |
| 132 | /* Make sure that our comm channel write doesn't | ||
| 133 | * get mixed in with writes from another CPU. | ||
| 134 | */ | ||
| 135 | mmiowb(); | ||
| 136 | 132 | ||
| 137 | end = msecs_to_jiffies(MLX4_COMM_TIME) + jiffies; | 133 | end = msecs_to_jiffies(MLX4_COMM_TIME) + jiffies; |
| 138 | while (time_before(jiffies, end)) { | 134 | while (time_before(jiffies, end)) { |
| @@ -281,7 +281,6 @@ static int mlx4_comm_cmd_post(struct mlx4_dev *dev, u8 cmd, u16 param) · 280 unmodified lines | |||
| 281 | val = param | (cmd << 16) | (priv->cmd.comm_toggle << 31); | 281 | val = param | (cmd << 16) | (priv->cmd.comm_toggle << 31); |
| 282 | __raw_writel((__force u32) cpu_to_be32(val), | 282 | __raw_writel((__force u32) cpu_to_be32(val), |
| 283 | &priv->mfunc.comm->slave_write); | 283 | &priv->mfunc.comm->slave_write); |
| 284 | mmiowb(); | ||
| 285 | mutex_unlock(&dev->persist->device_state_mutex); | 284 | mutex_unlock(&dev->persist->device_state_mutex); |
| 286 | return 0; | 285 | return 0; |
| 287 | } | 286 | } |
| @@ -496,12 +495,6 @@ static int mlx4_cmd_post(struct mlx4_dev *dev, u64 in_param, u64 out_param, · 208 unmodified lines | |||
| 496 | (op_modifier << HCR_OPMOD_SHIFT) | | 495 | (op_modifier << HCR_OPMOD_SHIFT) | |
| 497 | op), hcr + 6); | 496 | op), hcr + 6); |
| 498 | 497 | ||
| 499 | /* | ||
| 500 | * Make sure that our HCR writes don't get mixed in with | ||
| 501 | * writes from another CPU starting a FW command. | ||
| 502 | */ | ||
| 503 | mmiowb(); | ||
| 504 | |||
| 505 | cmd->toggle = cmd->toggle ^ 1; | 498 | cmd->toggle = cmd->toggle ^ 1; |
| 506 | 499 | ||
| 507 | ret = 0; | 500 | ret = 0; |
| @@ -2206,7 +2199,6 @@ static void mlx4_master_do_cmd(struct mlx4_dev *dev, int slave, u8 cmd, · 1698 unmodified lines | |||
| 2206 | } | 2199 | } |
| 2207 | __raw_writel((__force u32) cpu_to_be32(reply), | 2200 | __raw_writel((__force u32) cpu_to_be32(reply), |
| 2208 | &priv->mfunc.comm[slave].slave_read); | 2201 | &priv->mfunc.comm[slave].slave_read); |
| 2209 | mmiowb(); | ||
| 2210 | 2202 | ||
| 2211 | return; | 2203 | return; |
| 2212 | 2204 | ||
| @@ -2410,7 +2402,6 @@ int mlx4_multi_func_init(struct mlx4_dev *dev) · 197 unmodified lines | |||
| 2410 | &priv->mfunc.comm[i].slave_write); | 2402 | &priv->mfunc.comm[i].slave_write); |
| 2411 | __raw_writel((__force u32) 0, | 2403 | __raw_writel((__force u32) 0, |
| 2412 | &priv->mfunc.comm[i].slave_read); | 2404 | &priv->mfunc.comm[i].slave_read); |
| 2413 | mmiowb(); | ||
| 2414 | for (port = 1; port <= MLX4_MAX_PORTS; port++) { | 2405 | for (port = 1; port <= MLX4_MAX_PORTS; port++) { |
| 2415 | struct mlx4_vport_state *admin_vport; | 2406 | struct mlx4_vport_state *admin_vport; |
| 2416 | struct mlx4_vport_state *oper_vport; | 2407 | struct mlx4_vport_state *oper_vport; |
| @@ -2576,10 +2567,6 @@ void mlx4_report_internal_err_comm_event(struct mlx4_dev *dev) · 159 unmodified lines | |||
| 2576 | slave_read |= (u32)COMM_CHAN_EVENT_INTERNAL_ERR; | 2567 | slave_read |= (u32)COMM_CHAN_EVENT_INTERNAL_ERR; |
| 2577 | __raw_writel((__force u32)cpu_to_be32(slave_read), | 2568 | __raw_writel((__force u32)cpu_to_be32(slave_read), |
| 2578 | &priv->mfunc.comm[slave].slave_read); | 2569 | &priv->mfunc.comm[slave].slave_read); |
| 2579 | /* Make sure that our comm channel write doesn't | ||
| 2580 | * get mixed in with writes from another CPU. | ||
| 2581 | */ | ||
| 2582 | mmiowb(); | ||
| 2583 | } | 2570 | } |
| 2584 | } | 2571 | } |
| 2585 | 2572 | ||
| @@ -917,7 +917,6 @@ static void cmd_work_handler(struct work_struct *work) · 916 unmodified lines | |||
| 917 | mlx5_core_dbg(dev, "writing 0x%x to command doorbell\n", 1 << ent->idx); | 917 | mlx5_core_dbg(dev, "writing 0x%x to command doorbell\n", 1 << ent->idx); |
| 918 | wmb(); | 918 | wmb(); |
| 919 | iowrite32be(1 << ent->idx, &dev->iseg->cmd_dbell); | 919 | iowrite32be(1 << ent->idx, &dev->iseg->cmd_dbell); |
| 920 | mmiowb(); | ||
| 921 | /* if not in polling don't use ent after this point */ | 920 | /* if not in polling don't use ent after this point */ |
| 922 | if (cmd_mode == CMD_MODE_POLLING || poll_cmd) { | 921 | if (cmd_mode == CMD_MODE_POLLING || poll_cmd) { |
| 923 | poll_timeout(ent); | 922 | poll_timeout(ent); |
| @@ -1439,7 +1439,6 @@ myri10ge_tx_done(struct myri10ge_slice_state *ss, int mcp_index) · 1438 unmodified lines | |||
| 1439 | tx->queue_active = 0; | 1439 | tx->queue_active = 0; |
| 1440 | put_be32(htonl(1), tx->send_stop); | 1440 | put_be32(htonl(1), tx->send_stop); |
| 1441 | mb(); | 1441 | mb(); |
| 1442 | mmiowb(); | ||
| 1443 | } | 1442 | } |
| 1444 | __netif_tx_unlock(dev_queue); | 1443 | __netif_tx_unlock(dev_queue); |
| 1445 | } | 1444 | } |
| @@ -2861,7 +2860,6 @@ again: · 1415 unmodified lines | |||
| 2861 | tx->queue_active = 1; | 2860 | tx->queue_active = 1; |
| 2862 | put_be32(htonl(1), tx->send_go); | 2861 | put_be32(htonl(1), tx->send_go); |
| 2863 | mb(); | 2862 | mb(); |
| 2864 | mmiowb(); | ||
| 2865 | } | 2863 | } |
| 2866 | tx->pkt_start++; | 2864 | tx->pkt_start++; |
| 2867 | if ((avail - count) < MXGEFW_MAX_SEND_DESC) { | 2865 | if ((avail - count) < MXGEFW_MAX_SEND_DESC) { |
| @@ -4153,8 +4153,6 @@ static netdev_tx_t s2io_xmit(struct sk_buff *skb, struct net_device *dev) · 4152 unmodified lines | |||
| 4153 | 4153 | ||
| 4154 | writeq(val64, &tx_fifo->List_Control); | 4154 | writeq(val64, &tx_fifo->List_Control); |
| 4155 | 4155 | ||
| 4156 | mmiowb(); | ||
| 4157 | |||
| 4158 | put_off++; | 4156 | put_off++; |
| 4159 | if (put_off == fifo->tx_curr_put_info.fifo_len + 1) | 4157 | if (put_off == fifo->tx_curr_put_info.fifo_len + 1) |
| 4160 | put_off = 0; | 4158 | put_off = 0; |
| @@ -1826,7 +1826,6 @@ static int vxge_poll_msix(struct napi_struct *napi, int budget) · 1825 unmodified lines | |||
| 1826 | vxge_hw_channel_msix_unmask( | 1826 | vxge_hw_channel_msix_unmask( |
| 1827 | (struct __vxge_hw_channel *)ring->handle, | 1827 | (struct __vxge_hw_channel *)ring->handle, |
| 1828 | ring->rx_vector_no); | 1828 | ring->rx_vector_no); |
| 1829 | mmiowb(); | ||
| 1830 | } | 1829 | } |
| 1831 | 1830 | ||
| 1832 | /* We are copying and returning the local variable, in case if after | 1831 | /* We are copying and returning the local variable, in case if after |
| @@ -2234,8 +2233,6 @@ static irqreturn_t vxge_tx_msix_handle(int irq, void *dev_id) · 401 unmodified lines | |||
| 2234 | vxge_hw_channel_msix_unmask((struct __vxge_hw_channel *)fifo->handle, | 2233 | vxge_hw_channel_msix_unmask((struct __vxge_hw_channel *)fifo->handle, |
| 2235 | fifo->tx_vector_no); | 2234 | fifo->tx_vector_no); |
| 2236 | 2235 | ||
| 2237 | mmiowb(); | ||
| 2238 | |||
| 2239 | return IRQ_HANDLED; | 2236 | return IRQ_HANDLED; |
| 2240 | } | 2237 | } |
| 2241 | 2238 | ||
| @@ -2272,14 +2269,12 @@ vxge_alarm_msix_handle(int irq, void *dev_id) · 30 unmodified lines | |||
| 2272 | */ | 2269 | */ |
| 2273 | vxge_hw_vpath_msix_mask(vdev->vpaths[i].handle, msix_id); | 2270 | vxge_hw_vpath_msix_mask(vdev->vpaths[i].handle, msix_id); |
| 2274 | vxge_hw_vpath_msix_clear(vdev->vpaths[i].handle, msix_id); | 2271 | vxge_hw_vpath_msix_clear(vdev->vpaths[i].handle, msix_id); |
| 2275 | mmiowb(); | ||
| 2276 | 2272 | ||
| 2277 | status = vxge_hw_vpath_alarm_process(vdev->vpaths[i].handle, | 2273 | status = vxge_hw_vpath_alarm_process(vdev->vpaths[i].handle, |
| 2278 | vdev->exec_mode); | 2274 | vdev->exec_mode); |
| 2279 | if (status == VXGE_HW_OK) { | 2275 | if (status == VXGE_HW_OK) { |
| 2280 | vxge_hw_vpath_msix_unmask(vdev->vpaths[i].handle, | 2276 | vxge_hw_vpath_msix_unmask(vdev->vpaths[i].handle, |
| 2281 | msix_id); | 2277 | msix_id); |
| 2282 | mmiowb(); | ||
| 2283 | continue; | 2278 | continue; |
| 2284 | } | 2279 | } |
| 2285 | vxge_debug_intr(VXGE_ERR, | 2280 | vxge_debug_intr(VXGE_ERR, |
| @@ -1399,11 +1399,7 @@ static void __vxge_hw_non_offload_db_post(struct __vxge_hw_fifo *fifo, · 1398 unmodified lines | |||
| 1399 | VXGE_HW_NODBW_GET_NO_SNOOP(no_snoop), | 1399 | VXGE_HW_NODBW_GET_NO_SNOOP(no_snoop), |
| 1400 | &fifo->nofl_db->control_0); | 1400 | &fifo->nofl_db->control_0); |
| 1401 | 1401 | ||
| 1402 | mmiowb(); | ||
| 1403 | |||
| 1404 | writeq(txdl_ptr, &fifo->nofl_db->txdl_ptr); | 1402 | writeq(txdl_ptr, &fifo->nofl_db->txdl_ptr); |
| 1405 | |||
| 1406 | mmiowb(); | ||
| 1407 | } | 1403 | } |
| 1408 | 1404 | ||
| 1409 | /** | 1405 | /** |
| @@ -774,18 +774,12 @@ static inline u16 qed_attn_update_idx(struct qed_hwfn *p_hwfn, · 773 unmodified lines | |||
| 774 | { | 774 | { |
| 775 | u16 rc = 0, index; | 775 | u16 rc = 0, index; |
| 776 | 776 | ||
| 777 | /* Make certain HW write took affect */ | ||
| 778 | mmiowb(); | ||
| 779 | |||
| 780 | index = le16_to_cpu(p_sb_desc->sb_attn->sb_index); | 777 | index = le16_to_cpu(p_sb_desc->sb_attn->sb_index); |
| 781 | if (p_sb_desc->index != index) { | 778 | if (p_sb_desc->index != index) { |
| 782 | p_sb_desc->index = index; | 779 | p_sb_desc->index = index; |
| 783 | rc = QED_SB_ATT_IDX; | 780 | rc = QED_SB_ATT_IDX; |
| 784 | } | 781 | } |
| 785 | 782 | ||
| 786 | /* Make certain we got a consistent view with HW */ | ||
| 787 | mmiowb(); | ||
| 788 | |||
| 789 | return rc; | 783 | return rc; |
| 790 | } | 784 | } |
| 791 | 785 | ||
| @@ -1170,7 +1164,6 @@ static void qed_sb_ack_attn(struct qed_hwfn *p_hwfn, · 378 unmodified lines | |||
| 1170 | /* Both segments (interrupts & acks) are written to same place address; | 1164 | /* Both segments (interrupts & acks) are written to same place address; |
| 1171 | * Need to guarantee all commands will be received (in-order) by HW. | 1165 | * Need to guarantee all commands will be received (in-order) by HW. |
| 1172 | */ | 1166 | */ |
| 1173 | mmiowb(); | ||
| 1174 | barrier(); | 1167 | barrier(); |
| 1175 | } | 1168 | } |
| 1176 | 1169 | ||
| @@ -1805,9 +1798,6 @@ static void qed_int_igu_enable_attn(struct qed_hwfn *p_hwfn, · 628 unmodified lines | |||
| 1805 | qed_wr(p_hwfn, p_ptt, IGU_REG_TRAILING_EDGE_LATCH, 0xfff); | 1798 | qed_wr(p_hwfn, p_ptt, IGU_REG_TRAILING_EDGE_LATCH, 0xfff); |
| 1806 | qed_wr(p_hwfn, p_ptt, IGU_REG_ATTENTION_ENABLE, 0xfff); | 1799 | qed_wr(p_hwfn, p_ptt, IGU_REG_ATTENTION_ENABLE, 0xfff); |
| 1807 | 1800 | ||
| 1808 | /* Flush the writes to IGU */ | ||
| 1809 | mmiowb(); | ||
| 1810 | |||
| 1811 | /* Unmask AEU signals toward IGU */ | 1801 | /* Unmask AEU signals toward IGU */ |
| 1812 | qed_wr(p_hwfn, p_ptt, MISC_REG_AEU_MASK_ATTN_IGU, 0xff); | 1802 | qed_wr(p_hwfn, p_ptt, MISC_REG_AEU_MASK_ATTN_IGU, 0xff); |
| 1813 | } | 1803 | } |
| @@ -1871,9 +1861,6 @@ static void qed_int_igu_cleanup_sb(struct qed_hwfn *p_hwfn, · 57 unmodified lines | |||
| 1871 | 1861 | ||
| 1872 | qed_wr(p_hwfn, p_ptt, IGU_REG_COMMAND_REG_CTRL, cmd_ctrl); | 1862 | qed_wr(p_hwfn, p_ptt, IGU_REG_COMMAND_REG_CTRL, cmd_ctrl); |
| 1873 | 1863 | ||
| 1874 | /* Flush the write to IGU */ | ||
| 1875 | mmiowb(); | ||
| 1876 | |||
| 1877 | /* calculate where to read the status bit from */ | 1864 | /* calculate where to read the status bit from */ |
| 1878 | sb_bit = 1 << (igu_sb_id % 32); | 1865 | sb_bit = 1 << (igu_sb_id % 32); |
| 1879 | sb_bit_addr = igu_sb_id / 32 * sizeof(u32); | 1866 | sb_bit_addr = igu_sb_id / 32 * sizeof(u32); |
| @@ -341,9 +341,6 @@ void qed_eq_prod_update(struct qed_hwfn *p_hwfn, u16 prod) · 340 unmodified lines | |||
| 341 | USTORM_EQE_CONS_OFFSET(p_hwfn->rel_pf_id); | 341 | USTORM_EQE_CONS_OFFSET(p_hwfn->rel_pf_id); |
| 342 | 342 | ||
| 343 | REG_WR16(p_hwfn, addr, prod); | 343 | REG_WR16(p_hwfn, addr, prod); |
| 344 | |||
| 345 | /* keep prod updates ordered */ | ||
| 346 | mmiowb(); | ||
| 347 | } | 344 | } |
| 348 | 345 | ||
| 349 | int qed_eq_completion(struct qed_hwfn *p_hwfn, void *cookie) | 346 | int qed_eq_completion(struct qed_hwfn *p_hwfn, void *cookie) |
| @@ -1526,14 +1526,6 @@ static int qede_selftest_transmit_traffic(struct qede_dev *edev, · 1525 unmodified lines | |||
| 1526 | barrier(); | 1526 | barrier(); |
| 1527 | writel(txq->tx_db.raw, txq->doorbell_addr); | 1527 | writel(txq->tx_db.raw, txq->doorbell_addr); |
| 1528 | 1528 | ||
| 1529 | /* mmiowb is needed to synchronize doorbell writes from more than one | ||
| 1530 | * processor. It guarantees that the write arrives to the device before | ||
| 1531 | * the queue lock is released and another start_xmit is called (possibly | ||
| 1532 | * on another CPU). Without this barrier, the next doorbell can bypass | ||
| 1533 | * this doorbell. This is applicable to IA64/Altix systems. | ||
| 1534 | */ | ||
| 1535 | mmiowb(); | ||
| 1536 | |||
| 1537 | for (i = 0; i < QEDE_SELFTEST_POLL_COUNT; i++) { | 1529 | for (i = 0; i < QEDE_SELFTEST_POLL_COUNT; i++) { |
| 1538 | if (qede_txq_has_work(txq)) | 1530 | if (qede_txq_has_work(txq)) |
| 1539 | break; | 1531 | break; |
| @@ -580,14 +580,6 @@ void qede_update_rx_prod(struct qede_dev *edev, struct qede_rx_queue *rxq) · 579 unmodified lines | |||
| 580 | 580 | ||
| 581 | internal_ram_wr(rxq->hw_rxq_prod_addr, sizeof(rx_prods), | 581 | internal_ram_wr(rxq->hw_rxq_prod_addr, sizeof(rx_prods), |
| 582 | (u32 *)&rx_prods); | 582 | (u32 *)&rx_prods); |
| 583 | |||
| 584 | /* mmiowb is needed to synchronize doorbell writes from more than one | ||
| 585 | * processor. It guarantees that the write arrives to the device before | ||
| 586 | * the napi lock is released and another qede_poll is called (possibly | ||
| 587 | * on another CPU). Without this barrier, the next doorbell can bypass | ||
| 588 | * this doorbell. This is applicable to IA64/Altix systems. | ||
| 589 | */ | ||
| 590 | mmiowb(); | ||
| 591 | } | 583 | } |
| 592 | 584 | ||
| 593 | static void qede_get_rxhash(struct sk_buff *skb, u8 bitfields, __le32 rss_hash) | 585 | static void qede_get_rxhash(struct sk_buff *skb, u8 bitfields, __le32 rss_hash) |
| @@ -1858,7 +1858,6 @@ static void ql_update_small_bufq_prod_index(struct ql3_adapter *qdev) · 1857 unmodified lines | |||
| 1858 | wmb(); | 1858 | wmb(); |
| 1859 | writel_relaxed(qdev->small_buf_q_producer_index, | 1859 | writel_relaxed(qdev->small_buf_q_producer_index, |
| 1860 | &port_regs->CommonRegs.rxSmallQProducerIndex); | 1860 | &port_regs->CommonRegs.rxSmallQProducerIndex); |
| 1861 | mmiowb(); | ||
| 1862 | } | 1861 | } |
| 1863 | } | 1862 | } |
| 1864 | 1863 | ||
| @@ -2181,7 +2181,6 @@ static inline void ql_write32(const struct ql_adapter *qdev, int reg, u32 val) · 2180 unmodified lines | |||
| 2181 | static inline void ql_write_db_reg(u32 val, void __iomem *addr) | 2181 | static inline void ql_write_db_reg(u32 val, void __iomem *addr) |
| 2182 | { | 2182 | { |
| 2183 | writel(val, addr); | 2183 | writel(val, addr); |
| 2184 | mmiowb(); | ||
| 2185 | } | 2184 | } |
| 2186 | 2185 | ||
| 2187 | /* | 2186 | /* |
| @@ -2695,7 +2695,6 @@ static netdev_tx_t qlge_send(struct sk_buff *skb, struct net_device *ndev) · 2694 unmodified lines | |||
| 2695 | wmb(); | 2695 | wmb(); |
| 2696 | 2696 | ||
| 2697 | ql_write_db_reg_relaxed(tx_ring->prod_idx, tx_ring->prod_idx_db_reg); | 2697 | ql_write_db_reg_relaxed(tx_ring->prod_idx, tx_ring->prod_idx_db_reg); |
| 2698 | mmiowb(); | ||
| 2699 | netif_printk(qdev, tx_queued, KERN_DEBUG, qdev->ndev, | 2698 | netif_printk(qdev, tx_queued, KERN_DEBUG, qdev->ndev, |
| 2700 | "tx queued, slot %d, len %d\n", | 2699 | "tx queued, slot %d, len %d\n", |
| 2701 | tx_ring->prod_idx, skb->len); | 2700 | tx_ring->prod_idx, skb->len); |
| @@ -728,7 +728,6 @@ static irqreturn_t ravb_emac_interrupt(int irq, void *dev_id) · 727 unmodified lines | |||
| 728 | 728 | ||
| 729 | spin_lock(&priv->lock); | 729 | spin_lock(&priv->lock); |
| 730 | ravb_emac_interrupt_unlocked(ndev); | 730 | ravb_emac_interrupt_unlocked(ndev); |
| 731 | mmiowb(); | ||
| 732 | spin_unlock(&priv->lock); | 731 | spin_unlock(&priv->lock); |
| 733 | return IRQ_HANDLED; | 732 | return IRQ_HANDLED; |
| 734 | } | 733 | } |
| @@ -848,7 +847,6 @@ static irqreturn_t ravb_interrupt(int irq, void *dev_id) · 113 unmodified lines | |||
| 848 | result = IRQ_HANDLED; | 847 | result = IRQ_HANDLED; |
| 849 | } | 848 | } |
| 850 | 849 | ||
| 851 | mmiowb(); | ||
| 852 | spin_unlock(&priv->lock); | 850 | spin_unlock(&priv->lock); |
| 853 | return result; | 851 | return result; |
| 854 | } | 852 | } |
| @@ -881,7 +879,6 @@ static irqreturn_t ravb_multi_interrupt(int irq, void *dev_id) · 26 unmodified lines | |||
| 881 | result = IRQ_HANDLED; | 879 | result = IRQ_HANDLED; |
| 882 | } | 880 | } |
| 883 | 881 | ||
| 884 | mmiowb(); | ||
| 885 | spin_unlock(&priv->lock); | 882 | spin_unlock(&priv->lock); |
| 886 | return result; | 883 | return result; |
| 887 | } | 884 | } |
| @@ -898,7 +895,6 @@ static irqreturn_t ravb_dma_interrupt(int irq, void *dev_id, int q) · 10 unmodified lines | |||
| 898 | if (ravb_queue_interrupt(ndev, q)) | 895 | if (ravb_queue_interrupt(ndev, q)) |
| 899 | result = IRQ_HANDLED; | 896 | result = IRQ_HANDLED; |
| 900 | 897 | ||
| 901 | mmiowb(); | ||
| 902 | spin_unlock(&priv->lock); | 898 | spin_unlock(&priv->lock); |
| 903 | return result; | 899 | return result; |
| 904 | } | 900 | } |
| @@ -943,7 +939,6 @@ static int ravb_poll(struct napi_struct *napi, int budget) · 38 unmodified lines | |||
| 943 | ravb_write(ndev, ~(mask | TIS_RESERVED), TIS); | 939 | ravb_write(ndev, ~(mask | TIS_RESERVED), TIS); |
| 944 | ravb_tx_free(ndev, q, true); | 940 | ravb_tx_free(ndev, q, true); |
| 945 | netif_wake_subqueue(ndev, q); | 941 | netif_wake_subqueue(ndev, q); |
| 946 | mmiowb(); | ||
| 947 | spin_unlock_irqrestore(&priv->lock, flags); | 942 | spin_unlock_irqrestore(&priv->lock, flags); |
| 948 | } | 943 | } |
| 949 | } | 944 | } |
| @@ -959,7 +954,6 @@ static int ravb_poll(struct napi_struct *napi, int budget) · 9 unmodified lines | |||
| 959 | ravb_write(ndev, mask, RIE0); | 954 | ravb_write(ndev, mask, RIE0); |
| 960 | ravb_write(ndev, mask, TIE); | 955 | ravb_write(ndev, mask, TIE); |
| 961 | } | 956 | } |
| 962 | mmiowb(); | ||
| 963 | spin_unlock_irqrestore(&priv->lock, flags); | 957 | spin_unlock_irqrestore(&priv->lock, flags); |
| 964 | 958 | ||
| 965 | /* Receive error message handling */ | 959 | /* Receive error message handling */ |
| @@ -1008,7 +1002,6 @@ static void ravb_adjust_link(struct net_device *ndev) · 42 unmodified lines | |||
| 1008 | if (priv->no_avb_link && phydev->link) | 1002 | if (priv->no_avb_link && phydev->link) |
| 1009 | ravb_rcv_snd_enable(ndev); | 1003 | ravb_rcv_snd_enable(ndev); |
| 1010 | 1004 | ||
| 1011 | mmiowb(); | ||
| 1012 | spin_unlock_irqrestore(&priv->lock, flags); | 1005 | spin_unlock_irqrestore(&priv->lock, flags); |
| 1013 | 1006 | ||
| 1014 | if (new_state && netif_msg_link(priv)) | 1007 | if (new_state && netif_msg_link(priv)) |
| @@ -1601,7 +1594,6 @@ static netdev_tx_t ravb_start_xmit(struct sk_buff *skb, struct net_device *ndev) · 586 unmodified lines | |||
| 1601 | netif_stop_subqueue(ndev, q); | 1594 | netif_stop_subqueue(ndev, q); |
| 1602 | 1595 | ||
| 1603 | exit: | 1596 | exit: |
| 1604 | mmiowb(); | ||
| 1605 | spin_unlock_irqrestore(&priv->lock, flags); | 1597 | spin_unlock_irqrestore(&priv->lock, flags); |
| 1606 | return NETDEV_TX_OK; | 1598 | return NETDEV_TX_OK; |
| 1607 | 1599 | ||
| @@ -1673,7 +1665,6 @@ static void ravb_set_rx_mode(struct net_device *ndev) · 65 unmodified lines | |||
| 1673 | spin_lock_irqsave(&priv->lock, flags); | 1665 | spin_lock_irqsave(&priv->lock, flags); |
| 1674 | ravb_modify(ndev, ECMR, ECMR_PRM, | 1666 | ravb_modify(ndev, ECMR, ECMR_PRM, |
| 1675 | ndev->flags & IFF_PROMISC ? ECMR_PRM : 0); | 1667 | ndev->flags & IFF_PROMISC ? ECMR_PRM : 0); |
| 1676 | mmiowb(); | ||
| 1677 | spin_unlock_irqrestore(&priv->lock, flags); | 1668 | spin_unlock_irqrestore(&priv->lock, flags); |
| 1678 | } | 1669 | } |
| 1679 | 1670 | ||
| @@ -196,7 +196,6 @@ static int ravb_ptp_extts(struct ptp_clock_info *ptp, · 195 unmodified lines | |||
| 196 | ravb_write(ndev, GIE_PTCS, GIE); | 196 | ravb_write(ndev, GIE_PTCS, GIE); |
| 197 | else | 197 | else |
| 198 | ravb_write(ndev, GID_PTCD, GID); | 198 | ravb_write(ndev, GID_PTCD, GID); |
| 199 | mmiowb(); | ||
| 200 | spin_unlock_irqrestore(&priv->lock, flags); | 199 | spin_unlock_irqrestore(&priv->lock, flags); |
| 201 | 200 | ||
| 202 | return 0; | 201 | return 0; |
| @@ -259,7 +258,6 @@ static int ravb_ptp_perout(struct ptp_clock_info *ptp, · 56 unmodified lines | |||
| 259 | else | 258 | else |
| 260 | ravb_write(ndev, GID_PTMD0, GID); | 259 | ravb_write(ndev, GID_PTMD0, GID); |
| 261 | } | 260 | } |
| 262 | mmiowb(); | ||
| 263 | spin_unlock_irqrestore(&priv->lock, flags); | 261 | spin_unlock_irqrestore(&priv->lock, flags); |
| 264 | 262 | ||
| 265 | return error; | 263 | return error; |
| @@ -331,7 +329,6 @@ void ravb_ptp_init(struct net_device *ndev, struct platform_device *pdev) · 65 unmodified lines | |||
| 331 | spin_lock_irqsave(&priv->lock, flags); | 329 | spin_lock_irqsave(&priv->lock, flags); |
| 332 | ravb_wait(ndev, GCCR, GCCR_TCR, GCCR_TCR_NOREQ); | 330 | ravb_wait(ndev, GCCR, GCCR_TCR, GCCR_TCR_NOREQ); |
| 333 | ravb_modify(ndev, GCCR, GCCR_TCSS, GCCR_TCSS_ADJGPTP); | 331 | ravb_modify(ndev, GCCR, GCCR_TCSS, GCCR_TCSS_ADJGPTP); |
| 334 | mmiowb(); | ||
| 335 | spin_unlock_irqrestore(&priv->lock, flags); | 332 | spin_unlock_irqrestore(&priv->lock, flags); |
| 336 | 333 | ||
| 337 | priv->ptp.clock = ptp_clock_register(&priv->ptp.info, &pdev->dev); | 334 | priv->ptp.clock = ptp_clock_register(&priv->ptp.info, &pdev->dev); |
| @@ -2010,7 +2010,6 @@ static void sh_eth_adjust_link(struct net_device *ndev) · 2009 unmodified lines | |||
| 2010 | if ((mdp->cd->no_psr || mdp->no_ether_link) && phydev->link) | 2010 | if ((mdp->cd->no_psr || mdp->no_ether_link) && phydev->link) |
| 2011 | sh_eth_rcv_snd_enable(ndev); | 2011 | sh_eth_rcv_snd_enable(ndev); |
| 2012 | 2012 | ||
| 2013 | mmiowb(); | ||
| 2014 | spin_unlock_irqrestore(&mdp->lock, flags); | 2013 | spin_unlock_irqrestore(&mdp->lock, flags); |
| 2015 | 2014 | ||
| 2016 | if (new_state && netif_msg_link(mdp)) | 2015 | if (new_state && netif_msg_link(mdp)) |
| @@ -108,7 +108,6 @@ static inline void ef4_writeo(struct ef4_nic *efx, const ef4_oword_t *value, · 107 unmodified lines | |||
| 108 | _ef4_writed(efx, value->u32[2], reg + 8); | 108 | _ef4_writed(efx, value->u32[2], reg + 8); |
| 109 | _ef4_writed(efx, value->u32[3], reg + 12); | 109 | _ef4_writed(efx, value->u32[3], reg + 12); |
| 110 | #endif | 110 | #endif |
| 111 | mmiowb(); | ||
| 112 | spin_unlock_irqrestore(&efx->biu_lock, flags); | 111 | spin_unlock_irqrestore(&efx->biu_lock, flags); |
| 113 | } | 112 | } |
| 114 | 113 | ||
| @@ -130,7 +129,6 @@ static inline void ef4_sram_writeq(struct ef4_nic *efx, void __iomem *membase, · 15 unmodified lines | |||
| 130 | __raw_writel((__force u32)value->u32[0], membase + addr); | 129 | __raw_writel((__force u32)value->u32[0], membase + addr); |
| 131 | __raw_writel((__force u32)value->u32[1], membase + addr + 4); | 130 | __raw_writel((__force u32)value->u32[1], membase + addr + 4); |
| 132 | #endif | 131 | #endif |
| 133 | mmiowb(); | ||
| 134 | spin_unlock_irqrestore(&efx->biu_lock, flags); | 132 | spin_unlock_irqrestore(&efx->biu_lock, flags); |
| 135 | } | 133 | } |
| 136 | 134 | ||
| @@ -120,7 +120,6 @@ static inline void efx_writeo(struct efx_nic *efx, const efx_oword_t *value, · 119 unmodified lines | |||
| 120 | _efx_writed(efx, value->u32[2], reg + 8); | 120 | _efx_writed(efx, value->u32[2], reg + 8); |
| 121 | _efx_writed(efx, value->u32[3], reg + 12); | 121 | _efx_writed(efx, value->u32[3], reg + 12); |
| 122 | #endif | 122 | #endif |
| 123 | mmiowb(); | ||
| 124 | spin_unlock_irqrestore(&efx->biu_lock, flags); | 123 | spin_unlock_irqrestore(&efx->biu_lock, flags); |
| 125 | } | 124 | } |
| 126 | 125 | ||
| @@ -142,7 +141,6 @@ static inline void efx_sram_writeq(struct efx_nic *efx, void __iomem *membase, · 15 unmodified lines | |||
| 142 | __raw_writel((__force u32)value->u32[0], membase + addr); | 141 | __raw_writel((__force u32)value->u32[0], membase + addr); |
| 143 | __raw_writel((__force u32)value->u32[1], membase + addr + 4); | 142 | __raw_writel((__force u32)value->u32[1], membase + addr + 4); |
| 144 | #endif | 143 | #endif |
| 145 | mmiowb(); | ||
| 146 | spin_unlock_irqrestore(&efx->biu_lock, flags); | 144 | spin_unlock_irqrestore(&efx->biu_lock, flags); |
| 147 | } | 145 | } |
| 148 | 146 | ||
| @@ -361,7 +361,6 @@ static void sc92031_disable_interrupts(struct net_device *dev) · 360 unmodified lines | |||
| 361 | /* stop interrupts */ | 361 | /* stop interrupts */ |
| 362 | iowrite32(0, port_base + IntrMask); | 362 | iowrite32(0, port_base + IntrMask); |
| 363 | _sc92031_dummy_read(port_base); | 363 | _sc92031_dummy_read(port_base); |
| 364 | mmiowb(); | ||
| 365 | 364 | ||
| 366 | /* wait for any concurrent interrupt/tasklet to finish */ | 365 | /* wait for any concurrent interrupt/tasklet to finish */ |
| 367 | synchronize_irq(priv->pdev->irq); | 366 | synchronize_irq(priv->pdev->irq); |
| @@ -379,7 +378,6 @@ static void sc92031_enable_interrupts(struct net_device *dev) · 11 unmodified lines | |||
| 379 | wmb(); | 378 | wmb(); |
| 380 | 379 | ||
| 381 | iowrite32(IntrBits, port_base + IntrMask); | 380 | iowrite32(IntrBits, port_base + IntrMask); |
| 382 | mmiowb(); | ||
| 383 | } | 381 | } |
| 384 | 382 | ||
| 385 | static void _sc92031_disable_tx_rx(struct net_device *dev) | 383 | static void _sc92031_disable_tx_rx(struct net_device *dev) |
| @@ -867,7 +865,6 @@ out: · 481 unmodified lines | |||
| 867 | rmb(); | 865 | rmb(); |
| 868 | 866 | ||
| 869 | iowrite32(intr_mask, port_base + IntrMask); | 867 | iowrite32(intr_mask, port_base + IntrMask); |
| 870 | mmiowb(); | ||
| 871 | 868 | ||
| 872 | spin_unlock(&priv->lock); | 869 | spin_unlock(&priv->lock); |
| 873 | } | 870 | } |
| @@ -901,7 +898,6 @@ out_none: · 27 unmodified lines | |||
| 901 | rmb(); | 898 | rmb(); |
| 902 | 899 | ||
| 903 | iowrite32(intr_mask, port_base + IntrMask); | 900 | iowrite32(intr_mask, port_base + IntrMask); |
| 904 | mmiowb(); | ||
| 905 | 901 | ||
| 906 | return IRQ_NONE; | 902 | return IRQ_NONE; |
| 907 | } | 903 | } |
| @@ -978,7 +974,6 @@ static netdev_tx_t sc92031_start_xmit(struct sk_buff *skb, · 70 unmodified lines | |||
| 978 | iowrite32(priv->tx_bufs_dma_addr + entry * TX_BUF_SIZE, | 974 | iowrite32(priv->tx_bufs_dma_addr + entry * TX_BUF_SIZE, |
| 979 | port_base + TxAddr0 + entry * 4); | 975 | port_base + TxAddr0 + entry * 4); |
| 980 | iowrite32(tx_status, port_base + TxStatus0 + entry * 4); | 976 | iowrite32(tx_status, port_base + TxStatus0 + entry * 4); |
| 981 | mmiowb(); | ||
| 982 | 977 | ||
| 983 | if (priv->tx_head - priv->tx_tail >= NUM_TX_DESC) | 978 | if (priv->tx_head - priv->tx_tail >= NUM_TX_DESC) |
| 984 | netif_stop_queue(dev); | 979 | netif_stop_queue(dev); |
| @@ -1024,7 +1019,6 @@ static int sc92031_open(struct net_device *dev) · 39 unmodified lines | |||
| 1024 | spin_lock_bh(&priv->lock); | 1019 | spin_lock_bh(&priv->lock); |
| 1025 | 1020 | ||
| 1026 | _sc92031_reset(dev); | 1021 | _sc92031_reset(dev); |
| 1027 | mmiowb(); | ||
| 1028 | 1022 | ||
| 1029 | spin_unlock_bh(&priv->lock); | 1023 | spin_unlock_bh(&priv->lock); |
| 1030 | sc92031_enable_interrupts(dev); | 1024 | sc92031_enable_interrupts(dev); |
| @@ -1060,7 +1054,6 @@ static int sc92031_stop(struct net_device *dev) · 29 unmodified lines | |||
| 1060 | 1054 | ||
| 1061 | _sc92031_disable_tx_rx(dev); | 1055 | _sc92031_disable_tx_rx(dev); |
| 1062 | _sc92031_tx_clear(dev); | 1056 | _sc92031_tx_clear(dev); |
| 1063 | mmiowb(); | ||
| 1064 | 1057 | ||
| 1065 | spin_unlock_bh(&priv->lock); | 1058 | spin_unlock_bh(&priv->lock); |
| 1066 | 1059 | ||
| @@ -1081,7 +1074,6 @@ static void sc92031_set_multicast_list(struct net_device *dev) · 14 unmodified lines | |||
| 1081 | 1074 | ||
| 1082 | _sc92031_set_mar(dev); | 1075 | _sc92031_set_mar(dev); |
| 1083 | _sc92031_set_rx_config(dev); | 1076 | _sc92031_set_rx_config(dev); |
| 1084 | mmiowb(); | ||
| 1085 | 1077 | ||
| 1086 | spin_unlock_bh(&priv->lock); | 1078 | spin_unlock_bh(&priv->lock); |
| 1087 | } | 1079 | } |
| @@ -1098,7 +1090,6 @@ static void sc92031_tx_timeout(struct net_device *dev) · 10 unmodified lines | |||
| 1098 | priv->tx_timeouts++; | 1090 | priv->tx_timeouts++; |
| 1099 | 1091 | ||
| 1100 | _sc92031_reset(dev); | 1092 | _sc92031_reset(dev); |
| 1101 | mmiowb(); | ||
| 1102 | 1093 | ||
| 1103 | spin_unlock(&priv->lock); | 1094 | spin_unlock(&priv->lock); |
| 1104 | 1095 | ||
| @@ -1140,7 +1131,6 @@ sc92031_ethtool_get_link_ksettings(struct net_device *dev, · 35 unmodified lines | |||
| 1140 | 1131 | ||
| 1141 | output_status = _sc92031_mii_read(port_base, MII_OutputStatus); | 1132 | output_status = _sc92031_mii_read(port_base, MII_OutputStatus); |
| 1142 | _sc92031_mii_scan(port_base); | 1133 | _sc92031_mii_scan(port_base); |
| 1143 | mmiowb(); | ||
| 1144 | 1134 | ||
| 1145 | spin_unlock_bh(&priv->lock); | 1135 | spin_unlock_bh(&priv->lock); |
| 1146 | 1136 | ||
| @@ -1311,7 +1301,6 @@ static int sc92031_ethtool_set_wol(struct net_device *dev, · 164 unmodified lines | |||
| 1311 | 1301 | ||
| 1312 | priv->pm_config = pm_config; | 1302 | priv->pm_config = pm_config; |
| 1313 | iowrite32(pm_config, port_base + PMConfig); | 1303 | iowrite32(pm_config, port_base + PMConfig); |
| 1314 | mmiowb(); | ||
| 1315 | 1304 | ||
| 1316 | spin_unlock_bh(&priv->lock); | 1305 | spin_unlock_bh(&priv->lock); |
| 1317 | 1306 | ||
| @@ -1337,7 +1326,6 @@ static int sc92031_ethtool_nway_reset(struct net_device *dev) · 19 unmodified lines | |||
| 1337 | 1326 | ||
| 1338 | out: | 1327 | out: |
| 1339 | _sc92031_mii_scan(port_base); | 1328 | _sc92031_mii_scan(port_base); |
| 1340 | mmiowb(); | ||
| 1341 | 1329 | ||
| 1342 | spin_unlock_bh(&priv->lock); | 1330 | spin_unlock_bh(&priv->lock); |
| 1343 | 1331 | ||
| @@ -1530,7 +1518,6 @@ static int sc92031_suspend(struct pci_dev *pdev, pm_message_t state) · 186 unmodified lines | |||
| 1530 | 1518 | ||
| 1531 | _sc92031_disable_tx_rx(dev); | 1519 | _sc92031_disable_tx_rx(dev); |
| 1532 | _sc92031_tx_clear(dev); | 1520 | _sc92031_tx_clear(dev); |
| 1533 | mmiowb(); | ||
| 1534 | 1521 | ||
| 1535 | spin_unlock_bh(&priv->lock); | 1522 | spin_unlock_bh(&priv->lock); |
| 1536 | 1523 | ||
| @@ -1555,7 +1542,6 @@ static int sc92031_resume(struct pci_dev *pdev) · 18 unmodified lines | |||
| 1555 | spin_lock_bh(&priv->lock); | 1542 | spin_lock_bh(&priv->lock); |
| 1556 | 1543 | ||
| 1557 | _sc92031_reset(dev); | 1544 | _sc92031_reset(dev); |
| 1558 | mmiowb(); | ||
| 1559 | 1545 | ||
| 1560 | spin_unlock_bh(&priv->lock); | 1546 | spin_unlock_bh(&priv->lock); |
| 1561 | sc92031_enable_interrupts(dev); | 1547 | sc92031_enable_interrupts(dev); |
| @@ -571,7 +571,6 @@ static void rhine_ack_events(struct rhine_private *rp, u32 mask) · 570 unmodified lines | |||
| 571 | if (rp->quirks & rqStatusWBRace) | 571 | if (rp->quirks & rqStatusWBRace) |
| 572 | iowrite8(mask >> 16, ioaddr + IntrStatus2); | 572 | iowrite8(mask >> 16, ioaddr + IntrStatus2); |
| 573 | iowrite16(mask, ioaddr + IntrStatus); | 573 | iowrite16(mask, ioaddr + IntrStatus); |
| 574 | mmiowb(); | ||
| 575 | } | 574 | } |
| 576 | 575 | ||
| 577 | /* | 576 | /* |
| @@ -863,7 +862,6 @@ static int rhine_napipoll(struct napi_struct *napi, int budget) · 285 unmodified lines | |||
| 863 | if (work_done < budget) { | 862 | if (work_done < budget) { |
| 864 | napi_complete_done(napi, work_done); | 863 | napi_complete_done(napi, work_done); |
| 865 | iowrite16(enable_mask, ioaddr + IntrEnable); | 864 | iowrite16(enable_mask, ioaddr + IntrEnable); |
| 866 | mmiowb(); | ||
| 867 | } | 865 | } |
| 868 | return work_done; | 866 | return work_done; |
| 869 | } | 867 | } |
| @@ -1893,7 +1891,6 @@ static netdev_tx_t rhine_start_tx(struct sk_buff *skb, · 1023 unmodified lines | |||
| 1893 | static void rhine_irq_disable(struct rhine_private *rp) | 1891 | static void rhine_irq_disable(struct rhine_private *rp) |
| 1894 | { | 1892 | { |
| 1895 | iowrite16(0x0000, rp->base + IntrEnable); | 1893 | iowrite16(0x0000, rp->base + IntrEnable); |
| 1896 | mmiowb(); | ||
| 1897 | } | 1894 | } |
| 1898 | 1895 | ||
| 1899 | /* The interrupt handler does all of the Rx thread work and cleans up | 1896 | /* The interrupt handler does all of the Rx thread work and cleans up |
| @@ -219,7 +219,6 @@ static inline int __w5100_write_direct(struct net_device *ndev, u32 addr, · 218 unmodified lines | |||
| 219 | static inline int w5100_write_direct(struct net_device *ndev, u32 addr, u8 data) | 219 | static inline int w5100_write_direct(struct net_device *ndev, u32 addr, u8 data) |
| 220 | { | 220 | { |
| 221 | __w5100_write_direct(ndev, addr, data); | 221 | __w5100_write_direct(ndev, addr, data); |
| 222 | mmiowb(); | ||
| 223 | 222 | ||
| 224 | return 0; | 223 | return 0; |
| 225 | } | 224 | } |
| @@ -236,7 +235,6 @@ static int w5100_write16_direct(struct net_device *ndev, u32 addr, u16 data) · 10 unmodified lines | |||
| 236 | { | 235 | { |
| 237 | __w5100_write_direct(ndev, addr, data >> 8); | 236 | __w5100_write_direct(ndev, addr, data >> 8); |
| 238 | __w5100_write_direct(ndev, addr + 1, data); | 237 | __w5100_write_direct(ndev, addr + 1, data); |
| 239 | mmiowb(); | ||
| 240 | 238 | ||
| 241 | return 0; | 239 | return 0; |
| 242 | } | 240 | } |
| @@ -260,8 +258,6 @@ static int w5100_writebulk_direct(struct net_device *ndev, u32 addr, · 17 unmodified lines | |||
| 260 | for (i = 0; i < len; i++, addr++) | 258 | for (i = 0; i < len; i++, addr++) |
| 261 | __w5100_write_direct(ndev, addr, *buf++); | 259 | __w5100_write_direct(ndev, addr, *buf++); |
| 262 | 260 | ||
| 263 | mmiowb(); | ||
| 264 | |||
| 265 | return 0; | 261 | return 0; |
| 266 | } | 262 | } |
| 267 | 263 | ||
| @@ -375,7 +371,6 @@ static int w5100_readbulk_indirect(struct net_device *ndev, u32 addr, u8 *buf, · 107 unmodified lines | |||
| 375 | for (i = 0; i < len; i++) | 371 | for (i = 0; i < len; i++) |
| 376 | *buf++ = w5100_read_direct(ndev, W5100_IDM_DR); | 372 | *buf++ = w5100_read_direct(ndev, W5100_IDM_DR); |
| 377 | 373 | ||
| 378 | mmiowb(); | ||
| 379 | spin_unlock_irqrestore(&mmio_priv->reg_lock, flags); | 374 | spin_unlock_irqrestore(&mmio_priv->reg_lock, flags); |
| 380 | 375 | ||
| 381 | return 0; | 376 | return 0; |
| @@ -394,7 +389,6 @@ static int w5100_writebulk_indirect(struct net_device *ndev, u32 addr, · 12 unmodified lines | |||
| 394 | for (i = 0; i < len; i++) | 389 | for (i = 0; i < len; i++) |
| 395 | __w5100_write_direct(ndev, W5100_IDM_DR, *buf++); | 390 | __w5100_write_direct(ndev, W5100_IDM_DR, *buf++); |
| 396 | 391 | ||
| 397 | mmiowb(); | ||
| 398 | spin_unlock_irqrestore(&mmio_priv->reg_lock, flags); | 392 | spin_unlock_irqrestore(&mmio_priv->reg_lock, flags); |
| 399 | 393 | ||
| 400 | return 0; | 394 | return 0; |
| @@ -141,7 +141,6 @@ static u16 w5300_read_indirect(struct w5300_priv *priv, u16 addr) · 140 unmodified lines | |||
| 141 | 141 | ||
| 142 | spin_lock_irqsave(&priv->reg_lock, flags); | 142 | spin_lock_irqsave(&priv->reg_lock, flags); |
| 143 | w5300_write_direct(priv, W5300_IDM_AR, addr); | 143 | w5300_write_direct(priv, W5300_IDM_AR, addr); |
| 144 | mmiowb(); | ||
| 145 | data = w5300_read_direct(priv, W5300_IDM_DR); | 144 | data = w5300_read_direct(priv, W5300_IDM_DR); |
| 146 | spin_unlock_irqrestore(&priv->reg_lock, flags); | 145 | spin_unlock_irqrestore(&priv->reg_lock, flags); |
| 147 | 146 | ||
| @@ -154,9 +153,7 @@ static void w5300_write_indirect(struct w5300_priv *priv, u16 addr, u16 data) · 6 unmodified lines | |||
| 154 | 153 | ||
| 155 | spin_lock_irqsave(&priv->reg_lock, flags); | 154 | spin_lock_irqsave(&priv->reg_lock, flags); |
| 156 | w5300_write_direct(priv, W5300_IDM_AR, addr); | 155 | w5300_write_direct(priv, W5300_IDM_AR, addr); |
| 157 | mmiowb(); | ||
| 158 | w5300_write_direct(priv, W5300_IDM_DR, data); | 156 | w5300_write_direct(priv, W5300_IDM_DR, data); |
| 159 | mmiowb(); | ||
| 160 | spin_unlock_irqrestore(&priv->reg_lock, flags); | 157 | spin_unlock_irqrestore(&priv->reg_lock, flags); |
| 161 | } | 158 | } |
| 162 | 159 | ||
| @@ -192,7 +189,6 @@ static int w5300_command(struct w5300_priv *priv, u16 cmd) · 29 unmodified lines | |||
| 192 | unsigned long timeout = jiffies + msecs_to_jiffies(100); | 189 | unsigned long timeout = jiffies + msecs_to_jiffies(100); |
| 193 | 190 | ||
| 194 | w5300_write(priv, W5300_S0_CR, cmd); | 191 | w5300_write(priv, W5300_S0_CR, cmd); |
| 195 | mmiowb(); | ||
| 196 | 192 | ||
| 197 | while (w5300_read(priv, W5300_S0_CR) != 0) { | 193 | while (w5300_read(priv, W5300_S0_CR) != 0) { |
| 198 | if (time_after(jiffies, timeout)) | 194 | if (time_after(jiffies, timeout)) |
| @@ -241,18 +237,15 @@ static void w5300_write_macaddr(struct w5300_priv *priv) · 42 unmodified lines | |||
| 241 | w5300_write(priv, W5300_SHARH, | 237 | w5300_write(priv, W5300_SHARH, |
| 242 | ndev->dev_addr[4] << 8 | | 238 | ndev->dev_addr[4] << 8 | |
| 243 | ndev->dev_addr[5]); | 239 | ndev->dev_addr[5]); |
| 244 | mmiowb(); | ||
| 245 | } | 240 | } |
| 246 | 241 | ||
| 247 | static void w5300_hw_reset(struct w5300_priv *priv) | 242 | static void w5300_hw_reset(struct w5300_priv *priv) |
| 248 | { | 243 | { |
| 249 | w5300_write_direct(priv, W5300_MR, MR_RST); | 244 | w5300_write_direct(priv, W5300_MR, MR_RST); |
| 250 | mmiowb(); | ||
| 251 | mdelay(5); | 245 | mdelay(5); |
| 252 | w5300_write_direct(priv, W5300_MR, priv->indirect ? | 246 | w5300_write_direct(priv, W5300_MR, priv->indirect ? |
| 253 | MR_WDF(7) | MR_PB | MR_IND : | 247 | MR_WDF(7) | MR_PB | MR_IND : |
| 254 | MR_WDF(7) | MR_PB); | 248 | MR_WDF(7) | MR_PB); |
| 255 | mmiowb(); | ||
| 256 | w5300_write(priv, W5300_IMR, 0); | 249 | w5300_write(priv, W5300_IMR, 0); |
| 257 | w5300_write_macaddr(priv); | 250 | w5300_write_macaddr(priv); |
| 258 | 251 | ||
| @@ -264,24 +257,20 @@ static void w5300_hw_reset(struct w5300_priv *priv) · 5 unmodified lines | |||
| 264 | w5300_write32(priv, W5300_TMSRL, 64 << 24); | 257 | w5300_write32(priv, W5300_TMSRL, 64 << 24); |
| 265 | w5300_write32(priv, W5300_TMSRH, 0); | 258 | w5300_write32(priv, W5300_TMSRH, 0); |
| 266 | w5300_write(priv, W5300_MTYPE, 0x00ff); | 259 | w5300_write(priv, W5300_MTYPE, 0x00ff); |
| 267 | mmiowb(); | ||
| 268 | } | 260 | } |
| 269 | 261 | ||
| 270 | static void w5300_hw_start(struct w5300_priv *priv) | 262 | static void w5300_hw_start(struct w5300_priv *priv) |
| 271 | { | 263 | { |
| 272 | w5300_write(priv, W5300_S0_MR, priv->promisc ? | 264 | w5300_write(priv, W5300_S0_MR, priv->promisc ? |
| 273 | S0_MR_MACRAW : S0_MR_MACRAW_MF); | 265 | S0_MR_MACRAW : S0_MR_MACRAW_MF); |
| 274 | mmiowb(); | ||
| 275 | w5300_command(priv, S0_CR_OPEN); | 266 | w5300_command(priv, S0_CR_OPEN); |
| 276 | w5300_write(priv, W5300_S0_IMR, S0_IR_RECV | S0_IR_SENDOK); | 267 | w5300_write(priv, W5300_S0_IMR, S0_IR_RECV | S0_IR_SENDOK); |
| 277 | w5300_write(priv, W5300_IMR, IR_S0); | 268 | w5300_write(priv, W5300_IMR, IR_S0); |
| 278 | mmiowb(); | ||
| 279 | } | 269 | } |
| 280 | 270 | ||
| 281 | static void w5300_hw_close(struct w5300_priv *priv) | 271 | static void w5300_hw_close(struct w5300_priv *priv) |
| 282 | { | 272 | { |
| 283 | w5300_write(priv, W5300_IMR, 0); | 273 | w5300_write(priv, W5300_IMR, 0); |
| 284 | mmiowb(); | ||
| 285 | w5300_command(priv, S0_CR_CLOSE); | 274 | w5300_command(priv, S0_CR_CLOSE); |
| 286 | } | 275 | } |
| 287 | 276 | ||
| @@ -372,7 +361,6 @@ static netdev_tx_t w5300_start_tx(struct sk_buff *skb, struct net_device *ndev) · 84 unmodified lines | |||
| 372 | netif_stop_queue(ndev); | 361 | netif_stop_queue(ndev); |
| 373 | 362 | ||
| 374 | w5300_write_frame(priv, skb->data, skb->len); | 363 | w5300_write_frame(priv, skb->data, skb->len); |
| 375 | mmiowb(); | ||
| 376 | ndev->stats.tx_packets++; | 364 | ndev->stats.tx_packets++; |
| 377 | ndev->stats.tx_bytes += skb->len; | 365 | ndev->stats.tx_bytes += skb->len; |
| 378 | dev_kfree_skb(skb); | 366 | dev_kfree_skb(skb); |
| @@ -419,7 +407,6 @@ static int w5300_napi_poll(struct napi_struct *napi, int budget) · 40 unmodified lines | |||
| 419 | if (rx_count < budget) { | 407 | if (rx_count < budget) { |
| 420 | napi_complete_done(napi, rx_count); | 408 | napi_complete_done(napi, rx_count); |
| 421 | w5300_write(priv, W5300_IMR, IR_S0); | 409 | w5300_write(priv, W5300_IMR, IR_S0); |
| 422 | mmiowb(); | ||
| 423 | } | 410 | } |
| 424 | 411 | ||
| 425 | return rx_count; | 412 | return rx_count; |
| @@ -434,7 +421,6 @@ static irqreturn_t w5300_interrupt(int irq, void *ndev_instance) · 8 unmodified lines | |||
| 434 | if (!ir) | 421 | if (!ir) |
| 435 | return IRQ_NONE; | 422 | return IRQ_NONE; |
| 436 | w5300_write(priv, W5300_S0_IR, ir); | 423 | w5300_write(priv, W5300_S0_IR, ir); |
| 437 | mmiowb(); | ||
| 438 | 424 | ||
| 439 | if (ir & S0_IR_SENDOK) { | 425 | if (ir & S0_IR_SENDOK) { |
| 440 | netif_dbg(priv, tx_done, ndev, "tx done\n"); | 426 | netif_dbg(priv, tx_done, ndev, "tx done\n"); |
| @@ -444,7 +430,6 @@ static irqreturn_t w5300_interrupt(int irq, void *ndev_instance) · 3 unmodified lines | |||
| 444 | if (ir & S0_IR_RECV) { | 430 | if (ir & S0_IR_RECV) { |
| 445 | if (napi_schedule_prep(&priv->napi)) { | 431 | if (napi_schedule_prep(&priv->napi)) { |
| 446 | w5300_write(priv, W5300_IMR, 0); | 432 | w5300_write(priv, W5300_IMR, 0); |
| 447 | mmiowb(); | ||
| 448 | __napi_schedule(&priv->napi); | 433 | __napi_schedule(&priv->napi); |
| 449 | } | 434 | } |
| 450 | } | 435 | } |
| @@ -837,7 +837,6 @@ ath5k_txbuf_setup(struct ath5k_hw *ah, struct ath5k_buf *bf, · 836 unmodified lines | |||
| 837 | 837 | ||
| 838 | txq->link = &ds->ds_link; | 838 | txq->link = &ds->ds_link; |
| 839 | ath5k_hw_start_tx_dma(ah, txq->qnum); | 839 | ath5k_hw_start_tx_dma(ah, txq->qnum); |
| 840 | mmiowb(); | ||
| 841 | spin_unlock_bh(&txq->lock); | 840 | spin_unlock_bh(&txq->lock); |
| 842 | 841 | ||
| 843 | return 0; | 842 | return 0; |
| @@ -2174,7 +2173,6 @@ ath5k_beacon_config(struct ath5k_hw *ah) · 1330 unmodified lines | |||
| 2174 | } | 2173 | } |
| 2175 | 2174 | ||
| 2176 | ath5k_hw_set_imr(ah, ah->imask); | 2175 | ath5k_hw_set_imr(ah, ah->imask); |
| 2177 | mmiowb(); | ||
| 2178 | spin_unlock_bh(&ah->block); | 2176 | spin_unlock_bh(&ah->block); |
| 2179 | } | 2177 | } |
| 2180 | 2178 | ||
| @@ -2779,7 +2777,6 @@ int ath5k_start(struct ieee80211_hw *hw) · 598 unmodified lines | |||
| 2779 | 2777 | ||
| 2780 | ret = 0; | 2778 | ret = 0; |
| 2781 | done: | 2779 | done: |
| 2782 | mmiowb(); | ||
| 2783 | mutex_unlock(&ah->lock); | 2780 | mutex_unlock(&ah->lock); |
| 2784 | 2781 | ||
| 2785 | set_bit(ATH_STAT_STARTED, ah->status); | 2782 | set_bit(ATH_STAT_STARTED, ah->status); |
| @@ -2839,7 +2836,6 @@ void ath5k_stop(struct ieee80211_hw *hw) · 53 unmodified lines | |||
| 2839 | "putting device to sleep\n"); | 2836 | "putting device to sleep\n"); |
| 2840 | } | 2837 | } |
| 2841 | 2838 | ||
| 2842 | mmiowb(); | ||
| 2843 | mutex_unlock(&ah->lock); | 2839 | mutex_unlock(&ah->lock); |
| 2844 | 2840 | ||
| 2845 | ath5k_stop_tasklets(ah); | 2841 | ath5k_stop_tasklets(ah); |
| @@ -263,7 +263,6 @@ ath5k_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, · 262 unmodified lines | |||
| 263 | memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN); | 263 | memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN); |
| 264 | common->curaid = 0; | 264 | common->curaid = 0; |
| 265 | ath5k_hw_set_bssid(ah); | 265 | ath5k_hw_set_bssid(ah); |
| 266 | mmiowb(); | ||
| 267 | } | 266 | } |
| 268 | 267 | ||
| 269 | if (changes & BSS_CHANGED_BEACON_INT) | 268 | if (changes & BSS_CHANGED_BEACON_INT) |
| @@ -528,7 +527,6 @@ ath5k_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, · 258 unmodified lines | |||
| 528 | ret = -EINVAL; | 527 | ret = -EINVAL; |
| 529 | } | 528 | } |
| 530 | 529 | ||
| 531 | mmiowb(); | ||
| 532 | mutex_unlock(&ah->lock); | 530 | mutex_unlock(&ah->lock); |
| 533 | return ret; | 531 | return ret; |
| 534 | } | 532 | } |
| @@ -485,7 +485,6 @@ static void b43_ram_write(struct b43_wldev *dev, u16 offset, u32 val) · 484 unmodified lines | |||
| 485 | val = swab32(val); | 485 | val = swab32(val); |
| 486 | 486 | ||
| 487 | b43_write32(dev, B43_MMIO_RAM_CONTROL, offset); | 487 | b43_write32(dev, B43_MMIO_RAM_CONTROL, offset); |
| 488 | mmiowb(); | ||
| 489 | b43_write32(dev, B43_MMIO_RAM_DATA, val); | 488 | b43_write32(dev, B43_MMIO_RAM_DATA, val); |
| 490 | } | 489 | } |
| 491 | 490 | ||
| @@ -656,9 +655,7 @@ static void b43_tsf_write_locked(struct b43_wldev *dev, u64 tsf) · 164 unmodified lines | |||
| 656 | /* The hardware guarantees us an atomic write, if we | 655 | /* The hardware guarantees us an atomic write, if we |
| 657 | * write the low register first. */ | 656 | * write the low register first. */ |
| 658 | b43_write32(dev, B43_MMIO_REV3PLUS_TSF_LOW, low); | 657 | b43_write32(dev, B43_MMIO_REV3PLUS_TSF_LOW, low); |
| 659 | mmiowb(); | ||
| 660 | b43_write32(dev, B43_MMIO_REV3PLUS_TSF_HIGH, high); | 658 | b43_write32(dev, B43_MMIO_REV3PLUS_TSF_HIGH, high); |
| 661 | mmiowb(); | ||
| 662 | } | 659 | } |
| 663 | 660 | ||
| 664 | void b43_tsf_write(struct b43_wldev *dev, u64 tsf) | 661 | void b43_tsf_write(struct b43_wldev *dev, u64 tsf) |
| @@ -1822,11 +1819,9 @@ static void b43_beacon_update_trigger_work(struct work_struct *work) · 1157 unmodified lines | |||
| 1822 | if (b43_bus_host_is_sdio(dev->dev)) { | 1819 | if (b43_bus_host_is_sdio(dev->dev)) { |
| 1823 | /* wl->mutex is enough. */ | 1820 | /* wl->mutex is enough. */ |
| 1824 | b43_do_beacon_update_trigger_work(dev); | 1821 | b43_do_beacon_update_trigger_work(dev); |
| 1825 | mmiowb(); | ||
| 1826 | } else { | 1822 | } else { |
| 1827 | spin_lock_irq(&wl->hardirq_lock); | 1823 | spin_lock_irq(&wl->hardirq_lock); |
| 1828 | b43_do_beacon_update_trigger_work(dev); | 1824 | b43_do_beacon_update_trigger_work(dev); |
| 1829 | mmiowb(); | ||
| 1830 | spin_unlock_irq(&wl->hardirq_lock); | 1825 | spin_unlock_irq(&wl->hardirq_lock); |
| 1831 | } | 1826 | } |
| 1832 | } | 1827 | } |
| @@ -2078,7 +2073,6 @@ static irqreturn_t b43_interrupt_thread_handler(int irq, void *dev_id) · 245 unmodified lines | |||
| 2078 | 2073 | ||
| 2079 | mutex_lock(&dev->wl->mutex); | 2074 | mutex_lock(&dev->wl->mutex); |
| 2080 | b43_do_interrupt_thread(dev); | 2075 | b43_do_interrupt_thread(dev); |
| 2081 | mmiowb(); | ||
| 2082 | mutex_unlock(&dev->wl->mutex); | 2076 | mutex_unlock(&dev->wl->mutex); |
| 2083 | 2077 | ||
| 2084 | return IRQ_HANDLED; | 2078 | return IRQ_HANDLED; |
| @@ -2143,7 +2137,6 @@ static irqreturn_t b43_interrupt_handler(int irq, void *dev_id) · 58 unmodified lines | |||
| 2143 | 2137 | ||
| 2144 | spin_lock(&dev->wl->hardirq_lock); | 2138 | spin_lock(&dev->wl->hardirq_lock); |
| 2145 | ret = b43_do_interrupt(dev); | 2139 | ret = b43_do_interrupt(dev); |
| 2146 | mmiowb(); | ||
| 2147 | spin_unlock(&dev->wl->hardirq_lock); | 2140 | spin_unlock(&dev->wl->hardirq_lock); |
| 2148 | 2141 | ||
| 2149 | return ret; | 2142 | return ret; |
| @@ -129,7 +129,6 @@ static ssize_t b43_attr_interfmode_store(struct device *dev, · 128 unmodified lines | |||
| 129 | } else | 129 | } else |
| 130 | err = -ENOSYS; | 130 | err = -ENOSYS; |
| 131 | 131 | ||
| 132 | mmiowb(); | ||
| 133 | mutex_unlock(&wldev->wl->mutex); | 132 | mutex_unlock(&wldev->wl->mutex); |
| 134 | 133 | ||
| 135 | return err ? err : count; | 134 | return err ? err : count; |
| @@ -315,14 +315,12 @@ const u16 b43legacy_ilt_sigmasqr2[B43legacy_ILT_SIGMASQR_SIZE] = { · 314 unmodified lines | |||
| 315 | void b43legacy_ilt_write(struct b43legacy_wldev *dev, u16 offset, u16 val) | 315 | void b43legacy_ilt_write(struct b43legacy_wldev *dev, u16 offset, u16 val) |
| 316 | { | 316 | { |
| 317 | b43legacy_phy_write(dev, B43legacy_PHY_ILT_G_CTRL, offset); | 317 | b43legacy_phy_write(dev, B43legacy_PHY_ILT_G_CTRL, offset); |
| 318 | mmiowb(); | ||
| 319 | b43legacy_phy_write(dev, B43legacy_PHY_ILT_G_DATA1, val); | 318 | b43legacy_phy_write(dev, B43legacy_PHY_ILT_G_DATA1, val); |
| 320 | } | 319 | } |
| 321 | 320 | ||
| 322 | void b43legacy_ilt_write32(struct b43legacy_wldev *dev, u16 offset, u32 val) | 321 | void b43legacy_ilt_write32(struct b43legacy_wldev *dev, u16 offset, u32 val) |
| 323 | { | 322 | { |
| 324 | b43legacy_phy_write(dev, B43legacy_PHY_ILT_G_CTRL, offset); | 323 | b43legacy_phy_write(dev, B43legacy_PHY_ILT_G_CTRL, offset); |
| 325 | mmiowb(); | ||
| 326 | b43legacy_phy_write(dev, B43legacy_PHY_ILT_G_DATA2, | 324 | b43legacy_phy_write(dev, B43legacy_PHY_ILT_G_DATA2, |
| 327 | (val & 0xFFFF0000) >> 16); | 325 | (val & 0xFFFF0000) >> 16); |
| 328 | b43legacy_phy_write(dev, B43legacy_PHY_ILT_G_DATA1, | 326 | b43legacy_phy_write(dev, B43legacy_PHY_ILT_G_DATA1, |
| @@ -264,7 +264,6 @@ static void b43legacy_ram_write(struct b43legacy_wldev *dev, u16 offset, · 263 unmodified lines | |||
| 264 | val = swab32(val); | 264 | val = swab32(val); |
| 265 | 265 | ||
| 266 | b43legacy_write32(dev, B43legacy_MMIO_RAM_CONTROL, offset); | 266 | b43legacy_write32(dev, B43legacy_MMIO_RAM_CONTROL, offset); |
| 267 | mmiowb(); | ||
| 268 | b43legacy_write32(dev, B43legacy_MMIO_RAM_DATA, val); | 267 | b43legacy_write32(dev, B43legacy_MMIO_RAM_DATA, val); |
| 269 | } | 268 | } |
| 270 | 269 | ||
| @@ -341,14 +340,11 @@ void b43legacy_shm_write32(struct b43legacy_wldev *dev, · 70 unmodified lines | |||
| 341 | if (offset & 0x0003) { | 340 | if (offset & 0x0003) { |
| 342 | /* Unaligned access */ | 341 | /* Unaligned access */ |
| 343 | b43legacy_shm_control_word(dev, routing, offset >> 2); | 342 | b43legacy_shm_control_word(dev, routing, offset >> 2); |
| 344 | mmiowb(); | ||
| 345 | b43legacy_write16(dev, | 343 | b43legacy_write16(dev, |
| 346 | B43legacy_MMIO_SHM_DATA_UNALIGNED, | 344 | B43legacy_MMIO_SHM_DATA_UNALIGNED, |
| 347 | (value >> 16) & 0xffff); | 345 | (value >> 16) & 0xffff); |
| 348 | mmiowb(); | ||
| 349 | b43legacy_shm_control_word(dev, routing, | 346 | b43legacy_shm_control_word(dev, routing, |
| 350 | (offset >> 2) + 1); | 347 | (offset >> 2) + 1); |
| 351 | mmiowb(); | ||
| 352 | b43legacy_write16(dev, B43legacy_MMIO_SHM_DATA, | 348 | b43legacy_write16(dev, B43legacy_MMIO_SHM_DATA, |
| 353 | value & 0xffff); | 349 | value & 0xffff); |
| 354 | return; | 350 | return; |
| @@ -356,7 +352,6 @@ void b43legacy_shm_write32(struct b43legacy_wldev *dev, · 1 unmodified line | |||
| 356 | offset >>= 2; | 352 | offset >>= 2; |
| 357 | } | 353 | } |
| 358 | b43legacy_shm_control_word(dev, routing, offset); | 354 | b43legacy_shm_control_word(dev, routing, offset); |
| 359 | mmiowb(); | ||
| 360 | b43legacy_write32(dev, B43legacy_MMIO_SHM_DATA, value); | 355 | b43legacy_write32(dev, B43legacy_MMIO_SHM_DATA, value); |
| 361 | } | 356 | } |
| 362 | 357 | ||
| @@ -368,7 +363,6 @@ void b43legacy_shm_write16(struct b43legacy_wldev *dev, u16 routing, u16 offset, · 5 unmodified lines | |||
| 368 | if (offset & 0x0003) { | 363 | if (offset & 0x0003) { |
| 369 | /* Unaligned access */ | 364 | /* Unaligned access */ |
| 370 | b43legacy_shm_control_word(dev, routing, offset >> 2); | 365 | b43legacy_shm_control_word(dev, routing, offset >> 2); |
| 371 | mmiowb(); | ||
| 372 | b43legacy_write16(dev, | 366 | b43legacy_write16(dev, |
| 373 | B43legacy_MMIO_SHM_DATA_UNALIGNED, | 367 | B43legacy_MMIO_SHM_DATA_UNALIGNED, |
| 374 | value); | 368 | value); |
| @@ -377,7 +371,6 @@ void b43legacy_shm_write16(struct b43legacy_wldev *dev, u16 routing, u16 offset, · 2 unmodified lines | |||
| 377 | offset >>= 2; | 371 | offset >>= 2; |
| 378 | } | 372 | } |
| 379 | b43legacy_shm_control_word(dev, routing, offset); | 373 | b43legacy_shm_control_word(dev, routing, offset); |
| 380 | mmiowb(); | ||
| 381 | b43legacy_write16(dev, B43legacy_MMIO_SHM_DATA, value); | 374 | b43legacy_write16(dev, B43legacy_MMIO_SHM_DATA, value); |
| 382 | } | 375 | } |
| 383 | 376 | ||
| @@ -471,7 +464,6 @@ static void b43legacy_time_lock(struct b43legacy_wldev *dev) · 87 unmodified lines | |||
| 471 | status = b43legacy_read32(dev, B43legacy_MMIO_MACCTL); | 464 | status = b43legacy_read32(dev, B43legacy_MMIO_MACCTL); |
| 472 | status |= B43legacy_MACCTL_TBTTHOLD; | 465 | status |= B43legacy_MACCTL_TBTTHOLD; |
| 473 | b43legacy_write32(dev, B43legacy_MMIO_MACCTL, status); | 466 | b43legacy_write32(dev, B43legacy_MMIO_MACCTL, status); |
| 474 | mmiowb(); | ||
| 475 | } | 467 | } |
| 476 | 468 | ||
| 477 | static void b43legacy_time_unlock(struct b43legacy_wldev *dev) | 469 | static void b43legacy_time_unlock(struct b43legacy_wldev *dev) |
| @@ -494,10 +486,8 @@ static void b43legacy_tsf_write_locked(struct b43legacy_wldev *dev, u64 tsf) · 16 unmodified lines | |||
| 494 | u32 hi = (tsf & 0xFFFFFFFF00000000ULL) >> 32; | 486 | u32 hi = (tsf & 0xFFFFFFFF00000000ULL) >> 32; |
| 495 | 487 | ||
| 496 | b43legacy_write32(dev, B43legacy_MMIO_REV3PLUS_TSF_LOW, 0); | 488 | b43legacy_write32(dev, B43legacy_MMIO_REV3PLUS_TSF_LOW, 0); |
| 497 | mmiowb(); | ||
| 498 | b43legacy_write32(dev, B43legacy_MMIO_REV3PLUS_TSF_HIGH, | 489 | b43legacy_write32(dev, B43legacy_MMIO_REV3PLUS_TSF_HIGH, |
| 499 | hi); | 490 | hi); |
| 500 | mmiowb(); | ||
| 501 | b43legacy_write32(dev, B43legacy_MMIO_REV3PLUS_TSF_LOW, | 491 | b43legacy_write32(dev, B43legacy_MMIO_REV3PLUS_TSF_LOW, |
| 502 | lo); | 492 | lo); |
| 503 | } else { | 493 | } else { |
| @@ -507,13 +497,9 @@ static void b43legacy_tsf_write_locked(struct b43legacy_wldev *dev, u64 tsf) · 3 unmodified lines | |||
| 507 | u16 v3 = (tsf & 0xFFFF000000000000ULL) >> 48; | 497 | u16 v3 = (tsf & 0xFFFF000000000000ULL) >> 48; |
| 508 | 498 | ||
| 509 | b43legacy_write16(dev, B43legacy_MMIO_TSF_0, 0); | 499 | b43legacy_write16(dev, B43legacy_MMIO_TSF_0, 0); |
| 510 | mmiowb(); | ||
| 511 | b43legacy_write16(dev, B43legacy_MMIO_TSF_3, v3); | 500 | b43legacy_write16(dev, B43legacy_MMIO_TSF_3, v3); |
| 512 | mmiowb(); | ||
| 513 | b43legacy_write16(dev, B43legacy_MMIO_TSF_2, v2); | 501 | b43legacy_write16(dev, B43legacy_MMIO_TSF_2, v2); |
| 514 | mmiowb(); | ||
| 515 | b43legacy_write16(dev, B43legacy_MMIO_TSF_1, v1); | 502 | b43legacy_write16(dev, B43legacy_MMIO_TSF_1, v1); |
| 516 | mmiowb(); | ||
| 517 | b43legacy_write16(dev, B43legacy_MMIO_TSF_0, v0); | 503 | b43legacy_write16(dev, B43legacy_MMIO_TSF_0, v0); |
| 518 | } | 504 | } |
| 519 | } | 505 | } |
| @@ -1250,7 +1236,6 @@ static void b43legacy_beacon_update_trigger_work(struct work_struct *work) · 730 unmodified lines | |||
| 1250 | /* The handler might have updated the IRQ mask. */ | 1236 | /* The handler might have updated the IRQ mask. */ |
| 1251 | b43legacy_write32(dev, B43legacy_MMIO_GEN_IRQ_MASK, | 1237 | b43legacy_write32(dev, B43legacy_MMIO_GEN_IRQ_MASK, |
| 1252 | dev->irq_mask); | 1238 | dev->irq_mask); |
| 1253 | mmiowb(); | ||
| 1254 | spin_unlock_irq(&wl->irq_lock); | 1239 | spin_unlock_irq(&wl->irq_lock); |
| 1255 | } | 1240 | } |
| 1256 | mutex_unlock(&wl->mutex); | 1241 | mutex_unlock(&wl->mutex); |
| @@ -1346,7 +1331,6 @@ static void b43legacy_interrupt_tasklet(struct b43legacy_wldev *dev) · 89 unmodified lines | |||
| 1346 | dma_reason[2], dma_reason[3], | 1331 | dma_reason[2], dma_reason[3], |
| 1347 | dma_reason[4], dma_reason[5]); | 1332 | dma_reason[4], dma_reason[5]); |
| 1348 | b43legacy_controller_restart(dev, "DMA error"); | 1333 | b43legacy_controller_restart(dev, "DMA error"); |
| 1349 | mmiowb(); | ||
| 1350 | spin_unlock_irqrestore(&dev->wl->irq_lock, flags); | 1334 | spin_unlock_irqrestore(&dev->wl->irq_lock, flags); |
| 1351 | return; | 1335 | return; |
| 1352 | } | 1336 | } |
| @@ -1396,7 +1380,6 @@ static void b43legacy_interrupt_tasklet(struct b43legacy_wldev *dev) · 43 unmodified lines | |||
| 1396 | handle_irq_transmit_status(dev); | 1380 | handle_irq_transmit_status(dev); |
| 1397 | 1381 | ||
| 1398 | b43legacy_write32(dev, B43legacy_MMIO_GEN_IRQ_MASK, dev->irq_mask); | 1382 | b43legacy_write32(dev, B43legacy_MMIO_GEN_IRQ_MASK, dev->irq_mask); |
| 1399 | mmiowb(); | ||
| 1400 | spin_unlock_irqrestore(&dev->wl->irq_lock, flags); | 1383 | spin_unlock_irqrestore(&dev->wl->irq_lock, flags); |
| 1401 | } | 1384 | } |
| 1402 | 1385 | ||
| @@ -1488,7 +1471,6 @@ static irqreturn_t b43legacy_interrupt_handler(int irq, void *dev_id) · 85 unmodified lines | |||
| 1488 | dev->irq_reason = reason; | 1471 | dev->irq_reason = reason; |
| 1489 | tasklet_schedule(&dev->isr_tasklet); | 1472 | tasklet_schedule(&dev->isr_tasklet); |
| 1490 | out: | 1473 | out: |
| 1491 | mmiowb(); | ||
| 1492 | spin_unlock(&dev->wl->irq_lock); | 1474 | spin_unlock(&dev->wl->irq_lock); |
| 1493 | 1475 | ||
| 1494 | return ret; | 1476 | return ret; |
| @@ -2781,7 +2763,6 @@ static int b43legacy_op_dev_config(struct ieee80211_hw *hw, · 1286 unmodified lines | |||
| 2781 | 2763 | ||
| 2782 | spin_lock_irqsave(&wl->irq_lock, flags); | 2764 | spin_lock_irqsave(&wl->irq_lock, flags); |
| 2783 | b43legacy_write32(dev, B43legacy_MMIO_GEN_IRQ_MASK, dev->irq_mask); | 2765 | b43legacy_write32(dev, B43legacy_MMIO_GEN_IRQ_MASK, dev->irq_mask); |
| 2784 | mmiowb(); | ||
| 2785 | spin_unlock_irqrestore(&wl->irq_lock, flags); | 2766 | spin_unlock_irqrestore(&wl->irq_lock, flags); |
| 2786 | out_unlock_mutex: | 2767 | out_unlock_mutex: |
| 2787 | mutex_unlock(&wl->mutex); | 2768 | mutex_unlock(&wl->mutex); |
| @@ -2900,7 +2881,6 @@ static void b43legacy_op_bss_info_changed(struct ieee80211_hw *hw, · 112 unmodified lines | |||
| 2900 | spin_lock_irqsave(&wl->irq_lock, flags); | 2881 | spin_lock_irqsave(&wl->irq_lock, flags); |
| 2901 | b43legacy_write32(dev, B43legacy_MMIO_GEN_IRQ_MASK, dev->irq_mask); | 2882 | b43legacy_write32(dev, B43legacy_MMIO_GEN_IRQ_MASK, dev->irq_mask); |
| 2902 | /* XXX: why? */ | 2883 | /* XXX: why? */ |
| 2903 | mmiowb(); | ||
| 2904 | spin_unlock_irqrestore(&wl->irq_lock, flags); | 2884 | spin_unlock_irqrestore(&wl->irq_lock, flags); |
| 2905 | out_unlock_mutex: | 2885 | out_unlock_mutex: |
| 2906 | mutex_unlock(&wl->mutex); | 2886 | mutex_unlock(&wl->mutex); |
| @@ -134,7 +134,6 @@ u16 b43legacy_phy_read(struct b43legacy_wldev *dev, u16 offset) · 133 unmodified lines | |||
| 134 | void b43legacy_phy_write(struct b43legacy_wldev *dev, u16 offset, u16 val) | 134 | void b43legacy_phy_write(struct b43legacy_wldev *dev, u16 offset, u16 val) |
| 135 | { | 135 | { |
| 136 | b43legacy_write16(dev, B43legacy_MMIO_PHY_CONTROL, offset); | 136 | b43legacy_write16(dev, B43legacy_MMIO_PHY_CONTROL, offset); |
| 137 | mmiowb(); | ||
| 138 | b43legacy_write16(dev, B43legacy_MMIO_PHY_DATA, val); | 137 | b43legacy_write16(dev, B43legacy_MMIO_PHY_DATA, val); |
| 139 | } | 138 | } |
| 140 | 139 | ||
| @@ -92,7 +92,6 @@ void b43legacy_pio_write(struct b43legacy_pioqueue *queue, · 91 unmodified lines | |||
| 92 | u16 offset, u16 value) | 92 | u16 offset, u16 value) |
| 93 | { | 93 | { |
| 94 | b43legacy_write16(queue->dev, queue->mmio_base + offset, value); | 94 | b43legacy_write16(queue->dev, queue->mmio_base + offset, value); |
| 95 | mmiowb(); | ||
| 96 | } | 95 | } |
| 97 | 96 | ||
| 98 | 97 | ||
| @@ -95,7 +95,6 @@ void b43legacy_radio_lock(struct b43legacy_wldev *dev) · 94 unmodified lines | |||
| 95 | B43legacy_WARN_ON(status & B43legacy_MACCTL_RADIOLOCK); | 95 | B43legacy_WARN_ON(status & B43legacy_MACCTL_RADIOLOCK); |
| 96 | status |= B43legacy_MACCTL_RADIOLOCK; | 96 | status |= B43legacy_MACCTL_RADIOLOCK; |
| 97 | b43legacy_write32(dev, B43legacy_MMIO_MACCTL, status); | 97 | b43legacy_write32(dev, B43legacy_MMIO_MACCTL, status); |
| 98 | mmiowb(); | ||
| 99 | udelay(10); | 98 | udelay(10); |
| 100 | } | 99 | } |
| 101 | 100 | ||
| @@ -108,7 +107,6 @@ void b43legacy_radio_unlock(struct b43legacy_wldev *dev) · 6 unmodified lines | |||
| 108 | B43legacy_WARN_ON(!(status & B43legacy_MACCTL_RADIOLOCK)); | 107 | B43legacy_WARN_ON(!(status & B43legacy_MACCTL_RADIOLOCK)); |
| 109 | status &= ~B43legacy_MACCTL_RADIOLOCK; | 108 | status &= ~B43legacy_MACCTL_RADIOLOCK; |
| 110 | b43legacy_write32(dev, B43legacy_MMIO_MACCTL, status); | 109 | b43legacy_write32(dev, B43legacy_MMIO_MACCTL, status); |
| 111 | mmiowb(); | ||
| 112 | } | 110 | } |
| 113 | 111 | ||
| 114 | u16 b43legacy_radio_read16(struct b43legacy_wldev *dev, u16 offset) | 112 | u16 b43legacy_radio_read16(struct b43legacy_wldev *dev, u16 offset) |
| @@ -141,7 +139,6 @@ u16 b43legacy_radio_read16(struct b43legacy_wldev *dev, u16 offset) · 26 unmodified lines | |||
| 141 | void b43legacy_radio_write16(struct b43legacy_wldev *dev, u16 offset, u16 val) | 139 | void b43legacy_radio_write16(struct b43legacy_wldev *dev, u16 offset, u16 val) |
| 142 | { | 140 | { |
| 143 | b43legacy_write16(dev, B43legacy_MMIO_RADIO_CONTROL, offset); | 141 | b43legacy_write16(dev, B43legacy_MMIO_RADIO_CONTROL, offset); |
| 144 | mmiowb(); | ||
| 145 | b43legacy_write16(dev, B43legacy_MMIO_RADIO_DATA_LOW, val); | 142 | b43legacy_write16(dev, B43legacy_MMIO_RADIO_DATA_LOW, val); |
| 146 | } | 143 | } |
| 147 | 144 | ||
| @@ -333,7 +330,6 @@ u8 b43legacy_radio_aci_scan(struct b43legacy_wldev *dev) · 185 unmodified lines | |||
| 333 | void b43legacy_nrssi_hw_write(struct b43legacy_wldev *dev, u16 offset, s16 val) | 330 | void b43legacy_nrssi_hw_write(struct b43legacy_wldev *dev, u16 offset, s16 val) |
| 334 | { | 331 | { |
| 335 | b43legacy_phy_write(dev, B43legacy_PHY_NRSSILT_CTRL, offset); | 332 | b43legacy_phy_write(dev, B43legacy_PHY_NRSSILT_CTRL, offset); |
| 336 | mmiowb(); | ||
| 337 | b43legacy_phy_write(dev, B43legacy_PHY_NRSSILT_DATA, (u16)val); | 333 | b43legacy_phy_write(dev, B43legacy_PHY_NRSSILT_DATA, (u16)val); |
| 338 | } | 334 | } |
| 339 | 335 | ||
| @@ -143,7 +143,6 @@ static ssize_t b43legacy_attr_interfmode_store(struct device *dev, · 142 unmodified lines | |||
| 143 | if (err) | 143 | if (err) |
| 144 | b43legacyerr(wldev->wl, "Interference Mitigation not " | 144 | b43legacyerr(wldev->wl, "Interference Mitigation not " |
| 145 | "supported by device\n"); | 145 | "supported by device\n"); |
| 146 | mmiowb(); | ||
| 147 | spin_unlock_irqrestore(&wldev->wl->irq_lock, flags); | 146 | spin_unlock_irqrestore(&wldev->wl->irq_lock, flags); |
| 148 | mutex_unlock(&wldev->wl->mutex); | 147 | mutex_unlock(&wldev->wl->mutex); |
| 149 | 148 | ||
| @@ -2030,13 +2030,6 @@ static inline void · 2029 unmodified lines | |||
| 2030 | _il_release_nic_access(struct il_priv *il) | 2030 | _il_release_nic_access(struct il_priv *il) |
| 2031 | { | 2031 | { |
| 2032 | _il_clear_bit(il, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); | 2032 | _il_clear_bit(il, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); |
| 2033 | /* | ||
| 2034 | * In above we are reading CSR_GP_CNTRL register, what will flush any | ||
| 2035 | * previous writes, but still want write, which clear MAC_ACCESS_REQ | ||
| 2036 | * bit, be performed on PCI bus before any other writes scheduled on | ||
| 2037 | * different CPUs (after we drop reg_lock). | ||
| 2038 | */ | ||
| 2039 | mmiowb(); | ||
| 2040 | } | 2033 | } |
| 2041 | 2034 | ||
| 2042 | static inline u32 | 2035 | static inline u32 |
| @@ -2067,7 +2067,6 @@ static void iwl_trans_pcie_release_nic_access(struct iwl_trans *trans, · 2066 unmodified lines | |||
| 2067 | * MAC_ACCESS_REQ bit to be performed before any other writes | 2067 | * MAC_ACCESS_REQ bit to be performed before any other writes |
| 2068 | * scheduled on different CPUs (after we drop reg_lock). | 2068 | * scheduled on different CPUs (after we drop reg_lock). |
| 2069 | */ | 2069 | */ |
| 2070 | mmiowb(); | ||
| 2071 | out: | 2070 | out: |
| 2072 | spin_unlock_irqrestore(&trans_pcie->reg_lock, *flags); | 2071 | spin_unlock_irqrestore(&trans_pcie->reg_lock, *flags); |
| 2073 | } | 2072 | } |
| @@ -358,8 +358,6 @@ static void idt_sw_write(struct idt_ntb_dev *ndev, · 357 unmodified lines | |||
| 358 | iowrite32((u32)reg, ndev->cfgspc + (ptrdiff_t)IDT_NT_GASAADDR); | 358 | iowrite32((u32)reg, ndev->cfgspc + (ptrdiff_t)IDT_NT_GASAADDR); |
| 359 | /* Put the new value of the register */ | 359 | /* Put the new value of the register */ |
| 360 | iowrite32(data, ndev->cfgspc + (ptrdiff_t)IDT_NT_GASADATA); | 360 | iowrite32(data, ndev->cfgspc + (ptrdiff_t)IDT_NT_GASADATA); |
| 361 | /* Make sure the PCIe transactions are executed */ | ||
| 362 | mmiowb(); | ||
| 363 | /* Unlock GASA registers operations */ | 361 | /* Unlock GASA registers operations */ |
| 364 | spin_unlock_irqrestore(&ndev->gasa_lock, irqflags); | 362 | spin_unlock_irqrestore(&ndev->gasa_lock, irqflags); |
| 365 | } | 363 | } |
| @@ -750,7 +748,6 @@ static void idt_ntb_local_link_enable(struct idt_ntb_dev *ndev) · 384 unmodified lines | |||
| 750 | spin_lock_irqsave(&ndev->mtbl_lock, irqflags); | 748 | spin_lock_irqsave(&ndev->mtbl_lock, irqflags); |
| 751 | idt_nt_write(ndev, IDT_NT_NTMTBLADDR, ndev->part); | 749 | idt_nt_write(ndev, IDT_NT_NTMTBLADDR, ndev->part); |
| 752 | idt_nt_write(ndev, IDT_NT_NTMTBLDATA, mtbldata); | 750 | idt_nt_write(ndev, IDT_NT_NTMTBLDATA, mtbldata); |
| 753 | mmiowb(); | ||
| 754 | spin_unlock_irqrestore(&ndev->mtbl_lock, irqflags); | 751 | spin_unlock_irqrestore(&ndev->mtbl_lock, irqflags); |
| 755 | 752 | ||
| 756 | /* Notify the peers by setting and clearing the global signal bit */ | 753 | /* Notify the peers by setting and clearing the global signal bit */ |
| @@ -778,7 +775,6 @@ static void idt_ntb_local_link_disable(struct idt_ntb_dev *ndev) · 21 unmodified lines | |||
| 778 | spin_lock_irqsave(&ndev->mtbl_lock, irqflags); | 775 | spin_lock_irqsave(&ndev->mtbl_lock, irqflags); |
| 779 | idt_nt_write(ndev, IDT_NT_NTMTBLADDR, ndev->part); | 776 | idt_nt_write(ndev, IDT_NT_NTMTBLADDR, ndev->part); |
| 780 | idt_nt_write(ndev, IDT_NT_NTMTBLDATA, 0); | 777 | idt_nt_write(ndev, IDT_NT_NTMTBLDATA, 0); |
| 781 | mmiowb(); | ||
| 782 | spin_unlock_irqrestore(&ndev->mtbl_lock, irqflags); | 778 | spin_unlock_irqrestore(&ndev->mtbl_lock, irqflags); |
| 783 | 779 | ||
| 784 | /* Notify the peers by setting and clearing the global signal bit */ | 780 | /* Notify the peers by setting and clearing the global signal bit */ |
| @@ -1339,7 +1335,6 @@ static int idt_ntb_peer_mw_set_trans(struct ntb_dev *ntb, int pidx, int widx, · 554 unmodified lines | |||
| 1339 | idt_nt_write(ndev, IDT_NT_LUTLDATA, (u32)addr); | 1335 | idt_nt_write(ndev, IDT_NT_LUTLDATA, (u32)addr); |
| 1340 | idt_nt_write(ndev, IDT_NT_LUTMDATA, (u32)(addr >> 32)); | 1336 | idt_nt_write(ndev, IDT_NT_LUTMDATA, (u32)(addr >> 32)); |
| 1341 | idt_nt_write(ndev, IDT_NT_LUTUDATA, data); | 1337 | idt_nt_write(ndev, IDT_NT_LUTUDATA, data); |
| 1342 | mmiowb(); | ||
| 1343 | spin_unlock_irqrestore(&ndev->lut_lock, irqflags); | 1338 | spin_unlock_irqrestore(&ndev->lut_lock, irqflags); |
| 1344 | /* Limit address isn't specified since size is fixed for LUT */ | 1339 | /* Limit address isn't specified since size is fixed for LUT */ |
| 1345 | } | 1340 | } |
| @@ -1393,7 +1388,6 @@ static int idt_ntb_peer_mw_clear_trans(struct ntb_dev *ntb, int pidx, · 47 unmodified lines | |||
| 1393 | idt_nt_write(ndev, IDT_NT_LUTLDATA, 0); | 1388 | idt_nt_write(ndev, IDT_NT_LUTLDATA, 0); |
| 1394 | idt_nt_write(ndev, IDT_NT_LUTMDATA, 0); | 1389 | idt_nt_write(ndev, IDT_NT_LUTMDATA, 0); |
| 1395 | idt_nt_write(ndev, IDT_NT_LUTUDATA, 0); | 1390 | idt_nt_write(ndev, IDT_NT_LUTUDATA, 0); |
| 1396 | mmiowb(); | ||
| 1397 | spin_unlock_irqrestore(&ndev->lut_lock, irqflags); | 1391 | spin_unlock_irqrestore(&ndev->lut_lock, irqflags); |
| 1398 | } | 1392 | } |
| 1399 | 1393 | ||
| @@ -1812,7 +1806,6 @@ static int idt_ntb_peer_msg_write(struct ntb_dev *ntb, int pidx, int midx, · 412 unmodified lines | |||
| 1812 | /* Set the route and send the data */ | 1806 | /* Set the route and send the data */ |
| 1813 | idt_sw_write(ndev, partdata_tbl[ndev->part].msgctl[midx], swpmsgctl); | 1807 | idt_sw_write(ndev, partdata_tbl[ndev->part].msgctl[midx], swpmsgctl); |
| 1814 | idt_nt_write(ndev, ntdata_tbl.msgs[midx].out, msg); | 1808 | idt_nt_write(ndev, ntdata_tbl.msgs[midx].out, msg); |
| 1815 | mmiowb(); | ||
| 1816 | /* Unlock the messages routing table */ | 1809 | /* Unlock the messages routing table */ |
| 1817 | spin_unlock_irqrestore(&ndev->msg_locks[midx], irqflags); | 1810 | spin_unlock_irqrestore(&ndev->msg_locks[midx], irqflags); |
| 1818 | 1811 | ||
| @@ -284,11 +284,9 @@ static int perf_spad_cmd_send(struct perf_peer *peer, enum perf_cmd cmd, · 283 unmodified lines | |||
| 284 | ntb_peer_spad_write(perf->ntb, peer->pidx, | 284 | ntb_peer_spad_write(perf->ntb, peer->pidx, |
| 285 | PERF_SPAD_HDATA(perf->gidx), | 285 | PERF_SPAD_HDATA(perf->gidx), |
| 286 | upper_32_bits(data)); | 286 | upper_32_bits(data)); |
| 287 | mmiowb(); | ||
| 288 | ntb_peer_spad_write(perf->ntb, peer->pidx, | 287 | ntb_peer_spad_write(perf->ntb, peer->pidx, |
| 289 | PERF_SPAD_CMD(perf->gidx), | 288 | PERF_SPAD_CMD(perf->gidx), |
| 290 | cmd); | 289 | cmd); |
| 291 | mmiowb(); | ||
| 292 | ntb_peer_db_set(perf->ntb, PERF_SPAD_NOTIFY(peer->gidx)); | 290 | ntb_peer_db_set(perf->ntb, PERF_SPAD_NOTIFY(peer->gidx)); |
| 293 | 291 | ||
| 294 | dev_dbg(&perf->ntb->dev, "DB ring peer %#llx\n", | 292 | dev_dbg(&perf->ntb->dev, "DB ring peer %#llx\n", |
| @@ -379,7 +377,6 @@ static int perf_msg_cmd_send(struct perf_peer *peer, enum perf_cmd cmd, · 84 unmodified lines | |||
| 379 | 377 | ||
| 380 | ntb_peer_msg_write(perf->ntb, peer->pidx, PERF_MSG_HDATA, | 378 | ntb_peer_msg_write(perf->ntb, peer->pidx, PERF_MSG_HDATA, |
| 381 | upper_32_bits(data)); | 379 | upper_32_bits(data)); |
| 382 | mmiowb(); | ||
| 383 | 380 | ||
| 384 | /* This call shall trigger peer message event */ | 381 | /* This call shall trigger peer message event */ |
| 385 | ntb_peer_msg_write(perf->ntb, peer->pidx, PERF_MSG_CMD, cmd); | 382 | ntb_peer_msg_write(perf->ntb, peer->pidx, PERF_MSG_CMD, cmd); |
| @@ -62,8 +62,7 @@ void bfa_isr_unhandled(struct bfa_s *bfa, struct bfi_msg_s *m); · 61 unmodified lines | |||
| 62 | ((__bfa)->iocfc.cfg.drvcfg.num_reqq_elems - 1); \ | 62 | ((__bfa)->iocfc.cfg.drvcfg.num_reqq_elems - 1); \ |
| 63 | writel((__bfa)->iocfc.req_cq_pi[__reqq], \ | 63 | writel((__bfa)->iocfc.req_cq_pi[__reqq], \ |
| 64 | (__bfa)->iocfc.bfa_regs.cpe_q_pi[__reqq]); \ | 64 | (__bfa)->iocfc.bfa_regs.cpe_q_pi[__reqq]); \ |
| 65 | mmiowb(); \ | 65 | } while (0) |
| 66 | } while (0) | ||
| 67 | 66 | ||
| 68 | #define bfa_rspq_pi(__bfa, __rspq) \ | 67 | #define bfa_rspq_pi(__bfa, __rspq) \ |
| 69 | (*(u32 *)((__bfa)->iocfc.rsp_cq_shadow_pi[__rspq].kva)) | 68 | (*(u32 *)((__bfa)->iocfc.rsp_cq_shadow_pi[__rspq].kva)) |
| @@ -61,7 +61,6 @@ bfa_hwcb_rspq_ack_msix(struct bfa_s *bfa, int rspq, u32 ci) · 60 unmodified lines | |||
| 61 | 61 | ||
| 62 | bfa_rspq_ci(bfa, rspq) = ci; | 62 | bfa_rspq_ci(bfa, rspq) = ci; |
| 63 | writel(ci, bfa->iocfc.bfa_regs.rme_q_ci[rspq]); | 63 | writel(ci, bfa->iocfc.bfa_regs.rme_q_ci[rspq]); |
| 64 | mmiowb(); | ||
| 65 | } | 64 | } |
| 66 | 65 | ||
| 67 | void | 66 | void |
| @@ -72,7 +71,6 @@ bfa_hwcb_rspq_ack(struct bfa_s *bfa, int rspq, u32 ci) · 4 unmodified lines | |||
| 72 | 71 | ||
| 73 | bfa_rspq_ci(bfa, rspq) = ci; | 72 | bfa_rspq_ci(bfa, rspq) = ci; |
| 74 | writel(ci, bfa->iocfc.bfa_regs.rme_q_ci[rspq]); | 73 | writel(ci, bfa->iocfc.bfa_regs.rme_q_ci[rspq]); |
| 75 | mmiowb(); | ||
| 76 | } | 74 | } |
| 77 | 75 | ||
| 78 | void | 76 | void |
| @@ -81,7 +81,6 @@ bfa_hwct_rspq_ack(struct bfa_s *bfa, int rspq, u32 ci) · 80 unmodified lines | |||
| 81 | 81 | ||
| 82 | bfa_rspq_ci(bfa, rspq) = ci; | 82 | bfa_rspq_ci(bfa, rspq) = ci; |
| 83 | writel(ci, bfa->iocfc.bfa_regs.rme_q_ci[rspq]); | 83 | writel(ci, bfa->iocfc.bfa_regs.rme_q_ci[rspq]); |
| 84 | mmiowb(); | ||
| 85 | } | 84 | } |
| 86 | 85 | ||
| 87 | /* | 86 | /* |
| @@ -94,7 +93,6 @@ bfa_hwct2_rspq_ack(struct bfa_s *bfa, int rspq, u32 ci) · 6 unmodified lines | |||
| 94 | { | 93 | { |
| 95 | bfa_rspq_ci(bfa, rspq) = ci; | 94 | bfa_rspq_ci(bfa, rspq) = ci; |
| 96 | writel(ci, bfa->iocfc.bfa_regs.rme_q_ci[rspq]); | 95 | writel(ci, bfa->iocfc.bfa_regs.rme_q_ci[rspq]); |
| 97 | mmiowb(); | ||
| 98 | } | 96 | } |
| 99 | 97 | ||
| 100 | void | 98 | void |
| @@ -991,7 +991,6 @@ void bnx2fc_arm_cq(struct bnx2fc_rport *tgt) · 990 unmodified lines | |||
| 991 | FCOE_CQE_TOGGLE_BIT_SHIFT); | 991 | FCOE_CQE_TOGGLE_BIT_SHIFT); |
| 992 | msg = *((u32 *)rx_db); | 992 | msg = *((u32 *)rx_db); |
| 993 | writel(cpu_to_le32(msg), tgt->ctx_base); | 993 | writel(cpu_to_le32(msg), tgt->ctx_base); |
| 994 | mmiowb(); | ||
| 995 | 994 | ||
| 996 | } | 995 | } |
| 997 | 996 | ||
| @@ -1409,7 +1408,6 @@ void bnx2fc_ring_doorbell(struct bnx2fc_rport *tgt) · 411 unmodified lines | |||
| 1409 | (tgt->sq_curr_toggle_bit << 15); | 1408 | (tgt->sq_curr_toggle_bit << 15); |
| 1410 | msg = *((u32 *)sq_db); | 1409 | msg = *((u32 *)sq_db); |
| 1411 | writel(cpu_to_le32(msg), tgt->ctx_base); | 1410 | writel(cpu_to_le32(msg), tgt->ctx_base); |
| 1412 | mmiowb(); | ||
| 1413 | 1411 | ||
| 1414 | } | 1412 | } |
| 1415 | 1413 | ||
| @@ -253,7 +253,6 @@ void bnx2i_put_rq_buf(struct bnx2i_conn *bnx2i_conn, int count) · 252 unmodified lines | |||
| 253 | writew(ep->qp.rq_prod_idx, | 253 | writew(ep->qp.rq_prod_idx, |
| 254 | ep->qp.ctx_base + CNIC_RECV_DOORBELL); | 254 | ep->qp.ctx_base + CNIC_RECV_DOORBELL); |
| 255 | } | 255 | } |
| 256 | mmiowb(); | ||
| 257 | } | 256 | } |
| 258 | 257 | ||
| 259 | 258 | ||
| @@ -279,8 +278,6 @@ static void bnx2i_ring_sq_dbell(struct bnx2i_conn *bnx2i_conn, int count) · 19 unmodified lines | |||
| 279 | bnx2i_ring_577xx_doorbell(bnx2i_conn); | 278 | bnx2i_ring_577xx_doorbell(bnx2i_conn); |
| 280 | } else | 279 | } else |
| 281 | writew(count, ep->qp.ctx_base + CNIC_SEND_DOORBELL); | 280 | writew(count, ep->qp.ctx_base + CNIC_SEND_DOORBELL); |
| 282 | |||
| 283 | mmiowb(); | ||
| 284 | } | 281 | } |
| 285 | 282 | ||
| 286 | 283 | ||
| @@ -815,7 +815,6 @@ megasas_fire_cmd_skinny(struct megasas_instance *instance, · 814 unmodified lines | |||
| 815 | &(regs)->inbound_high_queue_port); | 815 | &(regs)->inbound_high_queue_port); |
| 816 | writel((lower_32_bits(frame_phys_addr) | (frame_count<<1))|1, | 816 | writel((lower_32_bits(frame_phys_addr) | (frame_count<<1))|1, |
| 817 | &(regs)->inbound_low_queue_port); | 817 | &(regs)->inbound_low_queue_port); |
| 818 | mmiowb(); | ||
| 819 | spin_unlock_irqrestore(&instance->hba_lock, flags); | 818 | spin_unlock_irqrestore(&instance->hba_lock, flags); |
| 820 | } | 819 | } |
| 821 | 820 | ||
| @@ -242,7 +242,6 @@ megasas_fire_cmd_fusion(struct megasas_instance *instance, · 241 unmodified lines | |||
| 242 | &instance->reg_set->inbound_low_queue_port); | 242 | &instance->reg_set->inbound_low_queue_port); |
| 243 | writel(le32_to_cpu(req_desc->u.high), | 243 | writel(le32_to_cpu(req_desc->u.high), |
| 244 | &instance->reg_set->inbound_high_queue_port); | 244 | &instance->reg_set->inbound_high_queue_port); |
| 245 | mmiowb(); | ||
| 246 | spin_unlock_irqrestore(&instance->hba_lock, flags); | 245 | spin_unlock_irqrestore(&instance->hba_lock, flags); |
| 247 | #endif | 246 | #endif |
| 248 | } | 247 | } |
| @@ -3333,7 +3333,6 @@ _base_mpi_ep_writeq(__u64 b, volatile void __iomem *addr, · 3332 unmodified lines | |||
| 3333 | spin_lock_irqsave(writeq_lock, flags); | 3333 | spin_lock_irqsave(writeq_lock, flags); |
| 3334 | __raw_writel((u32)(b), addr); | 3334 | __raw_writel((u32)(b), addr); |
| 3335 | __raw_writel((u32)(b >> 32), (addr + 4)); | 3335 | __raw_writel((u32)(b >> 32), (addr + 4)); |
| 3336 | mmiowb(); | ||
| 3337 | spin_unlock_irqrestore(writeq_lock, flags); | 3336 | spin_unlock_irqrestore(writeq_lock, flags); |
| 3338 | } | 3337 | } |
| 3339 | 3338 | ||
| @@ -807,7 +807,6 @@ void qedf_ring_doorbell(struct qedf_rport *fcport) · 806 unmodified lines | |||
| 807 | writel(*(u32 *)&dbell, fcport->p_doorbell); | 807 | writel(*(u32 *)&dbell, fcport->p_doorbell); |
| 808 | /* Make sure SQ index is updated so f/w prcesses requests in order */ | 808 | /* Make sure SQ index is updated so f/w prcesses requests in order */ |
| 809 | wmb(); | 809 | wmb(); |
| 810 | mmiowb(); | ||
| 811 | } | 810 | } |
| 812 | 811 | ||
| 813 | static void qedf_trace_io(struct qedf_rport *fcport, struct qedf_ioreq *io_req, | 812 | static void qedf_trace_io(struct qedf_rport *fcport, struct qedf_ioreq *io_req, |
| @@ -985,7 +985,6 @@ static void qedi_ring_doorbell(struct qedi_conn *qedi_conn) · 984 unmodified lines | |||
| 985 | * others they are two different assembly operations. | 985 | * others they are two different assembly operations. |
| 986 | */ | 986 | */ |
| 987 | wmb(); | 987 | wmb(); |
| 988 | mmiowb(); | ||
| 989 | QEDI_INFO(&qedi_conn->qedi->dbg_ctx, QEDI_LOG_MP_REQ, | 988 | QEDI_INFO(&qedi_conn->qedi->dbg_ctx, QEDI_LOG_MP_REQ, |
| 990 | "prod_idx=0x%x, fw_prod_idx=0x%x, cid=0x%x\n", | 989 | "prod_idx=0x%x, fw_prod_idx=0x%x, cid=0x%x\n", |
| 991 | qedi_conn->ep->sq_prod_idx, qedi_conn->ep->fw_sq_prod_idx, | 990 | qedi_conn->ep->sq_prod_idx, qedi_conn->ep->fw_sq_prod_idx, |
| @@ -3004,8 +3004,6 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) · 3003 unmodified lines | |||
| 3004 | sp->flags |= SRB_SENT; | 3004 | sp->flags |= SRB_SENT; |
| 3005 | ha->actthreads++; | 3005 | ha->actthreads++; |
| 3006 | WRT_REG_WORD(®->mailbox4, ha->req_ring_index); | 3006 | WRT_REG_WORD(®->mailbox4, ha->req_ring_index); |
| 3007 | /* Enforce mmio write ordering; see comment in qla1280_isp_cmd(). */ | ||
| 3008 | mmiowb(); | ||
| 3009 | 3007 | ||
| 3010 | out: | 3008 | out: |
| 3011 | if (status) | 3009 | if (status) |
| @@ -3254,8 +3252,6 @@ qla1280_32bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) · 242 unmodified lines | |||
| 3254 | sp->flags |= SRB_SENT; | 3252 | sp->flags |= SRB_SENT; |
| 3255 | ha->actthreads++; | 3253 | ha->actthreads++; |
| 3256 | WRT_REG_WORD(®->mailbox4, ha->req_ring_index); | 3254 | WRT_REG_WORD(®->mailbox4, ha->req_ring_index); |
| 3257 | /* Enforce mmio write ordering; see comment in qla1280_isp_cmd(). */ | ||
| 3258 | mmiowb(); | ||
| 3259 | 3255 | ||
| 3260 | out: | 3256 | out: |
| 3261 | if (status) | 3257 | if (status) |
| @@ -3379,7 +3375,6 @@ qla1280_isp_cmd(struct scsi_qla_host *ha) · 117 unmodified lines | |||
| 3379 | * See Documentation/driver-api/device-io.rst for more information. | 3375 | * See Documentation/driver-api/device-io.rst for more information. |
| 3380 | */ | 3376 | */ |
| 3381 | WRT_REG_WORD(®->mailbox4, ha->req_ring_index); | 3377 | WRT_REG_WORD(®->mailbox4, ha->req_ring_index); |
| 3382 | mmiowb(); | ||
| 3383 | 3378 | ||
| 3384 | LEAVE("qla1280_isp_cmd"); | 3379 | LEAVE("qla1280_isp_cmd"); |
| 3385 | } | 3380 | } |
| @@ -305,7 +305,6 @@ static int sprom_do_write(struct ssb_bus *bus, const u16 *sprom) · 304 unmodified lines | |||
| 305 | else if (i % 2) | 305 | else if (i % 2) |
| 306 | pr_cont("."); | 306 | pr_cont("."); |
| 307 | writew(sprom[i], bus->mmio + bus->sprom_offset + (i * 2)); | 307 | writew(sprom[i], bus->mmio + bus->sprom_offset + (i * 2)); |
| 308 | mmiowb(); | ||
| 309 | msleep(20); | 308 | msleep(20); |
| 310 | } | 309 | } |
| 311 | err = pci_read_config_dword(pdev, SSB_SPROMCTL, &spromctl); | 310 | err = pci_read_config_dword(pdev, SSB_SPROMCTL, &spromctl); |
| @@ -338,7 +338,6 @@ static void ssb_pcmcia_write8(struct ssb_device *dev, u16 offset, u8 value) · 337 unmodified lines | |||
| 338 | err = select_core_and_segment(dev, &offset); | 338 | err = select_core_and_segment(dev, &offset); |
| 339 | if (likely(!err)) | 339 | if (likely(!err)) |
| 340 | writeb(value, bus->mmio + offset); | 340 | writeb(value, bus->mmio + offset); |
| 341 | mmiowb(); | ||
| 342 | spin_unlock_irqrestore(&bus->bar_lock, flags); | 341 | spin_unlock_irqrestore(&bus->bar_lock, flags); |
| 343 | } | 342 | } |
| 344 | 343 | ||
| @@ -352,7 +351,6 @@ static void ssb_pcmcia_write16(struct ssb_device *dev, u16 offset, u16 value) · 7 unmodified lines | |||
| 352 | err = select_core_and_segment(dev, &offset); | 351 | err = select_core_and_segment(dev, &offset); |
| 353 | if (likely(!err)) | 352 | if (likely(!err)) |
| 354 | writew(value, bus->mmio + offset); | 353 | writew(value, bus->mmio + offset); |
| 355 | mmiowb(); | ||
| 356 | spin_unlock_irqrestore(&bus->bar_lock, flags); | 354 | spin_unlock_irqrestore(&bus->bar_lock, flags); |
| 357 | } | 355 | } |
| 358 | 356 | ||
| @@ -368,7 +366,6 @@ static void ssb_pcmcia_write32(struct ssb_device *dev, u16 offset, u32 value) · 9 unmodified lines | |||
| 368 | writew((value & 0x0000FFFF), bus->mmio + offset); | 366 | writew((value & 0x0000FFFF), bus->mmio + offset); |
| 369 | writew(((value & 0xFFFF0000) >> 16), bus->mmio + offset + 2); | 367 | writew(((value & 0xFFFF0000) >> 16), bus->mmio + offset + 2); |
| 370 | } | 368 | } |
| 371 | mmiowb(); | ||
| 372 | spin_unlock_irqrestore(&bus->bar_lock, flags); | 369 | spin_unlock_irqrestore(&bus->bar_lock, flags); |
| 373 | } | 370 | } |
| 374 | 371 | ||
| @@ -424,7 +421,6 @@ static void ssb_pcmcia_block_write(struct ssb_device *dev, const void *buffer, · 49 unmodified lines | |||
| 424 | WARN_ON(1); | 421 | WARN_ON(1); |
| 425 | } | 422 | } |
| 426 | unlock: | 423 | unlock: |
| 427 | mmiowb(); | ||
| 428 | spin_unlock_irqrestore(&bus->bar_lock, flags); | 424 | spin_unlock_irqrestore(&bus->bar_lock, flags); |
| 429 | } | 425 | } |
| 430 | #endif /* CONFIG_SSB_BLOCKIO */ | 426 | #endif /* CONFIG_SSB_BLOCKIO */ |
| @@ -371,7 +371,6 @@ static unsigned int mite_get_status(struct mite_channel *mite_chan) · 370 unmodified lines | |||
| 371 | writel(CHOR_CLRDONE, | 371 | writel(CHOR_CLRDONE, |
| 372 | mite->mmio + MITE_CHOR(mite_chan->channel)); | 372 | mite->mmio + MITE_CHOR(mite_chan->channel)); |
| 373 | } | 373 | } |
| 374 | mmiowb(); | ||
| 375 | spin_unlock_irqrestore(&mite->lock, flags); | 374 | spin_unlock_irqrestore(&mite->lock, flags); |
| 376 | return status; | 375 | return status; |
| 377 | } | 376 | } |
| @@ -451,7 +450,6 @@ void mite_dma_arm(struct mite_channel *mite_chan) · 73 unmodified lines | |||
| 451 | mite_chan->done = 0; | 450 | mite_chan->done = 0; |
| 452 | /* arm */ | 451 | /* arm */ |
| 453 | writel(CHOR_START, mite->mmio + MITE_CHOR(mite_chan->channel)); | 452 | writel(CHOR_START, mite->mmio + MITE_CHOR(mite_chan->channel)); |
| 454 | mmiowb(); | ||
| 455 | spin_unlock_irqrestore(&mite->lock, flags); | 453 | spin_unlock_irqrestore(&mite->lock, flags); |
| 456 | } | 454 | } |
| 457 | EXPORT_SYMBOL_GPL(mite_dma_arm); | 455 | EXPORT_SYMBOL_GPL(mite_dma_arm); |
| @@ -638,7 +636,6 @@ void mite_release_channel(struct mite_channel *mite_chan) · 180 unmodified lines | |||
| 638 | CHCR_CLR_LC_IE | CHCR_CLR_CONT_RB_IE, | 636 | CHCR_CLR_LC_IE | CHCR_CLR_CONT_RB_IE, |
| 639 | mite->mmio + MITE_CHCR(mite_chan->channel)); | 637 | mite->mmio + MITE_CHCR(mite_chan->channel)); |
| 640 | mite_chan->ring = NULL; | 638 | mite_chan->ring = NULL; |
| 641 | mmiowb(); | ||
| 642 | } | 639 | } |
| 643 | spin_unlock_irqrestore(&mite->lock, flags); | 640 | spin_unlock_irqrestore(&mite->lock, flags); |
| 644 | } | 641 | } |
| @@ -320,7 +320,6 @@ static inline void ni_660x_set_dma_channel(struct comedi_device *dev, · 319 unmodified lines | |||
| 320 | ni_660x_write(dev, chip, devpriv->dma_cfg[chip] | | 320 | ni_660x_write(dev, chip, devpriv->dma_cfg[chip] | |
| 321 | NI660X_DMA_CFG_RESET(mite_channel), | 321 | NI660X_DMA_CFG_RESET(mite_channel), |
| 322 | NI660X_DMA_CFG); | 322 | NI660X_DMA_CFG); |
| 323 | mmiowb(); | ||
| 324 | } | 323 | } |
| 325 | 324 | ||
| 326 | static inline void ni_660x_unset_dma_channel(struct comedi_device *dev, | 325 | static inline void ni_660x_unset_dma_channel(struct comedi_device *dev, |
| @@ -333,7 +332,6 @@ static inline void ni_660x_unset_dma_channel(struct comedi_device *dev, · 6 unmodified lines | |||
| 333 | devpriv->dma_cfg[chip] &= ~NI660X_DMA_CFG_SEL_MASK(mite_channel); | 332 | devpriv->dma_cfg[chip] &= ~NI660X_DMA_CFG_SEL_MASK(mite_channel); |
| 334 | devpriv->dma_cfg[chip] |= NI660X_DMA_CFG_SEL_NONE(mite_channel); | 333 | devpriv->dma_cfg[chip] |= NI660X_DMA_CFG_SEL_NONE(mite_channel); |
| 335 | ni_660x_write(dev, chip, devpriv->dma_cfg[chip], NI660X_DMA_CFG); | 334 | ni_660x_write(dev, chip, devpriv->dma_cfg[chip], NI660X_DMA_CFG); |
| 336 | mmiowb(); | ||
| 337 | } | 335 | } |
| 338 | 336 | ||
| 339 | static int ni_660x_request_mite_channel(struct comedi_device *dev, | 337 | static int ni_660x_request_mite_channel(struct comedi_device *dev, |
| @@ -547,7 +547,6 @@ static inline void ni_set_bitfield(struct comedi_device *dev, int reg, · 546 unmodified lines | |||
| 547 | reg); | 547 | reg); |
| 548 | break; | 548 | break; |
| 549 | } | 549 | } |
| 550 | mmiowb(); | ||
| 551 | spin_unlock_irqrestore(&devpriv->soft_reg_copy_lock, flags); | 550 | spin_unlock_irqrestore(&devpriv->soft_reg_copy_lock, flags); |
| 552 | } | 551 | } |
| 553 | 552 | ||
| @@ -310,7 +310,6 @@ static int ni_pcidio_request_di_mite_channel(struct comedi_device *dev) · 309 unmodified lines | |||
| 310 | writeb(primary_DMAChannel_bits(devpriv->di_mite_chan->channel) | | 310 | writeb(primary_DMAChannel_bits(devpriv->di_mite_chan->channel) | |
| 311 | secondary_DMAChannel_bits(devpriv->di_mite_chan->channel), | 311 | secondary_DMAChannel_bits(devpriv->di_mite_chan->channel), |
| 312 | dev->mmio + DMA_LINE_CONTROL_GROUP1); | 312 | dev->mmio + DMA_LINE_CONTROL_GROUP1); |
| 313 | mmiowb(); | ||
| 314 | spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags); | 313 | spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags); |
| 315 | return 0; | 314 | return 0; |
| 316 | } | 315 | } |
| @@ -327,7 +326,6 @@ static void ni_pcidio_release_di_mite_channel(struct comedi_device *dev) · 10 unmodified lines | |||
| 327 | writeb(primary_DMAChannel_bits(0) | | 326 | writeb(primary_DMAChannel_bits(0) | |
| 328 | secondary_DMAChannel_bits(0), | 327 | secondary_DMAChannel_bits(0), |
| 329 | dev->mmio + DMA_LINE_CONTROL_GROUP1); | 328 | dev->mmio + DMA_LINE_CONTROL_GROUP1); |
| 330 | mmiowb(); | ||
| 331 | } | 329 | } |
| 332 | spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags); | 330 | spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags); |
| 333 | } | 331 | } |
| @@ -234,7 +234,6 @@ static void ni_tio_set_bits_transient(struct ni_gpct *counter, · 233 unmodified lines | |||
| 234 | regs[reg] &= ~mask; | 234 | regs[reg] &= ~mask; |
| 235 | regs[reg] |= (value & mask); | 235 | regs[reg] |= (value & mask); |
| 236 | ni_tio_write(counter, regs[reg] | transient, reg); | 236 | ni_tio_write(counter, regs[reg] | transient, reg); |
| 237 | mmiowb(); | ||
| 238 | spin_unlock_irqrestore(&counter_dev->regs_lock, flags); | 237 | spin_unlock_irqrestore(&counter_dev->regs_lock, flags); |
| 239 | } | 238 | } |
| 240 | } | 239 | } |
| @@ -108,7 +108,6 @@ static void s626_mc_enable(struct comedi_device *dev, · 107 unmodified lines | |||
| 108 | { | 108 | { |
| 109 | unsigned int val = (cmd << 16) | cmd; | 109 | unsigned int val = (cmd << 16) | cmd; |
| 110 | 110 | ||
| 111 | mmiowb(); | ||
| 112 | writel(val, dev->mmio + reg); | 111 | writel(val, dev->mmio + reg); |
| 113 | } | 112 | } |
| 114 | 113 | ||
| @@ -116,7 +115,6 @@ static void s626_mc_disable(struct comedi_device *dev, · 1 unmodified line | |||
| 116 | unsigned int cmd, unsigned int reg) | 115 | unsigned int cmd, unsigned int reg) |
| 117 | { | 116 | { |
| 118 | writel(cmd << 16, dev->mmio + reg); | 117 | writel(cmd << 16, dev->mmio + reg); |
| 119 | mmiowb(); | ||
| 120 | } | 118 | } |
| 121 | 119 | ||
| 122 | static bool s626_mc_test(struct comedi_device *dev, | 120 | static bool s626_mc_test(struct comedi_device *dev, |
| @@ -353,7 +353,6 @@ static void men_z135_handle_tx(struct men_z135_port *uart) · 352 unmodified lines | |||
| 353 | 353 | ||
| 354 | memcpy_toio(port->membase + MEN_Z135_TX_RAM, &xmit->buf[xmit->tail], n); | 354 | memcpy_toio(port->membase + MEN_Z135_TX_RAM, &xmit->buf[xmit->tail], n); |
| 355 | xmit->tail = (xmit->tail + n) & (UART_XMIT_SIZE - 1); | 355 | xmit->tail = (xmit->tail + n) & (UART_XMIT_SIZE - 1); |
| 356 | mmiowb(); | ||
| 357 | 356 | ||
| 358 | iowrite32(n & 0x3ff, port->membase + MEN_Z135_TX_CTRL); | 357 | iowrite32(n & 0x3ff, port->membase + MEN_Z135_TX_CTRL); |
| 359 | 358 | ||
| @@ -248,7 +248,6 @@ static void serial_txx9_initialize(struct uart_port *port) · 247 unmodified lines | |||
| 248 | sio_out(up, TXX9_SIFCR, TXX9_SIFCR_SWRST); | 248 | sio_out(up, TXX9_SIFCR, TXX9_SIFCR_SWRST); |
| 249 | /* TX4925 BUG WORKAROUND. Accessing SIOC register | 249 | /* TX4925 BUG WORKAROUND. Accessing SIOC register |
| 250 | * immediately after soft reset causes bus error. */ | 250 | * immediately after soft reset causes bus error. */ |
| 251 | mmiowb(); | ||
| 252 | udelay(1); | 251 | udelay(1); |
| 253 | while ((sio_in(up, TXX9_SIFCR) & TXX9_SIFCR_SWRST) && --tmout) | 252 | while ((sio_in(up, TXX9_SIFCR) & TXX9_SIFCR_SWRST) && --tmout) |
| 254 | udelay(1); | 253 | udelay(1); |
| @@ -533,8 +533,6 @@ static int xdbc_handle_external_reset(void) · 532 unmodified lines | |||
| 533 | 533 | ||
| 534 | xdbc_mem_init(); | 534 | xdbc_mem_init(); |
| 535 | 535 | ||
| 536 | mmiowb(); | ||
| 537 | |||
| 538 | ret = xdbc_start(); | 536 | ret = xdbc_start(); |
| 539 | if (ret < 0) | 537 | if (ret < 0) |
| 540 | goto reset_out; | 538 | goto reset_out; |
| @@ -587,8 +585,6 @@ static int __init xdbc_early_setup(void) · 46 unmodified lines | |||
| 587 | 585 | ||
| 588 | xdbc_mem_init(); | 586 | xdbc_mem_init(); |
| 589 | 587 | ||
| 590 | mmiowb(); | ||
| 591 | |||
| 592 | ret = xdbc_start(); | 588 | ret = xdbc_start(); |
| 593 | if (ret < 0) { | 589 | if (ret < 0) { |
| 594 | writel(0, &xdbc.xdbc_reg->control); | 590 | writel(0, &xdbc.xdbc_reg->control); |
| @@ -421,8 +421,6 @@ static int xhci_dbc_mem_init(struct xhci_hcd *xhci, gfp_t flags) · 420 unmodified lines | |||
| 421 | string_length = xhci_dbc_populate_strings(dbc->string); | 421 | string_length = xhci_dbc_populate_strings(dbc->string); |
| 422 | xhci_dbc_init_contexts(xhci, string_length); | 422 | xhci_dbc_init_contexts(xhci, string_length); |
| 423 | 423 | ||
| 424 | mmiowb(); | ||
| 425 | |||
| 426 | xhci_dbc_eps_init(xhci); | 424 | xhci_dbc_eps_init(xhci); |
| 427 | dbc->state = DS_INITIALIZED; | 425 | dbc->state = DS_INITIALIZED; |
| 428 | 426 | ||
| @@ -1338,7 +1338,6 @@ static inline u16 qed_sb_update_sb_idx(struct qed_sb_info *sb_info) · 1337 unmodified lines | |||
| 1338 | } | 1338 | } |
| 1339 | 1339 | ||
| 1340 | /* Let SB update */ | 1340 | /* Let SB update */ |
| 1341 | mmiowb(); | ||
| 1342 | return rc; | 1341 | return rc; |
| 1343 | } | 1342 | } |
| 1344 | 1343 | ||
| @@ -1374,7 +1373,6 @@ static inline void qed_sb_ack(struct qed_sb_info *sb_info, · 29 unmodified lines | |||
| 1374 | /* Both segments (interrupts & acks) are written to same place address; | 1373 | /* Both segments (interrupts & acks) are written to same place address; |
| 1375 | * Need to guarantee all commands will be received (in-order) by HW. | 1374 | * Need to guarantee all commands will be received (in-order) by HW. |
| 1376 | */ | 1375 | */ |
| 1377 | mmiowb(); | ||
| 1378 | barrier(); | 1376 | barrier(); |
| 1379 | } | 1377 | } |
| 1380 | 1378 | ||
| @@ -102,7 +102,6 @@ static void txx9aclc_ac97_cold_reset(struct snd_ac97 *ac97) · 101 unmodified lines | |||
| 102 | u32 ready = ACINT_CODECRDY(ac97->num) | ACINT_REGACCRDY; | 102 | u32 ready = ACINT_CODECRDY(ac97->num) | ACINT_REGACCRDY; |
| 103 | 103 | ||
| 104 | __raw_writel(ACCTL_ENLINK, base + ACCTLDIS); | 104 | __raw_writel(ACCTL_ENLINK, base + ACCTLDIS); |
| 105 | mmiowb(); | ||
| 106 | udelay(1); | 105 | udelay(1); |
| 107 | __raw_writel(ACCTL_ENLINK, base + ACCTLEN); | 106 | __raw_writel(ACCTL_ENLINK, base + ACCTLEN); |
| 108 | /* wait for primary codec ready status */ | 107 | /* wait for primary codec ready status */ |