I3C for 6.1

Subsystem:
  - fix device reattach issues
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEBqsFVZXh8s/0O5JiY6TcMGxwOjIFAmNJzLQACgkQY6TcMGxw
 OjL+tA/+MP+XyIX1M1ZtrxTHjSt774QW83qXko2QLcmjeytkIjeFr14wY1ftqwS2
 oDl6N2XbAE34BWgV694/hLJ5Cur9NBxQ6suZO4NqhfdK7o3GL3l+f50GbKvMK+To
 wi6F1J3Z8ewP8z4NZYCQFV8Xo7F4K/egQGIll1aEP8qy7nf4oTAlwFobbBO54/r5
 QSnCBxpHHdFKzAhZlupvuPCxPxmfzsuF/fZAvy7KakliiOTnGWqjyG44Kgm3QJcc
 6GZ3EmOafR3mff80RGl3+F/dt1gZGi1U81WexIb3cGI84jWfehIktE0o1FMd98Gv
 7cGE/QX1yhEx7bGMYPpZXHzZjToF9QRXPvsYrMK7+7KLrMGqB9oFZv3dMRvphbKe
 vHEC+QipTY226KRoxHB3a3ma8M8RnM1Y47by/FSP42gKhzA6pM1IyNTPD5/jRd+g
 +DNS4LPBUzb4vc0vJeBOvXDUoPLelvRLcfPyONdBfOb+2ijFkoGLWWw/l42q7s1S
 mSoAWD8S+Z+WYgIMiSQ2gLX8ETqQ84CPkVRXYDCAdciy7ZnDlFhJjjcAFqNNPAFG
 FLdlfCpHFq3+WVGpApjg9gNwbfHb1d/E73CjUS3BnwRvdPxGbceL7NH1Sp16+XZh
 jTr2E+giMG4rWg7IASgA3G19uoecAOKRL1OumXid/YboiNTK2L8=
 =RPtP
 -----END PGP SIGNATURE-----

Merge tag 'i3c/for-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux

Pull i3c updates from Alexandre Belloni:
 "Not much this cycle, only two fixes for a rare event"

   - fix device reattach issues"

* tag 'i3c/for-6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux:
  i3c: master: Remove the wrong place of reattach.
  i3c: master: Free the old_dyn_addr when reattach.
This commit is contained in:
Linus Torvalds 2022-10-14 18:31:28 -07:00
commit 4ce1b97949
1 changed files with 3 additions and 4 deletions

View File

@ -1379,6 +1379,9 @@ static int i3c_master_reattach_i3c_dev(struct i3c_dev_desc *dev,
i3c_bus_set_addr_slot_status(&master->bus, i3c_bus_set_addr_slot_status(&master->bus,
dev->info.dyn_addr, dev->info.dyn_addr,
I3C_ADDR_SLOT_I3C_DEV); I3C_ADDR_SLOT_I3C_DEV);
if (old_dyn_addr)
i3c_bus_set_addr_slot_status(&master->bus, old_dyn_addr,
I3C_ADDR_SLOT_FREE);
} }
if (master->ops->reattach_i3c_dev) { if (master->ops->reattach_i3c_dev) {
@ -1908,10 +1911,6 @@ int i3c_master_add_i3c_dev_locked(struct i3c_master_controller *master,
i3c_master_free_i3c_dev(olddev); i3c_master_free_i3c_dev(olddev);
} }
ret = i3c_master_reattach_i3c_dev(newdev, old_dyn_addr);
if (ret)
goto err_detach_dev;
/* /*
* Depending on our previous state, the expected dynamic address might * Depending on our previous state, the expected dynamic address might
* differ: * differ: