The stop condition in the following statement causes an immediate
break out of the loop because ESDI_TIMEOUT=0xf000 and the result
of the !(inb()) expression can only be either 0 or 1, which means
that i never gets counted down.
for (i = ESDI_TIMEOUT;
i & !(inb(ESDI_STATUS) & STATUS_STAT_AVAIL);
i--);
The obvious cause is the use of "i & !" instead of "i && !". This
was already fixed in 2.6.
Signed-off-by: Willy Tarreau <w@1wt.eu>
drive_num = int_ret_code >> 5;
switch (int_ret_code & 0xf) {
case INT_CMD_COMPLETE:
drive_num = int_ret_code >> 5;
switch (int_ret_code & 0xf) {
case INT_CMD_COMPLETE:
- for (i = ESDI_TIMEOUT; i & !(inb(ESDI_STATUS) & STATUS_STAT_AVAIL); i--);
+ for (i = ESDI_TIMEOUT; i && !(inb(ESDI_STATUS) & STATUS_STAT_AVAIL); i--);
if (!(inb(ESDI_STATUS) & STATUS_STAT_AVAIL)) {
printk("%s: timeout reading status word\n", DEVICE_NAME);
outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);
if (!(inb(ESDI_STATUS) & STATUS_STAT_AVAIL)) {
printk("%s: timeout reading status word\n", DEVICE_NAME);
outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);
break;
case INT_CMD_COMPLETE:
break;
case INT_CMD_COMPLETE:
- for (i = ESDI_TIMEOUT; i & !(inb(ESDI_STATUS) & STATUS_STAT_AVAIL); i--);
+ for (i = ESDI_TIMEOUT; i && !(inb(ESDI_STATUS) & STATUS_STAT_AVAIL); i--);
if (!(inb(ESDI_STATUS) & STATUS_STAT_AVAIL)) {
printk("%s: timeout reading status word\n", DEVICE_NAME);
outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);
if (!(inb(ESDI_STATUS) & STATUS_STAT_AVAIL)) {
printk("%s: timeout reading status word\n", DEVICE_NAME);
outb((int_ret_code & 0xe0) | ATT_EOI, ESDI_ATTN);