public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches•com>
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 V2 08/18] liquidio: CN23XX queue manipulation
Date: Fri, 12 Aug 2016 12:30:22 -0700	[thread overview]
Message-ID: <1471030222.18251.13.camel@perches.com> (raw)
In-Reply-To: <1471026035-15323-9-git-send-email-rvatsavayi@caviumnetworks.com>

On Fri, 2016-08-12 at 11:20 -0700, Raghu Vatsavayi wrote:
> This patch adds support for cn23xx queue manipulation.

trivia:

> diff --git a/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c b/drivers/net/ethernet/cavium/liquidio/cn23xx_pf_device.c
[]
> @@ -315,6 +315,52 @@ static void cn23xx_setup_global_mac_regs(struct octeon_device *oct)
>  		(oct, CN23XX_SLI_PKT_MAC_RINFO64(mac_no, pf_num)));
>  }
>  
> +static int cn23xx_reset_io_queues(struct octeon_device *oct)
> +{
> +	int ret_val = 0;
> +	u64 d64 = 0ULL, q_no = 0ULL, srn = 0ULL, ern = 0ULL;

none of these initializations are necessary.

> +
> +	srn = oct->sriov_info.pf_srn;
> +	ern = srn + oct->sriov_info.num_pf_rings;
> +
> +	/*As per HRM reg description, s/w cant write 0 to ENB. */
> +	/*to make the queue off, need to set the RST bit. */
> +
> +	/* Reset the Enable bit for all the 64 IQs.  */
> +	for (q_no = srn; q_no < ern; q_no++) {
> +		/* set RST bit to 1. This bit applies to both IQ and OQ */
> +		d64 = octeon_read_csr64(oct, CN23XX_SLI_IQ_PKT_CONTROL64(q_no));
> +		d64 = d64 | CN23XX_PKT_INPUT_CTL_RST;
> +		octeon_write_csr64(oct, CN23XX_SLI_IQ_PKT_CONTROL64(q_no), d64);
> +	}

[]

> +static void cn23xx_enable_io_queues(struct octeon_device *oct)
> +{
> +	u64 q_no = 0, reg_val = 0ULL;
> +	s32 srn = 0, ern = 0;

Mixing s32 and u64 types for srn and ern seems odd
and likely wrong.

> +
> +	srn = oct->sriov_info.pf_srn;
> +	ern = srn + oct->num_iqs;

  reply	other threads:[~2016-08-12 19:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-12 18:20 [PATCH net-next V2 00/18] liquidio CN23XX support Raghu Vatsavayi
2016-08-12 18:20 ` [PATCH net-next V2 01/18] liquidio: Consolidate common functionality Raghu Vatsavayi
2016-08-12 19:21   ` Joe Perches
2016-08-12 18:20 ` [PATCH net-next V2 02/18] liquidio: Firmware version management Raghu Vatsavayi
2016-08-12 19:24   ` Joe Perches
2016-08-12 18:20 ` [PATCH net-next V2 03/18] liquidio: Common enable irq function Raghu Vatsavayi
2016-08-12 18:20 ` [PATCH net-next V2 04/18] liquidio: CN23XX register definitions Raghu Vatsavayi
2016-08-12 18:20 ` [PATCH net-next V2 05/18] liquidio: CN23XX queue definitions Raghu Vatsavayi
2016-08-12 18:20 ` [PATCH net-next V2 06/18] liquidio: CN23XX device init and sriov config Raghu Vatsavayi
2016-08-12 18:20 ` [PATCH net-next V2 07/18] liquidio: CN23XX register setup Raghu Vatsavayi
2016-08-12 18:20 ` [PATCH net-next V2 08/18] liquidio: CN23XX queue manipulation Raghu Vatsavayi
2016-08-12 19:30   ` Joe Perches [this message]
2016-08-12 18:20 ` [PATCH net-next V2 09/18] liquidio: MSIX support for CN23XX Raghu Vatsavayi
2016-08-12 18:20 ` [PATCH net-next V2 10/18] liquidio: CN23XX firmware download Raghu Vatsavayi
2016-08-12 18:20 ` [PATCH net-next V2 11/18] liquidio: link and control commands Raghu Vatsavayi
2016-08-12 18:20 ` [PATCH net-next V2 12/18] liquidio: RX " Raghu Vatsavayi
2016-08-12 18:20 ` [PATCH net-next V2 13/18] liquidio: CN23XX IQ access Raghu Vatsavayi
2016-08-12 18:20 ` [PATCH net-next V2 14/18] liquidio: CN23XX octeon3 instruction Raghu Vatsavayi
2016-08-12 18:20 ` [PATCH net-next V2 15/18] liquidio: ethtool and led control support Raghu Vatsavayi
2016-08-12 18:20 ` [PATCH net-next V2 16/18] liquidio: CN23XX health monitoring Raghu Vatsavayi
2016-08-12 18:20 ` [PATCH net-next V2 17/18] liquidio: CN23XX napi support Raghu Vatsavayi
2016-08-12 18:20 ` [PATCH net-next V2 18/18] liquidio:CN23XX pause frame support Raghu Vatsavayi
2016-08-13 18:59 ` [PATCH net-next V2 00/18] liquidio CN23XX support David Miller

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=1471030222.18251.13.camel@perches.com \
    --to=joe@perches$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=derek.chickles@caviumnetworks$(echo .)com \
    --cc=felix.manlunas@caviumnetworks$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=raghu.vatsavayi@caviumnetworks$(echo .)com \
    --cc=rvatsavayi@caviumnetworks$(echo .)com \
    --cc=satananda.burla@caviumnetworks$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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