Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 31936
b: refs/heads/master
c: 2686de2
h: refs/heads/master
v: v3
  • Loading branch information
James Bottomley authored and James Bottomley committed Jul 1, 2006
1 parent 6e96dad commit b877239
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 413975a0f1a43a896490fc5c589d05c95624c6d2
refs/heads/master: 2686de27a356914e098329463d5a8cd7aa6f29a4
1 change: 1 addition & 0 deletions trunk/drivers/message/fusion/mptbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ typedef struct _MPT_ADAPTER
struct mutex sas_discovery_mutex;
u8 sas_discovery_runtime;
u8 sas_discovery_ignore_events;
u16 handle;
int sas_index; /* index refrencing */
MPT_SAS_MGMT sas_mgmt;
int num_ports;
Expand Down
24 changes: 24 additions & 0 deletions trunk/drivers/message/fusion/mptsas.c
Original file line number Diff line number Diff line change
Expand Up @@ -1635,8 +1635,10 @@ static int mptsas_probe_one_phy(struct device *dev,
if (!mptsas_get_rphy(phy_info) && port && !port->rphy) {

struct sas_rphy *rphy;
struct device *parent;
struct sas_identify identify;

parent = dev->parent->parent;
/*
* Let the hotplug_work thread handle processing
* the adding/removing of devices that occur
Expand All @@ -1647,6 +1649,27 @@ static int mptsas_probe_one_phy(struct device *dev,
goto out;

mptsas_parse_device_info(&identify, &phy_info->attached);
if (scsi_is_host_device(parent)) {
struct mptsas_portinfo *port_info;
int i;

mutex_lock(&ioc->sas_topology_mutex);
port_info = mptsas_find_portinfo_by_handle(ioc,
ioc->handle);
mutex_unlock(&ioc->sas_topology_mutex);

for (i = 0; i < port_info->num_phys; i++)
if (port_info->phy_info[i].identify.sas_address ==
identify.sas_address)
goto out;

} else if (scsi_is_sas_rphy(parent)) {
struct sas_rphy *parent_rphy = dev_to_rphy(parent);
if (identify.sas_address ==
parent_rphy->identify.sas_address)
goto out;
}

switch (identify.device_type) {
case SAS_END_DEVICE:
rphy = sas_end_device_alloc(port);
Expand Down Expand Up @@ -1698,6 +1721,7 @@ mptsas_probe_hba_phys(MPT_ADAPTER *ioc)
goto out_free_port_info;

mutex_lock(&ioc->sas_topology_mutex);
ioc->handle = hba->handle;
port_info = mptsas_find_portinfo_by_handle(ioc, hba->handle);
if (!port_info) {
port_info = hba;
Expand Down

0 comments on commit b877239

Please sign in to comment.