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)
commitd1ad4ea331e78a5ff90eda7718da31bcbc1a9c38
tree4f12208aa12a3cb2ccf066862474f7ef0ed0f999
parent14acdcd32160767d7f2fa00803d2d764d3e3373a
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