Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

isci: Handle all suspending TC completions

Add comprehensive decode for all TC completions that generate RNC
suspensions.

Note that this commit also removes unconditional resumptions of ATAPI
devices when in the SCI_STP_DEV_ATAPI_ERROR state, and STP devices
when in the SCI_STP_DEV_IDLE state. This is because the SCI_STP_DEV_IDLE
and SCI_STP_DEV_ATAPI state entry functions manage the RNC resumption.

Signed-off-by: Jeff Skirvin <jeffrey.d.skirvin@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>

authored by

Jeff Skirvin and committed by
Dan Williams
ac78ed0f 56d7c013

+242 -87
+42 -44
drivers/scsi/isci/remote_device.c
··· 265 265 return SCI_SUCCESS; 266 266 } 267 267 268 - enum sci_status sci_remote_device_suspend(struct isci_remote_device *idev, 269 - u32 suspend_type) 268 + enum sci_status sci_remote_device_suspend(struct isci_remote_device *idev) 270 269 { 271 - struct sci_base_state_machine *sm = &idev->sm; 272 - enum sci_remote_device_states state = sm->current_state_id; 273 - 274 - if (state != SCI_STP_DEV_CMD) { 275 - dev_warn(scirdev_to_dev(idev), "%s: in wrong state: %s\n", 276 - __func__, dev_state_name(state)); 277 - return SCI_FAILURE_INVALID_STATE; 278 - } 279 - 280 270 return sci_remote_node_context_suspend(&idev->rnc, 281 - suspend_type, NULL, NULL); 271 + SCI_SOFTWARE_SUSPENSION, 272 + SCI_SOFTWARE_SUSPEND_EXPECTED_EVENT, 273 + NULL, NULL); 282 274 } 283 275 284 276 enum sci_status sci_remote_device_frame_handler(struct isci_remote_device *idev, ··· 404 412 enum sci_status sci_remote_device_event_handler(struct isci_remote_device *idev, 405 413 u32 event_code) 406 414 { 407 - struct sci_base_state_machine *sm = &idev->sm; 408 - enum sci_remote_device_states state = sm->current_state_id; 409 415 enum sci_status status; 410 416 411 417 switch (scu_get_event_type(event_code)) { ··· 417 427 status = SCI_SUCCESS; 418 428 419 429 /* Suspend the associated RNC */ 420 - sci_remote_node_context_suspend(&idev->rnc, 421 - SCI_SOFTWARE_SUSPENSION, 422 - NULL, NULL); 430 + sci_remote_node_context_suspend( 431 + &idev->rnc, 432 + SCI_SOFTWARE_SUSPENSION, 433 + SCI_SOFTWARE_SUSPEND_EXPECTED_EVENT, 434 + NULL, NULL); 423 435 424 436 dev_dbg(scirdev_to_dev(idev), 425 437 "%s: device: %p event code: %x: %s\n", ··· 446 454 447 455 if (status != SCI_SUCCESS) 448 456 return status; 449 - 450 - if (state == SCI_STP_DEV_ATAPI_ERROR) { 451 - /* For ATAPI error state resume the RNC right away. */ 452 - if (scu_get_event_type(event_code) == SCU_EVENT_TYPE_RNC_SUSPEND_TX || 453 - scu_get_event_type(event_code) == SCU_EVENT_TYPE_RNC_SUSPEND_TX_RX) { 454 - return sci_remote_node_context_resume(&idev->rnc, 455 - atapi_remote_device_resume_done, 456 - idev); 457 - } 458 - } 459 - 460 - if (state == SCI_STP_DEV_IDLE) { 461 - 462 - /* We pick up suspension events to handle specifically to this 463 - * state. We resume the RNC right away. 464 - */ 465 - if (scu_get_event_type(event_code) == SCU_EVENT_TYPE_RNC_SUSPEND_TX || 466 - scu_get_event_type(event_code) == SCU_EVENT_TYPE_RNC_SUSPEND_TX_RX) 467 - status = sci_remote_node_context_resume(&idev->rnc, NULL, NULL); 468 - } 469 457 470 458 return status; 471 459 } ··· 737 765 * the correct action when the remote node context is suspended 738 766 * and later resumed. 739 767 */ 740 - sci_remote_node_context_suspend(&idev->rnc, 741 - SCI_SOFTWARE_SUSPENSION, NULL, NULL); 742 - sci_remote_node_context_resume(&idev->rnc, 743 - sci_remote_device_continue_request, 744 - idev); 768 + sci_remote_node_context_suspend( 769 + &idev->rnc, SCI_SOFTWARE_SUSPENSION, 770 + SCI_SOFTWARE_SUSPEND_EXPECTED_EVENT, NULL, NULL); 771 + sci_remote_node_context_resume( 772 + &idev->rnc, sci_remote_device_continue_request, idev); 745 773 746 774 out: 747 775 sci_remote_device_start_request(idev, ireq, status); ··· 926 954 static void sci_remote_device_resetting_state_enter(struct sci_base_state_machine *sm) 927 955 { 928 956 struct isci_remote_device *idev = container_of(sm, typeof(*idev), sm); 957 + struct isci_host *ihost = idev->owning_port->owning_controller; 958 + 959 + dev_dbg(&ihost->pdev->dev, 960 + "%s: isci_device = %p\n", __func__, idev); 929 961 930 962 sci_remote_node_context_suspend( 931 - &idev->rnc, SCI_SOFTWARE_SUSPENSION, NULL, NULL); 963 + &idev->rnc, SCI_SOFTWARE_SUSPENSION, 964 + SCI_SOFTWARE_SUSPEND_EXPECTED_EVENT, NULL, NULL); 932 965 } 933 966 934 967 static void sci_remote_device_resetting_state_exit(struct sci_base_state_machine *sm) 935 968 { 936 969 struct isci_remote_device *idev = container_of(sm, typeof(*idev), sm); 970 + struct isci_host *ihost = idev->owning_port->owning_controller; 971 + 972 + dev_dbg(&ihost->pdev->dev, 973 + "%s: isci_device = %p\n", __func__, idev); 937 974 938 975 sci_remote_node_context_resume(&idev->rnc, NULL, NULL); 939 976 } ··· 983 1002 if (idev->not_ready_reason == SCIC_REMOTE_DEVICE_NOT_READY_SATA_SDB_ERROR_FIS_RECEIVED) 984 1003 isci_remote_device_not_ready(ihost, idev, 985 1004 idev->not_ready_reason); 1005 + } 1006 + 1007 + static void sci_stp_remote_device_atapi_error_substate_enter( 1008 + struct sci_base_state_machine *sm) 1009 + { 1010 + struct isci_remote_device *idev = container_of(sm, typeof(*idev), sm); 1011 + 1012 + /* This state is entered when an I/O is decoded with an error 1013 + * condition. By this point the RNC expected suspension state is set. 1014 + * The error conditions suspend the device, so unsuspend here if 1015 + * possible. 1016 + */ 1017 + sci_remote_node_context_resume(&idev->rnc, 1018 + atapi_remote_device_resume_done, 1019 + idev); 986 1020 } 987 1021 988 1022 static void sci_smp_remote_device_ready_idle_substate_enter(struct sci_base_state_machine *sm) ··· 1050 1054 [SCI_STP_DEV_NCQ_ERROR] = { 1051 1055 .enter_state = sci_stp_remote_device_ready_ncq_error_substate_enter, 1052 1056 }, 1053 - [SCI_STP_DEV_ATAPI_ERROR] = { }, 1057 + [SCI_STP_DEV_ATAPI_ERROR] = { 1058 + .enter_state = sci_stp_remote_device_atapi_error_substate_enter, 1059 + }, 1054 1060 [SCI_STP_DEV_AWAIT_RESET] = { }, 1055 1061 [SCI_SMP_DEV_IDLE] = { 1056 1062 .enter_state = sci_smp_remote_device_ready_idle_substate_enter,
-4
drivers/scsi/isci/remote_device.h
··· 331 331 struct isci_remote_device *idev, 332 332 struct isci_request *ireq); 333 333 334 - enum sci_status sci_remote_device_suspend( 335 - struct isci_remote_device *idev, 336 - u32 suspend_type); 337 - 338 334 void sci_remote_device_post_request( 339 335 struct isci_remote_device *idev, 340 336 u32 request);
+51 -23
drivers/scsi/isci/remote_node_context.c
··· 367 367 u32 event_code) 368 368 { 369 369 enum scis_sds_remote_node_context_states state; 370 + u32 next_state; 370 371 371 372 state = sci_rnc->sm.current_state_id; 372 373 switch (state) { ··· 426 425 switch (scu_get_event_type(event_code)) { 427 426 case SCU_EVENT_TL_RNC_SUSPEND_TX: 428 427 sci_change_state(&sci_rnc->sm, SCI_RNC_TX_SUSPENDED); 429 - sci_rnc->suspension_code = scu_get_event_specifier(event_code); 428 + sci_rnc->suspend_type = scu_get_event_type(event_code); 430 429 break; 431 430 case SCU_EVENT_TL_RNC_SUSPEND_TX_RX: 432 431 sci_change_state(&sci_rnc->sm, SCI_RNC_TX_RX_SUSPENDED); 433 - sci_rnc->suspension_code = scu_get_event_specifier(event_code); 432 + sci_rnc->suspend_type = scu_get_event_type(event_code); 434 433 break; 435 434 default: 436 435 goto out; ··· 439 438 case SCI_RNC_AWAIT_SUSPENSION: 440 439 switch (scu_get_event_type(event_code)) { 441 440 case SCU_EVENT_TL_RNC_SUSPEND_TX: 442 - sci_change_state(&sci_rnc->sm, SCI_RNC_TX_SUSPENDED); 443 - sci_rnc->suspension_code = scu_get_event_specifier(event_code); 441 + next_state = SCI_RNC_TX_SUSPENDED; 444 442 break; 445 443 case SCU_EVENT_TL_RNC_SUSPEND_TX_RX: 446 - sci_change_state(&sci_rnc->sm, SCI_RNC_TX_RX_SUSPENDED); 447 - sci_rnc->suspension_code = scu_get_event_specifier(event_code); 444 + next_state = SCI_RNC_TX_RX_SUSPENDED; 448 445 break; 449 446 default: 450 447 goto out; 451 448 } 449 + if (sci_rnc->suspend_type == scu_get_event_type(event_code)) 450 + sci_change_state(&sci_rnc->sm, next_state); 452 451 break; 453 452 default: 454 453 dev_warn(scirdev_to_dev(rnc_to_dev(sci_rnc)), ··· 503 502 } 504 503 } 505 504 506 - enum sci_status sci_remote_node_context_suspend(struct sci_remote_node_context *sci_rnc, 507 - u32 suspend_type, 508 - scics_sds_remote_node_context_callback cb_fn, 509 - void *cb_p) 505 + enum sci_status sci_remote_node_context_suspend( 506 + struct sci_remote_node_context *sci_rnc, 507 + enum sci_remote_node_suspension_reasons suspend_reason, 508 + u32 suspend_type, 509 + scics_sds_remote_node_context_callback cb_fn, 510 + void *cb_p) 510 511 { 511 - enum scis_sds_remote_node_context_states state; 512 + enum scis_sds_remote_node_context_states state 513 + = sci_rnc->sm.current_state_id; 514 + struct isci_remote_device *idev = rnc_to_dev(sci_rnc); 515 + enum sci_status status = SCI_FAILURE_INVALID_STATE; 512 516 513 - state = sci_rnc->sm.current_state_id; 514 - if (state != SCI_RNC_READY) { 517 + /* Disable automatic state continuations if explicitly suspending. */ 518 + if (suspend_reason == SCI_SOFTWARE_SUSPENSION) 519 + sci_rnc->destination_state 520 + = SCIC_SDS_REMOTE_NODE_DESTINATION_STATE_UNSPECIFIED; 521 + switch (state) { 522 + case SCI_RNC_READY: 523 + break; 524 + case SCI_RNC_TX_SUSPENDED: 525 + if (suspend_type == SCU_EVENT_TL_RNC_SUSPEND_TX) 526 + status = SCI_SUCCESS; 527 + break; 528 + case SCI_RNC_TX_RX_SUSPENDED: 529 + if (suspend_type == SCU_EVENT_TL_RNC_SUSPEND_TX_RX) 530 + status = SCI_SUCCESS; 531 + break; 532 + case SCI_RNC_AWAIT_SUSPENSION: 533 + if ((sci_rnc->suspend_type == SCU_EVENT_TL_RNC_SUSPEND_TX_RX) 534 + || (suspend_type == sci_rnc->suspend_type)) 535 + return SCI_SUCCESS; 536 + break; 537 + default: 515 538 dev_warn(scirdev_to_dev(rnc_to_dev(sci_rnc)), 516 539 "%s: invalid state %s\n", __func__, 517 540 rnc_state_name(state)); 518 541 return SCI_FAILURE_INVALID_STATE; 519 542 } 543 + sci_rnc->user_callback = cb_fn; 544 + sci_rnc->user_cookie = cb_p; 545 + sci_rnc->suspend_type = suspend_type; 520 546 521 - sci_rnc->user_callback = cb_fn; 522 - sci_rnc->user_cookie = cb_p; 523 - sci_rnc->suspension_code = suspend_type; 524 - 525 - if (suspend_type == SCI_SOFTWARE_SUSPENSION) { 526 - sci_remote_device_post_request(rnc_to_dev(sci_rnc), 527 - SCU_CONTEXT_COMMAND_POST_RNC_SUSPEND_TX); 528 - isci_dev_set_hang_detection_timeout(rnc_to_dev(sci_rnc), 529 - 0x00000001); 547 + if (status == SCI_SUCCESS) { /* Already in the destination state? */ 548 + sci_remote_node_context_notify_user(sci_rnc); 549 + return SCI_SUCCESS; 530 550 } 551 + if (suspend_reason == SCI_SOFTWARE_SUSPENSION) { 552 + isci_dev_set_hang_detection_timeout(idev, 0x00000001); 553 + sci_remote_device_post_request( 554 + idev, SCI_SOFTWARE_SUSPEND_CMD); 555 + } 556 + if (state != SCI_RNC_AWAIT_SUSPENSION) 557 + sci_change_state(&sci_rnc->sm, SCI_RNC_AWAIT_SUSPENSION); 531 558 532 - sci_change_state(&sci_rnc->sm, SCI_RNC_AWAIT_SUSPENSION); 533 559 return SCI_SUCCESS; 534 560 } 535 561
+9 -4
drivers/scsi/isci/remote_node_context.h
··· 75 75 */ 76 76 #define SCIC_SDS_REMOTE_NODE_CONTEXT_INVALID_INDEX 0x0FFF 77 77 78 - #define SCU_HARDWARE_SUSPENSION (0) 79 - #define SCI_SOFTWARE_SUSPENSION (1) 78 + enum sci_remote_node_suspension_reasons { 79 + SCU_HARDWARE_SUSPENSION, 80 + SCI_SOFTWARE_SUSPENSION 81 + }; 82 + #define SCI_SOFTWARE_SUSPEND_CMD SCU_CONTEXT_COMMAND_POST_RNC_SUSPEND_TX_RX 83 + #define SCI_SOFTWARE_SUSPEND_EXPECTED_EVENT SCU_EVENT_TL_RNC_SUSPEND_TX_RX 80 84 81 85 struct isci_request; 82 86 struct isci_remote_device; ··· 160 156 u16 remote_node_index; 161 157 162 158 /** 163 - * This field is the recored suspension code or the reason for the remote node 159 + * This field is the recored suspension type of the remote node 164 160 * context suspension. 165 161 */ 166 - u32 suspension_code; 162 + u32 suspend_type; 167 163 168 164 /** 169 165 * This field is true if the remote node context is resuming from its current ··· 204 200 void *callback_parameter); 205 201 enum sci_status sci_remote_node_context_suspend(struct sci_remote_node_context *sci_rnc, 206 202 u32 suspend_type, 203 + u32 suspension_code, 207 204 scics_sds_remote_node_context_callback cb_fn, 208 205 void *cb_p); 209 206 enum sci_status sci_remote_node_context_resume(struct sci_remote_node_context *sci_rnc,
+138 -11
drivers/scsi/isci/request.c
··· 2116 2116 * completion. 2117 2117 */ 2118 2118 if (ireq->stp.rsp.fis_type == FIS_REGD2H) { 2119 - sci_remote_device_suspend(ireq->target_device, 2120 - SCU_EVENT_SPECIFIC(SCU_NORMALIZE_COMPLETION_STATUS(completion_code))); 2121 - 2122 2119 ireq->scu_status = SCU_TASK_DONE_CHECK_RESPONSE; 2123 2120 ireq->sci_status = SCI_FAILURE_IO_RESPONSE_VALID; 2124 2121 sci_change_state(&ireq->sm, SCI_REQ_COMPLETED); ··· 2135 2138 /* TODO We can retry the command for SCU_TASK_DONE_CMD_LL_R_ERR 2136 2139 * - this comes only for B0 2137 2140 */ 2138 - case SCU_MAKE_COMPLETION_STATUS(SCU_TASK_DONE_INV_FIS_LEN): 2139 - case SCU_MAKE_COMPLETION_STATUS(SCU_TASK_DONE_MAX_PLD_ERR): 2140 - case SCU_MAKE_COMPLETION_STATUS(SCU_TASK_DONE_LL_R_ERR): 2141 - case SCU_MAKE_COMPLETION_STATUS(SCU_TASK_DONE_CMD_LL_R_ERR): 2142 - sci_remote_device_suspend(ireq->target_device, 2143 - SCU_EVENT_SPECIFIC(SCU_NORMALIZE_COMPLETION_STATUS(completion_code))); 2144 - /* Fall through to the default case */ 2145 2141 default: 2146 2142 /* All other completion status cause the IO to be complete. */ 2147 2143 ireq->scu_status = SCU_NORMALIZE_COMPLETION_STATUS(completion_code); ··· 2252 2262 return status; 2253 2263 } 2254 2264 2265 + static int sci_request_smp_completion_status_is_tx_suspend( 2266 + unsigned int completion_status) 2267 + { 2268 + switch (completion_status) { 2269 + case SCU_TASK_OPEN_REJECT_WRONG_DESTINATION: 2270 + case SCU_TASK_OPEN_REJECT_RESERVED_ABANDON_1: 2271 + case SCU_TASK_OPEN_REJECT_RESERVED_ABANDON_2: 2272 + case SCU_TASK_OPEN_REJECT_RESERVED_ABANDON_3: 2273 + case SCU_TASK_OPEN_REJECT_BAD_DESTINATION: 2274 + case SCU_TASK_OPEN_REJECT_ZONE_VIOLATION: 2275 + return 1; 2276 + } 2277 + return 0; 2278 + } 2279 + 2280 + static int sci_request_smp_completion_status_is_tx_rx_suspend( 2281 + unsigned int completion_status) 2282 + { 2283 + return 0; /* There are no Tx/Rx SMP suspend conditions. */ 2284 + } 2285 + 2286 + static int sci_request_ssp_completion_status_is_tx_suspend( 2287 + unsigned int completion_status) 2288 + { 2289 + switch (completion_status) { 2290 + case SCU_TASK_DONE_TX_RAW_CMD_ERR: 2291 + case SCU_TASK_DONE_LF_ERR: 2292 + case SCU_TASK_OPEN_REJECT_WRONG_DESTINATION: 2293 + case SCU_TASK_OPEN_REJECT_RESERVED_ABANDON_1: 2294 + case SCU_TASK_OPEN_REJECT_RESERVED_ABANDON_2: 2295 + case SCU_TASK_OPEN_REJECT_RESERVED_ABANDON_3: 2296 + case SCU_TASK_OPEN_REJECT_BAD_DESTINATION: 2297 + case SCU_TASK_OPEN_REJECT_ZONE_VIOLATION: 2298 + case SCU_TASK_OPEN_REJECT_STP_RESOURCES_BUSY: 2299 + case SCU_TASK_OPEN_REJECT_PROTOCOL_NOT_SUPPORTED: 2300 + case SCU_TASK_OPEN_REJECT_CONNECTION_RATE_NOT_SUPPORTED: 2301 + return 1; 2302 + } 2303 + return 0; 2304 + } 2305 + 2306 + static int sci_request_ssp_completion_status_is_tx_rx_suspend( 2307 + unsigned int completion_status) 2308 + { 2309 + return 0; /* There are no Tx/Rx SSP suspend conditions. */ 2310 + } 2311 + 2312 + static int sci_request_stpsata_completion_status_is_tx_suspend( 2313 + unsigned int completion_status) 2314 + { 2315 + switch (completion_status) { 2316 + case SCU_TASK_DONE_TX_RAW_CMD_ERR: 2317 + case SCU_TASK_DONE_LL_R_ERR: 2318 + case SCU_TASK_DONE_LL_PERR: 2319 + case SCU_TASK_DONE_REG_ERR: 2320 + case SCU_TASK_DONE_SDB_ERR: 2321 + case SCU_TASK_OPEN_REJECT_WRONG_DESTINATION: 2322 + case SCU_TASK_OPEN_REJECT_RESERVED_ABANDON_1: 2323 + case SCU_TASK_OPEN_REJECT_RESERVED_ABANDON_2: 2324 + case SCU_TASK_OPEN_REJECT_RESERVED_ABANDON_3: 2325 + case SCU_TASK_OPEN_REJECT_BAD_DESTINATION: 2326 + case SCU_TASK_OPEN_REJECT_ZONE_VIOLATION: 2327 + case SCU_TASK_OPEN_REJECT_STP_RESOURCES_BUSY: 2328 + case SCU_TASK_OPEN_REJECT_PROTOCOL_NOT_SUPPORTED: 2329 + case SCU_TASK_OPEN_REJECT_CONNECTION_RATE_NOT_SUPPORTED: 2330 + return 1; 2331 + } 2332 + return 0; 2333 + } 2334 + 2335 + 2336 + static int sci_request_stpsata_completion_status_is_tx_rx_suspend( 2337 + unsigned int completion_status) 2338 + { 2339 + switch (completion_status) { 2340 + case SCU_TASK_DONE_LF_ERR: 2341 + case SCU_TASK_DONE_LL_SY_TERM: 2342 + case SCU_TASK_DONE_LL_LF_TERM: 2343 + case SCU_TASK_DONE_BREAK_RCVD: 2344 + case SCU_TASK_DONE_INV_FIS_LEN: 2345 + case SCU_TASK_DONE_UNEXP_FIS: 2346 + case SCU_TASK_DONE_UNEXP_SDBFIS: 2347 + case SCU_TASK_DONE_MAX_PLD_ERR: 2348 + return 1; 2349 + } 2350 + return 0; 2351 + } 2352 + 2353 + static void sci_request_handle_suspending_completions( 2354 + struct isci_request *ireq, 2355 + u32 completion_code) 2356 + { 2357 + int is_tx = 0; 2358 + int is_tx_rx = 0; 2359 + 2360 + switch (ireq->protocol) { 2361 + case SAS_PROTOCOL_SMP: 2362 + is_tx = sci_request_smp_completion_status_is_tx_suspend( 2363 + completion_code); 2364 + is_tx_rx = sci_request_smp_completion_status_is_tx_rx_suspend( 2365 + completion_code); 2366 + break; 2367 + case SAS_PROTOCOL_SSP: 2368 + is_tx = sci_request_ssp_completion_status_is_tx_suspend( 2369 + completion_code); 2370 + is_tx_rx = sci_request_ssp_completion_status_is_tx_rx_suspend( 2371 + completion_code); 2372 + break; 2373 + case SAS_PROTOCOL_STP: 2374 + is_tx = sci_request_stpsata_completion_status_is_tx_suspend( 2375 + completion_code); 2376 + is_tx_rx = 2377 + sci_request_stpsata_completion_status_is_tx_rx_suspend( 2378 + completion_code); 2379 + break; 2380 + default: 2381 + dev_warn(&ireq->isci_host->pdev->dev, 2382 + "%s: request %p has no valid protocol\n", 2383 + __func__, ireq); 2384 + break; 2385 + } 2386 + if (is_tx || is_tx_rx) { 2387 + BUG_ON(is_tx && is_tx_rx); 2388 + 2389 + sci_remote_node_context_suspend( 2390 + &ireq->target_device->rnc, 2391 + SCU_HARDWARE_SUSPENSION, 2392 + (is_tx_rx) ? SCU_EVENT_TL_RNC_SUSPEND_TX_RX 2393 + : SCU_EVENT_TL_RNC_SUSPEND_TX, 2394 + NULL, NULL); 2395 + } 2396 + } 2397 + 2255 2398 enum sci_status 2256 2399 sci_io_request_tc_completion(struct isci_request *ireq, 2257 - u32 completion_code) 2400 + u32 completion_code) 2258 2401 { 2259 2402 enum sci_base_request_states state; 2260 2403 struct isci_host *ihost = ireq->owning_controller; 2261 2404 2262 2405 state = ireq->sm.current_state_id; 2406 + 2407 + /* Decode those completions that signal upcoming suspension events. */ 2408 + sci_request_handle_suspending_completions( 2409 + ireq, SCU_GET_COMPLETION_TL_STATUS(completion_code)); 2263 2410 2264 2411 switch (state) { 2265 2412 case SCI_REQ_STARTED:
-1
drivers/scsi/isci/request.h
··· 414 414 task->ata_task.fis.lbal == ATA_LOG_SATA_NCQ); 415 415 416 416 } 417 - 418 417 #endif /* !defined(_ISCI_REQUEST_H_) */
+2
drivers/scsi/isci/scu_completion_codes.h
··· 224 224 * 32-bit value like we want, each immediate value must be cast to a u32. 225 225 */ 226 226 #define SCU_TASK_DONE_GOOD ((u32)0x00) 227 + #define SCU_TASK_DONE_TX_RAW_CMD_ERR ((u32)0x08) 227 228 #define SCU_TASK_DONE_CRC_ERR ((u32)0x14) 228 229 #define SCU_TASK_DONE_CHECK_RESPONSE ((u32)0x14) 229 230 #define SCU_TASK_DONE_GEN_RESPONSE ((u32)0x15) ··· 238 237 #define SCU_TASK_DONE_LL_LF_TERM ((u32)0x1A) 239 238 #define SCU_TASK_DONE_DATA_LEN_ERR ((u32)0x1A) 240 239 #define SCU_TASK_DONE_LL_CL_TERM ((u32)0x1B) 240 + #define SCU_TASK_DONE_BREAK_RCVD ((u32)0x1B) 241 241 #define SCU_TASK_DONE_LL_ABORT_ERR ((u32)0x1B) 242 242 #define SCU_TASK_DONE_SEQ_INV_TYPE ((u32)0x1C) 243 243 #define SCU_TASK_DONE_UNEXP_XR ((u32)0x1C)