diff options
-rw-r--r-- | Documentation/debugging-via-ohci1394.txt | 8 | ||||
-rw-r--r-- | MAINTAINERS | 1 | ||||
-rw-r--r-- | drivers/firewire/sbp2.c | 39 |
3 files changed, 24 insertions, 24 deletions
diff --git a/Documentation/debugging-via-ohci1394.txt b/Documentation/debugging-via-ohci1394.txt index 59a91e5c6909..611f5a5499b1 100644 --- a/Documentation/debugging-via-ohci1394.txt +++ b/Documentation/debugging-via-ohci1394.txt | |||
@@ -64,14 +64,14 @@ be used to view the printk buffer of a remote machine, even with live update. | |||
64 | 64 | ||
65 | Bernhard Kaindl enhanced firescope to support accessing 64-bit machines | 65 | Bernhard Kaindl enhanced firescope to support accessing 64-bit machines |
66 | from 32-bit firescope and vice versa: | 66 | from 32-bit firescope and vice versa: |
67 | - ftp://ftp.suse.de/private/bk/firewire/tools/firescope-0.2.2.tar.bz2 | 67 | - http://halobates.de/firewire/firescope-0.2.2.tar.bz2 |
68 | 68 | ||
69 | and he implemented fast system dump (alpha version - read README.txt): | 69 | and he implemented fast system dump (alpha version - read README.txt): |
70 | - ftp://ftp.suse.de/private/bk/firewire/tools/firedump-0.1.tar.bz2 | 70 | - http://halobates.de/firewire/firedump-0.1.tar.bz2 |
71 | 71 | ||
72 | There is also a gdb proxy for firewire which allows to use gdb to access | 72 | There is also a gdb proxy for firewire which allows to use gdb to access |
73 | data which can be referenced from symbols found by gdb in vmlinux: | 73 | data which can be referenced from symbols found by gdb in vmlinux: |
74 | - ftp://ftp.suse.de/private/bk/firewire/tools/fireproxy-0.33.tar.bz2 | 74 | - http://halobates.de/firewire/fireproxy-0.33.tar.bz2 |
75 | 75 | ||
76 | The latest version of this gdb proxy (fireproxy-0.34) can communicate (not | 76 | The latest version of this gdb proxy (fireproxy-0.34) can communicate (not |
77 | yet stable) with kgdb over an memory-based communication module (kgdbom). | 77 | yet stable) with kgdb over an memory-based communication module (kgdbom). |
@@ -178,7 +178,7 @@ Step-by-step instructions for using firescope with early OHCI initialization: | |||
178 | 178 | ||
179 | Notes | 179 | Notes |
180 | ----- | 180 | ----- |
181 | Documentation and specifications: ftp://ftp.suse.de/private/bk/firewire/docs | 181 | Documentation and specifications: http://halobates.de/firewire/ |
182 | 182 | ||
183 | FireWire is a trademark of Apple Inc. - for more information please refer to: | 183 | FireWire is a trademark of Apple Inc. - for more information please refer to: |
184 | http://en.wikipedia.org/wiki/FireWire | 184 | http://en.wikipedia.org/wiki/FireWire |
diff --git a/MAINTAINERS b/MAINTAINERS index 6b057778477d..d5eb8c13ef05 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -2615,6 +2615,7 @@ L: linux1394-devel@lists.sourceforge.net | |||
2615 | W: http://www.linux1394.org/ | 2615 | W: http://www.linux1394.org/ |
2616 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git | 2616 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git |
2617 | S: Maintained | 2617 | S: Maintained |
2618 | F: Documentation/debugging-via-ohci1394.txt | ||
2618 | F: drivers/ieee1394/ | 2619 | F: drivers/ieee1394/ |
2619 | 2620 | ||
2620 | IEEE 1394 RAW I/O DRIVER | 2621 | IEEE 1394 RAW I/O DRIVER |
diff --git a/drivers/firewire/sbp2.c b/drivers/firewire/sbp2.c index 50f0176de615..98dbbda3ad41 100644 --- a/drivers/firewire/sbp2.c +++ b/drivers/firewire/sbp2.c | |||
@@ -188,14 +188,7 @@ static struct fw_device *target_device(struct sbp2_target *tgt) | |||
188 | /* Impossible login_id, to detect logout attempt before successful login */ | 188 | /* Impossible login_id, to detect logout attempt before successful login */ |
189 | #define INVALID_LOGIN_ID 0x10000 | 189 | #define INVALID_LOGIN_ID 0x10000 |
190 | 190 | ||
191 | /* | 191 | #define SBP2_ORB_TIMEOUT 2000U /* Timeout in ms */ |
192 | * Per section 7.4.8 of the SBP-2 spec, a mgt_ORB_timeout value can be | ||
193 | * provided in the config rom. Most devices do provide a value, which | ||
194 | * we'll use for login management orbs, but with some sane limits. | ||
195 | */ | ||
196 | #define SBP2_MIN_LOGIN_ORB_TIMEOUT 5000U /* Timeout in ms */ | ||
197 | #define SBP2_MAX_LOGIN_ORB_TIMEOUT 40000U /* Timeout in ms */ | ||
198 | #define SBP2_ORB_TIMEOUT 2000U /* Timeout in ms */ | ||
199 | #define SBP2_ORB_NULL 0x80000000 | 192 | #define SBP2_ORB_NULL 0x80000000 |
200 | #define SBP2_RETRY_LIMIT 0xf /* 15 retries */ | 193 | #define SBP2_RETRY_LIMIT 0xf /* 15 retries */ |
201 | #define SBP2_CYCLE_LIMIT (0xc8 << 12) /* 200 125us cycles */ | 194 | #define SBP2_CYCLE_LIMIT (0xc8 << 12) /* 200 125us cycles */ |
@@ -1034,7 +1027,6 @@ static int sbp2_scan_unit_dir(struct sbp2_target *tgt, u32 *directory, | |||
1034 | { | 1027 | { |
1035 | struct fw_csr_iterator ci; | 1028 | struct fw_csr_iterator ci; |
1036 | int key, value; | 1029 | int key, value; |
1037 | unsigned int timeout; | ||
1038 | 1030 | ||
1039 | fw_csr_iterator_init(&ci, directory); | 1031 | fw_csr_iterator_init(&ci, directory); |
1040 | while (fw_csr_iterator_next(&ci, &key, &value)) { | 1032 | while (fw_csr_iterator_next(&ci, &key, &value)) { |
@@ -1059,17 +1051,7 @@ static int sbp2_scan_unit_dir(struct sbp2_target *tgt, u32 *directory, | |||
1059 | 1051 | ||
1060 | case SBP2_CSR_UNIT_CHARACTERISTICS: | 1052 | case SBP2_CSR_UNIT_CHARACTERISTICS: |
1061 | /* the timeout value is stored in 500ms units */ | 1053 | /* the timeout value is stored in 500ms units */ |
1062 | timeout = ((unsigned int) value >> 8 & 0xff) * 500; | 1054 | tgt->mgt_orb_timeout = (value >> 8 & 0xff) * 500; |
1063 | timeout = max(timeout, SBP2_MIN_LOGIN_ORB_TIMEOUT); | ||
1064 | tgt->mgt_orb_timeout = | ||
1065 | min(timeout, SBP2_MAX_LOGIN_ORB_TIMEOUT); | ||
1066 | |||
1067 | if (timeout > tgt->mgt_orb_timeout) | ||
1068 | fw_notify("%s: config rom contains %ds " | ||
1069 | "management ORB timeout, limiting " | ||
1070 | "to %ds\n", tgt->bus_id, | ||
1071 | timeout / 1000, | ||
1072 | tgt->mgt_orb_timeout / 1000); | ||
1073 | break; | 1055 | break; |
1074 | 1056 | ||
1075 | case SBP2_CSR_LOGICAL_UNIT_NUMBER: | 1057 | case SBP2_CSR_LOGICAL_UNIT_NUMBER: |
@@ -1087,6 +1069,22 @@ static int sbp2_scan_unit_dir(struct sbp2_target *tgt, u32 *directory, | |||
1087 | return 0; | 1069 | return 0; |
1088 | } | 1070 | } |
1089 | 1071 | ||
1072 | /* | ||
1073 | * Per section 7.4.8 of the SBP-2 spec, a mgt_ORB_timeout value can be | ||
1074 | * provided in the config rom. Most devices do provide a value, which | ||
1075 | * we'll use for login management orbs, but with some sane limits. | ||
1076 | */ | ||
1077 | static void sbp2_clamp_management_orb_timeout(struct sbp2_target *tgt) | ||
1078 | { | ||
1079 | unsigned int timeout = tgt->mgt_orb_timeout; | ||
1080 | |||
1081 | if (timeout > 40000) | ||
1082 | fw_notify("%s: %ds mgt_ORB_timeout limited to 40s\n", | ||
1083 | tgt->bus_id, timeout / 1000); | ||
1084 | |||
1085 | tgt->mgt_orb_timeout = clamp_val(timeout, 5000, 40000); | ||
1086 | } | ||
1087 | |||
1090 | static void sbp2_init_workarounds(struct sbp2_target *tgt, u32 model, | 1088 | static void sbp2_init_workarounds(struct sbp2_target *tgt, u32 model, |
1091 | u32 firmware_revision) | 1089 | u32 firmware_revision) |
1092 | { | 1090 | { |
@@ -1171,6 +1169,7 @@ static int sbp2_probe(struct device *dev) | |||
1171 | &firmware_revision) < 0) | 1169 | &firmware_revision) < 0) |
1172 | goto fail_tgt_put; | 1170 | goto fail_tgt_put; |
1173 | 1171 | ||
1172 | sbp2_clamp_management_orb_timeout(tgt); | ||
1174 | sbp2_init_workarounds(tgt, model, firmware_revision); | 1173 | sbp2_init_workarounds(tgt, model, firmware_revision); |
1175 | 1174 | ||
1176 | /* | 1175 | /* |