diff options
| author | Xingui Yang <[email protected]> | 2024-03-12 14:11:02 +0000 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2024-04-20 14:38:44 +0000 |
| commit | 7a165a81d55faad2944c781049ef8d454a25dc03 (patch) | |
| tree | ca055333761a158749222dac4e7c9c382a19c09b /drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | |
| parent | scsi: libsas: Move sas_add_parent_port() to sas_expander.c (diff) | |
| download | kernel-7a165a81d55faad2944c781049ef8d454a25dc03.tar.gz kernel-7a165a81d55faad2944c781049ef8d454a25dc03.zip | |
scsi: libsas: Set port when ex_phy is added or deleted
We found that when ex_phy was attached and added to the parent wide port,
ex_phy->port was not set, resulting in sas_unregister_devs_sas_addr() not
calling sas_port_delete_phy() when deleting the phy, and the deleted phy
was still on the parent wide port's phy_list.
When we use sas_port_add_ex_phy() to set ex_phy->port to solve the above
problem, we find that after all the phys of the parent_port are removed and
the number of phy becomes 0, the parent_port will not be set to NULL. This
causes the freed parent port to be used when attaching a new ex_phy in
sas_ex_add_parent_port().
Use sas_port_add_ex_phy() instead of sas_port_add_phy() to set ex_phy->port
when ex_phy is added to the parent port, and set ex_dev->parent_port to
NULL when the number of phy on the port becomes 0.
Signed-off-by: Xingui Yang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c')
0 files changed, 0 insertions, 0 deletions
