>> > Please share your PID/VID. > > 0cf3:9271 > >> And also for compat-wireless-v3.0-rc4-1, FW version should be 1.3 and fw size >> should be 51272. But in your case size is 51288 which is 1.2. Please upgrade fw >> to 1.3 and test again. >> >> http://wireless.kernel.org/download/htc_fw/1.3/htc_9271.fw > > Okay. I had tried both versions previously; neither seems to work any better > than the other. Here is dmesg using firmware version 1.3: > > [ 102.984766] Compat-wireless backport release: compat-wireless-v3.0-rc4-1 > [ 102.984775] Backport based on linux-2.6-allstable.git v3.0-rc4 > [ 103.213468] Calling CRDA to update world regulatory domain > [ 103.798281] usbcore: registered new interface driver ath9k_htc > [ 108.482070] usb 5-7: new high speed USB device using ehci_hcd and address 5 > [ 108.643105] usb 5-7: configuration #1 chosen from 1 choice > [ 108.996663] usb 5-7: ath9k_htc: Transferred FW: htc_9271.fw, size: 51272 > [ 109.135499] ath9k_htc 5-7:1.0: ath9k_htc: HTC initialized with 33 credits > [ 109.140526] ath: UNDEFINED -> AWAKE > [ 109.141769] ath: serialize_regmode is 0 > [ 109.383151] ath: Timeout waiting for WMI command: WMI_REG_WRITE_CMDID > [ 109.383168] ath: REGISTER WRITE FAILED, multi len: 9 > [ 109.609805] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 109.609822] ath: REGISTER READ FAILED: (0x9c00, -110) > [ 109.609835] ath: Reading from EEPROM, not flash > [ 109.824058] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 109.824079] ath: Multiple REGISTER READ FAILED (count: 8) > [ 110.042132] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 110.042148] ath: Multiple REGISTER READ FAILED (count: 8) > [ 110.260786] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 110.260802] ath: Multiple REGISTER READ FAILED (count: 8) > [ 110.482613] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 110.482629] ath: Multiple REGISTER READ FAILED (count: 8) > [ 110.719736] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 110.719753] ath: Multiple REGISTER READ FAILED (count: 8) > [ 110.953628] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 110.953645] ath: Multiple REGISTER READ FAILED (count: 8) > [ 111.195035] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 111.195057] ath: Multiple REGISTER READ FAILED (count: 8) > [ 111.432953] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 111.432975] ath: Multiple REGISTER READ FAILED (count: 8) > [ 111.668211] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 111.668227] ath: Multiple REGISTER READ FAILED (count: 8) > [ 111.903626] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 111.903642] ath: Multiple REGISTER READ FAILED (count: 8) > [ 112.135695] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 112.135711] ath: Multiple REGISTER READ FAILED (count: 8) > [ 112.370919] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 112.370936] ath: Multiple REGISTER READ FAILED (count: 8) > [ 112.603491] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 112.603508] ath: Multiple REGISTER READ FAILED (count: 8) > [ 112.841972] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 112.841988] ath: Multiple REGISTER READ FAILED (count: 8) > [ 113.065412] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 113.065428] ath: Multiple REGISTER READ FAILED (count: 8) > [ 113.300441] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 113.300458] ath: Multiple REGISTER READ FAILED (count: 8) > [ 113.536889] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 113.536906] ath: Multiple REGISTER READ FAILED (count: 8) > [ 113.774809] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 113.774826] ath: Multiple REGISTER READ FAILED (count: 8) > [ 114.012001] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 114.012018] ath: Multiple REGISTER READ FAILED (count: 8) > [ 114.245297] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 114.245314] ath: Multiple REGISTER READ FAILED (count: 8) > [ 114.476929] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 114.476946] ath: Multiple REGISTER READ FAILED (count: 8) > [ 114.753310] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 114.753327] ath: Multiple REGISTER READ FAILED (count: 8) > [ 114.966595] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 114.966611] ath: Multiple REGISTER READ FAILED (count: 8) > [ 115.193618] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 115.193634] ath: Multiple REGISTER READ FAILED (count: 4) > [ 115.462402] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 115.462419] ath: REGISTER READ FAILED: (0x2000, -110) > [ 115.685667] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 115.685684] ath: REGISTER READ FAILED: (0x407c, -110) > [ 115.918681] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 115.918703] ath: REGISTER READ FAILED: (0x407c, -110) > [ 116.152756] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 116.152773] ath: REGISTER READ FAILED: (0x407c, -110) > [ 116.391881] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 116.391898] ath: REGISTER READ FAILED: (0x407c, -110) > [ 116.629244] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 116.629265] ath: REGISTER READ FAILED: (0x407c, -110) > [ 116.860197] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 116.860214] ath: REGISTER READ FAILED: (0x407c, -110) > [ 117.094108] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 117.094124] ath: REGISTER READ FAILED: (0x407c, -110) > [ 117.325535] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 117.325551] ath: REGISTER READ FAILED: (0x407c, -110) > [ 117.578615] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 117.578632] ath: REGISTER READ FAILED: (0x407c, -110) > [ 117.819951] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 117.819968] ath: REGISTER READ FAILED: (0x407c, -110) > [ 118.055933] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 118.055950] ath: REGISTER READ FAILED: (0x407c, -110) > [ 118.329876] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 118.329893] ath: REGISTER READ FAILED: (0x407c, -110) > [ 118.563992] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 118.564009] ath: REGISTER READ FAILED: (0x407c, -110) > [ 118.803279] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 118.803296] ath: REGISTER READ FAILED: (0x407c, -110) > [ 119.045193] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 119.045209] ath: REGISTER READ FAILED: (0x407c, -110) > [ 119.294820] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 119.294832] ath: REGISTER READ FAILED: (0x407c, -110) > [ 119.536403] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 119.536421] ath: REGISTER READ FAILED: (0x407c, -110) > [ 119.764358] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 119.764375] ath: REGISTER READ FAILED: (0x407c, -110) > [ 120.002647] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 120.002664] ath: REGISTER READ FAILED: (0x407c, -110) > [ 120.223089] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 120.223107] ath: REGISTER READ FAILED: (0x407c, -110) > [ 120.450418] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 120.450435] ath: REGISTER READ FAILED: (0x407c, -110) > [ 120.701625] ath: Timeout waiting for WMI command: WMI_REG_READ_CMDID > [ 120.701638] ath: REGISTER READ FAILED: (0x407c, -110) please try to apply the attached reverting patch, if it works it may help us to narrow down the issue. Thanks. > > I appreciate your help on this. > > Thanks, > Forest > -- > Forest Bond > http://www.alittletooquiet.net > http://www.rapidrollout.com > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (GNU/Linux) > > iEYEARECAAYFAk4TCEoACgkQRO4fQQdv5AzU1QCfTLes04IZ3F9Zrdo+WdMQ6Kg8 > bV8AoI0CgOsrqwPnSxGA/NMPZFAXmsbP > =0xqn > -----END PGP SIGNATURE----- > > -- shafi
From 71374335e0ffa299775be03f99f265a02bba4347 Mon Sep 17 00:00:00 2001 From: Mohammed Shafi Shajakhan <mohammed@xxxxxxxxxxxxxxxx> Date: Tue, 5 Jul 2011 18:48:10 +0530 Subject: [PATCH] Revert "ath9k_hw: Offload USB eeprom reading to target" This reverts commit 04cf53f465049c7c509aac7b776f75d38ef68e69. Signed-off-by: Mohammed Shafi Shajakhan <mohammed@xxxxxxxxxxxxxxxx> --- drivers/net/wireless/ath/ath9k/eeprom.c | 32 ------------------ drivers/net/wireless/ath/ath9k/eeprom.h | 2 - drivers/net/wireless/ath/ath9k/eeprom_4k.c | 41 ++++++----------------- drivers/net/wireless/ath/ath9k/eeprom_9287.c | 45 ++++++++----------------- drivers/net/wireless/ath/ath9k/eeprom_def.c | 32 ++---------------- 5 files changed, 29 insertions(+), 123 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c index e61404d..a4a4100 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom.c +++ b/drivers/net/wireless/ath/ath9k/eeprom.c @@ -89,38 +89,6 @@ bool ath9k_hw_get_lower_upper_index(u8 target, u8 *pList, u16 listSize, return false; } -void ath9k_hw_usb_gen_fill_eeprom(struct ath_hw *ah, u16 *eep_data, - int eep_start_loc, int size) -{ - int i = 0, j, addr; - u32 addrdata[8]; - u32 data[8]; - - for (addr = 0; addr < size; addr++) { - addrdata[i] = AR5416_EEPROM_OFFSET + - ((addr + eep_start_loc) << AR5416_EEPROM_S); - i++; - if (i == 8) { - REG_READ_MULTI(ah, addrdata, data, i); - - for (j = 0; j < i; j++) { - *eep_data = data[j]; - eep_data++; - } - i = 0; - } - } - - if (i != 0) { - REG_READ_MULTI(ah, addrdata, data, i); - - for (j = 0; j < i; j++) { - *eep_data = data[j]; - eep_data++; - } - } -} - bool ath9k_hw_nvram_read(struct ath_common *common, u32 off, u16 *data) { return common->bus_ops->eeprom_read(common, off, data); diff --git a/drivers/net/wireless/ath/ath9k/eeprom.h b/drivers/net/wireless/ath/ath9k/eeprom.h index de99c0d..fc3b620 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom.h +++ b/drivers/net/wireless/ath/ath9k/eeprom.h @@ -669,8 +669,6 @@ int16_t ath9k_hw_interpolate(u16 target, u16 srcLeft, u16 srcRight, bool ath9k_hw_get_lower_upper_index(u8 target, u8 *pList, u16 listSize, u16 *indexL, u16 *indexR); bool ath9k_hw_nvram_read(struct ath_common *common, u32 off, u16 *data); -void ath9k_hw_usb_gen_fill_eeprom(struct ath_hw *ah, u16 *eep_data, - int eep_start_loc, int size); void ath9k_hw_fill_vpd_table(u8 pwrMin, u8 pwrMax, u8 *pPwrList, u8 *pVpdList, u16 numIntercepts, u8 *pRetVpdList); diff --git a/drivers/net/wireless/ath/ath9k/eeprom_4k.c b/drivers/net/wireless/ath/ath9k/eeprom_4k.c index 5b1e894..867cb89 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c @@ -27,13 +27,19 @@ static int ath9k_hw_4k_get_eeprom_rev(struct ath_hw *ah) return ((ah->eeprom.map4k.baseEepHeader.version) & 0xFFF); } -#define SIZE_EEPROM_4K (sizeof(struct ar5416_eeprom_4k) / sizeof(u16)) - -static bool __ath9k_hw_4k_fill_eeprom(struct ath_hw *ah) +static bool ath9k_hw_4k_fill_eeprom(struct ath_hw *ah) { +#define SIZE_EEPROM_4K (sizeof(struct ar5416_eeprom_4k) / sizeof(u16)) struct ath_common *common = ath9k_hw_common(ah); u16 *eep_data = (u16 *)&ah->eeprom.map4k; - int addr, eep_start_loc = 64; + int addr, eep_start_loc = 0; + + eep_start_loc = 64; + + if (!ath9k_hw_use_flash(ah)) { + ath_dbg(common, ATH_DBG_EEPROM, + "Reading from EEPROM, not flash\n"); + } for (addr = 0; addr < SIZE_EEPROM_4K; addr++) { if (!ath9k_hw_nvram_read(common, addr + eep_start_loc, eep_data)) { @@ -45,33 +51,8 @@ static bool __ath9k_hw_4k_fill_eeprom(struct ath_hw *ah) } return true; -} - -static bool __ath9k_hw_usb_4k_fill_eeprom(struct ath_hw *ah) -{ - u16 *eep_data = (u16 *)&ah->eeprom.map4k; - - ath9k_hw_usb_gen_fill_eeprom(ah, eep_data, 64, SIZE_EEPROM_4K); - - return true; -} - -static bool ath9k_hw_4k_fill_eeprom(struct ath_hw *ah) -{ - struct ath_common *common = ath9k_hw_common(ah); - - if (!ath9k_hw_use_flash(ah)) { - ath_dbg(common, ATH_DBG_EEPROM, - "Reading from EEPROM, not flash\n"); - } - - if (common->bus_ops->ath_bus_type == ATH_USB) - return __ath9k_hw_usb_4k_fill_eeprom(ah); - else - return __ath9k_hw_4k_fill_eeprom(ah); -} - #undef SIZE_EEPROM_4K +} static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah) { diff --git a/drivers/net/wireless/ath/ath9k/eeprom_9287.c b/drivers/net/wireless/ath/ath9k/eeprom_9287.c index 343fc9f..7015547 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c @@ -17,7 +17,7 @@ #include "hw.h" #include "ar9002_phy.h" -#define SIZE_EEPROM_AR9287 (sizeof(struct ar9287_eeprom) / sizeof(u16)) +#define NUM_EEP_WORDS (sizeof(struct ar9287_eeprom) / sizeof(u16)) static int ath9k_hw_ar9287_get_eeprom_ver(struct ath_hw *ah) { @@ -29,15 +29,25 @@ static int ath9k_hw_ar9287_get_eeprom_rev(struct ath_hw *ah) return (ah->eeprom.map9287.baseEepHeader.version) & 0xFFF; } -static bool __ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah) +static bool ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah) { struct ar9287_eeprom *eep = &ah->eeprom.map9287; struct ath_common *common = ath9k_hw_common(ah); u16 *eep_data; - int addr, eep_start_loc = AR9287_EEP_START_LOC; + int addr, eep_start_loc; eep_data = (u16 *)eep; - for (addr = 0; addr < SIZE_EEPROM_AR9287; addr++) { + if (common->bus_ops->ath_bus_type == ATH_USB) + eep_start_loc = AR9287_HTC_EEP_START_LOC; + else + eep_start_loc = AR9287_EEP_START_LOC; + + if (!ath9k_hw_use_flash(ah)) { + ath_dbg(common, ATH_DBG_EEPROM, + "Reading from EEPROM, not flash\n"); + } + + for (addr = 0; addr < NUM_EEP_WORDS; addr++) { if (!ath9k_hw_nvram_read(common, addr + eep_start_loc, eep_data)) { ath_dbg(common, ATH_DBG_EEPROM, @@ -50,31 +60,6 @@ static bool __ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah) return true; } -static bool __ath9k_hw_usb_ar9287_fill_eeprom(struct ath_hw *ah) -{ - u16 *eep_data = (u16 *)&ah->eeprom.map9287; - - ath9k_hw_usb_gen_fill_eeprom(ah, eep_data, - AR9287_HTC_EEP_START_LOC, - SIZE_EEPROM_AR9287); - return true; -} - -static bool ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah) -{ - struct ath_common *common = ath9k_hw_common(ah); - - if (!ath9k_hw_use_flash(ah)) { - ath_dbg(common, ATH_DBG_EEPROM, - "Reading from EEPROM, not flash\n"); - } - - if (common->bus_ops->ath_bus_type == ATH_USB) - return __ath9k_hw_usb_ar9287_fill_eeprom(ah); - else - return __ath9k_hw_ar9287_fill_eeprom(ah); -} - static int ath9k_hw_ar9287_check_eeprom(struct ath_hw *ah) { u32 sum = 0, el, integer; @@ -101,7 +86,7 @@ static int ath9k_hw_ar9287_check_eeprom(struct ath_hw *ah) need_swap = true; eepdata = (u16 *)(&ah->eeprom); - for (addr = 0; addr < SIZE_EEPROM_AR9287; addr++) { + for (addr = 0; addr < NUM_EEP_WORDS; addr++) { temp = swab16(*eepdata); *eepdata = temp; eepdata++; diff --git a/drivers/net/wireless/ath/ath9k/eeprom_def.c b/drivers/net/wireless/ath/ath9k/eeprom_def.c index 17f0a68..51e7286 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_def.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c @@ -86,10 +86,9 @@ static int ath9k_hw_def_get_eeprom_rev(struct ath_hw *ah) return ((ah->eeprom.def.baseEepHeader.version) & 0xFFF); } -#define SIZE_EEPROM_DEF (sizeof(struct ar5416_eeprom_def) / sizeof(u16)) - -static bool __ath9k_hw_def_fill_eeprom(struct ath_hw *ah) +static bool ath9k_hw_def_fill_eeprom(struct ath_hw *ah) { +#define SIZE_EEPROM_DEF (sizeof(struct ar5416_eeprom_def) / sizeof(u16)) struct ath_common *common = ath9k_hw_common(ah); u16 *eep_data = (u16 *)&ah->eeprom.def; int addr, ar5416_eep_start_loc = 0x100; @@ -104,33 +103,8 @@ static bool __ath9k_hw_def_fill_eeprom(struct ath_hw *ah) eep_data++; } return true; -} - -static bool __ath9k_hw_usb_def_fill_eeprom(struct ath_hw *ah) -{ - u16 *eep_data = (u16 *)&ah->eeprom.def; - - ath9k_hw_usb_gen_fill_eeprom(ah, eep_data, - 0x100, SIZE_EEPROM_DEF); - return true; -} - -static bool ath9k_hw_def_fill_eeprom(struct ath_hw *ah) -{ - struct ath_common *common = ath9k_hw_common(ah); - - if (!ath9k_hw_use_flash(ah)) { - ath_dbg(common, ATH_DBG_EEPROM, - "Reading from EEPROM, not flash\n"); - } - - if (common->bus_ops->ath_bus_type == ATH_USB) - return __ath9k_hw_usb_def_fill_eeprom(ah); - else - return __ath9k_hw_def_fill_eeprom(ah); -} - #undef SIZE_EEPROM_DEF +} static int ath9k_hw_def_check_eeprom(struct ath_hw *ah) { -- 1.7.0.4