2 * FiberChannel transport specific attributes exported to sysfs.
4 * Copyright (c) 2003 Silicon Graphics, Inc. All rights reserved.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #ifndef SCSI_TRANSPORT_FC_H
21 #define SCSI_TRANSPORT_FC_H
23 #include <linux/config.h>
25 struct scsi_transport_template
;
27 struct fc_transport_attrs
{
33 /* accessor functions */
34 #define fc_port_id(x) (((struct fc_transport_attrs *)&(x)->transport_data)->port_id)
35 #define fc_node_name(x) (((struct fc_transport_attrs *)&(x)->transport_data)->node_name)
36 #define fc_port_name(x) (((struct fc_transport_attrs *)&(x)->transport_data)->port_name)
38 /* The functions by which the transport class and the driver communicate */
39 struct fc_function_template
{
40 void (*get_port_id
)(struct scsi_device
*);
41 void (*get_node_name
)(struct scsi_device
*);
42 void (*get_port_name
)(struct scsi_device
*);
43 /* The driver sets these to tell the transport class it
44 * wants the attributes displayed in sysfs. If the show_ flag
45 * is not set, the attribute will be private to the transport
47 unsigned long show_port_id
:1;
48 unsigned long show_node_name
:1;
49 unsigned long show_port_name
:1;
50 /* Private Attributes */
53 struct scsi_transport_template
*fc_attach_transport(struct fc_function_template
*);
54 void fc_release_transport(struct scsi_transport_template
*);
56 #endif /* SCSI_TRANSPORT_FC_H */