diff options
| -rw-r--r-- | drivers/firewire/core-device.c | 18 | ||||
| -rw-r--r-- | include/linux/firewire.h | 2 |
2 files changed, 19 insertions, 1 deletions
diff --git a/drivers/firewire/core-device.c b/drivers/firewire/core-device.c index d6e54a5173fc..97e656af2d22 100644 --- a/drivers/firewire/core-device.c +++ b/drivers/firewire/core-device.c | |||
| @@ -580,7 +580,9 @@ static int read_bus_info_block(struct fw_device *device, int generation) | |||
| 580 | 580 | ||
| 581 | kfree(old_rom); | 581 | kfree(old_rom); |
| 582 | ret = 0; | 582 | ret = 0; |
| 583 | device->cmc = rom[2] >> 30 & 1; | 583 | device->max_rec = rom[2] >> 12 & 0xf; |
| 584 | device->cmc = rom[2] >> 30 & 1; | ||
| 585 | device->irmc = rom[2] >> 31 & 1; | ||
| 584 | out: | 586 | out: |
| 585 | kfree(rom); | 587 | kfree(rom); |
| 586 | 588 | ||
| @@ -841,6 +843,20 @@ static void set_broadcast_channel(struct fw_device *device, int generation) | |||
| 841 | if (!card->broadcast_channel_allocated) | 843 | if (!card->broadcast_channel_allocated) |
| 842 | return; | 844 | return; |
| 843 | 845 | ||
| 846 | /* | ||
| 847 | * The Broadcast_Channel Valid bit is required by nodes which want to | ||
| 848 | * transmit on this channel. Such transmissions are practically | ||
| 849 | * exclusive to IP over 1394 (RFC 2734). IP capable nodes are required | ||
| 850 | * to be IRM capable and have a max_rec of 8 or more. We use this fact | ||
| 851 | * to narrow down to which nodes we send Broadcast_Channel updates. | ||
| 852 | */ | ||
| 853 | if (!device->irmc || device->max_rec < 8) | ||
| 854 | return; | ||
| 855 | |||
| 856 | /* | ||
| 857 | * Some 1394-1995 nodes crash if this 1394a-2000 register is written. | ||
| 858 | * Perform a read test first. | ||
| 859 | */ | ||
| 844 | if (device->bc_implemented == BC_UNKNOWN) { | 860 | if (device->bc_implemented == BC_UNKNOWN) { |
| 845 | rcode = fw_run_transaction(card, TCODE_READ_QUADLET_REQUEST, | 861 | rcode = fw_run_transaction(card, TCODE_READ_QUADLET_REQUEST, |
| 846 | device->node_id, generation, device->max_speed, | 862 | device->node_id, generation, device->max_speed, |
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index a69aea0394e3..610eade8abb4 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
| @@ -191,7 +191,9 @@ struct fw_device { | |||
| 191 | size_t config_rom_length; | 191 | size_t config_rom_length; |
| 192 | int config_rom_retries; | 192 | int config_rom_retries; |
| 193 | unsigned is_local:1; | 193 | unsigned is_local:1; |
| 194 | unsigned max_rec:4; | ||
| 194 | unsigned cmc:1; | 195 | unsigned cmc:1; |
| 196 | unsigned irmc:1; | ||
| 195 | unsigned bc_implemented:2; | 197 | unsigned bc_implemented:2; |
| 196 | 198 | ||
| 197 | struct delayed_work work; | 199 | struct delayed_work work; |
