summaryrefslogtreecommitdiff
path: root/packages/obsolete/nslu2/nslu2-kernel/2.6.12/disk_led_blinking.patch
diff options
context:
space:
mode:
authorPaul Sokolovsky <pmiscml@gmail.com>2007-02-12 10:12:44 +0000
committerPaul Sokolovsky <pmiscml@gmail.com>2007-02-12 10:12:44 +0000
commitb4296f495d51cb12d34ff2c4e8c13354d6b209d3 (patch)
tree81a5cadacb31535e271395b9252a9b8fda9a6218 /packages/obsolete/nslu2/nslu2-kernel/2.6.12/disk_led_blinking.patch
parent02e1e481c64ff5fbc4e5e4e611cc64c1b61eb1d6 (diff)
parent61cd1b840978cd8e3afdb1c643557d5b1b9a4a98 (diff)
merge of '08c06c17cd4508d5c2c95e45e3e80a8c1037fbb2'
and '73565b933f3ebafee6a4ae23b7c47ef794c47dc8'
Diffstat (limited to 'packages/obsolete/nslu2/nslu2-kernel/2.6.12/disk_led_blinking.patch')
-rw-r--r--packages/obsolete/nslu2/nslu2-kernel/2.6.12/disk_led_blinking.patch127
1 files changed, 0 insertions, 127 deletions
diff --git a/packages/obsolete/nslu2/nslu2-kernel/2.6.12/disk_led_blinking.patch b/packages/obsolete/nslu2/nslu2-kernel/2.6.12/disk_led_blinking.patch
deleted file mode 100644
index 7487cf3ee8..0000000000
--- a/packages/obsolete/nslu2/nslu2-kernel/2.6.12/disk_led_blinking.patch
+++ /dev/null
@@ -1,127 +0,0 @@
---- linux-2.6.12.2/drivers/usb/core/hub.c.bak 2005-09-19 20:29:14.000000000 +0000
-+++ linux-2.6.12.2/drivers/usb/core/hub.c 2005-09-19 20:30:44.000000000 +0000
-@@ -1026,6 +1026,19 @@
-
- dev_info (&udev->dev, "USB disconnect, address %d\n", udev->devnum);
-
-+ // --- Forward-Ported Linksys Disk 1 & Disk 2 LED Control (Port done 16.Sept.05 by Philipp Kirchhofer) ---
-+ // Copy & paste from nslu2-io.c
-+ #define DISK1_OFF 0x00000008 //0b0000 0000 0000 1000
-+ #define DISK2_OFF 0x00000004 //0b0000 0000 0000 0100
-+ // Copy & Paste end
-+
-+ if (*udev->devpath == 0x31) {
-+ *IXP4XX_GPIO_GPOUTR |= DISK1_OFF;
-+ } else if (*udev->devpath == 0x32) {
-+ *IXP4XX_GPIO_GPOUTR |= DISK2_OFF;
-+ }
-+ // --- End LED Control ---
-+
- /* Free up all the children before we remove this device */
- for (i = 0; i < USB_MAXCHILDREN; i++) {
- if (udev->children[i])
-@@ -2175,6 +2188,19 @@
- udev->bus->controller->driver->name,
- udev->devnum);
-
-+ // --- Start LED Control ---
-+ // Copy & paste from nslu2-io.c
-+ #define DISK1_ON 0xfffffff7 //0b1111 1111 1111 0111
-+ #define DISK2_ON 0xfffffffb //0b1111 1111 1111 1011
-+ // Copy & Paste end
-+
-+ if (*udev->devpath == 0x31) {
-+ *IXP4XX_GPIO_GPOUTR &= DISK1_ON;
-+ } else if (*udev->devpath == 0x32) {
-+ *IXP4XX_GPIO_GPOUTR &= DISK2_ON;
-+ }
-+ // --- End LED Control ---
-+
- /* Set up TT records, if needed */
- if (hdev->tt) {
- udev->tt = hdev->tt;
---- linux-2.6.12.2/drivers/usb/storage/transport.c.bak 2005-09-19 20:29:25.000000000 +0000
-+++ linux-2.6.12.2/drivers/usb/storage/transport.c 2005-09-19 20:29:55.000000000 +0000
-@@ -60,6 +60,60 @@
- #include "scsiglue.h"
- #include "debug.h"
-
-+// --- Forward-Ported Linksys Disk 1 & Disk 2 LED Activity Blinking Part 1 (Port done 16.Sept.05 by Philipp Kirchhofer) ---
-+// Copy & Paste from nslu2-io.c
-+#define DISK1_ON 0xfffffff7 //0b1111 1111 1111 0111
-+#define DISK2_ON 0xfffffffb //0b1111 1111 1111 1011
-+
-+#define DISK1_OFF 0x00000008 //0b0000 0000 0000 1000
-+#define DISK2_OFF 0x00000004 //0b0000 0000 0000 0100
-+// Copy & Paste End
-+
-+#define JIFFIES_BLINKING_TIME 6
-+#define ON_LED_INTERVAL 3
-+unsigned long turn_on_time;
-+
-+static struct timer_list usb1_led_timer; /* ide led switch */
-+static struct timer_list usb2_led_timer; /* ide led switch */
-+
-+// Turns on Disk 1 LED
-+static void turn_on_led_usb1(unsigned long ptr) {
-+ *IXP4XX_GPIO_GPOUTR &= DISK1_ON; // 0xfff7
-+ return;
-+}
-+
-+// Turns on Disk 2 LED
-+static void turn_on_led_usb2(unsigned long ptr) {
-+ *IXP4XX_GPIO_GPOUTR &= DISK2_ON; // 0xfffb
-+ return;
-+}
-+
-+// Turns on Disk 1 LED after ON_LED_INTERVAL jiffies
-+static void usb_1_led_timer(void) {
-+ usb1_led_timer.expires = jiffies + ON_LED_INTERVAL;
-+ add_timer(&usb1_led_timer);
-+ return;
-+}
-+
-+// Turns on Disk 2 LED after ON_LED_INTERVAL jiffies
-+static void usb_2_led_timer(void) {
-+ usb2_led_timer.expires = jiffies + ON_LED_INTERVAL;
-+ add_timer(&usb2_led_timer);
-+ return;
-+}
-+
-+// Initializes Timers
-+unsigned long initialized_timers = 0;
-+static void initializeTimers() {
-+ if (initialized_timers != 1) {
-+ init_timer(&usb1_led_timer);
-+ usb1_led_timer.function = turn_on_led_usb1;
-+ init_timer(&usb2_led_timer);
-+ usb2_led_timer.function = turn_on_led_usb2;
-+ initialized_timers = 1;
-+ }
-+}
-+// --- End Disk LED Activity Blinking Part 1 ---
-
- /***********************************************************************
- * Data transfer routines
-@@ -499,6 +553,21 @@
-
- /* are we scatter-gathering? */
- if (use_sg) {
-+ // --- Disk LED Activity Blinking Part 2 ---
-+ initializeTimers();
-+ if ((jiffies - turn_on_time) >= JIFFIES_BLINKING_TIME) {
-+ if (*us->pusb_dev->devpath == 0x31) {
-+ del_timer_sync(&usb1_led_timer);
-+ *IXP4XX_GPIO_GPOUTR |= DISK1_OFF;
-+ usb_1_led_timer();
-+ } else if (*us->pusb_dev->devpath == 0x32) {
-+ del_timer_sync(&usb2_led_timer);
-+ *IXP4XX_GPIO_GPOUTR |= DISK2_OFF;
-+ usb_2_led_timer();
-+ }
-+ turn_on_time = jiffies;
-+ }
-+ // --- End Disk LED Activity Blinking Part 2 ---
- /* use the usb core scatter-gather primitives */
- result = usb_stor_bulk_transfer_sglist(us, pipe,
- (struct scatterlist *) buf, use_sg,