Re: [PATCH 5/7] be2iscsi: Fix doorbell format for EQ/CQ/RQ s per SLI spec.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux