lkml.org 
[lkml]   [2003]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sd.c
> @@ -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) {
> + 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?

> +/*
> + * 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.

> + /* 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.034 / U:1.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site