public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Hannes Reinecke <hare@novell.com>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: Buggy Firewire bridge 'Prolific PL3507'
Date: Tue, 08 Jan 2008 20:32:03 +0100	[thread overview]
Message-ID: <4783CFB3.7030108@s5r6.in-berlin.de> (raw)
In-Reply-To: <20080108182205.GG16309@parisc-linux.org>

Matthew Wilcox wrote:
> According to SPC4r05a, READ CAPACITY(10) (opcode 25) is Mandatory for D,
> W and O.  READ CAPACITY (opcode 25) is Optional for R.  READ CARD
> CAPACITY (also opcode 25) is Mandatory for K.
[...]
> According to this table (D.2 for anyone following along at home), RBC
> devices are not supposed to implement it.

RBC (last draft in 1999, last amendment in 2003) and SPC4 (last draft in
2007) are in contradiction in this regard.  It looks like an error in
SPC4 to me.

[...]
> It would be thoroughly inappropriate to put this workaround in the
> midlayer.  sbp2 isn't a good place either, but it's better than
> sg/sd/scsi_ioctl/...

Three workarounds are possible, all of them work at the command set level:
  - Inject READ CAPACITY after INQUIRY.
  - Don't let INQUIRY through to the device (except the kernel's initial
    one) and return synthesized inquiry data to the application.
  - Don't issue INQUIRY at all (except the kernel's initial one).

*None* of these workarounds belongs into SCSI midlayer nor into anything
below it.  Most certainly not into the SBP-2 transport layer.  If at
all, the SBP-2 layer could contain a detection of affected firmwares,
but not the workaround itself.

Since userspace is issuing the problematic commands, one /might/ think
about implementing the workaround directly at the kernel's userspace
interface.  You could think of it as a filter then.  If you don't like
such a filtering, leave the workaround to userspace.  And the latter is
IMO most preferrable, like James already wrote:  Don't let hald issue
INQUIRY in the first place.
-- 
Stefan Richter
-=====-==--- ---= -=---
http://arcgraph.de/sr/

      reply	other threads:[~2008-01-08 19:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-08 13:43 Buggy Firewire bridge 'Prolific PL3507' Hannes Reinecke
2008-01-08 14:01 ` Matthew Wilcox
2008-01-08 17:56   ` Stefan Richter
2008-01-08 18:10     ` James Bottomley
2008-01-08 20:00       ` maximilian attems
2008-01-08 20:10       ` David Zeuthen
2008-01-08 20:25         ` David Zeuthen
2008-01-08 18:22     ` Matthew Wilcox
2008-01-08 19:32       ` Stefan Richter [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=4783CFB3.7030108@s5r6.in-berlin.de \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=hare@novell.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthew@wil.cx \
    /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