From: Alexander Aring <aar@pengutronix.de>
To: Stefan Schmidt <stefan@osg.samsung.com>, linux-wpan@vger.kernel.org
Cc: kernel@pengutronix.de, Oleg Hahm <oliver.hahm@inria.fr>
Subject: Re: [PATCH bluetooth-next] at86rf230: increase sleep to off timings
Date: Tue, 19 Apr 2016 20:51:45 +0200 [thread overview]
Message-ID: <57167E41.50508@pengutronix.de> (raw)
In-Reply-To: <57167341.2040902@pengutronix.de>
Am 04/19/2016 um 08:04 PM schrieb Alexander Aring:
> Hi,
>
> Am 04/19/2016 um 04:41 PM schrieb Stefan Schmidt:
>> Hello.
>>
>> On 19/04/16 15:34, Alexander Aring wrote:
>>> I expierenced when setting channel while sleep mode it didn't changed
>>> the channel inside the hardware registers. Then I got another report of
>>> an user which has similar issues.
>>>
>>> I increased the sleep to off state change timing, which is according
>>> at86rf233 at maximum 1000 us. After this change I got no similar effects
>>> again.
>>>
>>> I tried another option to wait on AWAKE_END irq, which can be used to
>>> wait until the transceiver is awaked. I tested it and the IRQ took 4
>>> seconds after starting state change. I don't believe it takes 4 seconds
>>> to go into the TRX_OFF state from SLEEP state. The alternative is to
>>> increase the timings which seems to work.
>> Nicely spotted. Increasing the timing is fine here I think. Given the datasheet actually assumes a maximum of 1000 us we should allow for it as well.
>>
>> Did you also check the maximum timing for 231 and 212 in the datasheet? Just to make sure they are not different (for example higher).
> No the datasheets differs much here, there are 380 us only. I set it now to 1 ms,
> because it's not really a hotpath yet where this is used.
>
> Alternative would be to use IRQ_CCA_ED, which is multi-funcional irq. That means
> it can also used to indicate (IRQ_AWAKE) to be sure the transceiver is _really_
> awake when doing spi cmds. I tested it and saw it took 4 seconds to get such IRQ
Also I saw a discussion on netdev that it's usual you cannot set PHY (link)
settings (in this case it was etherner, with ethtool) when the interface is
down. [0]
I think they have similar hardware where the registers are not accessable
when the interface is down (means hardware is in sleep state).
Also a colleague means we should switch to pm calls and use dev_get/dev_put,
but for networking this differs, our sleep/awake states depends on interface is
down or up. If up it's in receive mode and is in sleep mode until all interfaces
for this phy are down.
Maybe we should discuss "when going into sleep mode" and "when allow
phy (link) settings". It is also maybe very transceiver specific because the
at86rf2xx simple doesn't allow register manipulating while sleep mode.
So far I know the mrf24j40 allows it. And [0] describes the issue for some
hardware such at86rf2xx.
- Alex
[0] http://marc.info/?l=systemd-devel&m=146042512722479&w=2
next prev parent reply other threads:[~2016-04-19 18:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-19 13:34 [PATCH bluetooth-next] at86rf230: increase sleep to off timings Alexander Aring
2016-04-19 14:41 ` Stefan Schmidt
2016-04-19 18:04 ` Alexander Aring
2016-04-19 18:51 ` Alexander Aring [this message]
2016-04-19 19:29 ` Stefan Schmidt
2016-04-20 14:18 ` Marcel Holtmann
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=57167E41.50508@pengutronix.de \
--to=aar@pengutronix.de \
--cc=kernel@pengutronix.de \
--cc=linux-wpan@vger.kernel.org \
--cc=oliver.hahm@inria.fr \
--cc=stefan@osg.samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.