Re: [PATCH v2 0/2] IB/hfi1: Cleanup PCIe link configuration

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

 



On Mon, Apr 09, 2018 at 06:22:46PM -0500, Frederick Lawler wrote:
> Frederick Lawler wrote:
> > The IB/hfi1 driver uses custom macros to configure link speed. Some macros were
> > previously replaced, but not fully. This patch series addresses the 
> > configuration inconsistencies and introduces minor cleanup by replacing
> > redundant magic number usage.

Sorry for not responding to the actual patches; I'm not subscribed to
linux-rdma, so reading them via an archive.

> > Frederick Lawler (2):
> >   IB/hfi1: Replace custom hfi1 macros with PCIe macros

s/This patch removes/Remove/
s/infavor/in favor/

> @@ -320,7 +315,7 @@ int pcie_speeds(struct hfi1_devdata *dd)
> -	if ((linkcap & PCI_EXP_LNKCAP_SLS) != GEN3_SPEED_VECTOR) {
> +	if ((linkcap & PCI_EXP_LNKCAP_SLS) != PCI_EXP_LNKSTA_CLS_8_0GB) {

Use PCI_EXP_LNKCAP_SLS_8_0GB (not PCI_EXP_LNKSTA_CLS_8_0GB) since
we're testing a PCI_EXP_LNKCAP value.  They happen to be the same
values, but we should use the matching definitions.

> @@ -1048,14 +1040,14 @@ int do_pcie_gen3_transition(struct hfi1_devdata *dd)
> -		target_vector = GEN1_SPEED_VECTOR;
> +		target_vector = PCI_EXP_LNKSTA_CLS_2_5GB;

target_vector is later ORed into a PCI_EXP_LNKCTL2 value.  We
currently do not have any definitions for PCI_EXP_LNKCTL2.  We should
add those, then use them here.  Similarly for the rest of this patch.

> -		target_speed = 8000;
> +		target_speed = 8000;

Is there an unintended whitespace change here, e.g., trailing space or
replacing tab with space?  I can't tell from the archive.

> >   IB/hfi1: Cleanup PCIe speed link configuration

s/speed link/link speed/



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux