diff options
-rw-r--r-- | drivers/scsi/isci/core/sci_base_memory_descriptor_list.c | 6 | ||||
-rw-r--r-- | drivers/scsi/isci/core/sci_base_memory_descriptor_list.h | 3 | ||||
-rw-r--r-- | drivers/scsi/isci/core/sci_types.h | 2 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_phy.h | 2 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_controller.c | 24 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_phy.c | 8 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_port.c | 20 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_port_configuration_agent.c | 24 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_remote_device.c | 2 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_user_callback.h | 6 | ||||
-rw-r--r-- | drivers/scsi/isci/events.c | 7 |
11 files changed, 50 insertions, 54 deletions
diff --git a/drivers/scsi/isci/core/sci_base_memory_descriptor_list.c b/drivers/scsi/isci/core/sci_base_memory_descriptor_list.c index 86ae6a855399..2d785b518a06 100644 --- a/drivers/scsi/isci/core/sci_base_memory_descriptor_list.c +++ b/drivers/scsi/isci/core/sci_base_memory_descriptor_list.c | |||
@@ -76,7 +76,7 @@ void sci_mdl_first_entry( | |||
76 | /* | 76 | /* |
77 | * If this MDL is managing another MDL, then recursively rewind that MDL | 77 | * If this MDL is managing another MDL, then recursively rewind that MDL |
78 | * object as well. */ | 78 | * object as well. */ |
79 | if (base_mdl->next_mdl != SCI_INVALID_HANDLE) | 79 | if (base_mdl->next_mdl != NULL) |
80 | sci_mdl_first_entry(base_mdl->next_mdl); | 80 | sci_mdl_first_entry(base_mdl->next_mdl); |
81 | } | 81 | } |
82 | 82 | ||
@@ -93,7 +93,7 @@ void sci_mdl_next_entry( | |||
93 | /* | 93 | /* |
94 | * This MDL has exhausted it's set of entries. If this MDL is managing | 94 | * This MDL has exhausted it's set of entries. If this MDL is managing |
95 | * another MDL, then start iterating through that MDL. */ | 95 | * another MDL, then start iterating through that MDL. */ |
96 | if (base_mdl->next_mdl != SCI_INVALID_HANDLE) | 96 | if (base_mdl->next_mdl != NULL) |
97 | sci_mdl_next_entry(base_mdl->next_mdl); | 97 | sci_mdl_next_entry(base_mdl->next_mdl); |
98 | } | 98 | } |
99 | } | 99 | } |
@@ -108,7 +108,7 @@ struct sci_physical_memory_descriptor *sci_mdl_get_current_entry( | |||
108 | /* | 108 | /* |
109 | * This MDL has exhausted it's set of entries. If this MDL is managing | 109 | * This MDL has exhausted it's set of entries. If this MDL is managing |
110 | * another MDL, then return it's current entry. */ | 110 | * another MDL, then return it's current entry. */ |
111 | if (base_mdl->next_mdl != SCI_INVALID_HANDLE) | 111 | if (base_mdl->next_mdl != NULL) |
112 | return sci_mdl_get_current_entry(base_mdl->next_mdl); | 112 | return sci_mdl_get_current_entry(base_mdl->next_mdl); |
113 | } | 113 | } |
114 | 114 | ||
diff --git a/drivers/scsi/isci/core/sci_base_memory_descriptor_list.h b/drivers/scsi/isci/core/sci_base_memory_descriptor_list.h index 257d6e368b4a..614e0a98c614 100644 --- a/drivers/scsi/isci/core/sci_base_memory_descriptor_list.h +++ b/drivers/scsi/isci/core/sci_base_memory_descriptor_list.h | |||
@@ -94,8 +94,7 @@ struct sci_base_memory_descriptor_list { | |||
94 | 94 | ||
95 | /** | 95 | /** |
96 | * This field simply allows a user to chain memory descriptor lists | 96 | * This field simply allows a user to chain memory descriptor lists |
97 | * together if desired. This field will be initialized to | 97 | * together if desired. This field will be initialized to NULL. |
98 | * SCI_INVALID_HANDLE. | ||
99 | */ | 98 | */ |
100 | struct sci_base_memory_descriptor_list *next_mdl; | 99 | struct sci_base_memory_descriptor_list *next_mdl; |
101 | 100 | ||
diff --git a/drivers/scsi/isci/core/sci_types.h b/drivers/scsi/isci/core/sci_types.h index 72a56bf40811..e15dc0c89e5c 100644 --- a/drivers/scsi/isci/core/sci_types.h +++ b/drivers/scsi/isci/core/sci_types.h | |||
@@ -61,8 +61,6 @@ | |||
61 | #define sci_cb_make_physical_address(physical_addr, addr_upper, addr_lower) \ | 61 | #define sci_cb_make_physical_address(physical_addr, addr_upper, addr_lower) \ |
62 | ((physical_addr) = (addr_lower) | ((u64)addr_upper) << 32) | 62 | ((physical_addr) = (addr_lower) | ((u64)addr_upper) << 32) |
63 | 63 | ||
64 | #define SCI_INVALID_HANDLE 0x0 | ||
65 | |||
66 | typedef enum { | 64 | typedef enum { |
67 | SCI_IO_REQUEST_DATA_IN = 0, /* Read operation */ | 65 | SCI_IO_REQUEST_DATA_IN = 0, /* Read operation */ |
68 | SCI_IO_REQUEST_DATA_OUT, /* Write operation */ | 66 | SCI_IO_REQUEST_DATA_OUT, /* Write operation */ |
diff --git a/drivers/scsi/isci/core/scic_phy.h b/drivers/scsi/isci/core/scic_phy.h index 25a6140fa9e4..fec273b123d4 100644 --- a/drivers/scsi/isci/core/scic_phy.h +++ b/drivers/scsi/isci/core/scic_phy.h | |||
@@ -82,7 +82,7 @@ struct scic_sds_port; | |||
82 | struct scic_phy_properties { | 82 | struct scic_phy_properties { |
83 | /** | 83 | /** |
84 | * This field specifies the port that currently contains the | 84 | * This field specifies the port that currently contains the |
85 | * supplied phy. This field may be set to SCI_INVALID_HANDLE | 85 | * supplied phy. This field may be set to NULL |
86 | * if the phy is not currently contained in a port. | 86 | * if the phy is not currently contained in a port. |
87 | */ | 87 | */ |
88 | struct scic_sds_port *owning_port; | 88 | struct scic_sds_port *owning_port; |
diff --git a/drivers/scsi/isci/core/scic_sds_controller.c b/drivers/scsi/isci/core/scic_sds_controller.c index 35f7796df661..6a32d91742b5 100644 --- a/drivers/scsi/isci/core/scic_sds_controller.c +++ b/drivers/scsi/isci/core/scic_sds_controller.c | |||
@@ -890,7 +890,7 @@ enum sci_status scic_sds_controller_start_next_phy( | |||
890 | for (index = 0; index < SCI_MAX_PHYS; index++) { | 890 | for (index = 0; index < SCI_MAX_PHYS; index++) { |
891 | the_phy = &this_controller->phy_table[index]; | 891 | the_phy = &this_controller->phy_table[index]; |
892 | 892 | ||
893 | if (scic_sds_phy_get_port(the_phy) != SCI_INVALID_HANDLE) { | 893 | if (scic_sds_phy_get_port(the_phy) != NULL) { |
894 | /** | 894 | /** |
895 | * The controller start operation is complete if and only | 895 | * The controller start operation is complete if and only |
896 | * if: | 896 | * if: |
@@ -940,7 +940,7 @@ enum sci_status scic_sds_controller_start_next_phy( | |||
940 | scic_sds_controller_get_port_configuration_mode(this_controller) | 940 | scic_sds_controller_get_port_configuration_mode(this_controller) |
941 | == SCIC_PORT_MANUAL_CONFIGURATION_MODE | 941 | == SCIC_PORT_MANUAL_CONFIGURATION_MODE |
942 | ) { | 942 | ) { |
943 | if (scic_sds_phy_get_port(the_phy) == SCI_INVALID_HANDLE) { | 943 | if (scic_sds_phy_get_port(the_phy) == NULL) { |
944 | this_controller->next_phy_to_start++; | 944 | this_controller->next_phy_to_start++; |
945 | 945 | ||
946 | /* | 946 | /* |
@@ -1025,7 +1025,7 @@ enum sci_status scic_sds_controller_stop_devices( | |||
1025 | status = SCI_SUCCESS; | 1025 | status = SCI_SUCCESS; |
1026 | 1026 | ||
1027 | for (index = 0; index < this_controller->remote_node_entries; index++) { | 1027 | for (index = 0; index < this_controller->remote_node_entries; index++) { |
1028 | if (this_controller->device_table[index] != SCI_INVALID_HANDLE) { | 1028 | if (this_controller->device_table[index] != NULL) { |
1029 | /* / @todo What timeout value do we want to provide to this request? */ | 1029 | /* / @todo What timeout value do we want to provide to this request? */ |
1030 | device_status = scic_remote_device_stop(this_controller->device_table[index], 0); | 1030 | device_status = scic_remote_device_stop(this_controller->device_table[index], 0); |
1031 | 1031 | ||
@@ -1197,7 +1197,7 @@ static void scic_sds_controller_task_completion( | |||
1197 | 1197 | ||
1198 | /* Make sure that we really want to process this IO request */ | 1198 | /* Make sure that we really want to process this IO request */ |
1199 | if ( | 1199 | if ( |
1200 | (io_request != SCI_INVALID_HANDLE) | 1200 | (io_request != NULL) |
1201 | && (io_request->io_tag != SCI_CONTROLLER_INVALID_IO_TAG) | 1201 | && (io_request->io_tag != SCI_CONTROLLER_INVALID_IO_TAG) |
1202 | && ( | 1202 | && ( |
1203 | scic_sds_io_tag_get_sequence(io_request->io_tag) | 1203 | scic_sds_io_tag_get_sequence(io_request->io_tag) |
@@ -1395,7 +1395,7 @@ static void scic_sds_controller_event_completion( | |||
1395 | case SCU_EVENT_SPECIFIC_SMP_RESPONSE_NO_PE: | 1395 | case SCU_EVENT_SPECIFIC_SMP_RESPONSE_NO_PE: |
1396 | case SCU_EVENT_SPECIFIC_TASK_TIMEOUT: | 1396 | case SCU_EVENT_SPECIFIC_TASK_TIMEOUT: |
1397 | io_request = this_controller->io_request_table[index]; | 1397 | io_request = this_controller->io_request_table[index]; |
1398 | if (io_request != SCI_INVALID_HANDLE) | 1398 | if (io_request != NULL) |
1399 | scic_sds_io_request_event_handler(io_request, completion_entry); | 1399 | scic_sds_io_request_event_handler(io_request, completion_entry); |
1400 | else | 1400 | else |
1401 | dev_warn(scic_to_dev(this_controller), | 1401 | dev_warn(scic_to_dev(this_controller), |
@@ -1410,7 +1410,7 @@ static void scic_sds_controller_event_completion( | |||
1410 | 1410 | ||
1411 | case SCU_EVENT_SPECIFIC_IT_NEXUS_TIMEOUT: | 1411 | case SCU_EVENT_SPECIFIC_IT_NEXUS_TIMEOUT: |
1412 | device = this_controller->device_table[index]; | 1412 | device = this_controller->device_table[index]; |
1413 | if (device != SCI_INVALID_HANDLE) | 1413 | if (device != NULL) |
1414 | scic_sds_remote_device_event_handler(device, completion_entry); | 1414 | scic_sds_remote_device_event_handler(device, completion_entry); |
1415 | else | 1415 | else |
1416 | dev_warn(scic_to_dev(this_controller), | 1416 | dev_warn(scic_to_dev(this_controller), |
@@ -2174,7 +2174,7 @@ struct scic_sds_request *scic_sds_controller_get_io_request_from_tag( | |||
2174 | task_index = scic_sds_io_tag_get_index(io_tag); | 2174 | task_index = scic_sds_io_tag_get_index(io_tag); |
2175 | 2175 | ||
2176 | if (task_index < this_controller->task_context_entries) { | 2176 | if (task_index < this_controller->task_context_entries) { |
2177 | if (this_controller->io_request_table[task_index] != SCI_INVALID_HANDLE) { | 2177 | if (this_controller->io_request_table[task_index] != NULL) { |
2178 | task_sequence = scic_sds_io_tag_get_sequence(io_tag); | 2178 | task_sequence = scic_sds_io_tag_get_sequence(io_tag); |
2179 | 2179 | ||
2180 | if (task_sequence == this_controller->io_request_sequence[task_index]) { | 2180 | if (task_sequence == this_controller->io_request_sequence[task_index]) { |
@@ -2183,7 +2183,7 @@ struct scic_sds_request *scic_sds_controller_get_io_request_from_tag( | |||
2183 | } | 2183 | } |
2184 | } | 2184 | } |
2185 | 2185 | ||
2186 | return SCI_INVALID_HANDLE; | 2186 | return NULL; |
2187 | } | 2187 | } |
2188 | 2188 | ||
2189 | /** | 2189 | /** |
@@ -2240,7 +2240,7 @@ void scic_sds_controller_free_remote_node_context( | |||
2240 | u32 remote_node_count = scic_sds_remote_device_node_count(the_device); | 2240 | u32 remote_node_count = scic_sds_remote_device_node_count(the_device); |
2241 | 2241 | ||
2242 | if (this_controller->device_table[node_id] == the_device) { | 2242 | if (this_controller->device_table[node_id] == the_device) { |
2243 | this_controller->device_table[node_id] = SCI_INVALID_HANDLE; | 2243 | this_controller->device_table[node_id] = NULL; |
2244 | 2244 | ||
2245 | scic_sds_remote_node_table_release_remote_node_index( | 2245 | scic_sds_remote_node_table_release_remote_node_index( |
2246 | &this_controller->available_remote_nodes, remote_node_count, node_id | 2246 | &this_controller->available_remote_nodes, remote_node_count, node_id |
@@ -2262,7 +2262,7 @@ union scu_remote_node_context *scic_sds_controller_get_remote_node_context_buffe | |||
2262 | ) { | 2262 | ) { |
2263 | if ( | 2263 | if ( |
2264 | (node_id < this_controller->remote_node_entries) | 2264 | (node_id < this_controller->remote_node_entries) |
2265 | && (this_controller->device_table[node_id] != SCI_INVALID_HANDLE) | 2265 | && (this_controller->device_table[node_id] != NULL) |
2266 | ) { | 2266 | ) { |
2267 | return &this_controller->remote_node_context_table[node_id]; | 2267 | return &this_controller->remote_node_context_table[node_id]; |
2268 | } | 2268 | } |
@@ -2449,7 +2449,7 @@ u32 scic_controller_get_suggested_start_timeout( | |||
2449 | struct scic_sds_controller *sc) | 2449 | struct scic_sds_controller *sc) |
2450 | { | 2450 | { |
2451 | /* Validate the user supplied parameters. */ | 2451 | /* Validate the user supplied parameters. */ |
2452 | if (sc == SCI_INVALID_HANDLE) | 2452 | if (sc == NULL) |
2453 | return 0; | 2453 | return 0; |
2454 | 2454 | ||
2455 | /* | 2455 | /* |
@@ -3659,7 +3659,7 @@ static enum sci_status scic_sds_controller_ready_state_complete_io_handler( | |||
3659 | 3659 | ||
3660 | if (status == SCI_SUCCESS) { | 3660 | if (status == SCI_SUCCESS) { |
3661 | index = scic_sds_io_tag_get_index(the_request->io_tag); | 3661 | index = scic_sds_io_tag_get_index(the_request->io_tag); |
3662 | this_controller->io_request_table[index] = SCI_INVALID_HANDLE; | 3662 | this_controller->io_request_table[index] = NULL; |
3663 | } | 3663 | } |
3664 | 3664 | ||
3665 | return status; | 3665 | return status; |
diff --git a/drivers/scsi/isci/core/scic_sds_phy.c b/drivers/scsi/isci/core/scic_sds_phy.c index 7d012b571b5b..01da46ae270a 100644 --- a/drivers/scsi/isci/core/scic_sds_phy.c +++ b/drivers/scsi/isci/core/scic_sds_phy.c | |||
@@ -414,15 +414,15 @@ void scic_sds_phy_construct( | |||
414 | * containing port. | 414 | * containing port. |
415 | * | 415 | * |
416 | * This method returns a handle to a port that contains the supplied phy. | 416 | * This method returns a handle to a port that contains the supplied phy. |
417 | * SCI_INVALID_HANDLE This value is returned if the phy is not part of a real | 417 | * NULL This value is returned if the phy is not part of a real |
418 | * port (i.e. it's contained in the dummy port). !SCI_INVALID_HANDLE All other | 418 | * port (i.e. it's contained in the dummy port). !NULL All other |
419 | * values indicate a handle/pointer to the port containing the phy. | 419 | * values indicate a handle/pointer to the port containing the phy. |
420 | */ | 420 | */ |
421 | struct scic_sds_port *scic_sds_phy_get_port( | 421 | struct scic_sds_port *scic_sds_phy_get_port( |
422 | struct scic_sds_phy *this_phy) | 422 | struct scic_sds_phy *this_phy) |
423 | { | 423 | { |
424 | if (scic_sds_port_get_index(this_phy->owning_port) == SCIC_SDS_DUMMY_PORT) | 424 | if (scic_sds_port_get_index(this_phy->owning_port) == SCIC_SDS_DUMMY_PORT) |
425 | return SCI_INVALID_HANDLE; | 425 | return NULL; |
426 | 426 | ||
427 | return this_phy->owning_port; | 427 | return this_phy->owning_port; |
428 | } | 428 | } |
@@ -2373,7 +2373,7 @@ static enum sci_status scic_sds_phy_ready_state_event_handler( | |||
2373 | 2373 | ||
2374 | case SCU_EVENT_BROADCAST_CHANGE: | 2374 | case SCU_EVENT_BROADCAST_CHANGE: |
2375 | /* Broadcast change received. Notify the port. */ | 2375 | /* Broadcast change received. Notify the port. */ |
2376 | if (scic_sds_phy_get_port(this_phy) != SCI_INVALID_HANDLE) | 2376 | if (scic_sds_phy_get_port(this_phy) != NULL) |
2377 | scic_sds_port_broadcast_change_received(this_phy->owning_port, this_phy); | 2377 | scic_sds_port_broadcast_change_received(this_phy->owning_port, this_phy); |
2378 | else | 2378 | else |
2379 | this_phy->bcn_received_while_port_unassigned = true; | 2379 | this_phy->bcn_received_while_port_unassigned = true; |
diff --git a/drivers/scsi/isci/core/scic_sds_port.c b/drivers/scsi/isci/core/scic_sds_port.c index 1af38505840c..9749e3abbf8e 100644 --- a/drivers/scsi/isci/core/scic_sds_port.c +++ b/drivers/scsi/isci/core/scic_sds_port.c | |||
@@ -277,8 +277,8 @@ enum sci_status scic_sds_port_set_phy( | |||
277 | * that means that the phy is not part of a port and that the port does | 277 | * that means that the phy is not part of a port and that the port does |
278 | * not already have a phy assinged to the phy index. */ | 278 | * not already have a phy assinged to the phy index. */ |
279 | if ( | 279 | if ( |
280 | (port->phy_table[phy->phy_index] == SCI_INVALID_HANDLE) | 280 | (port->phy_table[phy->phy_index] == NULL) |
281 | && (scic_sds_phy_get_port(phy) == SCI_INVALID_HANDLE) | 281 | && (scic_sds_phy_get_port(phy) == NULL) |
282 | && scic_sds_port_is_valid_phy_assignment(port, phy->phy_index) | 282 | && scic_sds_port_is_valid_phy_assignment(port, phy->phy_index) |
283 | ) { | 283 | ) { |
284 | /* | 284 | /* |
@@ -318,7 +318,7 @@ enum sci_status scic_sds_port_clear_phy( | |||
318 | &scic_sds_port_get_controller(port)->port_table[SCI_MAX_PORTS] | 318 | &scic_sds_port_get_controller(port)->port_table[SCI_MAX_PORTS] |
319 | ); | 319 | ); |
320 | 320 | ||
321 | port->phy_table[phy->phy_index] = SCI_INVALID_HANDLE; | 321 | port->phy_table[phy->phy_index] = NULL; |
322 | 322 | ||
323 | return SCI_SUCCESS; | 323 | return SCI_SUCCESS; |
324 | } | 324 | } |
@@ -529,7 +529,7 @@ void scic_sds_port_construct( | |||
529 | this_port->started_request_count = 0; | 529 | this_port->started_request_count = 0; |
530 | this_port->assigned_device_count = 0; | 530 | this_port->assigned_device_count = 0; |
531 | 531 | ||
532 | this_port->timer_handle = SCI_INVALID_HANDLE; | 532 | this_port->timer_handle = NULL; |
533 | 533 | ||
534 | this_port->transport_layer_registers = NULL; | 534 | this_port->transport_layer_registers = NULL; |
535 | this_port->port_task_scheduler_registers = NULL; | 535 | this_port->port_task_scheduler_registers = NULL; |
@@ -669,7 +669,7 @@ enum sci_status scic_port_get_properties( | |||
669 | struct scic_sds_port *port, | 669 | struct scic_sds_port *port, |
670 | struct scic_port_properties *prop) | 670 | struct scic_port_properties *prop) |
671 | { | 671 | { |
672 | if ((port == SCI_INVALID_HANDLE) || | 672 | if ((port == NULL) || |
673 | (port->logical_port_index == SCIC_SDS_DUMMY_PORT)) | 673 | (port->logical_port_index == SCIC_SDS_DUMMY_PORT)) |
674 | return SCI_FAILURE_INVALID_PORT; | 674 | return SCI_FAILURE_INVALID_PORT; |
675 | 675 | ||
@@ -1267,29 +1267,29 @@ static enum sci_status scic_sds_port_ready_operational_substate_reset_handler( | |||
1267 | enum sci_status status = SCI_FAILURE_INVALID_PHY; | 1267 | enum sci_status status = SCI_FAILURE_INVALID_PHY; |
1268 | u32 phy_index; | 1268 | u32 phy_index; |
1269 | struct scic_sds_port *this_port = (struct scic_sds_port *)port; | 1269 | struct scic_sds_port *this_port = (struct scic_sds_port *)port; |
1270 | struct scic_sds_phy *selected_phy = SCI_INVALID_HANDLE; | 1270 | struct scic_sds_phy *selected_phy = NULL; |
1271 | 1271 | ||
1272 | 1272 | ||
1273 | /* Select a phy on which we can send the hard reset request. */ | 1273 | /* Select a phy on which we can send the hard reset request. */ |
1274 | for ( | 1274 | for ( |
1275 | phy_index = 0; | 1275 | phy_index = 0; |
1276 | (phy_index < SCI_MAX_PHYS) | 1276 | (phy_index < SCI_MAX_PHYS) |
1277 | && (selected_phy == SCI_INVALID_HANDLE); | 1277 | && (selected_phy == NULL); |
1278 | phy_index++ | 1278 | phy_index++ |
1279 | ) { | 1279 | ) { |
1280 | selected_phy = this_port->phy_table[phy_index]; | 1280 | selected_phy = this_port->phy_table[phy_index]; |
1281 | 1281 | ||
1282 | if ( | 1282 | if ( |
1283 | (selected_phy != SCI_INVALID_HANDLE) | 1283 | (selected_phy != NULL) |
1284 | && !scic_sds_port_active_phy(this_port, selected_phy) | 1284 | && !scic_sds_port_active_phy(this_port, selected_phy) |
1285 | ) { | 1285 | ) { |
1286 | /* We found a phy but it is not ready select different phy */ | 1286 | /* We found a phy but it is not ready select different phy */ |
1287 | selected_phy = SCI_INVALID_HANDLE; | 1287 | selected_phy = NULL; |
1288 | } | 1288 | } |
1289 | } | 1289 | } |
1290 | 1290 | ||
1291 | /* If we have a phy then go ahead and start the reset procedure */ | 1291 | /* If we have a phy then go ahead and start the reset procedure */ |
1292 | if (selected_phy != SCI_INVALID_HANDLE) { | 1292 | if (selected_phy != NULL) { |
1293 | status = scic_sds_phy_reset(selected_phy); | 1293 | status = scic_sds_phy_reset(selected_phy); |
1294 | 1294 | ||
1295 | if (status == SCI_SUCCESS) { | 1295 | if (status == SCI_SUCCESS) { |
diff --git a/drivers/scsi/isci/core/scic_sds_port_configuration_agent.c b/drivers/scsi/isci/core/scic_sds_port_configuration_agent.c index 37d4469162a7..dd2cdd4a6fe1 100644 --- a/drivers/scsi/isci/core/scic_sds_port_configuration_agent.c +++ b/drivers/scsi/isci/core/scic_sds_port_configuration_agent.c | |||
@@ -118,9 +118,9 @@ static s32 sci_sas_address_compare( | |||
118 | * | 118 | * |
119 | * This routine will find a matching port for the phy. This means that the | 119 | * This routine will find a matching port for the phy. This means that the |
120 | * port and phy both have the same broadcast sas address and same received sas | 120 | * port and phy both have the same broadcast sas address and same received sas |
121 | * address. The port address or the SCI_INVALID_HANDLE if there is no matching | 121 | * address. The port address or the NULL if there is no matching |
122 | * port. port address if the port can be found to match the phy. | 122 | * port. port address if the port can be found to match the phy. |
123 | * SCI_INVALID_HANDLE if there is no matching port for the phy. | 123 | * NULL if there is no matching port for the phy. |
124 | */ | 124 | */ |
125 | static struct scic_sds_port *scic_sds_port_configuration_agent_find_port( | 125 | static struct scic_sds_port *scic_sds_port_configuration_agent_find_port( |
126 | struct scic_sds_controller *controller, | 126 | struct scic_sds_controller *controller, |
@@ -156,7 +156,7 @@ static struct scic_sds_port *scic_sds_port_configuration_agent_find_port( | |||
156 | } | 156 | } |
157 | } | 157 | } |
158 | 158 | ||
159 | return SCI_INVALID_HANDLE; | 159 | return NULL; |
160 | } | 160 | } |
161 | 161 | ||
162 | /** | 162 | /** |
@@ -390,7 +390,7 @@ static void scic_sds_mpc_agent_timeout_handler( | |||
390 | * @controller: This is the controller object that receives the link up | 390 | * @controller: This is the controller object that receives the link up |
391 | * notification. | 391 | * notification. |
392 | * @port: This is the port object associated with the phy. If the is no | 392 | * @port: This is the port object associated with the phy. If the is no |
393 | * associated port this is an SCI_INVALID_HANDLE. | 393 | * associated port this is an NULL. |
394 | * @phy: This is the phy object which has gone ready. | 394 | * @phy: This is the phy object which has gone ready. |
395 | * | 395 | * |
396 | * This method handles the manual port configuration link up notifications. | 396 | * This method handles the manual port configuration link up notifications. |
@@ -409,7 +409,7 @@ static void scic_sds_mpc_agent_link_up( | |||
409 | * If the port has an invalid handle then the phy was not assigned to | 409 | * If the port has an invalid handle then the phy was not assigned to |
410 | * a port. This is because the phy was not given the same SAS Address | 410 | * a port. This is because the phy was not given the same SAS Address |
411 | * as the other PHYs in the port. */ | 411 | * as the other PHYs in the port. */ |
412 | if (port != SCI_INVALID_HANDLE) { | 412 | if (port != NULL) { |
413 | port_agent->phy_ready_mask |= (1 << scic_sds_phy_get_index(phy)); | 413 | port_agent->phy_ready_mask |= (1 << scic_sds_phy_get_index(phy)); |
414 | 414 | ||
415 | scic_sds_port_link_up(port, phy); | 415 | scic_sds_port_link_up(port, phy); |
@@ -425,7 +425,7 @@ static void scic_sds_mpc_agent_link_up( | |||
425 | * @controller: This is the controller object that receives the link down | 425 | * @controller: This is the controller object that receives the link down |
426 | * notification. | 426 | * notification. |
427 | * @port: This is the port object associated with the phy. If the is no | 427 | * @port: This is the port object associated with the phy. If the is no |
428 | * associated port this is an SCI_INVALID_HANDLE. The port is an invalid | 428 | * associated port this is an NULL. The port is an invalid |
429 | * handle only if the phy was never port of this port. This happens when | 429 | * handle only if the phy was never port of this port. This happens when |
430 | * the phy is not broadcasting the same SAS address as the other phys in the | 430 | * the phy is not broadcasting the same SAS address as the other phys in the |
431 | * assigned port. | 431 | * assigned port. |
@@ -443,7 +443,7 @@ static void scic_sds_mpc_agent_link_down( | |||
443 | struct scic_sds_port *port, | 443 | struct scic_sds_port *port, |
444 | struct scic_sds_phy *phy) | 444 | struct scic_sds_phy *phy) |
445 | { | 445 | { |
446 | if (port != SCI_INVALID_HANDLE) { | 446 | if (port != NULL) { |
447 | /* | 447 | /* |
448 | * If we can form a new port from the remainder of the phys then we want | 448 | * If we can form a new port from the remainder of the phys then we want |
449 | * to start the timer to allow the SCI User to cleanup old devices and | 449 | * to start the timer to allow the SCI User to cleanup old devices and |
@@ -573,7 +573,7 @@ static void scic_sds_apc_agent_configure_ports( | |||
573 | 573 | ||
574 | port = scic_sds_port_configuration_agent_find_port(controller, phy); | 574 | port = scic_sds_port_configuration_agent_find_port(controller, phy); |
575 | 575 | ||
576 | if (port != SCI_INVALID_HANDLE) { | 576 | if (port != NULL) { |
577 | if (scic_sds_port_is_valid_phy_assignment(port, phy->phy_index)) | 577 | if (scic_sds_port_is_valid_phy_assignment(port, phy->phy_index)) |
578 | apc_activity = SCIC_SDS_APC_ADD_PHY; | 578 | apc_activity = SCIC_SDS_APC_ADD_PHY; |
579 | else | 579 | else |
@@ -680,7 +680,7 @@ static void scic_sds_apc_agent_configure_ports( | |||
680 | * @controller: This is the controller object that receives the link up | 680 | * @controller: This is the controller object that receives the link up |
681 | * notification. | 681 | * notification. |
682 | * @port: This is the port object associated with the phy. If the is no | 682 | * @port: This is the port object associated with the phy. If the is no |
683 | * associated port this is an SCI_INVALID_HANDLE. | 683 | * associated port this is an NULL. |
684 | * @phy: This is the phy object which has gone link up. | 684 | * @phy: This is the phy object which has gone link up. |
685 | * | 685 | * |
686 | * This method handles the automatic port configuration for link up | 686 | * This method handles the automatic port configuration for link up |
@@ -693,7 +693,7 @@ static void scic_sds_apc_agent_link_up( | |||
693 | struct scic_sds_port *port, | 693 | struct scic_sds_port *port, |
694 | struct scic_sds_phy *phy) | 694 | struct scic_sds_phy *phy) |
695 | { | 695 | { |
696 | BUG_ON(port != SCI_INVALID_HANDLE); | 696 | BUG_ON(port != NULL); |
697 | 697 | ||
698 | port_agent->phy_ready_mask |= (1 << scic_sds_phy_get_index(phy)); | 698 | port_agent->phy_ready_mask |= (1 << scic_sds_phy_get_index(phy)); |
699 | 699 | ||
@@ -705,7 +705,7 @@ static void scic_sds_apc_agent_link_up( | |||
705 | * @controller: This is the controller object that receives the link down | 705 | * @controller: This is the controller object that receives the link down |
706 | * notification. | 706 | * notification. |
707 | * @port: This is the port object associated with the phy. If the is no | 707 | * @port: This is the port object associated with the phy. If the is no |
708 | * associated port this is an SCI_INVALID_HANDLE. | 708 | * associated port this is an NULL. |
709 | * @phy: This is the phy object which has gone link down. | 709 | * @phy: This is the phy object which has gone link down. |
710 | * | 710 | * |
711 | * This method handles the automatic port configuration link down | 711 | * This method handles the automatic port configuration link down |
@@ -721,7 +721,7 @@ static void scic_sds_apc_agent_link_down( | |||
721 | { | 721 | { |
722 | port_agent->phy_ready_mask &= ~(1 << scic_sds_phy_get_index(phy)); | 722 | port_agent->phy_ready_mask &= ~(1 << scic_sds_phy_get_index(phy)); |
723 | 723 | ||
724 | if (port != SCI_INVALID_HANDLE) { | 724 | if (port != NULL) { |
725 | if (port_agent->phy_configured_mask & (1 << phy->phy_index)) { | 725 | if (port_agent->phy_configured_mask & (1 << phy->phy_index)) { |
726 | enum sci_status status; | 726 | enum sci_status status; |
727 | 727 | ||
diff --git a/drivers/scsi/isci/core/scic_sds_remote_device.c b/drivers/scsi/isci/core/scic_sds_remote_device.c index 21f03bc7d797..cb26d0c3c21c 100644 --- a/drivers/scsi/isci/core/scic_sds_remote_device.c +++ b/drivers/scsi/isci/core/scic_sds_remote_device.c | |||
@@ -1170,7 +1170,7 @@ enum sci_status scic_sds_remote_device_general_frame_handler( | |||
1170 | io_request = scic_sds_controller_get_io_request_from_tag( | 1170 | io_request = scic_sds_controller_get_io_request_from_tag( |
1171 | scic_sds_remote_device_get_controller(this_device), frame_header->tag); | 1171 | scic_sds_remote_device_get_controller(this_device), frame_header->tag); |
1172 | 1172 | ||
1173 | if ((io_request == SCI_INVALID_HANDLE) | 1173 | if ((io_request == NULL) |
1174 | || (io_request->target_device != this_device)) { | 1174 | || (io_request->target_device != this_device)) { |
1175 | /* | 1175 | /* |
1176 | * We could not map this tag to a valid IO request | 1176 | * We could not map this tag to a valid IO request |
diff --git a/drivers/scsi/isci/core/scic_user_callback.h b/drivers/scsi/isci/core/scic_user_callback.h index 6eca5a96649e..4aa020e2f079 100644 --- a/drivers/scsi/isci/core/scic_user_callback.h +++ b/drivers/scsi/isci/core/scic_user_callback.h | |||
@@ -600,7 +600,7 @@ void scic_cb_port_invalid_link_up( | |||
600 | * @port: This parameter specifies the SCI port object for which the callback | 600 | * @port: This parameter specifies the SCI port object for which the callback |
601 | * is being invoked. For instances where the phy on which the primitive was | 601 | * is being invoked. For instances where the phy on which the primitive was |
602 | * received is not part of a port, this parameter will be | 602 | * received is not part of a port, this parameter will be |
603 | * SCI_INVALID_HANDLE_T. | 603 | * NULL. |
604 | * @phy: This parameter specifies the phy on which the primitive was received. | 604 | * @phy: This parameter specifies the phy on which the primitive was received. |
605 | * | 605 | * |
606 | */ | 606 | */ |
@@ -620,7 +620,7 @@ void scic_cb_port_bc_change_primitive_received( | |||
620 | * phy. | 620 | * phy. |
621 | * @port: This parameter specifies the port object for which the user callback | 621 | * @port: This parameter specifies the port object for which the user callback |
622 | * is being invoked. There may be conditions where this parameter can be | 622 | * is being invoked. There may be conditions where this parameter can be |
623 | * SCI_INVALID_HANDLE | 623 | * NULL |
624 | * @phy: This parameter specifies the phy object for which the user callback is | 624 | * @phy: This parameter specifies the phy object for which the user callback is |
625 | * being invoked. | 625 | * being invoked. |
626 | * | 626 | * |
@@ -638,7 +638,7 @@ void scic_cb_port_link_up( | |||
638 | * phy. | 638 | * phy. |
639 | * @port: This parameter specifies the port object for which the user callback | 639 | * @port: This parameter specifies the port object for which the user callback |
640 | * is being invoked. There may be conditions where this parameter can be | 640 | * is being invoked. There may be conditions where this parameter can be |
641 | * SCI_INVALID_HANDLE | 641 | * NULL |
642 | * @phy: This parameter specifies the phy object for which the user callback is | 642 | * @phy: This parameter specifies the phy object for which the user callback is |
643 | * being invoked. | 643 | * being invoked. |
644 | * | 644 | * |
diff --git a/drivers/scsi/isci/events.c b/drivers/scsi/isci/events.c index 75f9cd551278..6911ea5d1937 100644 --- a/drivers/scsi/isci/events.c +++ b/drivers/scsi/isci/events.c | |||
@@ -399,8 +399,7 @@ void scic_cb_port_invalid_link_up( | |||
399 | * port. | 399 | * port. |
400 | * @port: This parameter specifies the SCI port object for which the callback | 400 | * @port: This parameter specifies the SCI port object for which the callback |
401 | * is being invoked. For instances where the phy on which the primitive was | 401 | * is being invoked. For instances where the phy on which the primitive was |
402 | * received is not part of a port, this parameter will be | 402 | * received is not part of a port, this parameter will be NULL. |
403 | * SCI_INVALID_HANDLE_T. | ||
404 | * @phy: This parameter specifies the phy on which the primitive was received. | 403 | * @phy: This parameter specifies the phy on which the primitive was received. |
405 | * | 404 | * |
406 | */ | 405 | */ |
@@ -430,7 +429,7 @@ void scic_cb_port_bc_change_primitive_received( | |||
430 | * phy. | 429 | * phy. |
431 | * @port: This parameter specifies the port object for which the user callback | 430 | * @port: This parameter specifies the port object for which the user callback |
432 | * is being invoked. There may be conditions where this parameter can be | 431 | * is being invoked. There may be conditions where this parameter can be |
433 | * SCI_INVALID_HANDLE | 432 | * NULL |
434 | * @phy: This parameter specifies the phy object for which the user callback is | 433 | * @phy: This parameter specifies the phy object for which the user callback is |
435 | * being invoked. | 434 | * being invoked. |
436 | * | 435 | * |
@@ -460,7 +459,7 @@ void scic_cb_port_link_up( | |||
460 | * phy. | 459 | * phy. |
461 | * @port: This parameter specifies the port object for which the user callback | 460 | * @port: This parameter specifies the port object for which the user callback |
462 | * is being invoked. There may be conditions where this parameter can be | 461 | * is being invoked. There may be conditions where this parameter can be |
463 | * SCI_INVALID_HANDLE | 462 | * NULL |
464 | * @phy: This parameter specifies the phy object for which the user callback is | 463 | * @phy: This parameter specifies the phy object for which the user callback is |
465 | * being invoked. | 464 | * being invoked. |
466 | * | 465 | * |