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