]> git.baikalelectronics.ru Git - kernel.git/commit
USB: UB: Let cdrecord to see a device with media absent
authorPete Zaitcev <zaitcev@redhat.com>
Thu, 7 Sep 2006 23:54:22 +0000 (16:54 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 27 Sep 2006 18:58:57 +0000 (11:58 -0700)
commit4e7fb83115e68d9e37c385a10c6d333b0be19eb2
tree4f12208aa12a3cb2ccf066862474f7ef0ed0f999
parent4780e3bf866f9a48cefd2c74d48411717abb12a4
USB: UB: Let cdrecord to see a device with media absent

The command "cdrecord dev=/dev/uba x.iso" prints nasty garbage if a blank
is not in the drive. This happens because drivers have to set req->errors
separately from just returning zero uptodate with end_that_request_first,
end_that_request_last. These functions only set error in BIO, but sg_io()
ignores it.

Since we're on it, let cdrecord access a device when ->changed is set.
It's useful if someone wants to know device capabilities without burning
anything.

Signed-Off-By: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/block/ub.c