lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091229114938.1f4d1c5c@nehalam>
Date:	Tue, 29 Dec 2009 11:49:38 -0800
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Michael Breuer <mbreuer@...jas.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	"Berck E. Nash" <flyboy@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	netdev@...r.kernel.org
Subject: Re: sky2 panic in 2.6.32.1 under load (new oops)

This patch will dump more info in case of hardware error.

--- a/drivers/net/sky2.c	2009-12-29 11:30:06.441137685 -0800
+++ b/drivers/net/sky2.c	2009-12-29 11:46:37.389262922 -0800
@@ -2629,12 +2625,71 @@ static void sky2_hw_error(struct sky2_hw
 	}
 }
 
+static void dump_txring(struct sky2_hw *hw, unsigned port)
+{
+	struct sky2_port *sky2 = netdev_priv(hw->dev[port]);
+	int sop = 1;
+	unsigned idx;
+
+	printk(KERN_INFO PFX "Tx ring pending=%u...%u report=%d done=%d\n",
+		   sky2->tx_cons, sky2->tx_prod,
+		   sky2_read16(hw, port == 0 ? STAT_TXA1_RIDX : STAT_TXA2_RIDX),
+		   sky2_read16(hw, Q_ADDR(txqaddr[port], Q_DONE)));
+
+	/* Dump contents of tx ring */
+	for (idx = sky2->tx_next;
+	     idx != sky2->tx_prod && idx < sky2->tx_ring_size;
+	     idx = RING_NEXT(idx, sky2->tx_ring_size)) {
+		const struct sky2_tx_le *le = sky2->tx_le + idx;
+		u32 a = le32_to_cpu(le->addr);
+
+		if (sop)
+			printk(KERN_DEBUG "%u:", idx);
+		sop = 0;
+
+		switch(le->opcode & ~HW_OWNER) {
+		case OP_ADDR64:
+			printk(" %#x:", a);
+			break;
+		case OP_LRGLEN:
+			printk(" mtu=%d", a);
+			break;
+		case OP_VLAN:
+			printk(" vlan=%d", be16_to_cpu(le->length));
+			break;
+		case OP_TCPLISW:
+			printk(" csum=%#x", a);
+			break;
+		case OP_LARGESEND:
+			printk(" tso=%#x(%d)", a, le16_to_cpu(le->length));
+			break;
+		case OP_PACKET:
+			printk(" %#x(%d)", a, le16_to_cpu(le->length));
+			break;
+		case OP_BUFFER:
+			printk(" frag=%#x(%d)", a, le16_to_cpu(le->length));
+			break;
+		default:
+			printk(" op=%#x,%#x(%d)", le->opcode, a,
+			       le16_to_cpu(le->length));
+		}
+
+		if (le->ctrl & EOP) {
+			printk("\n");
+			sop = 1;
+		}
+	}
+}
+
 static void sky2_hw_intr(struct sky2_hw *hw)
 {
 	struct pci_dev *pdev = hw->pdev;
 	u32 status = sky2_read32(hw, B0_HWE_ISRC);
 	u32 hwmsk = sky2_read32(hw, B0_HWE_IMSK);
 
+	printk(KERN_DEBUG PFX "hardware interrupt status %#x\n", status);
+	dump_txring(hw, 0);
+
 	status &= hwmsk;
 
 	if (status & Y2_IS_TIST_OV)

-- 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