rpms/kernel/devel linux-2.6-pasemi-mac.patch, NONE, 1.1 linux-2.6-pasemi-reserve-i2c.patch, NONE, 1.1 kernel.spec, 1.279, 1.280

David Woodhouse (dwmw2) fedora-extras-commits at redhat.com
Tue Dec 4 13:53:43 UTC 2007


Author: dwmw2

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31348

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-pasemi-mac.patch linux-2.6-pasemi-reserve-i2c.patch 
Log Message:
Fix pasemi Ethernet bugs, fix RTC

linux-2.6-pasemi-mac.patch:

--- NEW FILE linux-2.6-pasemi-mac.patch ---
>From olof at lixom.net Tue Dec  4 03:30:26 2007
Return-path: <olof at lixom.net>
Envelope-to: dwmw2 at baythorne.infradead.org
Delivery-date: Tue, 04 Dec 2007 03:30:26 +0000
Received: from pentafluge.infradead.org ([2001:770:15f::1]) by
	baythorne.infradead.org with esmtps (Exim 4.68 #1 (Red Hat Linux)) id
	1IzOUM-0004kh-EB for dwmw2 at baythorne.infradead.org; Tue, 04 Dec 2007
	03:30:26 +0000
Received: from lixom.net ([66.141.50.11] helo=mail.lixom.net) by
	pentafluge.infradead.org with esmtp (Exim 4.68 #1 (Red Hat Linux)) id
	1IzOUF-00045t-Ga for dwmw2 at infradead.org; Tue, 04 Dec 2007 03:30:25 +0000
Received: by mail.lixom.net (Postfix, from userid 999) id C241F157AC; Mon, 
	3 Dec 2007 21:34:14 -0600 (CST)
Date: Mon, 3 Dec 2007 21:34:14 -0600
From: Olof Johansson <olof at lixom.net>
To: jgarzik at pobox.com
Cc: netdev at vger.kernel.org, linuxppc-dev at ozlabs.org, dwmw2 at infradead.org, ranger at gentoo.org
Subject: [PATCH 2.6.24] pasemi_mac: Fix reuse of free'd skb
Message-ID: <20071204033414.GA13616 at lixom.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.16 (2007-06-11)
X-Spam-Score: 2.4 (++)
X-Spam-Report: SpamAssassin version 3.2.3 on pentafluge.infradead.org
	summary: Content analysis details:   (2.4 points, 5.0 required) pts rule
	name              description ---- ----------------------
	-------------------------------------------------- 2.4 DNS_FROM_OPENWHOIS  
	  RBL: Envelope sender listed in bl.open-whois.org.
X-Evolution-Source: imap://dwmw2@pentafluge.infradead.org/
Content-Transfer-Encoding: 8bit

Turns out we're freeing the skb when we detect CRC error, but we're
not clearing out info->skb. We could either clear it and have the stack
reallocate it, or just leave it and the rx ring refill code will reuse
the one that was allocated.

Reusing a freed skb obviously caused some nasty crashes of various kind,
as reported by Brent Baude and David Woodhouse.


Signed-off-by: Olof Johansson <olof at lixom.net>

---

Jeff, I'd like to see this in 2.6.24, it's causing some real problems
out there. It's not needed in the 2.6.25 queue since the other changes
there have already covered these cases.

My test network at home is quiet enough to not cause CRC errors, we
mainly get those during interface bringup before speed is configured.

diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c
index 09b4fde..6617e24 100644
--- a/drivers/net/pasemi_mac.c
+++ b/drivers/net/pasemi_mac.c
@@ -586,7 +586,7 @@ static int pasemi_mac_clean_rx(struct pasemi_mac *mac, int limit)
 			/* CRC error flagged */
 			mac->netdev->stats.rx_errors++;
 			mac->netdev->stats.rx_crc_errors++;
-			dev_kfree_skb_irq(skb);
+			/* No need to free skb, it'll be reused */
 			goto next;
 		}
 
>From dwmw2 at infradead.org Mon Dec  3 04:34:47 2007
Subject: [PASEMI_MAC] Don't claim to do IPv6 checksum offload
From: David Woodhouse <dwmw2 at infradead.org>
To: Olof Johansson <olof at lixom.net>
Cc: netdev at vger.kernel.org, jgarzik at pobox.com
Content-Type: text/plain
Message-Id: <1196656472.13978.130.camel at pmac.infradead.org>
Mime-Version: 1.0
X-Mailer: Evolution 2.12.1 (2.12.1-3.fc8.dwmw2.1) 
Date: Mon, 03 Dec 2007 04:34:47 +0000
X-Evolution-Format: text/plain
X-Evolution-Account: 0
X-Evolution-Transport:
	smtp://dwmw2;auth=CRAM-MD5@smtpauth.infradead.org:587/;use_ssl=when-possible
X-Evolution-Fcc: email://0/outgoing
X-Evolution-Source: imap://dwmw2@pentafluge.infradead.org/
Content-Transfer-Encoding: 8bit

Signed-off-by: David Woodhouse <dwmw2 at infradead.org>

diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c
index 09b4fde..a8db5d7 100644
--- a/drivers/net/pasemi_mac.c
+++ b/drivers/net/pasemi_mac.c
@@ -1362,7 +1362,7 @@ pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	netif_napi_add(dev, &mac->napi, pasemi_mac_poll, 64);
 
-	dev->features = NETIF_F_HW_CSUM | NETIF_F_LLTX | NETIF_F_SG;
+	dev->features = NETIF_F_IP_CSUM | NETIF_F_LLTX | NETIF_F_SG;
 
 	/* These should come out of the device tree eventually */
 	mac->dma_txch = index;

-- 
dwmw2

linux-2.6-pasemi-reserve-i2c.patch:

--- NEW FILE linux-2.6-pasemi-reserve-i2c.patch ---
--- linux-2.6.23.ppc64/arch/powerpc//platforms/pasemi/misc.c~	2007-12-03 23:07:32.000000000 +0000
+++ linux-2.6.23.ppc64/arch/powerpc//platforms/pasemi/misc.c	2007-12-04 12:39:05.000000000 +0000
@@ -60,6 +60,9 @@ static int __init pasemi_register_i2c_de
 						1);
 		}
 	}
