diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-22 20:31:15 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-22 20:31:15 -0700 |
commit | 34699403e9916060af8ae23f5e4705a6c078e79d (patch) | |
tree | e149ca6354171caf61132d80508ad878b00878c9 /drivers/firewire/net.c | |
parent | 7fc86a7908a4e9eb2da4b6498f86193d113842d3 (diff) | |
parent | d1bbd20972936b9b178fda3eb1ec417cb27fdc01 (diff) |
Merge tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394
Pull IEEE 1394 (FireWire) subsystem updates post v3.3 from Stefan Richter:
- Some SBP-2 initiator fixes, side product from ongoing work on a target.
- Reintroduction of an isochronous I/O feature of the older ieee1394 driver
stack (flush buffer completions); it was evidently rarely used but not
actually unused. Matching libraw1394 code is already available.
- Be sure to prefix all kernel log messages with device name or card name,
and other logging related cleanups.
- Misc other small cleanups, among them a small API change that affects
sound/firewire/ too. Clemens Ladisch is aware of it.
* tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394: (26 commits)
firewire: allow explicit flushing of iso packet completions
firewire: prevent dropping of completed iso packet header data
firewire: ohci: factor out iso completion flushing code
firewire: ohci: simplify iso header pointer arithmetic
firewire: ohci: optimize control bit checks
firewire: ohci: remove unused excess_bytes field
firewire: ohci: copy_iso_headers(): make comment match the code
firewire: cdev: fix IR multichannel event documentation
firewire: ohci: fix too-early completion of IR multichannel buffers
firewire: ohci: move runtime debug facility out of #ifdef
firewire: tone down some diagnostic log messages
firewire: sbp2: replace a GFP_ATOMIC allocation
firewire: sbp2: Fix SCSI sense data mangling
firewire: sbp2: Ignore SBP-2 targets on the local node
firewire: sbp2: Take into account Unit_Unique_ID
firewire: nosy: Use the macro DMA_BIT_MASK().
firewire: core: convert AR-req handler lock from _irqsave to _bh
firewire: core: fix race at address_handler unregistration
firewire: core: remove obsolete comment
firewire: core: prefix log messages with card name
...
Diffstat (limited to 'drivers/firewire/net.c')
-rw-r--r-- | drivers/firewire/net.c | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c index a20f45b1e7e..08c674957af 100644 --- a/drivers/firewire/net.c +++ b/drivers/firewire/net.c @@ -256,8 +256,8 @@ static int fwnet_header_rebuild(struct sk_buff *skb) if (get_unaligned_be16(&h->h_proto) == ETH_P_IP) return arp_find((unsigned char *)&h->h_dest, skb); - fw_notify("%s: unable to resolve type %04x addresses\n", - skb->dev->name, be16_to_cpu(h->h_proto)); + dev_notice(&skb->dev->dev, "unable to resolve type %04x addresses\n", + be16_to_cpu(h->h_proto)); return 0; } @@ -369,7 +369,7 @@ static struct fwnet_fragment_info *fwnet_frag_new( new = kmalloc(sizeof(*new), GFP_ATOMIC); if (!new) { - fw_error("out of memory\n"); + dev_err(&pd->skb->dev->dev, "out of memory\n"); return NULL; } @@ -414,7 +414,7 @@ fail_w_fi: fail_w_new: kfree(new); fail: - fw_error("out of memory\n"); + dev_err(&net->dev, "out of memory\n"); return NULL; } @@ -554,7 +554,7 @@ static int fwnet_finish_incoming_packet(struct net_device *net, sspd = arp1394->sspd; /* Sanity check. OS X 10.3 PPC reportedly sends 131. */ if (sspd > SCODE_3200) { - fw_notify("sspd %x out of range\n", sspd); + dev_notice(&net->dev, "sspd %x out of range\n", sspd); sspd = SCODE_3200; } max_payload = fwnet_max_payload(arp1394->max_rec, sspd); @@ -574,8 +574,9 @@ static int fwnet_finish_incoming_packet(struct net_device *net, spin_unlock_irqrestore(&dev->lock, flags); if (!peer) { - fw_notify("No peer for ARP packet from %016llx\n", - (unsigned long long)peer_guid); + dev_notice(&net->dev, + "no peer for ARP packet from %016llx\n", + (unsigned long long)peer_guid); goto no_peer; } @@ -691,7 +692,7 @@ static int fwnet_incoming_packet(struct fwnet_device *dev, __be32 *buf, int len, skb = dev_alloc_skb(len + net->hard_header_len + 15); if (unlikely(!skb)) { - fw_error("out of memory\n"); + dev_err(&net->dev, "out of memory\n"); net->stats.rx_dropped++; return -ENOMEM; @@ -814,7 +815,7 @@ static void fwnet_receive_packet(struct fw_card *card, struct fw_request *r, rcode = RCODE_TYPE_ERROR; else if (fwnet_incoming_packet(dev, payload, length, source, generation, false) != 0) { - fw_error("Incoming packet failure\n"); + dev_err(&dev->netdev->dev, "incoming packet failure\n"); rcode = RCODE_CONFLICT_ERROR; } else rcode = RCODE_COMPLETE; @@ -881,7 +882,7 @@ static void fwnet_receive_broadcast(struct fw_iso_context *context, if (retval >= 0) fw_iso_context_queue_flush(dev->broadcast_rcv_context); else - fw_error("requeue failed\n"); + dev_err(&dev->netdev->dev, "requeue failed\n"); } static struct kmem_cache *fwnet_packet_task_cache; @@ -936,9 +937,10 @@ static void fwnet_transmit_packet_done(struct fwnet_packet_task *ptask) case RFC2374_HDR_LASTFRAG: case RFC2374_HDR_UNFRAG: default: - fw_error("Outstanding packet %x lf %x, header %x,%x\n", - ptask->outstanding_pkts, lf, ptask->hdr.w0, - ptask->hdr.w1); + dev_err(&dev->netdev->dev, + "outstanding packet %x lf %x, header %x,%x\n", + ptask->outstanding_pkts, lf, ptask->hdr.w0, + ptask->hdr.w1); BUG(); case RFC2374_HDR_FIRSTFRAG: @@ -1010,8 +1012,9 @@ static void fwnet_write_complete(struct fw_card *card, int rcode, fwnet_transmit_packet_failed(ptask); if (printk_timed_ratelimit(&j, 1000) || rcode != last_rcode) { - fw_error("fwnet_write_complete: " - "failed: %x (skipped %d)\n", rcode, errors_skipped); + dev_err(&ptask->dev->netdev->dev, + "fwnet_write_complete failed: %x (skipped %d)\n", + rcode, errors_skipped); errors_skipped = 0; last_rcode = rcode; @@ -1539,14 +1542,12 @@ static int fwnet_probe(struct device *_dev) put_unaligned_be64(card->guid, net->dev_addr); put_unaligned_be64(~0ULL, net->broadcast); ret = register_netdev(net); - if (ret) { - fw_error("Cannot register the driver\n"); + if (ret) goto out; - } list_add_tail(&dev->dev_link, &fwnet_device_list); - fw_notify("%s: IPv4 over FireWire on device %016llx\n", - net->name, (unsigned long long)card->guid); + dev_notice(&net->dev, "IPv4 over IEEE 1394 on card %s\n", + dev_name(card->device)); have_dev: ret = fwnet_add_peer(dev, unit, device); if (ret && allocated_netdev) { @@ -1648,7 +1649,7 @@ static const struct ieee1394_device_id fwnet_id_table[] = { static struct fw_driver fwnet_driver = { .driver = { .owner = THIS_MODULE, - .name = "net", + .name = KBUILD_MODNAME, .bus = &fw_bus_type, .probe = fwnet_probe, .remove = fwnet_remove, |