Re: [PATCH 1/2] soundwire: bus: Don't unassign dev_num before unregistering device
From: Charles Keepax
Date: Tue Sep 15 2026 - 06:18:09 EST
On Mon, Sep 14, 2026 at 08:21:34PM +0200, Pierre-Louis Bossart wrote:
> On 9/11/26 18:19, Charles Keepax wrote:
> > Don't mark dev_num as unassigned until after device_unregister()
> > has been called. The driver may want to communicate with the
> > device as part of the driver remove operation, so the dev_num
> > should remain assigned until that has completed.
>
> That change looks fine.
>
> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxx>
>
> But I am a bit worried about the dev_num handling now that I think of
> it. This is *only* at the manager level. At the peripheral level, the
> dev_num register has not been modified so the hardware still reports as
> ATTACHED with the dev_num whose mask was cleared on the host side.
> IOW we have a zombie peripheral on the link, and if we do a sequence
> rmmod/insmod things could be fun...
Hmm... yeah would probably be nicer to update the slave too. I
will think that through and see if I can find time to have a look
at doing an extra patch for it.
Thanks,
Charles