diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-09-30 23:45:41 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-09-30 23:45:41 -0400 |
commit | 1c7da74c4aab595a994beb5fe728ebf0d0b41f59 (patch) | |
tree | 64128abdf9550ebb51d8f3ee6732d7350b9c62f2 /drivers/ieee1394/nodemgr.h | |
parent | aebb1153ac54ddbbd3d3f0481a193f4bf0ead53b (diff) | |
parent | 1bdfd554be94def718323659173517c5d4a69d25 (diff) |
Merge branch 'master' into upstream
Diffstat (limited to 'drivers/ieee1394/nodemgr.h')
-rw-r--r-- | drivers/ieee1394/nodemgr.h | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/drivers/ieee1394/nodemgr.h b/drivers/ieee1394/nodemgr.h index 0b26616e16c3..0e1e7d930783 100644 --- a/drivers/ieee1394/nodemgr.h +++ b/drivers/ieee1394/nodemgr.h | |||
@@ -21,9 +21,15 @@ | |||
21 | #define _IEEE1394_NODEMGR_H | 21 | #define _IEEE1394_NODEMGR_H |
22 | 22 | ||
23 | #include <linux/device.h> | 23 | #include <linux/device.h> |
24 | #include "csr1212.h" | 24 | #include <asm/types.h> |
25 | |||
25 | #include "ieee1394_core.h" | 26 | #include "ieee1394_core.h" |
26 | #include "ieee1394_hotplug.h" | 27 | #include "ieee1394_types.h" |
28 | |||
29 | struct csr1212_csr; | ||
30 | struct csr1212_keyval; | ||
31 | struct hpsb_host; | ||
32 | struct ieee1394_device_id; | ||
27 | 33 | ||
28 | /* '1' '3' '9' '4' in ASCII */ | 34 | /* '1' '3' '9' '4' in ASCII */ |
29 | #define IEEE1394_BUSID_MAGIC __constant_cpu_to_be32(0x31333934) | 35 | #define IEEE1394_BUSID_MAGIC __constant_cpu_to_be32(0x31333934) |
@@ -44,7 +50,6 @@ struct bus_options { | |||
44 | u16 max_rec; /* Maximum packet size node can receive */ | 50 | u16 max_rec; /* Maximum packet size node can receive */ |
45 | }; | 51 | }; |
46 | 52 | ||
47 | |||
48 | #define UNIT_DIRECTORY_VENDOR_ID 0x01 | 53 | #define UNIT_DIRECTORY_VENDOR_ID 0x01 |
49 | #define UNIT_DIRECTORY_MODEL_ID 0x02 | 54 | #define UNIT_DIRECTORY_MODEL_ID 0x02 |
50 | #define UNIT_DIRECTORY_SPECIFIER_ID 0x04 | 55 | #define UNIT_DIRECTORY_SPECIFIER_ID 0x04 |
@@ -59,8 +64,8 @@ struct bus_options { | |||
59 | * unit directory for each of these protocols. | 64 | * unit directory for each of these protocols. |
60 | */ | 65 | */ |
61 | struct unit_directory { | 66 | struct unit_directory { |
62 | struct node_entry *ne; /* The node which this directory belongs to */ | 67 | struct node_entry *ne; /* The node which this directory belongs to */ |
63 | octlet_t address; /* Address of the unit directory on the node */ | 68 | octlet_t address; /* Address of the unit directory on the node */ |
64 | u8 flags; /* Indicates which entries were read */ | 69 | u8 flags; /* Indicates which entries were read */ |
65 | 70 | ||
66 | quadlet_t vendor_id; | 71 | quadlet_t vendor_id; |
@@ -79,11 +84,10 @@ struct unit_directory { | |||
79 | int length; /* Number of quadlets */ | 84 | int length; /* Number of quadlets */ |
80 | 85 | ||
81 | struct device device; | 86 | struct device device; |
82 | |||
83 | struct class_device class_dev; | 87 | struct class_device class_dev; |
84 | 88 | ||
85 | struct csr1212_keyval *ud_kv; | 89 | struct csr1212_keyval *ud_kv; |
86 | u32 lun; /* logical unit number immediate value */ | 90 | u32 lun; /* logical unit number immediate value */ |
87 | }; | 91 | }; |
88 | 92 | ||
89 | struct node_entry { | 93 | struct node_entry { |
@@ -103,10 +107,8 @@ struct node_entry { | |||
103 | const char *vendor_oui; | 107 | const char *vendor_oui; |
104 | 108 | ||
105 | u32 capabilities; | 109 | u32 capabilities; |
106 | struct hpsb_tlabel_pool *tpool; | ||
107 | 110 | ||
108 | struct device device; | 111 | struct device device; |
109 | |||
110 | struct class_device class_dev; | 112 | struct class_device class_dev; |
111 | 113 | ||
112 | /* Means this node is not attached anymore */ | 114 | /* Means this node is not attached anymore */ |
@@ -153,8 +155,8 @@ static inline int hpsb_node_entry_valid(struct node_entry *ne) | |||
153 | /* | 155 | /* |
154 | * This will fill in the given, pre-initialised hpsb_packet with the current | 156 | * This will fill in the given, pre-initialised hpsb_packet with the current |
155 | * information from the node entry (host, node ID, generation number). It will | 157 | * information from the node entry (host, node ID, generation number). It will |
156 | * return false if the node owning the GUID is not accessible (and not modify the | 158 | * return false if the node owning the GUID is not accessible (and not modify |
157 | * hpsb_packet) and return true otherwise. | 159 | * the hpsb_packet) and return true otherwise. |
158 | * | 160 | * |
159 | * Note that packet sending may still fail in hpsb_send_packet if a bus reset | 161 | * Note that packet sending may still fail in hpsb_send_packet if a bus reset |
160 | * happens while you are trying to set up the packet (due to obsolete generation | 162 | * happens while you are trying to set up the packet (due to obsolete generation |
@@ -170,16 +172,13 @@ int hpsb_node_write(struct node_entry *ne, u64 addr, | |||
170 | int hpsb_node_lock(struct node_entry *ne, u64 addr, | 172 | int hpsb_node_lock(struct node_entry *ne, u64 addr, |
171 | int extcode, quadlet_t *data, quadlet_t arg); | 173 | int extcode, quadlet_t *data, quadlet_t arg); |
172 | 174 | ||
173 | |||
174 | /* Iterate the hosts, calling a given function with supplied data for each | 175 | /* Iterate the hosts, calling a given function with supplied data for each |
175 | * host. */ | 176 | * host. */ |
176 | int nodemgr_for_each_host(void *__data, int (*cb)(struct hpsb_host *, void *)); | 177 | int nodemgr_for_each_host(void *__data, int (*cb)(struct hpsb_host *, void *)); |
177 | 178 | ||
178 | |||
179 | int init_ieee1394_nodemgr(void); | 179 | int init_ieee1394_nodemgr(void); |
180 | void cleanup_ieee1394_nodemgr(void); | 180 | void cleanup_ieee1394_nodemgr(void); |
181 | 181 | ||
182 | |||
183 | /* The template for a host device */ | 182 | /* The template for a host device */ |
184 | extern struct device nodemgr_dev_template_host; | 183 | extern struct device nodemgr_dev_template_host; |
185 | 184 | ||