New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix CTL GET EVENT STATUS NOTIFICATION valid bits #1201
Conversation
So this one was fun to track down... Glad I spent a fair amount of time downloading the scsi specs ages ago... gotta go look for mmc5 and mmc6 it turns out... |
3112c78
to
0d90873
Compare
I've adjusted the PR based on your input. |
@hpvb I'm sorry, but I don't see the changes. |
0d90873
to
536444f
Compare
I forgot at git add the file when I amended the commit. Sorry! Fixed. |
@@ -1227,7 +1227,7 @@ const struct ctl_cmd_entry ctl_cmd_table[256] = | |||
CTL_CMD_FLAG_ALLOW_ON_PR_RESV | | |||
CTL_FLAG_DATA_IN, | |||
CTL_LUN_PAT_NONE, | |||
10, {0x02, 0x01, 0, 0, 0, 0xff, 0xff, 0xff, 0x07}}, | |||
10, {0xe1, 0, 0, 0x7e, 0, 0x0, 0xff, 0xff, 0xc7}}, | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This style checker message is a bit too zealous.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good, but will defer to mav@ on the details since my ctl fu is still weak.
536444f
to
7902ae1
Compare
Linux as an initiator periodically sends the following to SCSI cdrom devices: 4a 01 00 00 10 00 00 00 08 00 According to the ctl_cmd_entry for this command this is invalid which leads to a lot of failed SCSI commands. The mask in this commit is based off of the t10 spec available here: https://www.t10.org/ftp/t10/document.97/97-108r0.pdf And @bsdimp's research. This solves the issue with Linux initiators. Signed-off-by: HP van Braam <hp@tmm.cx>
7902ae1
to
aa9d49d
Compare
Landed with tweaked commit message to spell out what my research is / was. |
Linux as an initiator periodically sends the following to SCSI cdrom devices: 4a 01 00 00 10 00 00 00 08 00 According to the ctl_cmd_entry for this command this is invalid which leads to a lot of failed SCSI commands. The mask in this commit is based off of an early draft of the mmc standard, https://www.t10.org/ftp/t10/document.97/97-108r0.pdf, as well as subsequent standards (mmc2 through mmc6). This solves the issue with Linux initiators. Signed-off-by: HP van Braam <hp@tmm.cx> Reviewed by: imp, mav Pull Request: #1201
Linux as an initiator periodically sends the following to SCSI cdrom devices: 4a 01 00 00 10 00 00 00 08 00
According to the ctl_cmd_entry for this command this is invalid which leads to a lot of failed SCSI commands.
The mask in this commit is based off of the t10 spec available here: https://www.t10.org/ftp/t10/document.97/97-108r0.pdf
And @bsdimp's research.
This solves the issue with Linux initiators.