linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: brking@us.ibm.com
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
	linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH 1/2] scsi: Add scsi_device max_cmd_len (resend)
Date: Fri, 28 Apr 2006 17:32:37 -0400	[thread overview]
Message-ID: <445289F5.6070608@pobox.com> (raw)
In-Reply-To: <44528508.3060003@us.ibm.com>

Brian King wrote:
> James Bottomley wrote:
>> On Fri, 2006-04-28 at 14:03 -0500, Brian King wrote:
>>>> Perhaps you could tell me what the actual failure case is?  
>>> I don't have any data on how ATA/ATAPI devices respond if they receive
>>> too large of a CDB, but my guess is they probably don't react nicely.
>>> Today libata uses the hosts's max_cmd_len for some protection against
>>> this, I was merely trying to continue with a similar level of
>>> protection in my new usage of libata.
>> But how would they receive too large a CDB?  
> 
> I suppose the only real exposure then would be someone doing passthru
> commands in which we could argue that userspace should be smart enough
> not to do things like this.
> 
> Going along with that argument, there's really no good reason for
> libata to be playing games with scsi_host->max_cmd_len based on
> the attached devices.

If both host controller and device support 16-byte CDB, it should not be 
limited to 12 bytes.

libata is not "playing games", just exporting what the hardware supports 
as best the API allows.  It needs to support 16-byte CDBs for the same 
reason any SCSI LLDD supports 16-byte CDBs.

Remember ATAPI<->SCSI bridges exist, thus any SCSI disk can appear 
attached to ATAPI.

	Jeff




  parent reply	other threads:[~2006-04-28 21:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-17 22:40 [PATCH 1/2] scsi: Add scsi_device max_cmd_len (resend) Brian King
2006-04-17 22:48 ` [PATCH 2/2] libata: Use " Brian King
2006-04-17 22:52   ` Jeff Garzik
2006-04-18 14:01     ` Brian King
2006-04-28 14:28 ` [PATCH 1/2] scsi: Add " Brian King
2006-04-28 15:17   ` James Bottomley
2006-04-28 17:47     ` Luben Tuikov
2006-04-28 18:19     ` Brian King
2006-04-28 18:30       ` James Bottomley
2006-04-28 19:03         ` Brian King
2006-04-28 20:56           ` James Bottomley
2006-04-28 21:11             ` Brian King
2006-04-28 21:21               ` James Bottomley
2006-04-28 21:32               ` Jeff Garzik [this message]
2006-04-28 21:43                 ` Brian King
2006-04-28 21:54                 ` James Bottomley
2006-04-28 17:28   ` Luben Tuikov
2006-04-28 18:16     ` Brian King

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=445289F5.6070608@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=brking@us.ibm.com \
    --cc=linux-ide@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).