Re: [ath9k-devel] ath9k causes lockups since kernel 2.6.35
On 14 June 2011 21:20, Mohammed Shafi wrote: > I had removed a check that looks redundant. this will be anyway called > in radio_disable. > if some one has time and has easy way of applying the patch like in > compat wireless, can they see if it fixes by any chance(less > probably). > FYI I had gone through the pcipowersave module itself and did not find > any obvious deviation apart from some junk work around that need to be > done for AR9285E which does not seems to be related to this Right. I did the same and yes, I came to the same conclusion. So I figured it wasn't the powersave function itself. Tony/Camilo, can you revert the patch I've done and see if this patch from Mohammed Shafi fixes it? Thanks, Adrian > diff --git a/drivers/net/wireless/ath/ath9k/main.c > b/drivers/net/wireless/ath/ath9k/main.c > index 7f94533..e7f8ef2 100644 > --- a/drivers/net/wireless/ath/ath9k/main.c > +++ b/drivers/net/wireless/ath/ath9k/main.c > @@ -1259,7 +1259,6 @@ static void ath9k_stop(struct ieee80211_hw *hw) > > /* disable HAL and put h/w to sleep */ > ath9k_hw_disable(ah); > - ath9k_hw_configpcipowersave(ah, 1, 1); > > spin_unlock_bh(&sc->sc_pcu_lock); > > >>> >>> -Cam >>> >> > > > > -- > shafi > ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] APSM, AR9285 and bus hangs
On Tue, 14 Jun 2011 19:47:35 +0800 Adrian Chadd wrote: > I don't have any new thoughts, no. I think it's more likely something > to do with how the bus is being setup, how APSM is being used, how > power saving in general is handled, quirks of that chipset (all the > laptops with problems have been a specific AMD chipset, right?) No, mine's Intel Atom/NVidia ION LE. According to lspci it has an NVidia MCP79 running the PCI Express etc. ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH net-next 1/2] wireless: Remove casts of void *
On Tuesday 14 June 2011 18:43:51 Joe Perches wrote: > On Tue, 2011-06-14 at 12:31 -0400, Pavel Roskin wrote: > > On 06/14/2011 12:02 AM, Joe Perches wrote: > > > /* Get the message ID */ > > > - msg_id = (__be16 *) ((void *) htc_hdr + > > > - sizeof(struct htc_frame_hdr)); > > > + msg_id = (void *)htc_hdr + sizeof(struct htc_frame_hdr); > > I would never do stuff like this without verifying by sparse that no > > warnings are introduced. > > I did that. I believe there are no new warnings. > > > Sparse warnings should be avoided to keep sparse checks useful. > > Otherwise, important warnings would drown in the noise. > > $ make allyesconfig > $ git log -1 --pretty=oneline drivers/net/wireless/ath/ath9k/htc_hst.c > 337c22b774ff7f007b90b266b25c9a33ff555c48 wireless: Remove casts of void * > $ make C=2 drivers/net/wireless/ath/ath9k/htc_hst.o Just a quick FYI: To perform endianness checks, you may define __CHECK_ENDIAN__: make C=2 CF="-D__CHECK_ENDIAN__" [Although, it doesn't look like your patch introduced any new endianness problems] Regards, Chr ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH net-next 1/2] wireless: Remove casts of void *
On Tue, 2011-06-14 at 12:31 -0400, Pavel Roskin wrote: > On 06/14/2011 12:02 AM, Joe Perches wrote: > > /* Get the message ID */ > > - msg_id = (__be16 *) ((void *) htc_hdr + > > -sizeof(struct htc_frame_hdr)); > > + msg_id = (void *)htc_hdr + sizeof(struct htc_frame_hdr); > I would never do stuff like this without verifying by sparse that no > warnings are introduced. I did that. I believe there are no new warnings. > Sparse warnings should be avoided to keep sparse checks useful. > Otherwise, important warnings would drown in the noise. $ make allyesconfig $ git log -1 --pretty=oneline drivers/net/wireless/ath/ath9k/htc_hst.c 337c22b774ff7f007b90b266b25c9a33ff555c48 wireless: Remove casts of void * $ make C=2 drivers/net/wireless/ath/ath9k/htc_hst.o make[1]: Nothing to be done for `all'. CHK include/linux/version.h CHK include/generated/utsrelease.h CALLscripts/checksyscalls.sh CHECK scripts/mod/empty.c CHECK drivers/net/wireless/ath/ath9k/htc_hst.c CC drivers/net/wireless/ath/ath9k/htc_hst.o $ ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH net-next 1/2] wireless: Remove casts of void *
On 06/14/2011 12:02 AM, Joe Perches wrote: > /* Get the message ID */ > - msg_id = (__be16 *) ((void *) htc_hdr + > - sizeof(struct htc_frame_hdr)); > + msg_id = (void *)htc_hdr + sizeof(struct htc_frame_hdr); I would never do stuff like this without verifying by sparse that no warnings are introduced. Sparse warnings should be avoided to keep sparse checks useful. Otherwise, important warnings would drown in the noise. -- Regards, Pavel Roskin ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] ath9k causes lockups since kernel 2.6.35
On Sat, Jun 11, 2011 at 12:42 PM, Adrian Chadd wrote: > ok. Mohammed, APSM is broken in a different way on some laptops. maybe > the state transition between sleep states is different somehow. > > Which model notebook is this Camilo? :) > > > adrian > > On 11 June 2011 14:42, Camilo Mesias wrote: >> Hi, >> >> On Fri, Jun 10, 2011 at 5:10 PM, Adrian Chadd wrote: >>> On 11 June 2011 02:47, Tony Houghton wrote: >> [...] > Let's just try the patch I emailed you to apply to wireless-testing. > Hopefully that restores functionality enough and we can punt it to the > Atheros guys to do some further investigation. That change seems to have fixed it! I've managed at least 3 suspend/resumes and an rmmod/modprobe without crashing. Perhaps a little early to say it's definitely fixed, but I don't think I've ever managed more than 2 attempts in a row without a "bad" version crashing. >>> >>> Excellent! Let's see if it fixes it for other users. >>> Camilo? :) >> >> I had some problems with the wireless-testing software but managed to >> rebuild the current kernel from source (2.6.38.7-30.fc15.i686) then >> commented out the relevant driver part and changed the >> AR9285_WA_DEFAULT value too. I made sure I was running the rebuilt >> modules and... it works. I suspended and resumed just fine. >> >> I'm not sure how I can quickly get a clean fix, I think this might be >> tweakable with the patch: >> >> http://people.redhat.com/sgruszka/compact_wireless.html >> >> Or I could just stay on my bodged kernel for a while (although this >> doesn't help anyone else) >> >> Thanks for all the help, it looks like my netbook is useful again :D I had removed a check that looks redundant. this will be anyway called in radio_disable. if some one has time and has easy way of applying the patch like in compat wireless, can they see if it fixes by any chance(less probably). FYI I had gone through the pcipowersave module itself and did not find any obvious deviation apart from some junk work around that need to be done for AR9285E which does not seems to be related to this diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 7f94533..e7f8ef2 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -1259,7 +1259,6 @@ static void ath9k_stop(struct ieee80211_hw *hw) /* disable HAL and put h/w to sleep */ ath9k_hw_disable(ah); - ath9k_hw_configpcipowersave(ah, 1, 1); spin_unlock_bh(&sc->sc_pcu_lock); >> >> -Cam >> > -- shafi diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 7f94533..e7f8ef2 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -1259,7 +1259,6 @@ static void ath9k_stop(struct ieee80211_hw *hw) /* disable HAL and put h/w to sleep */ ath9k_hw_disable(ah); - ath9k_hw_configpcipowersave(ah, 1, 1); spin_unlock_bh(&sc->sc_pcu_lock); ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH net-next 1/2] wireless: Remove casts of void *
>> diff --git a/drivers/net/wireless/mwifiex/11n.c >> b/drivers/net/wireless/mwifiex/11n.c >> @@ -191,7 +191,7 @@ int mwifiex_ret_11n_cfg(struct host_cmd_ds_command >> *resp, void *data_buf) >>struct host_cmd_ds_11n_cfg *htcfg = &resp->params.htcfg; >> >>if (data_buf) { >> - tx_cfg = (struct mwifiex_ds_11n_tx_cfg *) data_buf; >> + tx_cfg = data_buf; >> >> I think pretty useless. tx_cfg is a struct mwifiex_ds_11n_tx_cfg *. > > True, but IMHO, this documents, particularly in a random snippet like > this, what's going on. Arguably though, a better fix would be to move > the cast to the place where this function is called. Hi Julian, Thanks for your comment. We will work on this. Regards, Bing ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH net-next 1/2] wireless: Remove casts of void *
> - pt = (T *)pv; > + pt = pv; > > Signed-off-by: Joe Perches j...@perches.com ... > drivers/net/wireless/mwifiex/11n.c |5 ++--- > drivers/net/wireless/mwifiex/cmdevt.c |3 +-- > drivers/net/wireless/mwifiex/join.c|2 +- > drivers/net/wireless/mwifiex/scan.c|2 +- > drivers/net/wireless/mwifiex/sta_cmd.c |4 ++-- > drivers/net/wireless/mwifiex/sta_cmdresp.c | 12 ++-- > drivers/net/wireless/mwifiex/txrx.c|2 +- > drivers/net/wireless/p54/eeprom.c |4 ++-- > 22 files changed, 41 insertions(+), 47 deletions(-) For mwifiex part, Acked-by: Bing Zhao bz...@marvell.com Thanks, Bing ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] APSM, AR9285 and bus hangs
On 14 June 2011 19:44, Mohammed Shafi wrote: > I had verified with the internal code base whether this is being done, > unfortunately no and at least I had tested this patch in my lenovo > T400 machine it did not cause any issue. this might fix the issue for > the specific platform but I am not sure whether this will not cause > any problems in other platforms. these sort for Workarounds were done > based on testing in different platforms. > Adrian you have any thoughts? I don't have any new thoughts, no. I think it's more likely something to do with how the bus is being setup, how APSM is being used, how power saving in general is handled, quirks of that chipset (all the laptops with problems have been a specific AMD chipset, right?) Unfortunately I don't know anywhere near enough about the goings on with power saving/APSM on Linux. If someone would like to get us in contact with the relevant developers, we could likely have a more constructive discussion. (And after exams please, I don't have brain cycles to spend thoroughly thinking about this until late June..) Adrian ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] APSM, AR9285 and bus hangs
On Tue, Jun 14, 2011 at 3:39 PM, Stanislaw Gruszka wrote: > On Mon, Jun 13, 2011 at 07:10:56PM +0530, Mohammed Shafi wrote: >> > I see this commit in 2.6.39, missed in 2.6.38 and 2.6.35 currently. >> > Is possible this is the fix which do not break other things? >> >> hi, >> no, this fix only affects AR9280 and it does not affects AR9285. > > That could be another stupid question, but could we do not touch > these bits on older AR9285s and disable them only on revision, that > was added by bad commit 53bc7aa08b48e5cd745f986731cc7dc24eef2a9f > > diff --git a/drivers/net/wireless/ath/ath9k/ar9002_hw.c > b/drivers/net/wireless/ath/ath9k/ar9002_hw.c > index f344cc2..91d99eb 100644 > --- a/drivers/net/wireless/ath/ath9k/ar9002_hw.c > +++ b/drivers/net/wireless/ath/ath9k/ar9002_hw.c > @@ -384,7 +384,7 @@ static void ar9002_hw_configpcipowersave(struct ath_hw > *ah, > } > } > > - if (AR_SREV_9280(ah) || AR_SREV_9285(ah) || AR_SREV_9287(ah)) > { > + if (AR_SREV_9280(ah) || AR_SREV_9285E_20(ah) || > AR_SREV_9287(ah)) { > /* > * Disable bit 6 and 7 before entering D3 to > * prevent system hang. I had verified with the internal code base whether this is being done, unfortunately no and at least I had tested this patch in my lenovo T400 machine it did not cause any issue. this might fix the issue for the specific platform but I am not sure whether this will not cause any problems in other platforms. these sort for Workarounds were done based on testing in different platforms. Adrian you have any thoughts? -- shafi ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] ath9k causes lockups since kernel 2.6.35
On Mon, 13 Jun 2011 19:20:17 -0500 Jonathan Nieder wrote: > Jonathan Nieder wrote: > > Adrian Chadd wrote: > > >> Also, is there a kernel.org bugzilla report entry for this? I'll > >> update it with the relevant information so the regression isn't > >> forgotten about. > > > > Let's use https://bugzilla.kernel.org/show_bug.cgi?id=37082 > > Or even better, a new bug, since that one is about behavior at > startup. Sorry for the noise. Mine would sometimes crash at startup but the crashes at shutdown/suspend etc were much more consistent. ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] APSM, AR9285 and bus hangs
On Mon, Jun 13, 2011 at 07:10:56PM +0530, Mohammed Shafi wrote: > > I see this commit in 2.6.39, missed in 2.6.38 and 2.6.35 currently. > > Is possible this is the fix which do not break other things? > > hi, > no, this fix only affects AR9280 and it does not affects AR9285. That could be another stupid question, but could we do not touch these bits on older AR9285s and disable them only on revision, that was added by bad commit 53bc7aa08b48e5cd745f986731cc7dc24eef2a9f diff --git a/drivers/net/wireless/ath/ath9k/ar9002_hw.c b/drivers/net/wireless/ath/ath9k/ar9002_hw.c index f344cc2..91d99eb 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_hw.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_hw.c @@ -384,7 +384,7 @@ static void ar9002_hw_configpcipowersave(struct ath_hw *ah, } } - if (AR_SREV_9280(ah) || AR_SREV_9285(ah) || AR_SREV_9287(ah)) { + if (AR_SREV_9280(ah) || AR_SREV_9285E_20(ah) || AR_SREV_9287(ah)) { /* * Disable bit 6 and 7 before entering D3 to * prevent system hang. ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH net-next 1/2] wireless: Remove casts of void *
On Tue, 2011-06-14 at 15:39 +1000, Julian Calaby wrote: > My issue here is that you mention in the commit log that this relates > to the removal of netdev_priv and dev_priv, but the casts removed > (mostly) don't. Sorry if that was unclear to you. None of these patches remove casts of netdev_priv. What I meant to say was that net and drivers/net have had many patches that remove casts of void * like the patches that removed casts of netdev_priv. These patches remove the last casts of void * types in net and drivers/net. cheers, Joe ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel