Re: CDROM_SEND_PACKET oddity

From: Jens Axboe
Date: Sat Sep 27 2003 - 06:48:15 EST


On Fri, Sep 26 2003, Derek Foreman wrote:
> The example code from
> http://www.ussg.iu.edu/hypermail/linux/kernel/0202.0/att-0603/01-cd_poll.c
>
> Does not behave as expected on my 2.6.0-test5 system. While the command
> seems to be successfully sent - 2 of my drives report it as an invalid
> opcode - for the other 2 drives, the buffer comes back all zeros.
> (actually, the buffer's contents will remain in whatever state they're in
> before the ioctl is called)
>
> Sending the same command to those 2 drives with SG_IO results in the
> expected behaviour.

Can you try current -bk? It has some fixes for CDROM_SEND_PACKET.

However, cd_poll should be rewritten to use SG_IO. Pretty trivial
exercise.

--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/