]> git.baikalelectronics.ru Git - kernel.git/commit
IDE: Make taskfile interface more robust wrt unexpected end-of-command
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 19 Mar 2008 04:26:24 +0000 (21:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 19 Mar 2008 04:26:24 +0000 (21:26 -0700)
commit7510f000017e082923e8ba3f744141d9f4736ed9
treefc740e2fff9c0f3d9e75848b6e106f4251dc7ec7
parent3c928a70f4f02a9427e6c41f68e560d1da5b033a
IDE: Make taskfile interface more robust wrt unexpected end-of-command

Now that we handle all the special commands using REQ_TYPE_ATA_TASKFILE
rather than using the old REQ_TYPE_ATA_CMD model, we need to also
emulate the lack of full taskfile data that comes with the old command
model (ie when commands are generated with the HDIO_DRIVE_CMD ioctl
rather than using the HDIO_DRIVE_TASK[FILE] ioctls).

In particular, this means that we should handle command completion the
more relaxed way that the old drive_cmd_intr() code did.  It allows
commands to finish early even if they don't use up all the data that we
thought we had for them.

This fixes a regression seen by Anders Eriksson where some SMART
commands sent by smartd would cause a boot-time system hang on his
machine because the IDE command handling code didn't realize that the
command had completed.

Tested-by: Anders Eriksson <aeriksson@fastmail.fm>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Ingo Molnar <mingo@elte.hu>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/ide/ide-taskfile.c