2260}
2261
2262
2263
2264
2265
2266
2267
2268
2269static void
2270mptsas_delete_expander_phys(MPT_ADAPTER *ioc)
2271{
2272 struct mptsas_portinfo buffer;
2273 struct mptsas_portinfo *port_info, *n, *parent;
2274 struct mptsas_phyinfo *phy_info;
2275 struct sas_port * port;
2276 int i;
2277 u64 expander_sas_address;
2278
2279 mutex_lock(&ioc->sas_topology_mutex);
2280 list_for_each_entry_safe(port_info, n, &ioc->sas_topology, list) {
2281
2282 if (port_info->phy_info &&
2283 (!(port_info->phy_info[0].identify.device_info &
2284 MPI_SAS_DEVICE_INFO_SMP_TARGET)))
2285 continue;
2286
2287 if (mptsas_sas_expander_pg0(ioc, &buffer,
2288 (MPI_SAS_EXPAND_PGAD_FORM_HANDLE <<
2289 MPI_SAS_EXPAND_PGAD_FORM_SHIFT),
2290 port_info->phy_info[0].handle)) {
2291
2292
2293
2294
2295 parent = mptsas_find_portinfo_by_handle(ioc,
2296 port_info->phy_info[0].identify.handle_parent);
2297
2298 if (!parent)
2299 goto next_port;
2300