diff options
35 files changed, 296 insertions, 219 deletions
diff --git a/Documentation/scsi/aacraid.txt b/Documentation/scsi/aacraid.txt index 3367130e64f6..dc8e44fc650f 100644 --- a/Documentation/scsi/aacraid.txt +++ b/Documentation/scsi/aacraid.txt | |||
@@ -11,43 +11,42 @@ the original). | |||
11 | Supported Cards/Chipsets | 11 | Supported Cards/Chipsets |
12 | ------------------------- | 12 | ------------------------- |
13 | PCI ID (pci.ids) OEM Product | 13 | PCI ID (pci.ids) OEM Product |
14 | 9005:0283:9005:0283 Adaptec Catapult (3210S with arc firmware) | ||
15 | 9005:0284:9005:0284 Adaptec Tomcat (3410S with arc firmware) | ||
16 | 9005:0285:9005:0285 Adaptec 2200S (Vulcan) | 14 | 9005:0285:9005:0285 Adaptec 2200S (Vulcan) |
17 | 9005:0285:9005:0286 Adaptec 2120S (Crusader) | 15 | 9005:0285:9005:0286 Adaptec 2120S (Crusader) |
18 | 9005:0285:9005:0287 Adaptec 2200S (Vulcan-2m) | 16 | 9005:0285:9005:0287 Adaptec 2200S (Vulcan-2m) |
19 | 9005:0285:9005:0288 Adaptec 3230S (Harrier) | 17 | 9005:0285:9005:0288 Adaptec 3230S (Harrier) |
20 | 9005:0285:9005:0289 Adaptec 3240S (Tornado) | 18 | 9005:0285:9005:0289 Adaptec 3240S (Tornado) |
21 | 9005:0285:9005:028a Adaptec 2020ZCR (Skyhawk) | 19 | 9005:0285:9005:028a Adaptec 2020ZCR (Skyhawk) |
22 | 9005:0285:9005:028b Adaptec 2025ZCR (Terminator) | 20 | 9005:0285:9005:028b Adaptec 2025ZCR (Terminator) |
23 | 9005:0286:9005:028c Adaptec 2230S (Lancer) | 21 | 9005:0286:9005:028c Adaptec 2230S (Lancer) |
24 | 9005:0286:9005:028c Adaptec 2230SLP (Lancer) | 22 | 9005:0286:9005:028c Adaptec 2230SLP (Lancer) |
25 | 9005:0286:9005:028d Adaptec 2130S (Lancer) | 23 | 9005:0286:9005:028d Adaptec 2130S (Lancer) |
26 | 9005:0285:9005:028e Adaptec 2020SA (Skyhawk) | 24 | 9005:0285:9005:028e Adaptec 2020SA (Skyhawk) |
27 | 9005:0285:9005:028f Adaptec 2025SA (Terminator) | 25 | 9005:0285:9005:028f Adaptec 2025SA (Terminator) |
28 | 9005:0285:9005:0290 Adaptec 2410SA (Jaguar) | 26 | 9005:0285:9005:0290 Adaptec 2410SA (Jaguar) |
29 | 9005:0285:103c:3227 Adaptec 2610SA (Bearcat HP release) | 27 | 9005:0285:103c:3227 Adaptec 2610SA (Bearcat HP release) |
30 | 9005:0285:9005:0293 Adaptec 21610SA (Corsair-16) | 28 | 9005:0285:9005:0293 Adaptec 21610SA (Corsair-16) |
31 | 9005:0285:9005:0296 Adaptec 2240S (SabreExpress) | 29 | 9005:0285:9005:0296 Adaptec 2240S (SabreExpress) |
32 | 9005:0285:9005:0292 Adaptec 2810SA (Corsair-8) | 30 | 9005:0285:9005:0292 Adaptec 2810SA (Corsair-8) |
33 | 9005:0285:9005:0294 Adaptec Prowler | 31 | 9005:0285:9005:0297 Adaptec 4005 (AvonPark) |
34 | 9005:0285:9005:0297 Adaptec 4005SAS (AvonPark) | 32 | 9005:0285:9005:0298 Adaptec 4000 (BlackBird) |
35 | 9005:0285:9005:0298 Adaptec 4000SAS (BlackBird) | ||
36 | 9005:0285:9005:0299 Adaptec 4800SAS (Marauder-X) | 33 | 9005:0285:9005:0299 Adaptec 4800SAS (Marauder-X) |
37 | 9005:0285:9005:029a Adaptec 4805SAS (Marauder-E) | 34 | 9005:0285:9005:029a Adaptec 4805SAS (Marauder-E) |
38 | 9005:0286:9005:029b Adaptec 2820SA (Intruder) | 35 | 9005:0286:9005:029b Adaptec 2820SA (Intruder) |
39 | 9005:0286:9005:029c Adaptec 2620SA (Intruder) | 36 | 9005:0286:9005:029c Adaptec 2620SA (Intruder) |
40 | 9005:0286:9005:029d Adaptec 2420SA (Intruder HP release) | 37 | 9005:0286:9005:029d Adaptec 2420SA (Intruder HP release) |
41 | 9005:0286:9005:02a2 Adaptec 3800SAS (Hurricane44) | 38 | 9005:0286:9005:02ac Adaptec 1800 (Typhoon44) |
42 | 9005:0286:9005:02a7 Adaptec 3805SAS (Hurricane80) | 39 | 9005:0285:9005:02b5 Adaptec 5445 (Voodoo44) |
43 | 9005:0286:9005:02a8 Adaptec 3400SAS (Hurricane40) | 40 | 9005:0285:9005:02b6 Adaptec 5805 (Voodoo80) |
44 | 9005:0286:9005:02ac Adaptec 1800SAS (Typhoon44) | 41 | 9005:0285:9005:02b7 Adaptec 5085 (Voodoo08) |
45 | 9005:0286:9005:02b3 Adaptec 2400SAS (Hurricane40lm) | 42 | 9005:0285:9005:02bb Adaptec 3405 (Marauder40LP) |
46 | 9005:0285:9005:02b5 Adaptec ASR5800 (Voodoo44) | 43 | 9005:0285:9005:02bc Adaptec 3805 (Marauder80LP) |
47 | 9005:0285:9005:02b6 Adaptec ASR5805 (Voodoo80) | 44 | 9005:0285:9005:02c7 Adaptec 3085 (Marauder08ELP) |
48 | 9005:0285:9005:02b7 Adaptec ASR5808 (Voodoo08) | 45 | 9005:0285:9005:02bd Adaptec 31205 (Marauder120) |
46 | 9005:0285:9005:02be Adaptec 31605 (Marauder160) | ||
47 | 9005:0285:9005:02c3 Adaptec 51205 (Voodoo120) | ||
48 | 9005:0285:9005:02c4 Adaptec 51605 (Voodoo160) | ||
49 | 1011:0046:9005:0364 Adaptec 5400S (Mustang) | 49 | 1011:0046:9005:0364 Adaptec 5400S (Mustang) |
50 | 1011:0046:9005:0365 Adaptec 5400S (Mustang) | ||
51 | 9005:0287:9005:0800 Adaptec Themisto (Jupiter) | 50 | 9005:0287:9005:0800 Adaptec Themisto (Jupiter) |
52 | 9005:0200:9005:0200 Adaptec Themisto (Jupiter) | 51 | 9005:0200:9005:0200 Adaptec Themisto (Jupiter) |
53 | 9005:0286:9005:0800 Adaptec Callisto (Jupiter) | 52 | 9005:0286:9005:0800 Adaptec Callisto (Jupiter) |
@@ -68,21 +67,32 @@ Supported Cards/Chipsets | |||
68 | 9005:0285:17aa:0287 Legend S230 (Vulcan) | 67 | 9005:0285:17aa:0287 Legend S230 (Vulcan) |
69 | 9005:0285:9005:0290 IBM ServeRAID 7t (Jaguar) | 68 | 9005:0285:9005:0290 IBM ServeRAID 7t (Jaguar) |
70 | 9005:0285:1014:02F2 IBM ServeRAID 8i (AvonPark) | 69 | 9005:0285:1014:02F2 IBM ServeRAID 8i (AvonPark) |
71 | 9005:0285:1014:0312 IBM ServeRAID 8i (AvonParkLite) | ||
72 | 9005:0286:1014:9540 IBM ServeRAID 8k/8k-l4 (AuroraLite) | 70 | 9005:0286:1014:9540 IBM ServeRAID 8k/8k-l4 (AuroraLite) |
73 | 9005:0286:1014:9580 IBM ServeRAID 8k/8k-l8 (Aurora) | 71 | 9005:0286:1014:9580 IBM ServeRAID 8k/8k-l8 (Aurora) |
74 | 9005:0286:1014:034d IBM ServeRAID 8s (Hurricane) | 72 | 9005:0285:1014:034d IBM ServeRAID 8s (Marauder-E) |
75 | 9005:0286:9005:029e ICP ICP9024R0 (Lancer) | 73 | 9005:0286:9005:029e ICP ICP9024RO (Lancer) |
76 | 9005:0286:9005:029f ICP ICP9014R0 (Lancer) | 74 | 9005:0286:9005:029f ICP ICP9014RO (Lancer) |
77 | 9005:0286:9005:02a0 ICP ICP9047MA (Lancer) | 75 | 9005:0286:9005:02a0 ICP ICP9047MA (Lancer) |
78 | 9005:0286:9005:02a1 ICP ICP9087MA (Lancer) | 76 | 9005:0286:9005:02a1 ICP ICP9087MA (Lancer) |
79 | 9005:0286:9005:02a3 ICP ICP5445AU (Hurricane44) | 77 | 9005:0285:9005:02a4 ICP ICP9085LI (Marauder-X) |
80 | 9005:0286:9005:02a4 ICP ICP9085LI (Marauder-X) | 78 | 9005:0285:9005:02a5 ICP ICP5085BR (Marauder-E) |
81 | 9005:0286:9005:02a5 ICP ICP5085BR (Marauder-E) | ||
82 | 9005:0286:9005:02a6 ICP ICP9067MA (Intruder-6) | 79 | 9005:0286:9005:02a6 ICP ICP9067MA (Intruder-6) |
83 | 9005:0286:9005:02a9 ICP ICP5085AU (Hurricane80) | 80 | 9005:0285:9005:02b2 ICP (Voodoo 8 internal 8 external) |
84 | 9005:0286:9005:02aa ICP ICP5045AU (Hurricane40) | 81 | 9005:0285:9005:02b8 ICP ICP5445SL (Voodoo44) |
85 | 9005:0286:9005:02b4 ICP ICP5045AL (Hurricane40lm) | 82 | 9005:0285:9005:02b9 ICP ICP5085SL (Voodoo80) |
83 | 9005:0285:9005:02ba ICP ICP5805SL (Voodoo08) | ||
84 | 9005:0285:9005:02bf ICP ICP5045BL (Marauder40LP) | ||
85 | 9005:0285:9005:02c0 ICP ICP5085BL (Marauder80LP) | ||
86 | 9005:0285:9005:02c8 ICP ICP5805BL (Marauder08ELP) | ||
87 | 9005:0285:9005:02c1 ICP ICP5125BR (Marauder120) | ||
88 | 9005:0285:9005:02c2 ICP ICP5165BR (Marauder160) | ||
89 | 9005:0285:9005:02c5 ICP ICP5125SL (Voodoo120) | ||
90 | 9005:0285:9005:02c6 ICP ICP5165SL (Voodoo160) | ||
91 | 9005:0286:9005:02ab (Typhoon40) | ||
92 | 9005:0286:9005:02ad (Aurora ARK) | ||
93 | 9005:0286:9005:02ae (Aurora Lite ARK) | ||
94 | 9005:0285:9005:02b0 (Sunrise Lake ARK) | ||
95 | 9005:0285:9005:02b1 Adaptec (Voodoo 8 internal 8 external) | ||
86 | 96 | ||
87 | People | 97 | People |
88 | ------------------------- | 98 | ------------------------- |
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 6e068cf1049b..b3f28a03b6a9 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c | |||
@@ -5,7 +5,7 @@ | |||
5 | * For use with LSI Logic PCI chip/adapter(s) | 5 | * For use with LSI Logic PCI chip/adapter(s) |
6 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. | 6 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. |
7 | * | 7 | * |
8 | * Copyright (c) 1999-2005 LSI Logic Corporation | 8 | * Copyright (c) 1999-2007 LSI Logic Corporation |
9 | * (mailto:mpt_linux_developer@lsil.com) | 9 | * (mailto:mpt_linux_developer@lsil.com) |
10 | * | 10 | * |
11 | */ | 11 | */ |
@@ -73,6 +73,7 @@ | |||
73 | MODULE_AUTHOR(MODULEAUTHOR); | 73 | MODULE_AUTHOR(MODULEAUTHOR); |
74 | MODULE_DESCRIPTION(my_NAME); | 74 | MODULE_DESCRIPTION(my_NAME); |
75 | MODULE_LICENSE("GPL"); | 75 | MODULE_LICENSE("GPL"); |
76 | MODULE_VERSION(my_VERSION); | ||
76 | 77 | ||
77 | /* | 78 | /* |
78 | * cmd line parameters | 79 | * cmd line parameters |
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h index a4afad4ecab2..e316708f76bd 100644 --- a/drivers/message/fusion/mptbase.h +++ b/drivers/message/fusion/mptbase.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * LSIFC9xx/LSI409xx Fibre Channel | 5 | * LSIFC9xx/LSI409xx Fibre Channel |
6 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. | 6 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. |
7 | * | 7 | * |
8 | * Copyright (c) 1999-2005 LSI Logic Corporation | 8 | * Copyright (c) 1999-2007 LSI Logic Corporation |
9 | * (mailto:mpt_linux_developer@lsil.com) | 9 | * (mailto:mpt_linux_developer@lsil.com) |
10 | * | 10 | * |
11 | */ | 11 | */ |
@@ -72,11 +72,11 @@ | |||
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | #ifndef COPYRIGHT | 74 | #ifndef COPYRIGHT |
75 | #define COPYRIGHT "Copyright (c) 1999-2005 " MODULEAUTHOR | 75 | #define COPYRIGHT "Copyright (c) 1999-2007 " MODULEAUTHOR |
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | #define MPT_LINUX_VERSION_COMMON "3.04.02" | 78 | #define MPT_LINUX_VERSION_COMMON "3.04.03" |
79 | #define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.02" | 79 | #define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.03" |
80 | #define WHAT_MAGIC_STRING "@" "(" "#" ")" | 80 | #define WHAT_MAGIC_STRING "@" "(" "#" ")" |
81 | 81 | ||
82 | #define show_mptmod_ver(s,ver) \ | 82 | #define show_mptmod_ver(s,ver) \ |
@@ -1059,7 +1059,7 @@ extern int mpt_stm_index; /* needed by mptstm.c */ | |||
1059 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 1059 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
1060 | #endif /* } __KERNEL__ */ | 1060 | #endif /* } __KERNEL__ */ |
1061 | 1061 | ||
1062 | #if defined(__alpha__) || defined(__sparc_v9__) || defined(__ia64__) || defined(__x86_64__) | 1062 | #if defined(__alpha__) || defined(__sparc_v9__) || defined(__ia64__) || defined(__x86_64__) || defined(__powerpc__) |
1063 | #define CAST_U32_TO_PTR(x) ((void *)(u64)x) | 1063 | #define CAST_U32_TO_PTR(x) ((void *)(u64)x) |
1064 | #define CAST_PTR_TO_U32(x) ((u32)(u64)x) | 1064 | #define CAST_PTR_TO_U32(x) ((u32)(u64)x) |
1065 | #else | 1065 | #else |
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c index 30975ccd9947..504632da4347 100644 --- a/drivers/message/fusion/mptctl.c +++ b/drivers/message/fusion/mptctl.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * For use with LSI Logic PCI chip/adapters | 4 | * For use with LSI Logic PCI chip/adapters |
5 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. | 5 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. |
6 | * | 6 | * |
7 | * Copyright (c) 1999-2005 LSI Logic Corporation | 7 | * Copyright (c) 1999-2007 LSI Logic Corporation |
8 | * (mailto:mpt_linux_developer@lsil.com) | 8 | * (mailto:mpt_linux_developer@lsil.com) |
9 | * | 9 | * |
10 | */ | 10 | */ |
@@ -66,7 +66,7 @@ | |||
66 | #include <scsi/scsi_host.h> | 66 | #include <scsi/scsi_host.h> |
67 | #include <scsi/scsi_tcq.h> | 67 | #include <scsi/scsi_tcq.h> |
68 | 68 | ||
69 | #define COPYRIGHT "Copyright (c) 1999-2005 LSI Logic Corporation" | 69 | #define COPYRIGHT "Copyright (c) 1999-2007 LSI Logic Corporation" |
70 | #define MODULEAUTHOR "LSI Logic Corporation" | 70 | #define MODULEAUTHOR "LSI Logic Corporation" |
71 | #include "mptbase.h" | 71 | #include "mptbase.h" |
72 | #include "mptctl.h" | 72 | #include "mptctl.h" |
@@ -79,6 +79,7 @@ | |||
79 | MODULE_AUTHOR(MODULEAUTHOR); | 79 | MODULE_AUTHOR(MODULEAUTHOR); |
80 | MODULE_DESCRIPTION(my_NAME); | 80 | MODULE_DESCRIPTION(my_NAME); |
81 | MODULE_LICENSE("GPL"); | 81 | MODULE_LICENSE("GPL"); |
82 | MODULE_VERSION(my_VERSION); | ||
82 | 83 | ||
83 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 84 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
84 | 85 | ||
diff --git a/drivers/message/fusion/mptctl.h b/drivers/message/fusion/mptctl.h index 043941882c6e..e65a1cf5eb0b 100644 --- a/drivers/message/fusion/mptctl.h +++ b/drivers/message/fusion/mptctl.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * LSIFC9xx/LSI409xx Fibre Channel | 5 | * LSIFC9xx/LSI409xx Fibre Channel |
6 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. | 6 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. |
7 | * | 7 | * |
8 | * Copyright (c) 1999-2005 LSI Logic Corporation | 8 | * Copyright (c) 1999-2007 LSI Logic Corporation |
9 | * (mailto:mpt_linux_developer@lsil.com) | 9 | * (mailto:mpt_linux_developer@lsil.com) |
10 | * | 10 | * |
11 | */ | 11 | */ |
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c index ca2f9107f145..c819c23b55b1 100644 --- a/drivers/message/fusion/mptfc.c +++ b/drivers/message/fusion/mptfc.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * For use with LSI Logic PCI chip/adapter(s) | 3 | * For use with LSI Logic PCI chip/adapter(s) |
4 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. | 4 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. |
5 | * | 5 | * |
6 | * Copyright (c) 1999-2005 LSI Logic Corporation | 6 | * Copyright (c) 1999-2007 LSI Logic Corporation |
7 | * (mailto:mpt_linux_developer@lsil.com) | 7 | * (mailto:mpt_linux_developer@lsil.com) |
8 | * | 8 | * |
9 | */ | 9 | */ |
@@ -75,6 +75,7 @@ | |||
75 | MODULE_AUTHOR(MODULEAUTHOR); | 75 | MODULE_AUTHOR(MODULEAUTHOR); |
76 | MODULE_DESCRIPTION(my_NAME); | 76 | MODULE_DESCRIPTION(my_NAME); |
77 | MODULE_LICENSE("GPL"); | 77 | MODULE_LICENSE("GPL"); |
78 | MODULE_VERSION(my_VERSION); | ||
78 | 79 | ||
79 | /* Command line args */ | 80 | /* Command line args */ |
80 | #define MPTFC_DEV_LOSS_TMO (60) | 81 | #define MPTFC_DEV_LOSS_TMO (60) |
diff --git a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c index b7c4407c5e3f..2936204d8ad6 100644 --- a/drivers/message/fusion/mptlan.c +++ b/drivers/message/fusion/mptlan.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * For use with LSI Logic Fibre Channel PCI chip/adapters | 4 | * For use with LSI Logic Fibre Channel PCI chip/adapters |
5 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. | 5 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. |
6 | * | 6 | * |
7 | * Copyright (c) 2000-2005 LSI Logic Corporation | 7 | * Copyright (c) 2000-2007 LSI Logic Corporation |
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 10 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
@@ -56,9 +56,11 @@ | |||
56 | #include <linux/module.h> | 56 | #include <linux/module.h> |
57 | #include <linux/fs.h> | 57 | #include <linux/fs.h> |
58 | 58 | ||
59 | #define my_VERSION MPT_LINUX_VERSION_COMMON | ||
59 | #define MYNAM "mptlan" | 60 | #define MYNAM "mptlan" |
60 | 61 | ||
61 | MODULE_LICENSE("GPL"); | 62 | MODULE_LICENSE("GPL"); |
63 | MODULE_VERSION(my_VERSION); | ||
62 | 64 | ||
63 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 65 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
64 | /* | 66 | /* |
diff --git a/drivers/message/fusion/mptlan.h b/drivers/message/fusion/mptlan.h index 3726ecba5707..70ab75e7c263 100644 --- a/drivers/message/fusion/mptlan.h +++ b/drivers/message/fusion/mptlan.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * For use with LSI Logic Fibre Channel PCI chip/adapters | 4 | * For use with LSI Logic Fibre Channel PCI chip/adapters |
5 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. | 5 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. |
6 | * | 6 | * |
7 | * Copyright (c) 2000-2005 LSI Logic Corporation | 7 | * Copyright (c) 2000-2007 LSI Logic Corporation |
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 10 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 4f0c530e47b0..09e9a9d96410 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c | |||
@@ -3,9 +3,9 @@ | |||
3 | * For use with LSI Logic PCI chip/adapter(s) | 3 | * For use with LSI Logic PCI chip/adapter(s) |
4 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. | 4 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. |
5 | * | 5 | * |
6 | * Copyright (c) 1999-2005 LSI Logic Corporation | 6 | * Copyright (c) 1999-2007 LSI Logic Corporation |
7 | * (mailto:mpt_linux_developer@lsil.com) | 7 | * (mailto:mpt_linux_developer@lsil.com) |
8 | * Copyright (c) 2005-2006 Dell | 8 | * Copyright (c) 2005-2007 Dell |
9 | */ | 9 | */ |
10 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 10 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
11 | /* | 11 | /* |
@@ -75,6 +75,7 @@ | |||
75 | MODULE_AUTHOR(MODULEAUTHOR); | 75 | MODULE_AUTHOR(MODULEAUTHOR); |
76 | MODULE_DESCRIPTION(my_NAME); | 76 | MODULE_DESCRIPTION(my_NAME); |
77 | MODULE_LICENSE("GPL"); | 77 | MODULE_LICENSE("GPL"); |
78 | MODULE_VERSION(my_VERSION); | ||
78 | 79 | ||
79 | static int mpt_pt_clear; | 80 | static int mpt_pt_clear; |
80 | module_param(mpt_pt_clear, int, 0); | 81 | module_param(mpt_pt_clear, int, 0); |
@@ -245,7 +246,8 @@ static void mptsas_print_device_pg0(SasDevicePage0_t *pg0) | |||
245 | printk("Parent Handle=0x%X\n" ,le16_to_cpu(pg0->ParentDevHandle)); | 246 | printk("Parent Handle=0x%X\n" ,le16_to_cpu(pg0->ParentDevHandle)); |
246 | printk("Enclosure Handle=0x%X\n", le16_to_cpu(pg0->EnclosureHandle)); | 247 | printk("Enclosure Handle=0x%X\n", le16_to_cpu(pg0->EnclosureHandle)); |
247 | printk("Slot=0x%X\n", le16_to_cpu(pg0->Slot)); | 248 | printk("Slot=0x%X\n", le16_to_cpu(pg0->Slot)); |
248 | printk("SAS Address=0x%llX\n", le64_to_cpu(sas_address)); | 249 | printk("SAS Address=0x%llX\n", (unsigned long long) |
250 | le64_to_cpu(sas_address)); | ||
249 | printk("Target ID=0x%X\n", pg0->TargetID); | 251 | printk("Target ID=0x%X\n", pg0->TargetID); |
250 | printk("Bus=0x%X\n", pg0->Bus); | 252 | printk("Bus=0x%X\n", pg0->Bus); |
251 | /* The PhyNum field specifies the PHY number of the parent | 253 | /* The PhyNum field specifies the PHY number of the parent |
@@ -349,9 +351,9 @@ mptsas_port_delete(struct mptsas_portinfo_details * port_details) | |||
349 | phy_info = port_info->phy_info; | 351 | phy_info = port_info->phy_info; |
350 | 352 | ||
351 | dsaswideprintk((KERN_DEBUG "%s: [%p]: num_phys=%02d " | 353 | dsaswideprintk((KERN_DEBUG "%s: [%p]: num_phys=%02d " |
352 | "bitmask=0x%016llX\n", | 354 | "bitmask=0x%016llX\n", __FUNCTION__, port_details, |
353 | __FUNCTION__, port_details, port_details->num_phys, | 355 | port_details->num_phys, (unsigned long long) |
354 | port_details->phy_bitmask)); | 356 | port_details->phy_bitmask)); |
355 | 357 | ||
356 | for (i = 0; i < port_info->num_phys; i++, phy_info++) { | 358 | for (i = 0; i < port_info->num_phys; i++, phy_info++) { |
357 | if(phy_info->port_details != port_details) | 359 | if(phy_info->port_details != port_details) |
@@ -476,7 +478,7 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info) | |||
476 | for (i = 0 ; i < port_info->num_phys ; i++, phy_info++) { | 478 | for (i = 0 ; i < port_info->num_phys ; i++, phy_info++) { |
477 | sas_address = phy_info->attached.sas_address; | 479 | sas_address = phy_info->attached.sas_address; |
478 | dsaswideprintk((KERN_DEBUG "phy_id=%d sas_address=0x%018llX\n", | 480 | dsaswideprintk((KERN_DEBUG "phy_id=%d sas_address=0x%018llX\n", |
479 | i, sas_address)); | 481 | i, (unsigned long long)sas_address)); |
480 | if (!sas_address) | 482 | if (!sas_address) |
481 | continue; | 483 | continue; |
482 | port_details = phy_info->port_details; | 484 | port_details = phy_info->port_details; |
@@ -495,8 +497,8 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info) | |||
495 | (1 << phy_info->phy_id); | 497 | (1 << phy_info->phy_id); |
496 | phy_info->sas_port_add_phy=1; | 498 | phy_info->sas_port_add_phy=1; |
497 | dsaswideprintk((KERN_DEBUG "\t\tForming port\n\t\t" | 499 | dsaswideprintk((KERN_DEBUG "\t\tForming port\n\t\t" |
498 | "phy_id=%d sas_address=0x%018llX\n", | 500 | "phy_id=%d sas_address=0x%018llX\n", |
499 | i, sas_address)); | 501 | i, (unsigned long long)sas_address)); |
500 | phy_info->port_details = port_details; | 502 | phy_info->port_details = port_details; |
501 | } | 503 | } |
502 | 504 | ||
@@ -512,8 +514,9 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info) | |||
512 | if (phy_info_cmp->port_details == port_details ) | 514 | if (phy_info_cmp->port_details == port_details ) |
513 | continue; | 515 | continue; |
514 | dsaswideprintk((KERN_DEBUG | 516 | dsaswideprintk((KERN_DEBUG |
515 | "\t\tphy_id=%d sas_address=0x%018llX\n", | 517 | "\t\tphy_id=%d sas_address=0x%018llX\n", |
516 | j, phy_info_cmp->attached.sas_address)); | 518 | j, (unsigned long long) |
519 | phy_info_cmp->attached.sas_address)); | ||
517 | if (phy_info_cmp->port_details) { | 520 | if (phy_info_cmp->port_details) { |
518 | port_details->rphy = | 521 | port_details->rphy = |
519 | mptsas_get_rphy(phy_info_cmp); | 522 | mptsas_get_rphy(phy_info_cmp); |
@@ -546,11 +549,10 @@ mptsas_setup_wide_ports(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info) | |||
546 | if (!port_details) | 549 | if (!port_details) |
547 | continue; | 550 | continue; |
548 | dsaswideprintk((KERN_DEBUG | 551 | dsaswideprintk((KERN_DEBUG |
549 | "%s: [%p]: phy_id=%02d num_phys=%02d " | 552 | "%s: [%p]: phy_id=%02d num_phys=%02d " |
550 | "bitmask=0x%016llX\n", | 553 | "bitmask=0x%016llX\n", __FUNCTION__, |
551 | __FUNCTION__, | 554 | port_details, i, port_details->num_phys, |
552 | port_details, i, port_details->num_phys, | 555 | (unsigned long long)port_details->phy_bitmask)); |
553 | port_details->phy_bitmask)); | ||
554 | dsaswideprintk((KERN_DEBUG"\t\tport = %p rphy=%p\n", | 556 | dsaswideprintk((KERN_DEBUG"\t\tport = %p rphy=%p\n", |
555 | port_details->port, port_details->rphy)); | 557 | port_details->port, port_details->rphy)); |
556 | } | 558 | } |
@@ -2079,8 +2081,10 @@ mptsas_persist_clear_table(struct work_struct *work) | |||
2079 | static void | 2081 | static void |
2080 | mptsas_reprobe_lun(struct scsi_device *sdev, void *data) | 2082 | mptsas_reprobe_lun(struct scsi_device *sdev, void *data) |
2081 | { | 2083 | { |
2084 | int rc; | ||
2085 | |||
2082 | sdev->no_uld_attach = data ? 1 : 0; | 2086 | sdev->no_uld_attach = data ? 1 : 0; |
2083 | scsi_device_reprobe(sdev); | 2087 | rc = scsi_device_reprobe(sdev); |
2084 | } | 2088 | } |
2085 | 2089 | ||
2086 | static void | 2090 | static void |
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index 2c72c36b8171..f0cca3ea93b2 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * For use with LSI Logic PCI chip/adapter(s) | 3 | * For use with LSI Logic PCI chip/adapter(s) |
4 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. | 4 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. |
5 | * | 5 | * |
6 | * Copyright (c) 1999-2005 LSI Logic Corporation | 6 | * Copyright (c) 1999-2007 LSI Logic Corporation |
7 | * (mailto:mpt_linux_developer@lsil.com) | 7 | * (mailto:mpt_linux_developer@lsil.com) |
8 | * | 8 | * |
9 | */ | 9 | */ |
@@ -76,6 +76,7 @@ | |||
76 | MODULE_AUTHOR(MODULEAUTHOR); | 76 | MODULE_AUTHOR(MODULEAUTHOR); |
77 | MODULE_DESCRIPTION(my_NAME); | 77 | MODULE_DESCRIPTION(my_NAME); |
78 | MODULE_LICENSE("GPL"); | 78 | MODULE_LICENSE("GPL"); |
79 | MODULE_VERSION(my_VERSION); | ||
79 | 80 | ||
80 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ | 81 | /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ |
81 | 82 | ||
@@ -701,6 +702,17 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr) | |||
701 | break; | 702 | break; |
702 | } | 703 | } |
703 | } | 704 | } |
705 | } else if (ioc->bus_type == FC) { | ||
706 | /* | ||
707 | * The FC IOC may kill a request for variety of | ||
708 | * reasons, some of which may be recovered by a | ||
709 | * retry, some which are unlikely to be | ||
710 | * recovered. Return DID_ERROR instead of | ||
711 | * DID_RESET to permit retry of the command, | ||
712 | * just not an infinite number of them | ||
713 | */ | ||
714 | sc->result = DID_ERROR << 16; | ||
715 | break; | ||
704 | } | 716 | } |
705 | 717 | ||
706 | /* | 718 | /* |
@@ -2688,7 +2700,8 @@ mptscsih_initTarget(MPT_SCSI_HOST *hd, VirtTarget *vtarget, | |||
2688 | struct scsi_device *sdev) | 2700 | struct scsi_device *sdev) |
2689 | { | 2701 | { |
2690 | dinitprintk((MYIOC_s_INFO_FMT "initTarget bus=%d id=%d lun=%d hd=%p\n", | 2702 | dinitprintk((MYIOC_s_INFO_FMT "initTarget bus=%d id=%d lun=%d hd=%p\n", |
2691 | hd->ioc->name, vtarget->bus_id, vtarget->target_id, lun, hd)); | 2703 | hd->ioc->name, vtarget->bus_id, vtarget->target_id, |
2704 | sdev->lun, hd)); | ||
2692 | 2705 | ||
2693 | /* Is LUN supported? If so, upper 2 bits will be 0 | 2706 | /* Is LUN supported? If so, upper 2 bits will be 0 |
2694 | * in first byte of inquiry data. | 2707 | * in first byte of inquiry data. |
@@ -2770,7 +2783,7 @@ mptscsih_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtTarget *target, | |||
2770 | else { | 2783 | else { |
2771 | factor = MPT_ULTRA320; | 2784 | factor = MPT_ULTRA320; |
2772 | if (scsi_device_qas(sdev)) { | 2785 | if (scsi_device_qas(sdev)) { |
2773 | ddvtprintk((KERN_INFO "Enabling QAS due to byte56=%02x on id=%d!\n", byte56, id)); | 2786 | ddvtprintk((KERN_INFO "Enabling QAS due to byte56=%02x on id=%d!\n", scsi_device_qas(sdev), id)); |
2774 | noQas = 0; | 2787 | noQas = 0; |
2775 | } | 2788 | } |
2776 | if (sdev->type == TYPE_TAPE && | 2789 | if (sdev->type == TYPE_TAPE && |
diff --git a/drivers/message/fusion/mptscsih.h b/drivers/message/fusion/mptscsih.h index 14a5b6c2e2bd..187c8af0890b 100644 --- a/drivers/message/fusion/mptscsih.h +++ b/drivers/message/fusion/mptscsih.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * LSIFC9xx/LSI409xx Fibre Channel | 5 | * LSIFC9xx/LSI409xx Fibre Channel |
6 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. | 6 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. |
7 | * | 7 | * |
8 | * Copyright (c) 1999-2005 LSI Logic Corporation | 8 | * Copyright (c) 1999-2007 LSI Logic Corporation |
9 | * (mailto:mpt_linux_developer@lsil.com) | 9 | * (mailto:mpt_linux_developer@lsil.com) |
10 | * | 10 | * |
11 | */ | 11 | */ |
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index 36641da59289..203c661d2c79 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * For use with LSI Logic PCI chip/adapter(s) | 3 | * For use with LSI Logic PCI chip/adapter(s) |
4 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. | 4 | * running LSI Logic Fusion MPT (Message Passing Technology) firmware. |
5 | * | 5 | * |
6 | * Copyright (c) 1999-2005 LSI Logic Corporation | 6 | * Copyright (c) 1999-2007 LSI Logic Corporation |
7 | * (mailto:mpt_linux_developer@lsil.com) | 7 | * (mailto:mpt_linux_developer@lsil.com) |
8 | * | 8 | * |
9 | */ | 9 | */ |
@@ -77,6 +77,7 @@ | |||
77 | MODULE_AUTHOR(MODULEAUTHOR); | 77 | MODULE_AUTHOR(MODULEAUTHOR); |
78 | MODULE_DESCRIPTION(my_NAME); | 78 | MODULE_DESCRIPTION(my_NAME); |
79 | MODULE_LICENSE("GPL"); | 79 | MODULE_LICENSE("GPL"); |
80 | MODULE_VERSION(my_VERSION); | ||
80 | 81 | ||
81 | /* Command line args */ | 82 | /* Command line args */ |
82 | static int mpt_saf_te = MPTSCSIH_SAF_TE; | 83 | static int mpt_saf_te = MPTSCSIH_SAF_TE; |
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c index 99a259c5a0c0..e1b44d6c0c32 100644 --- a/drivers/scsi/3w-xxxx.c +++ b/drivers/scsi/3w-xxxx.c | |||
@@ -6,7 +6,7 @@ | |||
6 | Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 6 | Arnaldo Carvalho de Melo <acme@conectiva.com.br> |
7 | Brad Strand <linux@3ware.com> | 7 | Brad Strand <linux@3ware.com> |
8 | 8 | ||
9 | Copyright (C) 1999-2005 3ware Inc. | 9 | Copyright (C) 1999-2007 3ware Inc. |
10 | 10 | ||
11 | Kernel compatiblity By: Andre Hedrick <andre@suse.com> | 11 | Kernel compatiblity By: Andre Hedrick <andre@suse.com> |
12 | Non-Copyright (C) 2000 Andre Hedrick <andre@suse.com> | 12 | Non-Copyright (C) 2000 Andre Hedrick <andre@suse.com> |
@@ -191,6 +191,9 @@ | |||
191 | before shutting down card. | 191 | before shutting down card. |
192 | Change to new 'change_queue_depth' api. | 192 | Change to new 'change_queue_depth' api. |
193 | Fix 'handled=1' ISR usage, remove bogus IRQ check. | 193 | Fix 'handled=1' ISR usage, remove bogus IRQ check. |
194 | 1.26.02.002 - Free irq handler in __tw_shutdown(). | ||
195 | Turn on RCD bit for caching mode page. | ||
196 | Serialize reset code. | ||
194 | */ | 197 | */ |
195 | 198 | ||
196 | #include <linux/module.h> | 199 | #include <linux/module.h> |
@@ -214,7 +217,7 @@ | |||
214 | #include "3w-xxxx.h" | 217 | #include "3w-xxxx.h" |
215 | 218 | ||
216 | /* Globals */ | 219 | /* Globals */ |
217 | #define TW_DRIVER_VERSION "1.26.02.001" | 220 | #define TW_DRIVER_VERSION "1.26.02.002" |
218 | static TW_Device_Extension *tw_device_extension_list[TW_MAX_SLOT]; | 221 | static TW_Device_Extension *tw_device_extension_list[TW_MAX_SLOT]; |
219 | static int tw_device_extension_count = 0; | 222 | static int tw_device_extension_count = 0; |
220 | static int twe_major = -1; | 223 | static int twe_major = -1; |
@@ -226,7 +229,7 @@ MODULE_LICENSE("GPL"); | |||
226 | MODULE_VERSION(TW_DRIVER_VERSION); | 229 | MODULE_VERSION(TW_DRIVER_VERSION); |
227 | 230 | ||
228 | /* Function prototypes */ | 231 | /* Function prototypes */ |
229 | static int tw_reset_device_extension(TW_Device_Extension *tw_dev, int ioctl_reset); | 232 | static int tw_reset_device_extension(TW_Device_Extension *tw_dev); |
230 | 233 | ||
231 | /* Functions */ | 234 | /* Functions */ |
232 | 235 | ||
@@ -984,24 +987,12 @@ static int tw_chrdev_ioctl(struct inode *inode, struct file *file, unsigned int | |||
984 | /* Now wait for the command to complete */ | 987 | /* Now wait for the command to complete */ |
985 | timeout = wait_event_timeout(tw_dev->ioctl_wqueue, tw_dev->chrdev_request_id == TW_IOCTL_CHRDEV_FREE, timeout); | 988 | timeout = wait_event_timeout(tw_dev->ioctl_wqueue, tw_dev->chrdev_request_id == TW_IOCTL_CHRDEV_FREE, timeout); |
986 | 989 | ||
987 | /* See if we reset while waiting for the ioctl to complete */ | ||
988 | if (test_bit(TW_IN_RESET, &tw_dev->flags)) { | ||
989 | clear_bit(TW_IN_RESET, &tw_dev->flags); | ||
990 | retval = -ERESTARTSYS; | ||
991 | goto out2; | ||
992 | } | ||
993 | |||
994 | /* We timed out, and didn't get an interrupt */ | 990 | /* We timed out, and didn't get an interrupt */ |
995 | if (tw_dev->chrdev_request_id != TW_IOCTL_CHRDEV_FREE) { | 991 | if (tw_dev->chrdev_request_id != TW_IOCTL_CHRDEV_FREE) { |
996 | /* Now we need to reset the board */ | 992 | /* Now we need to reset the board */ |
997 | printk(KERN_WARNING "3w-xxxx: scsi%d: Character ioctl (0x%x) timed out, resetting card.\n", tw_dev->host->host_no, cmd); | 993 | printk(KERN_WARNING "3w-xxxx: scsi%d: Character ioctl (0x%x) timed out, resetting card.\n", tw_dev->host->host_no, cmd); |
998 | retval = -EIO; | 994 | retval = -EIO; |
999 | spin_lock_irqsave(tw_dev->host->host_lock, flags); | 995 | if (tw_reset_device_extension(tw_dev)) { |
1000 | tw_dev->state[request_id] = TW_S_COMPLETED; | ||
1001 | tw_state_request_finish(tw_dev, request_id); | ||
1002 | tw_dev->posted_request_count--; | ||
1003 | spin_unlock_irqrestore(tw_dev->host->host_lock, flags); | ||
1004 | if (tw_reset_device_extension(tw_dev, 1)) { | ||
1005 | printk(KERN_WARNING "3w-xxxx: tw_chrdev_ioctl(): Reset failed for card %d.\n", tw_dev->host->host_no); | 996 | printk(KERN_WARNING "3w-xxxx: tw_chrdev_ioctl(): Reset failed for card %d.\n", tw_dev->host->host_no); |
1006 | } | 997 | } |
1007 | goto out2; | 998 | goto out2; |
@@ -1336,7 +1327,7 @@ static void tw_unmap_scsi_data(struct pci_dev *pdev, struct scsi_cmnd *cmd) | |||
1336 | } /* End tw_unmap_scsi_data() */ | 1327 | } /* End tw_unmap_scsi_data() */ |
1337 | 1328 | ||
1338 | /* This function will reset a device extension */ | 1329 | /* This function will reset a device extension */ |
1339 | static int tw_reset_device_extension(TW_Device_Extension *tw_dev, int ioctl_reset) | 1330 | static int tw_reset_device_extension(TW_Device_Extension *tw_dev) |
1340 | { | 1331 | { |
1341 | int i = 0; | 1332 | int i = 0; |
1342 | struct scsi_cmnd *srb; | 1333 | struct scsi_cmnd *srb; |
@@ -1382,15 +1373,10 @@ static int tw_reset_device_extension(TW_Device_Extension *tw_dev, int ioctl_rese | |||
1382 | printk(KERN_WARNING "3w-xxxx: scsi%d: Reset sequence failed.\n", tw_dev->host->host_no); | 1373 | printk(KERN_WARNING "3w-xxxx: scsi%d: Reset sequence failed.\n", tw_dev->host->host_no); |
1383 | return 1; | 1374 | return 1; |
1384 | } | 1375 | } |
1385 | TW_ENABLE_AND_CLEAR_INTERRUPTS(tw_dev); | ||
1386 | 1376 | ||
1387 | /* Wake up any ioctl that was pending before the reset */ | 1377 | TW_ENABLE_AND_CLEAR_INTERRUPTS(tw_dev); |
1388 | if ((tw_dev->chrdev_request_id == TW_IOCTL_CHRDEV_FREE) || (ioctl_reset)) { | 1378 | clear_bit(TW_IN_RESET, &tw_dev->flags); |
1389 | clear_bit(TW_IN_RESET, &tw_dev->flags); | 1379 | tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE; |
1390 | } else { | ||
1391 | tw_dev->chrdev_request_id = TW_IOCTL_CHRDEV_FREE; | ||
1392 | wake_up(&tw_dev->ioctl_wqueue); | ||
1393 | } | ||
1394 | 1380 | ||
1395 | return 0; | 1381 | return 0; |
1396 | } /* End tw_reset_device_extension() */ | 1382 | } /* End tw_reset_device_extension() */ |
@@ -1437,14 +1423,18 @@ static int tw_scsi_eh_reset(struct scsi_cmnd *SCpnt) | |||
1437 | "WARNING: Command (0x%x) timed out, resetting card.\n", | 1423 | "WARNING: Command (0x%x) timed out, resetting card.\n", |
1438 | SCpnt->cmnd[0]); | 1424 | SCpnt->cmnd[0]); |
1439 | 1425 | ||
1426 | /* Make sure we are not issuing an ioctl or resetting from ioctl */ | ||
1427 | mutex_lock(&tw_dev->ioctl_lock); | ||
1428 | |||
1440 | /* Now reset the card and some of the device extension data */ | 1429 | /* Now reset the card and some of the device extension data */ |
1441 | if (tw_reset_device_extension(tw_dev, 0)) { | 1430 | if (tw_reset_device_extension(tw_dev)) { |
1442 | printk(KERN_WARNING "3w-xxxx: scsi%d: Reset failed.\n", tw_dev->host->host_no); | 1431 | printk(KERN_WARNING "3w-xxxx: scsi%d: Reset failed.\n", tw_dev->host->host_no); |
1443 | goto out; | 1432 | goto out; |
1444 | } | 1433 | } |
1445 | 1434 | ||
1446 | retval = SUCCESS; | 1435 | retval = SUCCESS; |
1447 | out: | 1436 | out: |
1437 | mutex_unlock(&tw_dev->ioctl_lock); | ||
1448 | return retval; | 1438 | return retval; |
1449 | } /* End tw_scsi_eh_reset() */ | 1439 | } /* End tw_scsi_eh_reset() */ |
1450 | 1440 | ||
@@ -1660,9 +1650,9 @@ static int tw_scsiop_mode_sense_complete(TW_Device_Extension *tw_dev, int reques | |||
1660 | request_buffer[4] = 0x8; /* caching page */ | 1650 | request_buffer[4] = 0x8; /* caching page */ |
1661 | request_buffer[5] = 0xa; /* page length */ | 1651 | request_buffer[5] = 0xa; /* page length */ |
1662 | if (*flags & 0x1) | 1652 | if (*flags & 0x1) |
1663 | request_buffer[6] = 0x4; /* WCE on */ | 1653 | request_buffer[6] = 0x5; /* WCE on, RCD on */ |
1664 | else | 1654 | else |
1665 | request_buffer[6] = 0x0; /* WCE off */ | 1655 | request_buffer[6] = 0x1; /* WCE off, RCD on */ |
1666 | tw_transfer_internal(tw_dev, request_id, request_buffer, | 1656 | tw_transfer_internal(tw_dev, request_id, request_buffer, |
1667 | sizeof(request_buffer)); | 1657 | sizeof(request_buffer)); |
1668 | 1658 | ||
@@ -2012,6 +2002,10 @@ static int tw_scsi_queue(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd | |||
2012 | int retval = 1; | 2002 | int retval = 1; |
2013 | TW_Device_Extension *tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata; | 2003 | TW_Device_Extension *tw_dev = (TW_Device_Extension *)SCpnt->device->host->hostdata; |
2014 | 2004 | ||
2005 | /* If we are resetting due to timed out ioctl, report as busy */ | ||
2006 | if (test_bit(TW_IN_RESET, &tw_dev->flags)) | ||
2007 | return SCSI_MLQUEUE_HOST_BUSY; | ||
2008 | |||
2015 | /* Save done function into Scsi_Cmnd struct */ | 2009 | /* Save done function into Scsi_Cmnd struct */ |
2016 | SCpnt->scsi_done = done; | 2010 | SCpnt->scsi_done = done; |
2017 | 2011 | ||
@@ -2100,6 +2094,10 @@ static irqreturn_t tw_interrupt(int irq, void *dev_instance) | |||
2100 | 2094 | ||
2101 | handled = 1; | 2095 | handled = 1; |
2102 | 2096 | ||
2097 | /* If we are resetting, bail */ | ||
2098 | if (test_bit(TW_IN_RESET, &tw_dev->flags)) | ||
2099 | goto tw_interrupt_bail; | ||
2100 | |||
2103 | /* Check controller for errors */ | 2101 | /* Check controller for errors */ |
2104 | if (tw_check_bits(status_reg_value)) { | 2102 | if (tw_check_bits(status_reg_value)) { |
2105 | dprintk(KERN_WARNING "3w-xxxx: tw_interrupt(): Unexpected bits.\n"); | 2103 | dprintk(KERN_WARNING "3w-xxxx: tw_interrupt(): Unexpected bits.\n"); |
@@ -2276,6 +2274,9 @@ static void __tw_shutdown(TW_Device_Extension *tw_dev) | |||
2276 | /* Disable interrupts */ | 2274 | /* Disable interrupts */ |
2277 | TW_DISABLE_INTERRUPTS(tw_dev); | 2275 | TW_DISABLE_INTERRUPTS(tw_dev); |
2278 | 2276 | ||
2277 | /* Free up the IRQ */ | ||
2278 | free_irq(tw_dev->tw_pci_dev->irq, tw_dev); | ||
2279 | |||
2279 | printk(KERN_WARNING "3w-xxxx: Shutting down host %d.\n", tw_dev->host->host_no); | 2280 | printk(KERN_WARNING "3w-xxxx: Shutting down host %d.\n", tw_dev->host->host_no); |
2280 | 2281 | ||
2281 | /* Tell the card we are shutting down */ | 2282 | /* Tell the card we are shutting down */ |
@@ -2444,9 +2445,6 @@ static void tw_remove(struct pci_dev *pdev) | |||
2444 | twe_major = -1; | 2445 | twe_major = -1; |
2445 | } | 2446 | } |
2446 | 2447 | ||
2447 | /* Free up the IRQ */ | ||
2448 | free_irq(tw_dev->tw_pci_dev->irq, tw_dev); | ||
2449 | |||
2450 | /* Shutdown the card */ | 2448 | /* Shutdown the card */ |
2451 | __tw_shutdown(tw_dev); | 2449 | __tw_shutdown(tw_dev); |
2452 | 2450 | ||
diff --git a/drivers/scsi/3w-xxxx.h b/drivers/scsi/3w-xxxx.h index bbd654a2b9b1..0742e6846656 100644 --- a/drivers/scsi/3w-xxxx.h +++ b/drivers/scsi/3w-xxxx.h | |||
@@ -6,7 +6,7 @@ | |||
6 | Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 6 | Arnaldo Carvalho de Melo <acme@conectiva.com.br> |
7 | Brad Strand <linux@3ware.com> | 7 | Brad Strand <linux@3ware.com> |
8 | 8 | ||
9 | Copyright (C) 1999-2005 3ware Inc. | 9 | Copyright (C) 1999-2007 3ware Inc. |
10 | 10 | ||
11 | Kernel compatiblity By: Andre Hedrick <andre@suse.com> | 11 | Kernel compatiblity By: Andre Hedrick <andre@suse.com> |
12 | Non-Copyright (C) 2000 Andre Hedrick <andre@suse.com> | 12 | Non-Copyright (C) 2000 Andre Hedrick <andre@suse.com> |
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index 60f582727185..7869c34a4a3e 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig | |||
@@ -1303,7 +1303,7 @@ config SCSI_LPFC | |||
1303 | 1303 | ||
1304 | config SCSI_SEAGATE | 1304 | config SCSI_SEAGATE |
1305 | tristate "Seagate ST-02 and Future Domain TMC-8xx SCSI support" | 1305 | tristate "Seagate ST-02 and Future Domain TMC-8xx SCSI support" |
1306 | depends on X86 && ISA && SCSI && BROKEN | 1306 | depends on X86 && ISA && SCSI |
1307 | ---help--- | 1307 | ---help--- |
1308 | These are 8-bit SCSI controllers; the ST-01 is also supported by | 1308 | These are 8-bit SCSI controllers; the ST-01 is also supported by |
1309 | this driver. It is explained in section 3.9 of the SCSI-HOWTO, | 1309 | this driver. It is explained in section 3.9 of the SCSI-HOWTO, |
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 359e7ddfdb47..d2cf875af59b 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -117,8 +117,8 @@ static struct pci_device_id aac_pci_tbl[] = { | |||
117 | { 0x9005, 0x0286, 0x9005, 0x029b, 0, 0, 22 }, /* AAR-2820SA (Intruder) */ | 117 | { 0x9005, 0x0286, 0x9005, 0x029b, 0, 0, 22 }, /* AAR-2820SA (Intruder) */ |
118 | { 0x9005, 0x0286, 0x9005, 0x029c, 0, 0, 23 }, /* AAR-2620SA (Intruder) */ | 118 | { 0x9005, 0x0286, 0x9005, 0x029c, 0, 0, 23 }, /* AAR-2620SA (Intruder) */ |
119 | { 0x9005, 0x0286, 0x9005, 0x029d, 0, 0, 24 }, /* AAR-2420SA (Intruder) */ | 119 | { 0x9005, 0x0286, 0x9005, 0x029d, 0, 0, 24 }, /* AAR-2420SA (Intruder) */ |
120 | { 0x9005, 0x0286, 0x9005, 0x029e, 0, 0, 25 }, /* ICP9024R0 (Lancer) */ | 120 | { 0x9005, 0x0286, 0x9005, 0x029e, 0, 0, 25 }, /* ICP9024RO (Lancer) */ |
121 | { 0x9005, 0x0286, 0x9005, 0x029f, 0, 0, 26 }, /* ICP9014R0 (Lancer) */ | 121 | { 0x9005, 0x0286, 0x9005, 0x029f, 0, 0, 26 }, /* ICP9014RO (Lancer) */ |
122 | { 0x9005, 0x0286, 0x9005, 0x02a0, 0, 0, 27 }, /* ICP9047MA (Lancer) */ | 122 | { 0x9005, 0x0286, 0x9005, 0x02a0, 0, 0, 27 }, /* ICP9047MA (Lancer) */ |
123 | { 0x9005, 0x0286, 0x9005, 0x02a1, 0, 0, 28 }, /* ICP9087MA (Lancer) */ | 123 | { 0x9005, 0x0286, 0x9005, 0x02a1, 0, 0, 28 }, /* ICP9087MA (Lancer) */ |
124 | { 0x9005, 0x0286, 0x9005, 0x02a3, 0, 0, 29 }, /* ICP5445AU (Hurricane44) */ | 124 | { 0x9005, 0x0286, 0x9005, 0x02a3, 0, 0, 29 }, /* ICP5445AU (Hurricane44) */ |
@@ -137,15 +137,15 @@ static struct pci_device_id aac_pci_tbl[] = { | |||
137 | { 0x9005, 0x0285, 0x9005, 0x0294, 0, 0, 41 }, /* ESD SO-DIMM PCI-X SATA ZCR (Prowler) */ | 137 | { 0x9005, 0x0285, 0x9005, 0x0294, 0, 0, 41 }, /* ESD SO-DIMM PCI-X SATA ZCR (Prowler) */ |
138 | { 0x9005, 0x0285, 0x103C, 0x3227, 0, 0, 42 }, /* AAR-2610SA PCI SATA 6ch */ | 138 | { 0x9005, 0x0285, 0x103C, 0x3227, 0, 0, 42 }, /* AAR-2610SA PCI SATA 6ch */ |
139 | { 0x9005, 0x0285, 0x9005, 0x0296, 0, 0, 43 }, /* ASR-2240S (SabreExpress) */ | 139 | { 0x9005, 0x0285, 0x9005, 0x0296, 0, 0, 43 }, /* ASR-2240S (SabreExpress) */ |
140 | { 0x9005, 0x0285, 0x9005, 0x0297, 0, 0, 44 }, /* ASR-4005SAS */ | 140 | { 0x9005, 0x0285, 0x9005, 0x0297, 0, 0, 44 }, /* ASR-4005 */ |
141 | { 0x9005, 0x0285, 0x1014, 0x02F2, 0, 0, 45 }, /* IBM 8i (AvonPark) */ | 141 | { 0x9005, 0x0285, 0x1014, 0x02F2, 0, 0, 45 }, /* IBM 8i (AvonPark) */ |
142 | { 0x9005, 0x0285, 0x1014, 0x0312, 0, 0, 45 }, /* IBM 8i (AvonPark Lite) */ | 142 | { 0x9005, 0x0285, 0x1014, 0x0312, 0, 0, 45 }, /* IBM 8i (AvonPark Lite) */ |
143 | { 0x9005, 0x0286, 0x1014, 0x9580, 0, 0, 46 }, /* IBM 8k/8k-l8 (Aurora) */ | 143 | { 0x9005, 0x0286, 0x1014, 0x9580, 0, 0, 46 }, /* IBM 8k/8k-l8 (Aurora) */ |
144 | { 0x9005, 0x0286, 0x1014, 0x9540, 0, 0, 47 }, /* IBM 8k/8k-l4 (Aurora Lite) */ | 144 | { 0x9005, 0x0286, 0x1014, 0x9540, 0, 0, 47 }, /* IBM 8k/8k-l4 (Aurora Lite) */ |
145 | { 0x9005, 0x0285, 0x9005, 0x0298, 0, 0, 48 }, /* ASR-4000SAS (BlackBird) */ | 145 | { 0x9005, 0x0285, 0x9005, 0x0298, 0, 0, 48 }, /* ASR-4000 (BlackBird) */ |
146 | { 0x9005, 0x0285, 0x9005, 0x0299, 0, 0, 49 }, /* ASR-4800SAS (Marauder-X) */ | 146 | { 0x9005, 0x0285, 0x9005, 0x0299, 0, 0, 49 }, /* ASR-4800SAS (Marauder-X) */ |
147 | { 0x9005, 0x0285, 0x9005, 0x029a, 0, 0, 50 }, /* ASR-4805SAS (Marauder-E) */ | 147 | { 0x9005, 0x0285, 0x9005, 0x029a, 0, 0, 50 }, /* ASR-4805SAS (Marauder-E) */ |
148 | { 0x9005, 0x0286, 0x9005, 0x02a2, 0, 0, 51 }, /* ASR-3800SAS (Hurricane44) */ | 148 | { 0x9005, 0x0286, 0x9005, 0x02a2, 0, 0, 51 }, /* ASR-3800 (Hurricane44) */ |
149 | 149 | ||
150 | { 0x9005, 0x0285, 0x1028, 0x0287, 0, 0, 52 }, /* Perc 320/DC*/ | 150 | { 0x9005, 0x0285, 0x1028, 0x0287, 0, 0, 52 }, /* Perc 320/DC*/ |
151 | { 0x1011, 0x0046, 0x9005, 0x0365, 0, 0, 53 }, /* Adaptec 5400S (Mustang)*/ | 151 | { 0x1011, 0x0046, 0x9005, 0x0365, 0, 0, 53 }, /* Adaptec 5400S (Mustang)*/ |
@@ -193,8 +193,8 @@ static struct aac_driver_ident aac_drivers[] = { | |||
193 | { aac_rkt_init, "aacraid", "ADAPTEC ", "AAR-2820SA ", 1 }, /* AAR-2820SA (Intruder) */ | 193 | { aac_rkt_init, "aacraid", "ADAPTEC ", "AAR-2820SA ", 1 }, /* AAR-2820SA (Intruder) */ |
194 | { aac_rkt_init, "aacraid", "ADAPTEC ", "AAR-2620SA ", 1 }, /* AAR-2620SA (Intruder) */ | 194 | { aac_rkt_init, "aacraid", "ADAPTEC ", "AAR-2620SA ", 1 }, /* AAR-2620SA (Intruder) */ |
195 | { aac_rkt_init, "aacraid", "ADAPTEC ", "AAR-2420SA ", 1 }, /* AAR-2420SA (Intruder) */ | 195 | { aac_rkt_init, "aacraid", "ADAPTEC ", "AAR-2420SA ", 1 }, /* AAR-2420SA (Intruder) */ |
196 | { aac_rkt_init, "aacraid", "ICP ", "ICP9024R0 ", 2 }, /* ICP9024R0 (Lancer) */ | 196 | { aac_rkt_init, "aacraid", "ICP ", "ICP9024RO ", 2 }, /* ICP9024RO (Lancer) */ |
197 | { aac_rkt_init, "aacraid", "ICP ", "ICP9014R0 ", 1 }, /* ICP9014R0 (Lancer) */ | 197 | { aac_rkt_init, "aacraid", "ICP ", "ICP9014RO ", 1 }, /* ICP9014RO (Lancer) */ |
198 | { aac_rkt_init, "aacraid", "ICP ", "ICP9047MA ", 1 }, /* ICP9047MA (Lancer) */ | 198 | { aac_rkt_init, "aacraid", "ICP ", "ICP9047MA ", 1 }, /* ICP9047MA (Lancer) */ |
199 | { aac_rkt_init, "aacraid", "ICP ", "ICP9087MA ", 1 }, /* ICP9087MA (Lancer) */ | 199 | { aac_rkt_init, "aacraid", "ICP ", "ICP9087MA ", 1 }, /* ICP9087MA (Lancer) */ |
200 | { aac_rkt_init, "aacraid", "ICP ", "ICP5445AU ", 1 }, /* ICP5445AU (Hurricane44) */ | 200 | { aac_rkt_init, "aacraid", "ICP ", "ICP5445AU ", 1 }, /* ICP5445AU (Hurricane44) */ |
@@ -212,14 +212,14 @@ static struct aac_driver_ident aac_drivers[] = { | |||
212 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2026ZCR ", 1 }, /* ESD SO-DIMM PCI-X SATA ZCR (Prowler) */ | 212 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2026ZCR ", 1 }, /* ESD SO-DIMM PCI-X SATA ZCR (Prowler) */ |
213 | { aac_rx_init, "aacraid", "ADAPTEC ", "AAR-2610SA ", 1 }, /* SATA 6Ch (Bearcat) */ | 213 | { aac_rx_init, "aacraid", "ADAPTEC ", "AAR-2610SA ", 1 }, /* SATA 6Ch (Bearcat) */ |
214 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2240S ", 1 }, /* ASR-2240S (SabreExpress) */ | 214 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-2240S ", 1 }, /* ASR-2240S (SabreExpress) */ |
215 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4005SAS ", 1 }, /* ASR-4005SAS */ | 215 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4005 ", 1 }, /* ASR-4005 */ |
216 | { aac_rx_init, "ServeRAID","IBM ", "ServeRAID 8i ", 1 }, /* IBM 8i (AvonPark) */ | 216 | { aac_rx_init, "ServeRAID","IBM ", "ServeRAID 8i ", 1 }, /* IBM 8i (AvonPark) */ |
217 | { aac_rkt_init, "ServeRAID","IBM ", "ServeRAID 8k-l8 ", 1 }, /* IBM 8k/8k-l8 (Aurora) */ | 217 | { aac_rkt_init, "ServeRAID","IBM ", "ServeRAID 8k-l8 ", 1 }, /* IBM 8k/8k-l8 (Aurora) */ |
218 | { aac_rkt_init, "ServeRAID","IBM ", "ServeRAID 8k-l4 ", 1 }, /* IBM 8k/8k-l4 (Aurora Lite) */ | 218 | { aac_rkt_init, "ServeRAID","IBM ", "ServeRAID 8k-l4 ", 1 }, /* IBM 8k/8k-l4 (Aurora Lite) */ |
219 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4000SAS ", 1 }, /* ASR-4000SAS (BlackBird & AvonPark) */ | 219 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4000 ", 1 }, /* ASR-4000 (BlackBird & AvonPark) */ |
220 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4800SAS ", 1 }, /* ASR-4800SAS (Marauder-X) */ | 220 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4800SAS ", 1 }, /* ASR-4800SAS (Marauder-X) */ |
221 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4805SAS ", 1 }, /* ASR-4805SAS (Marauder-E) */ | 221 | { aac_rx_init, "aacraid", "ADAPTEC ", "ASR-4805SAS ", 1 }, /* ASR-4805SAS (Marauder-E) */ |
222 | { aac_rkt_init, "aacraid", "ADAPTEC ", "ASR-3800SAS ", 1 }, /* ASR-3800SAS (Hurricane44) */ | 222 | { aac_rkt_init, "aacraid", "ADAPTEC ", "ASR-3800 ", 1 }, /* ASR-3800 (Hurricane44) */ |
223 | 223 | ||
224 | { aac_rx_init, "percraid", "DELL ", "PERC 320/DC ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Perc 320/DC*/ | 224 | { aac_rx_init, "percraid", "DELL ", "PERC 320/DC ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG }, /* Perc 320/DC*/ |
225 | { aac_sa_init, "aacraid", "ADAPTEC ", "Adaptec 5400S ", 4, AAC_QUIRK_34SG }, /* Adaptec 5400S (Mustang)*/ | 225 | { aac_sa_init, "aacraid", "ADAPTEC ", "Adaptec 5400S ", 4, AAC_QUIRK_34SG }, /* Adaptec 5400S (Mustang)*/ |
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c index 2b344356a29e..306bec355e45 100644 --- a/drivers/scsi/advansys.c +++ b/drivers/scsi/advansys.c | |||
@@ -18215,6 +18215,7 @@ AdvInquiryHandling( | |||
18215 | } | 18215 | } |
18216 | MODULE_LICENSE("Dual BSD/GPL"); | 18216 | MODULE_LICENSE("Dual BSD/GPL"); |
18217 | 18217 | ||
18218 | #ifdef CONFIG_PCI | ||
18218 | /* PCI Devices supported by this driver */ | 18219 | /* PCI Devices supported by this driver */ |
18219 | static struct pci_device_id advansys_pci_tbl[] __devinitdata = { | 18220 | static struct pci_device_id advansys_pci_tbl[] __devinitdata = { |
18220 | { PCI_VENDOR_ID_ASP, PCI_DEVICE_ID_ASP_1200A, | 18221 | { PCI_VENDOR_ID_ASP, PCI_DEVICE_ID_ASP_1200A, |
@@ -18232,4 +18233,4 @@ static struct pci_device_id advansys_pci_tbl[] __devinitdata = { | |||
18232 | { } | 18233 | { } |
18233 | }; | 18234 | }; |
18234 | MODULE_DEVICE_TABLE(pci, advansys_pci_tbl); | 18235 | MODULE_DEVICE_TABLE(pci, advansys_pci_tbl); |
18235 | 18236 | #endif /* CONFIG_PCI */ | |
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index d0b139cccbbc..437684084377 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c | |||
@@ -749,7 +749,7 @@ static int iscsi_scsi_data_in(struct iscsi_conn *conn) | |||
749 | if (!offset) | 749 | if (!offset) |
750 | crypto_hash_update( | 750 | crypto_hash_update( |
751 | &tcp_conn->rx_hash, | 751 | &tcp_conn->rx_hash, |
752 | &sg[i], 1); | 752 | &sg[i], sg[i].length); |
753 | else | 753 | else |
754 | partial_sg_digest_update( | 754 | partial_sg_digest_update( |
755 | &tcp_conn->rx_hash, | 755 | &tcp_conn->rx_hash, |
@@ -1777,13 +1777,13 @@ iscsi_tcp_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx) | |||
1777 | tcp_conn->tx_hash.tfm = crypto_alloc_hash("crc32c", 0, | 1777 | tcp_conn->tx_hash.tfm = crypto_alloc_hash("crc32c", 0, |
1778 | CRYPTO_ALG_ASYNC); | 1778 | CRYPTO_ALG_ASYNC); |
1779 | tcp_conn->tx_hash.flags = 0; | 1779 | tcp_conn->tx_hash.flags = 0; |
1780 | if (!tcp_conn->tx_hash.tfm) | 1780 | if (IS_ERR(tcp_conn->tx_hash.tfm)) |
1781 | goto free_tcp_conn; | 1781 | goto free_tcp_conn; |
1782 | 1782 | ||
1783 | tcp_conn->rx_hash.tfm = crypto_alloc_hash("crc32c", 0, | 1783 | tcp_conn->rx_hash.tfm = crypto_alloc_hash("crc32c", 0, |
1784 | CRYPTO_ALG_ASYNC); | 1784 | CRYPTO_ALG_ASYNC); |
1785 | tcp_conn->rx_hash.flags = 0; | 1785 | tcp_conn->rx_hash.flags = 0; |
1786 | if (!tcp_conn->rx_hash.tfm) | 1786 | if (IS_ERR(tcp_conn->rx_hash.tfm)) |
1787 | goto free_tx_tfm; | 1787 | goto free_tx_tfm; |
1788 | 1788 | ||
1789 | return cls_conn; | 1789 | return cls_conn; |
@@ -2044,13 +2044,11 @@ iscsi_tcp_conn_get_param(struct iscsi_cls_conn *cls_conn, | |||
2044 | sk = tcp_conn->sock->sk; | 2044 | sk = tcp_conn->sock->sk; |
2045 | if (sk->sk_family == PF_INET) { | 2045 | if (sk->sk_family == PF_INET) { |
2046 | inet = inet_sk(sk); | 2046 | inet = inet_sk(sk); |
2047 | len = sprintf(buf, "%u.%u.%u.%u\n", | 2047 | len = sprintf(buf, NIPQUAD_FMT "\n", |
2048 | NIPQUAD(inet->daddr)); | 2048 | NIPQUAD(inet->daddr)); |
2049 | } else { | 2049 | } else { |
2050 | np = inet6_sk(sk); | 2050 | np = inet6_sk(sk); |
2051 | len = sprintf(buf, | 2051 | len = sprintf(buf, NIP6_FMT "\n", NIP6(np->daddr)); |
2052 | "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n", | ||
2053 | NIP6(np->daddr)); | ||
2054 | } | 2052 | } |
2055 | mutex_unlock(&conn->xmitmutex); | 2053 | mutex_unlock(&conn->xmitmutex); |
2056 | break; | 2054 | break; |
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index e11b23c641e2..d37048c96eab 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
@@ -260,7 +260,7 @@ static int iscsi_scsi_cmd_rsp(struct iscsi_conn *conn, struct iscsi_hdr *hdr, | |||
260 | } | 260 | } |
261 | 261 | ||
262 | if (rhdr->cmd_status == SAM_STAT_CHECK_CONDITION) { | 262 | if (rhdr->cmd_status == SAM_STAT_CHECK_CONDITION) { |
263 | int senselen; | 263 | uint16_t senselen; |
264 | 264 | ||
265 | if (datalen < 2) { | 265 | if (datalen < 2) { |
266 | invalid_datalen: | 266 | invalid_datalen: |
@@ -270,12 +270,12 @@ invalid_datalen: | |||
270 | goto out; | 270 | goto out; |
271 | } | 271 | } |
272 | 272 | ||
273 | senselen = (data[0] << 8) | data[1]; | 273 | senselen = be16_to_cpu(*(uint16_t *)data); |
274 | if (datalen < senselen) | 274 | if (datalen < senselen) |
275 | goto invalid_datalen; | 275 | goto invalid_datalen; |
276 | 276 | ||
277 | memcpy(sc->sense_buffer, data + 2, | 277 | memcpy(sc->sense_buffer, data + 2, |
278 | min(senselen, SCSI_SENSE_BUFFERSIZE)); | 278 | min_t(uint16_t, senselen, SCSI_SENSE_BUFFERSIZE)); |
279 | debug_scsi("copied %d bytes of sense\n", | 279 | debug_scsi("copied %d bytes of sense\n", |
280 | min(senselen, SCSI_SENSE_BUFFERSIZE)); | 280 | min(senselen, SCSI_SENSE_BUFFERSIZE)); |
281 | } | 281 | } |
diff --git a/drivers/scsi/lpfc/lpfc_mem.c b/drivers/scsi/lpfc/lpfc_mem.c index 066292d3995a..ec3bbbde6f7a 100644 --- a/drivers/scsi/lpfc/lpfc_mem.c +++ b/drivers/scsi/lpfc/lpfc_mem.c | |||
@@ -56,6 +56,9 @@ lpfc_mem_alloc(struct lpfc_hba * phba) | |||
56 | 56 | ||
57 | pool->elements = kmalloc(sizeof(struct lpfc_dmabuf) * | 57 | pool->elements = kmalloc(sizeof(struct lpfc_dmabuf) * |
58 | LPFC_MBUF_POOL_SIZE, GFP_KERNEL); | 58 | LPFC_MBUF_POOL_SIZE, GFP_KERNEL); |
59 | if (!pool->elements) | ||
60 | goto fail_free_lpfc_mbuf_pool; | ||
61 | |||
59 | pool->max_count = 0; | 62 | pool->max_count = 0; |
60 | pool->current_count = 0; | 63 | pool->current_count = 0; |
61 | for ( i = 0; i < LPFC_MBUF_POOL_SIZE; i++) { | 64 | for ( i = 0; i < LPFC_MBUF_POOL_SIZE; i++) { |
@@ -82,10 +85,11 @@ lpfc_mem_alloc(struct lpfc_hba * phba) | |||
82 | fail_free_mbox_pool: | 85 | fail_free_mbox_pool: |
83 | mempool_destroy(phba->mbox_mem_pool); | 86 | mempool_destroy(phba->mbox_mem_pool); |
84 | fail_free_mbuf_pool: | 87 | fail_free_mbuf_pool: |
85 | while (--i) | 88 | while (i--) |
86 | pci_pool_free(phba->lpfc_mbuf_pool, pool->elements[i].virt, | 89 | pci_pool_free(phba->lpfc_mbuf_pool, pool->elements[i].virt, |
87 | pool->elements[i].phys); | 90 | pool->elements[i].phys); |
88 | kfree(pool->elements); | 91 | kfree(pool->elements); |
92 | fail_free_lpfc_mbuf_pool: | ||
89 | pci_pool_destroy(phba->lpfc_mbuf_pool); | 93 | pci_pool_destroy(phba->lpfc_mbuf_pool); |
90 | fail_free_dma_buf_pool: | 94 | fail_free_dma_buf_pool: |
91 | pci_pool_destroy(phba->lpfc_scsi_dma_buf_pool); | 95 | pci_pool_destroy(phba->lpfc_scsi_dma_buf_pool); |
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c index 046223b4ae57..b5bdd0d7a8bf 100644 --- a/drivers/scsi/megaraid/megaraid_sas.c +++ b/drivers/scsi/megaraid/megaraid_sas.c | |||
@@ -13,8 +13,8 @@ | |||
13 | * Version : v00.00.03.05 | 13 | * Version : v00.00.03.05 |
14 | * | 14 | * |
15 | * Authors: | 15 | * Authors: |
16 | * Sreenivas Bagalkote <Sreenivas.Bagalkote@lsil.com> | 16 | * Sreenivas Bagalkote <Sreenivas.Bagalkote@lsi.com> |
17 | * Sumant Patro <Sumant.Patro@lsil.com> | 17 | * Sumant Patro <Sumant.Patro@lsi.com> |
18 | * | 18 | * |
19 | * List of supported controllers | 19 | * List of supported controllers |
20 | * | 20 | * |
@@ -45,7 +45,7 @@ | |||
45 | 45 | ||
46 | MODULE_LICENSE("GPL"); | 46 | MODULE_LICENSE("GPL"); |
47 | MODULE_VERSION(MEGASAS_VERSION); | 47 | MODULE_VERSION(MEGASAS_VERSION); |
48 | MODULE_AUTHOR("sreenivas.bagalkote@lsil.com"); | 48 | MODULE_AUTHOR("megaraidlinux@lsi.com"); |
49 | MODULE_DESCRIPTION("LSI Logic MegaRAID SAS Driver"); | 49 | MODULE_DESCRIPTION("LSI Logic MegaRAID SAS Driver"); |
50 | 50 | ||
51 | /* | 51 | /* |
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 16af5b79e587..1548d42a3b43 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c | |||
@@ -1341,7 +1341,7 @@ qla1280_return_status(struct response * sts, struct scsi_cmnd *cp) | |||
1341 | int host_status = DID_ERROR; | 1341 | int host_status = DID_ERROR; |
1342 | uint16_t comp_status = le16_to_cpu(sts->comp_status); | 1342 | uint16_t comp_status = le16_to_cpu(sts->comp_status); |
1343 | uint16_t state_flags = le16_to_cpu(sts->state_flags); | 1343 | uint16_t state_flags = le16_to_cpu(sts->state_flags); |
1344 | uint16_t residual_length = le32_to_cpu(sts->residual_length); | 1344 | uint32_t residual_length = le32_to_cpu(sts->residual_length); |
1345 | uint16_t scsi_status = le16_to_cpu(sts->scsi_status); | 1345 | uint16_t scsi_status = le16_to_cpu(sts->scsi_status); |
1346 | #if DEBUG_QLA1280_INTR | 1346 | #if DEBUG_QLA1280_INTR |
1347 | static char *reason[] = { | 1347 | static char *reason[] = { |
@@ -1413,8 +1413,10 @@ qla1280_return_status(struct response * sts, struct scsi_cmnd *cp) | |||
1413 | "scsi: Underflow detected - retrying " | 1413 | "scsi: Underflow detected - retrying " |
1414 | "command.\n"); | 1414 | "command.\n"); |
1415 | host_status = DID_ERROR; | 1415 | host_status = DID_ERROR; |
1416 | } else | 1416 | } else { |
1417 | cp->resid = residual_length; | ||
1417 | host_status = DID_OK; | 1418 | host_status = DID_OK; |
1419 | } | ||
1418 | break; | 1420 | break; |
1419 | 1421 | ||
1420 | default: | 1422 | default: |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index c4fc40f8e8ca..2c10130d9e03 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -1602,6 +1602,7 @@ typedef struct fc_port { | |||
1602 | 1602 | ||
1603 | #define CT_REJECT_RESPONSE 0x8001 | 1603 | #define CT_REJECT_RESPONSE 0x8001 |
1604 | #define CT_ACCEPT_RESPONSE 0x8002 | 1604 | #define CT_ACCEPT_RESPONSE 0x8002 |
1605 | #define CT_REASON_INVALID_COMMAND_CODE 0x01 | ||
1605 | #define CT_REASON_CANNOT_PERFORM 0x09 | 1606 | #define CT_REASON_CANNOT_PERFORM 0x09 |
1606 | #define CT_EXPL_ALREADY_REGISTERED 0x10 | 1607 | #define CT_EXPL_ALREADY_REGISTERED 0x10 |
1607 | 1608 | ||
@@ -2079,6 +2080,7 @@ typedef struct scsi_qla_host { | |||
2079 | uint32_t msi_enabled :1; | 2080 | uint32_t msi_enabled :1; |
2080 | uint32_t msix_enabled :1; | 2081 | uint32_t msix_enabled :1; |
2081 | uint32_t disable_serdes :1; | 2082 | uint32_t disable_serdes :1; |
2083 | uint32_t gpsc_supported :1; | ||
2082 | } flags; | 2084 | } flags; |
2083 | 2085 | ||
2084 | atomic_t loop_state; | 2086 | atomic_t loop_state; |
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index 32ebeec45ff0..e4dd12f4b80e 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h | |||
@@ -45,7 +45,6 @@ extern void qla2x00_update_fcports(scsi_qla_host_t *); | |||
45 | extern int qla2x00_abort_isp(scsi_qla_host_t *); | 45 | extern int qla2x00_abort_isp(scsi_qla_host_t *); |
46 | 46 | ||
47 | extern void qla2x00_update_fcport(scsi_qla_host_t *, fc_port_t *); | 47 | extern void qla2x00_update_fcport(scsi_qla_host_t *, fc_port_t *); |
48 | extern void qla2x00_reg_remote_port(scsi_qla_host_t *, fc_port_t *); | ||
49 | 48 | ||
50 | extern void qla2x00_alloc_fw_dump(scsi_qla_host_t *); | 49 | extern void qla2x00_alloc_fw_dump(scsi_qla_host_t *); |
51 | extern void qla2x00_try_to_stop_firmware(scsi_qla_host_t *); | 50 | extern void qla2x00_try_to_stop_firmware(scsi_qla_host_t *); |
diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c index 97fbc62ec669..ec5b2dd90d6a 100644 --- a/drivers/scsi/qla2xxx/qla_gs.c +++ b/drivers/scsi/qla2xxx/qla_gs.c | |||
@@ -127,8 +127,8 @@ qla2x00_chk_ms_status(scsi_qla_host_t *ha, ms_iocb_entry_t *ms_pkt, | |||
127 | ha->host_no, routine, ms_pkt->entry_status)); | 127 | ha->host_no, routine, ms_pkt->entry_status)); |
128 | } else { | 128 | } else { |
129 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) | 129 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) |
130 | comp_status = | 130 | comp_status = le16_to_cpu( |
131 | ((struct ct_entry_24xx *)ms_pkt)->comp_status; | 131 | ((struct ct_entry_24xx *)ms_pkt)->comp_status); |
132 | else | 132 | else |
133 | comp_status = le16_to_cpu(ms_pkt->status); | 133 | comp_status = le16_to_cpu(ms_pkt->status); |
134 | switch (comp_status) { | 134 | switch (comp_status) { |
@@ -143,6 +143,7 @@ qla2x00_chk_ms_status(scsi_qla_host_t *ha, ms_iocb_entry_t *ms_pkt, | |||
143 | DEBUG2_3(qla2x00_dump_buffer( | 143 | DEBUG2_3(qla2x00_dump_buffer( |
144 | (uint8_t *)&ct_rsp->header, | 144 | (uint8_t *)&ct_rsp->header, |
145 | sizeof(struct ct_rsp_hdr))); | 145 | sizeof(struct ct_rsp_hdr))); |
146 | rval = QLA_INVALID_COMMAND; | ||
146 | } else | 147 | } else |
147 | rval = QLA_SUCCESS; | 148 | rval = QLA_SUCCESS; |
148 | break; | 149 | break; |
@@ -1683,7 +1684,7 @@ qla2x00_gfpn_id(scsi_qla_host_t *ha, sw_info_t *list) | |||
1683 | memset(list[i].fabric_port_name, 0, WWN_SIZE); | 1684 | memset(list[i].fabric_port_name, 0, WWN_SIZE); |
1684 | 1685 | ||
1685 | /* Prepare common MS IOCB */ | 1686 | /* Prepare common MS IOCB */ |
1686 | ms_pkt = qla2x00_prep_ms_iocb(ha, GFPN_ID_REQ_SIZE, | 1687 | ms_pkt = ha->isp_ops.prep_ms_iocb(ha, GFPN_ID_REQ_SIZE, |
1687 | GFPN_ID_RSP_SIZE); | 1688 | GFPN_ID_RSP_SIZE); |
1688 | 1689 | ||
1689 | /* Prepare CT request */ | 1690 | /* Prepare CT request */ |
@@ -1784,6 +1785,8 @@ qla2x00_gpsc(scsi_qla_host_t *ha, sw_info_t *list) | |||
1784 | 1785 | ||
1785 | if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) | 1786 | if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) |
1786 | return QLA_FUNCTION_FAILED; | 1787 | return QLA_FUNCTION_FAILED; |
1788 | if (!ha->flags.gpsc_supported) | ||
1789 | return QLA_FUNCTION_FAILED; | ||
1787 | 1790 | ||
1788 | rval = qla2x00_mgmt_svr_login(ha); | 1791 | rval = qla2x00_mgmt_svr_login(ha); |
1789 | if (rval) | 1792 | if (rval) |
@@ -1813,8 +1816,19 @@ qla2x00_gpsc(scsi_qla_host_t *ha, sw_info_t *list) | |||
1813 | /*EMPTY*/ | 1816 | /*EMPTY*/ |
1814 | DEBUG2_3(printk("scsi(%ld): GPSC issue IOCB " | 1817 | DEBUG2_3(printk("scsi(%ld): GPSC issue IOCB " |
1815 | "failed (%d).\n", ha->host_no, rval)); | 1818 | "failed (%d).\n", ha->host_no, rval)); |
1816 | } else if (qla2x00_chk_ms_status(ha, ms_pkt, ct_rsp, | 1819 | } else if ((rval = qla2x00_chk_ms_status(ha, ms_pkt, ct_rsp, |
1817 | "GPSC") != QLA_SUCCESS) { | 1820 | "GPSC")) != QLA_SUCCESS) { |
1821 | /* FM command unsupported? */ | ||
1822 | if (rval == QLA_INVALID_COMMAND && | ||
1823 | ct_rsp->header.reason_code == | ||
1824 | CT_REASON_INVALID_COMMAND_CODE) { | ||
1825 | DEBUG2(printk("scsi(%ld): GPSC command " | ||
1826 | "unsupported, disabling query...\n", | ||
1827 | ha->host_no)); | ||
1828 | ha->flags.gpsc_supported = 0; | ||
1829 | rval = QLA_FUNCTION_FAILED; | ||
1830 | break; | ||
1831 | } | ||
1818 | rval = QLA_FUNCTION_FAILED; | 1832 | rval = QLA_FUNCTION_FAILED; |
1819 | } else { | 1833 | } else { |
1820 | /* Save portname */ | 1834 | /* Save portname */ |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index a823f0bc519d..b3dac26ddba3 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -2103,40 +2103,7 @@ qla2x00_iidma_fcport(scsi_qla_host_t *ha, fc_port_t *fcport) | |||
2103 | } | 2103 | } |
2104 | } | 2104 | } |
2105 | 2105 | ||
2106 | /* | 2106 | static void |
2107 | * qla2x00_update_fcport | ||
2108 | * Updates device on list. | ||
2109 | * | ||
2110 | * Input: | ||
2111 | * ha = adapter block pointer. | ||
2112 | * fcport = port structure pointer. | ||
2113 | * | ||
2114 | * Return: | ||
2115 | * 0 - Success | ||
2116 | * BIT_0 - error | ||
2117 | * | ||
2118 | * Context: | ||
2119 | * Kernel context. | ||
2120 | */ | ||
2121 | void | ||
2122 | qla2x00_update_fcport(scsi_qla_host_t *ha, fc_port_t *fcport) | ||
2123 | { | ||
2124 | fcport->ha = ha; | ||
2125 | fcport->login_retry = 0; | ||
2126 | fcport->port_login_retry_count = ha->port_down_retry_count * | ||
2127 | PORT_RETRY_TIME; | ||
2128 | atomic_set(&fcport->port_down_timer, ha->port_down_retry_count * | ||
2129 | PORT_RETRY_TIME); | ||
2130 | fcport->flags &= ~FCF_LOGIN_NEEDED; | ||
2131 | |||
2132 | qla2x00_iidma_fcport(ha, fcport); | ||
2133 | |||
2134 | atomic_set(&fcport->state, FCS_ONLINE); | ||
2135 | |||
2136 | qla2x00_reg_remote_port(ha, fcport); | ||
2137 | } | ||
2138 | |||
2139 | void | ||
2140 | qla2x00_reg_remote_port(scsi_qla_host_t *ha, fc_port_t *fcport) | 2107 | qla2x00_reg_remote_port(scsi_qla_host_t *ha, fc_port_t *fcport) |
2141 | { | 2108 | { |
2142 | struct fc_rport_identifiers rport_ids; | 2109 | struct fc_rport_identifiers rport_ids; |
@@ -2179,6 +2146,39 @@ qla2x00_reg_remote_port(scsi_qla_host_t *ha, fc_port_t *fcport) | |||
2179 | } | 2146 | } |
2180 | 2147 | ||
2181 | /* | 2148 | /* |
2149 | * qla2x00_update_fcport | ||
2150 | * Updates device on list. | ||
2151 | * | ||
2152 | * Input: | ||
2153 | * ha = adapter block pointer. | ||
2154 | * fcport = port structure pointer. | ||
2155 | * | ||
2156 | * Return: | ||
2157 | * 0 - Success | ||
2158 | * BIT_0 - error | ||
2159 | * | ||
2160 | * Context: | ||
2161 | * Kernel context. | ||
2162 | */ | ||
2163 | void | ||
2164 | qla2x00_update_fcport(scsi_qla_host_t *ha, fc_port_t *fcport) | ||
2165 | { | ||
2166 | fcport->ha = ha; | ||
2167 | fcport->login_retry = 0; | ||
2168 | fcport->port_login_retry_count = ha->port_down_retry_count * | ||
2169 | PORT_RETRY_TIME; | ||
2170 | atomic_set(&fcport->port_down_timer, ha->port_down_retry_count * | ||
2171 | PORT_RETRY_TIME); | ||
2172 | fcport->flags &= ~FCF_LOGIN_NEEDED; | ||
2173 | |||
2174 | qla2x00_iidma_fcport(ha, fcport); | ||
2175 | |||
2176 | atomic_set(&fcport->state, FCS_ONLINE); | ||
2177 | |||
2178 | qla2x00_reg_remote_port(ha, fcport); | ||
2179 | } | ||
2180 | |||
2181 | /* | ||
2182 | * qla2x00_configure_fabric | 2182 | * qla2x00_configure_fabric |
2183 | * Setup SNS devices with loop ID's. | 2183 | * Setup SNS devices with loop ID's. |
2184 | * | 2184 | * |
@@ -3476,9 +3476,11 @@ qla24xx_nvram_config(scsi_qla_host_t *ha) | |||
3476 | 3476 | ||
3477 | /* Set host adapter parameters. */ | 3477 | /* Set host adapter parameters. */ |
3478 | ha->flags.disable_risc_code_load = 0; | 3478 | ha->flags.disable_risc_code_load = 0; |
3479 | ha->flags.enable_lip_reset = 1; | 3479 | ha->flags.enable_lip_reset = 0; |
3480 | ha->flags.enable_lip_full_login = 1; | 3480 | ha->flags.enable_lip_full_login = |
3481 | ha->flags.enable_target_reset = 1; | 3481 | le32_to_cpu(nv->host_p) & BIT_10 ? 1: 0; |
3482 | ha->flags.enable_target_reset = | ||
3483 | le32_to_cpu(nv->host_p) & BIT_11 ? 1: 0; | ||
3482 | ha->flags.enable_led_scheme = 0; | 3484 | ha->flags.enable_led_scheme = 0; |
3483 | ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1: 0; | 3485 | ha->flags.disable_serdes = le32_to_cpu(nv->host_p) & BIT_5 ? 1: 0; |
3484 | 3486 | ||
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index d3b6df4d55c8..39fd17b05be5 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
@@ -134,11 +134,11 @@ qla2300_intr_handler(int irq, void *dev_id) | |||
134 | if (stat & HSR_RISC_PAUSED) { | 134 | if (stat & HSR_RISC_PAUSED) { |
135 | hccr = RD_REG_WORD(®->hccr); | 135 | hccr = RD_REG_WORD(®->hccr); |
136 | if (hccr & (BIT_15 | BIT_13 | BIT_11 | BIT_8)) | 136 | if (hccr & (BIT_15 | BIT_13 | BIT_11 | BIT_8)) |
137 | qla_printk(KERN_INFO, ha, | 137 | qla_printk(KERN_INFO, ha, "Parity error -- " |
138 | "Parity error -- HCCR=%x.\n", hccr); | 138 | "HCCR=%x, Dumping firmware!\n", hccr); |
139 | else | 139 | else |
140 | qla_printk(KERN_INFO, ha, | 140 | qla_printk(KERN_INFO, ha, "RISC paused -- " |
141 | "RISC paused -- HCCR=%x.\n", hccr); | 141 | "HCCR=%x, Dumping firmware!\n", hccr); |
142 | 142 | ||
143 | /* | 143 | /* |
144 | * Issue a "HARD" reset in order for the RISC | 144 | * Issue a "HARD" reset in order for the RISC |
@@ -147,6 +147,8 @@ qla2300_intr_handler(int irq, void *dev_id) | |||
147 | */ | 147 | */ |
148 | WRT_REG_WORD(®->hccr, HCCR_RESET_RISC); | 148 | WRT_REG_WORD(®->hccr, HCCR_RESET_RISC); |
149 | RD_REG_WORD(®->hccr); | 149 | RD_REG_WORD(®->hccr); |
150 | |||
151 | ha->isp_ops.fw_dump(ha, 1); | ||
150 | set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); | 152 | set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); |
151 | break; | 153 | break; |
152 | } else if ((stat & HSR_RISC_INT) == 0) | 154 | } else if ((stat & HSR_RISC_INT) == 0) |
@@ -475,6 +477,8 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) | |||
475 | set_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); | 477 | set_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); |
476 | } | 478 | } |
477 | set_bit(REGISTER_FC4_NEEDED, &ha->dpc_flags); | 479 | set_bit(REGISTER_FC4_NEEDED, &ha->dpc_flags); |
480 | |||
481 | ha->flags.gpsc_supported = 1; | ||
478 | break; | 482 | break; |
479 | 483 | ||
480 | case MBA_CHG_IN_CONNECTION: /* Change in connection mode */ | 484 | case MBA_CHG_IN_CONNECTION: /* Change in connection mode */ |
@@ -1440,8 +1444,7 @@ qla24xx_intr_handler(int irq, void *dev_id) | |||
1440 | 1444 | ||
1441 | qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, " | 1445 | qla_printk(KERN_INFO, ha, "RISC paused -- HCCR=%x, " |
1442 | "Dumping firmware!\n", hccr); | 1446 | "Dumping firmware!\n", hccr); |
1443 | qla24xx_fw_dump(ha, 1); | 1447 | ha->isp_ops.fw_dump(ha, 1); |
1444 | |||
1445 | set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); | 1448 | set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); |
1446 | break; | 1449 | break; |
1447 | } else if ((stat & HSRX_RISC_INT) == 0) | 1450 | } else if ((stat & HSRX_RISC_INT) == 0) |
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 4cde76c85cb3..077e5789beeb 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -1339,9 +1339,9 @@ qla2x00_lip_reset(scsi_qla_host_t *ha) | |||
1339 | 1339 | ||
1340 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { | 1340 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
1341 | mcp->mb[0] = MBC_LIP_FULL_LOGIN; | 1341 | mcp->mb[0] = MBC_LIP_FULL_LOGIN; |
1342 | mcp->mb[1] = BIT_0; | 1342 | mcp->mb[1] = BIT_6; |
1343 | mcp->mb[2] = 0xff; | 1343 | mcp->mb[2] = 0; |
1344 | mcp->mb[3] = 0; | 1344 | mcp->mb[3] = ha->loop_reset_delay; |
1345 | mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0; | 1345 | mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0; |
1346 | } else { | 1346 | } else { |
1347 | mcp->mb[0] = MBC_LIP_RESET; | 1347 | mcp->mb[0] = MBC_LIP_RESET; |
@@ -1823,8 +1823,8 @@ qla2x00_full_login_lip(scsi_qla_host_t *ha) | |||
1823 | ha->host_no)); | 1823 | ha->host_no)); |
1824 | 1824 | ||
1825 | mcp->mb[0] = MBC_LIP_FULL_LOGIN; | 1825 | mcp->mb[0] = MBC_LIP_FULL_LOGIN; |
1826 | mcp->mb[1] = 0; | 1826 | mcp->mb[1] = IS_QLA24XX(ha) || IS_QLA54XX(ha) ? BIT_3: 0; |
1827 | mcp->mb[2] = 0xff; | 1827 | mcp->mb[2] = 0; |
1828 | mcp->mb[3] = 0; | 1828 | mcp->mb[3] = 0; |
1829 | mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0; | 1829 | mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0; |
1830 | mcp->in_mb = MBX_0; | 1830 | mcp->in_mb = MBX_0; |
@@ -2486,7 +2486,7 @@ qla2x00_trace_control(scsi_qla_host_t *ha, uint16_t ctrl, dma_addr_t eft_dma, | |||
2486 | mcp->mb[4] = LSW(MSD(eft_dma)); | 2486 | mcp->mb[4] = LSW(MSD(eft_dma)); |
2487 | mcp->mb[5] = MSW(MSD(eft_dma)); | 2487 | mcp->mb[5] = MSW(MSD(eft_dma)); |
2488 | mcp->mb[6] = buffers; | 2488 | mcp->mb[6] = buffers; |
2489 | mcp->mb[7] = buffers; | 2489 | mcp->mb[7] = 0; |
2490 | mcp->out_mb |= MBX_7|MBX_6|MBX_5|MBX_4|MBX_3|MBX_2; | 2490 | mcp->out_mb |= MBX_7|MBX_6|MBX_5|MBX_4|MBX_3|MBX_2; |
2491 | } | 2491 | } |
2492 | mcp->tov = 30; | 2492 | mcp->tov = 30; |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index d03523d3bf38..d6445ae841ba 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -1037,48 +1037,49 @@ eh_host_reset_lock: | |||
1037 | static int | 1037 | static int |
1038 | qla2x00_loop_reset(scsi_qla_host_t *ha) | 1038 | qla2x00_loop_reset(scsi_qla_host_t *ha) |
1039 | { | 1039 | { |
1040 | int status = QLA_SUCCESS; | 1040 | int ret; |
1041 | struct fc_port *fcport; | 1041 | struct fc_port *fcport; |
1042 | 1042 | ||
1043 | if (ha->flags.enable_lip_full_login) { | ||
1044 | ret = qla2x00_full_login_lip(ha); | ||
1045 | if (ret != QLA_SUCCESS) { | ||
1046 | DEBUG2_3(printk("%s(%ld): bus_reset failed: " | ||
1047 | "full_login_lip=%d.\n", __func__, ha->host_no, | ||
1048 | ret)); | ||
1049 | } | ||
1050 | atomic_set(&ha->loop_state, LOOP_DOWN); | ||
1051 | atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME); | ||
1052 | qla2x00_mark_all_devices_lost(ha, 0); | ||
1053 | qla2x00_wait_for_loop_ready(ha); | ||
1054 | } | ||
1055 | |||
1043 | if (ha->flags.enable_lip_reset) { | 1056 | if (ha->flags.enable_lip_reset) { |
1044 | status = qla2x00_lip_reset(ha); | 1057 | ret = qla2x00_lip_reset(ha); |
1058 | if (ret != QLA_SUCCESS) { | ||
1059 | DEBUG2_3(printk("%s(%ld): bus_reset failed: " | ||
1060 | "lip_reset=%d.\n", __func__, ha->host_no, ret)); | ||
1061 | } | ||
1062 | qla2x00_wait_for_loop_ready(ha); | ||
1045 | } | 1063 | } |
1046 | 1064 | ||
1047 | if (status == QLA_SUCCESS && ha->flags.enable_target_reset) { | 1065 | if (ha->flags.enable_target_reset) { |
1048 | list_for_each_entry(fcport, &ha->fcports, list) { | 1066 | list_for_each_entry(fcport, &ha->fcports, list) { |
1049 | if (fcport->port_type != FCT_TARGET) | 1067 | if (fcport->port_type != FCT_TARGET) |
1050 | continue; | 1068 | continue; |
1051 | 1069 | ||
1052 | status = qla2x00_device_reset(ha, fcport); | 1070 | ret = qla2x00_device_reset(ha, fcport); |
1053 | if (status != QLA_SUCCESS) | 1071 | if (ret != QLA_SUCCESS) { |
1054 | break; | 1072 | DEBUG2_3(printk("%s(%ld): bus_reset failed: " |
1073 | "target_reset=%d d_id=%x.\n", __func__, | ||
1074 | ha->host_no, ret, fcport->d_id.b24)); | ||
1075 | } | ||
1055 | } | 1076 | } |
1056 | } | 1077 | } |
1057 | 1078 | ||
1058 | if (status == QLA_SUCCESS && | ||
1059 | ((!ha->flags.enable_target_reset && | ||
1060 | !ha->flags.enable_lip_reset) || | ||
1061 | ha->flags.enable_lip_full_login)) { | ||
1062 | |||
1063 | status = qla2x00_full_login_lip(ha); | ||
1064 | } | ||
1065 | |||
1066 | /* Issue marker command only when we are going to start the I/O */ | 1079 | /* Issue marker command only when we are going to start the I/O */ |
1067 | ha->marker_needed = 1; | 1080 | ha->marker_needed = 1; |
1068 | 1081 | ||
1069 | if (status) { | 1082 | return QLA_SUCCESS; |
1070 | /* Empty */ | ||
1071 | DEBUG2_3(printk("%s(%ld): **** FAILED ****\n", | ||
1072 | __func__, | ||
1073 | ha->host_no)); | ||
1074 | } else { | ||
1075 | /* Empty */ | ||
1076 | DEBUG3(printk("%s(%ld): exiting normally.\n", | ||
1077 | __func__, | ||
1078 | ha->host_no)); | ||
1079 | } | ||
1080 | |||
1081 | return(status); | ||
1082 | } | 1083 | } |
1083 | 1084 | ||
1084 | /* | 1085 | /* |
@@ -1413,7 +1414,9 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1413 | 1414 | ||
1414 | sht = &qla2x00_driver_template; | 1415 | sht = &qla2x00_driver_template; |
1415 | if (pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2422 || | 1416 | if (pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2422 || |
1416 | pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2432) | 1417 | pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2432 || |
1418 | pdev->device == PCI_DEVICE_ID_QLOGIC_ISP5422 || | ||
1419 | pdev->device == PCI_DEVICE_ID_QLOGIC_ISP5432) | ||
1417 | sht = &qla24xx_driver_template; | 1420 | sht = &qla24xx_driver_template; |
1418 | host = scsi_host_alloc(sht, sizeof(scsi_qla_host_t)); | 1421 | host = scsi_host_alloc(sht, sizeof(scsi_qla_host_t)); |
1419 | if (host == NULL) { | 1422 | if (host == NULL) { |
diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h index 1fa0bce6b24e..459e0d6bd2b4 100644 --- a/drivers/scsi/qla2xxx/qla_version.h +++ b/drivers/scsi/qla2xxx/qla_version.h | |||
@@ -7,7 +7,7 @@ | |||
7 | /* | 7 | /* |
8 | * Driver version | 8 | * Driver version |
9 | */ | 9 | */ |
10 | #define QLA2XXX_VERSION "8.01.07-k3" | 10 | #define QLA2XXX_VERSION "8.01.07-k4" |
11 | 11 | ||
12 | #define QLA_DRIVER_MAJOR_VER 8 | 12 | #define QLA_DRIVER_MAJOR_VER 8 |
13 | #define QLA_DRIVER_MINOR_VER 1 | 13 | #define QLA_DRIVER_MINOR_VER 1 |
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 14e635aa44ce..b83d03c4deef 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
@@ -133,12 +133,10 @@ struct async_scan_data { | |||
133 | /** | 133 | /** |
134 | * scsi_complete_async_scans - Wait for asynchronous scans to complete | 134 | * scsi_complete_async_scans - Wait for asynchronous scans to complete |
135 | * | 135 | * |
136 | * Asynchronous scans add themselves to the scanning_hosts list. Once | 136 | * When this function returns, any host which started scanning before |
137 | * that list is empty, we know that the scans are complete. Rather than | 137 | * this function was called will have finished its scan. Hosts which |
138 | * waking up periodically to check the state of the list, we pretend to be | 138 | * started scanning after this function was called may or may not have |
139 | * a scanning task by adding ourselves at the end of the list and going to | 139 | * finished. |
140 | * sleep. When the task before us wakes us up, we take ourselves off the | ||
141 | * list and return. | ||
142 | */ | 140 | */ |
143 | int scsi_complete_async_scans(void) | 141 | int scsi_complete_async_scans(void) |
144 | { | 142 | { |
@@ -171,6 +169,11 @@ int scsi_complete_async_scans(void) | |||
171 | 169 | ||
172 | spin_lock(&async_scan_lock); | 170 | spin_lock(&async_scan_lock); |
173 | list_del(&data->list); | 171 | list_del(&data->list); |
172 | if (!list_empty(&scanning_hosts)) { | ||
173 | struct async_scan_data *next = list_entry(scanning_hosts.next, | ||
174 | struct async_scan_data, list); | ||
175 | complete(&next->prev_finished); | ||
176 | } | ||
174 | done: | 177 | done: |
175 | spin_unlock(&async_scan_lock); | 178 | spin_unlock(&async_scan_lock); |
176 | 179 | ||
@@ -739,6 +742,14 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result, | |||
739 | sdev->no_uld_attach = 1; | 742 | sdev->no_uld_attach = 1; |
740 | 743 | ||
741 | switch (sdev->type = (inq_result[0] & 0x1f)) { | 744 | switch (sdev->type = (inq_result[0] & 0x1f)) { |
745 | case TYPE_RBC: | ||
746 | /* RBC devices can return SCSI-3 compliance and yet | ||
747 | * still not support REPORT LUNS, so make them act as | ||
748 | * BLIST_NOREPORTLUN unless BLIST_REPORTLUN2 is | ||
749 | * specifically set */ | ||
750 | if ((*bflags & BLIST_REPORTLUN2) == 0) | ||
751 | *bflags |= BLIST_NOREPORTLUN; | ||
752 | /* fall through */ | ||
742 | case TYPE_TAPE: | 753 | case TYPE_TAPE: |
743 | case TYPE_DISK: | 754 | case TYPE_DISK: |
744 | case TYPE_PRINTER: | 755 | case TYPE_PRINTER: |
@@ -749,11 +760,17 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result, | |||
749 | case TYPE_ENCLOSURE: | 760 | case TYPE_ENCLOSURE: |
750 | case TYPE_COMM: | 761 | case TYPE_COMM: |
751 | case TYPE_RAID: | 762 | case TYPE_RAID: |
752 | case TYPE_RBC: | ||
753 | sdev->writeable = 1; | 763 | sdev->writeable = 1; |
754 | break; | 764 | break; |
755 | case TYPE_WORM: | ||
756 | case TYPE_ROM: | 765 | case TYPE_ROM: |
766 | /* MMC devices can return SCSI-3 compliance and yet | ||
767 | * still not support REPORT LUNS, so make them act as | ||
768 | * BLIST_NOREPORTLUN unless BLIST_REPORTLUN2 is | ||
769 | * specifically set */ | ||
770 | if ((*bflags & BLIST_REPORTLUN2) == 0) | ||
771 | *bflags |= BLIST_NOREPORTLUN; | ||
772 | /* fall through */ | ||
773 | case TYPE_WORM: | ||
757 | sdev->writeable = 0; | 774 | sdev->writeable = 0; |
758 | break; | 775 | break; |
759 | default: | 776 | default: |
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index 9c22f1342715..ce0d14af33c8 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c | |||
@@ -1416,7 +1416,7 @@ static __init int iscsi_transport_init(void) | |||
1416 | { | 1416 | { |
1417 | int err; | 1417 | int err; |
1418 | 1418 | ||
1419 | printk(KERN_INFO "Loading iSCSI transport class v%s.", | 1419 | printk(KERN_INFO "Loading iSCSI transport class v%s.\n", |
1420 | ISCSI_TRANSPORT_VERSION); | 1420 | ISCSI_TRANSPORT_VERSION); |
1421 | 1421 | ||
1422 | err = class_register(&iscsi_transport_class); | 1422 | err = class_register(&iscsi_transport_class); |
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c index 3fded4831460..014d7fea1ff3 100644 --- a/drivers/scsi/scsi_transport_spi.c +++ b/drivers/scsi/scsi_transport_spi.c | |||
@@ -122,7 +122,7 @@ static int spi_execute(struct scsi_device *sdev, const void *cmd, | |||
122 | if (!sshdr) | 122 | if (!sshdr) |
123 | sshdr = &sshdr_tmp; | 123 | sshdr = &sshdr_tmp; |
124 | 124 | ||
125 | if (scsi_normalize_sense(sense, sizeof(*sense), | 125 | if (scsi_normalize_sense(sense, SCSI_SENSE_BUFFERSIZE, |
126 | sshdr) | 126 | sshdr) |
127 | && sshdr->sense_key == UNIT_ATTENTION) | 127 | && sshdr->sense_key == UNIT_ATTENTION) |
128 | continue; | 128 | continue; |
diff --git a/drivers/scsi/seagate.c b/drivers/scsi/seagate.c index 5ffec2721b28..ff62e9708e1c 100644 --- a/drivers/scsi/seagate.c +++ b/drivers/scsi/seagate.c | |||
@@ -114,6 +114,7 @@ | |||
114 | #define DPRINTK( when, msg... ) do { if ( (DEBUG & (when)) == (when) ) printk( msg ); } while (0) | 114 | #define DPRINTK( when, msg... ) do { if ( (DEBUG & (when)) == (when) ) printk( msg ); } while (0) |
115 | #else | 115 | #else |
116 | #define DPRINTK( when, msg... ) do { } while (0) | 116 | #define DPRINTK( when, msg... ) do { } while (0) |
117 | #define DEBUG 0 | ||
117 | #endif | 118 | #endif |
118 | #define DANY( msg... ) DPRINTK( 0xffff, msg ); | 119 | #define DANY( msg... ) DPRINTK( 0xffff, msg ); |
119 | 120 | ||
@@ -523,7 +524,7 @@ int __init seagate_st0x_detect (struct scsi_host_template * tpnt) | |||
523 | #ifdef ARBITRATE | 524 | #ifdef ARBITRATE |
524 | " ARBITRATE" | 525 | " ARBITRATE" |
525 | #endif | 526 | #endif |
526 | #ifdef DEBUG | 527 | #if DEBUG |
527 | " DEBUG" | 528 | " DEBUG" |
528 | #endif | 529 | #endif |
529 | #ifdef FAST | 530 | #ifdef FAST |
@@ -733,7 +734,7 @@ static int internal_command (unsigned char target, unsigned char lun, | |||
733 | unsigned char *data = NULL; | 734 | unsigned char *data = NULL; |
734 | struct scatterlist *buffer = NULL; | 735 | struct scatterlist *buffer = NULL; |
735 | int clock, temp, nobuffs = 0, done = 0, len = 0; | 736 | int clock, temp, nobuffs = 0, done = 0, len = 0; |
736 | #ifdef DEBUG | 737 | #if DEBUG |
737 | int transfered = 0, phase = 0, newphase; | 738 | int transfered = 0, phase = 0, newphase; |
738 | #endif | 739 | #endif |
739 | register unsigned char status_read; | 740 | register unsigned char status_read; |
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index fae6e95a6298..89e9b36b1788 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c | |||
@@ -468,7 +468,7 @@ static int sr_block_ioctl(struct inode *inode, struct file *file, unsigned cmd, | |||
468 | } | 468 | } |
469 | 469 | ||
470 | ret = cdrom_ioctl(file, &cd->cdi, inode, cmd, arg); | 470 | ret = cdrom_ioctl(file, &cd->cdi, inode, cmd, arg); |
471 | if (ret != ENOSYS) | 471 | if (ret != -ENOSYS) |
472 | return ret; | 472 | return ret; |
473 | 473 | ||
474 | /* | 474 | /* |