aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/fw-device.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire/fw-device.h')
-rw-r--r--drivers/firewire/fw-device.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/firewire/fw-device.h b/drivers/firewire/fw-device.h
index 0d771fda86de..5f131f5129da 100644
--- a/drivers/firewire/fw-device.h
+++ b/drivers/firewire/fw-device.h
@@ -21,6 +21,7 @@
21 21
22#include <linux/fs.h> 22#include <linux/fs.h>
23#include <linux/cdev.h> 23#include <linux/cdev.h>
24#include <linux/rwsem.h>
24#include <asm/atomic.h> 25#include <asm/atomic.h>
25 26
26enum fw_device_state { 27enum fw_device_state {
@@ -46,6 +47,11 @@ struct fw_attribute_group {
46 * fw_device.node_id is guaranteed to be current too. 47 * fw_device.node_id is guaranteed to be current too.
47 * 48 *
48 * The same applies to fw_device.card->node_id vs. fw_device.generation. 49 * The same applies to fw_device.card->node_id vs. fw_device.generation.
50 *
51 * fw_device.config_rom and fw_device.config_rom_length may be accessed during
52 * the lifetime of any fw_unit belonging to the fw_device, before device_del()
53 * was called on the last fw_unit. Alternatively, they may be accessed while
54 * holding fw_device_rwsem.
49 */ 55 */
50struct fw_device { 56struct fw_device {
51 atomic_t state; 57 atomic_t state;
@@ -53,6 +59,7 @@ struct fw_device {
53 int node_id; 59 int node_id;
54 int generation; 60 int generation;
55 unsigned max_speed; 61 unsigned max_speed;
62 bool cmc;
56 struct fw_card *card; 63 struct fw_card *card;
57 struct device device; 64 struct device device;
58 struct list_head link; 65 struct list_head link;
@@ -92,8 +99,12 @@ int fw_device_enable_phys_dma(struct fw_device *device);
92void fw_device_cdev_update(struct fw_device *device); 99void fw_device_cdev_update(struct fw_device *device);
93void fw_device_cdev_remove(struct fw_device *device); 100void fw_device_cdev_remove(struct fw_device *device);
94 101
102extern struct rw_semaphore fw_device_rwsem;
95extern int fw_cdev_major; 103extern int fw_cdev_major;
96 104
105/*
106 * fw_unit.directory must not be accessed after device_del(&fw_unit.device).
107 */
97struct fw_unit { 108struct fw_unit {
98 struct device device; 109 struct device device;
99 u32 *directory; 110 u32 *directory;