Commit 719b6399 authored by Ben Collins's avatar Ben Collins Committed by Linus Torvalds

[PATCH] 1394 updates

- New irq handler prototypes.
- Lots of un-enumurated locking fixes/cleanups (thanks in large part to
  spinlock debug compile options in the kernel).
- Other various trivial fixes.
parent 4f4b8e8c
......@@ -455,6 +455,10 @@ struct video_card {
*/
spinlock_t spinlock;
/* flag to prevent spurious interrupts (which OHCI seems to
generate a lot :) from accessing the struct */
int dma_running;
/*
3) the sleeping semaphore 'sem' - this is used from process context only,
to serialize various operations on the video_card. Even though only one
......@@ -568,7 +572,7 @@ static inline int video_card_initialized(struct video_card *v)
static int do_dv1394_init(struct video_card *video, struct dv1394_init *init);
static int do_dv1394_init_default(struct video_card *video);
static int do_dv1394_shutdown(struct video_card *video, int free_user_buf);
static void do_dv1394_shutdown(struct video_card *video, int free_user_buf);
/* NTSC empty packet rate accurate to within 0.01%,
......
This diff is collapsed.
......@@ -78,7 +78,7 @@
printk(KERN_ERR fmt, ## args)
static char version[] __devinitdata =
"$Rev: 886 $ Ben Collins <bcollins@debian.org>";
"$Rev: 895 $ Ben Collins <bcollins@debian.org>";
/* Our ieee1394 highlevel driver */
#define ETHER1394_DRIVER_NAME "ether1394"
......@@ -340,6 +340,7 @@ static void ether1394_add_host (struct hpsb_host *host, struct hpsb_highlevel *h
priv = (struct eth1394_priv *)dev->priv;
priv->host = host;
spin_lock_init(&priv->lock);
hi = hpsb_create_hostinfo(hl, host, sizeof(*hi));
......
This diff is collapsed.
......@@ -14,6 +14,7 @@ struct hpsb_highlevel {
/* Used by the highlevel drivers to store data per host */
struct list_head host_info_list;
rwlock_t host_info_lock;
};
......@@ -176,5 +177,4 @@ void *hpsb_get_hostinfo_bykey(struct hpsb_highlevel *hl, unsigned long key);
* hpsb_create_hostinfo, where the size is 0. */
int hpsb_set_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host, void *data);
#endif /* IEEE1394_HIGHLEVEL_H */
......@@ -1295,7 +1295,6 @@ EXPORT_SYMBOL(highlevel_host_reset);
/** nodemgr.c **/
EXPORT_SYMBOL(hpsb_guid_get_entry);
EXPORT_SYMBOL(hpsb_nodeid_get_entry);
EXPORT_SYMBOL(hpsb_check_nodeid);
EXPORT_SYMBOL(hpsb_node_fill_packet);
EXPORT_SYMBOL(hpsb_node_read);
EXPORT_SYMBOL(hpsb_node_write);
......
......@@ -47,8 +47,11 @@ static struct hpsb_iso* hpsb_iso_common_init(struct hpsb_host *host, enum hpsb_i
int dma_direction;
/* make sure driver supports the ISO API */
if(!host->driver->isoctl)
if(!host->driver->isoctl) {
printk(KERN_INFO "ieee1394: host driver '%s' does not support the rawiso API\n",
host->driver->name);
return NULL;
}
/* sanitize parameters */
......
......@@ -1616,18 +1616,6 @@ struct node_entry *hpsb_nodeid_get_entry(struct hpsb_host *host, nodeid_t nodeid
return ne;
}
struct node_entry *hpsb_check_nodeid(struct hpsb_host *host, nodeid_t nodeid)
{
struct node_entry *ne;
if (down_trylock(&nodemgr_serialize))
return NULL;
ne = find_entry_by_nodeid(host, nodeid);
up(&nodemgr_serialize);
return ne;
}
/* The following four convenience functions use a struct node_entry
* for addressing a node on the bus. They are intended for use by any
* process context, not just the nodemgr thread, so we need to be a
......
......@@ -163,10 +163,6 @@ struct node_entry *hpsb_guid_get_entry(u64 guid);
* fool-proof by itself, since the nodeid can change. */
struct node_entry *hpsb_nodeid_get_entry(struct hpsb_host *host, nodeid_t nodeid);
/* Same as above except that it will not block waiting for the nodemgr
* serialize semaphore. */
struct node_entry *hpsb_check_nodeid(struct hpsb_host *host, nodeid_t nodeid);
/*
* If the entry refers to a local host, this function will return the pointer
* to the hpsb_host structure. It will return NULL otherwise. Once you have
......
......@@ -165,7 +165,7 @@ printk(level "%s: " fmt "\n" , OHCI1394_DRIVER_NAME , ## args)
printk(level "%s_%d: " fmt "\n" , OHCI1394_DRIVER_NAME, card , ## args)
static char version[] __devinitdata =
"$Rev: 866 $ Ben Collins <bcollins@debian.org>";
"$Rev: 897 $ Ben Collins <bcollins@debian.org>";
/* Module Parameters */
static int phys_dma = 1;
......
......@@ -1163,7 +1163,7 @@ static ssize_t mem_write(struct file *file, const char *buffer, size_t count,
********************************************************/
static void lynx_irq_handler(int irq, void *dev_id,
static irqreturn_t lynx_irq_handler(int irq, void *dev_id,
struct pt_regs *regs_are_unused)
{
struct ti_lynx *lynx = (struct ti_lynx *)dev_id;
......@@ -1174,7 +1174,8 @@ static void lynx_irq_handler(int irq, void *dev_id,
linkint = reg_read(lynx, LINK_INT_STATUS);
intmask = reg_read(lynx, PCI_INT_STATUS);
if (!(intmask & PCI_INT_INT_PEND)) return;
if (!(intmask & PCI_INT_INT_PEND))
return IRQ_HANDLED;
PRINTD(KERN_DEBUG, lynx->id, "interrupt: 0x%08x / 0x%08x", intmask,
linkint);
......@@ -1390,6 +1391,8 @@ static void lynx_irq_handler(int irq, void *dev_id,
run_pcl(lynx, lynx->rcv_pcl_start, CHANNEL_ASYNC_RCV);
}
return IRQ_HANDLED;
}
......@@ -1893,7 +1896,7 @@ static struct pci_driver lynx_pci_driver = {
.name = PCILYNX_DRIVER_NAME,
.id_table = pci_table,
.probe = add_card,
.remove = __devexit_p(remove_card),
.remove = remove_card,
};
static struct hpsb_host_driver lynx_driver = {
......
......@@ -298,7 +298,7 @@
#include "sbp2.h"
static char version[] __devinitdata =
"$Rev: 884 $ James Goodwin <jamesg@filanet.com>";
"$Rev: 896 $ James Goodwin <jamesg@filanet.com>";
/*
* Module load parameter definitions
......
......@@ -67,14 +67,6 @@
#define vmalloc_32(x) vmalloc(x)
#endif
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,3))
#define remap_page_range_1394(vma, start, addr, size, prot) \
remap_page_range(start, addr, size, prot)
#else
#define remap_page_range_1394(vma, start, addr, size, prot) \
remap_page_range(vma, start, addr, size, prot)
#endif
struct it_dma_prg {
struct dma_cmd begin;
quadlet_t data[4];
......@@ -496,11 +488,7 @@ void wakeup_dma_ir_ctx(unsigned long l)
if (d->ir_prg[i][d->nb_cmd-1].status & cpu_to_le32(0xFFFF0000)) {
reset_ir_status(d, i);
d->buffer_status[i] = VIDEO1394_BUFFER_READY;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,18)
get_fast_time(&d->buffer_time[i]);
#else
do_gettimeofday(&d->buffer_time[i]);
#endif
}
}
......
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