summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog4
-rw-r--r--debian/patches/20_ide_disable_irqs.patch95
2 files changed, 99 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 784b15a..80cc881 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,10 @@ gnumach (1:20050501-5) UNRELEASED; urgency=low
* No need to rename Drivers.in to configure.ac anymore.
* Add DPATCHLEVEL and ChangeLog entry.
- debian/patches/12_sis900.patch: Update.
+ * Disable IDE interrupts when the driver requests that through
+ request_irq().
+ - debian/patches/20_ide_disable_irqs.patch: New file.
+ Thanks to Samuel Thibault <samuel.thibault@ens-lyon.org>.
* Now using Standards-Version 3.6.2 (no changes needed).
-- Guillem Jover <guillem@debian.org> Mon, 1 Aug 2005 03:46:51 +0300
diff --git a/debian/patches/20_ide_disable_irqs.patch b/debian/patches/20_ide_disable_irqs.patch
new file mode 100644
index 0000000..de1b396
--- /dev/null
+++ b/debian/patches/20_ide_disable_irqs.patch
@@ -0,0 +1,95 @@
+#DPATCHLEVEL=1
+
+2005-07-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+ * irq.c (linux_intr): Disable interrupts when the driver
+ requested it through request_irq().
+
+
+--- gnumach/linux/dev/arch/i386/kernel/irq.c 1999-04-26 07:40:55.000000000 +0200
++++ gnumach/linux/dev/arch/i386/kernel/irq.c 2005-07-19 04:37:17.000000000 +0200
+@@ -103,16 +103,23 @@ linux_intr (int irq)
+ {
+ struct pt_regs regs;
+ struct linux_action *action = *(irq_action + irq);
++ unsigned long flags;
+
+ kstat.interrupts[irq]++;
+ intr_count++;
+
++ save_flags (flags);
++ if (action && (action->flags & SA_INTERRUPT))
++ cli ();
++
+ while (action)
+ {
+ action->handler (irq, action->dev_id, &regs);
+ action = action->next;
+ }
+
++ restore_flags (flags);
++
+ intr_count--;
+
+ /* Not used. by OKUJI Yoshinori. */
+
+
+2005-07-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+ * ide.c (read_intr): Set irq handler before issuing order, in
+ case the device is really fast (QEMU for instance).
+ (write_intr): Likewise.
+ (multwrite_intr): Likewise.
+
+--- gnumach/linux/dev/drivers/block/ide.c 2001-06-28 10:55:02.000000000 +0200
++++ gnumach/linux/dev/drivers/block/ide.c 2005-07-19 03:53:36.000000000 +0200
+@@ -1129,6 +1129,9 @@ read_intr (ide_drive_t *drive)
+ msect -= nsect;
+ } else
+ nsect = 1;
++ i = rq->nr_sectors - nsect;
++ if (i > 0 && !msect)
++ ide_set_handler (drive, &read_intr, WAIT_CMD);
+ ide_input_data(drive, rq->buffer, nsect * SECTOR_WORDS);
+ #ifdef DEBUG
+ printk("%s: read: sectors(%ld-%ld), buffer=0x%08lx, remaining=%ld\n",
+@@ -1138,14 +1141,11 @@ read_intr (ide_drive_t *drive)
+ rq->sector += nsect;
+ rq->buffer += nsect<<9;
+ rq->errors = 0;
+- i = (rq->nr_sectors -= nsect);
++ rq->nr_sectors = i;
+ if ((rq->current_nr_sectors -= nsect) <= 0)
+ ide_end_request(1, HWGROUP(drive));
+- if (i > 0) {
+- if (msect)
+- goto read_next;
+- ide_set_handler (drive, &read_intr, WAIT_CMD);
+- }
++ if (i > 0 && msect)
++ goto read_next;
+ }
+
+ /*
+@@ -1173,8 +1173,8 @@ write_intr (ide_drive_t *drive)
+ if (rq->current_nr_sectors <= 0)
+ ide_end_request(1, hwgroup);
+ if (i > 0) {
++ ide_set_handler (drive, &write_intr, WAIT_CMD);
+ ide_output_data (drive, rq->buffer, SECTOR_WORDS);
+- ide_set_handler (drive, &write_intr, WAIT_CMD);
+ }
+ return;
+ }
+@@ -1231,8 +1231,8 @@ multwrite_intr (ide_drive_t *drive)
+ if (OK_STAT(stat=GET_STAT(),DRIVE_READY,drive->bad_wstat)) {
+ if (stat & DRQ_STAT) {
+ if (rq->nr_sectors) {
++ ide_set_handler (drive, &multwrite_intr, WAIT_CMD);
+ ide_multwrite(drive, drive->mult_count);
+- ide_set_handler (drive, &multwrite_intr, WAIT_CMD);
+ return;
+ }
+ } else {
+
+