https://github.com/torvalds/linux
Revision 32c356d76d7e13dcd0675189d8e9c64ef66aa561 authored by James Bottomley on 19 August 2008, 22:58:13 UTC, committed by James Bottomley on 23 October 2008, 16:41:16 UTC
On Tue, 12 Aug 2008 15:08:14 +0200
Giuliano Pochini <pochini@shiny.it> wrote:

> Fujitsu magneto-optical drive, Adaptec 29160 and
> Linux Jay 2.6.26 #7 SMP Sun Aug 10 18:34:22 CEST 2008 ppc 7455, altivec supported PowerMac3,6 GNU/Linux
>
> When I insert a disk and I mount it, scsi_test_unit_ready() is called and
> the do-while loop gets sshdr->sense_key == UNIT_ATTENTION in the first
> cycle and 0 in the second one. So the if below misses the UNIT_ATTENTION
> and sdev->changed = 1 is not executed. At this point bad things can
> happen... I'm not sure how to fix this. Any clue ?

The problem is essentially caused by us eating UNIT_ATTENTION
conditions in scsi_test_unit_ready().  Fix by updating the ->changed
flag when this happens if the media is removable.

[pochini@shiny.it: updates to tidy up patch]
Signed-off-by: Giuliano Pochini <pochini@shiny.it>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
1 parent 26e9a39
History
Tip revision: 32c356d76d7e13dcd0675189d8e9c64ef66aa561 authored by James Bottomley on 19 August 2008, 22:58:13 UTC
[SCSI] fix removable device inability to detect disk changes
Tip revision: 32c356d
File Mode Size
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
usr
virt
.gitignore -rw-r--r-- 867 bytes
.mailmap -rw-r--r-- 3.7 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 90.7 KB
Kbuild -rw-r--r-- 2.4 KB
MAINTAINERS -rw-r--r-- 101.4 KB
Makefile -rw-r--r-- 55.4 KB
README -rw-r--r-- 16.5 KB
REPORTING-BUGS -rw-r--r-- 3.1 KB

README

back to top