Hi,

Further to my previous email, it looks like the interrupt is getting through
but is ignored because the card is busy. I've added the code below to ide.c
(function drive_is_ready()). So the IDE code is fine and it doesn't get the
interrupt 'before it is ready' of course. Stupid of me to imagine that.

But there are two problems:

1. This code should only be used when the unexpected interrupt problem
appears.

2. This code shouldn't be needed at all.

I did find a similar problem reported with a PC laptop and a CF card (late
2000), so it has happened before and not just on ARM.

Any ideas?

Regards,



        if (IDE_CONTROL_REG)
                stat = GET_ALTSTAT();
        else
#endif /* CONFIG_IDEPCI_SHARE_IRQ */
#ifdef CONFIG_SA1100_ELF
        {
        int i;

        /* this technique was borrowed from ide_wait_stat() as the SanDisk
           SDCFB-16 seems to issue an interrupt before it is ready. Not
           completely sure. The result of this hack is a few unexpected
           interrupts when transferring large files (2-3MB), but nothing
           worse. What is going on here? */
        for (i = 0; i < 10000; i++) {
                stat = GET_STAT();/* Note: this may clear a pending IRQ!! */
                if (!(stat & BUSY_STAT))
                      break;;
                udelay(1);
        }
        }
#else
        stat = GET_STAT();      /* Note: this may clear a pending IRQ!! */
#endif

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

_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
Please visit the above address for information on this list.

Reply via email to