All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: linux1394-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 6/8] firewire: expose extended tcode of incoming lock requests to (userspace) drivers
Date: Sun, 20 Jun 2010 22:53:27 +0200 (CEST)	[thread overview]
Message-ID: <tkrat.8ca8144470b21311@s5r6.in-berlin.de> (raw)
In-Reply-To: <tkrat.ba0692c55cd50593@s5r6.in-berlin.de>

Date: Tue, 18 May 2010 10:57:33 -0400
From: Jay Fenlason <fenlason@redhat.com>

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>
---
 drivers/firewire/core-transaction.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: b/drivers/firewire/core-transaction.c
===================================================================
--- a/drivers/firewire/core-transaction.c
+++ b/drivers/firewire/core-transaction.c
@@ -780,9 +780,11 @@ static void handle_exclusive_region_requ
 	unsigned long flags;
 	int tcode, destination, source;
 
-	tcode       = HEADER_GET_TCODE(p->header[0]);
 	destination = HEADER_GET_DESTINATION(p->header[0]);
 	source      = HEADER_GET_SOURCE(p->header[1]);
+	tcode       = HEADER_GET_TCODE(p->header[0]);
+	if (tcode == TCODE_LOCK_REQUEST)
+		tcode = 0x10 + HEADER_GET_EXTENDED_TCODE(p->header[3]);
 
 	spin_lock_irqsave(&address_handler_lock, flags);
 	handler = lookup_enclosing_address_handler(&address_handler_list,

-- 
Stefan Richter
-=====-==-=- -==- =-=--
http://arcgraph.de/sr/


  parent reply	other threads:[~2010-06-20 20:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-20 20:49 [PATCH 0/8] firewire: cdev ABI updates Stefan Richter
2010-06-20 20:50 ` [PATCH 1/8] firewire: remove an unused function argument Stefan Richter
2010-06-20 20:51 ` [PATCH 2/8] firewire: cdev: fix race in iso context creation Stefan Richter
2010-06-20 20:51 ` [PATCH 3/8] firewire: cdev: fix responses to nodes at different card Stefan Richter
2010-06-20 20:52 ` [PATCH 4/8] firewire: cdev: count references of cards during inbound transactions Stefan Richter
2010-06-20 20:52 ` [PATCH 5/8] firewire: cdev: freeze FW_CDEV_VERSION due to libraw1394 bug Stefan Richter
2010-06-20 20:53 ` Stefan Richter [this message]
2010-06-20 20:53 ` [PATCH 7/8] firewire: cdev: fix ABI for FCP and address range mapping, add fw_cdev_event_request2 Stefan Richter
2010-06-20 20:54 ` [PATCH 8/8] firewire: cdev: extend fw_cdev_event_iso_interrupt documentation Stefan Richter
2010-06-20 21:48 ` [PATCH 0/8] firewire: cdev ABI updates Stefan Richter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tkrat.8ca8144470b21311@s5r6.in-berlin.de \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.