aboutsummaryrefslogtreecommitdiff
path: root/drivers/firewire/fw-ohci.c
AgeCommit message (Collapse)Author
2007-03-09firewire: Use dma_mapping_error() for checking for DMA mapping errors.Kristian Høgsberg
Pointed out by Pete Zaitcev. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Implement proper transaction cancelation.Kristian Høgsberg
Drivers such as fw-sbp2 had no way to properly cancel in-progress transactions, which could leave a pending transaction or an unset packet in the low-level queues after kfree'ing the containing structure. fw_cancel_transaction() lets drivers cancel a submitted transaction. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Reduce some redundant register definitions.Kristian Høgsberg
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Rework async receive DMA.Kristian Høgsberg
The old DMA program for receiving async packets stops DMA while processing received packets and only expects one packet per interrupt. Stopping DMA can silently drop packets and we need to handle multiple received packets per interrupt. This new version keeps DMA running at all times and just append new pages as buffers fill up, and supports multiple packets per interrupt. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Make sure we wait for DMA to stop before we reprogram it.Kristian Høgsberg
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Sanitize send error codes.Kristian Høgsberg
Drop the negative errnos and use RCODEs for all error codes in the complete transaction callback. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Handle access to CSR resources on local node.Kristian Høgsberg
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Loop requests to the host controller back into the stack.Kristian Høgsberg
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Use struct fw_packet for incoming packets too in controller interface.Kristian Høgsberg
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: consistent usage of node_idStefan Richter
Definitions as per IEEE 1212 and IEEE 1394: Node ID: Concatenation of bus ID and local ID. 16 bits long. Bus ID: Identifies a particular bus within a group of buses interconnected by bus bridges. Local ID: Identifies a particular node on a bus. PHY ID: Local ID of IEEE 1394 nodes. 6 bits long. Never ever use a variable called node_id for anything else than a node ID. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: fw-ohci: remove unnecessary macroStefan Richter
Cleans up after patch "Add PCI class ID for firewire OHCI controllers". Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
2007-03-09firewire: fix failure path in ohci_enable_phys_dmaStefan Richter
"goto out" happens with the lock taken. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
2007-03-09firewire: comma after last enum item or initializerStefan Richter
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
2007-03-09firewire: whitespace adjustmentsStefan Richter
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
2007-03-09firewire: cleanupsAdrian Bunk
This patch contains the following cleanups: - "extern inline" -> "static inline" - fw-topology.c: make struct fw_node_create static Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: mark some structs constStefan Richter
Instances of struct file_operations and struct fw_card_driver can be qualified as "const". Ditto with struct fw_descriptor.data, struct fw_device_id, and predefined instances of struct fw_address_region, at least in the current implementation. Data qualified as const is placed into the .rodata section which won't be mixed with dirty data. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: build fixAndrew Morton
alpha: drivers/firewire/fw-ohci.c: In function 'ar_context_tasklet': drivers/firewire/fw-ohci.c:266: warning: implicit declaration of function 'dma_sync_single_for_device' drivers/firewire/fw-ohci.c:267: error: 'DMA_TO_DEVICE' undeclared (first use in this function) drivers/firewire/fw-ohci.c:267: error: (Each undeclared identifier is reported only once drivers/firewire/fw-ohci.c:267: error: for each function it appears in.) drivers/firewire/fw-ohci.c: In function 'ar_context_init': drivers/firewire/fw-ohci.c:282: warning: implicit declaration of function 'dma_map_single' drivers/firewire/fw-ohci.c:283: error: 'DMA_TO_DEVICE' undeclared (first use in this function) drivers/firewire/fw-ohci.c:293: error: 'DMA_FROM_DEVICE' undeclared (first use in this function) etc. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: printk warning fixAndrew Morton
drivers/firewire/fw-ohci.c: In function 'ar_context_init': drivers/firewire/fw-ohci.c:288: warning: format '%08x' expects type 'unsigned int', but argument 2 has type 'dma_addr_t' Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-03-09firewire: Add driver for OHCI firewire host controllers.Kristian Høgsberg
Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>