aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/Kconfig6
-rw-r--r--drivers/firewire/core-card.c11
-rw-r--r--drivers/firewire/net.c9
3 files changed, 19 insertions, 7 deletions
diff --git a/drivers/firewire/Kconfig b/drivers/firewire/Kconfig
index 68f942cb30f..0c56989cd90 100644
--- a/drivers/firewire/Kconfig
+++ b/drivers/firewire/Kconfig
@@ -49,15 +49,13 @@ config FIREWIRE_SBP2
49 configuration section. 49 configuration section.
50 50
51config FIREWIRE_NET 51config 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-card.c b/drivers/firewire/core-card.c
index be0492398ef..24ff35511e2 100644
--- a/drivers/firewire/core-card.c
+++ b/drivers/firewire/core-card.c
@@ -75,6 +75,8 @@ static size_t config_rom_length = 1 + 4 + 1 + 1;
75#define BIB_IRMC ((1) << 31) 75#define BIB_IRMC ((1) << 31)
76#define NODE_CAPABILITIES 0x0c0083c0 /* per IEEE 1394 clause 8.3.2.6.5.2 */ 76#define NODE_CAPABILITIES 0x0c0083c0 /* per IEEE 1394 clause 8.3.2.6.5.2 */
77 77
78#define CANON_OUI 0x000085
79
78static void generate_config_rom(struct fw_card *card, __be32 *config_rom) 80static void generate_config_rom(struct fw_card *card, __be32 *config_rom)
79{ 81{
80 struct fw_descriptor *desc; 82 struct fw_descriptor *desc;
@@ -284,6 +286,7 @@ static void bm_work(struct work_struct *work)
284 bool root_device_is_running; 286 bool root_device_is_running;
285 bool root_device_is_cmc; 287 bool root_device_is_cmc;
286 bool irm_is_1394_1995_only; 288 bool irm_is_1394_1995_only;
289 bool keep_this_irm;
287 290
288 spin_lock_irq(&card->lock); 291 spin_lock_irq(&card->lock);
289 292
@@ -305,6 +308,10 @@ static void bm_work(struct work_struct *work)
305 irm_is_1394_1995_only = irm_device && irm_device->config_rom && 308 irm_is_1394_1995_only = irm_device && irm_device->config_rom &&
306 (irm_device->config_rom[2] & 0x000000f0) == 0; 309 (irm_device->config_rom[2] & 0x000000f0) == 0;
307 310
311 /* Canon MV5i works unreliably if it is not root node. */
312 keep_this_irm = irm_device && irm_device->config_rom &&
313 irm_device->config_rom[3] >> 8 == CANON_OUI;
314
308 root_id = root_node->node_id; 315 root_id = root_node->node_id;
309 irm_id = card->irm_node->node_id; 316 irm_id = card->irm_node->node_id;
310 local_id = card->local_node->node_id; 317 local_id = card->local_node->node_id;
@@ -333,7 +340,7 @@ static void bm_work(struct work_struct *work)
333 goto pick_me; 340 goto pick_me;
334 } 341 }
335 342
336 if (irm_is_1394_1995_only) { 343 if (irm_is_1394_1995_only && !keep_this_irm) {
337 new_root_id = local_id; 344 new_root_id = local_id;
338 fw_notify("%s, making local node (%02x) root.\n", 345 fw_notify("%s, making local node (%02x) root.\n",
339 "IRM is not 1394a compliant", new_root_id); 346 "IRM is not 1394a compliant", new_root_id);
@@ -382,7 +389,7 @@ static void bm_work(struct work_struct *work)
382 389
383 spin_lock_irq(&card->lock); 390 spin_lock_irq(&card->lock);
384 391
385 if (rcode != RCODE_COMPLETE) { 392 if (rcode != RCODE_COMPLETE && !keep_this_irm) {
386 /* 393 /*
387 * The lock request failed, maybe the IRM 394 * The lock request failed, maybe the IRM
388 * isn't really IRM capable after all. Let's 395 * isn't really IRM capable after all. Let's
diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c
index c2e194c5866..7ed08fd1214 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 */
@@ -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)