From: Jakub Kicinski <kubakici@wp.pl>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Gertjan van Wingerde <gwingerde@gmail.com>,
linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com
Subject: Re: [rt2x00-users] [PATCH 2/4] rt2x00: move disabling of DMA before loading firmware
Date: Wed, 28 Mar 2012 14:53:59 +0200 [thread overview]
Message-ID: <20120328145359.4bd5d098@north> (raw)
In-Reply-To: <20120328121428.GA3333@redhat.com>
On Wed, 28 Mar 2012 14:14:29 +0200
Stanislaw Gruszka <sgruszka@redhat.com> wrote:
> Hello,
>
> On Tue, Mar 27, 2012 at 08:11:07PM +0200, Gertjan van Wingerde wrote:
> > > /*
> > > - * Disable DMA, will be reenabled later when enabling
> > > - * the radio.
> > > - */
> > > - rt2800_register_read(rt2x00dev, WPDMA_GLO_CFG, ®);
> > > - rt2x00_set_field32(®, WPDMA_GLO_CFG_ENABLE_TX_DMA, 0);
> > > - rt2x00_set_field32(®, WPDMA_GLO_CFG_ENABLE_RX_DMA, 0);
> > > - rt2800_register_write(rt2x00dev, WPDMA_GLO_CFG, reg);
> > > -
> > > - /*
> > > * Initialize firmware.
> > > */
> > > rt2800_register_write(rt2x00dev, H2M_BBP_AGENT, 0);
> >
> > This basically seems to be a revert of commit
> > 4ed1dd2a7ec880b301beb61cbc1e08811ec340e4 in the wireless-testing tree.
> > That commit was submitted by Stanislaw, which basically does the reverse
> > of what you are doing here.
> >
> > I leave it up to you and Stanislaw to decide on what the state is that
> > we need to be in.
>
> When DMA was disabled before FW load, I observed frame receives before
> ->enable_radio, so looks like WPDMA_GLO_CFG register is overwritten by
> F/W load. Although received frames did not make any damage, I prefer
> not to allow hw to send data to driver, before driver will be really
> ready to receive them.
Hm. I obviously did check whether FW load does overwrite WPDMA_GLO_CFG
and it didn't. Maybe it's device dependent? What bothers me is that now
we have a (very) short window between FW load and disabling DMA.
-- Kuba
next prev parent reply other threads:[~2012-03-28 12:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-27 14:51 [PATCH 0/4] rt2x00: fix initialization after legacy driver Jakub Kicinski
2012-03-27 14:51 ` [PATCH 1/4] rt2x00: broaden PCIE L1-state wakeup configuration Jakub Kicinski
2012-03-27 18:19 ` Gertjan van Wingerde
2012-03-27 22:52 ` [rt2x00-users] " Jakub Kicinski
2012-03-28 12:38 ` Stanislaw Gruszka
2012-03-27 14:51 ` [PATCH 2/4] rt2x00: move disabling of DMA before loading firmware Jakub Kicinski
2012-03-27 18:11 ` Gertjan van Wingerde
2012-03-28 12:14 ` Stanislaw Gruszka
2012-03-28 12:53 ` Jakub Kicinski [this message]
2012-03-28 12:58 ` [rt2x00-users] " Julian Calaby
2012-03-28 13:15 ` Stanislaw Gruszka
2012-03-27 14:51 ` [PATCH 3/4] rt2x00: initialize queues before giving up due to DMA error Jakub Kicinski
2012-03-27 18:13 ` Gertjan van Wingerde
2012-03-27 14:51 ` [PATCH 4/4] rt2x00: zero registers of unused TX rings Jakub Kicinski
2012-03-27 18:13 ` Gertjan van Wingerde
2012-04-16 9:11 ` [rt2x00-users] [PATCH 0/4] rt2x00: fix initialization after legacy driver Andreas Hartmann
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=20120328145359.4bd5d098@north \
--to=kubakici@wp.pl \
--cc=gwingerde@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=sgruszka@redhat.com \
--cc=users@rt2x00.serialmonkey.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).