diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-23 16:52:27 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-23 16:52:27 -0700 |
commit | 2c13bc0f8f0d3e13b42be70bf74fec8e56b58324 (patch) | |
tree | 92d629d732b5633baeddb9dd51d9e53334da254d /include | |
parent | 0bd3fbd4abeafa19ae0302d25194468b022d1a56 (diff) | |
parent | a511ce3397803558a3591e55423f3ae6aa28c9db (diff) | |
download | linux-2c13bc0f8f0d3e13b42be70bf74fec8e56b58324.tar.bz2 |
Merge branch 'sbp-target-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull sbp-2 (firewire) target mode support from Nicholas Bellinger:
"The FireWire SBP-2 Target is a driver for using an IEEE-1394
connection as a SCSI transport. This module uses the SCSI Target
framework to expose LUNs to other machines attached to a FireWire bus,
in effect acting as a FireWire hard disk similar to FireWire Target
Disk mode on many Apple computers.
Also included are the two drivers/firewire/ patches required by
sbp-target to access fw_request fabric speed needed for mgt_agent
TCODE_WRITE_BLOCK_REQUEST ops, and exporting fw_card kref logic used
when creating/destroying active session references to individual
endpoints.
A credit goes to Chris in being able to get this code up and running
so quickly w/o any target core changes, and special thanks goes out to
Stefan Richter + Clemens Ladisch + Andy Grover for their help in
getting this driver ready for mainline. Also, one of Chris's goals
was to be able to connect sbp-target to a PowerPC based MacOS-X based
client, that he accomplished along the way in this obligatory
screenshot:
http://linux-iscsi.org/wiki/File:Linux-fireware-target-bootc-macosx.png
Great work Chris + linux-1394 team !!"
Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* 'sbp-target-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
sbp-target: Initial merge of firewire/ieee-1394 target mode support
firewire: Move fw_card kref functions into linux/firewire.h
firewire: Add function to get speed from opaque struct fw_request
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/firewire.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index cdc9b719e9c7..e83c24af358a 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h @@ -135,6 +135,20 @@ struct fw_card { __be32 maint_utility_register; }; +static inline struct fw_card *fw_card_get(struct fw_card *card) +{ + kref_get(&card->kref); + + return card; +} + +void fw_card_release(struct kref *kref); + +static inline void fw_card_put(struct fw_card *card) +{ + kref_put(&card->kref, fw_card_release); +} + struct fw_attribute_group { struct attribute_group *groups[2]; struct attribute_group group; @@ -325,6 +339,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, |