From: Kari T. Salmela (weasel@mecom.oulu.fi)
Date: 06/30/93


From: weasel@mecom.oulu.fi (Kari T. Salmela)
Subject: HD: read_intr: status =0x59?
Date: Wed, 30 Jun 1993 08:57:41 GMT

I installed 2 hard disks to one 486SX-25, and following messages
started to appear at irregular intervals (1/min, 3/min etc.):

HD: read_intr: status = 0x59
HD: read_intr: error = 0x10

this usually repeats 2-5 times - also with equivalent HD: write_intr
message. Now, in linux/kernel/blk_drv/hd.c it says:

static void read_intr(void)
{
        int i;
        int retries = 100000;

        do {
                i = (unsigned) inb_p(HD_STATUS);
                if (i & BUSY_STAT)
                        continue;
                if ((i & STAT_MASK) != STAT_OK)
                        break;
                if (i & DRQ_STAT)
                        goto ok_to_read;
        } while (--retries > 0);
        sti();
        printk("HD: read_intr: status = 0x%02x\n",i);
        if (i & ERR_STAT) {
                hd_error = (unsigned) inb(HD_ERROR);
                printk("HD: read_intr: error = 0x%02x\n",hd_error);
        }

        [rest deleted]

and in linux/include/hdreg.h:

/* Bits of HD_STATUS */
#define ERR_STAT 0x01
#define INDEX_STAT 0x02
#define ECC_STAT 0x04 /* Corrected error */
#define DRQ_STAT 0x08
#define SEEK_STAT 0x10
#define WRERR_STAT 0x20
#define READY_STAT 0x40
#define BUSY_STAT 0x80

Note: status was 0x51 at error message.

Since this comes only at times, it might be reasonable to guess that
2 HD drives clash at times. This gives this undefined error and
therefore prints it to screen. The disks seem to work fine; when
kernel retries, it get ok status again.

Q: Is it appropriate to patch the kernel to loop and read again the
status from the controller if it catches this one? I am a total looser
in kernel development, so anyone with experience, comments?

Thank you,