Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42418
b: refs/heads/master
c: b4d38e3
h: refs/heads/master
v: v3
  • Loading branch information
Alan Stern authored and James Bottomley committed Nov 15, 2006
1 parent a85d753 commit d93d8cd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3e082a910d217b2e7b186077ebf5a1126a68c62f
refs/heads/master: b4d38e38e66f8e1b32a1b1c00e533175314c8d56
16 changes: 8 additions & 8 deletions trunk/drivers/scsi/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,14 @@ sd_spinup_disk(struct scsi_disk *sdkp, char *diskname)
&sshdr, SD_TIMEOUT,
SD_MAX_RETRIES);

/*
* If the drive has indicated to us that it
* doesn't have any media in it, don't bother
* with any more polling.
*/
if (media_not_present(sdkp, &sshdr))
return;

if (the_result)
sense_valid = scsi_sense_valid(&sshdr);
retries++;
Expand All @@ -1059,14 +1067,6 @@ sd_spinup_disk(struct scsi_disk *sdkp, char *diskname)
((driver_byte(the_result) & DRIVER_SENSE) &&
sense_valid && sshdr.sense_key == UNIT_ATTENTION)));

/*
* If the drive has indicated to us that it doesn't have
* any media in it, don't bother with any of the rest of
* this crap.
*/
if (media_not_present(sdkp, &sshdr))
return;

if ((driver_byte(the_result) & DRIVER_SENSE) == 0) {
/* no sense, TUR either succeeded or failed
* with a status error */
Expand Down

0 comments on commit d93d8cd

Please sign in to comment.