mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Mohr <andim2@users.sourceforge.net>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: andi@lisas.de, Bodo Eggert <7eggert@gmx.de>,
	Andrew Morton <akpm@osdl.org>,
	linux-usb-devel@lists.sourceforge.net, gregkh@suse.de,
	linux-kernel@vger.kernel.org, hal@lists.freedesktop.org,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [linux-usb-devel] USB/hal: USB open() broken? (USB CD burner underruns, USB HDD hard resets)
Date: Wed, 21 Jun 2006 21:16:41 +0200	[thread overview]
Message-ID: <20060621191640.GA8596@rhlx01.fht-esslingen.de> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0606211501290.8272-100000@iolanthe.rowland.org>

Hi,

On Wed, Jun 21, 2006 at 03:02:44PM -0400, Alan Stern wrote:
> On Wed, 21 Jun 2006, Andreas Mohr wrote:
> 
> > Maybe it's better to (additionally?) go down the route of fixing up
> > low-level communication weaknesses (since it's been semi-confirmed that it's
> > an USB communication issue, see other thread part).
> > IMHO this is a severe user experience issue that shouldn't be fixed up
> > ("covered", "hidden") by the O_EXCL thingy alone.
> 
> It's not a USB issue; it's a matter of lack of coordination between the sg 
> and sr drivers.  Each is unaware of the actions of the other, even when 
> they are speaking to the same device.

Right, I could have expressed it much better before, sorry.

Found the relevant code:
sd.c sd_open()

        if (!sdkp->openers++ && sdev->removable) {
                if (scsi_block_when_processing_errors(sdev))
                        scsi_set_medium_removal(sdev, SCSI_REMOVAL_PREVENT);
        }

And the obvious question would be whether the sdkp->openers++ thingy
could somehow be extended to enclose all hardware device users so that
e.g. sr.c wouldn't send ALLOW_MEDIUM_REMOVAL on a device already locked
by e.g. the sd.c driver.
Difficult question, though, since the group of drivers possible to use
with a certain device is not a static set:
it could be via
- sr.c
- sd.c
- IDE (in the case of ATA devices mapped via ide-scsi)
- ???

Is it possible to have such a per-*hardware*-device instance in the kernel
to keep track of various things such as number of device openers?
I'll do some investigation myself, too...

Thanks!

Andreas Mohr

  reply	other threads:[~2006-06-21 19:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <6pnj7-32Q-7@gated-at.bofh.it>
     [not found] ` <6pJWg-34g-5@gated-at.bofh.it>
     [not found]   ` <6pKfL-3sx-29@gated-at.bofh.it>
     [not found]     ` <6pKpl-3Sx-23@gated-at.bofh.it>
     [not found]       ` <6pLll-5iq-15@gated-at.bofh.it>
2006-06-21  0:07         ` Bodo Eggert
2006-06-21 10:53           ` Alan Cox
2006-06-21 16:16             ` Bodo Eggert
2006-06-21 16:34               ` Andreas Mohr
2006-06-21 19:02                 ` Alan Stern
2006-06-21 19:16                   ` Andreas Mohr [this message]
2006-06-21 19:56                     ` Alan Stern
2006-06-21 20:38                     ` Bodo Eggert
2006-06-21 20:37                   ` Alan Cox
2006-06-19  8:21 Andreas Mohr
2006-06-20  8:37 ` Andrew Morton
2006-06-20  9:06   ` [linux-usb-devel] " Alan Cox
2006-06-20  9:05     ` Andreas Mohr
2006-06-20 10:18       ` Alan Cox
2006-06-20 14:22       ` Alan Stern
2006-06-21  9:33         ` Andreas Mohr
2006-06-21 16:15           ` Alan Stern
2006-06-21 16:44             ` Andreas Mohr
2006-06-21 19:06               ` Alan Stern
2006-06-21 20:52                 ` Alan Cox

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=20060621191640.GA8596@rhlx01.fht-esslingen.de \
    --to=andim2@users.sourceforge.net \
    --cc=7eggert@gmx.de \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andi@lisas.de \
    --cc=gregkh@suse.de \
    --cc=hal@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=stern@rowland.harvard.edu \
    /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

all inboxes | Powered by JetHome®