diff options
author | Dave Jiang <dave.jiang@intel.com> | 2011-03-02 16:10:45 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 06:55:29 -0400 |
commit | d7628d052242d634dc1e2584c422e690578918a3 (patch) | |
tree | 507ddf62beb57b245efc10d8f0e553f7784b06f7 | |
parent | 4d07f7f367f2c2d5547684893e61a7a796c1547f (diff) |
isci: Cleanup warning messages for phy resets
Moving some of the chattiness of warning messages to debug so only the Linux
system messages are shown.
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_controller.c | 65 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_phy.c | 36 | ||||
-rw-r--r-- | drivers/scsi/isci/remote_device.c | 2 |
3 files changed, 43 insertions, 60 deletions
diff --git a/drivers/scsi/isci/core/scic_sds_controller.c b/drivers/scsi/isci/core/scic_sds_controller.c index deee7ebef033..180bb1e69012 100644 --- a/drivers/scsi/isci/core/scic_sds_controller.c +++ b/drivers/scsi/isci/core/scic_sds_controller.c | |||
@@ -1669,7 +1669,7 @@ void scic_sds_controller_link_up( | |||
1669 | if (link_up) | 1669 | if (link_up) |
1670 | link_up(scic, sci_port, sci_phy); | 1670 | link_up(scic, sci_port, sci_phy); |
1671 | else | 1671 | else |
1672 | dev_warn(scic_to_dev(scic), | 1672 | dev_dbg(scic_to_dev(scic), |
1673 | "%s: SCIC Controller linkup event from phy %d in " | 1673 | "%s: SCIC Controller linkup event from phy %d in " |
1674 | "unexpected state %d\n", | 1674 | "unexpected state %d\n", |
1675 | __func__, | 1675 | __func__, |
@@ -1694,14 +1694,11 @@ void scic_sds_controller_link_down( | |||
1694 | if (link_down) | 1694 | if (link_down) |
1695 | link_down(scic, sci_port, sci_phy); | 1695 | link_down(scic, sci_port, sci_phy); |
1696 | else | 1696 | else |
1697 | dev_warn(scic_to_dev(scic), | 1697 | dev_dbg(scic_to_dev(scic), |
1698 | "%s: SCIC Controller linkdown event from phy %d in " | 1698 | "%s: SCIC Controller linkdown event from phy %d in " |
1699 | "unexpected state %d\n", | 1699 | "unexpected state %d\n", |
1700 | __func__, | 1700 | __func__, |
1701 | sci_phy->phy_index, | 1701 | sci_phy->phy_index, state); |
1702 | sci_base_state_machine_get_state( | ||
1703 | scic_sds_controller_get_base_state_machine( | ||
1704 | scic))); | ||
1705 | } | 1702 | } |
1706 | 1703 | ||
1707 | /** | 1704 | /** |
@@ -1710,28 +1707,22 @@ void scic_sds_controller_link_down( | |||
1710 | * | 1707 | * |
1711 | */ | 1708 | */ |
1712 | 1709 | ||
1713 | void scic_sds_controller_remote_device_started( | 1710 | void scic_sds_controller_remote_device_started(struct scic_sds_controller *scic, |
1714 | struct scic_sds_controller *this_controller, | 1711 | struct scic_sds_remote_device *sci_dev) |
1715 | struct scic_sds_remote_device *the_device) | ||
1716 | { | 1712 | { |
1717 | u32 state; | 1713 | u32 state; |
1718 | scic_sds_controller_device_handler_t remote_device_started_handler; | 1714 | scic_sds_controller_device_handler_t started; |
1719 | 1715 | ||
1720 | state = this_controller->parent.state_machine.current_state_id; | 1716 | state = scic->parent.state_machine.current_state_id; |
1721 | remote_device_started_handler = scic_sds_controller_state_handler_table[state].remote_device_started_handler; | 1717 | started = scic_sds_controller_state_handler_table[state].remote_device_started_handler; |
1722 | 1718 | ||
1723 | if (remote_device_started_handler != NULL) | 1719 | if (started) |
1724 | remote_device_started_handler(this_controller, the_device); | 1720 | started(scic, sci_dev); |
1725 | else { | 1721 | else { |
1726 | dev_warn(scic_to_dev(this_controller), | 1722 | dev_dbg(scic_to_dev(scic), |
1727 | "%s: SCIC Controller 0x%p remote device started event " | 1723 | "%s: SCIC Controller 0x%p remote device started event " |
1728 | "from device 0x%p in unexpected state %d\n", | 1724 | "from device 0x%p in unexpected state %d\n", |
1729 | __func__, | 1725 | __func__, scic, sci_dev, state); |
1730 | this_controller, | ||
1731 | the_device, | ||
1732 | sci_base_state_machine_get_state( | ||
1733 | scic_sds_controller_get_base_state_machine( | ||
1734 | this_controller))); | ||
1735 | } | 1726 | } |
1736 | } | 1727 | } |
1737 | 1728 | ||
@@ -1761,29 +1752,23 @@ bool scic_sds_controller_has_remote_devices_stopping( | |||
1761 | * | 1752 | * |
1762 | */ | 1753 | */ |
1763 | 1754 | ||
1764 | void scic_sds_controller_remote_device_stopped( | 1755 | void scic_sds_controller_remote_device_stopped(struct scic_sds_controller *scic, |
1765 | struct scic_sds_controller *this_controller, | 1756 | struct scic_sds_remote_device *sci_dev) |
1766 | struct scic_sds_remote_device *the_device) | ||
1767 | { | 1757 | { |
1768 | 1758 | ||
1769 | u32 state; | 1759 | u32 state; |
1770 | scic_sds_controller_device_handler_t remote_device_stopped_handler; | 1760 | scic_sds_controller_device_handler_t stopped; |
1771 | 1761 | ||
1772 | state = this_controller->parent.state_machine.current_state_id; | 1762 | state = scic->parent.state_machine.current_state_id; |
1773 | remote_device_stopped_handler = scic_sds_controller_state_handler_table[state].remote_device_stopped_handler; | 1763 | stopped = scic_sds_controller_state_handler_table[state].remote_device_stopped_handler; |
1774 | 1764 | ||
1775 | if (remote_device_stopped_handler != NULL) | 1765 | if (stopped) |
1776 | remote_device_stopped_handler(this_controller, the_device); | 1766 | stopped(scic, sci_dev); |
1777 | else { | 1767 | else { |
1778 | dev_warn(scic_to_dev(this_controller), | 1768 | dev_dbg(scic_to_dev(scic), |
1779 | "%s: SCIC Controller 0x%p remote device stopped event " | 1769 | "%s: SCIC Controller 0x%p remote device stopped event " |
1780 | "from device 0x%p in unexpected state %d\n", | 1770 | "from device 0x%p in unexpected state %d\n", |
1781 | __func__, | 1771 | __func__, scic, sci_dev, state); |
1782 | this_controller, | ||
1783 | the_device, | ||
1784 | sci_base_state_machine_get_state( | ||
1785 | scic_sds_controller_get_base_state_machine( | ||
1786 | this_controller))); | ||
1787 | } | 1772 | } |
1788 | } | 1773 | } |
1789 | 1774 | ||
diff --git a/drivers/scsi/isci/core/scic_sds_phy.c b/drivers/scsi/isci/core/scic_sds_phy.c index 6f00ff6aa6bf..27174589a863 100644 --- a/drivers/scsi/isci/core/scic_sds_phy.c +++ b/drivers/scsi/isci/core/scic_sds_phy.c | |||
@@ -808,11 +808,11 @@ static enum sci_status scic_sds_phy_starting_substate_await_ossp_event_handler( | |||
808 | break; | 808 | break; |
809 | 809 | ||
810 | default: | 810 | default: |
811 | dev_warn(sciphy_to_dev(this_phy), | 811 | dev_dbg(sciphy_to_dev(this_phy), |
812 | "%s: PHY starting substate machine received " | 812 | "%s: PHY starting substate machine received " |
813 | "unexpected event_code %x\n", | 813 | "unexpected event_code %x\n", |
814 | __func__, | 814 | __func__, |
815 | event_code); | 815 | event_code); |
816 | 816 | ||
817 | result = SCI_FAILURE; | 817 | result = SCI_FAILURE; |
818 | break; | 818 | break; |
@@ -2000,26 +2000,24 @@ enum sci_status scic_sds_phy_default_start_handler( | |||
2000 | 2000 | ||
2001 | /** | 2001 | /** |
2002 | * | 2002 | * |
2003 | * @phy: This is the struct sci_base_phy object which is cast into a struct scic_sds_phy | 2003 | * @phy: This is the struct sci_base_phy object which is cast into a |
2004 | * object. | 2004 | * struct scic_sds_phy object. |
2005 | * | 2005 | * |
2006 | * This is the default method for phy a stop request. It will report a warning | 2006 | * This is the default method for phy a stop request. It will report a warning |
2007 | * and exit. enum sci_status SCI_FAILURE_INVALID_STATE | 2007 | * and exit. enum sci_status SCI_FAILURE_INVALID_STATE |
2008 | */ | 2008 | */ |
2009 | enum sci_status scic_sds_phy_default_stop_handler( | 2009 | enum sci_status scic_sds_phy_default_stop_handler(struct sci_base_phy *base_phy) |
2010 | struct sci_base_phy *phy) | ||
2011 | { | 2010 | { |
2012 | struct scic_sds_phy *this_phy; | 2011 | struct scic_sds_phy *sci_phy; |
2013 | 2012 | ||
2014 | this_phy = (struct scic_sds_phy *)phy; | 2013 | sci_phy = (struct scic_sds_phy *)base_phy; |
2015 | 2014 | ||
2016 | dev_warn(sciphy_to_dev(this_phy), | 2015 | dev_dbg(sciphy_to_dev(sci_phy), |
2017 | "%s: SCIC Phy 0x%p requested to stop from invalid " | 2016 | "%s: SCIC Phy 0x%p requested to stop from invalid state %d\n", |
2018 | "state %d\n", | 2017 | __func__, |
2019 | __func__, | 2018 | sci_phy, |
2020 | this_phy, | 2019 | sci_base_state_machine_get_state( |
2021 | sci_base_state_machine_get_state( | 2020 | &sci_phy->parent.state_machine)); |
2022 | &this_phy->parent.state_machine)); | ||
2023 | 2021 | ||
2024 | return SCI_FAILURE_INVALID_STATE; | 2022 | return SCI_FAILURE_INVALID_STATE; |
2025 | } | 2023 | } |
@@ -2119,7 +2117,7 @@ enum sci_status scic_sds_phy_default_event_handler( | |||
2119 | struct scic_sds_phy *this_phy, | 2117 | struct scic_sds_phy *this_phy, |
2120 | u32 event_code) | 2118 | u32 event_code) |
2121 | { | 2119 | { |
2122 | dev_warn(sciphy_to_dev(this_phy), | 2120 | dev_dbg(sciphy_to_dev(this_phy), |
2123 | "%s: SCIC Phy 0x%p received unexpected event status %x " | 2121 | "%s: SCIC Phy 0x%p received unexpected event status %x " |
2124 | "while in state %d\n", | 2122 | "while in state %d\n", |
2125 | __func__, | 2123 | __func__, |
diff --git a/drivers/scsi/isci/remote_device.c b/drivers/scsi/isci/remote_device.c index dec9033d674d..e684a053189e 100644 --- a/drivers/scsi/isci/remote_device.c +++ b/drivers/scsi/isci/remote_device.c | |||
@@ -472,7 +472,7 @@ void isci_remote_device_gone( | |||
472 | struct isci_remote_device *isci_device = isci_dev_from_domain_dev( | 472 | struct isci_remote_device *isci_device = isci_dev_from_domain_dev( |
473 | domain_dev); | 473 | domain_dev); |
474 | 474 | ||
475 | dev_err(&isci_device->isci_port->isci_host->pdev->dev, | 475 | dev_dbg(&isci_device->isci_port->isci_host->pdev->dev, |
476 | "%s: domain_device = %p, isci_device = %p, isci_port = %p\n", | 476 | "%s: domain_device = %p, isci_device = %p, isci_port = %p\n", |
477 | __func__, domain_dev, isci_device, isci_device->isci_port); | 477 | __func__, domain_dev, isci_device, isci_device->isci_port); |
478 | 478 | ||