Re: [patch 13/17] scsi: remove private implementation of get_unaligned_be32

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

 



On Wed, 2008-10-29 at 18:03 -0700, Harvey Harrison wrote: 
> +/*
> + * Opcode 0x28
> + */
> +struct scsi_read10 {
> +	u8 op;
> +	u8 flags;
> +	__be32 lba;
> +	u8 pad; /* reserved */
> +	__be16 length;
> +	u8 control;
> +} __packed;
> +
> +/*
> + * Opcode 0xa8
> + */
> +struct scsi_read12 {
> +	u8 op;
> +	u8 flags;
> +	__be32 lba;
> +	__be32 length;
> +	u8 pad; /* reserved */
> +	u8 control;
> +} __packed;
> +
> +/*
> + * Opcode 0x88
> + */
> +struct scsi_read16 {
> +	u8 op;
> +	u8 flags;
> +	__be64 lba;
> +	__be32 length;
> +	u8 pad; /* MMC4, reserved, group number */
> +	u8 control;
> +} __packed;

OK, so this is wrong: the commands, unfortunately, have several meanings
for the bits depending on the version of the spec.  Also, it's not
really the way the mid-layer thinks about commands.  We tend to use the
generic groupings there.  Finally, this looks pretty ugly and it would
get really horrible if we had to do unions for the bits as they changed
meanings through the standards.

So all in all, to try to solve a problem which doesn't really exist, I
don't really think its a good idea.  There's no evidence of any
confusion caused by the SCSI bus being BE in any of the drivers.

James


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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