public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Doug Ledford <dledford@redhat.com>
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: Mike Anderson <andmike@us.ibm.com>,
	"Justin T. Gibbs" <gibbs@scsiguy.com>,
	Matthew Wilcox <willy@debian.org>,
	linux-scsi mailing list <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] sym53c8xx PPR negotiation fix
Date: Fri, 31 Oct 2003 22:09:55 -0500	[thread overview]
Message-ID: <1067656195.3112.551.camel@compaq.xsintricity.com> (raw)
In-Reply-To: <1067654044.2464.29.camel@mulgrave>

On Fri, 2003-10-31 at 21:34, James Bottomley wrote:
> On Fri, 2003-10-31 at 19:22, Mike Anderson wrote:
> > It is called from scsi_remove_device.
> 
> But that's only called for configured devices.  The original intent was
> to call slave_destroy for all slave_alloc'd devices (whether configured
> or not).
> 
> It originally was in scsi_free_sdev, but was moved with
> 
> ChangeSet 1.1046.597.3 2003/08/02 12:17:19 andmike@us.ibm.com
>   [PATCH] scsi host / scsi device ref counting take 2 [3/3]
> 
> The changelog isn't very explicit about why this was done, what was the
> particular reason?

It really should be called on all devices, not just configured devices. 
The assumption that a device driver doesn't need to allocate local
storage to even do something as simple as INQUIRY and can wait until
slave_configure() to allocate anything is an invalid assumption.  In
fact, when I originally was working on this I think I modified the
aic7xxx_old driver to get rid of as much static array type data as
possible and move it to a struct allocated in slave_alloc.  Whether the
device is kept or not, it still has to alloc to work.  At one point
there was also another optimization in there so that if a driver didn't
do anything besides simply kfree() the memory pointed to by
sdptr->hostdata then you could skip defining a slave_destroy() function
and instead just let scsi_free_sdev do a simple kmalloc for you.  I
think that was argued against as a special case just confuses people,
can't remember.

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



  reply	other threads:[~2003-11-01  3:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-29 17:07 [PATCH] sym53c8xx PPR negotiation fix Doug Ledford
2003-10-29 17:11 ` James Bottomley
2003-10-29 17:50   ` Matthew Wilcox
2003-10-29 18:02     ` Doug Ledford
     [not found]       ` <20031029183159.GE25237@parcelfarce.linux.theplanet.co.uk>
2003-10-29 18:45         ` Doug Ledford
2003-10-31 23:55           ` Justin T. Gibbs
2003-10-31 23:55             ` James Bottomley
2003-11-01  0:08               ` Doug Ledford
2003-11-01  0:16                 ` Justin T. Gibbs
2003-11-01  1:22                   ` Mike Anderson
2003-11-01  2:34                     ` James Bottomley
2003-11-01  3:09                       ` Doug Ledford [this message]
2003-11-03 18:10                       ` Mike Anderson
2003-11-04  7:10                         ` Christoph Hellwig
2003-11-05  9:26                           ` Mike Anderson
2003-11-06  9:04                           ` Mike Anderson
2003-11-06  9:07                             ` Christoph Hellwig
2003-11-06  9:21                               ` Mike Anderson
2003-11-01  0:02             ` Doug Ledford

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=1067656195.3112.551.camel@compaq.xsintricity.com \
    --to=dledford@redhat.com \
    --cc=James.Bottomley@steeleye.com \
    --cc=andmike@us.ibm.com \
    --cc=gibbs@scsiguy.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=willy@debian.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