• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/scsi/

Lines Matching refs:phy

242 	struct sas_phy *phy = transport_class_to_phy(cdev);		\
244 return snprintf(buf, 20, format_string, cast phy->field); \
255 struct sas_phy *phy = transport_class_to_phy(cdev); \
257 if (!phy->field) \
259 return get_sas_protocol_names(phy->field, buf); \
270 struct sas_phy *phy = transport_class_to_phy(cdev); \
272 return get_sas_linkspeed_names(phy->field, buf); \
281 struct sas_phy *phy = transport_class_to_phy(cdev); \
282 struct Scsi_Host *shost = dev_to_shost(phy->dev.parent); \
292 error = i->f->set_phy_speed(phy, &rates); \
312 struct sas_phy *phy = transport_class_to_phy(cdev); \
313 struct Scsi_Host *shost = dev_to_shost(phy->dev.parent); \
317 error = i->f->get_linkerrors ? i->f->get_linkerrors(phy) : 0; \
320 return snprintf(buf, 20, "%u\n", phy->field); \
331 struct sas_phy *phy = transport_class_to_phy(cdev);
333 if (!phy->identify.device_type)
335 return get_sas_device_type_names(phy->identify.device_type, buf);
342 struct sas_phy *phy = transport_class_to_phy(cdev);
343 struct Scsi_Host *shost = dev_to_shost(phy->dev.parent);
347 error = i->f->phy_enable(phy, enable);
350 phy->enabled = enable;
376 struct sas_phy *phy = transport_class_to_phy(cdev);
378 return snprintf(buf, 20, "%d", phy->enabled);
387 struct sas_phy *phy = transport_class_to_phy(cdev);
388 struct Scsi_Host *shost = dev_to_shost(phy->dev.parent);
392 error = i->f->phy_reset(phy, hard_reset);
455 struct sas_phy *phy = dev_to_phy(dev);
458 kfree(phy);
476 struct sas_phy *phy;
478 phy = kzalloc(sizeof(*phy), GFP_KERNEL);
479 if (!phy)
482 phy->number = number;
483 phy->enabled = 1;
485 device_initialize(&phy->dev);
486 phy->dev.parent = get_device(parent);
487 phy->dev.release = sas_phy_release;
488 INIT_LIST_HEAD(&phy->port_siblings);
491 sprintf(phy->dev.bus_id, "phy-%d:%d:%d", shost->host_no,
494 sprintf(phy->dev.bus_id, "phy-%d:%d", shost->host_no, number);
496 transport_setup_device(&phy->dev);
498 return phy;
504 * @phy: The PHY to be added
508 int sas_phy_add(struct sas_phy *phy)
512 error = device_add(&phy->dev);
514 transport_add_device(&phy->dev);
515 transport_configure_device(&phy->dev);
524 * @phy: SAS PHY to free
532 void sas_phy_free(struct sas_phy *phy)
534 transport_destroy_device(&phy->dev);
535 put_device(&phy->dev);
541 * @phy: SAS PHY to remove
547 sas_phy_delete(struct sas_phy *phy)
549 struct device *dev = &phy->dev;
551 /* this happens if the phy is still part of a port when deleted */
552 BUG_ON(!list_empty(&phy->port_siblings));
626 struct sas_phy *phy)
630 res = sysfs_create_link(&port->dev.kobj, &phy->dev.kobj,
631 phy->dev.bus_id);
634 res = sysfs_create_link(&phy->dev.kobj, &port->dev.kobj, "port");
644 struct sas_phy *phy)
646 sysfs_remove_link(&port->dev.kobj, phy->dev.bus_id);
647 sysfs_remove_link(&phy->dev.kobj, "port");
778 struct sas_phy *phy, *tmp_phy;
786 list_for_each_entry_safe(phy, tmp_phy, &port->phy_list,
788 sas_port_delete_link(port, phy);
789 list_del_init(&phy->port_siblings);
821 * sas_port_add_phy - add another phy to a port to form a wide port
822 * @port: port to add the phy to
823 * @phy: phy to add
826 * ports must have at least one phy to operated, and all wide ports
832 void sas_port_add_phy(struct sas_port *port, struct sas_phy *phy)
835 if (unlikely(!list_empty(&phy->port_siblings))) {
840 if (tmp == phy)
842 /* If this trips, you added a phy that was already
844 if (unlikely(tmp != phy)) {
845 dev_printk(KERN_ERR, &port->dev, "trying to add phy %s fails: it's already part of another port\n", phy->dev.bus_id);
849 sas_port_create_link(port, phy);
850 list_add_tail(&phy->port_siblings, &port->phy_list);
858 * sas_port_delete_phy - remove a phy from a port or wide port
859 * @port: port to remove the phy from
860 * @phy: phy to remove
865 void sas_port_delete_phy(struct sas_port *port, struct sas_phy *phy)
868 sas_port_delete_link(port, phy);
869 list_del_init(&phy->port_siblings);
947 struct sas_phy *phy = dev_to_phy(rphy->dev.parent);
948 struct Scsi_Host *shost = dev_to_shost(phy->dev.parent);
957 if (scsi_is_sas_phy_local(phy))
973 struct sas_phy *phy = dev_to_phy(rphy->dev.parent);
974 struct Scsi_Host *shost = dev_to_shost(phy->dev.parent);
978 if (scsi_is_sas_phy_local(phy))
1353 * @rphy: SAS remote phy to remove