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

isci: Fixed bug in resumption from RNC Tx/Rx suspend state.

The resumption from the Tx/Rx suspended state should work the same
as the Tx suspended state.

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
56d7c013 6f48844e

+7 -5
+7 -5
drivers/scsi/isci/remote_node_context.c
··· 557 557 sci_rnc->user_callback = cb_fn; 558 558 sci_rnc->user_cookie = cb_p; 559 559 return SCI_SUCCESS; 560 - case SCI_RNC_TX_SUSPENDED: { 560 + case SCI_RNC_TX_SUSPENDED: 561 + case SCI_RNC_TX_RX_SUSPENDED: { 561 562 struct isci_remote_device *idev = rnc_to_dev(sci_rnc); 562 563 struct domain_device *dev = idev->domain_dev; 563 564 565 + /* If this is an expander attached SATA device we must 566 + * invalidate and repost the RNC since this is the only way 567 + * to clear the TCi to NCQ tag mapping table for the RNi. 568 + * All other device types we can just resume. 569 + */ 564 570 sci_remote_node_context_setup_to_resume(sci_rnc, cb_fn, cb_p); 565 571 566 572 if (dev_is_sata(dev) && dev->parent) ··· 575 569 sci_change_state(&sci_rnc->sm, SCI_RNC_RESUMING); 576 570 return SCI_SUCCESS; 577 571 } 578 - case SCI_RNC_TX_RX_SUSPENDED: 579 - sci_remote_node_context_setup_to_resume(sci_rnc, cb_fn, cb_p); 580 - sci_change_state(&sci_rnc->sm, SCI_RNC_RESUMING); 581 - return SCI_FAILURE_INVALID_STATE; 582 572 case SCI_RNC_AWAIT_SUSPENSION: 583 573 sci_remote_node_context_setup_to_resume(sci_rnc, cb_fn, cb_p); 584 574 return SCI_SUCCESS;