^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) * This file is provided under a dual BSD/GPLv2 license. When using or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * redistributing this file, you may do so under either license.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * GPL LICENSE SUMMARY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) * This program is free software; you can redistribute it and/or modify
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) * it under the terms of version 2 of the GNU General Public License as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) * published by the Free Software Foundation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) * This program is distributed in the hope that it will be useful, but
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) * WITHOUT ANY WARRANTY; without even the implied warranty of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) * General Public License for more details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) * You should have received a copy of the GNU General Public License
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) * along with this program; if not, write to the Free Software
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) * The full GNU General Public License is included in this distribution
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) * in the file called LICENSE.GPL.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) * BSD LICENSE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) * All rights reserved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) * Redistribution and use in source and binary forms, with or without
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) * modification, are permitted provided that the following conditions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) * are met:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) * * Redistributions of source code must retain the above copyright
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) * notice, this list of conditions and the following disclaimer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) * * Redistributions in binary form must reproduce the above copyright
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) * notice, this list of conditions and the following disclaimer in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) * the documentation and/or other materials provided with the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) * distribution.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) * * Neither the name of Intel Corporation nor the names of its
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) * contributors may be used to endorse or promote products derived
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) * from this software without specific prior written permission.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) #ifndef _ISCI_PHY_H_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) #define _ISCI_PHY_H_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) #include <scsi/sas.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) #include <scsi/libsas.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) #include "isci.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) #include "sas.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) /* This is the timeout value for the SATA phy to wait for a SIGNATURE FIS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) * before restarting the starting state machine. Technically, the old parallel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) * ATA specification required up to 30 seconds for a device to issue its
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) * signature FIS as a result of a soft reset. Now we see that devices respond
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) * generally within 15 seconds, but we'll use 25 for now.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) #define SCIC_SDS_SIGNATURE_FIS_TIMEOUT 25000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) /* This is the timeout for the SATA OOB/SN because the hardware does not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) * recognize a hot plug after OOB signal but before the SN signals. We need to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) * make sure after a hotplug timeout if we have not received the speed event
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) * notification from the hardware that we restart the hardware OOB state
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) * machine.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) #define SCIC_SDS_SATA_LINK_TRAINING_TIMEOUT 250
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) * isci_phy - hba local phy infrastructure
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) * @sm:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) * @protocol: attached device protocol
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) * @phy_index: physical index relative to the controller (0-3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) * @bcn_received_while_port_unassigned: bcn to report after port association
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) * @sata_timer: timeout SATA signature FIS arrival
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) struct isci_phy {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) struct sci_base_state_machine sm;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) struct isci_port *owning_port;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) enum sas_linkrate max_negotiated_speed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) enum sas_protocol protocol;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) u8 phy_index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) bool bcn_received_while_port_unassigned;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) bool is_in_link_training;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) struct sci_timer sata_timer;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96) struct scu_transport_layer_registers __iomem *transport_layer_registers;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) struct scu_link_layer_registers __iomem *link_layer_registers;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) struct asd_sas_phy sas_phy;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) u8 sas_addr[SAS_ADDR_SIZE];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) struct sas_identify_frame iaf;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) struct dev_to_host_fis fis;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) } frame_rcvd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) static inline struct isci_phy *to_iphy(struct asd_sas_phy *sas_phy)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) struct isci_phy *iphy = container_of(sas_phy, typeof(*iphy), sas_phy);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) return iphy;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) struct sci_phy_cap {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) * The SAS specification indicates the start bit shall
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) * always be set to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) * 1. This implementation will have the start bit set
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) * to 0 if the PHY CAPABILITIES were either not
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) * received or speed negotiation failed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) u8 start:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) u8 tx_ssc_type:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) u8 res1:2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) u8 req_logical_linkrate:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) u32 gen1_no_ssc:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) u32 gen1_ssc:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) u32 gen2_no_ssc:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) u32 gen2_ssc:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) u32 gen3_no_ssc:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) u32 gen3_ssc:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) u32 res2:17;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) u32 parity:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) u32 all;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) /* this data structure reflects the link layer transmit identification reg */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) struct sci_phy_proto {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) struct {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) u16 _r_a:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) u16 smp_iport:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) u16 stp_iport:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) u16 ssp_iport:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) u16 _r_b:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) u16 _r_c:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) u16 smp_tport:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) u16 stp_tport:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) u16 ssp_tport:1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) u16 _r_d:4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) u16 all;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) } __packed;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) * struct sci_phy_properties - This structure defines the properties common to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) * all phys that can be retrieved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) struct sci_phy_properties {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) * This field specifies the port that currently contains the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) * supplied phy. This field may be set to NULL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) * if the phy is not currently contained in a port.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) struct isci_port *iport;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) * This field specifies the link rate at which the phy is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) * currently operating.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) enum sas_linkrate negotiated_link_rate;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) * This field specifies the index of the phy in relation to other
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) * phys within the controller. This index is zero relative.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) u8 index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) * struct sci_sas_phy_properties - This structure defines the properties,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) * specific to a SAS phy, that can be retrieved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) struct sci_sas_phy_properties {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) * This field delineates the Identify Address Frame received
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) * from the remote end point.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) struct sas_identify_frame rcvd_iaf;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) * This field delineates the Phy capabilities structure received
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) * from the remote end point.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) struct sci_phy_cap rcvd_cap;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) * struct sci_sata_phy_properties - This structure defines the properties,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) * specific to a SATA phy, that can be retrieved.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) struct sci_sata_phy_properties {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) * This field delineates the signature FIS received from the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) * attached target.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) struct dev_to_host_fis signature_fis;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) * This field specifies to the user if a port selector is connected
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) * on the specified phy.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) bool is_port_selector_present;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) * enum sci_phy_counter_id - This enumeration depicts the various pieces of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) * optional information that can be retrieved for a specific phy.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) enum sci_phy_counter_id {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) * This PHY information field tracks the number of frames received.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) SCIC_PHY_COUNTER_RECEIVED_FRAME,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) * This PHY information field tracks the number of frames transmitted.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) SCIC_PHY_COUNTER_TRANSMITTED_FRAME,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) * This PHY information field tracks the number of DWORDs received.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) SCIC_PHY_COUNTER_RECEIVED_FRAME_WORD,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) * This PHY information field tracks the number of DWORDs transmitted.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) SCIC_PHY_COUNTER_TRANSMITTED_FRAME_DWORD,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) * This PHY information field tracks the number of times DWORD
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) * synchronization was lost.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) SCIC_PHY_COUNTER_LOSS_OF_SYNC_ERROR,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) * This PHY information field tracks the number of received DWORDs with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) * running disparity errors.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) SCIC_PHY_COUNTER_RECEIVED_DISPARITY_ERROR,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) * This PHY information field tracks the number of received frames with a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) * CRC error (not including short or truncated frames).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) SCIC_PHY_COUNTER_RECEIVED_FRAME_CRC_ERROR,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) * This PHY information field tracks the number of DONE (ACK/NAK TIMEOUT)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) * primitives received.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) SCIC_PHY_COUNTER_RECEIVED_DONE_ACK_NAK_TIMEOUT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) * This PHY information field tracks the number of DONE (ACK/NAK TIMEOUT)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) * primitives transmitted.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) SCIC_PHY_COUNTER_TRANSMITTED_DONE_ACK_NAK_TIMEOUT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) * This PHY information field tracks the number of times the inactivity
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) * timer for connections on the phy has been utilized.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) SCIC_PHY_COUNTER_INACTIVITY_TIMER_EXPIRED,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) * This PHY information field tracks the number of DONE (CREDIT TIMEOUT)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) * primitives received.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) SCIC_PHY_COUNTER_RECEIVED_DONE_CREDIT_TIMEOUT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) * This PHY information field tracks the number of DONE (CREDIT TIMEOUT)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) * primitives transmitted.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) SCIC_PHY_COUNTER_TRANSMITTED_DONE_CREDIT_TIMEOUT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) * This PHY information field tracks the number of CREDIT BLOCKED
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) * primitives received.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) * @note Depending on remote device implementation, credit blocks
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) * may occur regularly.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) SCIC_PHY_COUNTER_RECEIVED_CREDIT_BLOCKED,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) * This PHY information field contains the number of short frames
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) * received. A short frame is simply a frame smaller then what is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) * allowed by either the SAS or SATA specification.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) SCIC_PHY_COUNTER_RECEIVED_SHORT_FRAME,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) * This PHY information field contains the number of frames received after
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) * credit has been exhausted.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) SCIC_PHY_COUNTER_RECEIVED_FRAME_WITHOUT_CREDIT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) * This PHY information field contains the number of frames received after
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) * a DONE has been received.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) SCIC_PHY_COUNTER_RECEIVED_FRAME_AFTER_DONE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) * This PHY information field contains the number of times the phy
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) * failed to achieve DWORD synchronization during speed negotiation.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) SCIC_PHY_COUNTER_SN_DWORD_SYNC_ERROR
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) /**
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) * enum sci_phy_states - phy state machine states
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) * @SCI_PHY_INITIAL: Simply the initial state for the base domain state
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) * machine.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) * @SCI_PHY_STOPPED: phy has successfully been stopped. In this state
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) * no new IO operations are permitted on this phy.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) * @SCI_PHY_STARTING: the phy is in the process of becomming ready. In
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) * this state no new IO operations are permitted on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) * this phy.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) * @SCI_PHY_SUB_INITIAL: Initial state
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) * @SCI_PHY_SUB_AWAIT_OSSP_EN: Wait state for the hardware OSSP event
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350) * type notification
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) * @SCI_PHY_SUB_AWAIT_SAS_SPEED_EN: Wait state for the PHY speed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) * notification
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) * @SCI_PHY_SUB_AWAIT_IAF_UF: Wait state for the IAF Unsolicited frame
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) * notification
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) * @SCI_PHY_SUB_AWAIT_SAS_POWER: Wait state for the request to consume
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) * power
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) * @SCI_PHY_SUB_AWAIT_SATA_POWER: Wait state for request to consume
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) * power
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) * @SCI_PHY_SUB_AWAIT_SATA_PHY_EN: Wait state for the SATA PHY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) * notification
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) * @SCI_PHY_SUB_AWAIT_SATA_SPEED_EN: Wait for the SATA PHY speed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) * notification
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) * @SCI_PHY_SUB_AWAIT_SIG_FIS_UF: Wait state for the SIGNATURE FIS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) * unsolicited frame notification
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) * @SCI_PHY_SUB_FINAL: Exit state for this state machine
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) * @SCI_PHY_READY: phy is now ready. Thus, the user is able to perform
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) * IO operations utilizing this phy as long as it is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) * currently part of a valid port. This state is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) * entered from the STARTING state.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) * @SCI_PHY_RESETTING: phy is in the process of being reset. In this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) * state no new IO operations are permitted on this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) * phy. This state is entered from the READY state.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) * @SCI_PHY_FINAL: Simply the final state for the base phy state
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) * machine.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) #define PHY_STATES {\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) C(PHY_INITIAL),\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) C(PHY_STOPPED),\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) C(PHY_STARTING),\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) C(PHY_SUB_INITIAL),\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) C(PHY_SUB_AWAIT_OSSP_EN),\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) C(PHY_SUB_AWAIT_SAS_SPEED_EN),\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) C(PHY_SUB_AWAIT_IAF_UF),\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) C(PHY_SUB_AWAIT_SAS_POWER),\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) C(PHY_SUB_AWAIT_SATA_POWER),\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) C(PHY_SUB_AWAIT_SATA_PHY_EN),\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) C(PHY_SUB_AWAIT_SATA_SPEED_EN),\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) C(PHY_SUB_AWAIT_SIG_FIS_UF),\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) C(PHY_SUB_FINAL),\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) C(PHY_READY),\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) C(PHY_RESETTING),\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) C(PHY_FINAL),\
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) #undef C
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) #define C(a) SCI_##a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) enum sci_phy_states PHY_STATES;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) #undef C
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) void sci_phy_construct(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) struct isci_phy *iphy,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) struct isci_port *iport,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) u8 phy_index);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) struct isci_port *phy_get_non_dummy_port(struct isci_phy *iphy);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) void sci_phy_set_port(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) struct isci_phy *iphy,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) struct isci_port *iport);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) enum sci_status sci_phy_initialize(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) struct isci_phy *iphy,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) struct scu_transport_layer_registers __iomem *transport_layer_registers,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) struct scu_link_layer_registers __iomem *link_layer_registers);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) enum sci_status sci_phy_start(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416) struct isci_phy *iphy);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) enum sci_status sci_phy_stop(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) struct isci_phy *iphy);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) enum sci_status sci_phy_reset(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) struct isci_phy *iphy);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424) void sci_phy_resume(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) struct isci_phy *iphy);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) void sci_phy_setup_transport(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) struct isci_phy *iphy,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429) u32 device_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) enum sci_status sci_phy_event_handler(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432) struct isci_phy *iphy,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) u32 event_code);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435) enum sci_status sci_phy_frame_handler(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) struct isci_phy *iphy,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437) u32 frame_index);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439) enum sci_status sci_phy_consume_power_handler(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440) struct isci_phy *iphy);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) void sci_phy_get_sas_address(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) struct isci_phy *iphy,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444) struct sci_sas_address *sas_address);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) void sci_phy_get_attached_sas_address(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447) struct isci_phy *iphy,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448) struct sci_sas_address *sas_address);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450) struct sci_phy_proto;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451) void sci_phy_get_protocols(
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452) struct isci_phy *iphy,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453) struct sci_phy_proto *protocols);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 454) enum sas_linkrate sci_phy_linkrate(struct isci_phy *iphy);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 455)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 456) struct isci_host;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 457) void isci_phy_init(struct isci_phy *iphy, struct isci_host *ihost, int index);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 458) int isci_phy_control(struct asd_sas_phy *phy, enum phy_func func, void *buf);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 459)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 460) #endif /* !defined(_ISCI_PHY_H_) */