Fix REPORT SUPPORTED OPCODES
PATCH 1/1 Fix REPORT SUPPORTED OPCODES
List, Tomo
Please find a small patch that fixes REPORT SUPPORTED OPCODES so that we only return those opcoes that the backend supports.
For example, for the non-RDWR backends, don't claim we support UNMAP or WRITESAME10/16 or other more exotic opcodes.
regards
ronnie sahlberg
PATCH 1/1 REPORT SUPPORTED OPCODES: Only return opcodes supported by the backend.
--- usr/spc.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
usr/spc.c +6 -0
@@ -739,6 +739,9 @@ static int report_opcodes_all(struct scsi_cmd *cmd, int rctd,if (ops[i].cmd_perform == spc_illegal_op)continue ; +if (!is_bs_support_opcode (cmd->dev->bst, i)) +continue ; +/* this command does not take a service action, so just report the opcode */
@@ -826,6 +829,9 @@ static int report_opcode_one(struct scsi_cmd *cmd, int rctd, uint8_t opcode, ops = cmd->dev->dev_type_template.ops; +if (!is_bs_support_opcode (cmd->dev->bst, opcode)) +return SAM_STAT_CHECK_CONDITION ; +if ((is_service_action && !ops[opcode].service_actions) || (!is_service_action && ops[opcode].service_actions)) {return SAM_STAT_CHECK_CONDITION ;
Signature · 1 line
1.7.3.1
FUJITA Tomonori
AppliedRe: [PATCH] REPORT SUPPORTED OPCODES: Only return opcodes supported by the backend.
Quoted 4 lines · On Sun, 24 Nov 2013 15:02:33 -0800 Ronnie Sahlberg <[email protected]>…
Signed-off-by Ronnie Sahlberg <[email protected]>--- usr/spc.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
Applied, thanks.
You still have a pending patch related with this opcode stuff?
Re: [PATCH] REPORT SUPPORTED OPCODES: Only return opcodes supported by the backend.
Quoted 11 lines · FUJITA Tomonori
Quoted 4 lines · On Sun, 24 Nov 2013 15:02:33 -0800 Ronnie Sahlberg <[email protected]>…
Signed-off-by Ronnie Sahlberg <[email protected]>--- usr/spc.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)Applied, thanks.
You still have a pending patch related with this opcode stuff?
I dont have any more patches right now, but I plan to send you patches to add an opcode list to all the other backends in a few days.
Re: [PATCH] REPORT SUPPORTED OPCODES: Only return opcodes supported by the backend.
Quoted 10 lines · On Sun, 24 Nov 2013 15:17:35 -0800 ronnie sahlberg <[email protected]>…
Quoted 8 lines · FUJITA Tomonori
Quoted 4 lines · On Sun, 24 Nov 2013 15:02:33 -0800 Ronnie Sahlberg <[email protected]>…
Signed-off-by Ronnie Sahlberg <[email protected]>--- usr/spc.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
Quoted 6 lines
Quoted 3 lines
Applied, thanks.
You still have a pending patch related with this opcode stuff?
I dont have any more patches right now, but I plan to send you patches to add an opcode list to all the other backends in a few days.
Nice, thanks in advance.