diff options
Diffstat (limited to 'target/linux/aruba-2.6/patches')
-rw-r--r-- | target/linux/aruba-2.6/patches/000-aruba.patch | 215 | ||||
-rw-r--r-- | target/linux/aruba-2.6/patches/001-flash.patch | 90 | ||||
-rw-r--r-- | target/linux/aruba-2.6/patches/003-pci.patch | 52 | ||||
-rw-r--r-- | target/linux/aruba-2.6/patches/004-wdt.patch | 12 | ||||
-rw-r--r-- | target/linux/aruba-2.6/patches/010-ar2313_enet.patch | 27 | ||||
-rw-r--r-- | target/linux/aruba-2.6/patches/011-ap6x_serial_fix.patch | 22 | ||||
-rw-r--r-- | target/linux/aruba-2.6/patches/012-ehci_softirq.patch | 70 |
7 files changed, 0 insertions, 488 deletions
diff --git a/target/linux/aruba-2.6/patches/000-aruba.patch b/target/linux/aruba-2.6/patches/000-aruba.patch deleted file mode 100644 index 2867bc4c3a..0000000000 --- a/target/linux/aruba-2.6/patches/000-aruba.patch +++ /dev/null @@ -1,215 +0,0 @@ -diff -Nur linux-2.6.21.1/arch/mips/Kconfig linux-2.6.21.1-owrt/arch/mips/Kconfig ---- linux-2.6.21.1/arch/mips/Kconfig 2007-04-27 23:49:26.000000000 +0200 -+++ linux-2.6.21.1-owrt/arch/mips/Kconfig 2007-05-23 23:34:01.000000000 +0200 -@@ -220,6 +220,17 @@ - <http://www.marvell.com/>. Say Y here if you wish to build a - kernel for this platform. - -+config MACH_ARUBA -+ bool "Support for the ARUBA product line" -+ select DMA_NONCOHERENT -+ select CPU_HAS_PREFETCH -+ select HW_HAS_PCI -+ select SWAP_IO_SPACE -+ select SYS_SUPPORTS_32BIT_KERNEL -+ select SYS_HAS_CPU_MIPS32_R1 -+ select SYS_SUPPORTS_BIG_ENDIAN -+ -+ - config MACH_JAZZ - bool "Jazz family of machines" - select ARC -diff -Nur linux-2.6.21.1/arch/mips/Makefile linux-2.6.21.1-owrt/arch/mips/Makefile ---- linux-2.6.21.1/arch/mips/Makefile 2007-04-27 23:49:26.000000000 +0200 -+++ linux-2.6.21.1-owrt/arch/mips/Makefile 2007-05-23 23:34:01.000000000 +0200 -@@ -158,6 +158,14 @@ - # - - # -+# Aruba -+# -+ -+core-$(CONFIG_MACH_ARUBA) += arch/mips/aruba/ -+cflags-$(CONFIG_MACH_ARUBA) += -Iinclude/asm-mips/aruba -+load-$(CONFIG_MACH_ARUBA) += 0x80100000 -+ -+# - # Acer PICA 61, Mips Magnum 4000 and Olivetti M700. - # - core-$(CONFIG_MACH_JAZZ) += arch/mips/jazz/ -diff -Nur linux-2.6.21.1/drivers/net/Kconfig linux-2.6.21.1-owrt/drivers/net/Kconfig ---- linux-2.6.21.1/drivers/net/Kconfig 2007-04-27 23:49:26.000000000 +0200 -+++ linux-2.6.21.1-owrt/drivers/net/Kconfig 2007-05-24 10:45:57.000000000 +0200 -@@ -201,6 +201,13 @@ - - source "drivers/net/arm/Kconfig" - -+config IDT_RC32434_ETH -+ tristate "IDT RC32434 Local Ethernet support" -+ depends on NET_ETHERNET -+ help -+ IDT RC32434 has one local ethernet port. Say Y here to enable it. -+ To compile this driver as a module, choose M here. -+ - config MACE - tristate "MACE (Power Mac ethernet) support" - depends on NET_ETHERNET && PPC_PMAC && PPC32 -diff -Nur linux-2.6.21.1/drivers/net/Makefile linux-2.6.21.1-owrt/drivers/net/Makefile ---- linux-2.6.21.1/drivers/net/Makefile 2007-04-27 23:49:26.000000000 +0200 -+++ linux-2.6.21.1-owrt/drivers/net/Makefile 2007-05-24 10:45:57.000000000 +0200 -@@ -38,6 +38,7 @@ - obj-$(CONFIG_MACE) += mace.o - obj-$(CONFIG_BMAC) += bmac.o - -+obj-$(CONFIG_IDT_RC32434_ETH) += rc32434_eth.o - obj-$(CONFIG_DGRS) += dgrs.o - obj-$(CONFIG_VORTEX) += 3c59x.o - obj-$(CONFIG_TYPHOON) += typhoon.o -diff -Nur linux-2.6.21.1/drivers/net/natsemi.c linux-2.6.21.1-owrt/drivers/net/natsemi.c ---- linux-2.6.21.1/drivers/net/natsemi.c 2007-04-27 23:49:26.000000000 +0200 -+++ linux-2.6.21.1-owrt/drivers/net/natsemi.c 2007-05-23 23:34:01.000000000 +0200 -@@ -656,6 +656,49 @@ - static int netdev_get_eeprom(struct net_device *dev, u8 *buf); - static const struct ethtool_ops ethtool_ops; - -+#ifdef CONFIG_MACH_ARUBA -+ -+#include <linux/ctype.h> -+ -+#ifndef ERR -+#define ERR(fmt, args...) printk("%s: " fmt, __func__, ##args) -+#endif -+ -+static int parse_mac_addr(struct net_device *dev, char* macstr) -+{ -+ int i, j; -+ unsigned char result, value; -+ -+ for (i=0; i<6; i++) { -+ result = 0; -+ if (i != 5 && *(macstr+2) != ':') { -+ ERR("invalid mac address format: %d %c\n", -+ i, *(macstr+2)); -+ return -EINVAL; -+ } -+ for (j=0; j<2; j++) { -+ if (isxdigit(*macstr) && (value = isdigit(*macstr) ? *macstr-'0' : -+ toupper(*macstr)-'A'+10) < 16) { -+ result = result*16 + value; -+ macstr++; -+ } -+ else { -+ ERR("invalid mac address " -+ "character: %c\n", *macstr); -+ return -EINVAL; -+ } -+ } -+ -+ macstr++; -+ dev->dev_addr[i] = result; -+ } -+ -+ dev->dev_addr[5]++; -+ return 0; -+} -+ -+#endif -+ - static inline void __iomem *ns_ioaddr(struct net_device *dev) - { - return (void __iomem *) dev->base_addr; -@@ -794,6 +837,7 @@ - goto err_ioremap; - } - -+#ifndef CONFIG_MACH_ARUBA - /* Work around the dropped serial bit. */ - prev_eedata = eeprom_read(ioaddr, 6); - for (i = 0; i < 3; i++) { -@@ -802,6 +846,19 @@ - dev->dev_addr[i*2+1] = eedata >> 7; - prev_eedata = eedata; - } -+#else -+ { -+ char mac[32]; -+ unsigned char def_mac[6] = {00, 0x0b, 0x86, 0xba, 0xdb, 0xad}; -+ extern char *getenv(char *e); -+ memset(mac, 0, 32); -+ memcpy(mac, getenv("ethaddr"), 17); -+ if (parse_mac_addr(dev, mac)){ -+ printk("%s: MAC address not found\n", __func__); -+ memcpy(dev->dev_addr, def_mac, 6); -+ } -+ } -+#endif - - dev->base_addr = (unsigned long __force) ioaddr; - dev->irq = irq; -diff -Nur linux-2.6.21.1/include/asm-mips/bootinfo.h linux-2.6.21.1-owrt/include/asm-mips/bootinfo.h ---- linux-2.6.21.1/include/asm-mips/bootinfo.h 2007-04-27 23:49:26.000000000 +0200 -+++ linux-2.6.21.1-owrt/include/asm-mips/bootinfo.h 2007-05-23 23:34:01.000000000 +0200 -@@ -213,6 +213,17 @@ - #define MACH_GROUP_NEC_EMMA2RH 25 /* NEC EMMA2RH (was 23) */ - #define MACH_NEC_MARKEINS 0 /* NEC EMMA2RH Mark-eins */ - -+ -+/* -+ * Valid machtype for group ARUBA -+ */ -+#define MACH_GROUP_ARUBA 23 -+#define MACH_ARUBA_UNKNOWN 0 -+#define MACH_ARUBA_AP60 1 -+#define MACH_ARUBA_AP65 2 -+#define MACH_ARUBA_AP70 3 -+#define MACH_ARUBA_AP40 4 -+ - #define CL_SIZE COMMAND_LINE_SIZE - - const char *get_system_type(void); -diff -Nur linux-2.6.21.1/include/asm-mips/cpu.h linux-2.6.21.1-owrt/include/asm-mips/cpu.h ---- linux-2.6.21.1/include/asm-mips/cpu.h 2007-04-27 23:49:26.000000000 +0200 -+++ linux-2.6.21.1-owrt/include/asm-mips/cpu.h 2007-05-23 23:34:01.000000000 +0200 -@@ -54,6 +54,9 @@ - #define PRID_IMP_R14000 0x0f00 - #define PRID_IMP_R8000 0x1000 - #define PRID_IMP_PR4450 0x1200 -+#define PRID_IMP_RC32334 0x1800 -+#define PRID_IMP_RC32355 0x1900 -+#define PRID_IMP_RC32365 0x1900 - #define PRID_IMP_R4600 0x2000 - #define PRID_IMP_R4700 0x2100 - #define PRID_IMP_TX39 0x2200 -@@ -200,7 +203,8 @@ - #define CPU_SB1A 62 - #define CPU_74K 63 - #define CPU_R14000 64 --#define CPU_LAST 64 -+#define CPU_RC32300 65 -+#define CPU_LAST 65 - - /* - * ISA Level encodings -diff -Nur linux-2.6.21.1/include/asm-mips/mach-generic/irq.h linux-2.6.21.1-owrt/include/asm-mips/mach-generic/irq.h ---- linux-2.6.21.1/include/asm-mips/mach-generic/irq.h 2007-04-27 23:49:26.000000000 +0200 -+++ linux-2.6.21.1-owrt/include/asm-mips/mach-generic/irq.h 2007-05-23 23:35:55.000000000 +0200 -@@ -9,7 +9,7 @@ - #define __ASM_MACH_GENERIC_IRQ_H - - #ifndef NR_IRQS --#define NR_IRQS 128 -+#define NR_IRQS 256 - #endif - - #ifdef CONFIG_I8259 -diff -Nur linux-2.6.21.1/include/linux/kernel.h linux-2.6.21.1-owrt/include/linux/kernel.h ---- linux-2.6.21.1/include/linux/kernel.h 2007-04-27 23:49:26.000000000 +0200 -+++ linux-2.6.21.1-owrt/include/linux/kernel.h 2007-05-23 23:34:01.000000000 +0200 -@@ -334,6 +334,7 @@ - }; - - /* Force a compilation error if condition is true */ -+extern void BUILD_BUG(void); - #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) - - /* Force a compilation error if condition is true, but also produce a diff --git a/target/linux/aruba-2.6/patches/001-flash.patch b/target/linux/aruba-2.6/patches/001-flash.patch deleted file mode 100644 index 8bd5be8e11..0000000000 --- a/target/linux/aruba-2.6/patches/001-flash.patch +++ /dev/null @@ -1,90 +0,0 @@ -diff -Nur linux-2.6.15/drivers/mtd/chips/cfi_probe.c linux-2.6.15-openwrt/drivers/mtd/chips/cfi_probe.c ---- linux-2.6.15/drivers/mtd/chips/cfi_probe.c 2006-01-03 04:21:10.000000000 +0100 -+++ linux-2.6.15-openwrt/drivers/mtd/chips/cfi_probe.c 2006-01-10 00:32:32.000000000 +0100 -@@ -26,6 +26,74 @@ - static void print_cfi_ident(struct cfi_ident *); - #endif - -+#if 1 -+ -+#define AMD_AUTOSEL_OFF1 0xAAA -+#define AMD_AUTOSEL_OFF2 0x555 -+#define AMD_MANUF_ID 0x1 -+#define AMD_DEVICE_ID1 0xF6 /* T */ -+#define AMD_DEVICE_ID2 0xF9 /* B */ -+/* Foll. are definitions for Macronix Flash Part */ -+#define MCX_MANUF_ID 0xC2 -+#define MCX_DEVICE_ID1 0xA7 -+#define MCX_DEVICE_ID2 0xA8 -+/* Foll. common to both AMD and Macronix */ -+#define FACTORY_LOCKED 0x99 -+#define USER_LOCKED 0x19 -+ -+/* NOTE: AP-70/6x use BYTE mode flash access. Therefore the -+ * lowest Addr. pin in the flash is not A0 but A-1 (A minus 1). -+ * CPU's A0 is tied to Flash's A-1, A1 to A0 and so on. This -+ * gives 4MB of byte-addressable mem. In byte mode, all addr -+ * need to be multiplied by 2 (i.e compared to word mode). -+ * NOTE: AMD_AUTOSEL_OFF1 and OFF2 are already mult. by 2 -+ * Just blindly use the addr offsets suggested in the manual -+ * for byte mode and you'll be OK. Offs. in Table 6 need to -+ * be mult by 2 (for getting autosel params) -+ */ -+void -+flash_detect(struct map_info *map, __u32 base, struct cfi_private *cfi) -+{ -+ map_word val[3]; -+ int osf = cfi->interleave * cfi->device_type; // =2 for AP70/6x -+ char *manuf, *part, *lock ; -+ -+ if (osf != 1) return ; -+ -+ cfi_send_gen_cmd(0xAA, AMD_AUTOSEL_OFF1, base, map, cfi, cfi->device_type, NULL); -+ cfi_send_gen_cmd(0x55, AMD_AUTOSEL_OFF2, base, map, cfi, cfi->device_type, NULL); -+ cfi_send_gen_cmd(0x90, AMD_AUTOSEL_OFF1, base, map, cfi, cfi->device_type, NULL); -+ val[0] = map_read(map, base) ; // manuf ID -+ val[1] = map_read(map, base+2) ; // device ID -+ val[2] = map_read(map, base+6) ; // lock indicator -+#if 0 -+printk("v1=0x%x v2=0x%x v3=0x%x\n", val[0], val[1], val[2]) ; -+#endif -+ if (val[0].x[0] == AMD_MANUF_ID) { -+ manuf = "AMD Flash" ; -+ if (val[1].x[0] == AMD_DEVICE_ID1) -+ part = "AM29LV320D (Top)" ; -+ else if (val[1].x[0] == AMD_DEVICE_ID2) -+ part = "AM29LV320D (Bot)" ; -+ else part = "Unknown" ; -+ } else if (val[0].x[0] == MCX_MANUF_ID) { -+ manuf = "Macronix Flash" ; -+ if (val[1].x[0] == MCX_DEVICE_ID1) -+ part = "MX29LV320A (Top)" ; -+ else if (val[1].x[0] == MCX_DEVICE_ID2) -+ part = "MX29LV320A (Bot)" ; -+ else part = "Unknown" ; -+ } else -+ return ; -+ if (val[2].x[0] == FACTORY_LOCKED) -+ lock = "Factory Locked" ; -+ else if (val[2].x[0] == USER_LOCKED) -+ lock = "User Locked" ; -+ else lock = "Unknown locking" ; -+ printk("%s %s (%s)\n", manuf, part, lock) ; -+} -+#endif -+ - static int cfi_probe_chip(struct map_info *map, __u32 base, - unsigned long *chip_map, struct cfi_private *cfi); - static int cfi_chip_setup(struct map_info *map, struct cfi_private *cfi); -@@ -118,6 +186,10 @@ - } - - xip_disable(); -+#if 1 -+ //cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); -+ flash_detect(map, base, cfi) ; -+#endif - cfi_send_gen_cmd(0xF0, 0, base, map, cfi, cfi->device_type, NULL); - cfi_send_gen_cmd(0xFF, 0, base, map, cfi, cfi->device_type, NULL); - cfi_send_gen_cmd(0x98, 0x55, base, map, cfi, cfi->device_type, NULL); - diff --git a/target/linux/aruba-2.6/patches/003-pci.patch b/target/linux/aruba-2.6/patches/003-pci.patch deleted file mode 100644 index fdc451fdd5..0000000000 --- a/target/linux/aruba-2.6/patches/003-pci.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -Nur linux-2.6.15/arch/mips/pci/Makefile linux-2.6.15-openwrt/arch/mips/pci/Makefile ---- linux-2.6.15/arch/mips/pci/Makefile 2006-01-03 04:21:10.000000000 +0100 -+++ linux-2.6.15-openwrt/arch/mips/pci/Makefile 2006-01-10 00:32:32.000000000 +0100 -@@ -53,3 +53,4 @@ - obj-$(CONFIG_VICTOR_MPC30X) += fixup-mpc30x.o - obj-$(CONFIG_ZAO_CAPCELLA) += fixup-capcella.o - obj-$(CONFIG_WR_PPMC) += fixup-wrppmc.o -+obj-$(CONFIG_MACH_ARUBA) += fixup-aruba.o ops-aruba.o pci-aruba.o -diff -Nur linux-2.6.15/drivers/pci/access.c linux-2.6.15-openwrt/drivers/pci/access.c ---- linux-2.6.15/drivers/pci/access.c 2006-01-03 04:21:10.000000000 +0100 -+++ linux-2.6.15-openwrt/drivers/pci/access.c 2006-01-10 00:43:10.000000000 +0100 -@@ -21,6 +21,7 @@ - #define PCI_word_BAD (pos & 1) - #define PCI_dword_BAD (pos & 3) - -+#ifdef __MIPSEB__ - #define PCI_OP_READ(size,type,len) \ - int pci_bus_read_config_##size \ - (struct pci_bus *bus, unsigned int devfn, int pos, type *value) \ -@@ -31,11 +32,32 @@ - if (PCI_##size##_BAD) return PCIBIOS_BAD_REGISTER_NUMBER; \ - spin_lock_irqsave(&pci_lock, flags); \ - res = bus->ops->read(bus, devfn, pos, len, &data); \ -+ if (len == 1) \ -+ *value = (type)((data >> 24) & 0xff); \ -+ else if (len == 2) \ -+ *value = (type)((data >> 16) & 0xffff); \ -+ else \ - *value = (type)data; \ - spin_unlock_irqrestore(&pci_lock, flags); \ - return res; \ - } -+#else - -+#define PCI_OP_READ(size,type,len) \ -+int pci_bus_read_config_##size \ -+ (struct pci_bus *bus, unsigned int devfn, int pos, type *value) \ -+{ \ -+ int res; \ -+ unsigned long flags; \ -+ u32 data = 0; \ -+ if (PCI_##size##_BAD) return PCIBIOS_BAD_REGISTER_NUMBER; \ -+ spin_lock_irqsave(&pci_lock, flags); \ -+ res = bus->ops->read(bus, devfn, pos, len, &data); \ -+ *value = (type)data; \ -+ spin_unlock_irqrestore(&pci_lock, flags); \ -+ return res; \ -+} -+#endif - #define PCI_OP_WRITE(size,type,len) \ - int pci_bus_write_config_##size \ - (struct pci_bus *bus, unsigned int devfn, int pos, type value) \ diff --git a/target/linux/aruba-2.6/patches/004-wdt.patch b/target/linux/aruba-2.6/patches/004-wdt.patch deleted file mode 100644 index 74731b2d36..0000000000 --- a/target/linux/aruba-2.6/patches/004-wdt.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur linux-2.6.15.3/drivers/char/watchdog/Makefile linux-2.6.15.3-openwrt/drivers/char/watchdog/Makefile ---- linux-2.6.15.3/drivers/char/watchdog/Makefile 2006-02-22 10:04:18.596278000 -0800 -+++ linux-2.6.15.3-openwrt/drivers/char/watchdog/Makefile 2006-02-22 10:06:21.400960000 -0800 -@@ -71,5 +71,8 @@ - - # SPARC64 Architecture - -+# Aruba Architecture -+obj-$(CONFIG_MACH_ARUBA) += wdt_merlot.o -+ - # Architecture Independant - obj-$(CONFIG_SOFT_WATCHDOG) += softdog.o diff --git a/target/linux/aruba-2.6/patches/010-ar2313_enet.patch b/target/linux/aruba-2.6/patches/010-ar2313_enet.patch deleted file mode 100644 index 0f30b3888e..0000000000 --- a/target/linux/aruba-2.6/patches/010-ar2313_enet.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff -Nur linux-2.6.17/drivers/net/Kconfig linux-2.6.17-owrt/drivers/net/Kconfig ---- linux-2.6.17/drivers/net/Kconfig 2006-06-19 12:05:01.000000000 +0200 -+++ linux-2.6.17-owrt/drivers/net/Kconfig 2006-06-19 12:26:35.000000000 +0200 -@@ -310,6 +310,12 @@ - - source "drivers/net/arm/Kconfig" - -+config AR2313 -+ tristate "AR2313 Ethernet support" -+ depends on NET_ETHERNET && MACH_ARUBA -+ help -+ Support for the AR2313 Ethernet part on Aruba AP60/61 -+ - config IDT_RC32434_ETH - tristate "IDT RC32434 Local Ethernet support" - depends on NET_ETHERNET -diff -Nur linux-2.6.17/drivers/net/Makefile linux-2.6.17-owrt/drivers/net/Makefile ---- linux-2.6.17/drivers/net/Makefile 2006-06-19 12:05:01.000000000 +0200 -+++ linux-2.6.17-owrt/drivers/net/Makefile 2006-06-19 12:27:02.000000000 +0200 -@@ -12,6 +12,7 @@ - obj-$(CONFIG_CHELSIO_T1) += chelsio/ - obj-$(CONFIG_BONDING) += bonding/ - obj-$(CONFIG_GIANFAR) += gianfar_driver.o -+obj-$(CONFIG_AR2313) += ar2313/ - - gianfar_driver-objs := gianfar.o \ - gianfar_ethtool.o \ diff --git a/target/linux/aruba-2.6/patches/011-ap6x_serial_fix.patch b/target/linux/aruba-2.6/patches/011-ap6x_serial_fix.patch deleted file mode 100644 index ac5c78e251..0000000000 --- a/target/linux/aruba-2.6/patches/011-ap6x_serial_fix.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -urN linux.old/drivers/serial/8250.c linux.net/drivers/serial/8250.c ---- linux.old/drivers/serial/8250.c 2006-01-15 07:16:02.000000000 +0100 -+++ linux.net/drivers/serial/8250.c 2006-01-30 06:12:30.509342250 +0100 -@@ -1615,6 +1615,8 @@ - - serial8250_set_mctrl(&up->port, up->port.mctrl); - -+// For some reason this test causes problems on the AP6x serial console -+#if 0 - /* - * Do a quick test to see if we receive an - * interrupt when we enable the TX irq. -@@ -1633,7 +1635,8 @@ - } else { - up->bugs &= ~UART_BUG_TXEN; - } -- -+#endif -+ - spin_unlock_irqrestore(&up->port.lock, flags); - - /* diff --git a/target/linux/aruba-2.6/patches/012-ehci_softirq.patch b/target/linux/aruba-2.6/patches/012-ehci_softirq.patch deleted file mode 100644 index 4c187d12b1..0000000000 --- a/target/linux/aruba-2.6/patches/012-ehci_softirq.patch +++ /dev/null @@ -1,70 +0,0 @@ -diff -Nurb linux-2.6.16.1/drivers/usb/host/ehci.h linux-patched/drivers/usb/host/ehci.h ---- linux-2.6.16.1/drivers/usb/host/ehci.h 2006-03-27 22:49:02.000000000 -0800 -+++ linux-patched/drivers/usb/host/ehci.h 2006-04-07 12:07:30.000000000 -0700 -@@ -82,6 +82,7 @@ - struct dma_pool *sitd_pool; /* sitd per split iso urb */ - - struct timer_list watchdog; -+ struct timer_list softirq; - unsigned long actions; - unsigned stamp; - unsigned long next_statechange; -diff -Nurb linux-2.6.16.1/drivers/usb/host/ehci-hcd.c linux-patched/drivers/usb/host/ehci-hcd.c ---- linux-2.6.16.1/drivers/usb/host/ehci-hcd.c 2006-03-27 22:49:02.000000000 -0800 -+++ linux-patched/drivers/usb/host/ehci-hcd.c 2006-04-07 13:20:13.000000000 -0700 -@@ -116,6 +116,7 @@ - #define EHCI_IO_JIFFIES (HZ/10) /* io watchdog > irq_thresh */ - #define EHCI_ASYNC_JIFFIES (HZ/20) /* async idle timeout */ - #define EHCI_SHRINK_JIFFIES (HZ/200) /* async qh unlink delay */ -+#define EHCI_SOFTIRQ (HZ/400) - - /* Initial IRQ latency: faster than hw default */ - static int log2_irq_thresh = 0; // 0 to 6 -@@ -263,6 +264,16 @@ - #include "ehci-sched.c" - - /*-------------------------------------------------------------------------*/ -+static irqreturn_t ehci_irq (struct usb_hcd *hcd); -+ -+static void ehci_softirq (unsigned long param) -+{ -+ struct ehci_hcd *ehci = (struct ehci_hcd *) param; -+ -+ if (ehci_irq(ehci_to_hcd(ehci)) != IRQ_NONE) -+ set_bit(HCD_FLAG_SAW_IRQ, &(ehci_to_hcd(ehci))->flags); -+ mod_timer (&ehci->softirq, jiffies + EHCI_SOFTIRQ); -+} - - static void ehci_watchdog (unsigned long param) - { -@@ -280,6 +291,10 @@ - COUNT (ehci->stats.lost_iaa); - writel (STS_IAA, &ehci->regs->status); - ehci->reclaim_ready = 1; -+ if (!timer_pending(&ehci->softirq)) { -+ ehci_info(ehci, "switching to softirq\n"); -+ mod_timer (&ehci->softirq, jiffies + EHCI_SOFTIRQ); -+ } - } - } - -@@ -371,6 +388,7 @@ - - /* no more interrupts ... */ - del_timer_sync (&ehci->watchdog); -+ del_timer_sync (&ehci->softirq); - - spin_lock_irq(&ehci->lock); - if (HC_IS_RUNNING (hcd->state)) -@@ -418,6 +436,10 @@ - ehci->watchdog.function = ehci_watchdog; - ehci->watchdog.data = (unsigned long) ehci; - -+ init_timer(&ehci->softirq); -+ ehci->softirq.function = ehci_softirq; -+ ehci->softirq.data = (unsigned long) ehci; -+ - /* - * hw default: 1K periodic list heads, one per frame. - * periodic_size can shrink by USBCMD update if hcc_params allows. - |