From: Sarah Sharp <sarah.a.sharp-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>
Cc: James Bottomley
<James.Bottomley-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>,
linux-scsi <linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
USB list <linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [RFC 0/2] target refcounting infrastructure fixes for usb
Date: Thu, 2 Jan 2014 16:45:51 -0800 [thread overview]
Message-ID: <20140103004551.GA2970@xanatos> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1312211547490.12252-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
On Sat, Dec 21, 2013 at 03:51:25PM -0500, Alan Stern wrote:
> On Fri, 20 Dec 2013, Sarah Sharp wrote:
>
> > On Thu, Dec 19, 2013 at 11:48:47AM -0800, James Bottomley wrote:
> > > It should apply incrementally on top of the previous two. If it
> > > actually works, I'll fold it into the first patch.
> >
> > Well, it doesn't oops anymore, but it does generate a pile of warnings:
>
> This was a simple oversight. scsi_target_reap() was called at the
> start of __scsi_remove_device(), but it should be called at the end.
> The patch below, applied on top of James's three patches, will fix the
> warnings.
>
> Alan Stern
>
> P.S.: The comment isn't entirely correct any more...
Ok, Alan's additional patch fixed the warnings I was seeing on UAS
device unplug. James, can you Cc me on the finished patch when you send
it in?
Hans, I don't want to send the UAS patches off to Greg until James'
patches get into mainline. I believe Greg's usb-next tree is frozen at
this point, so they'll have to wait until 3.15.
Sarah Sharp
> Index: usb-3.13/drivers/scsi/scsi_sysfs.c
> ===================================================================
> --- usb-3.13.orig/drivers/scsi/scsi_sysfs.c
> +++ usb-3.13/drivers/scsi/scsi_sysfs.c
> @@ -1028,13 +1028,6 @@ void __scsi_remove_device(struct scsi_de
> {
> struct device *dev = &sdev->sdev_gendev;
>
> - /*
> - * Paired with the kref_get() in scsi_sysfs_initialize(). We're
> - * removing sysfs visibility from the device, so make the target
> - * invisible if this was the last device underneath it.
> - */
> - scsi_target_reap(scsi_target(sdev));
> -
> if (sdev->is_visible) {
> if (scsi_device_set_state(sdev, SDEV_CANCEL) != 0)
> return;
> @@ -1059,6 +1052,13 @@ void __scsi_remove_device(struct scsi_de
> sdev->host->hostt->slave_destroy(sdev);
> transport_destroy_device(dev);
>
> + /*
> + * Paired with the kref_get() in scsi_sysfs_initialize(). We're
> + * removing sysfs visibility from the device, so make the target
> + * invisible if this was the last device underneath it.
> + */
> + scsi_target_reap(scsi_target(sdev));
> +
> put_device(dev);
> }
>
>
--
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
next prev parent reply other threads:[~2014-01-03 0:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-16 15:10 [RFC 0/2] target refcounting infrastructure fixes for usb James Bottomley
2013-12-16 15:12 ` [RFC 1/2] fix our current target reap infrastructure James Bottomley
2013-12-16 15:57 ` Alan Stern
2013-12-17 13:38 ` James Bottomley
2013-12-16 15:13 ` [RFC 2/2] dual scan thread bug fix James Bottomley
[not found] ` <1387206619.2200.6.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
2013-12-18 20:36 ` [RFC 0/2] target refcounting infrastructure fixes for usb Sarah Sharp
2013-12-18 21:50 ` Alan Stern
2013-12-19 0:05 ` James Bottomley
2013-12-19 18:26 ` Sarah Sharp
2013-12-19 19:48 ` James Bottomley
2013-12-20 23:18 ` Sarah Sharp
2013-12-21 20:51 ` Alan Stern
2014-01-03 0:34 ` James Bottomley
[not found] ` <Pine.LNX.4.44L0.1312211547490.12252-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-01-03 0:45 ` Sarah Sharp [this message]
2014-01-03 7:46 ` James Bottomley
2014-01-03 8:56 ` Hans de Goede
2014-01-03 14:50 ` James Bottomley
2014-01-03 22:00 ` Sarah Sharp
2014-01-03 23:20 ` Hans de Goede
-- strict thread matches above, loose matches on Subject: below --
2014-01-03 0:36 James 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=20140103004551.GA2970@xanatos \
--to=sarah.a.sharp-vuqaysv1563yd54fqh9/ca@public.gmane.org \
--cc=James.Bottomley-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org \
--cc=hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.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).