Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173558
b: refs/heads/master
c: e7d59c1
h: refs/heads/master
v: v3
  • Loading branch information
Kashyap, Desai authored and James Bottomley committed Oct 29, 2009
1 parent 9ff26c4 commit 02bbbbc
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 26 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 744090d38b47ed8ead8f68b6f0c65866c0b9b17a
refs/heads/master: e7d59c17a70e59a052d29467bbefb23ce700dcd4
52 changes: 27 additions & 25 deletions trunk/drivers/scsi/mpt2sas/mpt2sas_scsih.c
Original file line number Diff line number Diff line change
Expand Up @@ -2380,7 +2380,6 @@ _scsih_block_io_to_children_attached_directly(struct MPT2SAS_ADAPTER *ioc,
u16 handle;
u16 reason_code;
u8 phy_number;
u8 link_rate;

for (i = 0; i < event_data->NumEntries; i++) {
handle = le16_to_cpu(event_data->PHY[i].AttachedDevHandle);
Expand All @@ -2391,11 +2390,6 @@ _scsih_block_io_to_children_attached_directly(struct MPT2SAS_ADAPTER *ioc,
MPI2_EVENT_SAS_TOPO_RC_MASK;
if (reason_code == MPI2_EVENT_SAS_TOPO_RC_DELAY_NOT_RESPONDING)
_scsih_block_io_device(ioc, handle);
if (reason_code == MPI2_EVENT_SAS_TOPO_RC_PHY_CHANGED) {
link_rate = event_data->PHY[i].LinkRate >> 4;
if (link_rate >= MPI2_SAS_NEG_LINK_RATE_1_5)
_scsih_ublock_io_device(ioc, handle);
}
}
}

Expand Down Expand Up @@ -4084,7 +4078,7 @@ _scsih_sas_topology_change_event_debug(struct MPT2SAS_ADAPTER *ioc,
u16 reason_code;
u8 phy_number;
char *status_str = NULL;
char link_rate[25];
u8 link_rate, prev_link_rate;

switch (event_data->ExpStatus) {
case MPI2_EVENT_SAS_TOPO_ES_ADDED:
Expand All @@ -4094,6 +4088,7 @@ _scsih_sas_topology_change_event_debug(struct MPT2SAS_ADAPTER *ioc,
status_str = "remove";
break;
case MPI2_EVENT_SAS_TOPO_ES_RESPONDING:
case 0:
status_str = "responding";
break;
case MPI2_EVENT_SAS_TOPO_ES_DELAY_NOT_RESPONDING:
Expand All @@ -4119,30 +4114,30 @@ _scsih_sas_topology_change_event_debug(struct MPT2SAS_ADAPTER *ioc,
MPI2_EVENT_SAS_TOPO_RC_MASK;
switch (reason_code) {
case MPI2_EVENT_SAS_TOPO_RC_TARG_ADDED:
snprintf(link_rate, 25, ": add, link(0x%02x)",
(event_data->PHY[i].LinkRate >> 4));
status_str = link_rate;
status_str = "target add";
break;
case MPI2_EVENT_SAS_TOPO_RC_TARG_NOT_RESPONDING:
status_str = ": remove";
status_str = "target remove";
break;
case MPI2_EVENT_SAS_TOPO_RC_DELAY_NOT_RESPONDING:
status_str = ": remove_delay";
status_str = "delay target remove";
break;
case MPI2_EVENT_SAS_TOPO_RC_PHY_CHANGED:
snprintf(link_rate, 25, ": link(0x%02x)",
(event_data->PHY[i].LinkRate >> 4));
status_str = link_rate;
status_str = "link rate change";
break;
case MPI2_EVENT_SAS_TOPO_RC_NO_CHANGE:
status_str = ": responding";
status_str = "target responding";
break;
default:
status_str = ": unknown";
status_str = "unknown";
break;
}
printk(KERN_DEBUG "\tphy(%02d), attached_handle(0x%04x)%s\n",
phy_number, handle, status_str);
link_rate = event_data->PHY[i].LinkRate >> 4;
prev_link_rate = event_data->PHY[i].LinkRate & 0xF;
printk(KERN_DEBUG "\tphy(%02d), attached_handle(0x%04x): %s:"
" link rate: new(0x%02x), old(0x%02x)\n", phy_number,
handle, status_str, link_rate, prev_link_rate);

}
}
#endif
Expand All @@ -4166,7 +4161,7 @@ _scsih_sas_topology_change_event(struct MPT2SAS_ADAPTER *ioc,
struct _sas_device *sas_device;
u64 sas_address;
unsigned long flags;
u8 link_rate;
u8 link_rate, prev_link_rate;
Mpi2EventDataSasTopologyChangeList_t *event_data = fw_event->event_data;

#ifdef CONFIG_SCSI_MPT2SAS_LOGGING
Expand Down Expand Up @@ -4226,18 +4221,25 @@ _scsih_sas_topology_change_event(struct MPT2SAS_ADAPTER *ioc,
if (!handle)
continue;
link_rate = event_data->PHY[i].LinkRate >> 4;
prev_link_rate = event_data->PHY[i].LinkRate & 0xF;
switch (reason_code) {
case MPI2_EVENT_SAS_TOPO_RC_PHY_CHANGED:

if (link_rate == prev_link_rate)
break;

mpt2sas_transport_update_links(ioc, sas_address,
handle, phy_number, link_rate);

if (link_rate >= MPI2_SAS_NEG_LINK_RATE_1_5)
_scsih_ublock_io_device(ioc, handle);
break;
case MPI2_EVENT_SAS_TOPO_RC_TARG_ADDED:

mpt2sas_transport_update_links(ioc, sas_address,
handle, phy_number, link_rate);

if (link_rate < MPI2_SAS_NEG_LINK_RATE_1_5)
break;
if (reason_code == MPI2_EVENT_SAS_TOPO_RC_TARG_ADDED) {
_scsih_add_device(ioc, handle, phy_number, 0);
}
_scsih_add_device(ioc, handle, phy_number, 0);
break;
case MPI2_EVENT_SAS_TOPO_RC_TARG_NOT_RESPONDING:

Expand Down

0 comments on commit 02bbbbc

Please sign in to comment.