From 253d92371ca29a470b2bbf91fb9824a9fef05657 Mon Sep 17 00:00:00 2001 From: Chris Boot Date: Thu, 16 Feb 2012 09:16:35 +0000 Subject: firewire: Add function to get speed from opaque struct fw_request MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Acked-by: Stefan Richter Cc: Clemens Ladisch Signed-off-by: Nicholas Bellinger --- include/linux/firewire.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux/firewire.h') diff --git a/include/linux/firewire.h b/include/linux/firewire.h index cdc9b719e9c..46831303b0b 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h @@ -325,6 +325,7 @@ int fw_core_add_address_handler(struct fw_address_handler *handler, void fw_core_remove_address_handler(struct fw_address_handler *handler); void fw_send_response(struct fw_card *card, struct fw_request *request, int rcode); +int fw_get_request_speed(struct fw_request *request); void fw_send_request(struct fw_card *card, struct fw_transaction *t, int tcode, int destination_id, int generation, int speed, unsigned long long offset, void *payload, size_t length, -- cgit v1.2.3-70-g09d2