Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314360
b: refs/heads/master
c: 3863495
h: refs/heads/master
v: v3
  • Loading branch information
Rajkumar Manoharan authored and John W. Linville committed Jun 13, 2012
1 parent d788693 commit bda35ef
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9dd9b0dc1de8031a31b3eaebc6a9c0ab60612026
refs/heads/master: 3863495b86d8ee8e7e70a328de5b88d555d7305a
18 changes: 18 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/ar9003_mci.c
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,9 @@ void ar9003_mci_reset(struct ath_hw *ah, bool en_int, bool is_2g,
udelay(100);
}

/* Check pending GPM msg before MCI Reset Rx */
ar9003_mci_state(ah, MCI_STATE_CHECK_GPM_OFFSET, NULL);

regval |= SM(1, AR_MCI_COMMAND2_RESET_RX);
REG_WRITE(ah, AR_MCI_COMMAND2, regval);
udelay(1);
Expand Down Expand Up @@ -1190,6 +1193,21 @@ u32 ar9003_mci_state(struct ath_hw *ah, u32 state_type, u32 *p_data)
value = MS(REG_READ(ah, AR_MCI_GPM_1), AR_MCI_GPM_WRITE_PTR);
mci->gpm_idx = value;
break;
case MCI_STATE_CHECK_GPM_OFFSET:
/*
* This should only be called before "MAC Warm Reset" or
* "MCI Reset Rx".
*/
value = MS(REG_READ(ah, AR_MCI_GPM_1), AR_MCI_GPM_WRITE_PTR);
if (mci->gpm_idx == value)
break;
ath_dbg(common, MCI,
"GPM cached write pointer mismatch %d %d\n",
mci->gpm_idx, value);
mci->query_bt = true;
mci->need_flush_btinfo = true;
mci->gpm_idx = 0;
break;
case MCI_STATE_NEXT_GPM_OFFSET:
case MCI_STATE_LAST_GPM_OFFSET:
/*
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ath9k/ar9003_mci.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ enum mci_bt_state {
enum mci_state_type {
MCI_STATE_ENABLE,
MCI_STATE_INIT_GPM_OFFSET,
MCI_STATE_CHECK_GPM_OFFSET,
MCI_STATE_NEXT_GPM_OFFSET,
MCI_STATE_LAST_GPM_OFFSET,
MCI_STATE_BT,
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1348,6 +1348,9 @@ static bool ath9k_hw_set_reset(struct ath_hw *ah, int type)
}
}

if (ath9k_hw_mci_is_enabled(ah))
ar9003_mci_state(ah, MCI_STATE_CHECK_GPM_OFFSET, NULL);

REG_WRITE(ah, AR_RTC_RC, rst_flags);

REGWRITE_BUFFER_FLUSH(ah);
Expand Down

0 comments on commit bda35ef

Please sign in to comment.