From: Tejun Heo Date: Thu, 9 Dec 2010 10:18:42 +0000 (+0100) Subject: scsi: fix TUR error handling in sr_media_change() X-Git-Tag: v2.6.38-rc1~231^2^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=638428ece619495edc9579b1e21493eb00f9687c;p=pandora-kernel.git scsi: fix TUR error handling in sr_media_change() sr_test_unit_ready() returns 0 iff TUR succeeded - IOW, when media is present and the device is actually ready, so the return value wouldn't be zero when TUR ends with sense data. sr_media_change() incorrectly tests (retval || (scsi_sense_valid(sshdr)...)) when it tries to test whether TUR failed without sense data or with sense data indicating media-not-present. Fix the test using scsi_status_is_good() and update comments. - Fixed a comment typo spotted by Eike. Signed-off-by: Tejun Heo Cc: Rolf Eike Beer Signed-off-by: Jens Axboe --- Reading git-diff-tree failed