[linux-cirrus] Compact-Flash interrupt problems (was Remote boot using a compact flash device)

  • From: Simon Poole <simon.armlinux@xxxxxxxxxxxxx>
  • To: linux-cirrus@xxxxxxxxxxxxx
  • Date: Tue, 09 Nov 2004 10:18:39 +0000

Pedro de Carvalho Gomes wrote:
> ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
> Cirrus Logic EP93XX IDE initialization - driver version 1.0, 5/21/03.
> hda: SanDisk SDCFB-32, ATA DISK drive
> ide0 at 0x002-0x009,0x019 on irq 40
> hda: attached ide-disk driver.
> hda: task_no_data_intr: status=0x51 { DriveReady SeekComplete Error }
> hda: task_no_data_intr: error=0x04 { DriveStatusError }
> hda: 62720 sectors (32 MB) w/1KiB Cache, CHS=490/4/32
> Partition check:
>  hda:<3>hda: lost interrupt
> hda: lost interrupt
> hda: lost interrupt
> hda: lost interrupt
> hda: lost interrupt
> 

This looks similar to the dmesg trace in the thread Eric pointed out:
> also there was a problem with some CompactFlash on ARM systems which was 
> "solved" by the following hack :
> http://www.mail-archive.com/linux-arm%40lists.arm.linux.org.uk/msg01951.html

Here are some better links to this thread:
http://lists.arm.linux.org.uk/pipermail/linux-arm/2001-September/002290.html
http://lists.arm.linux.org.uk/pipermail/linux-arm/2001-September/002293.html

Below is an up-to-date version of that patch which I think will apply 
cleanly to the cirrus kernel. Apply it in linux/drivers/ide/.  Let us 
know how you get on.

--
Simon Poole
www.appliancestudio.com


--- ide-iops.c.orig     2004-11-08 12:03:30.643412424 +0000
+++ ide-iops.c  2004-11-08 12:06:03.204219656 +0000
@@ -624,8 +624,16 @@
                 stat = hwif->INB(IDE_ALTSTATUS_REG);
         else
  #endif /* CONFIG_IDEPCI_SHARE_IRQ */
+       {
+               int i;
+               for (i = 0; i < 10000; i++) {
                 /* Note: this may clear a pending IRQ!! */
                 stat = hwif->INB(IDE_STATUS_REG);
+               if (!(stat & BUSY_STAT))
+                       break;
+               udelay(1);
+               }
+       }

         if (stat & BUSY_STAT)
                 /* drive busy:  definitely not interrupting */



Other related posts: