From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
ath9k-devel@venema.h4ckr.net, camilo@mesias.co.uk,
Jonathan Nieder <jrnieder@gmail.com>,
Tony Houghton <h@realh.co.uk>, Adrian Chadd <adrian@freebsd.org>
Subject: Re: [RFC/RFT 6/6] ath9k: always initialize hw registers related to PCIe PM
Date: Mon, 25 Jul 2011 16:01:52 +0200 [thread overview]
Message-ID: <20110725140152.GD2608@redhat.com> (raw)
In-Reply-To: <20110725092929.GB2608@redhat.com>
On Mon, Jul 25, 2011 at 11:29:30AM +0200, Stanislaw Gruszka wrote:
> On Sat, Jul 23, 2011 at 10:41:30AM +0530, Rajkumar Manoharan wrote:
> > > + /* initalize PCIe PM registers if device introduce itself as PCIe */
> > > + if (ah->is_pciexpress)
> > > + ath9k_hw_ops(ah)->config_pci_powersave(ah, false);
> > > +
> > Use ath9k_hw_configpcipowersave wrapper instead.
> I changed wrapper to check ah->aspm_enabled, so if I would use it here
> it will not setup registers. I think I should comment that.
>
> > And ensure that there is no
> > sideeffect by changing SERDES config from __ath9k_hw_init to pci_probe.
> Hmm, not sure if I understand what I have to do :-(
>
> We have something like that:
>
> ath_pci_probe
> ath9k_init_device
> ath9k_init_softc
> ath9k_hw_init
> __ath9k_hw_init
> ath9k_hw_configpcipowersave();
>
> I changed it this way:
>
> ath_pci_probe
> ath9k_init_device
> ath9k_init_softc
> ath9k_hw_init
> __ath9k_hw_init
>
> ath9k_init_queues
> ath9k_init_btcoex
> some other inits
>
> ath9k_hw_configpcipowersave();
>
> Can this cause some side effects?
Actually this movement is not necessary, in the way things I did
currently. Is enough to replace ath9k_hw_configpcipowersave() by
ath9k_hw_ops(ah)->config_pci_powersave() in __ath9k_hw_init().
In such case SERDES and PCIe PM registers will be always initialized.
However movement would be needed if we want to initialize registers,
only when ASPM is enabled, hence we first need to discovery that,
and then eventually call ath9k_hw_configpcipowersave().
Which option is correct: always initialize SERDES and PCIe PM registers
or do it only if ASPM is enabled?
Stanislaw
next prev parent reply other threads:[~2011-07-25 14:00 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-22 13:31 [RFC/RFT 0/6] ath9k: ASPM fixes Stanislaw Gruszka
2011-07-22 13:31 ` [RFC/RFT 1/6] ath9k: skip ->config_pci_powersave() if PCIe port has ASPM disabled Stanislaw Gruszka
2011-07-22 13:31 ` [RFC/RFT 2/6] ath9k: remove ->config_pci_powersave() redundant argument Stanislaw Gruszka
2011-07-22 13:31 ` [RFC/RFT 3/6] ath9k: merge common ->config_pci_powersave() checks Stanislaw Gruszka
2011-07-22 13:31 ` [RFC/RFT 4/6] ath9k: use common PCIe ASPM definces instead of custom ones Stanislaw Gruszka
2011-07-23 4:46 ` Rajkumar Manoharan
2011-07-25 9:30 ` Stanislaw Gruszka
2011-07-22 13:31 ` [RFC/RFT 5/6] ath9k: do btcoex ASPM disabling at initialization time Stanislaw Gruszka
2011-07-23 4:51 ` Rajkumar Manoharan
2011-07-25 9:16 ` Stanislaw Gruszka
2011-07-26 17:36 ` Adrian Chadd
2011-07-22 13:31 ` [RFC/RFT 6/6] ath9k: always initialize hw registers related to PCIe PM Stanislaw Gruszka
2011-07-23 5:11 ` Rajkumar Manoharan
2011-07-25 9:29 ` Stanislaw Gruszka
2011-07-25 14:01 ` Stanislaw Gruszka [this message]
2011-07-26 7:31 ` Rajkumar Manoharan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110725140152.GD2608@redhat.com \
--to=sgruszka@redhat.com \
--cc=adrian@freebsd.org \
--cc=ath9k-devel@venema.h4ckr.net \
--cc=camilo@mesias.co.uk \
--cc=h@realh.co.uk \
--cc=jrnieder@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=rmanohar@qca.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).