Sorry, forgot CC: linux-zigbee-devel@lists.sourceforge.net

Hi Werner,

thank you for your another patch!

Currently I don't clearly imagine a situation, when in BUSY_RX condition
we will request for RX_ON. As I see, request for RX_ON provided only by
at86rf230_start function. It's called in xmit only (I omit .start method).
If we are in BUSY_RX state, xmit function will fail with attempt to switch
to FORCE_TX_ON and exit without calling at86rf230_start. And also if we
are in TX_ON no rx events may occur.

Could you please explain the details of race between checking for RX_ON
and incoming traffic.

Thank you,
Alexander

2011/7/7 Werner Almesberger <wer...@almesberger.net>

> Checking arrival in RX_ON races with incoming traffic. If frame
> reception begins before we have a chance to see that we've arrived
> in RX_ON, at86rf230_state complains about unexpectedly finding the
> transceiver in BUSY_RX.
>
> This isn't the prettiest solution (and it doesn't check if we're
> in BUSY_RX before even commanding the change, although I think
> this shouldn't happen), but it makes the problem go away.
>
> Signed-off-by: Werner Almesberger <wer...@almesberger.net>
>
> ---
>  drivers/ieee802154/at86rf230.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/ieee802154/at86rf230.c
> b/drivers/ieee802154/at86rf230.c
> index 12c900a..1411447 100644
> --- a/drivers/ieee802154/at86rf230.c
> +++ b/drivers/ieee802154/at86rf230.c
> @@ -322,6 +322,8 @@ at86rf230_state(struct ieee802154_dev *dev, int state)
>
>        if (val == desired_status)
>                return 0;
> +       if (state == STATE_RX_ON && val == STATE_BUSY_RX)
> +               return 0;
>
>        pr_err("%s unexpected state change: %d, asked for %d\n", __func__,
>                        val, state);
> --
> 1.7.0.4
>
>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> Linux-zigbee-devel mailing list
> Linux-zigbee-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel
>
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to