aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire/core-transaction.c
diff options
context:
space:
mode:
authorJay Fenlason <fenlason@redhat.com>2010-05-18 10:57:33 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2010-06-20 17:11:56 -0400
commitc82f91f2663e79b150afd896ec72e798ba4e243d (patch)
tree12555e4299cb8cb7e958ff7576b6a5be2b781e0d /drivers/firewire/core-transaction.c
parent604f45167824e18ad5766e51ecf1d4d65f15118d (diff)
firewire: expose extended tcode of incoming lock requests to (userspace) drivers
When a remote device does a LOCK_REQUEST, the core does not pass the extended tcode to userspace. This patch makes it use the juju-specific tcodes listed in firewire-constants.h for incoming requests. Signed-off-by: Jay Fenlason <fenlason@redhat.com> This matches how tcode in the API for outbound requests is treated. Affects kernelspace and userspace drivers alike, but at the moment there are no kernespace drivers that receive lock requests. Split out from a combo patch, slightly reordered, changelog reworded. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire/core-transaction.c')
-rw-r--r--drivers/firewire/core-transaction.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c
index 2f67c8d5ce91..fcb455c08200 100644
--- a/drivers/firewire/core-transaction.c
+++ b/drivers/firewire/core-transaction.c
@@ -780,9 +780,11 @@ static void handle_exclusive_region_request(struct fw_card *card,
780 unsigned long flags; 780 unsigned long flags;
781 int tcode, destination, source; 781 int tcode, destination, source;
782 782
783 tcode = HEADER_GET_TCODE(p->header[0]);
784 destination = HEADER_GET_DESTINATION(p->header[0]); 783 destination = HEADER_GET_DESTINATION(p->header[0]);
785 source = HEADER_GET_SOURCE(p->header[1]); 784 source = HEADER_GET_SOURCE(p->header[1]);
785 tcode = HEADER_GET_TCODE(p->header[0]);
786 if (tcode == TCODE_LOCK_REQUEST)
787 tcode = 0x10 + HEADER_GET_EXTENDED_TCODE(p->header[3]);
786 788
787 spin_lock_irqsave(&address_handler_lock, flags); 789 spin_lock_irqsave(&address_handler_lock, flags);
788 handler = lookup_enclosing_address_handler(&address_handler_list, 790 handler = lookup_enclosing_address_handler(&address_handler_list,