diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-06-17 17:55:41 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-07-09 18:07:45 -0400 |
commit | 5cd54c94b0ba45033c126237d3d70c6e7ab52c3f (patch) | |
tree | accad6fabda5c58bd7dc728470f0f56edcba6a3f /drivers/firewire/fw-sbp2.c | |
parent | 79352e9f94cff4078f2ffefac4a41b7f14046fb6 (diff) |
firewire: fw-sbp2: implement nonexclusive login
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Kristian Høgsberg <krh@redhat.com>
Diffstat (limited to 'drivers/firewire/fw-sbp2.c')
-rw-r--r-- | drivers/firewire/fw-sbp2.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c index 846aad8666f5..2c39f19a9ee1 100644 --- a/drivers/firewire/fw-sbp2.c +++ b/drivers/firewire/fw-sbp2.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/moduleparam.h> | ||
33 | #include <linux/mod_devicetable.h> | 34 | #include <linux/mod_devicetable.h> |
34 | #include <linux/device.h> | 35 | #include <linux/device.h> |
35 | #include <linux/scatterlist.h> | 36 | #include <linux/scatterlist.h> |
@@ -47,6 +48,18 @@ | |||
47 | #include "fw-topology.h" | 48 | #include "fw-topology.h" |
48 | #include "fw-device.h" | 49 | #include "fw-device.h" |
49 | 50 | ||
51 | /* | ||
52 | * So far only bridges from Oxford Semiconductor are known to support | ||
53 | * concurrent logins. Depending on firmware, four or two concurrent logins | ||
54 | * are possible on OXFW911 and newer Oxsemi bridges. | ||
55 | * | ||
56 | * Concurrent logins are useful together with cluster filesystems. | ||
57 | */ | ||
58 | static int sbp2_param_exclusive_login = 1; | ||
59 | module_param_named(exclusive_login, sbp2_param_exclusive_login, bool, 0644); | ||
60 | MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device " | ||
61 | "(default = Y, use N for concurrent initiators)"); | ||
62 | |||
50 | /* I don't know why the SCSI stack doesn't define something like this... */ | 63 | /* I don't know why the SCSI stack doesn't define something like this... */ |
51 | typedef void (*scsi_done_fn_t)(struct scsi_cmnd *); | 64 | typedef void (*scsi_done_fn_t)(struct scsi_cmnd *); |
52 | 65 | ||
@@ -155,7 +168,7 @@ struct sbp2_orb { | |||
155 | #define MANAGEMENT_ORB_LUN(v) ((v)) | 168 | #define MANAGEMENT_ORB_LUN(v) ((v)) |
156 | #define MANAGEMENT_ORB_FUNCTION(v) ((v) << 16) | 169 | #define MANAGEMENT_ORB_FUNCTION(v) ((v) << 16) |
157 | #define MANAGEMENT_ORB_RECONNECT(v) ((v) << 20) | 170 | #define MANAGEMENT_ORB_RECONNECT(v) ((v) << 20) |
158 | #define MANAGEMENT_ORB_EXCLUSIVE ((1) << 28) | 171 | #define MANAGEMENT_ORB_EXCLUSIVE(v) ((v) ? 1 << 28 : 0) |
159 | #define MANAGEMENT_ORB_REQUEST_FORMAT(v) ((v) << 29) | 172 | #define MANAGEMENT_ORB_REQUEST_FORMAT(v) ((v) << 29) |
160 | #define MANAGEMENT_ORB_NOTIFY ((1) << 31) | 173 | #define MANAGEMENT_ORB_NOTIFY ((1) << 31) |
161 | 174 | ||
@@ -431,14 +444,9 @@ sbp2_send_management_orb(struct fw_unit *unit, int node_id, int generation, | |||
431 | orb->request.status_fifo.high = sd->address_handler.offset >> 32; | 444 | orb->request.status_fifo.high = sd->address_handler.offset >> 32; |
432 | orb->request.status_fifo.low = sd->address_handler.offset; | 445 | orb->request.status_fifo.low = sd->address_handler.offset; |
433 | 446 | ||
434 | /* | ||
435 | * FIXME: Yeah, ok this isn't elegant, we hardwire exclusive | ||
436 | * login and 1 second reconnect time. The reconnect setting | ||
437 | * is probably fine, but the exclusive login should be an option. | ||
438 | */ | ||
439 | if (function == SBP2_LOGIN_REQUEST) { | 447 | if (function == SBP2_LOGIN_REQUEST) { |
440 | orb->request.misc |= | 448 | orb->request.misc |= |
441 | MANAGEMENT_ORB_EXCLUSIVE | | 449 | MANAGEMENT_ORB_EXCLUSIVE(sbp2_param_exclusive_login) | |
442 | MANAGEMENT_ORB_RECONNECT(0); | 450 | MANAGEMENT_ORB_RECONNECT(0); |
443 | } | 451 | } |
444 | 452 | ||