Re: [PATCH RESEND v3 5/6] staging/rdma/hfi1: adding per SDMA engine stats to hfistats

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

 



On 03/01/2016 03:27 PM, Jubin John wrote:
>>> diff --git a/drivers/staging/rdma/hfi1/sdma.c b/drivers/staging/rdma/hfi1/sdma.c
>>> index 1d38be5..cb66bd0 100644
>>> --- a/drivers/staging/rdma/hfi1/sdma.c
>>> +++ b/drivers/staging/rdma/hfi1/sdma.c
>>> @@ -1061,7 +1061,6 @@ int sdma_init(struct hfi1_devdata *dd, u8 port)
>>>  		sde->desc_avail = sdma_descq_freecnt(sde);
>>>  		sde->sdma_shift = ilog2(descq_cnt);
>>>  		sde->sdma_mask = (1 << sde->sdma_shift) - 1;
>>> -		sde->descq_full_count = 0;
>>>  
>>>  		/* Create a mask for all 3 chip interrupt sources */
>>>  		sde->imask = (u64)1 << (0*TXE_NUM_SDMA_ENGINES + this_idx)
>>> @@ -1073,6 +1072,8 @@ int sdma_init(struct hfi1_devdata *dd, u8 port)
>>>  		/* Create a mask specifically for sdma_progress */
>>>  		sde->progress_mask =
>>>  			(u64)1 << (TXE_NUM_SDMA_ENGINES + this_idx);
>>> +		sde->int_mask =
>>> +			(u64)1 << (0 * TXE_NUM_SDMA_ENGINES + this_idx);
>>                                    ^^^^^^^^^^^^^^^^^^^^^^^^
>> Why is that there?
>>
> 
> Hi Doug,
> 
> The zero was intentionally added in an attempt to highlight that this
> was for the first interrupt source, like we do in other places above this
> where we have 1 * TXE_NUM_SDMA_ENGINES, 2 * TXE_NUM_SDMA_ENGINES etc.
> The interrupt sources are separated by the number of SDMA engines
> i.e TXE_NUM_SDMA_ENGINES. However, we agree that the code is not
> consistent throughout. Would you like us to do a cleanup of this code
> in a follow-on patch or rework this patch and resend the series?
> 
> Jubin
> 

Thanks, the code is confusing to read, so a cleanup would be nice.  Just
send me something I can squash into this patch is good enough.

-- 
Doug Ledford <dledford@xxxxxxxxxx>
              GPG KeyID: 0E572FDD


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux