[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKR_QV+wjuOZVfv9awX5bRLYC8xkoAy0h22LSPvL0DX6yg4-yw@mail.gmail.com>
Date: Mon, 18 Mar 2019 23:35:30 +0100
From: Tom Psyborg <pozega.tomislav@...il.com>
To: Tim Schumacher <timschumi@....de>
Cc: QCA ath9k Development <ath9k-devel@....qualcomm.com>,
Kalle Valo <kvalo@...eaurora.org>,
"David S. Miller" <davem@...emloft.net>,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ath9k: Check for errors when reading SREV register
On 18/03/2019, Tim Schumacher <timschumi@....de> wrote:
> Right now, if an error is encountered during the SREV register
> read (i.e. an EIO in ath9k_regread()), that error code gets
> passed all the way to __ath9k_hw_init(), where it is visible
> during the "Chip rev not supported" message.
>
> ath9k_htc 1-1.4:1.0: ath9k_htc: HTC initialized with 33 credits
> ath: phy2: Mac Chip Rev 0x0f.3 is not supported by this driver
> ath: phy2: Unable to initialize hardware; initialization status: -95
> ath: phy2: Unable to initialize hardware; initialization status: -95
> ath9k_htc: Failed to initialize the device
>
> Check for -EIO explicitly in ath9k_hw_read_revisions() and return
> a boolean based on the success of the operation. Check for that in
> __ath9k_hw_init() and abort with a more debugging-friendly message
> if reading the revisions wasn't successful.
>
you are still passing it all the way from ath9k_hw_init
> ath9k_htc 1-1.4:1.0: ath9k_htc: HTC initialized with 33 credits
> ath: phy2: Failed to read SREV register
> ath: phy2: Could not read hardware revision
> ath: phy2: Unable to initialize hardware; initialization status: -95
> ath: phy2: Unable to initialize hardware; initialization status: -95
> ath9k_htc: Failed to initialize the device
>
> This helps when debugging by directly showing the first point of
> failure and it could prevent possible errors if a 0x0f.3 revision
> is ever supported.
>
I don't think this is required. Mac Chip Rev 0x0f.3 at least prints
what the problem is instead of generic SREV read failure. Either wrong
define in driver or address overlap caused by large/bad firmware in
ath9k_htc case.
Powered by blists - more mailing lists