public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Doug Ledford <dledford@redhat.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	"David S. Miller" <davem@redhat.com>,
	geert@linux-m68k.org, Christoph Hellwig <hch@infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Jens Axboe <axboe@suse.de>
Subject: Re: [PATCH] NCR53C9x ESP: C99 designated initializers
Date: Mon, 11 Nov 2002 15:31:37 -0500	[thread overview]
Message-ID: <20021111203137.GB11636@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0211110915470.1805-100000@home.transmeta.com>

On Mon, Nov 11, 2002 at 09:24:32AM -0800, Linus Torvalds wrote:
> 
> On 11 Nov 2002, Alan Cox wrote:
> > 
> > The stupid thing is we take the lock then call the eh function then drop
> > it. You can drop the lock, wait and retake it. I need to fix a couple of
> > other drivers to do a proper wait and in much the same way.
> 
> Hmm.. I wonder if the thing should disable the queue (plug it)

It does this already

> and release 
> the lock before calling reset.

We call into the driver with the lock held for the sake of consistency.  
When you get right down to it, you can write a driver who has no more 
concept of SMP locking than spin_lock_irq(host->host_lock); in the isr 
routine.  They need to know to drop the lock before calling scsi_sleep() 
in the eh routines, or they can drop the lock and sleep on some wait queue 
as well if they wish.  But, in general, in depth locking knowledge is not 
required.  Since I've ported the old aic7xxx driver to the new scheme, it 
is for certain an improvement over the old method in terms of ease of 
programming a driver to the API.

> I assume we don't want any new requests at 
> this point anyway, and having the low-level drivers know about stopping 
> the queue etc sounds like a bad idea..

Right, both already handled.

> Of course, I suspect that it is potentially a bad idea to have the reset
> functionality at the SCSI level _at_all_.

It saves a lot of code duplication.  There's basically only two existing 
reset strategies around.  A) I'm a stupid card with a SCSI bus and all 
SCSI busses and plain SCSI devices hang pretty much the same way, so the 
mid layer can write a reasonable strategy routine and just have the low 
level driver fill in the implementation hooks (abort hook, bus reset hook, 
full host reset hook, etc) and B) I'm an intelligent firmware and you just 
let me do my thing, in which case the mid layer can't really do anything 
and the low level drivers only need to leave the hooks undefined because 
if the firmware looses the command we're bust already.

> As usual, the higher layers
> don't really know what is going on, and the lower levels on smarter cards
> are likely to be doing the right thing on their own, no?

Lower levels on smart cards assume that if the card ever looses a command 
then you just want a watchdog to reset the machine anyway.

> (Yes, we should improve the infrastructure for having per-command timeouts 
> etc, but the reset/abort callbacks have always been strange)
> 
> 		Linus

-- 
  Doug Ledford <dledford@redhat.com>     919-754-3700 x44233
         Red Hat, Inc. 
         1801 Varsity Dr.
         Raleigh, NC 27606
  

  parent reply	other threads:[~2002-11-11 20:25 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-03 10:46 [PATCH] NCR53C9x ESP: C99 designated initializers Geert Uytterhoeven
2002-11-03 13:13 ` Christoph Hellwig
2002-11-03 14:28   ` Geert Uytterhoeven
2002-11-03 14:33     ` Christoph Hellwig
2002-11-10 10:27       ` Geert Uytterhoeven
2002-11-10 14:38         ` Alan Cox
2002-11-11  9:31           ` Geert Uytterhoeven
2002-11-11  9:43             ` David S. Miller
2002-11-11 13:05               ` Alan Cox
2002-11-11 17:24                 ` Linus Torvalds
2002-11-11 17:43                   ` Arjan van de Ven
2002-11-11 20:31                   ` Doug Ledford [this message]
2002-11-11 22:48                   ` Alan Cox
2002-11-11 20:35                 ` Doug Ledford
2002-11-11 21:01                   ` Linus Torvalds
2002-11-11 21:24                     ` Doug Ledford
  -- strict thread matches above, loose matches on Subject: below --
2002-11-11 18:30 J.E.J. Bottomley

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=20021111203137.GB11636@redhat.com \
    --to=dledford@redhat.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=axboe@suse.de \
    --cc=davem@redhat.com \
    --cc=geert@linux-m68k.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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