Commit f78089e8 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394

Pull firewure updates from Stefan Richter:
  - fix controller removal when controller is in suspended state
  - fix video reception on VIA VT6306 with gstreamer, MythTV, and maybe dv4l
  - fix a startup issue with Agere/LSI FW643-e2
  - error logging improvements and other small updates

* tag 'firewire-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
  firewire: ohci: dump_stack() for PHY regs read/write failures
  firewire: ohci: Improve bus reset error messages
  firewire: ohci: Alias dev_* log functions
  firewire: ohci: Fix 'failed to read phy reg' on FW643 rev8
  firewire: ohci: fix VIA VT6306 video reception
  firewire: ohci: Check LPS before register access on pci removal
  firewire: ohci: Fix double free_irq()
  firewire: remove unnecessary alloc/OOM messages
  firewire: sbp2: replace BUG_ON by WARN_ON
  firewire: core: remove an always false test
  firewire: Remove two unneeded checks for macros
parents 7462543a 6fe9efb9
...@@ -389,10 +389,8 @@ static void queue_bus_reset_event(struct client *client) ...@@ -389,10 +389,8 @@ static void queue_bus_reset_event(struct client *client)
struct bus_reset_event *e; struct bus_reset_event *e;
e = kzalloc(sizeof(*e), GFP_KERNEL); e = kzalloc(sizeof(*e), GFP_KERNEL);
if (e == NULL) { if (e == NULL)
fw_notice(client->device->card, "out of memory when allocating event\n");
return; return;
}
fill_bus_reset_event(&e->reset, client); fill_bus_reset_event(&e->reset, client);
...@@ -693,10 +691,9 @@ static void handle_request(struct fw_card *card, struct fw_request *request, ...@@ -693,10 +691,9 @@ static void handle_request(struct fw_card *card, struct fw_request *request,
r = kmalloc(sizeof(*r), GFP_ATOMIC); r = kmalloc(sizeof(*r), GFP_ATOMIC);
e = kmalloc(sizeof(*e), GFP_ATOMIC); e = kmalloc(sizeof(*e), GFP_ATOMIC);
if (r == NULL || e == NULL) { if (r == NULL || e == NULL)
fw_notice(card, "out of memory when allocating event\n");
goto failed; goto failed;
}
r->card = card; r->card = card;
r->request = request; r->request = request;
r->data = payload; r->data = payload;
...@@ -930,10 +927,9 @@ static void iso_callback(struct fw_iso_context *context, u32 cycle, ...@@ -930,10 +927,9 @@ static void iso_callback(struct fw_iso_context *context, u32 cycle,
struct iso_interrupt_event *e; struct iso_interrupt_event *e;
e = kmalloc(sizeof(*e) + header_length, GFP_ATOMIC); e = kmalloc(sizeof(*e) + header_length, GFP_ATOMIC);
if (e == NULL) { if (e == NULL)
fw_notice(context->card, "out of memory when allocating event\n");
return; return;
}
e->interrupt.type = FW_CDEV_EVENT_ISO_INTERRUPT; e->interrupt.type = FW_CDEV_EVENT_ISO_INTERRUPT;
e->interrupt.closure = client->iso_closure; e->interrupt.closure = client->iso_closure;
e->interrupt.cycle = cycle; e->interrupt.cycle = cycle;
...@@ -950,10 +946,9 @@ static void iso_mc_callback(struct fw_iso_context *context, ...@@ -950,10 +946,9 @@ static void iso_mc_callback(struct fw_iso_context *context,
struct iso_interrupt_mc_event *e; struct iso_interrupt_mc_event *e;
e = kmalloc(sizeof(*e), GFP_ATOMIC); e = kmalloc(sizeof(*e), GFP_ATOMIC);
if (e == NULL) { if (e == NULL)
fw_notice(context->card, "out of memory when allocating event\n");
return; return;
}
e->interrupt.type = FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL; e->interrupt.type = FW_CDEV_EVENT_ISO_INTERRUPT_MULTICHANNEL;
e->interrupt.closure = client->iso_closure; e->interrupt.closure = client->iso_closure;
e->interrupt.completed = fw_iso_buffer_lookup(&client->buffer, e->interrupt.completed = fw_iso_buffer_lookup(&client->buffer,
...@@ -1366,8 +1361,7 @@ static int init_iso_resource(struct client *client, ...@@ -1366,8 +1361,7 @@ static int init_iso_resource(struct client *client,
int ret; int ret;
if ((request->channels == 0 && request->bandwidth == 0) || if ((request->channels == 0 && request->bandwidth == 0) ||
request->bandwidth > BANDWIDTH_AVAILABLE_INITIAL || request->bandwidth > BANDWIDTH_AVAILABLE_INITIAL)
request->bandwidth < 0)
return -EINVAL; return -EINVAL;
r = kmalloc(sizeof(*r), GFP_KERNEL); r = kmalloc(sizeof(*r), GFP_KERNEL);
...@@ -1582,10 +1576,9 @@ void fw_cdev_handle_phy_packet(struct fw_card *card, struct fw_packet *p) ...@@ -1582,10 +1576,9 @@ void fw_cdev_handle_phy_packet(struct fw_card *card, struct fw_packet *p)
list_for_each_entry(client, &card->phy_receiver_list, phy_receiver_link) { list_for_each_entry(client, &card->phy_receiver_list, phy_receiver_link) {
e = kmalloc(sizeof(*e) + 8, GFP_ATOMIC); e = kmalloc(sizeof(*e) + 8, GFP_ATOMIC);
if (e == NULL) { if (e == NULL)
fw_notice(card, "out of memory when allocating event\n");
break; break;
}
e->phy_packet.closure = client->phy_receiver_closure; e->phy_packet.closure = client->phy_receiver_closure;
e->phy_packet.type = FW_CDEV_EVENT_PHY_PACKET_RECEIVED; e->phy_packet.type = FW_CDEV_EVENT_PHY_PACKET_RECEIVED;
e->phy_packet.rcode = RCODE_COMPLETE; e->phy_packet.rcode = RCODE_COMPLETE;
......
...@@ -692,10 +692,8 @@ static void create_units(struct fw_device *device) ...@@ -692,10 +692,8 @@ static void create_units(struct fw_device *device)
* match the drivers id_tables against it. * match the drivers id_tables against it.
*/ */
unit = kzalloc(sizeof(*unit), GFP_KERNEL); unit = kzalloc(sizeof(*unit), GFP_KERNEL);
if (unit == NULL) { if (unit == NULL)
fw_err(device->card, "out of memory for unit\n");
continue; continue;
}
unit->directory = ci.p + value - 1; unit->directory = ci.p + value - 1;
unit->device.bus = &fw_bus_type; unit->device.bus = &fw_bus_type;
......
...@@ -356,10 +356,8 @@ static struct fwnet_fragment_info *fwnet_frag_new( ...@@ -356,10 +356,8 @@ static struct fwnet_fragment_info *fwnet_frag_new(
} }
new = kmalloc(sizeof(*new), GFP_ATOMIC); new = kmalloc(sizeof(*new), GFP_ATOMIC);
if (!new) { if (!new)
dev_err(&pd->skb->dev->dev, "out of memory\n");
return NULL; return NULL;
}
new->offset = offset; new->offset = offset;
new->len = len; new->len = len;
...@@ -402,8 +400,6 @@ static struct fwnet_partial_datagram *fwnet_pd_new(struct net_device *net, ...@@ -402,8 +400,6 @@ static struct fwnet_partial_datagram *fwnet_pd_new(struct net_device *net,
fail_w_new: fail_w_new:
kfree(new); kfree(new);
fail: fail:
dev_err(&net->dev, "out of memory\n");
return NULL; return NULL;
} }
...@@ -609,7 +605,6 @@ static int fwnet_incoming_packet(struct fwnet_device *dev, __be32 *buf, int len, ...@@ -609,7 +605,6 @@ static int fwnet_incoming_packet(struct fwnet_device *dev, __be32 *buf, int len,
skb = dev_alloc_skb(len + LL_RESERVED_SPACE(net)); skb = dev_alloc_skb(len + LL_RESERVED_SPACE(net));
if (unlikely(!skb)) { if (unlikely(!skb)) {
dev_err(&net->dev, "out of memory\n");
net->stats.rx_dropped++; net->stats.rx_dropped++;
return -ENOMEM; return -ENOMEM;
......
This diff is collapsed.
...@@ -1144,8 +1144,8 @@ static int sbp2_probe(struct device *dev) ...@@ -1144,8 +1144,8 @@ static int sbp2_probe(struct device *dev)
return -ENODEV; return -ENODEV;
if (dma_get_max_seg_size(device->card->device) > SBP2_MAX_SEG_SIZE) if (dma_get_max_seg_size(device->card->device) > SBP2_MAX_SEG_SIZE)
BUG_ON(dma_set_max_seg_size(device->card->device, WARN_ON(dma_set_max_seg_size(device->card->device,
SBP2_MAX_SEG_SIZE)); SBP2_MAX_SEG_SIZE));
shost = scsi_host_alloc(&scsi_driver_template, sizeof(*tgt)); shost = scsi_host_alloc(&scsi_driver_template, sizeof(*tgt));
if (shost == NULL) if (shost == NULL)
...@@ -1475,10 +1475,8 @@ static int sbp2_scsi_queuecommand(struct Scsi_Host *shost, ...@@ -1475,10 +1475,8 @@ static int sbp2_scsi_queuecommand(struct Scsi_Host *shost,
} }
orb = kzalloc(sizeof(*orb), GFP_ATOMIC); orb = kzalloc(sizeof(*orb), GFP_ATOMIC);
if (orb == NULL) { if (orb == NULL)
dev_notice(lu_dev(lu), "failed to alloc ORB\n");
return SCSI_MLQUEUE_HOST_BUSY; return SCSI_MLQUEUE_HOST_BUSY;
}
/* Initialize rcode to something not RCODE_COMPLETE. */ /* Initialize rcode to something not RCODE_COMPLETE. */
orb->base.rcode = -1; orb->base.rcode = -1;
...@@ -1636,9 +1634,7 @@ MODULE_LICENSE("GPL"); ...@@ -1636,9 +1634,7 @@ MODULE_LICENSE("GPL");
MODULE_DEVICE_TABLE(ieee1394, sbp2_id_table); MODULE_DEVICE_TABLE(ieee1394, sbp2_id_table);
/* Provide a module alias so root-on-sbp2 initrds don't break. */ /* Provide a module alias so root-on-sbp2 initrds don't break. */
#ifndef CONFIG_IEEE1394_SBP2_MODULE
MODULE_ALIAS("sbp2"); MODULE_ALIAS("sbp2");
#endif
static int __init sbp2_init(void) static int __init sbp2_init(void)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment