]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
add a bunch of files to 2.6.22 queue
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 21 Aug 2007 05:38:52 +0000 (22:38 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 21 Aug 2007 05:38:52 +0000 (22:38 -0700)
queue-2.6.22/hwmon-fix-w83781d-temp-sensor-type-setting.patch [new file with mode: 0644]
queue-2.6.22/hwmon-restore-missing-name-attribute.patch [new file with mode: 0644]
queue-2.6.22/revert-x86-serial-convert-legacy-com-ports-to-platform-devices.patch [new file with mode: 0644]
queue-2.6.22/series [new file with mode: 0644]
queue-2.6.22/sky2-carrier-mgmt.patch [new file with mode: 0644]
queue-2.6.22/sky2-lost-irq.patch [new file with mode: 0644]
queue-2.6.22/sky2-napi-fill.patch [new file with mode: 0644]
queue-2.6.22/sky2-stable-trunc.patch [new file with mode: 0644]

diff --git a/queue-2.6.22/hwmon-fix-w83781d-temp-sensor-type-setting.patch b/queue-2.6.22/hwmon-fix-w83781d-temp-sensor-type-setting.patch
new file mode 100644 (file)
index 0000000..0f7c6b4
--- /dev/null
@@ -0,0 +1,35 @@
+From stable-bounces@linux.kernel.org Mon Aug 20 13:02:21 2007
+From: "Mark M. Hoffman" <mhoffman@lightlink.com>
+Date: Mon, 20 Aug 2007 20:01:50 GMT
+Subject: hwmon: fix w83781d temp sensor type setting
+To: stable@kernel.org
+Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
+Message-ID: <200708202001.QAA32093@emerald.lightlink.com>
+
+From: "Mark M. Hoffman" <mhoffman@lightlink.com>
+
+Commit 348753379a7704087603dad403603e825422fd9a introduced a regression that
+caused temp2 and temp3 sensor type settings to be written to temp1 instead.
+The result is that temp sensor readings could be way off.
+
+Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/hwmon/w83781d.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/hwmon/w83781d.c
++++ b/drivers/hwmon/w83781d.c
+@@ -740,9 +740,9 @@ store_sensor(struct device *dev, struct 
+ static SENSOR_DEVICE_ATTR(temp1_type, S_IRUGO | S_IWUSR,
+       show_sensor, store_sensor, 0);
+ static SENSOR_DEVICE_ATTR(temp2_type, S_IRUGO | S_IWUSR,
+-      show_sensor, store_sensor, 0);
++      show_sensor, store_sensor, 1);
+ static SENSOR_DEVICE_ATTR(temp3_type, S_IRUGO | S_IWUSR,
+-      show_sensor, store_sensor, 0);
++      show_sensor, store_sensor, 2);
+ /* I2C devices get this name attribute automatically, but for ISA devices
+    we must create it by ourselves. */
diff --git a/queue-2.6.22/hwmon-restore-missing-name-attribute.patch b/queue-2.6.22/hwmon-restore-missing-name-attribute.patch
new file mode 100644 (file)
index 0000000..85b0566
--- /dev/null
@@ -0,0 +1,36 @@
+From stable-bounces@linux.kernel.org Mon Aug 20 03:29:29 2007
+From: Jean Delvare <khali@linux-fr.org>
+Date: Mon, 20 Aug 2007 12:30:38 +0200
+Subject: hwmon: (smsc47m1) restore missing name attribute
+To: stable@kernel.org
+Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
+Message-ID: <20070820123038.67e10c90@hyperion.delvare>
+
+From: Jean Delvare <khali@linux-fr.org>
+
+The smsc47m1 driver no longer creates the name attribute used by
+libsensors to identify chip types. It was lost during the conversion
+to a platform driver. I was fooled by the fact that we do have a
+group with all attributes, but only to delete them all at once. The
+group is not used to create the attributes, so we have to explicitly
+create the name attribute.
+
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/hwmon/smsc47m1.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/hwmon/smsc47m1.c
++++ b/drivers/hwmon/smsc47m1.c
+@@ -585,6 +585,8 @@ static int __devinit smsc47m1_probe(stru
+       if ((err = device_create_file(dev, &dev_attr_alarms)))
+               goto error_remove_files;
++      if ((err = device_create_file(dev, &dev_attr_name)))
++              goto error_remove_files;
+       data->class_dev = hwmon_device_register(dev);
+       if (IS_ERR(data->class_dev)) {
diff --git a/queue-2.6.22/revert-x86-serial-convert-legacy-com-ports-to-platform-devices.patch b/queue-2.6.22/revert-x86-serial-convert-legacy-com-ports-to-platform-devices.patch
new file mode 100644 (file)
index 0000000..3753b5d
--- /dev/null
@@ -0,0 +1,241 @@
+From 57d4810ea0d9ca58a7bcc1336607f0cede0a2abf Mon Sep 17 00:00:00 2001
+From: Andrew Morton <akpm@linux-foundation.org>
+Date: Tue, 31 Jul 2007 00:38:02 -0700
+Subject: revert "x86, serial: convert legacy COM ports to platform devices"
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+From: Andrew Morton <akpm@linux-foundation.org>
+
+Revert 7e92b4fc345f5b6f57585fbe5ffdb0f24d7c9b26.  It broke Sébastien Dugué's
+machine and Jeff said (persuasively)
+
+  This seems like it will break decades-long-working stuff, in favor of
+  breaking new ground in our favorite area, "trusting the BIOS."
+
+  It's just not worth it for serial ports, IMO.  Serial ports are something
+  that just shouldn't break at this late stage in the game.  My new Intel
+  platform boxes don't even have serial ports, so I question the value of
+  messing with serial port probing even more...  because...  just wait a year,
+  and your box won't have a serial port either!  :)
+
+  I certainly don't object to the use of platform devices (or isa_driver),
+  but the probe change seems questionable.  That's sorta analagous to
+  rewriting the floppy driver probe routine.  Sure you could do it...  but why
+  risk all that damage and go through debugging all over again?
+
+  It seems clear from this report that we cannot, should not, trust BIOS for
+  something (a) so simple and (b) that has been working for over a decade.
+
+Much discussion ensued and we've decided to have another go at all of this.
+
+Cc: Sébastien Dugué <sebastien.dugue@bull.net>
+Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
+Cc: Len Brown <lenb@kernel.org>
+Cc: Adam Belay <ambx1@neo.rr.com>
+Cc: Matthew Garrett <mjg59@srcf.ucam.org>
+Cc: Russell King <rmk@arm.linux.org.uk>
+Cc: Jeff Garzik <jeff@garzik.org>
+Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
+Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
+Cc: Sascha Sommer <saschasommer@freenet.de>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ Documentation/kernel-parameters.txt |    5 --
+ arch/i386/kernel/Makefile           |    1 
+ arch/i386/kernel/legacy_serial.c    |   67 ------------------------------------
+ arch/x86_64/kernel/Makefile         |    2 -
+ drivers/serial/Kconfig              |   14 ++-----
+ include/asm-i386/serial.h           |   16 ++++++++
+ include/asm-x86_64/serial.h         |   16 ++++++++
+ 7 files changed, 37 insertions(+), 84 deletions(-)
+
+--- a/Documentation/kernel-parameters.txt
++++ b/Documentation/kernel-parameters.txt
+@@ -850,11 +850,6 @@ and is between 256 and 4096 characters. 
+       lasi=           [HW,SCSI] PARISC LASI driver for the 53c700 chip
+                       Format: addr:<io>,irq:<irq>
+-      legacy_serial.force [HW,IA-32,X86-64]
+-                      Probe for COM ports at legacy addresses even
+-                      if PNPBIOS or ACPI should describe them.  This
+-                      is for working around firmware defects.
+-
+       llsc*=          [IA64] See function print_params() in
+                       arch/ia64/sn/kernel/llsc4.c.
+--- a/arch/i386/kernel/Makefile
++++ b/arch/i386/kernel/Makefile
+@@ -35,7 +35,6 @@ obj-y                                += sysenter.o vsyscall.o
+ obj-$(CONFIG_ACPI_SRAT)       += srat.o
+ obj-$(CONFIG_EFI)             += efi.o efi_stub.o
+ obj-$(CONFIG_DOUBLEFAULT)     += doublefault.o
+-obj-$(CONFIG_SERIAL_8250)     += legacy_serial.o
+ obj-$(CONFIG_VM86)            += vm86.o
+ obj-$(CONFIG_EARLY_PRINTK)    += early_printk.o
+ obj-$(CONFIG_HPET_TIMER)      += hpet.o
+--- a/arch/i386/kernel/legacy_serial.c
++++ /dev/null
+@@ -1,67 +0,0 @@
+-/*
+- * Legacy COM port devices for x86 platforms without PNPBIOS or ACPI.
+- * Data taken from include/asm-i386/serial.h.
+- *
+- * (c) Copyright 2007 Hewlett-Packard Development Company, L.P.
+- *    Bjorn Helgaas <bjorn.helgaas@hp.com>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License version 2 as
+- * published by the Free Software Foundation.
+- */
+-#include <linux/module.h>
+-#include <linux/init.h>
+-#include <linux/pnp.h>
+-#include <linux/serial_8250.h>
+-
+-/* Standard COM flags (except for COM4, because of the 8514 problem) */
+-#ifdef CONFIG_SERIAL_DETECT_IRQ
+-#define COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ)
+-#define COM4_FLAGS (UPF_BOOT_AUTOCONF | UPF_AUTO_IRQ)
+-#else
+-#define COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST)
+-#define COM4_FLAGS UPF_BOOT_AUTOCONF
+-#endif
+-
+-#define PORT(_base,_irq,_flags)                               \
+-      {                                               \
+-              .iobase         = _base,                \
+-              .irq            = _irq,                 \
+-              .uartclk        = 1843200,              \
+-              .iotype         = UPIO_PORT,            \
+-              .flags          = _flags,               \
+-      }
+-
+-static struct plat_serial8250_port x86_com_data[] = {
+-      PORT(0x3F8, 4, COM_FLAGS),
+-      PORT(0x2F8, 3, COM_FLAGS),
+-      PORT(0x3E8, 4, COM_FLAGS),
+-      PORT(0x2E8, 3, COM4_FLAGS),
+-      { },
+-};
+-
+-static struct platform_device x86_com_device = {
+-      .name                   = "serial8250",
+-      .id                     = PLAT8250_DEV_PLATFORM,
+-      .dev                    = {
+-              .platform_data  = x86_com_data,
+-      },
+-};
+-
+-static int force_legacy_probe;
+-module_param_named(force, force_legacy_probe, bool, 0);
+-MODULE_PARM_DESC(force, "Force legacy serial port probe");
+-
+-static int __init serial8250_x86_com_init(void)
+-{
+-      if (pnp_platform_devices && !force_legacy_probe)
+-              return -ENODEV;
+-
+-      return platform_device_register(&x86_com_device);
+-}
+-
+-module_init(serial8250_x86_com_init);
+-
+-MODULE_AUTHOR("Bjorn Helgaas");
+-MODULE_LICENSE("GPL");
+-MODULE_DESCRIPTION("Generic 8250/16x50 legacy probe module");
+--- a/arch/x86_64/kernel/Makefile
++++ b/arch/x86_64/kernel/Makefile
+@@ -32,7 +32,6 @@ obj-$(CONFIG_EARLY_PRINTK)   += early_prin
+ obj-$(CONFIG_IOMMU)           += pci-gart.o aperture.o
+ obj-$(CONFIG_CALGARY_IOMMU)   += pci-calgary.o tce.o
+ obj-$(CONFIG_SWIOTLB)         += pci-swiotlb.o
+-obj-$(CONFIG_SERIAL_8250)     += legacy_serial.o
+ obj-$(CONFIG_KPROBES)         += kprobes.o
+ obj-$(CONFIG_X86_PM_TIMER)    += pmtimer.o
+ obj-$(CONFIG_X86_VSMP)                += vsmp.o
+@@ -50,7 +49,6 @@ CFLAGS_vsyscall.o            := $(PROFILING) -g0
+ therm_throt-y                   += ../../i386/kernel/cpu/mcheck/therm_throt.o
+ bootflag-y                    += ../../i386/kernel/bootflag.o
+-legacy_serial-y                       += ../../i386/kernel/legacy_serial.o
+ cpuid-$(subst m,y,$(CONFIG_X86_CPUID))  += ../../i386/kernel/cpuid.o
+ topology-y                     += ../../i386/kernel/topology.o
+ microcode-$(subst m,y,$(CONFIG_MICROCODE))  += ../../i386/kernel/microcode.o
+--- a/drivers/serial/Kconfig
++++ b/drivers/serial/Kconfig
+@@ -74,21 +74,17 @@ config SERIAL_8250_PCI
+       depends on SERIAL_8250 && PCI
+       default SERIAL_8250
+       help
+-        Say Y here if you have PCI serial ports.
+-
+-        To compile this driver as a module, choose M here: the module
+-        will be called 8250_pci.
++        This builds standard PCI serial support. You may be able to
++        disable this feature if you only need legacy serial support.
++        Saves about 9K.
+ config SERIAL_8250_PNP
+       tristate "8250/16550 PNP device support" if EMBEDDED
+       depends on SERIAL_8250 && PNP
+       default SERIAL_8250
+       help
+-        Say Y here if you have serial ports described by PNPBIOS or ACPI.
+-        These are typically ports built into the system board.
+-
+-        To compile this driver as a module, choose M here: the module
+-        will be called 8250_pnp.
++        This builds standard PNP serial support. You may be able to
++        disable this feature if you only need legacy serial support.
+ config SERIAL_8250_HP300
+       tristate
+--- a/include/asm-i386/serial.h
++++ b/include/asm-i386/serial.h
+@@ -11,3 +11,19 @@
+  * megabits/second; but this requires the faster clock.
+  */
+ #define BASE_BAUD ( 1843200 / 16 )
++
++/* Standard COM flags (except for COM4, because of the 8514 problem) */
++#ifdef CONFIG_SERIAL_DETECT_IRQ
++#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ)
++#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ)
++#else
++#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
++#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
++#endif
++
++#define SERIAL_PORT_DFNS                      \
++      /* UART CLK   PORT IRQ     FLAGS        */                      \
++      { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS },      /* ttyS0 */     \
++      { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS },      /* ttyS1 */     \
++      { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS },      /* ttyS2 */     \
++      { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS },     /* ttyS3 */
+--- a/include/asm-x86_64/serial.h
++++ b/include/asm-x86_64/serial.h
+@@ -11,3 +11,19 @@
+  * megabits/second; but this requires the faster clock.
+  */
+ #define BASE_BAUD ( 1843200 / 16 )
++
++/* Standard COM flags (except for COM4, because of the 8514 problem) */
++#ifdef CONFIG_SERIAL_DETECT_IRQ
++#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ)
++#define STD_COM4_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_AUTO_IRQ)
++#else
++#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST)
++#define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
++#endif
++
++#define SERIAL_PORT_DFNS                      \
++      /* UART CLK   PORT IRQ     FLAGS        */                      \
++      { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS },      /* ttyS0 */     \
++      { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS },      /* ttyS1 */     \
++      { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS },      /* ttyS2 */     \
++      { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS },     /* ttyS3 */
diff --git a/queue-2.6.22/series b/queue-2.6.22/series
new file mode 100644 (file)
index 0000000..e95a7fd
--- /dev/null
@@ -0,0 +1,7 @@
+hwmon-fix-w83781d-temp-sensor-type-setting.patch
+hwmon-restore-missing-name-attribute.patch
+sky2-lost-irq.patch
+sky2-carrier-mgmt.patch
+sky2-napi-fill.patch
+sky2-stable-trunc.patch
+revert-x86-serial-convert-legacy-com-ports-to-platform-devices.patch
diff --git a/queue-2.6.22/sky2-carrier-mgmt.patch b/queue-2.6.22/sky2-carrier-mgmt.patch
new file mode 100644 (file)
index 0000000..aaaa199
--- /dev/null
@@ -0,0 +1,78 @@
+From stable-bounces@linux.kernel.org Thu Aug 16 06:32:22 2007
+From: Stephen Hemminger <shemminger@linux-foundation.org>
+Date: Thu, 16 Aug 2007 09:12:46 -0400
+Subject: sky2: carrier management
+To: stable@kernel.org
+Cc: netdev@vger.kernel.org
+Message-ID: <20070816131348.287267207@linux-foundation.org>
+Content-Disposition: inline; filename=sky2-carrier-mgmt.patch
+
+From: Stephen Hemminger <shemminger@linux-foundation.org>
+
+backport of commit 55d7b4e6ed6ad3ec5e5e30b3b4515a0a6a53e344
+
+Make sky2 handle carrier similar to other drivers,
+eliminate some possible races in carrier state transistions.
+
+Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/sky2.c |   11 ++++-------
+ 1 file changed, 4 insertions(+), 7 deletions(-)
+
+--- a/drivers/net/sky2.c
++++ b/drivers/net/sky2.c
+@@ -1234,6 +1234,8 @@ static int sky2_up(struct net_device *de
+       if (netif_msg_ifup(sky2))
+               printk(KERN_INFO PFX "%s: enabling interface\n", dev->name);
++      netif_carrier_off(dev);
++
+       /* must be power of 2 */
+       sky2->tx_le = pci_alloc_consistent(hw->pdev,
+                                          TX_RING_SIZE *
+@@ -1573,7 +1575,6 @@ static int sky2_down(struct net_device *
+       /* Stop more packets from being queued */
+       netif_stop_queue(dev);
+-      netif_carrier_off(dev);
+       /* Disable port IRQ */
+       imask = sky2_read32(hw, B0_IMSK);
+@@ -1625,6 +1626,8 @@ static int sky2_down(struct net_device *
+       sky2_phy_power(hw, port, 0);
++      netif_carrier_off(dev);
++
+       /* turn off LED's */
+       sky2_write16(hw, B0_Y2LED, LED_STAT_OFF);
+@@ -1689,7 +1692,6 @@ static void sky2_link_up(struct sky2_por
+       gm_phy_write(hw, port, PHY_MARV_INT_MASK, PHY_M_DEF_MSK);
+       netif_carrier_on(sky2->netdev);
+-      netif_wake_queue(sky2->netdev);
+       /* Turn on link LED */
+       sky2_write8(hw, SK_REG(port, LNK_LED_REG),
+@@ -1741,7 +1743,6 @@ static void sky2_link_down(struct sky2_p
+       gma_write16(hw, port, GM_GP_CTRL, reg);
+       netif_carrier_off(sky2->netdev);
+-      netif_stop_queue(sky2->netdev);
+       /* Turn on link LED */
+       sky2_write8(hw, SK_REG(port, LNK_LED_REG), LINKLED_OFF);
+@@ -3493,10 +3494,6 @@ static __devinit struct net_device *sky2
+       memcpy_fromio(dev->dev_addr, hw->regs + B2_MAC_1 + port * 8, ETH_ALEN);
+       memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
+-      /* device is off until link detection */
+-      netif_carrier_off(dev);
+-      netif_stop_queue(dev);
+-
+       return dev;
+ }
diff --git a/queue-2.6.22/sky2-lost-irq.patch b/queue-2.6.22/sky2-lost-irq.patch
new file mode 100644 (file)
index 0000000..07b7d8e
--- /dev/null
@@ -0,0 +1,51 @@
+From stable-bounces@linux.kernel.org Thu Aug 16 06:32:22 2007
+From: Stephen Hemminger <shemminger@linux-foundation.org>
+Date: Thu, 16 Aug 2007 09:12:45 -0400
+Subject: sky2: restore workarounds for lost interrupts
+To: stable@kernel.org
+Cc: netdev@vger.kernel.org
+Message-ID: <20070816131348.019025298@linux-foundation.org>
+Content-Disposition: inline; filename=sky2-lost-irq.patch
+
+From: Stephen Hemminger <shemminger@linux-foundation.org>
+
+Backport of commit c59697e06058fc2361da8cefcfa3de85ac107582
+
+This patch restores a couple of workarounds from 2.6.16:
+ * restart transmit moderation timer in case it expires during IRQ routine
+ * default to having 10 HZ watchdog timer.
+At this point it more important not to hang than to worry about the
+power cost.
+
+Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/sky2.c |    9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/sky2.c
++++ b/drivers/net/sky2.c
+@@ -96,7 +96,7 @@ static int disable_msi = 0;
+ module_param(disable_msi, int, 0);
+ MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)");
+-static int idle_timeout = 0;
++static int idle_timeout = 100;
+ module_param(idle_timeout, int, 0);
+ MODULE_PARM_DESC(idle_timeout, "Watchdog timer for lost interrupts (ms)");
+@@ -2442,6 +2442,13 @@ static int sky2_poll(struct net_device *
+       work_done = sky2_status_intr(hw, work_limit);
+       if (work_done < work_limit) {
++              /* Bug/Errata workaround?
++               * Need to kick the TX irq moderation timer.
++               */
++              if (sky2_read8(hw, STAT_TX_TIMER_CTRL) == TIM_START) {
++                      sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_STOP);
++                      sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_START);
++              }
+               netif_rx_complete(dev0);
+               /* end of interrupt, re-enables also acts as I/O synchronization */
diff --git a/queue-2.6.22/sky2-napi-fill.patch b/queue-2.6.22/sky2-napi-fill.patch
new file mode 100644 (file)
index 0000000..078b9f4
--- /dev/null
@@ -0,0 +1,78 @@
+From stable-bounces@linux.kernel.org Thu Aug 16 07:05:07 2007
+From: Stephen Hemminger <shemminger@linux-foundation.org>
+Date: Thu, 16 Aug 2007 09:12:47 -0400
+Subject: sky2: check for more work before leaving NAPI
+To: stable@kernel.org
+Cc: netdev@vger.kernel.org
+Message-ID: <20070816131348.583665704@linux-foundation.org>
+Content-Disposition: inline; filename=sky2-napi-fill.patch
+
+From: Stephen Hemminger <shemminger@linux-foundation.org>
+
+Backport of commit 5c11ce700f77fada15b6264417d72462da4bbb1c
+
+This patch avoids generating another IRQ if more packets
+arrive while in the NAPI poll routine. Before marking device as
+finished, it rechecks that the status ring is empty.
+
+Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/sky2.c |   35 +++++++++++++++++------------------
+ 1 file changed, 17 insertions(+), 18 deletions(-)
+
+--- a/drivers/net/sky2.c
++++ b/drivers/net/sky2.c
+@@ -2428,8 +2428,7 @@ static void sky2_err_intr(struct sky2_hw
+ static int sky2_poll(struct net_device *dev0, int *budget)
+ {
+       struct sky2_hw *hw = ((struct sky2_port *) netdev_priv(dev0))->hw;
+-      int work_limit = min(dev0->quota, *budget);
+-      int work_done = 0;
++      int work_done;
+       u32 status = sky2_read32(hw, B0_Y2_SP_EISR);
+       if (unlikely(status & Y2_IS_ERROR))
+@@ -2441,25 +2440,25 @@ static int sky2_poll(struct net_device *
+       if (status & Y2_IS_IRQ_PHY2)
+               sky2_phy_intr(hw, 1);
+-      work_done = sky2_status_intr(hw, work_limit);
+-      if (work_done < work_limit) {
+-              /* Bug/Errata workaround?
+-               * Need to kick the TX irq moderation timer.
+-               */
+-              if (sky2_read8(hw, STAT_TX_TIMER_CTRL) == TIM_START) {
+-                      sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_STOP);
+-                      sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_START);
+-              }
+-              netif_rx_complete(dev0);
++      work_done = sky2_status_intr(hw, min(dev0->quota, *budget));
++      *budget -= work_done;
++      dev0->quota -= work_done;
+-              /* end of interrupt, re-enables also acts as I/O synchronization */
+-              sky2_read32(hw, B0_Y2_SP_LISR);
+-              return 0;
+-      } else {
+-              *budget -= work_done;
+-              dev0->quota -= work_done;
++      /* More work? */
++      if (hw->st_idx != sky2_read16(hw, STAT_PUT_IDX))
+               return 1;
++
++      /* Bug/Errata workaround?
++       * Need to kick the TX irq moderation timer.
++       */
++      if (sky2_read8(hw, STAT_TX_TIMER_CTRL) == TIM_START) {
++              sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_STOP);
++              sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_START);
+       }
++      netif_rx_complete(dev0);
++
++      sky2_read32(hw, B0_Y2_SP_LISR);
++      return 0;
+ }
+ static irqreturn_t sky2_intr(int irq, void *dev_id)
diff --git a/queue-2.6.22/sky2-stable-trunc.patch b/queue-2.6.22/sky2-stable-trunc.patch
new file mode 100644 (file)
index 0000000..8935b7a
--- /dev/null
@@ -0,0 +1,47 @@
+From stable-bounces@linux.kernel.org Thu Aug 16 07:04:45 2007
+From: Stephen Hemminger <shemminger@linux-foundation.org>
+Date: Thu, 16 Aug 2007 09:12:48 -0400
+Subject: sky2: check drop truncated packets
+To: stable@kernel.org
+Cc: netdev@vger.kernel.org
+Message-ID: <20070816131348.817412148@linux-foundation.org>
+Content-Disposition: inline; filename=sky2-stable-trunc.patch
+
+From: Stephen Hemminger <shemminger@linux-foundation.org>
+
+Backport of commit 71749531f2d1954137a1a77422ef4ff29eb102dd
+
+If packet larger than MTU is received, the driver uses hardware to
+truncate the packet. Use the status registers to catch/drop them.
+
+Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/net/sky2.c |    8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/drivers/net/sky2.c
++++ b/drivers/net/sky2.c
+@@ -2065,6 +2065,9 @@ static struct sk_buff *sky2_receive(stru
+       if (!(status & GMR_FS_RX_OK))
+               goto resubmit;
++      if (status >> 16 != length)
++              goto len_mismatch;
++
+       if (length < copybreak)
+               skb = receive_copy(sky2, re, length);
+       else
+@@ -2074,6 +2077,11 @@ resubmit:
+       return skb;
++len_mismatch:
++      /* Truncation of overlength packets
++         causes PHY length to not match MAC length */
++      ++sky2->net_stats.rx_length_errors;
++
+ error:
+       ++sky2->net_stats.rx_errors;
+       if (status & GMR_FS_RX_FF_OV) {