From: James Bottomley Date: Tue, 10 Jun 2008 15:20:53 +0000 (-0500) Subject: [SCSI] sr: fix corrupt CD data after media change and delay X-Git-Tag: v2.6.26-rc7~17^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1daeabf0da5bfa1943272ce508e2ba785730bf0;p=pandora-kernel.git [SCSI] sr: fix corrupt CD data after media change and delay Reported-by: Geert Uytterhoeven If you delay 30s or more before mounting a CD after inserting it then the kernel has the wrong value for the CD size. http://marc.info/?t=121276133000001 The problem is in sr_test_unit_ready(): the function eats unit attentions without adjusting the sdev->changed status. This means that when the CD signals changed media via unit attention, we can ignore it. Fix by making sr_test_unit_ready() adjust the changed status. Tested-by: Geert Uytterhoeven Cc: Stable Tree Signed-off-by: James Bottomley --- Reading git-diff-tree failed