diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2009-03-10 16:09:28 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2009-03-24 15:56:52 -0400 |
commit | 7889b60ee71eafaf50699a154a2455424bb92daa (patch) | |
tree | d5bb3a4d274bf186e32605284a34a36398475818 /drivers/firewire/fw-device.h | |
parent | cbae787c0f288c3ad385ad4165ae30b5500a1f23 (diff) |
firewire: core: optimize propagation of BROADCAST_CHANNEL
Cache the test result of whether a device implements BROADCAST_CHANNEL.
This minimizes traffic on the bus after each bus reset. A majority of
devices does not implement BROADCAST_CHANNEL.
Remove busy retries; just rely on the hardware to retry requests to busy
responders. Remove unnecessary log messages.
Rename the flag is_irm to broadcast_channel_allocated to better reflect
its meaning. Reset the flag earlier in fw_core_handle_bus_reset.
Pass the generation down as a call parameter; that way generation can't
be newer than card->broadcast_channel_allocated and device->node_id.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/fw-device.h')
-rw-r--r-- | drivers/firewire/fw-device.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/firewire/fw-device.h b/drivers/firewire/fw-device.h index 3085a74669b5..97588937c018 100644 --- a/drivers/firewire/fw-device.h +++ b/drivers/firewire/fw-device.h | |||
@@ -71,7 +71,6 @@ struct fw_device { | |||
71 | int node_id; | 71 | int node_id; |
72 | int generation; | 72 | int generation; |
73 | unsigned max_speed; | 73 | unsigned max_speed; |
74 | bool cmc; | ||
75 | struct fw_card *card; | 74 | struct fw_card *card; |
76 | struct device device; | 75 | struct device device; |
77 | 76 | ||
@@ -81,6 +80,9 @@ struct fw_device { | |||
81 | u32 *config_rom; | 80 | u32 *config_rom; |
82 | size_t config_rom_length; | 81 | size_t config_rom_length; |
83 | int config_rom_retries; | 82 | int config_rom_retries; |
83 | unsigned cmc:1; | ||
84 | unsigned bc_implemented:2; | ||
85 | |||
84 | struct delayed_work work; | 86 | struct delayed_work work; |
85 | struct fw_attribute_group attribute_group; | 87 | struct fw_attribute_group attribute_group; |
86 | }; | 88 | }; |
@@ -109,6 +111,7 @@ static inline void fw_device_put(struct fw_device *device) | |||
109 | 111 | ||
110 | struct fw_device *fw_device_get_by_devt(dev_t devt); | 112 | struct fw_device *fw_device_get_by_devt(dev_t devt); |
111 | int fw_device_enable_phys_dma(struct fw_device *device); | 113 | int fw_device_enable_phys_dma(struct fw_device *device); |
114 | void fw_device_set_broadcast_channel(struct fw_device *device, int generation); | ||
112 | 115 | ||
113 | void fw_device_cdev_update(struct fw_device *device); | 116 | void fw_device_cdev_update(struct fw_device *device); |
114 | void fw_device_cdev_remove(struct fw_device *device); | 117 | void fw_device_cdev_remove(struct fw_device *device); |