All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: linux-scsi@vger.kernel.org, Don Brace <don.brace@pmcs.com>,
	iss_storagedev@hp.com, storagedev@pmcs.com,
	Adam Radford <linuxraid@lsi.com>,
	Kashyap Desai <kashyap.desai@avagotech.com>,
	Sumit Saxena <sumit.saxena@avagotech.com>,
	Uday Lingala <uday.lingala@avagotech.com>,
	megaraidlinux.pdl@avagotech.com
Subject: Re: [PATCH 0/7] scsi: Fix transfer length 0 for 6-byte r/w commands
Date: Sat, 16 May 2015 09:46:10 -0700	[thread overview]
Message-ID: <1431794770.2181.7.camel@HansenPartnership.com> (raw)
In-Reply-To: <1431760673-7180-1-git-send-email-akinobu.mita@gmail.com>

On Sat, 2015-05-16 at 16:17 +0900, Akinobu Mita wrote:
> For 6-byte r/w commands, transfer length 0 means 256 blocks of data,
> not 0 block.
> 
> But some drivers consider transfer length 0 as 0 block.
> Fortunately, the scsi disk driver sets up 10-byte r/w commands for
> 256 blocks of data instead of 6-byte r/w commands.  So this could be
> an issue when SCSI commands are issued by SG_IO ioctl.

6-byte commands are obsolete, so there's not a lot of point in doing
this; however, in the early days of SCSI, there was considerable
confusion about what 0 transfer length meant (I think it wasn't until
SCSI-2 that it was clarified).  Even today, USB drive manufacturers have
considerable difficulty with it, that's why the sd driver avoids it, as
would any sensible program doing sg_io.

James



      parent reply	other threads:[~2015-05-16 16:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-16  7:17 [PATCH 0/7] scsi: Fix transfer length 0 for 6-byte r/w commands Akinobu Mita
2015-05-16  7:17 ` [PATCH 1/7] hpsa: fix " Akinobu Mita
2015-05-16  7:17 ` [PATCH 2/7] 3w-xxxx: " Akinobu Mita
2015-05-16  7:17 ` [PATCH 3/7] 3w-9xxx: " Akinobu Mita
2015-05-16  7:17 ` [PATCH 4/7] scsi: trace: " Akinobu Mita
2015-05-16  7:17 ` [PATCH 5/7] staging: rts5208: " Akinobu Mita
2015-05-16  7:17 ` [PATCH 6/7] megaraid_mbox: " Akinobu Mita
2015-05-16  7:17 ` [PATCH 7/7] megaraid: " Akinobu Mita
2015-05-16 16:46 ` 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=1431794770.2181.7.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=akinobu.mita@gmail.com \
    --cc=don.brace@pmcs.com \
    --cc=iss_storagedev@hp.com \
    --cc=kashyap.desai@avagotech.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxraid@lsi.com \
    --cc=megaraidlinux.pdl@avagotech.com \
    --cc=storagedev@pmcs.com \
    --cc=sumit.saxena@avagotech.com \
    --cc=uday.lingala@avagotech.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.