public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Matthew Wilcox <matthew@wil.cx>,
	Hannes Reinecke <hare@novell.com>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>,
	David Zeuthen <david@fubar.dk>
Subject: Re: Buggy Firewire bridge 'Prolific PL3507'
Date: Tue, 08 Jan 2008 12:10:47 -0600	[thread overview]
Message-ID: <1199815847.3534.49.camel@localhost.localdomain> (raw)
In-Reply-To: <4783B93B.70307@s5r6.in-berlin.de>

On Tue, 2008-01-08 at 18:56 +0100, Stefan Richter wrote:
> Matthew Wilcox wrote:
> > On Tue, Jan 08, 2008 at 02:43:34PM +0100, Hannes Reinecke wrote:
> >> 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?
> 
> It's hald or something like that.

Not to hijack the thread, but this is getting to be a broken record.  I
was dealing only a few days ago with a camera presenting as a mass
storage device that was then crashing and going offline.  I looked at
the dmesg trace which showed that the SCSI layer completes its probing
successfully, and said it was some other extraneous command issued from
user level causing the crash.  Sure enough, stopping hald fixed the
camera so it functioned as a mass storage device properly.  The bug
report is here:

https://bugs.launchpad.net/ubuntu/+source/hal/+bug/180472

What is the point of having SCSI be so careful in its probing and setup
so as not to annoy these devices, and then have hald or another standard
component blithely go and wreck the device by issuing unwarranted SCSI
commands?

Can we please stop hald from issuing SCSI commands ... we should have
the infrastructure in place now that renders this unnecessary ... unless
there's still some information it needs that we're not providing?

James



  reply	other threads:[~2008-01-08 18:10 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 [this message]
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=1199815847.3534.49.camel@localhost.localdomain \
    --to=james.bottomley@hansenpartnership.com \
    --cc=david@fubar.dk \
    --cc=hare@novell.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=stefanr@s5r6.in-berlin.de \
    /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