@@ -4537,7 +4537,8 @@ unsigned int ata_dev_set_feature(struct ata_device *dev, u8 enable, u8 feature)
tf.protocol = ATA_PROT_NODATA;
tf.nsect = feature;
- err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0);
+ err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0,
+ enable == SETFEATURES_SPINUP ? SETFEATURES_SPINUP_TIMEOUT : 0);
DPRINTK("EXIT, err_mask=%x\n", err_mask);
return err_mask;
@@ -371,6 +371,7 @@ enum {
SETFEATURES_AAM_OFF = 0xC2,
SETFEATURES_SPINUP = 0x07, /* Spin-up drive */
+ SETFEATURES_SPINUP_TIMEOUT = 30000,
SETFEATURES_SATA_ENABLE = 0x10, /* Enable use of SATA feature */
SETFEATURES_SATA_DISABLE = 0x90, /* Disable use of SATA feature */