Lines Matching +full:ascii +full:- +full:based

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
6 * Copyright (C) 2004-2007 James Smart, Emulex Corporation
14 #include <linux/bsg-lib.h>
23 * FC Port definitions - Following FC HBAAPI guidelines
30 * to understand the values. The HBAAPI user-space library is free to
31 * convert the strings into the HBAAPI-specified binary values.
33 * Note: Not all HBAAPI-defined values are contained in the definitions
40 * (for the ascii descriptions).
50 FC_PORTTYPE_NPIV, /* VPORT based on NPIV */
56 * (for the ascii descriptions).
76 * scsi_transport_fc.c (for the ascii descriptions).
97 * you also need to alter scsi_transport_fc.c (for the ascii descriptions).
110 * you also need to alter scsi_transport_fc.c (for the ascii descriptions).
112 #define FC_PORTSPEED_UNKNOWN 0 /* Unknown - transceiver
133 * scsi_transport_fc.c (for the ascii descriptions).
146 * you also need to alter scsi_transport_fc.c (for the ascii descriptions).
205 * --
215 * Private attributes are transport-managed values. They are fully
224 /* Private (Transport-managed) Attributes */
235 void *dd_data; /* Used for driver-specific storage */
256 dev_to_vport(dev->parent)
258 (v->shost)
260 (v->channel)
262 (v->dev.parent)
266 #define VPCERR_UNSUPPORTED -ENOSYS /* no driver/adapter
268 #define VPCERR_BAD_WWN -ENOTUNIQ /* driver validation
270 #define VPCERR_NO_FABRIC_SUPP -EOPNOTSUPP /* Fabric connection
335 * --
337 * Attributes are based on HBAAPI V2.0 definitions. Only those
349 * Private attributes are transport-managed values. They are fully
362 /* Private (Transport-managed) Attributes */
372 void *dd_data; /* Used for driver-specific storage */
397 dev_to_rport(dev->parent)
399 dev_to_shost(r->dev.parent)
421 (((struct fc_starget_attrs *)&(x)->starget_data)->node_name)
423 (((struct fc_starget_attrs *)&(x)->starget_data)->port_name)
425 (((struct fc_starget_attrs *)&(x)->starget_data)->port_id)
428 scsi_is_fc_rport(s->dev.parent) ? dev_to_rport(s->dev.parent) : NULL
435 /* FC Statistics - Following FC HBAAPI v2.0 guidelines */
479 * FC Event Codes - Polled and Async, following FC HBAAPI v2.0 guidelines
484 * scsi_transport_fc.c (for the ascii descriptions).
507 * Attributes are based on HBAAPI V2.0 definitions.
508 * Note: OSDeviceName is determined by user-space library
517 * Private attributes are transport-managed values. They are fully
565 /* Private (Transport-managed) Attributes */
589 ((struct fc_host_attrs *)(x)->shost_data)
592 (((struct fc_host_attrs *)(x)->shost_data)->node_name)
594 (((struct fc_host_attrs *)(x)->shost_data)->port_name)
596 (((struct fc_host_attrs *)(x)->shost_data)->permanent_port_name)
598 (((struct fc_host_attrs *)(x)->shost_data)->supported_classes)
600 (((struct fc_host_attrs *)(x)->shost_data)->supported_fc4s)
602 (((struct fc_host_attrs *)(x)->shost_data)->supported_speeds)
604 (((struct fc_host_attrs *)(x)->shost_data)->maxframe_size)
606 (((struct fc_host_attrs *)(x)->shost_data)->max_npiv_vports)
608 (((struct fc_host_attrs *)(x)->shost_data)->serial_number)
610 (((struct fc_host_attrs *)(x)->shost_data)->manufacturer)
612 (((struct fc_host_attrs *)(x)->shost_data)->model)
614 (((struct fc_host_attrs *)(x)->shost_data)->model_description)
616 (((struct fc_host_attrs *)(x)->shost_data)->hardware_version)
618 (((struct fc_host_attrs *)(x)->shost_data)->driver_version)
620 (((struct fc_host_attrs *)(x)->shost_data)->firmware_version)
622 (((struct fc_host_attrs *)(x)->shost_data)->optionrom_version)
624 (((struct fc_host_attrs *)(x)->shost_data)->port_id)
626 (((struct fc_host_attrs *)(x)->shost_data)->port_type)
628 (((struct fc_host_attrs *)(x)->shost_data)->port_state)
630 (((struct fc_host_attrs *)(x)->shost_data)->active_fc4s)
632 (((struct fc_host_attrs *)(x)->shost_data)->speed)
634 (((struct fc_host_attrs *)(x)->shost_data)->fabric_name)
636 (((struct fc_host_attrs *)(x)->shost_data)->symbolic_name)
638 (((struct fc_host_attrs *)(x)->shost_data)->system_hostname)
640 (((struct fc_host_attrs *)(x)->shost_data)->tgtid_bind_type)
642 (((struct fc_host_attrs *)(x)->shost_data)->rports)
644 (((struct fc_host_attrs *)(x)->shost_data)->rport_bindings)
646 (((struct fc_host_attrs *)(x)->shost_data)->vports)
648 (((struct fc_host_attrs *)(x)->shost_data)->next_rport_number)
650 (((struct fc_host_attrs *)(x)->shost_data)->next_target_id)
652 (((struct fc_host_attrs *)(x)->shost_data)->next_vport_number)
654 (((struct fc_host_attrs *)(x)->shost_data)->npiv_vports_inuse)
656 (((struct fc_host_attrs *)(x)->shost_data)->work_q)
658 (((struct fc_host_attrs *)(x)->shost_data)->devloss_work_q)
660 (((struct fc_host_attrs *)(x)->shost_data)->dev_loss_tmo)
662 (((struct fc_host_attrs *)(x)->shost_data)->max_ct_payload)
664 (((struct fc_host_attrs *)(x)->shost_data)->vendor_identifier)
666 (((struct fc_host_attrs *)(x)->shost_data)->num_discovered_ports)
668 (((struct fc_host_attrs *)(x)->shost_data)->num_ports)
670 (((struct fc_host_attrs *)(x)->shost_data)->bootbios_version)
672 (((struct fc_host_attrs *)(x)->shost_data)->bootbios_state)
710 /* allocation lengths for host-specific data */
766 * fc_remote_port_chkready - called to validate the remote port state
777 switch (rport->port_state) { in fc_remote_port_chkready()
780 if (rport->roles & FC_PORT_ROLE_FCP_TARGET) in fc_remote_port_chkready()
782 else if (rport->flags & FC_RPORT_DEVLOSS_PENDING) in fc_remote_port_chkready()
788 if (rport->flags & FC_RPORT_FAST_FAIL_TIMEDOUT) in fc_remote_port_chkready()
811 * fc_vport_set_state() - called to set a vport's state. Saves the old state,
826 vport->vport_last_state = vport->vport_state; in fc_vport_set_state()
827 vport->vport_state = new_state; in fc_vport_set_state()
866 if (scsi_is_host_device(job->dev)) in fc_bsg_to_shost()
867 return dev_to_shost(job->dev); in fc_bsg_to_shost()
868 return rport_to_shost(dev_to_rport(job->dev)); in fc_bsg_to_shost()
873 if (scsi_is_fc_rport(job->dev)) in fc_bsg_to_rport()
874 return dev_to_rport(job->dev); in fc_bsg_to_rport()