sd.c
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 7 lines
(quoted diff) +0
-3@@ -809,9 +809,22 @@ if (media_not_present(sdkp, SRpnt)) return; - /* Look for devices that return NOT_READY. - * Issue command to spin up drive for these cases. */ - if (the_result && SRpnt->sr_sense_buffer[2] == NOT_READY) {
Review line 821
Quoted 10 lines
(quoted diff) +10
-0+ if (the_result == 0) + break; /* all is well now */ + + /* + * If manual intervention is required, or this is an + * absent USB storage device, a spinup is meaningless. + */ + if (SRpnt->sr_sense_buffer[2] == NOT_READY && + SRpnt->sr_sense_buffer[12] == 4 /* not ready */ && + SRpnt->sr_sense_buffer[13] == 3)
Why is this not inside media_not_present?
Review line 823
Quoted 2 lines
(quoted diff) +2
-0+/* + * sd_read_cache_type - called only from sd_init_onedisk()
Was it necessary to move and change sd_read_cache_type simultaneously? Makes a joke of the diff.
Review line 827
Quoted 4 lines
(quoted diff) +4
-0+ /* without media there is no reason to ask; + moreover, some devices react badly if we do */ + if (sdkp->media_present) + sd_read_cache_type(sdkp, disk->disk_name, SRpnt, buffer);
Hmm... cautiously ok.
-- Pete