All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lino Sanfilippo <LinoSanfilippo@gmx.de>
To: Raghu Vatsavayi <rvatsavayi@caviumnetworks.com>, davem@davemloft.net
Cc: netdev@vger.kernel.org,
	Derek Chickles <derek.chickles@caviumnetworks.com>,
	Satanand Burla <satananda.burla@caviumnetworks.com>,
	Felix Manlunas <felix.manlunas@caviumnetworks.com>,
	Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com>
Subject: Re: [PATCH net-next v3] Add support of Cavium Liquidio ethernet adapters
Date: Fri, 19 Dec 2014 21:44:15 +0100	[thread overview]
Message-ID: <54948E1F.2080405@gmx.de> (raw)
In-Reply-To: <1418959519-31681-1-git-send-email-rvatsavayi@caviumnetworks.com>

Hi,

On 19.12.2014 04:25, Raghu Vatsavayi wrote:
> +
> +static int cn6xxx_soft_reset(struct octeon_device *oct)
> +{
> +	octeon_write_csr64(oct, CN66XX_WIN_WR_MASK_REG, 0xFF);
> +
> +	lio_dev_dbg(oct, "BIST enabled for soft reset\n");
> +
> +	OCTEON_PCI_WIN_WRITE(oct, CN66XX_CIU_SOFT_BIST, 1);
> +	octeon_write_csr64(oct, CN66XX_SLI_SCRATCH1, 0x1234ULL);
> +
> +	OCTEON_PCI_WIN_READ(oct, CN66XX_CIU_SOFT_RST);
> +	OCTEON_PCI_WIN_WRITE(oct, CN66XX_CIU_SOFT_RST, 1);
> +
> +	/* Wait for 10ms as Octeon resets. */
> +	mdelay(10);
> +
> +	if (octeon_read_csr64(oct, CN66XX_SLI_SCRATCH1) == 0x1234ULL) {
> +		lio_dev_err(oct, "Soft reset failed\n");
> +		return 1;
> +	}

Before the delay you should probably make sure that the writes are
flushed to avoid pci write posting.

> +
> +static int cn68xx_soft_reset(struct octeon_device *oct)
> +{
> +	octeon_write_csr64(oct, CN68XX_WIN_WR_MASK_REG, 0xFF);
> +
> +	lio_dev_dbg(oct, "BIST enabled for CN68XX soft reset\n");
> +	OCTEON_PCI_WIN_WRITE(oct, CN68XX_CIU_SOFT_BIST, 1);
> +
> +	octeon_write_csr64(oct, CN68XX_SLI_SCRATCH1, 0x1234ULL);
> +
> +	OCTEON_PCI_WIN_READ(oct, CN68XX_CIU_SOFT_RST);
> +	OCTEON_PCI_WIN_WRITE(oct, CN68XX_CIU_SOFT_RST, 1);
> +
> +	/* Wait for 100ms as Octeon resets. */
> +	mdelay(100);
> +
> +	if (octeon_read_csr64(oct, CN68XX_SLI_SCRATCH1) == 0x1234ULL) {
> +		lio_dev_err(oct, "Soft reset failed\n");
> +		return 1;
> +	}

same here.

Regards,
Lino

  parent reply	other threads:[~2014-12-19 20:44 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-24  3:19 [PATCH v2] Add support of Cavium Liquidio ethernet adapters Raghu Vatsavayi
2014-11-24 20:52 ` Daniel Borkmann
2014-11-24 21:01 ` Florian Fainelli
2014-11-24 21:08   ` David Miller
2014-12-01 19:57     ` Vatsavayi, Raghu
2014-12-19  3:25       ` [PATCH net-next v3] " Raghu Vatsavayi
2014-12-19  6:59         ` Stephen Hemminger
2014-12-19 17:54           ` Chickles, Derek
2014-12-19  7:01         ` Stephen Hemminger
2014-12-19  7:03         ` Stephen Hemminger
2014-12-19  7:05         ` Stephen Hemminger
2014-12-19  7:07         ` Stephen Hemminger
2014-12-19  7:11         ` Stephen Hemminger
2014-12-19  7:14         ` Stephen Hemminger
2014-12-19  7:21         ` Stephen Hemminger
2014-12-19  7:23         ` Stephen Hemminger
2014-12-19  7:26         ` Stephen Hemminger
2014-12-19  7:28         ` Stephen Hemminger
2014-12-19 18:39           ` Chickles, Derek
2014-12-19 20:53             ` Stephen Hemminger
2014-12-19 20:44         ` Lino Sanfilippo [this message]
2014-12-19 20:54           ` Stephen Hemminger
2014-12-19 21:00             ` Lino Sanfilippo
2014-12-19 21:07               ` Lino Sanfilippo
2014-12-19 21:14         ` Lino Sanfilippo
2014-12-19 21:48         ` Lino Sanfilippo
2014-12-19 22:39           ` Chickles, Derek
2014-12-19 22:04         ` Lino Sanfilippo
2014-12-19 22:20           ` Chickles, Derek
2014-12-19 22:24         ` Lino Sanfilippo
2014-12-19 22:53           ` Chickles, Derek
2014-12-19 22:51         ` Lino Sanfilippo
2014-12-20  0:47           ` Chickles, Derek
2015-01-31  2:29             ` [PATCH net-next v4] " Raghu Vatsavayi
2015-02-03  3:00               ` David Miller
2015-02-06 20:28                 ` Chickles, Derek
2015-02-12  1:20                   ` [PATCH net-next v5] " Raghu Vatsavayi
2015-02-19 19:36                     ` David Miller
2015-02-19 20:44                       ` Chickles, Derek
2015-02-19 21:21                         ` David Miller
2015-02-19 21:28                           ` Chickles, Derek
2015-04-08 19:08                             ` [PATCH net-next v6] " Raghu Vatsavayi
2015-04-09  0:46                               ` Joe Perches
2015-04-25  0:34                                 ` [PATCH net-next v7] " Raghu Vatsavayi
2015-04-26 20:04                                   ` David Miller
2015-04-27 16:26                                     ` Chickles, Derek
2015-04-27 16:27                                       ` David Miller
2015-04-27 17:04                                         ` Chickles, Derek
2015-04-27 17:22                                           ` David Miller
2015-06-10  1:15                                             ` [PATCH net-next v8] " Raghu Vatsavayi
2015-06-11  5:45                                               ` David Miller
2014-12-20  0:33         ` [PATCH net-next v3] " Lino Sanfilippo

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=54948E1F.2080405@gmx.de \
    --to=linosanfilippo@gmx.de \
    --cc=davem@davemloft.net \
    --cc=derek.chickles@caviumnetworks.com \
    --cc=felix.manlunas@caviumnetworks.com \
    --cc=netdev@vger.kernel.org \
    --cc=raghu.vatsavayi@caviumnetworks.com \
    --cc=rvatsavayi@caviumnetworks.com \
    --cc=satananda.burla@caviumnetworks.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.