diff options
author | Edmund Nadolski <edmund.nadolski@intel.com> | 2011-02-18 12:25:17 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 06:55:27 -0400 |
commit | 5d147e73836723b81fd72b078e78887598999d5a (patch) | |
tree | 76553f66702c755f60e8fdde5ccb32d6cc61734d | |
parent | 83f5eeef59581faed6f002432bafe24da8cbf401 (diff) |
isci: remove scic_controller_get_handler_methods and ilk
This removes scic_controller_get_handler_methods and its
associated unused code.
Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com>
[djbw: kill off the legacy handler, now that we have basic error isr support]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r-- | drivers/scsi/isci/core/scic_controller.h | 97 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_controller.c | 412 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_controller.h | 13 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_user_callback.h | 5 |
4 files changed, 2 insertions, 525 deletions
diff --git a/drivers/scsi/isci/core/scic_controller.h b/drivers/scsi/isci/core/scic_controller.h index 1d459d6af21b..481e0de5148b 100644 --- a/drivers/scsi/isci/core/scic_controller.h +++ b/drivers/scsi/isci/core/scic_controller.h | |||
@@ -81,62 +81,6 @@ enum sci_controller_mode { | |||
81 | 81 | ||
82 | 82 | ||
83 | /** | 83 | /** |
84 | * enum _SCIC_INTERRUPT_TYPE - This enumeration depicts the various types of | ||
85 | * interrupts that are potentially supported by a SCI Core implementation. | ||
86 | * | ||
87 | * | ||
88 | */ | ||
89 | enum scic_interrupt_type { | ||
90 | SCIC_LEGACY_LINE_INTERRUPT_TYPE, | ||
91 | SCIC_MSIX_INTERRUPT_TYPE, | ||
92 | |||
93 | /** | ||
94 | * This enumeration value indicates the use of polling. | ||
95 | */ | ||
96 | SCIC_NO_INTERRUPTS | ||
97 | |||
98 | }; | ||
99 | |||
100 | /** | ||
101 | * This method is called by the SCI user in order to have the SCI | ||
102 | * implementation handle the interrupt. This method performs minimal | ||
103 | * processing to allow for streamlined interrupt time usage. | ||
104 | * | ||
105 | * SCIC_CONTROLLER_INTERRUPT_HANDLER true: returned if there is an interrupt to | ||
106 | * process and it was processed. false: returned if no interrupt was processed. | ||
107 | */ | ||
108 | typedef bool (*SCIC_CONTROLLER_INTERRUPT_HANDLER)( | ||
109 | struct scic_sds_controller *controller | ||
110 | ); | ||
111 | |||
112 | /** | ||
113 | * This method is called by the SCI user to process completions generated as a | ||
114 | * result of a previously handled interrupt. This method will result in the | ||
115 | * completion of IO requests and handling of other controller generated | ||
116 | * events. This method should be called some time after the interrupt | ||
117 | * handler. | ||
118 | * | ||
119 | * Most, if not all, of the user callback APIs are invoked from within this | ||
120 | * API. As a result, the user should be cognizent of the operating level at | ||
121 | * which they invoke this API. | ||
122 | */ | ||
123 | typedef void (*SCIC_CONTROLLER_COMPLETION_HANDLER)( | ||
124 | struct scic_sds_controller *controller | ||
125 | ); | ||
126 | |||
127 | /** | ||
128 | * struct scic_controller_handler_methods - This structure contains an | ||
129 | * interrupt handler and completion handler function pointers. | ||
130 | * | ||
131 | * | ||
132 | */ | ||
133 | struct scic_controller_handler_methods { | ||
134 | SCIC_CONTROLLER_INTERRUPT_HANDLER interrupt_handler; | ||
135 | SCIC_CONTROLLER_COMPLETION_HANDLER completion_handler; | ||
136 | |||
137 | }; | ||
138 | |||
139 | /** | ||
140 | * scic_controller_construct() - This method will attempt to construct a | 84 | * scic_controller_construct() - This method will attempt to construct a |
141 | * controller object utilizing the supplied parameter information. | 85 | * controller object utilizing the supplied parameter information. |
142 | * @c: This parameter specifies the controller to be constructed. | 86 | * @c: This parameter specifies the controller to be constructed. |
@@ -176,47 +120,6 @@ void scic_controller_enable_interrupts( | |||
176 | void scic_controller_disable_interrupts( | 120 | void scic_controller_disable_interrupts( |
177 | struct scic_sds_controller *controller); | 121 | struct scic_sds_controller *controller); |
178 | 122 | ||
179 | /** | ||
180 | * scic_controller_get_handler_methods() - This method will return provide | ||
181 | * function pointers for the interrupt handler and completion handler. The | ||
182 | * interrupt handler is expected to be invoked at interrupt time. The | ||
183 | * completion handler is scheduled to run as a result of the interrupt | ||
184 | * handler. The completion handler performs the bulk work for processing | ||
185 | * silicon events. | ||
186 | * @interrupt_type: This parameter informs the core which type of | ||
187 | * interrupt/completion methods are being requested. These are the types: | ||
188 | * SCIC_LEGACY_LINE_INTERRUPT_TYPE, SCIC_MSIX_INTERRUPT_TYPE, | ||
189 | * SCIC_NO_INTERRUPTS (POLLING) | ||
190 | * @message_count: This parameter informs the core the number of MSI-X messages | ||
191 | * to be utilized. This parameter must be 0 when requesting legacy line | ||
192 | * based handlers. | ||
193 | * @handler_methods: The caller provides a pointer to a buffer of type | ||
194 | * struct scic_controller_handler_methods. The size depends on the combination of | ||
195 | * the interrupt_type and message_count input parameters: | ||
196 | * SCIC_LEGACY_LINE_INTERRUPT_TYPE: - size = | ||
197 | * sizeof(struct scic_controller_handler_methods) SCIC_MSIX_INTERRUPT_TYPE: | ||
198 | * sizeof(struct scic_controller_handler_methods) | ||
199 | * @handler_methods: SCIC fills out the caller's buffer with the appropriate | ||
200 | * interrupt and completion handlers based on the info provided in the | ||
201 | * interrupt_type and message_count input parameters. For | ||
202 | * SCIC_LEGACY_LINE_INTERRUPT_TYPE, the buffer receives a single | ||
203 | * struct scic_controller_handler_methods element regardless that the | ||
204 | * message_count parameter is zero. For SCIC_MSIX_INTERRUPT_TYPE, the buffer | ||
205 | * receives an array of elements of type struct scic_controller_handler_methods | ||
206 | * where the array size is equivalent to the message_count parameter. The | ||
207 | * array is zero-relative where entry zero corresponds to message-vector | ||
208 | * zero, entry one corresponds to message-vector one, and so forth. | ||
209 | * | ||
210 | * Indicate if the handler retrieval operation was successful. SCI_SUCCESS This | ||
211 | * value is returned if retrieval succeeded. | ||
212 | * SCI_FAILURE_UNSUPPORTED_MESSAGE_COUNT This value is returned if the user | ||
213 | * supplied an unsupported number of MSI-X messages. For legacy line interrupts | ||
214 | * the only valid value is 0. | ||
215 | */ | ||
216 | enum sci_status scic_controller_get_handler_methods( | ||
217 | enum scic_interrupt_type interrupt_type, | ||
218 | u16 message_count, | ||
219 | struct scic_controller_handler_methods *handler_methods); | ||
220 | 123 | ||
221 | /** | 124 | /** |
222 | * scic_controller_initialize() - This method will initialize the controller | 125 | * scic_controller_initialize() - This method will initialize the controller |
diff --git a/drivers/scsi/isci/core/scic_sds_controller.c b/drivers/scsi/isci/core/scic_sds_controller.c index 7ea36624f568..53861ccbd593 100644 --- a/drivers/scsi/isci/core/scic_sds_controller.c +++ b/drivers/scsi/isci/core/scic_sds_controller.c | |||
@@ -1564,340 +1564,6 @@ static void scic_sds_controller_process_completions( | |||
1564 | 1564 | ||
1565 | } | 1565 | } |
1566 | 1566 | ||
1567 | /** | ||
1568 | * This method is a private routine for processing the completion queue entries. | ||
1569 | * @this_controller: | ||
1570 | * | ||
1571 | */ | ||
1572 | static void scic_sds_controller_transitioned_process_completions( | ||
1573 | struct scic_sds_controller *this_controller) | ||
1574 | { | ||
1575 | u32 completion_count = 0; | ||
1576 | u32 completion_entry; | ||
1577 | u32 get_index; | ||
1578 | u32 get_cycle; | ||
1579 | u32 event_index; | ||
1580 | u32 event_cycle; | ||
1581 | |||
1582 | dev_dbg(scic_to_dev(this_controller), | ||
1583 | "%s: completion queue begining get:0x%08x\n", | ||
1584 | __func__, | ||
1585 | this_controller->completion_queue_get); | ||
1586 | |||
1587 | /* Get the component parts of the completion queue */ | ||
1588 | get_index = NORMALIZE_GET_POINTER(this_controller->completion_queue_get); | ||
1589 | get_cycle = SMU_CQGR_CYCLE_BIT & this_controller->completion_queue_get; | ||
1590 | |||
1591 | event_index = NORMALIZE_EVENT_POINTER(this_controller->completion_queue_get); | ||
1592 | event_cycle = SMU_CQGR_EVENT_CYCLE_BIT & this_controller->completion_queue_get; | ||
1593 | |||
1594 | while ( | ||
1595 | NORMALIZE_GET_POINTER_CYCLE_BIT(get_cycle) | ||
1596 | == COMPLETION_QUEUE_CYCLE_BIT( | ||
1597 | this_controller->completion_queue[get_index]) | ||
1598 | ) { | ||
1599 | completion_count++; | ||
1600 | |||
1601 | completion_entry = this_controller->completion_queue[get_index]; | ||
1602 | INCREMENT_COMPLETION_QUEUE_GET(this_controller, get_index, get_cycle); | ||
1603 | |||
1604 | dev_dbg(scic_to_dev(this_controller), | ||
1605 | "%s: completion queue entry:0x%08x\n", | ||
1606 | __func__, | ||
1607 | completion_entry); | ||
1608 | |||
1609 | switch (SCU_GET_COMPLETION_TYPE(completion_entry)) { | ||
1610 | case SCU_COMPLETION_TYPE_TASK: | ||
1611 | scic_sds_controller_task_completion(this_controller, completion_entry); | ||
1612 | break; | ||
1613 | |||
1614 | case SCU_COMPLETION_TYPE_NOTIFY: | ||
1615 | case SCU_COMPLETION_TYPE_EVENT: | ||
1616 | /* | ||
1617 | * Presently we do the same thing with a notify event that we | ||
1618 | * do with the other event codes. */ | ||
1619 | INCREMENT_EVENT_QUEUE_GET(this_controller, event_index, event_cycle); | ||
1620 | /* Fall-through */ | ||
1621 | |||
1622 | case SCU_COMPLETION_TYPE_SDMA: | ||
1623 | case SCU_COMPLETION_TYPE_UFI: | ||
1624 | default: | ||
1625 | dev_warn(scic_to_dev(this_controller), | ||
1626 | "%s: SCIC Controller ignoring completion type " | ||
1627 | "%x\n", | ||
1628 | __func__, | ||
1629 | completion_entry); | ||
1630 | break; | ||
1631 | } | ||
1632 | } | ||
1633 | |||
1634 | /* Update the get register if we completed one or more entries */ | ||
1635 | if (completion_count > 0) { | ||
1636 | this_controller->completion_queue_get = | ||
1637 | SMU_CQGR_GEN_BIT(ENABLE) | ||
1638 | | SMU_CQGR_GEN_BIT(EVENT_ENABLE) | ||
1639 | | event_cycle | SMU_CQGR_GEN_VAL(EVENT_POINTER, event_index) | ||
1640 | | get_cycle | SMU_CQGR_GEN_VAL(POINTER, get_index); | ||
1641 | |||
1642 | SMU_CQGR_WRITE(this_controller, this_controller->completion_queue_get); | ||
1643 | } | ||
1644 | |||
1645 | dev_dbg(scic_to_dev(this_controller), | ||
1646 | "%s: completion queue ending get:0x%08x\n", | ||
1647 | __func__, | ||
1648 | this_controller->completion_queue_get); | ||
1649 | } | ||
1650 | |||
1651 | /* | ||
1652 | * ****************************************************************************- | ||
1653 | * * SCIC SDS Controller Interrupt and Completion functions | ||
1654 | * ****************************************************************************- */ | ||
1655 | |||
1656 | /** | ||
1657 | * This method provides standard (common) processing of interrupts for polling | ||
1658 | * and legacy based interrupts. | ||
1659 | * @controller: | ||
1660 | * @interrupt_status: | ||
1661 | * | ||
1662 | * This method returns a boolean (bool) indication as to whether an completions | ||
1663 | * are pending to be processed. true if an interrupt is to be processed false | ||
1664 | * if no interrupt was pending | ||
1665 | */ | ||
1666 | static bool scic_sds_controller_standard_interrupt_handler( | ||
1667 | struct scic_sds_controller *this_controller, | ||
1668 | u32 interrupt_status) | ||
1669 | { | ||
1670 | bool is_completion_needed = false; | ||
1671 | |||
1672 | if ((interrupt_status & SMU_ISR_QUEUE_ERROR) || | ||
1673 | ((interrupt_status & SMU_ISR_QUEUE_SUSPEND) && | ||
1674 | (!scic_sds_controller_completion_queue_has_entries( | ||
1675 | this_controller)))) { | ||
1676 | /* | ||
1677 | * We have a fatal error on the read of the completion queue bar | ||
1678 | * OR | ||
1679 | * We have a fatal error there is nothing in the completion queue | ||
1680 | * but we have a report from the hardware that the queue is full | ||
1681 | * / @todo how do we request the a controller reset */ | ||
1682 | is_completion_needed = true; | ||
1683 | this_controller->encountered_fatal_error = true; | ||
1684 | } | ||
1685 | |||
1686 | if (scic_sds_controller_completion_queue_has_entries(this_controller)) { | ||
1687 | is_completion_needed = true; | ||
1688 | } | ||
1689 | |||
1690 | return is_completion_needed; | ||
1691 | } | ||
1692 | |||
1693 | /** | ||
1694 | * This is the method provided to handle polling for interrupts for the | ||
1695 | * controller object. | ||
1696 | * | ||
1697 | * bool true if an interrupt is to be processed false if no interrupt was | ||
1698 | * pending | ||
1699 | */ | ||
1700 | static bool scic_sds_controller_polling_interrupt_handler( | ||
1701 | struct scic_sds_controller *scic) | ||
1702 | { | ||
1703 | u32 interrupt_status; | ||
1704 | |||
1705 | /* | ||
1706 | * In INTERRUPT_POLLING_MODE we exit the interrupt handler if the | ||
1707 | * hardware indicates nothing is pending. Since we are not being | ||
1708 | * called from a real interrupt, we don't want to confuse the hardware | ||
1709 | * by servicing the completion queue before the hardware indicates it | ||
1710 | * is ready. We'll simply wait for another polling interval and check | ||
1711 | * again. | ||
1712 | */ | ||
1713 | interrupt_status = SMU_ISR_READ(scic); | ||
1714 | if ((interrupt_status & | ||
1715 | (SMU_ISR_COMPLETION | | ||
1716 | SMU_ISR_QUEUE_ERROR | | ||
1717 | SMU_ISR_QUEUE_SUSPEND)) == 0) { | ||
1718 | return false; | ||
1719 | } | ||
1720 | |||
1721 | return scic_sds_controller_standard_interrupt_handler( | ||
1722 | scic, interrupt_status); | ||
1723 | } | ||
1724 | |||
1725 | /** | ||
1726 | * This is the method provided to handle completions when interrupt polling is | ||
1727 | * in use. | ||
1728 | */ | ||
1729 | static void scic_sds_controller_polling_completion_handler( | ||
1730 | struct scic_sds_controller *scic) | ||
1731 | { | ||
1732 | if (scic->encountered_fatal_error == true) { | ||
1733 | dev_err(scic_to_dev(scic), | ||
1734 | "%s: SCIC Controller has encountered a fatal error.\n", | ||
1735 | __func__); | ||
1736 | |||
1737 | sci_base_state_machine_change_state( | ||
1738 | scic_sds_controller_get_base_state_machine(scic), | ||
1739 | SCI_BASE_CONTROLLER_STATE_FAILED); | ||
1740 | } else if (scic_sds_controller_completion_queue_has_entries(scic)) { | ||
1741 | if (scic->restrict_completions == false) | ||
1742 | scic_sds_controller_process_completions(scic); | ||
1743 | else | ||
1744 | scic_sds_controller_transitioned_process_completions( | ||
1745 | scic); | ||
1746 | } | ||
1747 | |||
1748 | /* | ||
1749 | * The interrupt handler does not adjust the CQ's | ||
1750 | * get pointer. So, SCU's INTx pin stays asserted during the | ||
1751 | * interrupt handler even though it tries to clear the interrupt | ||
1752 | * source. Therefore, the completion handler must ensure that the | ||
1753 | * interrupt source is cleared. Otherwise, we get a spurious | ||
1754 | * interrupt for which the interrupt handler will not issue a | ||
1755 | * corresponding completion event. Also, we unmask interrupts. | ||
1756 | */ | ||
1757 | SMU_ISR_WRITE( | ||
1758 | scic, | ||
1759 | (u32)(SMU_ISR_COMPLETION | SMU_ISR_QUEUE_ERROR | SMU_ISR_QUEUE_SUSPEND) | ||
1760 | ); | ||
1761 | } | ||
1762 | |||
1763 | /** | ||
1764 | * This is the method provided to handle legacy interrupts for the controller | ||
1765 | * object. | ||
1766 | * | ||
1767 | * bool true if an interrupt is processed false if no interrupt was processed | ||
1768 | */ | ||
1769 | static bool scic_sds_controller_legacy_interrupt_handler( | ||
1770 | struct scic_sds_controller *scic) | ||
1771 | { | ||
1772 | u32 interrupt_status; | ||
1773 | bool is_completion_needed; | ||
1774 | |||
1775 | interrupt_status = SMU_ISR_READ(scic); | ||
1776 | is_completion_needed = scic_sds_controller_standard_interrupt_handler( | ||
1777 | scic, interrupt_status); | ||
1778 | |||
1779 | return is_completion_needed; | ||
1780 | } | ||
1781 | |||
1782 | |||
1783 | /** | ||
1784 | * This is the method provided to handle legacy completions it is expected that | ||
1785 | * the SCI User will call this completion handler anytime the interrupt | ||
1786 | * handler reports that it has handled an interrupt. | ||
1787 | */ | ||
1788 | static void scic_sds_controller_legacy_completion_handler( | ||
1789 | struct scic_sds_controller *scic) | ||
1790 | { | ||
1791 | scic_sds_controller_polling_completion_handler(scic); | ||
1792 | SMU_IMR_WRITE(scic, 0x00000000); | ||
1793 | } | ||
1794 | |||
1795 | /** | ||
1796 | * This is the method provided to handle an MSIX interrupt message when there | ||
1797 | * is just a single MSIX message being provided by the hardware. This mode | ||
1798 | * of operation is single vector mode. | ||
1799 | * | ||
1800 | * bool true if an interrupt is processed false if no interrupt was processed | ||
1801 | */ | ||
1802 | static bool scic_sds_controller_single_vector_interrupt_handler( | ||
1803 | struct scic_sds_controller *scic) | ||
1804 | { | ||
1805 | u32 interrupt_status; | ||
1806 | |||
1807 | /* | ||
1808 | * Mask the interrupts | ||
1809 | * There is a race in the hardware that could cause us not to be notified | ||
1810 | * of an interrupt completion if we do not take this step. We will unmask | ||
1811 | * the interrupts in the completion routine. */ | ||
1812 | SMU_IMR_WRITE(scic, 0xFFFFFFFF); | ||
1813 | |||
1814 | interrupt_status = SMU_ISR_READ(scic); | ||
1815 | interrupt_status &= (SMU_ISR_QUEUE_ERROR | SMU_ISR_QUEUE_SUSPEND); | ||
1816 | |||
1817 | if ((interrupt_status == 0) && | ||
1818 | scic_sds_controller_completion_queue_has_entries(scic)) { | ||
1819 | /* | ||
1820 | * There is at least one completion queue entry to process so we can | ||
1821 | * return a success and ignore for now the case of an error interrupt */ | ||
1822 | SMU_ISR_WRITE(scic, SMU_ISR_COMPLETION); | ||
1823 | return true; | ||
1824 | } | ||
1825 | |||
1826 | if (interrupt_status != 0) { | ||
1827 | /* | ||
1828 | * There is an error interrupt pending so let it through and handle | ||
1829 | * in the callback */ | ||
1830 | return true; | ||
1831 | } | ||
1832 | |||
1833 | /* | ||
1834 | * Clear any offending interrupts since we could not find any to handle | ||
1835 | * and unmask them all */ | ||
1836 | SMU_ISR_WRITE(scic, 0x00000000); | ||
1837 | SMU_IMR_WRITE(scic, 0x00000000); | ||
1838 | |||
1839 | return false; | ||
1840 | } | ||
1841 | |||
1842 | /** | ||
1843 | * This is the method provided to handle completions for a single MSIX message. | ||
1844 | */ | ||
1845 | static void scic_sds_controller_single_vector_completion_handler( | ||
1846 | struct scic_sds_controller *scic) | ||
1847 | { | ||
1848 | u32 interrupt_status; | ||
1849 | |||
1850 | interrupt_status = SMU_ISR_READ(scic); | ||
1851 | interrupt_status &= (SMU_ISR_QUEUE_ERROR | SMU_ISR_QUEUE_SUSPEND); | ||
1852 | |||
1853 | if (interrupt_status & SMU_ISR_QUEUE_ERROR) { | ||
1854 | dev_err(scic_to_dev(scic), | ||
1855 | "%s: SCIC Controller has encountered a fatal error.\n", | ||
1856 | __func__); | ||
1857 | |||
1858 | /* | ||
1859 | * We have a fatal condition and must reset the controller | ||
1860 | * Leave the interrupt mask in place and get the controller reset */ | ||
1861 | sci_base_state_machine_change_state( | ||
1862 | scic_sds_controller_get_base_state_machine(scic), | ||
1863 | SCI_BASE_CONTROLLER_STATE_FAILED); | ||
1864 | return; | ||
1865 | } | ||
1866 | |||
1867 | if ((interrupt_status & SMU_ISR_QUEUE_SUSPEND) && | ||
1868 | !scic_sds_controller_completion_queue_has_entries(scic)) { | ||
1869 | dev_err(scic_to_dev(scic), | ||
1870 | "%s: SCIC Controller has encountered a fatal error.\n", | ||
1871 | __func__); | ||
1872 | |||
1873 | /* | ||
1874 | * We have a fatal condtion and must reset the controller | ||
1875 | * Leave the interrupt mask in place and get the controller reset */ | ||
1876 | sci_base_state_machine_change_state( | ||
1877 | scic_sds_controller_get_base_state_machine(scic), | ||
1878 | SCI_BASE_CONTROLLER_STATE_FAILED); | ||
1879 | return; | ||
1880 | } | ||
1881 | |||
1882 | if (scic_sds_controller_completion_queue_has_entries(scic)) { | ||
1883 | scic_sds_controller_process_completions(scic); | ||
1884 | |||
1885 | /* | ||
1886 | * We dont care which interrupt got us to processing the completion queu | ||
1887 | * so clear them both. */ | ||
1888 | SMU_ISR_WRITE( | ||
1889 | scic, | ||
1890 | (SMU_ISR_COMPLETION | SMU_ISR_QUEUE_SUSPEND)); | ||
1891 | } | ||
1892 | |||
1893 | SMU_IMR_WRITE(scic, 0x00000000); | ||
1894 | } | ||
1895 | |||
1896 | /** | ||
1897 | * This is the method provided to handle a MSIX message for a normal completion. | ||
1898 | * | ||
1899 | * bool true if an interrupt is processed false if no interrupt was processed | ||
1900 | */ | ||
1901 | bool scic_sds_controller_isr(struct scic_sds_controller *scic) | 1567 | bool scic_sds_controller_isr(struct scic_sds_controller *scic) |
1902 | { | 1568 | { |
1903 | if (scic_sds_controller_completion_queue_has_entries(scic)) { | 1569 | if (scic_sds_controller_completion_queue_has_entries(scic)) { |
@@ -1920,10 +1586,6 @@ bool scic_sds_controller_isr(struct scic_sds_controller *scic) | |||
1920 | return false; | 1586 | return false; |
1921 | } | 1587 | } |
1922 | 1588 | ||
1923 | /** | ||
1924 | * This is the method provided to handle the completions for a normal MSIX | ||
1925 | * message. | ||
1926 | */ | ||
1927 | void scic_sds_controller_completion_handler(struct scic_sds_controller *scic) | 1589 | void scic_sds_controller_completion_handler(struct scic_sds_controller *scic) |
1928 | { | 1590 | { |
1929 | /* Empty out the completion queue */ | 1591 | /* Empty out the completion queue */ |
@@ -1994,14 +1656,6 @@ void scic_sds_controller_error_handler(struct scic_sds_controller *scic) | |||
1994 | } | 1656 | } |
1995 | 1657 | ||
1996 | 1658 | ||
1997 | /* | ||
1998 | * ****************************************************************************- | ||
1999 | * * SCIC SDS Controller External Methods | ||
2000 | * ****************************************************************************- */ | ||
2001 | |||
2002 | /** | ||
2003 | * This method returns the sizeof the SCIC SDS Controller Object | ||
2004 | */ | ||
2005 | u32 scic_sds_controller_get_object_size(void) | 1659 | u32 scic_sds_controller_get_object_size(void) |
2006 | { | 1660 | { |
2007 | return sizeof(struct scic_sds_controller); | 1661 | return sizeof(struct scic_sds_controller); |
@@ -2535,72 +2189,6 @@ enum sci_status scic_controller_reset( | |||
2535 | return status; | 2189 | return status; |
2536 | } | 2190 | } |
2537 | 2191 | ||
2538 | /* --------------------------------------------------------------------------- */ | ||
2539 | |||
2540 | enum sci_status scic_controller_get_handler_methods( | ||
2541 | enum scic_interrupt_type interrupt_type, | ||
2542 | u16 message_count, | ||
2543 | struct scic_controller_handler_methods *handler_methods) | ||
2544 | { | ||
2545 | enum sci_status status = SCI_FAILURE_UNSUPPORTED_MESSAGE_COUNT; | ||
2546 | |||
2547 | switch (interrupt_type) { | ||
2548 | case SCIC_LEGACY_LINE_INTERRUPT_TYPE: | ||
2549 | if (message_count == 0) { | ||
2550 | handler_methods[0].interrupt_handler | ||
2551 | = scic_sds_controller_legacy_interrupt_handler; | ||
2552 | handler_methods[0].completion_handler | ||
2553 | = scic_sds_controller_legacy_completion_handler; | ||
2554 | |||
2555 | status = SCI_SUCCESS; | ||
2556 | } | ||
2557 | break; | ||
2558 | |||
2559 | case SCIC_MSIX_INTERRUPT_TYPE: | ||
2560 | if (message_count == 1) { | ||
2561 | handler_methods[0].interrupt_handler | ||
2562 | = scic_sds_controller_single_vector_interrupt_handler; | ||
2563 | handler_methods[0].completion_handler | ||
2564 | = scic_sds_controller_single_vector_completion_handler; | ||
2565 | |||
2566 | status = SCI_SUCCESS; | ||
2567 | } else if (message_count == 2) { | ||
2568 | handler_methods[0].interrupt_handler | ||
2569 | = scic_sds_controller_isr; | ||
2570 | handler_methods[0].completion_handler | ||
2571 | = scic_sds_controller_completion_handler; | ||
2572 | |||
2573 | handler_methods[1].interrupt_handler | ||
2574 | = scic_sds_controller_error_isr; | ||
2575 | handler_methods[1].completion_handler | ||
2576 | = scic_sds_controller_error_handler; | ||
2577 | |||
2578 | status = SCI_SUCCESS; | ||
2579 | } | ||
2580 | break; | ||
2581 | |||
2582 | case SCIC_NO_INTERRUPTS: | ||
2583 | if (message_count == 0) { | ||
2584 | |||
2585 | handler_methods[0].interrupt_handler | ||
2586 | = scic_sds_controller_polling_interrupt_handler; | ||
2587 | handler_methods[0].completion_handler | ||
2588 | = scic_sds_controller_polling_completion_handler; | ||
2589 | |||
2590 | status = SCI_SUCCESS; | ||
2591 | } | ||
2592 | break; | ||
2593 | |||
2594 | default: | ||
2595 | status = SCI_FAILURE_INVALID_PARAMETER_VALUE; | ||
2596 | break; | ||
2597 | } | ||
2598 | |||
2599 | return status; | ||
2600 | } | ||
2601 | |||
2602 | /* --------------------------------------------------------------------------- */ | ||
2603 | |||
2604 | enum sci_io_status scic_controller_start_io( | 2192 | enum sci_io_status scic_controller_start_io( |
2605 | struct scic_sds_controller *scic, | 2193 | struct scic_sds_controller *scic, |
2606 | struct scic_sds_remote_device *remote_device, | 2194 | struct scic_sds_remote_device *remote_device, |
diff --git a/drivers/scsi/isci/core/scic_sds_controller.h b/drivers/scsi/isci/core/scic_sds_controller.h index cce0da6a6a3d..3e0477d62a5b 100644 --- a/drivers/scsi/isci/core/scic_sds_controller.h +++ b/drivers/scsi/isci/core/scic_sds_controller.h | |||
@@ -335,19 +335,6 @@ struct scic_sds_controller { | |||
335 | */ | 335 | */ |
336 | struct scic_sds_unsolicited_frame_control uf_control; | 336 | struct scic_sds_unsolicited_frame_control uf_control; |
337 | 337 | ||
338 | /** | ||
339 | * This field records the fact that the controller has encountered a fatal | ||
340 | * error and must be reset. | ||
341 | */ | ||
342 | bool encountered_fatal_error; | ||
343 | |||
344 | /** | ||
345 | * This field specifies that the controller should ignore | ||
346 | * completion processing for non-fastpath events. This will | ||
347 | * cause the completions to be thrown away. | ||
348 | */ | ||
349 | bool restrict_completions; | ||
350 | |||
351 | /* Phy Startup Data */ | 338 | /* Phy Startup Data */ |
352 | /** | 339 | /** |
353 | * This field is the driver timer handle for controller phy request startup. | 340 | * This field is the driver timer handle for controller phy request startup. |
diff --git a/drivers/scsi/isci/core/scic_user_callback.h b/drivers/scsi/isci/core/scic_user_callback.h index ec4eb278cd5f..d1a3cb885bc7 100644 --- a/drivers/scsi/isci/core/scic_user_callback.h +++ b/drivers/scsi/isci/core/scic_user_callback.h | |||
@@ -86,9 +86,8 @@ struct scic_sds_controller; | |||
86 | * occurs for the created timer. | 86 | * occurs for the created timer. |
87 | * | 87 | * |
88 | * The "timer_callback" method should be executed in a mutually exlusive manner | 88 | * The "timer_callback" method should be executed in a mutually exlusive manner |
89 | * from the controller completion handler handler (refer to | 89 | * from the controller completion handler handler. This method returns a handle |
90 | * scic_controller_get_handler_methods()). This method returns a handle to a | 90 | * to a timer object created by the user. The handle will be utilized for all |
91 | * timer object created by the user. The handle will be utilized for all | ||
92 | * further interactions relating to this timer. | 91 | * further interactions relating to this timer. |
93 | */ | 92 | */ |
94 | void *scic_cb_timer_create( | 93 | void *scic_cb_timer_create( |