--- zzzz-none-000/linux-2.6.32.61/drivers/scsi/sd.c 2013-06-10 09:43:48.000000000 +0000 +++ ar10-7272-687/linux-2.6.32.61/drivers/scsi/sd.c 2013-02-12 11:06:57.000000000 +0000 @@ -1217,22 +1217,31 @@ &sshdr, SD_TIMEOUT, SD_MAX_RETRIES, NULL); - /* - * 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; - + /* 20110524 AVM/WK FIX: Some devices find their media after some polling + ** more retries and no return here + */ + //if (media_not_present(sdkp, &sshdr)) { + // return; + //} if (the_result) sense_valid = scsi_sense_valid(&sshdr); retries++; - } while (retries < 3 && + } while (retries < 25 && (!scsi_status_is_good(the_result) || ((driver_byte(the_result) & DRIVER_SENSE) && sense_valid && sshdr.sense_key == UNIT_ATTENTION))); + /* 20110524 AVM/WK Move Code: Exit if still no media */ + /* + * 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)) { + sd_printk(KERN_NOTICE, sdkp, "Media Not Present\n"); + return; + } + if ((driver_byte(the_result) & DRIVER_SENSE) == 0) { /* no sense, TUR either succeeded or failed * with a status error */