All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: Jayamohan Kallickal <jayamohank@gmail.com>
Cc: jbottomley@parallels.com, linux-scsi@vger.kernel.org,
	Jayamohan Kallickal <jayamohan.kallickal@emulex.com>,
	John Soni Jose <sony.john-n@emulex.com>
Subject: Re: [PATCH 5/7] be2iscsi: Fix doorbell format for EQ/CQ/RQ s per SLI spec.
Date: Fri, 17 Jan 2014 02:53:33 -0600	[thread overview]
Message-ID: <52D8EF8D.1090504@cs.wisc.edu> (raw)
In-Reply-To: <1389573741-3523-5-git-send-email-jayamohan.kallickal@emulex.com>

On 01/12/2014 06:42 PM, Jayamohan Kallickal wrote:

> diff --git a/drivers/scsi/be2iscsi/be_cmds.c b/drivers/scsi/be2iscsi/be_cmds.c
> index b14949a..4e1074a 100644
> --- a/drivers/scsi/be2iscsi/be_cmds.c
> +++ b/drivers/scsi/be2iscsi/be_cmds.c
> @@ -436,10 +436,20 @@ static void beiscsi_cq_notify(struct beiscsi_hba *phba, u16 qid, bool arm,
>  		       u16 num_popped)
>  {
>  	u32 val = 0;
> -	val |= qid & DB_CQ_RING_ID_MASK;
> +
>  	if (arm)
>  		val |= 1 << DB_CQ_REARM_SHIFT;
> +
>  	val |= num_popped << DB_CQ_NUM_POPPED_SHIFT;
> +
> +	/* Setting lower order CQ_ID Bits */
> +	val |= qid & DB_CQ_RING_ID_LOW_MASK;
> +
> +	/* Setting Higher order CQ_ID Bits */
> +	val |= (((qid >> DB_CQ_HIGH_FEILD_SHIFT) &
> +		  DB_CQ_RING_ID_HIGH_MASK)
> +		  << DB_CQ_HIGH_SET_SHIFT);
> +
>  	iowrite32(val, phba->db_va + DB_CQ_OFFSET);



> @@ -1155,10 +1164,20 @@ static void hwi_ring_cq_db(struct beiscsi_hba *phba,
>  			   unsigned char rearm, unsigned char event)
>  {
>  	u32 val = 0;
> -	val |= id & DB_CQ_RING_ID_MASK;
> +
>  	if (rearm)
>  		val |= 1 << DB_CQ_REARM_SHIFT;
> +
>  	val |= num_processed << DB_CQ_NUM_POPPED_SHIFT;
> +
> +	/* Setting lower order CQ_ID Bits */
> +	val |= (id & DB_CQ_RING_ID_LOW_MASK);
> +
> +	/* Setting Higher order CQ_ID Bits */
> +	val |= (((id >> DB_CQ_HIGH_FEILD_SHIFT) &
> +		  DB_CQ_RING_ID_HIGH_MASK)
> +		  << DB_CQ_HIGH_SET_SHIFT);
> +
>  	iowrite32(val, phba->db_va + DB_CQ_OFFSET);
>  }
>  

Are these 2 functions doing the same thing?

I think hwi_ring_cq_db is also doing the same operations, but with
different values. You should make a function.

  reply	other threads:[~2014-01-17  8:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-13  0:42 [PATCH 1/7] be2iscsi: Fix handling timed out MBX completion from FW Jayamohan Kallickal
2014-01-13  0:42 ` [PATCH 2/7] be2iscsi: Fix port speed typo in driver Jayamohan Kallickal
2014-01-13  0:42 ` [PATCH 3/7] be2iscsi : Fix IRQ_Affinity support " Jayamohan Kallickal
2014-01-13  0:42 ` [PATCH 4/7] be2iscsi : Fix statistics update in the driver Jayamohan Kallickal
2014-01-17  8:47   ` Mike Christie
2014-01-13  0:42 ` [PATCH 5/7] be2iscsi: Fix doorbell format for EQ/CQ/RQ s per SLI spec Jayamohan Kallickal
2014-01-17  8:53   ` Mike Christie [this message]
2014-01-13  0:42 ` [PATCH 6/7] be2iscsi: Fix the session cleanup when reboot/shutdown happens Jayamohan Kallickal
2014-01-13  0:42 ` [PATCH 7/7] be2iscsi : Bump driver version Jayamohan Kallickal
2014-01-13  0:42 ` [PATCH 0/7] be2iscsi: Update to 10.2.84.0 Jayamohan Kallickal

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=52D8EF8D.1090504@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=jayamohan.kallickal@emulex.com \
    --cc=jayamohank@gmail.com \
    --cc=jbottomley@parallels.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=sony.john-n@emulex.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.