diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2011-05-10 14:52:07 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2011-05-10 16:50:41 -0400 |
commit | 020abf03cd659388f94cb328e1e1df0656e0d7ff (patch) | |
tree | 40d05011708ad1b4a05928d167eb120420581aa6 /drivers/firewire | |
parent | 0ff8fbc61727c926883eec381fbd3d32d1fab504 (diff) | |
parent | 693d92a1bbc9e42681c42ed190bd42b636ca876f (diff) |
Merge tag 'v2.6.39-rc7'
in order to pull in changes in drivers/media/dvb/firewire/ and
sound/firewire/.
Diffstat (limited to 'drivers/firewire')
-rw-r--r-- | drivers/firewire/Kconfig | 6 | ||||
-rw-r--r-- | drivers/firewire/core-iso.c | 1 | ||||
-rw-r--r-- | drivers/firewire/core.h | 3 | ||||
-rw-r--r-- | drivers/firewire/net.c | 11 | ||||
-rw-r--r-- | drivers/firewire/ohci.c | 39 |
5 files changed, 37 insertions, 23 deletions
diff --git a/drivers/firewire/Kconfig b/drivers/firewire/Kconfig index 49009b489f37..2be6f4520772 100644 --- a/drivers/firewire/Kconfig +++ b/drivers/firewire/Kconfig | |||
@@ -49,15 +49,13 @@ config FIREWIRE_SBP2 | |||
49 | configuration section. | 49 | configuration section. |
50 | 50 | ||
51 | config FIREWIRE_NET | 51 | config FIREWIRE_NET |
52 | tristate "IP networking over 1394 (EXPERIMENTAL)" | 52 | tristate "IP networking over 1394" |
53 | depends on FIREWIRE && INET && EXPERIMENTAL | 53 | depends on FIREWIRE && INET |
54 | help | 54 | help |
55 | This enables IPv4 over IEEE 1394, providing IP connectivity with | 55 | This enables IPv4 over IEEE 1394, providing IP connectivity with |
56 | other implementations of RFC 2734 as found on several operating | 56 | other implementations of RFC 2734 as found on several operating |
57 | systems. Multicast support is currently limited. | 57 | systems. Multicast support is currently limited. |
58 | 58 | ||
59 | NOTE, this driver is not stable yet! | ||
60 | |||
61 | To compile this driver as a module, say M here: The module will be | 59 | To compile this driver as a module, say M here: The module will be |
62 | called firewire-net. | 60 | called firewire-net. |
63 | 61 | ||
diff --git a/drivers/firewire/core-iso.c b/drivers/firewire/core-iso.c index 95bc01a02a88..481056df9268 100644 --- a/drivers/firewire/core-iso.c +++ b/drivers/firewire/core-iso.c | |||
@@ -362,3 +362,4 @@ void fw_iso_resource_manage(struct fw_card *card, int generation, | |||
362 | *channel = ret; | 362 | *channel = ret; |
363 | } | 363 | } |
364 | } | 364 | } |
365 | EXPORT_SYMBOL(fw_iso_resource_manage); | ||
diff --git a/drivers/firewire/core.h b/drivers/firewire/core.h index f8dfcf1c6cbe..25e729cde2f7 100644 --- a/drivers/firewire/core.h +++ b/drivers/firewire/core.h | |||
@@ -147,9 +147,6 @@ void fw_node_event(struct fw_card *card, struct fw_node *node, int event); | |||
147 | /* -iso */ | 147 | /* -iso */ |
148 | 148 | ||
149 | int fw_iso_buffer_map(struct fw_iso_buffer *buffer, struct vm_area_struct *vma); | 149 | int fw_iso_buffer_map(struct fw_iso_buffer *buffer, struct vm_area_struct *vma); |
150 | void fw_iso_resource_manage(struct fw_card *card, int generation, | ||
151 | u64 channels_mask, int *channel, int *bandwidth, | ||
152 | bool allocate, __be32 buffer[2]); | ||
153 | 150 | ||
154 | 151 | ||
155 | /* -topology */ | 152 | /* -topology */ |
diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c index c2e194c58667..3f04dd3681cf 100644 --- a/drivers/firewire/net.c +++ b/drivers/firewire/net.c | |||
@@ -191,6 +191,7 @@ struct fwnet_peer { | |||
191 | struct fwnet_device *dev; | 191 | struct fwnet_device *dev; |
192 | u64 guid; | 192 | u64 guid; |
193 | u64 fifo; | 193 | u64 fifo; |
194 | __be32 ip; | ||
194 | 195 | ||
195 | /* guarded by dev->lock */ | 196 | /* guarded by dev->lock */ |
196 | struct list_head pd_list; /* received partial datagrams */ | 197 | struct list_head pd_list; /* received partial datagrams */ |
@@ -452,7 +453,7 @@ static bool fwnet_pd_update(struct fwnet_peer *peer, | |||
452 | memcpy(pd->pbuf + frag_off, frag_buf, frag_len); | 453 | memcpy(pd->pbuf + frag_off, frag_buf, frag_len); |
453 | 454 | ||
454 | /* | 455 | /* |
455 | * Move list entry to beginnig of list so that oldest partial | 456 | * Move list entry to beginning of list so that oldest partial |
456 | * datagrams percolate to the end of the list | 457 | * datagrams percolate to the end of the list |
457 | */ | 458 | */ |
458 | list_move_tail(&pd->pd_link, &peer->pd_list); | 459 | list_move_tail(&pd->pd_link, &peer->pd_list); |
@@ -570,6 +571,8 @@ static int fwnet_finish_incoming_packet(struct net_device *net, | |||
570 | peer->speed = sspd; | 571 | peer->speed = sspd; |
571 | if (peer->max_payload > max_payload) | 572 | if (peer->max_payload > max_payload) |
572 | peer->max_payload = max_payload; | 573 | peer->max_payload = max_payload; |
574 | |||
575 | peer->ip = arp1394->sip; | ||
573 | } | 576 | } |
574 | spin_unlock_irqrestore(&dev->lock, flags); | 577 | spin_unlock_irqrestore(&dev->lock, flags); |
575 | 578 | ||
@@ -1470,6 +1473,7 @@ static int fwnet_add_peer(struct fwnet_device *dev, | |||
1470 | peer->dev = dev; | 1473 | peer->dev = dev; |
1471 | peer->guid = (u64)device->config_rom[3] << 32 | device->config_rom[4]; | 1474 | peer->guid = (u64)device->config_rom[3] << 32 | device->config_rom[4]; |
1472 | peer->fifo = FWNET_NO_FIFO_ADDR; | 1475 | peer->fifo = FWNET_NO_FIFO_ADDR; |
1476 | peer->ip = 0; | ||
1473 | INIT_LIST_HEAD(&peer->pd_list); | 1477 | INIT_LIST_HEAD(&peer->pd_list); |
1474 | peer->pdg_size = 0; | 1478 | peer->pdg_size = 0; |
1475 | peer->datagram_label = 0; | 1479 | peer->datagram_label = 0; |
@@ -1589,10 +1593,13 @@ static int fwnet_remove(struct device *_dev) | |||
1589 | 1593 | ||
1590 | mutex_lock(&fwnet_device_mutex); | 1594 | mutex_lock(&fwnet_device_mutex); |
1591 | 1595 | ||
1596 | net = dev->netdev; | ||
1597 | if (net && peer->ip) | ||
1598 | arp_invalidate(net, peer->ip); | ||
1599 | |||
1592 | fwnet_remove_peer(peer, dev); | 1600 | fwnet_remove_peer(peer, dev); |
1593 | 1601 | ||
1594 | if (list_empty(&dev->peer_list)) { | 1602 | if (list_empty(&dev->peer_list)) { |
1595 | net = dev->netdev; | ||
1596 | unregister_netdev(net); | 1603 | unregister_netdev(net); |
1597 | 1604 | ||
1598 | if (dev->local_fifo != FWNET_NO_FIFO_ADDR) | 1605 | if (dev->local_fifo != FWNET_NO_FIFO_ADDR) |
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index ce767a4882fb..f9f55703375e 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c | |||
@@ -2208,7 +2208,6 @@ static int ohci_set_config_rom(struct fw_card *card, | |||
2208 | { | 2208 | { |
2209 | struct fw_ohci *ohci; | 2209 | struct fw_ohci *ohci; |
2210 | unsigned long flags; | 2210 | unsigned long flags; |
2211 | int ret = -EBUSY; | ||
2212 | __be32 *next_config_rom; | 2211 | __be32 *next_config_rom; |
2213 | dma_addr_t uninitialized_var(next_config_rom_bus); | 2212 | dma_addr_t uninitialized_var(next_config_rom_bus); |
2214 | 2213 | ||
@@ -2249,22 +2248,37 @@ static int ohci_set_config_rom(struct fw_card *card, | |||
2249 | 2248 | ||
2250 | spin_lock_irqsave(&ohci->lock, flags); | 2249 | spin_lock_irqsave(&ohci->lock, flags); |
2251 | 2250 | ||
2251 | /* | ||
2252 | * If there is not an already pending config_rom update, | ||
2253 | * push our new allocation into the ohci->next_config_rom | ||
2254 | * and then mark the local variable as null so that we | ||
2255 | * won't deallocate the new buffer. | ||
2256 | * | ||
2257 | * OTOH, if there is a pending config_rom update, just | ||
2258 | * use that buffer with the new config_rom data, and | ||
2259 | * let this routine free the unused DMA allocation. | ||
2260 | */ | ||
2261 | |||
2252 | if (ohci->next_config_rom == NULL) { | 2262 | if (ohci->next_config_rom == NULL) { |
2253 | ohci->next_config_rom = next_config_rom; | 2263 | ohci->next_config_rom = next_config_rom; |
2254 | ohci->next_config_rom_bus = next_config_rom_bus; | 2264 | ohci->next_config_rom_bus = next_config_rom_bus; |
2265 | next_config_rom = NULL; | ||
2266 | } | ||
2255 | 2267 | ||
2256 | copy_config_rom(ohci->next_config_rom, config_rom, length); | 2268 | copy_config_rom(ohci->next_config_rom, config_rom, length); |
2257 | 2269 | ||
2258 | ohci->next_header = config_rom[0]; | 2270 | ohci->next_header = config_rom[0]; |
2259 | ohci->next_config_rom[0] = 0; | 2271 | ohci->next_config_rom[0] = 0; |
2260 | 2272 | ||
2261 | reg_write(ohci, OHCI1394_ConfigROMmap, | 2273 | reg_write(ohci, OHCI1394_ConfigROMmap, ohci->next_config_rom_bus); |
2262 | ohci->next_config_rom_bus); | ||
2263 | ret = 0; | ||
2264 | } | ||
2265 | 2274 | ||
2266 | spin_unlock_irqrestore(&ohci->lock, flags); | 2275 | spin_unlock_irqrestore(&ohci->lock, flags); |
2267 | 2276 | ||
2277 | /* If we didn't use the DMA allocation, delete it. */ | ||
2278 | if (next_config_rom != NULL) | ||
2279 | dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE, | ||
2280 | next_config_rom, next_config_rom_bus); | ||
2281 | |||
2268 | /* | 2282 | /* |
2269 | * Now initiate a bus reset to have the changes take | 2283 | * Now initiate a bus reset to have the changes take |
2270 | * effect. We clean up the old config rom memory and DMA | 2284 | * effect. We clean up the old config rom memory and DMA |
@@ -2272,13 +2286,10 @@ static int ohci_set_config_rom(struct fw_card *card, | |||
2272 | * controller could need to access it before the bus reset | 2286 | * controller could need to access it before the bus reset |
2273 | * takes effect. | 2287 | * takes effect. |
2274 | */ | 2288 | */ |
2275 | if (ret == 0) | ||
2276 | fw_schedule_bus_reset(&ohci->card, true, true); | ||
2277 | else | ||
2278 | dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE, | ||
2279 | next_config_rom, next_config_rom_bus); | ||
2280 | 2289 | ||
2281 | return ret; | 2290 | fw_schedule_bus_reset(&ohci->card, true, true); |
2291 | |||
2292 | return 0; | ||
2282 | } | 2293 | } |
2283 | 2294 | ||
2284 | static void ohci_send_request(struct fw_card *card, struct fw_packet *packet) | 2295 | static void ohci_send_request(struct fw_card *card, struct fw_packet *packet) |