From owner-svn-src-all@FreeBSD.ORG Wed Nov 26 00:48:08 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD4815CB; Wed, 26 Nov 2014 00:48:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (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 A9D3010A; Wed, 26 Nov 2014 00:48:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAQ0m87x090304; Wed, 26 Nov 2014 00:48:08 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAQ0m8ku090298; Wed, 26 Nov 2014 00:48:08 GMT (envelope-from np@FreeBSD.org) Message-Id: <201411260048.sAQ0m8ku090298@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 26 Nov 2014 00:48:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r275094 - in stable/8/sys/dev/cxgbe: . common X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2014 00:48:08 -0000 Author: np Date: Wed Nov 26 00:48:07 2014 New Revision: 275094 URL: https://svnweb.freebsd.org/changeset/base/275094 Log: MFC r274724: cxgbe(4): figure out the max payload size and save it for later. Modified: stable/8/sys/dev/cxgbe/common/common.h stable/8/sys/dev/cxgbe/t4_main.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/cxgbe/ (props changed) Modified: stable/8/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/8/sys/dev/cxgbe/common/common.h Wed Nov 26 00:47:36 2014 (r275093) +++ stable/8/sys/dev/cxgbe/common/common.h Wed Nov 26 00:48:07 2014 (r275094) @@ -238,6 +238,7 @@ struct vpd_params { struct pci_params { unsigned int vpd_cap_addr; + unsigned int mps; unsigned short speed; unsigned short width; }; Modified: stable/8/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/8/sys/dev/cxgbe/t4_main.c Wed Nov 26 00:47:36 2014 (r275093) +++ stable/8/sys/dev/cxgbe/t4_main.c Wed Nov 26 00:48:07 2014 (r275094) @@ -567,6 +567,8 @@ t4_attach(device_t dev) v = pci_read_config(dev, i + PCIER_DEVICE_CTL, 2); v |= PCIEM_CTL_RELAXED_ORD_ENABLE; pci_write_config(dev, i + PCIER_DEVICE_CTL, v, 2); + + sc->params.pci.mps = 128 << ((v & PCIEM_CTL_MAX_PAYLOAD) >> 5); } snprintf(sc->lockname, sizeof(sc->lockname), "%s",