* Re: [usb-storage] Re: [PATCH 04/14] uas: lock the abort handler
[not found] ` <Pine.LNX.4.44L0.1601261026301.2062-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
@ 2016-02-03 14:28 ` Oliver Neukum
2016-02-03 16:53 ` Alan Stern
0 siblings, 1 reply; 2+ messages in thread
From: Oliver Neukum @ 2016-02-03 14:28 UTC (permalink / raw)
To: Alan Stern
Cc: Hans de Goede, linux-usb-u79uwXL29TY76Z2rM5mHXA,
kraxel-H+wXaHxf7aLQT0dZR+AlfA,
mdharm-usb-JGfshJpz5UybPZpvUQj5UqxOck334EZe,
usb-storage-ijkIwGHArpdIPJnuZ7Njw4oP9KaGy4wf,
linux-scsi-u79uwXL29TY76Z2rM5mHXA
On Tue, 2016-01-26 at 10:28 -0500, Alan Stern wrote:
> On Tue, 26 Jan 2016, Oliver Neukum wrote:
> > That is problematic. The ABORT_TMF does need IO for which we need
> > to wait. And if we just submit and pretend the abort worked, the tag
> > will be reused.
> > Perhaps we could drop the spinlock. I think it is time to talk to
> > the SCSI people.
>
> The abort handler doesn't have to wait for the command to terminate.
> It merely has to initiate an abort and return. The SCSI layer gets
> notified via the usual mechanism when the command eventually finishes,
> whether it was successful or not.
This is stange. I don't see how we can guarantee a command completion
if eh_abort_handler() has sent the TMF.
It was my understanding that returning from eh_abort_handler()
means that a tag is considered free again and will be reused.
Could you clarify?
Regards
Oliver
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [usb-storage] Re: [PATCH 04/14] uas: lock the abort handler
2016-02-03 14:28 ` [usb-storage] Re: [PATCH 04/14] uas: lock the abort handler Oliver Neukum
@ 2016-02-03 16:53 ` Alan Stern
0 siblings, 0 replies; 2+ messages in thread
From: Alan Stern @ 2016-02-03 16:53 UTC (permalink / raw)
To: Oliver Neukum
Cc: Hans de Goede, linux-usb, kraxel, mdharm-usb, usb-storage,
linux-scsi
On Wed, 3 Feb 2016, Oliver Neukum wrote:
> On Tue, 2016-01-26 at 10:28 -0500, Alan Stern wrote:
> > On Tue, 26 Jan 2016, Oliver Neukum wrote:
>
> > > That is problematic. The ABORT_TMF does need IO for which we need
> > > to wait. And if we just submit and pretend the abort worked, the tag
> > > will be reused.
> > > Perhaps we could drop the spinlock. I think it is time to talk to
> > > the SCSI people.
> >
> > The abort handler doesn't have to wait for the command to terminate.
> > It merely has to initiate an abort and return. The SCSI layer gets
> > notified via the usual mechanism when the command eventually finishes,
> > whether it was successful or not.
>
> This is stange. I don't see how we can guarantee a command completion
> if eh_abort_handler() has sent the TMF.
> It was my understanding that returning from eh_abort_handler()
> means that a tag is considered free again and will be reused.
> Could you clarify?
I'm sorry, it looks like I misremembered how usb-storage works.
After checking the code, I see that the abort handler _does_ wait for
the command to finish before returning. The abort handler is called
with no locks held, and it releases its spinlock while it waits.
Is there any reason uas can't do the same thing?
Alan Stern
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-03 16:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <Pine.LNX.4.44L0.1601261026301.2062-100000@iolanthe.rowland.org>
[not found] ` <Pine.LNX.4.44L0.1601261026301.2062-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2016-02-03 14:28 ` [usb-storage] Re: [PATCH 04/14] uas: lock the abort handler Oliver Neukum
2016-02-03 16:53 ` Alan Stern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox