diff options
Diffstat (limited to 'drivers/ieee1394')
-rw-r--r-- | drivers/ieee1394/dma.h | 1 | ||||
-rw-r--r-- | drivers/ieee1394/ieee1394_core.c | 1 | ||||
-rw-r--r-- | drivers/ieee1394/ieee1394_transactions.c | 29 | ||||
-rw-r--r-- | drivers/ieee1394/ieee1394_transactions.h | 2 | ||||
-rw-r--r-- | drivers/ieee1394/iso.h | 1 |
5 files changed, 34 insertions, 0 deletions
diff --git a/drivers/ieee1394/dma.h b/drivers/ieee1394/dma.h index 2727bcd24194..467373cab8e5 100644 --- a/drivers/ieee1394/dma.h +++ b/drivers/ieee1394/dma.h | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <asm/types.h> | 13 | #include <asm/types.h> |
14 | 14 | ||
15 | struct file; | ||
15 | struct pci_dev; | 16 | struct pci_dev; |
16 | struct scatterlist; | 17 | struct scatterlist; |
17 | struct vm_area_struct; | 18 | struct vm_area_struct; |
diff --git a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c index 2beb8d94f7bd..1028e725a27e 100644 --- a/drivers/ieee1394/ieee1394_core.c +++ b/drivers/ieee1394/ieee1394_core.c | |||
@@ -1314,6 +1314,7 @@ EXPORT_SYMBOL(hpsb_make_lock64packet); | |||
1314 | EXPORT_SYMBOL(hpsb_make_phypacket); | 1314 | EXPORT_SYMBOL(hpsb_make_phypacket); |
1315 | EXPORT_SYMBOL(hpsb_read); | 1315 | EXPORT_SYMBOL(hpsb_read); |
1316 | EXPORT_SYMBOL(hpsb_write); | 1316 | EXPORT_SYMBOL(hpsb_write); |
1317 | EXPORT_SYMBOL(hpsb_lock); | ||
1317 | EXPORT_SYMBOL(hpsb_packet_success); | 1318 | EXPORT_SYMBOL(hpsb_packet_success); |
1318 | 1319 | ||
1319 | /** highlevel.c **/ | 1320 | /** highlevel.c **/ |
diff --git a/drivers/ieee1394/ieee1394_transactions.c b/drivers/ieee1394/ieee1394_transactions.c index 10c3d9f8c038..24021d2f0a75 100644 --- a/drivers/ieee1394/ieee1394_transactions.c +++ b/drivers/ieee1394/ieee1394_transactions.c | |||
@@ -570,3 +570,32 @@ int hpsb_write(struct hpsb_host *host, nodeid_t node, unsigned int generation, | |||
570 | 570 | ||
571 | return retval; | 571 | return retval; |
572 | } | 572 | } |
573 | |||
574 | int hpsb_lock(struct hpsb_host *host, nodeid_t node, unsigned int generation, | ||
575 | u64 addr, int extcode, quadlet_t *data, quadlet_t arg) | ||
576 | { | ||
577 | struct hpsb_packet *packet; | ||
578 | int retval = 0; | ||
579 | |||
580 | BUG_ON(in_interrupt()); | ||
581 | |||
582 | packet = hpsb_make_lockpacket(host, node, addr, extcode, data, arg); | ||
583 | if (!packet) | ||
584 | return -ENOMEM; | ||
585 | |||
586 | packet->generation = generation; | ||
587 | retval = hpsb_send_packet_and_wait(packet); | ||
588 | if (retval < 0) | ||
589 | goto hpsb_lock_fail; | ||
590 | |||
591 | retval = hpsb_packet_success(packet); | ||
592 | |||
593 | if (retval == 0) | ||
594 | *data = packet->data[0]; | ||
595 | |||
596 | hpsb_lock_fail: | ||
597 | hpsb_free_tlabel(packet); | ||
598 | hpsb_free_packet(packet); | ||
599 | |||
600 | return retval; | ||
601 | } | ||
diff --git a/drivers/ieee1394/ieee1394_transactions.h b/drivers/ieee1394/ieee1394_transactions.h index d2d5bc3546d7..20b693be14b2 100644 --- a/drivers/ieee1394/ieee1394_transactions.h +++ b/drivers/ieee1394/ieee1394_transactions.h | |||
@@ -30,6 +30,8 @@ int hpsb_read(struct hpsb_host *host, nodeid_t node, unsigned int generation, | |||
30 | u64 addr, quadlet_t *buffer, size_t length); | 30 | u64 addr, quadlet_t *buffer, size_t length); |
31 | int hpsb_write(struct hpsb_host *host, nodeid_t node, unsigned int generation, | 31 | int hpsb_write(struct hpsb_host *host, nodeid_t node, unsigned int generation, |
32 | u64 addr, quadlet_t *buffer, size_t length); | 32 | u64 addr, quadlet_t *buffer, size_t length); |
33 | int hpsb_lock(struct hpsb_host *host, nodeid_t node, unsigned int generation, | ||
34 | u64 addr, int extcode, quadlet_t *data, quadlet_t arg); | ||
33 | 35 | ||
34 | #ifdef HPSB_DEBUG_TLABELS | 36 | #ifdef HPSB_DEBUG_TLABELS |
35 | extern spinlock_t hpsb_tlabel_lock; | 37 | extern spinlock_t hpsb_tlabel_lock; |
diff --git a/drivers/ieee1394/iso.h b/drivers/ieee1394/iso.h index b5de5f21ef78..c2089c093aa7 100644 --- a/drivers/ieee1394/iso.h +++ b/drivers/ieee1394/iso.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #define IEEE1394_ISO_H | 13 | #define IEEE1394_ISO_H |
14 | 14 | ||
15 | #include <linux/spinlock_types.h> | 15 | #include <linux/spinlock_types.h> |
16 | #include <linux/wait.h> | ||
16 | #include <asm/atomic.h> | 17 | #include <asm/atomic.h> |
17 | #include <asm/types.h> | 18 | #include <asm/types.h> |
18 | 19 | ||