Skip to content

Commit

Permalink
Merge branch 'sbp-target-merge' of git://git.kernel.org/pub/scm/linux…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
Linus Torvalds committed May 23, 2012
2 parents 0bd3fbd + a511ce3 commit 2c13bc0
Show file tree
Hide file tree
Showing 11 changed files with 2,920 additions and 15 deletions.
9 changes: 9 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -2776,6 +2776,15 @@ T: git git://git.alsa-project.org/alsa-kernel.git
S: Maintained
F: sound/firewire/

FIREWIRE SBP-2 TARGET
M: Chris Boot <bootc@bootc.net>
L: linux-scsi@vger.kernel.org
L: target-devel@vger.kernel.org
L: linux1394-devel@lists.sourceforge.net
T: git git://git.kernel.org/pub/scm/linux/kernel/git/nab/lio-core-2.6.git master
S: Maintained
F: drivers/target/sbp/

FIREWIRE SUBSYSTEM
M: Stefan Richter <stefanr@s5r6.in-berlin.de>
L: linux1394-devel@lists.sourceforge.net
Expand Down
1 change: 1 addition & 0 deletions drivers/firewire/core-card.c
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,7 @@ void fw_card_release(struct kref *kref)

complete(&card->done);
}
EXPORT_SYMBOL_GPL(fw_card_release);

void fw_core_remove_card(struct fw_card *card)
{
Expand Down
9 changes: 9 additions & 0 deletions drivers/firewire/core-transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,15 @@ void fw_send_response(struct fw_card *card,
}
EXPORT_SYMBOL(fw_send_response);

/**
* fw_get_request_speed() - returns speed at which the @request was received
*/
int fw_get_request_speed(struct fw_request *request)
{
return request->response.speed;
}
EXPORT_SYMBOL(fw_get_request_speed);

static void handle_exclusive_region_request(struct fw_card *card,
struct fw_packet *p,
struct fw_request *request,
Expand Down
15 changes: 0 additions & 15 deletions drivers/firewire/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,21 +120,6 @@ int fw_compute_block_crc(__be32 *block);
void fw_schedule_bus_reset(struct fw_card *card, bool delayed, bool short_reset);
void fw_schedule_bm_work(struct fw_card *card, unsigned long delay);

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);
}


/* -cdev */

extern const struct file_operations fw_device_ops;
Expand Down
1 change: 1 addition & 0 deletions drivers/target/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ config TCM_PSCSI
source "drivers/target/loopback/Kconfig"
source "drivers/target/tcm_fc/Kconfig"
source "drivers/target/iscsi/Kconfig"
source "drivers/target/sbp/Kconfig"

endif
1 change: 1 addition & 0 deletions drivers/target/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ obj-$(CONFIG_TCM_PSCSI) += target_core_pscsi.o
obj-$(CONFIG_LOOPBACK_TARGET) += loopback/
obj-$(CONFIG_TCM_FC) += tcm_fc/
obj-$(CONFIG_ISCSI_TARGET) += iscsi/
obj-$(CONFIG_SBP_TARGET) += sbp/
11 changes: 11 additions & 0 deletions drivers/target/sbp/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
config SBP_TARGET
tristate "FireWire SBP-2 fabric module"
depends on FIREWIRE && EXPERIMENTAL
help
Say Y or M here to enable SCSI target functionality over FireWire.
This enables you to expose SCSI devices to other nodes on the FireWire
bus, for example hard disks. Similar to FireWire Target Disk mode on
many Apple computers.

To compile this driver as a module, say M here: The module will be
called sbp-target.
1 change: 1 addition & 0 deletions drivers/target/sbp/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
obj-$(CONFIG_SBP_TARGET) += sbp_target.o
Loading

0 comments on commit 2c13bc0

Please sign in to comment.