On 10/12/21 7:49 AM, Yanling Song wrote:
On Mon, 11 Oct 2021 12:54:20 -0700
Bart Van Assche <bvanassche@xxxxxxx> wrote:
On 9/29/21 20:47, Yanling Song wrote:
+#define SPRAID_IOCTL_RESET_CMD _IOWR('N', 0x80, struct
spraid_passthru_common_cmd) +#define SPRAID_IOCTL_ADMIN_CMD
_IOWR('N', 0x41, struct spraid_passthru_common_cmd)
Do these new ioctls provide any functionality that is not yet
provided by SG_IO + SG_SCSI_RESET_BUS?
These new ioctls are developed to manage our raid controller by our
private tools, which has no sg device. so SG_IO cannot work for our
case.
Why won't an SG device be associated with spraid device nodes? My
understanding is that an SG device is associated with every SCSI device
if CONFIG_CHR_DEV_SG is enabled and also that a bsg device is associated
with every SCSI device if CONFIG_BLK_DEV_BSG is enabled.
Why is it that SG_IO is not sufficient? This is something that should
have been explained in the patch description.
Additionally, mixing driver-internal and user space definitions in a
single header file is not OK. Definitions of data structures and
ioctls that are needed by user space software should occur in a
header file in the directory include/uapi/scsi/.
Sounds reasonable. But after checking the directory include/uapi/scsi/,
there are only several files in it. It is expected that there should be
many files if developers follow the rule. Do you know why?
If this rule is not followed, that will be a red flag for the SCSI
maintainer and something that will probably delay upstream acceptance of
this patch.
Bart.