hreinecke / sg3_utils

Deprecated git-svn mirror for sg3_utils
http://sg.danny.cz/sg/sg3_utils.html
Other
154 stars 91 forks source link

sg_raw with Maintenance Out and PROTOCOL_OUT_SEVICE_ACTION (0x10) returns illegal request #64

Closed Sushma-Subramanya closed 1 year ago

Sushma-Subramanya commented 3 years ago

Running sg_raw version - 0.4.6 on CentOS 7.8.2003

sg_raw to send maintenance out command returns Illegal Request.

[root@BaseOS bin]# sg_raw -s 8 -vvvvvv /dev/sg7 a4 10 fa 00 00 00 00 00 00 08 00 00 found bsg_major=249 open /dev/sg7 with flags=0x802 cdb to send: a4 10 fa 00 00 00 00 00 00 08 00 00 Command name: Management protocol out encl show SCSI Status: Check Condition

Sense Information: Fixed format, current; Sense key: Illegal Request Additional sense: Invalid command operation code Raw sense data (in hex): 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00

Other commands like - Inquiry, ReadBuffer sent through sg_raw go through without any issues.

doug-gilbert commented 3 years ago

If I execute that command, sg_raw hangs, waiting for those 8 bytes of data promised by '-s 8'. After I provide those an error message (just like the above) tells me that my target (a scsi_debug virtual device) doesn't support that command. Do you know for a fact that /dev/sg7 supports that command?

hreinecke commented 1 year ago

Yep. If the drive says 'illegal request' it means the command is not supported. Nothing we can do here.