public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-scsi@vger.kernel.org
Subject: Re: [patch 13/17] scsi: remove private implementation of get_unaligned_be32
Date: Thu, 30 Oct 2008 09:17:22 -0500	[thread overview]
Message-ID: <1225376242.3250.19.camel@localhost.localdomain> (raw)
In-Reply-To: <1225328584.5496.7.camel@brick>

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



      reply	other threads:[~2008-10-30 14:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-29 21:24 [patch 13/17] scsi: remove private implementation of get_unaligned_be32 akpm
2008-10-29 21:48 ` James Bottomley
2008-10-29 22:07   ` Andrew Morton
2008-10-29 22:13     ` James Bottomley
2008-10-29 22:29       ` Harvey Harrison
2008-10-30  1:03         ` Harvey Harrison
2008-10-30 14:17           ` James Bottomley [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1225376242.3250.19.camel@localhost.localdomain \
    --to=james.bottomley@hansenpartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=harvey.harrison@gmail.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox