]> www.infradead.org Git - users/sagi/nvme-cli.git/commit
nvme: Fix error when passthru does not match opcode based flags
authorSteven Seungcheol Lee <sc108.lee@samsung.com>
Tue, 12 Apr 2022 05:45:46 +0000 (14:45 +0900)
committerSteven Seungcheol Lee <sc108.lee@samsung.com>
Fri, 22 Apr 2022 03:05:44 +0000 (12:05 +0900)
commit3a7c07b2370810fe6ef04c5566345806da796014
tree533bb3443d90e4fb7899cd680bd419c05d1f1252
parentea7329419afaa1d07c1b102120f64a1c9db49b5f
nvme: Fix error when passthru does not match opcode based flags

when write option is set(but opcode is not), file should open with read flag
same for read
it occur 'Bad file descriptor' error when access the file

write & read flags are set by opcode as well
Spec mentioned below about opcode(01:00 Data Transfer)
All options to the command shall transfer data as specified or transfer no data.
All commands, including vendor specific commands
01b = host to controller; 10b = controller to host

Reported-by: Kyungsik Shin <ks1012.shin@samsung.com>
Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
nvme.c