+	/* Ensure that buses up to 2 are reserved */
+	i2c_register_board_info(2, NULL, 0);
+
 	return 0;
 }
 device_initcall(pasemi_register_i2c_devices);
--- linux-2.6.23.ppc64/drivers/i2c/busses/i2c-pasemi.c~	2007-12-03 22:47:54.000000000 +0000
+++ linux-2.6.23.ppc64/drivers/i2c/busses/i2c-pasemi.c	2007-12-04 12:21:14.000000000 +0000
@@ -368,6 +368,7 @@ static int __devinit pasemi_smb_probe(st
 	smbus->adapter.class = I2C_CLASS_HWMON;
 	smbus->adapter.algo = &smbus_algorithm;
 	smbus->adapter.algo_data = smbus;
+	smbus->adapter.nr = PCI_FUNC(dev->devfn);
 
 	/* set up the sysfs linkage to our parent device */
 	smbus->adapter.dev.parent = &dev->dev;
@@ -375,7 +376,7 @@ static int __devinit pasemi_smb_probe(st
 	reg_write(smbus, REG_CTL, (CTL_MTR | CTL_MRR |
 		  (CLK_100K_DIV & CTL_CLK_M)));
 
-	error = i2c_add_adapter(&smbus->adapter);
+	error = i2c_add_numbered_adapter(&smbus->adapter);
 	if (error)
 		goto out_release_region;
 


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.279
retrieving revision 1.280
diff -u -r1.279 -r1.280
--- kernel.spec	4 Dec 2007 05:54:21 -0000	1.279
+++ kernel.spec	4 Dec 2007 13:53:09 -0000	1.280
@@ -582,6 +582,8 @@
 
 Patch100: linux-2.6-g5-therm-shutdown.patch
 Patch110: linux-2.6-pasemi-for-2.6.25.patch
+Patch115: linux-2.6-pasemi-mac.patch
+Patch116: linux-2.6-pasemi-reserve-i2c.patch
 Patch120: linux-2.6-ppc32-ucmpdi2.patch
 Patch130: linux-2.6-ppc-rtc.patch
 Patch135: linux-2.6-powerpc-generic-suspend-2-remove-adb-sleep-notifier.patch
@@ -1020,6 +1022,8 @@
 ApplyPatch linux-2.6-ppc32-ucmpdi2.patch
 # PA Semi updates
 ApplyPatch linux-2.6-pasemi-for-2.6.25.patch
+ApplyPatch linux-2.6-pasemi-mac.patch
+ApplyPatch linux-2.6-pasemi-reserve-i2c.patch
 # RTC class driver for ppc_md rtc functions
 ApplyPatch linux-2.6-ppc-rtc.patch
 # PlayStation support
@@ -1746,6 +1750,10 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL} -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf %{with_xen} xen
 
 %changelog
+* Mon Dec 04 2007 David Woodhouse <dwmw2 at redhat.com>
+- Fix HW csum on pasemi_mac
+- Fix i2c bus reservation on pasemi
+
 * Mon Dec 03 2007 Kyle McMartin <kmcmartin at redhat.com>
 - Linux 2.6.24-rc4
 




More information about the fedora-extras-commits mailing list