From 2d07917bfecd465672b4bf6cccdc2d738dcf3e5e Mon Sep 17 00:00:00 2001 From: "Kashyap, Desai" Date: Thu, 17 Jun 2010 14:40:10 +0530 Subject: [PATCH] --- yaml --- r: 204157 b: refs/heads/master c: 51106ab5306b752cd53d40626f78774276bb1368 h: refs/heads/master i: 204155: 9c7582cb7e92e781a6c19f2de5eac5c926b10f60 v: v3 --- [refs] | 2 +- trunk/drivers/message/fusion/mptsas.c | 37 +++++++++++++++++++++++++++ trunk/drivers/message/fusion/mptsas.h | 1 + 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 3176eee41146..0439d2131fdc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: aca794ddd688f1bbb7551f569b0620255c052d80 +refs/heads/master: 51106ab5306b752cd53d40626f78774276bb1368 diff --git a/trunk/drivers/message/fusion/mptsas.c b/trunk/drivers/message/fusion/mptsas.c index 1caf03ea8557..8963f5c44c23 100644 --- a/trunk/drivers/message/fusion/mptsas.c +++ b/trunk/drivers/message/fusion/mptsas.c @@ -2549,6 +2549,7 @@ mptsas_sas_device_pg0(MPT_ADAPTER *ioc, struct mptsas_devinfo *device_info, device_info->sas_address = le64_to_cpu(sas_address); device_info->device_info = le32_to_cpu(buffer->DeviceInfo); + device_info->flags = le16_to_cpu(buffer->Flags); out_free_consistent: pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4, @@ -3840,6 +3841,13 @@ mptsas_probe_devices(MPT_ADAPTER *ioc) MPI_SAS_DEVICE_INFO_SATA_DEVICE)) == 0) continue; + /* If there is no FW B_T mapping for this device then continue + * */ + if (!(sas_device.flags & MPI_SAS_DEVICE0_FLAGS_DEVICE_PRESENT) + || !(sas_device.flags & + MPI_SAS_DEVICE0_FLAGS_DEVICE_MAPPED)) + continue; + phy_info = mptsas_refreshing_device_handles(ioc, &sas_device); if (!phy_info) continue; @@ -4149,6 +4157,14 @@ mptsas_adding_inactive_raid_components(MPT_ADAPTER *ioc, u8 channel, u8 id) phys_disk.PhysDiskID)) continue; + /* If there is no FW B_T mapping for this device then continue + * */ + if (!(sas_device.flags & MPI_SAS_DEVICE0_FLAGS_DEVICE_PRESENT) + || !(sas_device.flags & + MPI_SAS_DEVICE0_FLAGS_DEVICE_MAPPED)) + continue; + + phy_info = mptsas_find_phyinfo_by_sas_address(ioc, sas_device.sas_address); mptsas_add_end_device(ioc, phy_info); @@ -4199,6 +4215,13 @@ mptsas_hotplug_work(MPT_ADAPTER *ioc, struct fw_event_work *fw_event, (hot_plug_info->channel << 8) + hot_plug_info->id); + /* If there is no FW B_T mapping for this device then break + * */ + if (!(sas_device.flags & MPI_SAS_DEVICE0_FLAGS_DEVICE_PRESENT) + || !(sas_device.flags & + MPI_SAS_DEVICE0_FLAGS_DEVICE_MAPPED)) + break; + if (!sas_device.handle) return; @@ -4241,6 +4264,13 @@ mptsas_hotplug_work(MPT_ADAPTER *ioc, struct fw_event_work *fw_event, break; } + /* If there is no FW B_T mapping for this device then break + * */ + if (!(sas_device.flags & MPI_SAS_DEVICE0_FLAGS_DEVICE_PRESENT) + || !(sas_device.flags & + MPI_SAS_DEVICE0_FLAGS_DEVICE_MAPPED)) + break; + phy_info = mptsas_find_phyinfo_by_sas_address( ioc, sas_device.sas_address); @@ -4294,6 +4324,13 @@ mptsas_hotplug_work(MPT_ADAPTER *ioc, struct fw_event_work *fw_event, break; } + /* If there is no FW B_T mapping for this device then break + * */ + if (!(sas_device.flags & MPI_SAS_DEVICE0_FLAGS_DEVICE_PRESENT) + || !(sas_device.flags & + MPI_SAS_DEVICE0_FLAGS_DEVICE_MAPPED)) + break; + phy_info = mptsas_find_phyinfo_by_sas_address(ioc, sas_device.sas_address); if (!phy_info) { diff --git a/trunk/drivers/message/fusion/mptsas.h b/trunk/drivers/message/fusion/mptsas.h index 7b249edbda78..57e86ab77661 100644 --- a/trunk/drivers/message/fusion/mptsas.h +++ b/trunk/drivers/message/fusion/mptsas.h @@ -140,6 +140,7 @@ struct mptsas_devinfo { u64 sas_address; /* WWN of this device, SATA is assigned by HBA,expander */ u32 device_info; /* bitfield detailed info about this device */ + u16 flags; /* sas device pg0 flags */ }; /*