Commit 8e68a45
scsi: libsas: Fix disk not being scanned in after being removed
As of commit d8649fc ("scsi: libsas: Do discovery on empty PHY to
update PHY info"), do discovery will send a new SMP_DISCOVER and update
phy->phy_change_count. We found that if the disk is reconnected and phy
change_count changes at this time, the disk scanning process will not be
triggered.
Therefore, call sas_set_ex_phy() to update the PHY info with the results of
the last query. And because the previous phy info will be used when calling
sas_unregister_devs_sas_addr(), sas_unregister_devs_sas_addr() should be
called before sas_set_ex_phy().
Fixes: d8649fc ("scsi: libsas: Do discovery on empty PHY to update PHY info")
Signed-off-by: Xingui Yang <yangxingui@huawei.com>
Link: https://lore.kernel.org/r/20240307141413.48049-3-yangxingui@huawei.com
Reviewed-by: John Garry <john.g.garry@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent a573452 commit 8e68a45
1 file changed
Lines changed: 22 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1945 | 1945 | | |
1946 | 1946 | | |
1947 | 1947 | | |
| 1948 | + | |
1948 | 1949 | | |
1949 | 1950 | | |
1950 | 1951 | | |
| |||
1956 | 1957 | | |
1957 | 1958 | | |
1958 | 1959 | | |
1959 | | - | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
1960 | 1965 | | |
1961 | 1966 | | |
1962 | 1967 | | |
1963 | 1968 | | |
1964 | | - | |
| 1969 | + | |
1965 | 1970 | | |
1966 | 1971 | | |
1967 | 1972 | | |
1968 | | - | |
| 1973 | + | |
1969 | 1974 | | |
1970 | 1975 | | |
1971 | 1976 | | |
1972 | 1977 | | |
1973 | 1978 | | |
1974 | | - | |
| 1979 | + | |
1975 | 1980 | | |
1976 | 1981 | | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
1977 | 1985 | | |
1978 | 1986 | | |
1979 | 1987 | | |
1980 | 1988 | | |
1981 | | - | |
1982 | | - | |
| 1989 | + | |
| 1990 | + | |
1983 | 1991 | | |
1984 | | - | |
1985 | | - | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
1986 | 1995 | | |
1987 | 1996 | | |
1988 | 1997 | | |
| |||
1994 | 2003 | | |
1995 | 2004 | | |
1996 | 2005 | | |
1997 | | - | |
| 2006 | + | |
1998 | 2007 | | |
1999 | 2008 | | |
2000 | 2009 | | |
| |||
2003 | 2012 | | |
2004 | 2013 | | |
2005 | 2014 | | |
2006 | | - | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
2007 | 2019 | | |
2008 | 2020 | | |
2009 | 2021 | | |
| |||
0 commit comments