Re: Odd behaviour of device in response to idleimmediate with unload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mark Lord wrote:
> Evgeni Golov wrote:
>> On Tue, 04 Nov 2008 13:13:16 -0500 Mark Lord wrote:
>>
>>> Okay, hdparm-9.3 is now out in the wild (sourceforge),
>>> and has  --idle-immediate and --idle-unload  flags now,
>>> so it can be used to help debug/test this problem.
>>
>> Okay, got it, built it.
>> Neither --idle-immediate nor --idle-immediate brings up the reset,
>> echo 1000 > /sys/block/sda/device/unload_heads does.
> ..
> 
> Mmmm.. okay, this is new stuff in 2.6.28,
> and it appears to just issue a --idle-unload equivalent after a delay.
> 
> But it does it from within libata-eh, so I suppose there must
> be some confusion in there somewhere.
> 
> So it's up to Tejun now, I suppose.

Hmmm... maybe garbage values in unused TF regs?

-- 
tejun
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 8077bdf..f0f3d11 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2649,7 +2649,7 @@ static void ata_eh_park_issue_cmd(struct ata_device *dev, int park)
 		tf.command = ATA_CMD_CHK_POWER;
 	}
 
-	tf.flags |= ATA_TFLAG_DEVICE | ATA_TFLAG_ISADDR;
+	tf.flags |= ATA_TFLAG_DEVICE | ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
 	tf.protocol |= ATA_PROT_NODATA;
 	err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0);
 	if (park && (err_mask || tf.lbal != 0xc4)) {

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux