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>
此提交包含在:
@@ -71,7 +71,6 @@ struct fw_device {
|
||||
int node_id;
|
||||
int generation;
|
||||
unsigned max_speed;
|
||||
bool cmc;
|
||||
struct fw_card *card;
|
||||
struct device device;
|
||||
|
||||
@@ -81,6 +80,9 @@ struct fw_device {
|
||||
u32 *config_rom;
|
||||
size_t config_rom_length;
|
||||
int config_rom_retries;
|
||||
unsigned cmc:1;
|
||||
unsigned bc_implemented:2;
|
||||
|
||||
struct delayed_work work;
|
||||
struct fw_attribute_group attribute_group;
|
||||
};
|
||||
@@ -109,6 +111,7 @@ static inline void fw_device_put(struct fw_device *device)
|
||||
|
||||
struct fw_device *fw_device_get_by_devt(dev_t devt);
|
||||
int fw_device_enable_phys_dma(struct fw_device *device);
|
||||
void fw_device_set_broadcast_channel(struct fw_device *device, int generation);
|
||||
|
||||
void fw_device_cdev_update(struct fw_device *device);
|
||||
void fw_device_cdev_remove(struct fw_device *device);
|
||||
|
新增問題並參考
封鎖使用者