Re: [PATCH 05/44] NCR5380: Move the SCSI pointer to private command data

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

 



On 1/31/22 14:39, Finn Thain wrote:
Regarding code style, this is legacy code i.e. it pre-dates the ban on
mixed letter case. (I'm using the word legacy after the dictionary
definition and not as a kind of weasel word intended to mean deprecated.)

Mixed case names like "BAZ5000_cmd" would be frowned upon for new code but
this is not new code. So why not just use the name SCp for variables which
serve the same purpose that the SCp struct did?

IOW, I would prefer to read the following, because SCp presumably means
"Scsi Command Private data" whereas "scsi_pointer" means nothing to me.

Changing the struct member name "scsi_pointer" back into "SCp" in this driver is fine with me. In case this wouldn't be clear: I think the name "SCSI pointer" refers to a section in the SCSI-II standard. From the SCSI-II standard: "6.4 SCSI pointers Consider the system shown in figure 17 in which an initiator and target communicate on the SCSI bus in order to execute an I/O process. The SCSI architecture provides for a set of three pointers for each I/O process, called the saved pointers. The set of three pointers consist of one for the command, one for the data, and one for the status. When an I/O process becomes active, its three saved pointers are copied into the initiator’s set of three current pointers. There is only one set of current pointers in each initiator. The current pointers point to the next command, data, or status byte to be transferred between the initiator’s memory and the target. The saved and current pointers reside in the initiator. The saved command pointer always points to the start of the command descriptor block (see 7.2) for the I/O process. The saved status pointer always points to the start of the status area for the I/O process. The saved data pointer points to the start of the data area until the target sends a SAVE DATA POINTER message (see 6.6.20) for the I/O process."

I think the above quote shows that the contents of struct scsi_pointer has been derived directly from the SCSI-II specification.

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