Home
last modified time | relevance | path

Searched refs:sas_phy (Results 1 – 25 of 44) sorted by relevance

12

/linux/drivers/scsi/aic94xx/
H A Daic94xx_scb.c38 struct sas_phy *sas_phy = phy->sas_phy.phy; in get_lrate_mode() local
43 phy->sas_phy.linkrate = SAS_LINK_RATE_6_0_GBPS; in get_lrate_mode()
44 phy->sas_phy.phy->negotiated_linkrate = SAS_LINK_RATE_6_0_GBPS; in get_lrate_mode()
47 phy->sas_phy.linkrate = SAS_LINK_RATE_3_0_GBPS; in get_lrate_mode()
48 phy->sas_phy.phy->negotiated_linkrate = SAS_LINK_RATE_3_0_GBPS; in get_lrate_mode()
51 phy->sas_phy.linkrate = SAS_LINK_RATE_1_5_GBPS; in get_lrate_mode()
52 phy->sas_phy.phy->negotiated_linkrate = SAS_LINK_RATE_1_5_GBPS; in get_lrate_mode()
55 sas_phy->negotiated_linkrate = phy->sas_phy.linkrate; in get_lrate_mode()
56 sas_phy->maximum_linkrate_hw = SAS_LINK_RATE_3_0_GBPS; in get_lrate_mode()
57 sas_phy->minimum_linkrate_hw = SAS_LINK_RATE_1_5_GBPS; in get_lrate_mode()
[all …]
H A Daic94xx_hwi.c60 if (phy->sas_phy.role & PHY_ROLE_INITIATOR) in asd_init_phy_identify()
61 phy->identify_frame->initiator_bits = phy->sas_phy.iproto; in asd_init_phy_identify()
62 if (phy->sas_phy.role & PHY_ROLE_TARGET) in asd_init_phy_identify()
63 phy->identify_frame->target_bits = phy->sas_phy.tproto; in asd_init_phy_identify()
66 phy->identify_frame->phy_id = phy->sas_phy.id; in asd_init_phy_identify()
71 struct asd_ha_struct *asd_ha = phy->sas_phy.ha->lldd_ha; in asd_init_phy()
72 struct asd_sas_phy *sas_phy = &phy->sas_phy; in asd_init_phy() local
74 sas_phy->enabled = 1; in asd_init_phy()
75 sas_phy->iproto = SAS_PROTOCOL_ALL; in asd_init_phy()
76 sas_phy->tproto = 0; in asd_init_phy()
[all …]
/linux/include/scsi/
H A Dscsi_transport_sas.h60 struct sas_phy { struct
89 container_of((d), struct sas_phy, dev) argument
175 int (*get_linkerrors)(struct sas_phy *);
178 int (*phy_reset)(struct sas_phy *, int);
179 int (*phy_enable)(struct sas_phy *, int);
180 int (*phy_setup)(struct sas_phy *);
181 void (*phy_release)(struct sas_phy *);
182 int (*set_phy_speed)(struct sas_phy *, struct sas_phy_linkrates *);
191 extern struct sas_phy *sas_phy_alloc(struct device *, int);
192 extern void sas_phy_free(struct sas_phy *);
61 devsas_phy global() argument
62 numbersas_phy global() argument
63 enabledsas_phy global() argument
[all...]
H A Dlibsas.h102 struct sas_phy *phy;
165 struct sas_phy *phy;
308 struct sas_phy *phy;
373 struct asd_sas_phy **sas_phy; /* array of valid pointers, must be set */ member
427 static inline void sas_put_local_phy(struct sas_phy *phy) in sas_put_local_phy()
685 int sas_phy_reset(struct sas_phy *phy, int hard_reset);
686 int sas_phy_enable(struct sas_phy *phy, int enable);
717 struct sas_phy *sas_get_local_phy(struct domain_device *dev);
/linux/Documentation/translations/zh_CN/scsi/
H A Dlibsas.rst48 ``struct sas_phy``
56 struct sas_phy sas_phy;
64 需要同时初始化其中的 sas_phy 结构体。
121 层调用某个回调并传入 sas_phy 时,驱动可以快速定位自身的 PHY
122 结构体。如果 sas_phy 是嵌入式成员,也可以使用 container_of()
166 sas_phy
171 - 表示 sas_phy 数组中 PHY 的数量,同时也表示 sas_port
179 void sas_notify_port_event(struct sas_phy *, enum port_event, gfp_t);
180 void sas_notify_phy_event(struct sas_phy *, enum phy_event, gfp_t);
185 void (*lldd_port_formed)(struct sas_phy *);
[all …]
/linux/drivers/scsi/hisi_sas/
H A Dhisi_sas_main.c24 static int hisi_sas_control_phy(struct asd_sas_phy *sas_phy, enum phy_func func,
653 struct asd_sas_phy *sas_phy = &phy->sas_phy; in hisi_sas_bytes_dmaed() local
658 sas_notify_phy_event(sas_phy, PHYE_OOB_DONE, gfp_flags); in hisi_sas_bytes_dmaed()
660 if (sas_phy->phy) { in hisi_sas_bytes_dmaed()
661 struct sas_phy *sphy = sas_phy->phy; in hisi_sas_bytes_dmaed()
663 sphy->negotiated_linkrate = sas_phy->linkrate; in hisi_sas_bytes_dmaed()
685 sas_phy->frame_rcvd_size = phy->frame_rcvd_size; in hisi_sas_bytes_dmaed()
686 sas_notify_port_event(sas_phy, PORTE_BYTES_DMAED, gfp_flags); in hisi_sas_bytes_dmaed()
945 struct asd_sas_phy *sas_phy = &phy->sas_phy; in hisi_sas_phyup_work_common() local
946 struct asd_sas_port *sas_port = sas_phy->port; in hisi_sas_phyup_work_common()
[all …]
H A Dhisi_sas_v1_hw.c1320 struct asd_sas_phy *sas_phy = &phy->sas_phy; in int_phyup_v1_hw() local
1321 int i, phy_no = sas_phy->id; in int_phyup_v1_hw()
1323 u32 *frame_rcvd = (u32 *)sas_phy->frame_rcvd; in int_phyup_v1_hw()
1359 sas_phy->linkrate = link_rate; in int_phyup_v1_hw()
1360 sas_phy->oob_mode = SAS_OOB_MODE; in int_phyup_v1_hw()
1361 memcpy(sas_phy->attached_sas_addr, in int_phyup_v1_hw()
1399 struct asd_sas_phy *sas_phy = &phy->sas_phy; in int_bcast_v1_hw() local
1401 int phy_no = sas_phy->id; in int_bcast_v1_hw()
1428 struct asd_sas_phy *sas_phy = &phy->sas_phy; in int_abnormal_v1_hw() local
1430 int phy_no = sas_phy->id; in int_abnormal_v1_hw()
H A Dhisi_sas_v3_hw.c715 struct asd_sas_phy *sas_phy = &phy->sas_phy; in init_reg_v3_hw() local
720 if (!sas_phy->phy || (sas_phy->phy->maximum_linkrate < in init_reg_v3_hw()
724 max = sas_phy->phy->maximum_linkrate; in init_reg_v3_hw()
1126 struct asd_sas_phy *sas_phy = &phy->sas_phy; in phys_init_v3_hw() local
1128 if (!sas_phy->phy->enabled) in phys_init_v3_hw()
1588 struct asd_sas_phy *sas_phy = &phy->sas_phy; in phy_up_v3_hw() local
1603 sas_phy->linkrate = link_rate; in phy_up_v3_hw()
1627 sas_phy->oob_mode = SATA_OOB_MODE; in phy_up_v3_hw()
1631 memcpy(sas_phy->attached_sas_addr, in phy_up_v3_hw()
1634 memcpy(sas_phy->frame_rcvd, fis, in phy_up_v3_hw()
[all …]
/linux/drivers/scsi/libsas/
H A Dsas_host_smp.c22 struct sas_phy *phy; in sas_host_smp_discover()
31 phy = sas_ha->sas_phy[phy_id]->phy; in sas_host_smp_discover()
35 memcpy(resp_data + 24, sas_ha->sas_phy[phy_id]->attached_sas_addr, in sas_host_smp_discover()
42 if (!sas_ha->sas_phy[phy_id]->port || in sas_host_smp_discover()
43 !sas_ha->sas_phy[phy_id]->port->port_dev) in sas_host_smp_discover()
46 rphy = sas_ha->sas_phy[phy_id]->port->port_dev->rphy; in sas_host_smp_discover()
151 if (!sas_ha->sas_phy[phy_id]->port) in sas_report_phy_sata()
154 rphy = sas_ha->sas_phy[phy_id]->port->port_dev->rphy; in sas_report_phy_sata()
156 sas_ha->sas_phy[phy_id]->port->port_dev->frame_rcvd; in sas_report_phy_sata()
162 memcpy(resp_data + 16, sas_ha->sas_phy[phy_id]->attached_sas_addr, in sas_report_phy_sata()
[all …]
H A Dsas_init.c180 static int sas_get_linkerrors(struct sas_phy *phy) in sas_get_linkerrors()
185 struct asd_sas_phy *asd_phy = sas_ha->sas_phy[phy->number]; in sas_get_linkerrors()
222 static int transport_sas_phy_reset(struct sas_phy *phy, int hard_reset) in transport_sas_phy_reset()
234 struct asd_sas_phy *asd_phy = sas_ha->sas_phy[phy->number]; in transport_sas_phy_reset()
255 int sas_phy_enable(struct sas_phy *phy, int enable) in sas_phy_enable()
268 struct asd_sas_phy *asd_phy = sas_ha->sas_phy[phy->number]; in sas_phy_enable()
289 int sas_phy_reset(struct sas_phy *phy, int hard_reset) in sas_phy_reset()
305 struct asd_sas_phy *asd_phy = sas_ha->sas_phy[phy->number]; in sas_phy_reset()
319 static int sas_set_phy_speed(struct sas_phy *phy, in sas_set_phy_speed()
341 struct asd_sas_phy *asd_phy = sas_ha->sas_phy[phy->number]; in sas_set_phy_speed()
[all …]
H A Dsas_phy.c123 struct asd_sas_phy *phy = sas_ha->sas_phy[i]; in sas_register_phys()
162 struct asd_sas_phy *phy = sas_ha->sas_phy[i]; in sas_register_phys()
175 struct asd_sas_phy *phy = sas_ha->sas_phy[i]; in sas_unregister_phys()
H A Dsas_event.c103 struct asd_sas_phy *sas_phy; in sas_enable_revalidation() local
114 sas_phy = container_of(port->phy_list.next, struct asd_sas_phy, in sas_enable_revalidation()
117 sas_notify_port_event(sas_phy, in sas_enable_revalidation()
H A Dsas_internal.h32 struct sas_phy *phy;
90 int sas_smp_get_phy_events(struct sas_phy *phy);
180 struct sas_phy *phy = p->phy; in sas_phy_set_target()
H A DMakefile11 sas_phy.o \
H A Dsas_ata.c304 struct sas_phy *phy = sas_get_local_phy(dev); in smp_ata_check_ready_type()
332 struct sas_phy *phy = sas_get_local_phy(dev); in smp_ata_check_ready()
403 struct sas_phy *phy; in sas_ata_wait_after_reset()
551 struct sas_phy *local_phy = sas_get_local_phy(dev); in sas_ata_prereset()
678 struct sas_phy *cphy = child->phy; in sas_ata_add_dev()
/linux/drivers/scsi/mvsas/
H A Dmv_sas.c71 while (sha->sas_phy[j]) { in mvs_find_dev_mvi()
72 if (sha->sas_phy[j] == phy) in mvs_find_dev_mvi()
102 while (sha->sas_phy[j]) { in mvs_find_dev_phyno()
103 if (sha->sas_phy[j] == phy) in mvs_find_dev_phyno()
154 int mvs_phy_control(struct asd_sas_phy *sas_phy, enum phy_func func, in mvs_phy_control() argument
157 int rc = 0, phy_id = sas_phy->id; in mvs_phy_control()
159 struct sas_ha_struct *sha = sas_phy->ha; in mvs_phy_control()
162 while (sha->sas_phy[i]) { in mvs_phy_control()
163 if (sha->sas_phy[i] == sas_phy) in mvs_phy_control()
213 struct asd_sas_phy *sas_phy = &phy->sas_phy; in mvs_bytes_dmaed() local
[all …]
H A Dmv_init.c66 struct asd_sas_phy *sas_phy = &phy->sas_phy; in mvs_phy_init() local
71 sas_phy->enabled = (phy_id < mvi->chip->n_phy) ? 1 : 0; in mvs_phy_init()
72 sas_phy->iproto = SAS_PROTOCOL_ALL; in mvs_phy_init()
73 sas_phy->tproto = 0; in mvs_phy_init()
74 sas_phy->role = PHY_ROLE_INITIATOR; in mvs_phy_init()
75 sas_phy->oob_mode = OOB_NOT_CONNECTED; in mvs_phy_init()
76 sas_phy->linkrate = SAS_LINK_RATE_UNKNOWN; in mvs_phy_init()
78 sas_phy->id = phy_id; in mvs_phy_init()
79 sas_phy->sas_addr = &mvi->sas_addr[0]; in mvs_phy_init()
80 sas_phy->frame_rcvd = &phy->frame_rcvd[0]; in mvs_phy_init()
[all …]
/linux/drivers/scsi/isci/
H A Dphy.c989 spin_lock_irqsave(&iphy->sas_phy.frame_rcvd_lock, flags); in sci_phy_frame_handler()
991 spin_unlock_irqrestore(&iphy->sas_phy.frame_rcvd_lock, flags); in sci_phy_frame_handler()
1032 spin_lock_irqsave(&iphy->sas_phy.frame_rcvd_lock, flags); in sci_phy_frame_handler()
1036 spin_unlock_irqrestore(&iphy->sas_phy.frame_rcvd_lock, flags); in sci_phy_frame_handler()
1400 iphy->sas_phy.enabled = 0; in isci_phy_init()
1401 iphy->sas_phy.id = index; in isci_phy_init()
1402 iphy->sas_phy.sas_addr = &iphy->sas_addr[0]; in isci_phy_init()
1403 iphy->sas_phy.frame_rcvd = (u8 *)&iphy->frame_rcvd; in isci_phy_init()
1404 iphy->sas_phy.ha = &ihost->sas_ha; in isci_phy_init()
1405 iphy->sas_phy.lldd_phy = iphy; in isci_phy_init()
[all …]
H A Dphy.h98 struct asd_sas_phy sas_phy; member
106 static inline struct isci_phy *to_iphy(struct asd_sas_phy *sas_phy) in to_iphy() argument
108 struct isci_phy *iphy = container_of(sas_phy, typeof(*iphy), sas_phy); in to_iphy()
/linux/drivers/scsi/smartpqi/
H A Dsmartpqi_sas_transport.c23 struct sas_phy *phy; in pqi_alloc_sas_phy()
45 struct sas_phy *phy = pqi_sas_phy->phy; in pqi_free_sas_phy()
58 struct sas_phy *phy; in pqi_sas_port_add_phy()
317 static int pqi_sas_get_linkerrors(struct sas_phy *phy) in pqi_sas_get_linkerrors()
428 static int pqi_sas_phy_reset(struct sas_phy *phy, int hard_reset) in pqi_sas_phy_reset()
433 static int pqi_sas_phy_enable(struct sas_phy *phy, int enable) in pqi_sas_phy_enable()
438 static int pqi_sas_phy_setup(struct sas_phy *phy) in pqi_sas_phy_setup()
443 static void pqi_sas_phy_release(struct sas_phy *phy) in pqi_sas_phy_release()
447 static int pqi_sas_phy_speed(struct sas_phy *phy, in pqi_sas_phy_speed()
/linux/drivers/scsi/pm8001/
H A Dpm8001_hwi.c2996 struct asd_sas_phy *sas_phy = &phy->sas_phy; in pm8001_bytes_dmaed() local
3011 sas_phy->frame_rcvd_size = phy->frame_rcvd_size; in pm8001_bytes_dmaed()
3012 sas_notify_port_event(sas_phy, PORTE_BYTES_DMAED, GFP_ATOMIC); in pm8001_bytes_dmaed()
3018 struct sas_phy *sas_phy = phy->sas_phy.phy; in pm8001_get_lrate_mode() local
3022 phy->sas_phy.linkrate = SAS_LINK_RATE_12_0_GBPS; in pm8001_get_lrate_mode()
3025 phy->sas_phy.linkrate = SAS_LINK_RATE_6_0_GBPS; in pm8001_get_lrate_mode()
3028 phy->sas_phy.linkrate = SAS_LINK_RATE_3_0_GBPS; in pm8001_get_lrate_mode()
3031 phy->sas_phy.linkrate = SAS_LINK_RATE_1_5_GBPS; in pm8001_get_lrate_mode()
3034 sas_phy->negotiated_linkrate = phy->sas_phy.linkrate; in pm8001_get_lrate_mode()
3035 sas_phy->maximum_linkrate_hw = phy->maximum_linkrate; in pm8001_get_lrate_mode()
[all …]
H A Dpm8001_sas.c225 int pm8001_phy_control(struct asd_sas_phy *sas_phy, enum phy_func func, in pm8001_phy_control() argument
228 int rc = 0, phy_id = sas_phy->id; in pm8001_phy_control()
234 pm8001_ha = sas_phy->ha->lldd_ha; in pm8001_phy_control()
292 sas_phy_disconnected(&phy->sas_phy); in pm8001_phy_control()
293 sas_notify_phy_event(&phy->sas_phy, in pm8001_phy_control()
300 sas_phy_disconnected(&phy->sas_phy); in pm8001_phy_control()
301 sas_notify_phy_event(&phy->sas_phy, in pm8001_phy_control()
318 struct sas_phy *phy = sas_phy->phy; in pm8001_phy_control()
883 struct sas_phy *phy; in pm8001_I_T_nexus_reset()
932 struct sas_phy *phy; in pm8001_I_T_nexus_event_handler()
[all …]
H A Dpm8001_init.c161 struct asd_sas_phy *sas_phy = &phy->sas_phy; in pm8001_phy_init() local
166 sas_phy->enabled = (phy_id < pm8001_ha->chip->n_phy) ? 1 : 0; in pm8001_phy_init()
167 sas_phy->iproto = SAS_PROTOCOL_ALL; in pm8001_phy_init()
168 sas_phy->tproto = 0; in pm8001_phy_init()
169 sas_phy->role = PHY_ROLE_INITIATOR; in pm8001_phy_init()
170 sas_phy->oob_mode = OOB_NOT_CONNECTED; in pm8001_phy_init()
171 sas_phy->linkrate = SAS_LINK_RATE_UNKNOWN; in pm8001_phy_init()
172 sas_phy->id = phy_id; in pm8001_phy_init()
173 sas_phy->sas_addr = (u8 *)&phy->dev_sas_addr; in pm8001_phy_init()
174 sas_phy->frame_rcvd = &phy->frame_rcvd[0]; in pm8001_phy_init()
[all …]
/linux/Documentation/scsi/
H A Dlibsas.rst46 ``struct sas_phy``
54 struct sas_phy sas_phy;
62 initialize the sas_phy struct, along with your own
127 of your callbacks and passes you a phy. If the sas_phy is
177 sas_phy
183 - the number of phys present in the sas_phy array,
192 void sas_notify_port_event(struct sas_phy *, enum port_event, gfp_t);
193 void sas_notify_phy_event(struct sas_phy *, enum phy_event, gfp_t);
198 void (*lldd_port_formed)(struct sas_phy *);
199 void (*lldd_port_deformed)(struct sas_phy *);
[all …]
/linux/drivers/scsi/mpt3sas/
H A Dmpt3sas_transport.c70 _transport_get_port_id_by_sas_phy(struct sas_phy *phy) in _transport_get_port_id_by_sas_phy()
1021 struct sas_phy *phy; in mpt3sas_transport_add_host_phy()
1091 struct sas_phy *phy; in mpt3sas_transport_add_expander_phy()
1217 phy_to_ioc(struct sas_phy *phy) in phy_to_ioc()
1267 struct sas_phy *phy) in _transport_get_expander_phy_error_log()
1416 _transport_get_linkerrors(struct sas_phy *phy) in _transport_get_linkerrors()
1558 struct sas_phy *phy, u8 phy_operation) in _transport_expander_phy_control()
1705 _transport_phy_reset(struct sas_phy *phy, int hard_reset) in _transport_phy_reset()
1759 _transport_phy_enable(struct sas_phy *phy, int enable) in _transport_phy_enable()
1897 _transport_phy_speed(struct sas_phy *phy, struct sas_phy_linkrates *rates) in _transport_phy_speed()

12