9da57d7b0ddd8d73b676ce12c040362132cdd538bt/*
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * CDDL HEADER START
9da57d7b0ddd8d73b676ce12c040362132cdd538bt *
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China * Copyright(c) 2007-2009 Intel Corporation. All rights reserved.
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * The contents of this file are subject to the terms of the
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Common Development and Distribution License (the "License").
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * You may not use this file except in compliance with the License.
9da57d7b0ddd8d73b676ce12c040362132cdd538bt *
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer * or http://www.opensolaris.org/os/licensing.
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * See the License for the specific language governing permissions
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * and limitations under the License.
9da57d7b0ddd8d73b676ce12c040362132cdd538bt *
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer * When distributing Covered Code, include this CDDL HEADER in each
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * If applicable, add the following below this CDDL HEADER, with the
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * fields enclosed by brackets "[]" replaced with your own identifying
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * information: Portions Copyright [yyyy] [name of copyright owner]
9da57d7b0ddd8d73b676ce12c040362132cdd538bt *
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * CDDL HEADER END
9da57d7b0ddd8d73b676ce12c040362132cdd538bt */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt/*
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China * Use is subject to license terms.
9da57d7b0ddd8d73b676ce12c040362132cdd538bt */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#include "ixgbe_sw.h"
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#include "ixgbe_debug.h"
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#ifdef IXGBE_DEBUG
9da57d7b0ddd8d73b676ce12c040362132cdd538btextern ddi_device_acc_attr_t ixgbe_regs_acc_attr;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt/*
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Dump interrupt-related registers & structures
9da57d7b0ddd8d73b676ce12c040362132cdd538bt */
9da57d7b0ddd8d73b676ce12c040362132cdd538btvoid
9da57d7b0ddd8d73b676ce12c040362132cdd538btixgbe_dump_interrupt(void *adapter, char *tag)
9da57d7b0ddd8d73b676ce12c040362132cdd538bt{
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_t *ixgbe = (ixgbe_t *)adapter;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt struct ixgbe_hw *hw = &ixgbe->hw;
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer ixgbe_intr_vector_t *vect;
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer uint32_t ivar, reg, hw_index;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt int i, j;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt /*
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * interrupt control registers
9da57d7b0ddd8d73b676ce12c040362132cdd538bt */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "interrupt: %s\n", tag);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "..eims: 0x%x\n", IXGBE_READ_REG(hw, IXGBE_EIMS));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "..eimc: 0x%x\n", IXGBE_READ_REG(hw, IXGBE_EIMC));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "..eiac: 0x%x\n", IXGBE_READ_REG(hw, IXGBE_EIAC));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "..eiam: 0x%x\n", IXGBE_READ_REG(hw, IXGBE_EIAM));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "..gpie: 0x%x\n", IXGBE_READ_REG(hw, IXGBE_GPIE));
13740cb230f19fcbf1a6468d1a6a0ba9a0a09c22Paul Guo ixgbe_log(ixgbe, "otherflag: 0x%x\n", ixgbe->capab->other_intr);
13740cb230f19fcbf1a6468d1a6a0ba9a0a09c22Paul Guo ixgbe_log(ixgbe, "eims_mask: 0x%x\n", ixgbe->eims);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt /* ivar: interrupt vector allocation registers */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt for (i = 0; i < IXGBE_IVAR_REG_NUM; i++) {
9da57d7b0ddd8d73b676ce12c040362132cdd538bt if (ivar = IXGBE_READ_REG(hw, IXGBE_IVAR(i))) {
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "ivar[%d]: 0x%x\n", i, ivar);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt }
9da57d7b0ddd8d73b676ce12c040362132cdd538bt }
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt /* each allocated vector */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt for (i = 0; i < ixgbe->intr_cnt; i++) {
9da57d7b0ddd8d73b676ce12c040362132cdd538bt vect = &ixgbe->vect_map[i];
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "vector %d rx rings %d tx rings %d eitr: 0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt i, vect->rxr_cnt, vect->txr_cnt,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt IXGBE_READ_REG(hw, IXGBE_EITR(i)));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt /* for each rx ring bit set */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt j = bt_getlowbit(vect->rx_map, 0, (ixgbe->num_rx_rings - 1));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt while (j >= 0) {
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer hw_index = ixgbe->rx_rings[j].hw_index;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "rx %d ivar %d rxdctl: 0x%x srrctl: 0x%x\n",
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer hw_index, IXGBE_IVAR_RX_QUEUE(hw_index),
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer IXGBE_READ_REG(hw, IXGBE_RXDCTL(hw_index)),
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer IXGBE_READ_REG(hw, IXGBE_SRRCTL(hw_index)));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt j = bt_getlowbit(vect->rx_map, (j + 1),
9da57d7b0ddd8d73b676ce12c040362132cdd538bt (ixgbe->num_rx_rings - 1));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt }
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt /* for each tx ring bit set */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt j = bt_getlowbit(vect->tx_map, 0, (ixgbe->num_tx_rings - 1));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt while (j >= 0) {
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "tx %d ivar %d txdctl: 0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt j, IXGBE_IVAR_TX_QUEUE(j),
9da57d7b0ddd8d73b676ce12c040362132cdd538bt IXGBE_READ_REG(hw, IXGBE_TXDCTL(j)));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt j = bt_getlowbit(vect->tx_map, (j + 1),
9da57d7b0ddd8d73b676ce12c040362132cdd538bt (ixgbe->num_tx_rings - 1));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt }
9da57d7b0ddd8d73b676ce12c040362132cdd538bt }
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt /* reta: RSS redirection table */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt for (i = 0; i < 32; i++) {
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "reta(%d): 0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt i, IXGBE_READ_REG(hw, IXGBE_RETA(i)));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt }
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt /* rssrk: RSS random key */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt for (i = 0; i < 10; i++) {
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "rssrk(%d): 0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt i, IXGBE_READ_REG(hw, IXGBE_RSSRK(i)));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt }
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt /* check ral/rah */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "-- ral/rah --\n");
9da57d7b0ddd8d73b676ce12c040362132cdd538bt for (i = 0; i < 16; i++) {
9da57d7b0ddd8d73b676ce12c040362132cdd538bt if (reg = IXGBE_READ_REG(hw, IXGBE_RAL(i))) {
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "ral(%d): 0x%x rah(%d): 0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt i, reg, i, IXGBE_READ_REG(hw, IXGBE_RAH(i)));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt }
9da57d7b0ddd8d73b676ce12c040362132cdd538bt }
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt /* check mta */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "-- mta --\n");
9da57d7b0ddd8d73b676ce12c040362132cdd538bt for (i = 0; i < 128; i++) {
9da57d7b0ddd8d73b676ce12c040362132cdd538bt if (reg = IXGBE_READ_REG(hw, IXGBE_MTA(i))) {
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "mta(%d): 0x%x\n", i, reg);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt }
9da57d7b0ddd8d73b676ce12c040362132cdd538bt }
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt /* check vfta */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt {
9da57d7b0ddd8d73b676ce12c040362132cdd538bt uint32_t off = IXGBE_VFTA(0);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "-- vfta --\n");
9da57d7b0ddd8d73b676ce12c040362132cdd538bt for (i = 0; i < 640; i++) {
9da57d7b0ddd8d73b676ce12c040362132cdd538bt if (reg = IXGBE_READ_REG(hw, off)) {
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "vfta(0x%x): 0x%x\n", off, reg);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt }
9da57d7b0ddd8d73b676ce12c040362132cdd538bt off += 4;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt }
9da57d7b0ddd8d73b676ce12c040362132cdd538bt }
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt /* check mdef */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "-- mdef --\n");
9da57d7b0ddd8d73b676ce12c040362132cdd538bt for (i = 0; i < 8; i++) {
9da57d7b0ddd8d73b676ce12c040362132cdd538bt if (reg = IXGBE_READ_REG(hw, IXGBE_MDEF(i))) {
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "mdef(%d): 0x%x\n", i, reg);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt }
9da57d7b0ddd8d73b676ce12c040362132cdd538bt }
9da57d7b0ddd8d73b676ce12c040362132cdd538bt}
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt/*
9da57d7b0ddd8d73b676ce12c040362132cdd538bt * Dump an ethernet address
9da57d7b0ddd8d73b676ce12c040362132cdd538bt */
9da57d7b0ddd8d73b676ce12c040362132cdd538btvoid
9da57d7b0ddd8d73b676ce12c040362132cdd538btixgbe_dump_addr(void *adapter, char *tag, const uint8_t *addr)
9da57d7b0ddd8d73b676ce12c040362132cdd538bt{
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_t *ixgbe = (ixgbe_t *)adapter;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt char form[25];
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt (void) sprintf(form, "%02x:%02x:%02x:%02x:%02x:%02x",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt *addr, *(addr + 1), *(addr + 2),
9da57d7b0ddd8d73b676ce12c040362132cdd538bt *(addr + 3), *(addr + 4), *(addr + 5));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "%s %s\n", tag, form);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt}
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538btvoid
9da57d7b0ddd8d73b676ce12c040362132cdd538btixgbe_pci_dump(void *arg)
9da57d7b0ddd8d73b676ce12c040362132cdd538bt{
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_t *ixgbe = (ixgbe_t *)arg;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ddi_acc_handle_t handle;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt uint8_t cap_ptr;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt uint8_t next_ptr;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt uint32_t msix_bar;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt uint32_t msix_ctrl;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt uint32_t msix_tbl_sz;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt uint32_t tbl_offset;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt uint32_t tbl_bir;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt uint32_t pba_offset;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt uint32_t pba_bir;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt off_t offset;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt off_t mem_size;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt uintptr_t base;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ddi_acc_handle_t acc_hdl;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt int i;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt handle = ixgbe->osdep.cfg_handle;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "Begin dump PCI config space");
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_VENID:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get16(handle, PCI_CONF_VENID));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_DEVID:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get16(handle, PCI_CONF_DEVID));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_COMMAND:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get16(handle, PCI_CONF_COMM));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_STATUS:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get16(handle, PCI_CONF_STAT));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_REVID:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get8(handle, PCI_CONF_REVID));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_PROG_CLASS:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get8(handle, PCI_CONF_PROGCLASS));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_SUB_CLASS:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get8(handle, PCI_CONF_SUBCLASS));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_BAS_CLASS:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get8(handle, PCI_CONF_BASCLASS));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_CACHE_LINESZ:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get8(handle, PCI_CONF_CACHE_LINESZ));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_LATENCY_TIMER:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get8(handle, PCI_CONF_LATENCY_TIMER));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_HEADER_TYPE:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get8(handle, PCI_CONF_HEADER));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_BIST:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get8(handle, PCI_CONF_BIST));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_BASE0:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get32(handle, PCI_CONF_BASE0));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_BASE1:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get32(handle, PCI_CONF_BASE1));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_BASE2:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get32(handle, PCI_CONF_BASE2));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt /* MSI-X BAR */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt msix_bar = pci_config_get32(handle, PCI_CONF_BASE3);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_BASE3:\t0x%x\n", msix_bar);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_BASE4:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get32(handle, PCI_CONF_BASE4));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_BASE5:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get32(handle, PCI_CONF_BASE5));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_CIS:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get32(handle, PCI_CONF_CIS));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_SUBVENID:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get16(handle, PCI_CONF_SUBVENID));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_SUBSYSID:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get16(handle, PCI_CONF_SUBSYSID));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_ROM:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get32(handle, PCI_CONF_ROM));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt cap_ptr = pci_config_get8(handle, PCI_CONF_CAP_PTR);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_CAP_PTR:\t0x%x\n", cap_ptr);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_ILINE:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get8(handle, PCI_CONF_ILINE));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_IPIN:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get8(handle, PCI_CONF_IPIN));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_MIN_G:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get8(handle, PCI_CONF_MIN_G));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_CONF_MAX_L:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get8(handle, PCI_CONF_MAX_L));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt /* Power Management */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt offset = cap_ptr;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_PM_CAP_ID:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get8(handle, offset));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt next_ptr = pci_config_get8(handle, offset + 1);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_PM_NEXT_PTR:\t0x%x\n", next_ptr);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_PM_CAP:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get16(handle, offset + PCI_PMCAP));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_PM_CSR:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get16(handle, offset + PCI_PMCSR));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_PM_CSR_BSE:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get8(handle, offset + PCI_PMCSR_BSE));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_PM_DATA:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get8(handle, offset + PCI_PMDATA));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt /* MSI Configuration */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt offset = next_ptr;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_MSI_CAP_ID:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get8(handle, offset));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt next_ptr = pci_config_get8(handle, offset + 1);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_MSI_NEXT_PTR:\t0x%x\n", next_ptr);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_MSI_CTRL:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get16(handle, offset + PCI_MSI_CTRL));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_MSI_ADDR:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get32(handle, offset + PCI_MSI_ADDR_OFFSET));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_MSI_ADDR_HI:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get32(handle, offset + 0x8));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_MSI_DATA:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get16(handle, offset + 0xC));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt /* MSI-X Configuration */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt offset = next_ptr;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_MSIX_CAP_ID:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get8(handle, offset));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt next_ptr = pci_config_get8(handle, offset + 1);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_MSIX_NEXT_PTR:\t0x%x\n", next_ptr);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt msix_ctrl = pci_config_get16(handle, offset + PCI_MSIX_CTRL);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt msix_tbl_sz = msix_ctrl & 0x7ff;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_MSIX_CTRL:\t0x%x\n", msix_ctrl);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt tbl_offset = pci_config_get32(handle, offset + PCI_MSIX_TBL_OFFSET);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt tbl_bir = tbl_offset & PCI_MSIX_TBL_BIR_MASK;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt tbl_offset = tbl_offset & ~PCI_MSIX_TBL_BIR_MASK;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_MSIX_TBL_OFFSET:\t0x%x\n", tbl_offset);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_MSIX_TBL_BIR:\t0x%x\n", tbl_bir);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pba_offset = pci_config_get32(handle, offset + PCI_MSIX_PBA_OFFSET);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pba_bir = pba_offset & PCI_MSIX_PBA_BIR_MASK;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pba_offset = pba_offset & ~PCI_MSIX_PBA_BIR_MASK;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_MSIX_PBA_OFFSET:\t0x%x\n", pba_offset);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCI_MSIX_PBA_BIR:\t0x%x\n", pba_bir);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt /* PCI Express Configuration */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt offset = next_ptr;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCIE_CAP_ID:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get8(handle, offset + PCIE_CAP_ID));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt next_ptr = pci_config_get8(handle, offset + PCIE_CAP_NEXT_PTR);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCIE_CAP_NEXT_PTR:\t0x%x\n", next_ptr);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCIE_PCIECAP:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get16(handle, offset + PCIE_PCIECAP));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCIE_DEVCAP:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get32(handle, offset + PCIE_DEVCAP));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCIE_DEVCTL:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get16(handle, offset + PCIE_DEVCTL));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCIE_DEVSTS:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get16(handle, offset + PCIE_DEVSTS));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCIE_LINKCAP:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get32(handle, offset + PCIE_LINKCAP));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCIE_LINKCTL:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get16(handle, offset + PCIE_LINKCTL));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt "PCIE_LINKSTS:\t0x%x\n",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt pci_config_get16(handle, offset + PCIE_LINKSTS));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt /* MSI-X Memory Space */
9da57d7b0ddd8d73b676ce12c040362132cdd538bt if (ddi_dev_regsize(ixgbe->dip, 4, &mem_size) != DDI_SUCCESS) {
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "ddi_dev_regsize() failed");
9da57d7b0ddd8d73b676ce12c040362132cdd538bt return;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt }
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt if ((ddi_regs_map_setup(ixgbe->dip, 4, (caddr_t *)&base, 0, mem_size,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt &ixgbe_regs_acc_attr, &acc_hdl)) != DDI_SUCCESS) {
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "ddi_regs_map_setup() failed");
9da57d7b0ddd8d73b676ce12c040362132cdd538bt return;
9da57d7b0ddd8d73b676ce12c040362132cdd538bt }
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "MSI-X Memory Space: (mem_size = %d, base = %x)",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt mem_size, base);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt for (i = 0; i <= msix_tbl_sz; i++) {
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "MSI-X Table Entry(%d):", i);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "lo_addr:\t%x",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ddi_get32(acc_hdl,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt (uint32_t *)(base + tbl_offset + (i * 16))));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "up_addr:\t%x",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ddi_get32(acc_hdl,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt (uint32_t *)(base + tbl_offset + (i * 16) + 4)));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "msg_data:\t%x",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ddi_get32(acc_hdl,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt (uint32_t *)(base + tbl_offset + (i * 16) + 8)));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "vct_ctrl:\t%x",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ddi_get32(acc_hdl,
9da57d7b0ddd8d73b676ce12c040362132cdd538bt (uint32_t *)(base + tbl_offset + (i * 16) + 12)));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt }
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ixgbe_log(ixgbe, "MSI-X Pending Bits:\t%x",
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ddi_get32(acc_hdl, (uint32_t *)(base + pba_offset)));
9da57d7b0ddd8d73b676ce12c040362132cdd538bt
9da57d7b0ddd8d73b676ce12c040362132cdd538bt ddi_regs_map_free(&acc_hdl);
9da57d7b0ddd8d73b676ce12c040362132cdd538bt}
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China/*
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China * Dump registers
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China */
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing Chinavoid
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing Chinaixgbe_dump_regs(void *adapter)
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China{
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ixgbe_t *ixgbe = (ixgbe_t *)adapter;
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer uint32_t reg_val, hw_index;
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China struct ixgbe_hw *hw = &ixgbe->hw;
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China int i;
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China DEBUGFUNC("ixgbe_dump_regs");
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China /* Dump basic's like CTRL, STATUS, CTRL_EXT. */
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ixgbe_log(ixgbe, "Basic IXGBE registers..");
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China reg_val = IXGBE_READ_REG(hw, IXGBE_CTRL);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ixgbe_log(ixgbe, "\tCTRL=%x\n", reg_val);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China reg_val = IXGBE_READ_REG(hw, IXGBE_STATUS);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ixgbe_log(ixgbe, "\tSTATUS=%x\n", reg_val);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China reg_val = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ixgbe_log(ixgbe, "\tCTRL_EXT=%x\n", reg_val);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China reg_val = IXGBE_READ_REG(hw, IXGBE_FCTRL);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ixgbe_log(ixgbe, "\tFCTRL=%x\n", reg_val);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China /* Misc Interrupt regs */
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ixgbe_log(ixgbe, "Some IXGBE interrupt registers..");
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China reg_val = IXGBE_READ_REG(hw, IXGBE_GPIE);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ixgbe_log(ixgbe, "\tGPIE=%x\n", reg_val);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China reg_val = IXGBE_READ_REG(hw, IXGBE_IVAR(0));
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ixgbe_log(ixgbe, "\tIVAR(0)=%x\n", reg_val);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China reg_val = IXGBE_READ_REG(hw, IXGBE_IVAR_MISC);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ixgbe_log(ixgbe, "\tIVAR_MISC=%x\n", reg_val);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China /* Dump RX related reg's */
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ixgbe_log(ixgbe, "Receive registers...");
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China reg_val = IXGBE_READ_REG(hw, IXGBE_RXCTRL);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ixgbe_log(ixgbe, "\tRXCTRL=%x\n", reg_val);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China for (i = 0; i < ixgbe->num_rx_rings; i++) {
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer hw_index = ixgbe->rx_rings[i].hw_index;
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer reg_val = IXGBE_READ_REG(hw, IXGBE_RXDCTL(hw_index));
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer ixgbe_log(ixgbe, "\tRXDCTL(%d)=%x\n", hw_index, reg_val);
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer reg_val = IXGBE_READ_REG(hw, IXGBE_SRRCTL(hw_index));
0dc2366f7b9f9f36e10909b1e95edbf2a261c2acVenugopal Iyer ixgbe_log(ixgbe, "\tSRRCTL(%d)=%x\n", hw_index, reg_val);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China }
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China reg_val = IXGBE_READ_REG(hw, IXGBE_RXCSUM);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ixgbe_log(ixgbe, "\tRXCSUM=%x\n", reg_val);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China reg_val = IXGBE_READ_REG(hw, IXGBE_MRQC);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ixgbe_log(ixgbe, "\tMRQC=%x\n", reg_val);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China reg_val = IXGBE_READ_REG(hw, IXGBE_RDRXCTL);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ixgbe_log(ixgbe, "\tRDRXCTL=%x\n", reg_val);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China /* Dump TX related regs */
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ixgbe_log(ixgbe, "Some transmit registers..");
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China reg_val = IXGBE_READ_REG(hw, IXGBE_DMATXCTL);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ixgbe_log(ixgbe, "\tDMATXCTL=%x\n", reg_val);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China for (i = 0; i < ixgbe->num_tx_rings; i++) {
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China reg_val = IXGBE_READ_REG(hw, IXGBE_TXDCTL(i));
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ixgbe_log(ixgbe, "\tTXDCTL(%d)=%x\n", i, reg_val);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China reg_val = IXGBE_READ_REG(hw, IXGBE_TDWBAL(i));
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ixgbe_log(ixgbe, "\tTDWBAL(%d)=%x\n", i, reg_val);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China reg_val = IXGBE_READ_REG(hw, IXGBE_TDWBAH(i));
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ixgbe_log(ixgbe, "\tTDWBAH(%d)=%x\n", i, reg_val);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China reg_val = IXGBE_READ_REG(hw, IXGBE_TXPBSIZE(i));
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China ixgbe_log(ixgbe, "\tTXPBSIZE(%d)=%x\n", i, reg_val);
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China }
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China}
73cd555c10e70dac413ae4b40de8450a291750acBin Tu - Sun Microsystems - Beijing China
9da57d7b0ddd8d73b676ce12c040362132cdd538bt#endif