Why does ide-cd use "DRIVER(drive)->end_request()" instead of
"cdrom_end_request()" in the function ide_cdrom_error when it wants to
end a request that's exceeded ERROR_MAX errors?  (See code below.)

With certain requests (GET_CONFIGURATION (0x46), in particular),
DRIVER(drive)->end_request() is not actually ending the request, because
rq->bio is not NULL--but it also is not clearing rq->errors, so this
request ends up getting retried forever, but no more resets are
attempted because rq->errors has exceeded ERROR_MAX.

Cdrom_end_request(), on the other hand, WILL end the request.

Thanks,
Stuart


        if (stat & BUSY_STAT || ((stat & WRERR_STAT) && !drive->nowerr))
{
                /* other bits are useless when BUSY */
                rq->errors |= ERROR_RESET;
        } else {
                /* add decoding error stuff */
        }
        if (HWIF(drive)->INB(IDE_STATUS_REG) & (BUSY_STAT|DRQ_STAT))
                /* force an abort */
                HWIF(drive)->OUTB(WIN_IDLEIMMEDIATE,IDE_COMMAND_REG);
        if (rq->errors >= ERROR_MAX) {
                DRIVER(drive)->end_request(drive, 0, 0);  <--- should
this be cdrom_end_requeset()?
        } else {
                if ((rq->errors & ERROR_RESET) == ERROR_RESET) {
                        ++rq->errors;
                        return ide_do_reset(drive);
                }
                ++rq->errors;
        }
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to