Skip to content
Commit 92227b8d authored by weiping zhang's avatar weiping zhang Committed by Martin K. Petersen
Browse files

scsi: scsi-sysfs: Adjust error returned for adapter reset request



If scsi_host_template->host_reset is NULL and the user requests an
adapter reset through

	echo adapter > /sys/class/scsi_host/hostx/host_reset

-EINVAL will be returned even though the "adapter" argument is perfectly
valid.

Change this so that we only return -EINVAL if the provided string is
invalid.  If the host does not implement a ->host_reset function we'll
return -EOPNOTSUPP.

[mkp: tweaked patch description]

Signed-off-by: default avatarweiping zhang <zhangweiping@didichuxing.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 085e5676
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment