All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Hennerich <michael.hennerich@analog.com>
To: Stefan Schmidt <stefan@osg.samsung.com>, <alex.aring@gmail.com>,
	<stefan@datenfreihafen.org>, <marcel@holtmann.org>
Cc: <linux-wpan@vger.kernel.org>, <linux-bluetooth@vger.kernel.org>
Subject: Re: [PATCH v2] drivers/net/ieee802154/adf7242: Driver for ADF7242 MAC IEEE802154
Date: Tue, 8 Dec 2015 15:56:53 +0100	[thread overview]
Message-ID: <5666EFB5.2040706@analog.com> (raw)
In-Reply-To: <5666E3BE.60808@osg.samsung.com>

On 12/08/2015 03:05 PM, Stefan Schmidt wrote:
>
>
> On 08/12/15 14:37, Stefan Schmidt wrote:
>> Hello.
>>
>> On 08/12/15 12:52, michael.hennerich@analog.com wrote:


>>> +++ b/drivers/net/ieee802154/adf7242.c
>>> @@ -0,0 +1,1251 @@
>>> +/*
>>> + * Analog Devices ADF7242 Low-Power IEEE 802.15.4 Transceiver
>>> + *
>>> + * Copyright 2009-2015 Analog Devices Inc.
>>> + *
>>> + * Licensed under the GPL-2 or later.
>>> + *
>>> + * http://www.analog.com/ADF7242
>>> + */
>>> +
>>> +#include <linux/kernel.h>
>>> +#include <linux/module.h>
>>> +#include <linux/interrupt.h>
>>> +#include <linux/delay.h>
>>> +#include <linux/mutex.h>
>>> +#include <linux/workqueue.h>
>>> +#include <linux/spinlock.h>
>>> +#include <linux/firmware.h>
>>> +#include <linux/spi/spi.h>
>>> +#include <linux/skbuff.h>
>>> +#include <linux/of.h>
>>> +#include <linux/irq.h>
>>> +#include <linux/delay.h>
>>> +#include <linux/debugfs.h>
>>> +#include <linux/ieee802154.h>
>>> +#include <net/mac802154.h>
>>> +#include <net/cfg802154.h>
>>> +
>>> +#define FIRMWARE "adf7242_firmware.bin"
>>> +#define MAX_POLL_LOOPS 200
>>
>> You increased the MAX_POLL_LOOPS to 200 from 50 here since the last
>> version. Any reason for it?

Hi Stefan,

Two reasons.
I added a wait for RC_STATUS_PHY_RDY at the top of the threaded ISR 
handler. Depending on the state it may now poll a little bit longer. 
Typical loop counts I've seen were around 20-30.
The platform I'm currently testing with requires a FPGA bitsream rebuild 
to change the SPI clock rate. In case SPI clock moved to the fast end 50 
loops might not be sufficient anymore.
I then added 100% on top of it to be on the safe side.

-- 
Greetings,
Michael

--
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin,
Margaret Seif

WARNING: multiple messages have this Message-ID (diff)
From: Michael Hennerich <michael.hennerich@analog.com>
To: Stefan Schmidt <stefan@osg.samsung.com>,
	alex.aring@gmail.com, stefan@datenfreihafen.org,
	marcel@holtmann.org
Cc: linux-wpan@vger.kernel.org, linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH v2] drivers/net/ieee802154/adf7242: Driver for ADF7242 MAC IEEE802154
Date: Tue, 8 Dec 2015 15:56:53 +0100	[thread overview]
Message-ID: <5666EFB5.2040706@analog.com> (raw)
In-Reply-To: <5666E3BE.60808@osg.samsung.com>

On 12/08/2015 03:05 PM, Stefan Schmidt wrote:
>
>
> On 08/12/15 14:37, Stefan Schmidt wrote:
>> Hello.
>>
>> On 08/12/15 12:52, michael.hennerich@analog.com wrote:


>>> +++ b/drivers/net/ieee802154/adf7242.c
>>> @@ -0,0 +1,1251 @@
>>> +/*
>>> + * Analog Devices ADF7242 Low-Power IEEE 802.15.4 Transceiver
>>> + *
>>> + * Copyright 2009-2015 Analog Devices Inc.
>>> + *
>>> + * Licensed under the GPL-2 or later.
>>> + *
>>> + * http://www.analog.com/ADF7242
>>> + */
>>> +
>>> +#include <linux/kernel.h>
>>> +#include <linux/module.h>
>>> +#include <linux/interrupt.h>
>>> +#include <linux/delay.h>
>>> +#include <linux/mutex.h>
>>> +#include <linux/workqueue.h>
>>> +#include <linux/spinlock.h>
>>> +#include <linux/firmware.h>
>>> +#include <linux/spi/spi.h>
>>> +#include <linux/skbuff.h>
>>> +#include <linux/of.h>
>>> +#include <linux/irq.h>
>>> +#include <linux/delay.h>
>>> +#include <linux/debugfs.h>
>>> +#include <linux/ieee802154.h>
>>> +#include <net/mac802154.h>
>>> +#include <net/cfg802154.h>
>>> +
>>> +#define FIRMWARE "adf7242_firmware.bin"
>>> +#define MAX_POLL_LOOPS 200
>>
>> You increased the MAX_POLL_LOOPS to 200 from 50 here since the last
>> version. Any reason for it?

Hi Stefan,

Two reasons.
I added a wait for RC_STATUS_PHY_RDY at the top of the threaded ISR 
handler. Depending on the state it may now poll a little bit longer. 
Typical loop counts I've seen were around 20-30.
The platform I'm currently testing with requires a FPGA bitsream rebuild 
to change the SPI clock rate. In case SPI clock moved to the fast end 50 
loops might not be sufficient anymore.
I then added 100% on top of it to be on the safe side.

-- 
Greetings,
Michael

--
Analog Devices GmbH      Wilhelm-Wagenfeld-Str. 6      80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin,
Margaret Seif

  parent reply	other threads:[~2015-12-08 14:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-08 11:52 [PATCH v2] drivers/net/ieee802154/adf7242: Driver for ADF7242 MAC IEEE802154 michael.hennerich
2015-12-08 11:52 ` michael.hennerich
2015-12-08 13:37 ` Stefan Schmidt
2015-12-08 14:05   ` Stefan Schmidt
2015-12-08 14:44     ` Michael Hennerich
2015-12-08 14:44       ` Michael Hennerich
2015-12-08 14:56     ` Michael Hennerich [this message]
2015-12-08 14:56       ` Michael Hennerich
2015-12-08 15:13       ` Stefan Schmidt
2015-12-08 14:41   ` Michael Hennerich
2015-12-08 14:41     ` Michael Hennerich
2015-12-08 14:30 ` Stefan Schmidt
2015-12-08 14:45   ` Michael Hennerich
2015-12-08 14:45     ` Michael Hennerich

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=5666EFB5.2040706@analog.com \
    --to=michael.hennerich@analog.com \
    --cc=alex.aring@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=stefan@datenfreihafen.org \
    --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.