public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Hannes Reinecke <hare@novell.com>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: Buggy Firewire bridge 'Prolific PL3507'
Date: Tue, 8 Jan 2008 07:01:51 -0700	[thread overview]
Message-ID: <20080108140151.GD16309@parisc-linux.org> (raw)
In-Reply-To: <47837E06.5080406@novell.com>

On Tue, Jan 08, 2008 at 02:43:34PM +0100, Hannes Reinecke wrote:
> Hi all,
> 
> I have here a buggy firewire bridge (Prolific PL3507) which requires that each 'INQUIRY' command is followed by a 'READ CAPACITY' command. Otherwise any read will return invalid data (the payload is preceded by 36 empty bytes).
> 
> How to fix this? Sure one could add a hack to sbp2.c to always issue a READ CAPACITY after INQUIRY, but this somehow feels wrong ...

There's only one place in the scsi stack that issues INQUIRY --
scsi_scan.c [1].  sd is going to issue READ CAPACITY before it issues
any READ commands, so I don't see where you're having this problem.
Is it with some program issuing INQUIRY through SG_IO or something?

I have a hard time thinking this needs to be handled generically
because READ CAPACITY isn't in the Primary Command Set, unlike INQUIRY.
It's mandatory for SBC devices to implement it, but other devices
shouldn't even implement it.

My opinion is that it needs to be handled either in the application
issuing sg commands or in sbp2.

[1] yes, there are others, such as drivers and scsi_transport_spi, but
none relevant to sbp2.

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

  reply	other threads:[~2008-01-08 14:01 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 [this message]
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

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=20080108140151.GD16309@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=hare@novell.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