Or do you object to the way I have solved that problem? I am certainly open to other solutions, if you have any suggestions?
Having looked at the code in more details, I think there are other issues, see e.g. this part of the code called from snd_bus_master_delete().
static int sdw_delete_slave(struct device *dev, void *data) { struct sdw_slave *slave = dev_to_sdw_dev(dev); struct sdw_bus *bus = slave->bus; pm_runtime_disable(dev); sdw_slave_debugfs_exit(slave); mutex_lock(&bus->bus_lock); if (slave->dev_num) { /* clear dev_num if assigned */ clear_bit(slave->dev_num, bus->assigned); if (bus->ops && bus->ops->put_device_num) bus->ops->put_device_num(bus, slave); }So at this point an interaction with the device is not longer possible, even if the Cadence interrupts are kept active, since there's no valid device number to use...
list_del_init(&slave->node); mutex_unlock(&bus->bus_lock); ... but this is where the .remove() will take place. device_unregister(dev); return 0; } What am I missing?
- Follow-Ups:
- Re: [PATCH] soundwire: intel_auxdevice: Don't disable IRQs before removing children
- From: Charles Keepax
- Re: [PATCH] soundwire: intel_auxdevice: Don't disable IRQs before removing children
- References:
- [PATCH] soundwire: intel_auxdevice: Don't disable IRQs before removing children
- From: Charles Keepax
- Re: [PATCH] soundwire: intel_auxdevice: Don't disable IRQs before removing children
- From: Pierre-Louis Bossart
- Re: [PATCH] soundwire: intel_auxdevice: Don't disable IRQs before removing children
- From: Richard Fitzgerald
- Re: [PATCH] soundwire: intel_auxdevice: Don't disable IRQs before removing children
- From: Pierre-Louis Bossart
- Re: [PATCH] soundwire: intel_auxdevice: Don't disable IRQs before removing children
- From: Charles Keepax
- Re: [PATCH] soundwire: intel_auxdevice: Don't disable IRQs before removing children
- From: Pierre-Louis Bossart
- [PATCH] soundwire: intel_auxdevice: Don't disable IRQs before removing children
- Prev by Date: Re: [PATCH] soundwire: intel_auxdevice: Don't disable IRQs before removing children
- Next by Date: [PATCH v2 0/6] ASoC: extra format on each DAI
- Previous by thread: Re: [PATCH] soundwire: intel_auxdevice: Don't disable IRQs before removing children
- Next by thread: Re: [PATCH] soundwire: intel_auxdevice: Don't disable IRQs before removing children
- Index(es):