From owner-freebsd-hackers@freebsd.org Tue Mar 14 13:42:02 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 638F2D0C416 for ; Tue, 14 Mar 2017 13:42:02 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39C5B8C1 for ; Tue, 14 Mar 2017 13:42:02 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from [192.168.200.3] (c-73-147-115-187.hsd1.va.comcast.net [73.147.115.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: gallatin) by duke.cs.duke.edu (Postfix) with ESMTPSA id 6DB8B270019D; Tue, 14 Mar 2017 09:41:54 -0400 (EDT) DMARC-Filter: OpenDMARC Filter v1.3.1 duke.cs.duke.edu 6DB8B270019D Authentication-Results: duke.cs.duke.edu; dmarc=none header.from=cs.duke.edu DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail0816; t=1489498914; bh=WE/2B6XFOfqkN6VQM32/khRbO5R+IaEmmXR+2aNA/Bw=; h=Subject:To:From:Date:From; b=cFrdP1ejWbaU8SHnR7RdEbnoC/F0U541CYNRC4cf/GBTcbwAa9AS5Q7C0dFxEmQUT 3AZ7fZ2TEcNEHT2sfNgyqw331V9axXY9vEGdy08/cV28WviEU2pkc17Wi1Fpz5HZD0 1/o8PMnW5DsvvAZ6oQF7ULpnqafqI43GMwJi2Memzp/8kAuVE/khYet9nJZQ1OMoCW qOTsx2krrdMFjbitglp0Bm9eCkrEPEYDwGnn5SOGpmGPEdA2hbzKazcTX/2SeVmLQ7 FjZOAS4eSTjibvnIoWlxn1yBcQkluVph1MZBgHRUde4Q8j+kArnbpH6ojmkIfrktCY nRNXo1ND51m3g== Subject: Re: PCI speed To: Dirk-Willem van Gulik , freebsd-hackers@freebsd.org References: <03745A05-DE0E-4071-B432-BFE58C3A7E16@webweaving.org> From: Andrew Gallatin Message-ID: <061c8bd6-63d1-2e59-2ab0-c4b48c201e96@cs.duke.edu> Date: Tue, 14 Mar 2017 09:41:53 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <03745A05-DE0E-4071-B432-BFE58C3A7E16@webweaving.org> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Mar 2017 13:42:02 -0000 On 03/03/2017 17:34, Dirk-Willem van Gulik wrote: > Forgive me my ignorance - but for some cards - pciconf(8) nicely lists the speed of the bus: > >> ciss0@pci0:12:0:0: class=0x010400 card=0x3243103c chip=0x323a103c rev=0x01 hdr=0x00 > ... >> cap 10[70] = PCI-Express 2 endpoint max data 128(256) RO NS >> link x4(x8) speed 5.0(5.0) >> cap 11[ac] = MSI-X supports 16 messages, enabled >> Table in map 0x10[0x1c2000], PBA in map 0x10[0x1c4000] >> PCI-e errors = Correctable Error Detected >> Fatal Error Detected >> Unsupported Request Detected > > and that matches exactly with what it is. While for other cards it does not seem to report that: > >> mpt4@pci0:7:8:1: class=0x010000 card=0x10b01000 chip=0x00301000 rev=0x08 hdr=0x00 > .... >> cap 01[50] = powerspec 2 supports D0 D1 D2 D3 current D0 >> cap 05[58] = MSI supports 1 message, 64 bit >> cap 07[68] = PCI-X 64-bit supports 133MHz, 2048 burst read, 8 split transactions >> cap 00[70] = unknown > > and in fact seems to mis report the bus - this is a PCIe Gen 2 x4 bus with a x8 Connector Width > holding a LSI 22320SE Ultra320 SCSI dual channel PCIe X4 card. > > How should one interpret this ? > > Dw. > > The mpt seems to be a PCI-X device, not a PCI Express device. So it is likely that the add-on card actually contains a PCI-e to PCI-X bridge chip. PCI Express was *very* hard to get right in the early days of Gen 1 before companies had built up large PCIe IP libraries and test suites. So a lot of companies with existing PCI and PCI-X products shipped "native" PCIe products that were actually composed of a PCIe connector with a third part PCIe to PCI-X bridge. It might be interesting to see what's upstream from the bus. I'd expect there is a PLX (or maybe IDT) device in there. Drew