linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luben Tuikov <luben_tuikov@adaptec.com>
To: "Moore, Eric Dean" <Emoore@lsil.com>
Cc: Christoph Hellwig <hch@lst.de>,
	Masao Fukuchi <fukuchi.masao@jp.fujitsu.com>,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH] fix dma mapping leak in fusion
Date: Tue, 31 Aug 2004 08:56:16 -0400	[thread overview]
Message-ID: <41347570.4020409@adaptec.com> (raw)
In-Reply-To: <0E3FA95632D6D047BA649F95DAB60E5704F631BD@exa-atlanta>

> Look in mptscsih_abort.  If abort task management request failed,
> it will immediately complete the command to mid-layer, returning
> FAILED.  If we succeeded issuing the command, we return SUCCESS, and
> the command would be completed later by mptscsih_taskmgmt_complete.
> If mptscsih_taskmgmt_complete fails to be called, then timer would
> expire, calling mptscsih_taskmgmt_timeout.  This will eventually endup
> reseting card, and flusing the outstanding commands from
> mptscsih_flush_running_commands.

It doesn't make much sense for ABORT TASK to return FAILED.  The
reasons,
	"In either case, the SCSI target device shall guarantee
	that no further responses from the task are sent to the
	SCSI initiator port.", SAM3r13, 7.2.

That is, unless the delivery subsystem wants to let know the
application client about the _delivery_ status of the TMF,
we're better off returning SUCCESS.

So, in either case, we "_kill_" the task (slot) in the driver
queue.  If the service response did fail and we couldn't send
the TMF, and the aborted task did return status, we'd not
find it in our queues and thus know that it is/was a cancelled
task and therefore _not_ report status to SCSI Core,
which is _not_ expecting status for that command.  This is
a more graceful solution, rather than resetting the host,
when ABORT TASK delivery fails, and thus zapping other
initiator ports' tasks, etc.

Either way, I cannot imagine _recovering_ TMFs.

BTW, it is my conviction that _most_ (and maybe all) TMFs should
be HOQ attribute tasks.  (This is one "feature" which would
distinguish between different, say, iSCSI vendors, for example.
"Did it hang?" "No, it recovered quickly.", etc.)

		Luben
 
>  >
>  > > The dmesg dump in previous email indicates that mid-layer
>  > > issued several aborts to the LLD, then mpt driver is returning
>  > > SUCCESS. However at some point the midlayer offlines the device,
>  > > however commands are still in the LLD, and completed
>  > sometime later after
>  > > the mptscsih_taskmgmt_timeout is called, thus hitting the
>  > > oops(because request_buffer=NULL), as we have removed the
>  > > scsi_device_online check per your request.
>  >
>  > I'm looking over fusion code with your latest patch applied now.  What
>  > worries me is mptscsih_flush_running_cmds where's you're erroring out
>  > commands possibly from withing EH methods (?, I have a hard time
>  > following the code from mptscsih to mptbase and back), but not under
>  > EH control.
>  >
>  > Btw, when looking over this it seems to me you could kill
>  > mptscsih_search_running_cmds - the scsi core makes sure you'll never
>  > have outstanding commands when it calls ->slave_destory.
>  >
> 
> I don't recommend removing mptscsih_search_running_cmds.
> This is cleaning up the scsi-look table, chain buffer, and msg frames.
> 
>  
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  reply	other threads:[~2004-08-31 12:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-30 22:29 [PATCH] fix dma mapping leak in fusion Moore, Eric Dean
2004-08-31 12:56 ` Luben Tuikov [this message]
2004-08-31 13:14   ` Luben Tuikov
  -- strict thread matches above, loose matches on Subject: below --
2004-08-31 14:42 Moore, Eric Dean
2004-08-23 15:56 Moore, Eric Dean
2004-08-28 19:02 ` Christoph Hellwig
2004-08-20 15:01 Moore, Eric Dean
2004-08-23  1:41 ` Masao Fukuchi
2004-08-19 14:47 Moore, Eric Dean
2004-08-20  3:05 ` Masao Fukuchi
2004-08-17 16:42 Moore, Eric Dean
2004-08-17 16:46 ` Christoph Hellwig
2004-08-17 17:17   ` Christoph Hellwig
2004-08-17 18:18 ` Luben Tuikov
2004-08-17 16:16 Christoph Hellwig
2004-08-19  3:01 ` Masao Fukuchi
2004-08-19 10:14   ` Christoph Hellwig
2004-08-19 13:14     ` Masao Fukuchi

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=41347570.4020409@adaptec.com \
    --to=luben_tuikov@adaptec.com \
    --cc=Emoore@lsil.com \
    --cc=fukuchi.masao@jp.fujitsu.com \
    --cc=hch@lst.de \
    --cc=linux-scsi@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).