Commit 44da1f96 authored by Russell Harmon's avatar Russell Harmon Committed by Wen Zhiwei
Browse files

hwmon: (drivetemp) Set scsi command timeout to 10s

stable inclusion
from stable-v6.6.75
commit 85af156e158c4cbe606432a4ee719d7048da74dd
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IBSPQB

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=85af156e158c4cbe606432a4ee719d7048da74dd



--------------------------------

[ Upstream commit b46ba47d7bb461a0969317be1f2e165c0571d6c5 ]

There's at least one drive (MaxDigitalData OOS14000G) such that if it
receives a large amount of I/O while entering an idle power state will
first exit idle before responding, including causing SMART temperature
requests to be delayed.

This causes the drivetemp request to exceed its timeout of 1 second.

Signed-off-by: default avatarRussell Harmon <russ@har.mn>
Link: https://lore.kernel.org/r/20250115131340.3178988-1-russ@har.mn


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarWen Zhiwei <wenzhiwei@kylinos.cn>
parent 4d04ecae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -194,7 +194,7 @@ static int drivetemp_scsi_command(struct drivetemp_data *st,
	scsi_cmd[14] = ata_command;

	err = scsi_execute_cmd(st->sdev, scsi_cmd, op, st->smartdata,
			       ATA_SECT_SIZE, HZ, 5, NULL);
			       ATA_SECT_SIZE, 10 * HZ, 5, NULL);
	if (err > 0)
		err = -EIO;
	return err;