diff options
author | Maciej Patelczyk <maciej.patelczyk@intel.com> | 2011-04-28 18:06:11 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 07:00:38 -0400 |
commit | e1e72a00dd9db0cd2b7d106916645626f53c0382 (patch) | |
tree | bd10e14596426f86f8ff3789e7fa2b2a4a4ccca5 /drivers | |
parent | d3757c3aeb75259e0b86a872e98841a2ea4cb5e8 (diff) |
isci: Removed sci_base_object from scic_sds_phy.
The 'struct sci_base_object' was removed from the struct
scic_sds_phy and was replaced by a pointer to
struct isci_phy.
Signed-off-by: Maciej Patelczyk <maciej.patelczyk@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_phy.c | 83 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_phy.h | 5 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_port.c | 2 | ||||
-rw-r--r-- | drivers/scsi/isci/phy.c | 3 | ||||
-rw-r--r-- | drivers/scsi/isci/port.c | 6 | ||||
-rw-r--r-- | drivers/scsi/isci/sci_environment.h | 2 |
6 files changed, 33 insertions, 68 deletions
diff --git a/drivers/scsi/isci/core/scic_sds_phy.c b/drivers/scsi/isci/core/scic_sds_phy.c index 3b53968abb0a..c935c0482470 100644 --- a/drivers/scsi/isci/core/scic_sds_phy.c +++ b/drivers/scsi/isci/core/scic_sds_phy.c | |||
@@ -1565,9 +1565,7 @@ static const struct scic_sds_phy_state_handler scic_sds_phy_starting_substate_ha | |||
1565 | */ | 1565 | */ |
1566 | static void scic_sds_phy_starting_initial_substate_enter(void *object) | 1566 | static void scic_sds_phy_starting_initial_substate_enter(void *object) |
1567 | { | 1567 | { |
1568 | struct scic_sds_phy *sci_phy; | 1568 | struct scic_sds_phy *sci_phy = object; |
1569 | |||
1570 | sci_phy = (struct scic_sds_phy *)object; | ||
1571 | 1569 | ||
1572 | scic_sds_phy_set_starting_substate_handlers( | 1570 | scic_sds_phy_set_starting_substate_handlers( |
1573 | sci_phy, SCIC_SDS_PHY_STARTING_SUBSTATE_INITIAL); | 1571 | sci_phy, SCIC_SDS_PHY_STARTING_SUBSTATE_INITIAL); |
@@ -1587,9 +1585,7 @@ static void scic_sds_phy_starting_initial_substate_enter(void *object) | |||
1587 | */ | 1585 | */ |
1588 | static void scic_sds_phy_starting_await_ossp_en_substate_enter(void *object) | 1586 | static void scic_sds_phy_starting_await_ossp_en_substate_enter(void *object) |
1589 | { | 1587 | { |
1590 | struct scic_sds_phy *sci_phy; | 1588 | struct scic_sds_phy *sci_phy = object; |
1591 | |||
1592 | sci_phy = (struct scic_sds_phy *)object; | ||
1593 | 1589 | ||
1594 | scic_sds_phy_set_starting_substate_handlers( | 1590 | scic_sds_phy_set_starting_substate_handlers( |
1595 | sci_phy, SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_OSSP_EN | 1591 | sci_phy, SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_OSSP_EN |
@@ -1607,9 +1603,7 @@ static void scic_sds_phy_starting_await_ossp_en_substate_enter(void *object) | |||
1607 | static void scic_sds_phy_starting_await_sas_speed_en_substate_enter( | 1603 | static void scic_sds_phy_starting_await_sas_speed_en_substate_enter( |
1608 | void *object) | 1604 | void *object) |
1609 | { | 1605 | { |
1610 | struct scic_sds_phy *sci_phy; | 1606 | struct scic_sds_phy *sci_phy = object; |
1611 | |||
1612 | sci_phy = (struct scic_sds_phy *)object; | ||
1613 | 1607 | ||
1614 | scic_sds_phy_set_starting_substate_handlers( | 1608 | scic_sds_phy_set_starting_substate_handlers( |
1615 | sci_phy, SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SAS_SPEED_EN | 1609 | sci_phy, SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SAS_SPEED_EN |
@@ -1626,9 +1620,7 @@ static void scic_sds_phy_starting_await_sas_speed_en_substate_enter( | |||
1626 | */ | 1620 | */ |
1627 | static void scic_sds_phy_starting_await_iaf_uf_substate_enter(void *object) | 1621 | static void scic_sds_phy_starting_await_iaf_uf_substate_enter(void *object) |
1628 | { | 1622 | { |
1629 | struct scic_sds_phy *sci_phy; | 1623 | struct scic_sds_phy *sci_phy = object; |
1630 | |||
1631 | sci_phy = (struct scic_sds_phy *)object; | ||
1632 | 1624 | ||
1633 | scic_sds_phy_set_starting_substate_handlers( | 1625 | scic_sds_phy_set_starting_substate_handlers( |
1634 | sci_phy, SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_IAF_UF | 1626 | sci_phy, SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_IAF_UF |
@@ -1646,9 +1638,7 @@ static void scic_sds_phy_starting_await_iaf_uf_substate_enter(void *object) | |||
1646 | */ | 1638 | */ |
1647 | static void scic_sds_phy_starting_await_sas_power_substate_enter(void *object) | 1639 | static void scic_sds_phy_starting_await_sas_power_substate_enter(void *object) |
1648 | { | 1640 | { |
1649 | struct scic_sds_phy *sci_phy; | 1641 | struct scic_sds_phy *sci_phy = object; |
1650 | |||
1651 | sci_phy = (struct scic_sds_phy *)object; | ||
1652 | 1642 | ||
1653 | scic_sds_phy_set_starting_substate_handlers( | 1643 | scic_sds_phy_set_starting_substate_handlers( |
1654 | sci_phy, SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SAS_POWER | 1644 | sci_phy, SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SAS_POWER |
@@ -1670,9 +1660,7 @@ static void scic_sds_phy_starting_await_sas_power_substate_enter(void *object) | |||
1670 | */ | 1660 | */ |
1671 | static void scic_sds_phy_starting_await_sas_power_substate_exit(void *object) | 1661 | static void scic_sds_phy_starting_await_sas_power_substate_exit(void *object) |
1672 | { | 1662 | { |
1673 | struct scic_sds_phy *sci_phy; | 1663 | struct scic_sds_phy *sci_phy = object; |
1674 | |||
1675 | sci_phy = (struct scic_sds_phy *)object; | ||
1676 | 1664 | ||
1677 | scic_sds_controller_power_control_queue_remove( | 1665 | scic_sds_controller_power_control_queue_remove( |
1678 | scic_sds_phy_get_controller(sci_phy), sci_phy | 1666 | scic_sds_phy_get_controller(sci_phy), sci_phy |
@@ -1690,9 +1678,7 @@ static void scic_sds_phy_starting_await_sas_power_substate_exit(void *object) | |||
1690 | */ | 1678 | */ |
1691 | static void scic_sds_phy_starting_await_sata_power_substate_enter(void *object) | 1679 | static void scic_sds_phy_starting_await_sata_power_substate_enter(void *object) |
1692 | { | 1680 | { |
1693 | struct scic_sds_phy *sci_phy; | 1681 | struct scic_sds_phy *sci_phy = object; |
1694 | |||
1695 | sci_phy = (struct scic_sds_phy *)object; | ||
1696 | 1682 | ||
1697 | scic_sds_phy_set_starting_substate_handlers( | 1683 | scic_sds_phy_set_starting_substate_handlers( |
1698 | sci_phy, SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SATA_POWER | 1684 | sci_phy, SCIC_SDS_PHY_STARTING_SUBSTATE_AWAIT_SATA_POWER |
@@ -1714,9 +1700,7 @@ static void scic_sds_phy_starting_await_sata_power_substate_enter(void *object) | |||
1714 | */ | 1700 | */ |
1715 | static void scic_sds_phy_starting_await_sata_power_substate_exit(void *object) | 1701 | static void scic_sds_phy_starting_await_sata_power_substate_exit(void *object) |
1716 | { | 1702 | { |
1717 | struct scic_sds_phy *sci_phy; | 1703 | struct scic_sds_phy *sci_phy = object; |
1718 | |||
1719 | sci_phy = (struct scic_sds_phy *)object; | ||
1720 | 1704 | ||
1721 | scic_sds_controller_power_control_queue_remove( | 1705 | scic_sds_controller_power_control_queue_remove( |
1722 | scic_sds_phy_get_controller(sci_phy), | 1706 | scic_sds_phy_get_controller(sci_phy), |
@@ -1734,7 +1718,7 @@ static void scic_sds_phy_starting_await_sata_power_substate_exit(void *object) | |||
1734 | */ | 1718 | */ |
1735 | static void scic_sds_phy_starting_await_sata_phy_substate_enter(void *object) | 1719 | static void scic_sds_phy_starting_await_sata_phy_substate_enter(void *object) |
1736 | { | 1720 | { |
1737 | struct scic_sds_phy *sci_phy = (struct scic_sds_phy *)object; | 1721 | struct scic_sds_phy *sci_phy = object; |
1738 | 1722 | ||
1739 | scic_sds_phy_set_starting_substate_handlers( | 1723 | scic_sds_phy_set_starting_substate_handlers( |
1740 | sci_phy, | 1724 | sci_phy, |
@@ -1756,7 +1740,7 @@ static void scic_sds_phy_starting_await_sata_phy_substate_enter(void *object) | |||
1756 | static inline void scic_sds_phy_starting_await_sata_phy_substate_exit( | 1740 | static inline void scic_sds_phy_starting_await_sata_phy_substate_exit( |
1757 | void *object) | 1741 | void *object) |
1758 | { | 1742 | { |
1759 | struct scic_sds_phy *sci_phy = (struct scic_sds_phy *)object; | 1743 | struct scic_sds_phy *sci_phy = object; |
1760 | 1744 | ||
1761 | isci_timer_stop(sci_phy->sata_timeout_timer); | 1745 | isci_timer_stop(sci_phy->sata_timeout_timer); |
1762 | } | 1746 | } |
@@ -1771,7 +1755,7 @@ static inline void scic_sds_phy_starting_await_sata_phy_substate_exit( | |||
1771 | */ | 1755 | */ |
1772 | static void scic_sds_phy_starting_await_sata_speed_substate_enter(void *object) | 1756 | static void scic_sds_phy_starting_await_sata_speed_substate_enter(void *object) |
1773 | { | 1757 | { |
1774 | struct scic_sds_phy *sci_phy = (struct scic_sds_phy *)object; | 1758 | struct scic_sds_phy *sci_phy = object; |
1775 | 1759 | ||
1776 | scic_sds_phy_set_starting_substate_handlers( | 1760 | scic_sds_phy_set_starting_substate_handlers( |
1777 | sci_phy, | 1761 | sci_phy, |
@@ -1793,7 +1777,7 @@ static void scic_sds_phy_starting_await_sata_speed_substate_enter(void *object) | |||
1793 | static inline void scic_sds_phy_starting_await_sata_speed_substate_exit( | 1777 | static inline void scic_sds_phy_starting_await_sata_speed_substate_exit( |
1794 | void *object) | 1778 | void *object) |
1795 | { | 1779 | { |
1796 | struct scic_sds_phy *sci_phy = (struct scic_sds_phy *)object; | 1780 | struct scic_sds_phy *sci_phy = object; |
1797 | 1781 | ||
1798 | isci_timer_stop(sci_phy->sata_timeout_timer); | 1782 | isci_timer_stop(sci_phy->sata_timeout_timer); |
1799 | } | 1783 | } |
@@ -1811,7 +1795,7 @@ static inline void scic_sds_phy_starting_await_sata_speed_substate_exit( | |||
1811 | static void scic_sds_phy_starting_await_sig_fis_uf_substate_enter(void *object) | 1795 | static void scic_sds_phy_starting_await_sig_fis_uf_substate_enter(void *object) |
1812 | { | 1796 | { |
1813 | bool continue_to_ready_state; | 1797 | bool continue_to_ready_state; |
1814 | struct scic_sds_phy *sci_phy = (struct scic_sds_phy *)object; | 1798 | struct scic_sds_phy *sci_phy = object; |
1815 | 1799 | ||
1816 | scic_sds_phy_set_starting_substate_handlers( | 1800 | scic_sds_phy_set_starting_substate_handlers( |
1817 | sci_phy, | 1801 | sci_phy, |
@@ -1848,9 +1832,7 @@ static void scic_sds_phy_starting_await_sig_fis_uf_substate_enter(void *object) | |||
1848 | static inline void scic_sds_phy_starting_await_sig_fis_uf_substate_exit( | 1832 | static inline void scic_sds_phy_starting_await_sig_fis_uf_substate_exit( |
1849 | void *object) | 1833 | void *object) |
1850 | { | 1834 | { |
1851 | struct scic_sds_phy *sci_phy; | 1835 | struct scic_sds_phy *sci_phy = object; |
1852 | |||
1853 | sci_phy = (struct scic_sds_phy *)object; | ||
1854 | 1836 | ||
1855 | isci_timer_stop(sci_phy->sata_timeout_timer); | 1837 | isci_timer_stop(sci_phy->sata_timeout_timer); |
1856 | } | 1838 | } |
@@ -1866,9 +1848,7 @@ static inline void scic_sds_phy_starting_await_sig_fis_uf_substate_exit( | |||
1866 | */ | 1848 | */ |
1867 | static void scic_sds_phy_starting_final_substate_enter(void *object) | 1849 | static void scic_sds_phy_starting_final_substate_enter(void *object) |
1868 | { | 1850 | { |
1869 | struct scic_sds_phy *sci_phy; | 1851 | struct scic_sds_phy *sci_phy = object; |
1870 | |||
1871 | sci_phy = container_of(object, typeof(*sci_phy), parent); | ||
1872 | 1852 | ||
1873 | scic_sds_phy_set_starting_substate_handlers(sci_phy, | 1853 | scic_sds_phy_set_starting_substate_handlers(sci_phy, |
1874 | SCIC_SDS_PHY_STARTING_SUBSTATE_FINAL); | 1854 | SCIC_SDS_PHY_STARTING_SUBSTATE_FINAL); |
@@ -2200,9 +2180,7 @@ static void scu_link_layer_tx_hard_reset( | |||
2200 | */ | 2180 | */ |
2201 | static void scic_sds_phy_initial_state_enter(void *object) | 2181 | static void scic_sds_phy_initial_state_enter(void *object) |
2202 | { | 2182 | { |
2203 | struct scic_sds_phy *sci_phy; | 2183 | struct scic_sds_phy *sci_phy = object; |
2204 | |||
2205 | sci_phy = (struct scic_sds_phy *)object; | ||
2206 | 2184 | ||
2207 | scic_sds_phy_set_base_state_handlers(sci_phy, SCI_BASE_PHY_STATE_INITIAL); | 2185 | scic_sds_phy_set_base_state_handlers(sci_phy, SCI_BASE_PHY_STATE_INITIAL); |
2208 | } | 2186 | } |
@@ -2218,12 +2196,10 @@ static void scic_sds_phy_initial_state_enter(void *object) | |||
2218 | */ | 2196 | */ |
2219 | static void scic_sds_phy_stopped_state_enter(void *object) | 2197 | static void scic_sds_phy_stopped_state_enter(void *object) |
2220 | { | 2198 | { |
2221 | struct scic_sds_phy *sci_phy = (struct scic_sds_phy *)object; | 2199 | struct scic_sds_phy *sci_phy = object; |
2222 | struct scic_sds_controller *scic = scic_sds_phy_get_controller(sci_phy); | 2200 | struct scic_sds_controller *scic = scic_sds_phy_get_controller(sci_phy); |
2223 | struct isci_host *ihost = scic->ihost; | 2201 | struct isci_host *ihost = scic->ihost; |
2224 | 2202 | ||
2225 | sci_phy = (struct scic_sds_phy *)object; | ||
2226 | |||
2227 | /* | 2203 | /* |
2228 | * @todo We need to get to the controller to place this PE in a | 2204 | * @todo We need to get to the controller to place this PE in a |
2229 | * reset state | 2205 | * reset state |
@@ -2262,9 +2238,7 @@ static void scic_sds_phy_stopped_state_enter(void *object) | |||
2262 | */ | 2238 | */ |
2263 | static void scic_sds_phy_starting_state_enter(void *object) | 2239 | static void scic_sds_phy_starting_state_enter(void *object) |
2264 | { | 2240 | { |
2265 | struct scic_sds_phy *sci_phy; | 2241 | struct scic_sds_phy *sci_phy = object; |
2266 | |||
2267 | sci_phy = (struct scic_sds_phy *)object; | ||
2268 | 2242 | ||
2269 | scic_sds_phy_set_base_state_handlers(sci_phy, SCI_BASE_PHY_STATE_STARTING); | 2243 | scic_sds_phy_set_base_state_handlers(sci_phy, SCI_BASE_PHY_STATE_STARTING); |
2270 | 2244 | ||
@@ -2300,9 +2274,7 @@ static void scic_sds_phy_starting_state_enter(void *object) | |||
2300 | */ | 2274 | */ |
2301 | static void scic_sds_phy_ready_state_enter(void *object) | 2275 | static void scic_sds_phy_ready_state_enter(void *object) |
2302 | { | 2276 | { |
2303 | struct scic_sds_phy *sci_phy; | 2277 | struct scic_sds_phy *sci_phy = object; |
2304 | |||
2305 | sci_phy = (struct scic_sds_phy *)object; | ||
2306 | 2278 | ||
2307 | scic_sds_phy_set_base_state_handlers(sci_phy, SCI_BASE_PHY_STATE_READY); | 2279 | scic_sds_phy_set_base_state_handlers(sci_phy, SCI_BASE_PHY_STATE_READY); |
2308 | 2280 | ||
@@ -2323,9 +2295,7 @@ static void scic_sds_phy_ready_state_enter(void *object) | |||
2323 | */ | 2295 | */ |
2324 | static void scic_sds_phy_ready_state_exit(void *object) | 2296 | static void scic_sds_phy_ready_state_exit(void *object) |
2325 | { | 2297 | { |
2326 | struct scic_sds_phy *sci_phy; | 2298 | struct scic_sds_phy *sci_phy = object; |
2327 | |||
2328 | sci_phy = (struct scic_sds_phy *)object; | ||
2329 | 2299 | ||
2330 | scic_sds_phy_suspend(sci_phy); | 2300 | scic_sds_phy_suspend(sci_phy); |
2331 | } | 2301 | } |
@@ -2340,9 +2310,7 @@ static void scic_sds_phy_ready_state_exit(void *object) | |||
2340 | */ | 2310 | */ |
2341 | static void scic_sds_phy_resetting_state_enter(void *object) | 2311 | static void scic_sds_phy_resetting_state_enter(void *object) |
2342 | { | 2312 | { |
2343 | struct scic_sds_phy *sci_phy; | 2313 | struct scic_sds_phy *sci_phy = object; |
2344 | |||
2345 | sci_phy = (struct scic_sds_phy *)object; | ||
2346 | 2314 | ||
2347 | scic_sds_phy_set_base_state_handlers(sci_phy, SCI_BASE_PHY_STATE_RESETTING); | 2315 | scic_sds_phy_set_base_state_handlers(sci_phy, SCI_BASE_PHY_STATE_RESETTING); |
2348 | 2316 | ||
@@ -2375,9 +2343,7 @@ static void scic_sds_phy_resetting_state_enter(void *object) | |||
2375 | */ | 2343 | */ |
2376 | static void scic_sds_phy_final_state_enter(void *object) | 2344 | static void scic_sds_phy_final_state_enter(void *object) |
2377 | { | 2345 | { |
2378 | struct scic_sds_phy *sci_phy; | 2346 | struct scic_sds_phy *sci_phy = object; |
2379 | |||
2380 | sci_phy = (struct scic_sds_phy *)object; | ||
2381 | 2347 | ||
2382 | scic_sds_phy_set_base_state_handlers(sci_phy, SCI_BASE_PHY_STATE_FINAL); | 2348 | scic_sds_phy_set_base_state_handlers(sci_phy, SCI_BASE_PHY_STATE_FINAL); |
2383 | 2349 | ||
@@ -2412,9 +2378,8 @@ void scic_sds_phy_construct(struct scic_sds_phy *sci_phy, | |||
2412 | struct scic_sds_port *owning_port, u8 phy_index) | 2378 | struct scic_sds_port *owning_port, u8 phy_index) |
2413 | { | 2379 | { |
2414 | 2380 | ||
2415 | sci_phy->parent.private = NULL; | ||
2416 | sci_base_state_machine_construct(&sci_phy->state_machine, | 2381 | sci_base_state_machine_construct(&sci_phy->state_machine, |
2417 | &sci_phy->parent, | 2382 | sci_phy, |
2418 | scic_sds_phy_state_table, | 2383 | scic_sds_phy_state_table, |
2419 | SCI_BASE_PHY_STATE_INITIAL); | 2384 | SCI_BASE_PHY_STATE_INITIAL); |
2420 | 2385 | ||
@@ -2434,7 +2399,7 @@ void scic_sds_phy_construct(struct scic_sds_phy *sci_phy, | |||
2434 | 2399 | ||
2435 | /* Initialize the the substate machines */ | 2400 | /* Initialize the the substate machines */ |
2436 | sci_base_state_machine_construct(&sci_phy->starting_substate_machine, | 2401 | sci_base_state_machine_construct(&sci_phy->starting_substate_machine, |
2437 | &sci_phy->parent, | 2402 | sci_phy, |
2438 | scic_sds_phy_starting_substates, | 2403 | scic_sds_phy_starting_substates, |
2439 | SCIC_SDS_PHY_STARTING_SUBSTATE_INITIAL); | 2404 | SCIC_SDS_PHY_STARTING_SUBSTATE_INITIAL); |
2440 | } | 2405 | } |
diff --git a/drivers/scsi/isci/core/scic_sds_phy.h b/drivers/scsi/isci/core/scic_sds_phy.h index fb99d472ce60..fca95c1c027a 100644 --- a/drivers/scsi/isci/core/scic_sds_phy.h +++ b/drivers/scsi/isci/core/scic_sds_phy.h | |||
@@ -217,6 +217,7 @@ enum scic_sds_phy_protocol { | |||
217 | SCIC_SDS_MAX_PHY_PROTOCOLS | 217 | SCIC_SDS_MAX_PHY_PROTOCOLS |
218 | }; | 218 | }; |
219 | 219 | ||
220 | struct isci_phy; | ||
220 | /** | 221 | /** |
221 | * struct scic_sds_phy - This structure contains or references all of the data | 222 | * struct scic_sds_phy - This structure contains or references all of the data |
222 | * necessary to represent the core phy object and SCU harware protocol | 223 | * necessary to represent the core phy object and SCU harware protocol |
@@ -226,9 +227,9 @@ enum scic_sds_phy_protocol { | |||
226 | */ | 227 | */ |
227 | struct scic_sds_phy { | 228 | struct scic_sds_phy { |
228 | /** | 229 | /** |
229 | * This field depicts the parent object (struct sci_base_object) for the phy. | 230 | * This field depicts the peer object for the phy. |
230 | */ | 231 | */ |
231 | struct sci_base_object parent; | 232 | struct isci_phy *iphy; |
232 | 233 | ||
233 | /** | 234 | /** |
234 | * This field contains the information for the base phy state machine. | 235 | * This field contains the information for the base phy state machine. |
diff --git a/drivers/scsi/isci/core/scic_sds_port.c b/drivers/scsi/isci/core/scic_sds_port.c index 857482b27ffc..d6339c41c392 100644 --- a/drivers/scsi/isci/core/scic_sds_port.c +++ b/drivers/scsi/isci/core/scic_sds_port.c | |||
@@ -680,7 +680,7 @@ void scic_sds_port_deactivate_phy(struct scic_sds_port *sci_port, | |||
680 | struct scic_sds_controller *scic = scic_sds_port_get_controller(sci_port); | 680 | struct scic_sds_controller *scic = scic_sds_port_get_controller(sci_port); |
681 | struct isci_port *iport = sci_object_get_association(sci_port); | 681 | struct isci_port *iport = sci_object_get_association(sci_port); |
682 | struct isci_host *ihost = scic->ihost; | 682 | struct isci_host *ihost = scic->ihost; |
683 | struct isci_phy *iphy = sci_object_get_association(sci_phy); | 683 | struct isci_phy *iphy = sci_phy->iphy; |
684 | 684 | ||
685 | sci_port->active_phy_mask &= ~(1 << sci_phy->phy_index); | 685 | sci_port->active_phy_mask &= ~(1 << sci_phy->phy_index); |
686 | 686 | ||
diff --git a/drivers/scsi/isci/phy.c b/drivers/scsi/isci/phy.c index 9e081a4c8a3c..a690b6b664f7 100644 --- a/drivers/scsi/isci/phy.c +++ b/drivers/scsi/isci/phy.c | |||
@@ -57,6 +57,7 @@ | |||
57 | #include "phy.h" | 57 | #include "phy.h" |
58 | #include "scic_port.h" | 58 | #include "scic_port.h" |
59 | #include "scic_config_parameters.h" | 59 | #include "scic_config_parameters.h" |
60 | #include "core/scic_sds_phy.h" | ||
60 | 61 | ||
61 | struct scic_sds_phy; | 62 | struct scic_sds_phy; |
62 | extern enum sci_status scic_sds_phy_start(struct scic_sds_phy *sci_phy); | 63 | extern enum sci_status scic_sds_phy_start(struct scic_sds_phy *sci_phy); |
@@ -88,8 +89,8 @@ void isci_phy_init( | |||
88 | 89 | ||
89 | status = scic_controller_get_phy_handle(scic, index, &scic_phy); | 90 | status = scic_controller_get_phy_handle(scic, index, &scic_phy); |
90 | if (status == SCI_SUCCESS) { | 91 | if (status == SCI_SUCCESS) { |
91 | sci_object_set_association(scic_phy, (void *)phy); | ||
92 | phy->sci_phy_handle = scic_phy; | 92 | phy->sci_phy_handle = scic_phy; |
93 | scic_phy->iphy = phy; | ||
93 | } else | 94 | } else |
94 | dev_err(&isci_host->pdev->dev, | 95 | dev_err(&isci_host->pdev->dev, |
95 | "failed scic_controller_get_phy_handle\n"); | 96 | "failed scic_controller_get_phy_handle\n"); |
diff --git a/drivers/scsi/isci/port.c b/drivers/scsi/isci/port.c index c0916b199b70..d600b09192e7 100644 --- a/drivers/scsi/isci/port.c +++ b/drivers/scsi/isci/port.c | |||
@@ -137,8 +137,7 @@ void isci_port_bc_change_received( | |||
137 | struct scic_sds_port *port, | 137 | struct scic_sds_port *port, |
138 | struct scic_sds_phy *phy) | 138 | struct scic_sds_phy *phy) |
139 | { | 139 | { |
140 | struct isci_phy *isci_phy = | 140 | struct isci_phy *isci_phy = phy->iphy; |
141 | (struct isci_phy *)sci_object_get_association(phy); | ||
142 | 141 | ||
143 | dev_dbg(&isci_host->pdev->dev, | 142 | dev_dbg(&isci_host->pdev->dev, |
144 | "%s: isci_phy = %p, sas_phy = %p\n", | 143 | "%s: isci_phy = %p, sas_phy = %p\n", |
@@ -170,10 +169,9 @@ void isci_port_link_up( | |||
170 | { | 169 | { |
171 | unsigned long flags; | 170 | unsigned long flags; |
172 | struct scic_port_properties properties; | 171 | struct scic_port_properties properties; |
173 | struct isci_phy *isci_phy | ||
174 | = (struct isci_phy *)sci_object_get_association(phy); | ||
175 | struct isci_port *isci_port | 172 | struct isci_port *isci_port |
176 | = (struct isci_port *)sci_object_get_association(port); | 173 | = (struct isci_port *)sci_object_get_association(port); |
174 | struct isci_phy *isci_phy = phy->iphy; | ||
177 | enum sci_status call_status; | 175 | enum sci_status call_status; |
178 | unsigned long success = true; | 176 | unsigned long success = true; |
179 | 177 | ||
diff --git a/drivers/scsi/isci/sci_environment.h b/drivers/scsi/isci/sci_environment.h index 6be9274975d0..744016dffecb 100644 --- a/drivers/scsi/isci/sci_environment.h +++ b/drivers/scsi/isci/sci_environment.h | |||
@@ -73,7 +73,7 @@ static inline struct device *scic_to_dev(struct scic_sds_controller *scic) | |||
73 | 73 | ||
74 | static inline struct device *sciphy_to_dev(struct scic_sds_phy *sci_phy) | 74 | static inline struct device *sciphy_to_dev(struct scic_sds_phy *sci_phy) |
75 | { | 75 | { |
76 | struct isci_phy *iphy = sci_object_get_association(sci_phy); | 76 | struct isci_phy *iphy = sci_phy->iphy; |
77 | 77 | ||
78 | if (!iphy || !iphy->isci_port || !iphy->isci_port->isci_host) | 78 | if (!iphy || !iphy->isci_port || !iphy->isci_port->isci_host) |
79 | return NULL; | 79 | return NULL; |