Re: [PATCH 21/24] scsi: consolidate the START STOP UNIT handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/11/21 10:48 PM, Christoph Hellwig wrote:
+	char cdb[MAX_COMMAND_SIZE] = { };

How about using 'u8' instead of 'char'?

Additionally, MAX_COMMAND_SIZE equals 16. According to SBC-4 6 bytes is enough for the START STOP UNIT command.

+	cdb[0] = START_STOP;
+	cdb[4] = data;

Please combine the above two statements with the cdb[] declaration into a single line.

Additionally, please split data into two arguments to make calls of this function easier to read. This is what I found in SBC-4:
* bit 1 of byte 4 has the name LOEJ (load eject).
* bit 0 of byte 4 has the name START (start unit).

Thanks,

Bart.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux