1/************************************************************************** 2 3Copyright (c) 2007-2009, Chelsio Inc. 4All rights reserved. 5 6Redistribution and use in source and binary forms, with or without 7modification, are permitted provided that the following conditions are met: 8 --- 14 unchanged lines hidden (view full) --- 23INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26POSSIBILITY OF SUCH DAMAGE. 27 28***************************************************************************/ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/dev/cxgb/cxgb_main.c 219902 2011-03-23 13:10:15Z jhb $"); |
32 33#include <sys/param.h> 34#include <sys/systm.h> 35#include <sys/kernel.h> 36#include <sys/bus.h> 37#include <sys/module.h> 38#include <sys/pciio.h> 39#include <sys/conf.h> --- 413 unchanged lines hidden (view full) --- 453 char buf[80]; 454 455 sc = device_get_softc(dev); 456 sc->dev = dev; 457 sc->msi_count = 0; 458 ai = cxgb_get_adapter_info(dev); 459 460 /* find the PCIe link width and set max read request to 4KB*/ |
461 if (pci_find_cap(dev, PCIY_EXPRESS, ®) == 0) { |
462 uint16_t lnk; 463 464 lnk = pci_read_config(dev, reg + PCIR_EXPRESS_LINK_STA, 2); 465 sc->link_width = (lnk & PCIM_LINK_STA_WIDTH) >> 4; 466 if (sc->link_width < 8 && 467 (ai->caps & SUPPORTED_10000baseT_Full)) { 468 device_printf(sc->dev, 469 "PCIe x%d Link, expect reduced performance\n", --- 2909 unchanged lines hidden --- |