public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Dharm <mdharm-kernel@one-eyed-alien.net>
To: Brent Baccala <baccala@freesoft.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	linux-usb-devel <linux-usb-devel@lists.sourceforge.net>
Subject: Re: Problem with usb-storage using HP 8200 external CD-ROM burner
Date: Mon, 6 Aug 2001 20:17:46 -0700	[thread overview]
Message-ID: <20010806201746.C6080@one-eyed-alien.net> (raw)
In-Reply-To: <3B68FB0C.5BC83115@freesoft.org> <20010806014626.K24225@one-eyed-alien.net> <3B6EF4DA.8899E1D3@freesoft.org>
In-Reply-To: <3B6EF4DA.8899E1D3@freesoft.org>; from baccala@freesoft.org on Mon, Aug 06, 2001 at 03:49:46PM -0400

[-- Attachment #1: Type: text/plain, Size: 1672 bytes --]

On Mon, Aug 06, 2001 at 03:49:46PM -0400, Brent Baccala wrote:
> Matthew Dharm wrote:
> > Of course, I'm interested in knowing how the command_abort function can be
> > made safe -- I think there are already patches in the 2.4.8 kernel which
> > should fix the cause of this function getting called.
> > 
> > Any ideas on how to fix this issue?
> 
> Well, what comes to mind immediately is two things.
> 
> First, does scsiglue.c's abort_command really need to handshake with the
> code in usb.c?  If not, just get rid of the down and its matching up.

Unfortunately, it does.  The SCSI layer seems to believe that once we've
returned from the abort_command() routine, the driver is in a position to
accept a new command.  Thus, some level of handshaking is necessary.

> Second, this code (in scsi_error.c):
> 
>       774         spin_lock_irqsave(&io_request_lock, flags);
>       775         rtn = SCpnt->host->hostt->eh_abort_handler(SCpnt);
>       776         spin_unlock_irqrestore(&io_request_lock, flags);
> 
> seems like a real shotgun approach.  Get rid of the spinlock stuff, and
> make sure that the abort handlers lock io_request_lock themselves if
> they need it.  Of course, this would require changes to all the scsi
> drivers.

Hrm... perhaps I could just unlock that spinlock and then re-lock it before
returning.  Anyone have a clue if this would work?

Matt

-- 
Matthew Dharm                              Home: mdharm-usb@one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

Would you mind not using our Web server? We're trying to have a game of 
Quake here.
					-- Greg
User Friendly, 5/11/1998

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

  reply	other threads:[~2001-08-07  3:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-02  7:02 Problem with usb-storage using HP 8200 external CD-ROM burner Brent Baccala
     [not found] ` <20010806014626.K24225@one-eyed-alien.net>
2001-08-06 19:49   ` Brent Baccala
2001-08-07  3:17     ` Matthew Dharm [this message]
2001-08-07  7:33       ` Jens Axboe
2001-08-07 15:09         ` Brent Baccala

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=20010806201746.C6080@one-eyed-alien.net \
    --to=mdharm-kernel@one-eyed-alien.net \
    --cc=baccala@freesoft.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    /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