]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
SCSI: sr: fix corrupt CD data after media change and delay
authorJames Bottomley <James.Bottomley@HansenPartnership.com>
Wed, 18 Jun 2008 23:15:14 +0000 (23:15 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 22 Jun 2008 05:24:56 +0000 (22:24 -0700)
commitc4330cd3988243eecf7dac3b495553beffc08c72
tree40491c6fb4e9343973205c4975d493623500c905
parent74df319e678985491d0626e590093789d38daca4
SCSI: sr: fix corrupt CD data after media change and delay

commit: d1daeabf0da5bfa1943272ce508e2ba785730bf0 upstream

Reported-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
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.

Reported-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Tested-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/scsi/sr.c