firewire: Add function to get speed from opaque struct fw_request
authorChris Boot <bootc@bootc.net>
Thu, 16 Feb 2012 09:16:35 +0000 (09:16 +0000)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 9 May 2012 22:25:17 +0000 (15:25 -0700)
commit253d92371ca29a470b2bbf91fb9824a9fef05657
tree69c778e3f21a88ce327cfa3d67e3a352074e48dc
parentd5dc28eb92f2a2305a02cb3a5f1ed36542d47512
firewire: Add function to get speed from opaque struct fw_request

Sometimes it's useful to know the FireWire speed of the request that has
just come in to a fw_address_handler callback. As struct fw_request is
opaque we can't peek inside to get the speed out of the struct fw_packet
that's just inside. For example, the SBP-2 spec says:

"The speed at which the block write request to the MANAGEMENT_AGENT
register is received shall determine the speed used by the target for
all subsequent requests to read the initiator’s configuration ROM, fetch
ORB’s from initiator memory or store status at the initiator’s
status_FIFO. Command block ORB’s separately specify the speed for
requests addressed to the data buffer or page table."

[ ANSI T10/1155D Revision 4 page 53/54 ]

Signed-off-by: Chris Boot <bootc@bootc.net>
Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/firewire/core-transaction.c
include/linux/firewire.h