Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290629
b: refs/heads/master
c: 4e5ea20
h: refs/heads/master
i:
  290627: a7f661e
v: v3
  • Loading branch information
Stanislaw Gruszka authored and John W. Linville committed Feb 22, 2012
1 parent f8f4d35 commit 5052a54
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1e0f32a43ae652eaa5b23dc06852938555cb8da1
refs/heads/master: 4e5ea2088b699ae86ffd96b53b916a3966535fcb
2 changes: 0 additions & 2 deletions trunk/drivers/net/wireless/iwlegacy/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ il_read_targ_mem(struct il_priv *il, u32 addr)
_il_grab_nic_access(il);

_il_wr(il, HBUS_TARG_MEM_RADDR, addr);
rmb();
value = _il_rd(il, HBUS_TARG_MEM_RDAT);

_il_release_nic_access(il);
Expand All @@ -196,7 +195,6 @@ il_write_targ_mem(struct il_priv *il, u32 addr, u32 val)
spin_lock_irqsave(&il->reg_lock, reg_flags);
if (likely(_il_grab_nic_access(il))) {
_il_wr(il, HBUS_TARG_MEM_WADDR, addr);
wmb();
_il_wr(il, HBUS_TARG_MEM_WDAT, val);
_il_release_nic_access(il);
}
Expand Down
9 changes: 7 additions & 2 deletions trunk/drivers/net/wireless/iwlegacy/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -2146,6 +2146,13 @@ static inline void
_il_release_nic_access(struct il_priv *il)
{
_il_clear_bit(il, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
/*
* In above we are reading CSR_GP_CNTRL register, what will flush any
* previous writes, but still want write, which clear MAC_ACCESS_REQ
* bit, be performed on PCI bus before any other writes scheduled on
* different CPUs (after we drop reg_lock).
*/
mmiowb();
}

static inline u32
Expand Down Expand Up @@ -2179,15 +2186,13 @@ static inline u32
_il_rd_prph(struct il_priv *il, u32 reg)
{
_il_wr(il, HBUS_TARG_PRPH_RADDR, reg | (3 << 24));
rmb();
return _il_rd(il, HBUS_TARG_PRPH_RDAT);
}

static inline void
_il_wr_prph(struct il_priv *il, u32 addr, u32 val)
{
_il_wr(il, HBUS_TARG_PRPH_WADDR, ((addr & 0x0000FFFF) | (3 << 24)));
wmb();
_il_wr(il, HBUS_TARG_PRPH_WDAT, val);
}

Expand Down

0 comments on commit 5052a54

Please sign in to comment.