[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180417143232.GH28657@bhelgaas-glaptop.roam.corp.google.com>
Date: Tue, 17 Apr 2018 09:32:32 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Christoph Hellwig <hch@...radead.org>
Cc: Frederick Lawler <fred@...dlawl.com>, bhelgaas@...gle.com,
mike.marciniszyn@...el.com, dennis.dalessandro@...el.com,
dledford@...hat.com, jgg@...lanox.com, linux-pci@...r.kernel.org,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
Bartlomiej Dudek <bartlomiej.dudek@...el.com>
Subject: Re: [PATCH v3 0/2] IB/hfi1: Cleanup PCIe link configuration
[+cc Bartlomiej, who recently changed do_pcie_gen3_transition(), LKML]
On Mon, Apr 16, 2018 at 11:53:43PM -0700, Christoph Hellwig wrote:
> On Mon, Apr 16, 2018 at 07:28:23PM -0500, Frederick Lawler wrote:
> > The IB/hfi1 driver uses custom macros to configure the target link speed. Some
> > macros were previously replaced, but not fully. This patch series addresses the
> > configuration inconsistencies by adding PCI_EXP_LNKCTL2_TLS* macros to PCI,
> > and then use them in the following IB/hfi1 patch.
>
> Btw, why is the driver configuring the PCIe link speed? Isn't this
> something we should be handling in the PCI core?
Good question. I think this sort of code definitely should not be in
drivers unless it's to work around some kind of defect in the device.
I think the intent of the spec is that neither the OS nor the driver
has to deal with link training and the link should train to the
highest speed supported by both ends. For example, PCIe r4.0, sec 1.2
says
Initialization – During hardware initialization, each PCI Express
Link is set up following a negotiation of Lane widths and frequency
of operation by the two agents at each end of the Link. No firmware
or operating system software is involved.
Maybe the Intel guys can comment on why HFI needs this code.
Presumably they didn't write it just for fun, so I assume there's
some reason.
Bjorn
Powered by blists - more mailing lists