Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
firewire: fw-core: make two variables static
firewire: fw-ohci: dma_free_coherent needs IRQs enabled
firewire: fw-sbp2: set correct maximum payload (fixes CardBus adapters)
ieee1394: sbp2: more correct Kconfig dependencies
ieee1394: revert "sbp2: enforce 32bit DMA mapping"

+21 -17
+13 -7
drivers/firewire/fw-ohci.c
··· 907 907 int self_id_count, i, j, reg; 908 908 int generation, new_generation; 909 909 unsigned long flags; 910 + void *free_rom = NULL; 911 + dma_addr_t free_rom_bus = 0; 910 912 911 913 reg = reg_read(ohci, OHCI1394_NodeID); 912 914 if (!(reg & OHCI1394_NodeID_idValid)) { ··· 972 970 */ 973 971 974 972 if (ohci->next_config_rom != NULL) { 975 - dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE, 976 - ohci->config_rom, ohci->config_rom_bus); 973 + free_rom = ohci->config_rom; 974 + free_rom_bus = ohci->config_rom_bus; 977 975 ohci->config_rom = ohci->next_config_rom; 978 976 ohci->config_rom_bus = ohci->next_config_rom_bus; 979 977 ohci->next_config_rom = NULL; ··· 991 989 } 992 990 993 991 spin_unlock_irqrestore(&ohci->lock, flags); 992 + 993 + if (free_rom) 994 + dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE, 995 + free_rom, free_rom_bus); 994 996 995 997 fw_core_handle_bus_reset(&ohci->card, ohci->node_id, generation, 996 998 self_id_count, ohci->self_id_buffer); ··· 1192 1186 { 1193 1187 struct fw_ohci *ohci; 1194 1188 unsigned long flags; 1195 - int retval = 0; 1189 + int retval = -EBUSY; 1196 1190 __be32 *next_config_rom; 1197 1191 dma_addr_t next_config_rom_bus; 1198 1192 ··· 1246 1240 1247 1241 reg_write(ohci, OHCI1394_ConfigROMmap, 1248 1242 ohci->next_config_rom_bus); 1249 - } else { 1250 - dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE, 1251 - next_config_rom, next_config_rom_bus); 1252 - retval = -EBUSY; 1243 + retval = 0; 1253 1244 } 1254 1245 1255 1246 spin_unlock_irqrestore(&ohci->lock, flags); ··· 1260 1257 */ 1261 1258 if (retval == 0) 1262 1259 fw_core_initiate_bus_reset(&ohci->card, 1); 1260 + else 1261 + dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE, 1262 + next_config_rom, next_config_rom_bus); 1263 1263 1264 1264 return retval; 1265 1265 }
+4 -1
drivers/firewire/fw-sbp2.c
··· 984 984 struct fw_unit *unit = sd->unit; 985 985 struct fw_device *device = fw_device(unit->device.parent); 986 986 struct sbp2_command_orb *orb; 987 + unsigned max_payload; 987 988 988 989 /* 989 990 * Bidirectional commands are not yet implemented, and unknown ··· 1018 1017 * specifies the max payload size as 2 ^ (max_payload + 2), so 1019 1018 * if we set this to max_speed + 7, we get the right value. 1020 1019 */ 1020 + max_payload = min(device->max_speed + 7, 1021 + device->card->max_receive - 1); 1021 1022 orb->request.misc = 1022 - COMMAND_ORB_MAX_PAYLOAD(device->max_speed + 7) | 1023 + COMMAND_ORB_MAX_PAYLOAD(max_payload) | 1023 1024 COMMAND_ORB_SPEED(device->max_speed) | 1024 1025 COMMAND_ORB_NOTIFY; 1025 1026
+2 -2
drivers/firewire/fw-transaction.c
··· 734 734 } 735 735 EXPORT_SYMBOL(fw_core_handle_response); 736 736 737 - const struct fw_address_region topology_map_region = 737 + static const struct fw_address_region topology_map_region = 738 738 { .start = 0xfffff0001000ull, .end = 0xfffff0001400ull, }; 739 739 740 740 static void ··· 772 772 .address_callback = handle_topology_map, 773 773 }; 774 774 775 - const struct fw_address_region registers_region = 775 + static const struct fw_address_region registers_region = 776 776 { .start = 0xfffff0000000ull, .end = 0xfffff0000400ull, }; 777 777 778 778 static void
+1 -1
drivers/firewire/fw-transaction.h
··· 231 231 unsigned long reset_jiffies; 232 232 233 233 unsigned long long guid; 234 - int max_receive; 234 + unsigned max_receive; 235 235 int link_speed; 236 236 int config_rom_generation; 237 237
+1 -1
drivers/ieee1394/Kconfig
··· 97 97 98 98 config IEEE1394_SBP2_PHYS_DMA 99 99 bool "Enable replacement for physical DMA in SBP2" 100 - depends on IEEE1394 && IEEE1394_SBP2 && EXPERIMENTAL && (X86_32 || PPC_32) 100 + depends on IEEE1394_SBP2 && VIRT_TO_BUS && EXPERIMENTAL 101 101 help 102 102 This builds sbp2 for use with non-OHCI host adapters which do not 103 103 support physical DMA or for when ohci1394 is run with phys_dma=0.
-5
drivers/ieee1394/sbp2.c
··· 773 773 SBP2_ERR("failed to register lower 4GB address range"); 774 774 goto failed_alloc; 775 775 } 776 - #else 777 - if (dma_set_mask(hi->host->device.parent, DMA_32BIT_MASK)) { 778 - SBP2_ERR("failed to set 4GB DMA mask"); 779 - goto failed_alloc; 780 - } 781 776 #endif 782 777 } 783 778