aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/cciss.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/cciss.c')
-rw-r--r--drivers/block/cciss.c81
1 files changed, 52 insertions, 29 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index e336b05fe4a7..d81632cd7d06 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -53,15 +53,16 @@
53#include <linux/scatterlist.h> 53#include <linux/scatterlist.h>
54 54
55#define CCISS_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin)) 55#define CCISS_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin))
56#define DRIVER_NAME "HP CISS Driver (v 3.6.14)" 56#define DRIVER_NAME "HP CISS Driver (v 3.6.20)"
57#define DRIVER_VERSION CCISS_DRIVER_VERSION(3,6,14) 57#define DRIVER_VERSION CCISS_DRIVER_VERSION(3, 6, 20)
58 58
59/* Embedded module documentation macros - see modules.h */ 59/* Embedded module documentation macros - see modules.h */
60MODULE_AUTHOR("Hewlett-Packard Company"); 60MODULE_AUTHOR("Hewlett-Packard Company");
61MODULE_DESCRIPTION("Driver for HP Controller SA5xxx SA6xxx version 3.6.14"); 61MODULE_DESCRIPTION("Driver for HP Smart Array Controllers");
62MODULE_SUPPORTED_DEVICE("HP SA5i SA5i+ SA532 SA5300 SA5312 SA641 SA642 SA6400" 62MODULE_SUPPORTED_DEVICE("HP SA5i SA5i+ SA532 SA5300 SA5312 SA641 SA642 SA6400"
63 " SA6i P600 P800 P400 P400i E200 E200i E500"); 63 " SA6i P600 P800 P400 P400i E200 E200i E500 P700m"
64MODULE_VERSION("3.6.14"); 64 " Smart Array G2 Series SAS/SATA Controllers");
65MODULE_VERSION("3.6.20");
65MODULE_LICENSE("GPL"); 66MODULE_LICENSE("GPL");
66 67
67#include "cciss_cmd.h" 68#include "cciss_cmd.h"
@@ -90,6 +91,11 @@ static const struct pci_device_id cciss_pci_device_id[] = {
90 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3215}, 91 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3215},
91 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x3237}, 92 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x3237},
92 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x323D}, 93 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x323D},
94 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3241},
95 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3243},
96 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3245},
97 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3247},
98 {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSE, 0x103C, 0x3249},
93 {PCI_VENDOR_ID_HP, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, 99 {PCI_VENDOR_ID_HP, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
94 PCI_CLASS_STORAGE_RAID << 8, 0xffff << 8, 0}, 100 PCI_CLASS_STORAGE_RAID << 8, 0xffff << 8, 0},
95 {0,} 101 {0,}
@@ -100,30 +106,34 @@ MODULE_DEVICE_TABLE(pci, cciss_pci_device_id);
100/* board_id = Subsystem Device ID & Vendor ID 106/* board_id = Subsystem Device ID & Vendor ID
101 * product = Marketing Name for the board 107 * product = Marketing Name for the board
102 * access = Address of the struct of function pointers 108 * access = Address of the struct of function pointers
103 * nr_cmds = Number of commands supported by controller
104 */ 109 */
105static struct board_type products[] = { 110static struct board_type products[] = {
106 {0x40700E11, "Smart Array 5300", &SA5_access, 512}, 111 {0x40700E11, "Smart Array 5300", &SA5_access},
107 {0x40800E11, "Smart Array 5i", &SA5B_access, 512}, 112 {0x40800E11, "Smart Array 5i", &SA5B_access},
108 {0x40820E11, "Smart Array 532", &SA5B_access, 512}, 113 {0x40820E11, "Smart Array 532", &SA5B_access},
109 {0x40830E11, "Smart Array 5312", &SA5B_access, 512}, 114 {0x40830E11, "Smart Array 5312", &SA5B_access},
110 {0x409A0E11, "Smart Array 641", &SA5_access, 512}, 115 {0x409A0E11, "Smart Array 641", &SA5_access},
111 {0x409B0E11, "Smart Array 642", &SA5_access, 512}, 116 {0x409B0E11, "Smart Array 642", &SA5_access},
112 {0x409C0E11, "Smart Array 6400", &SA5_access, 512}, 117 {0x409C0E11, "Smart Array 6400", &SA5_access},
113 {0x409D0E11, "Smart Array 6400 EM", &SA5_access, 512}, 118 {0x409D0E11, "Smart Array 6400 EM", &SA5_access},
114 {0x40910E11, "Smart Array 6i", &SA5_access, 512}, 119 {0x40910E11, "Smart Array 6i", &SA5_access},
115 {0x3225103C, "Smart Array P600", &SA5_access, 512}, 120 {0x3225103C, "Smart Array P600", &SA5_access},
116 {0x3223103C, "Smart Array P800", &SA5_access, 512}, 121 {0x3223103C, "Smart Array P800", &SA5_access},
117 {0x3234103C, "Smart Array P400", &SA5_access, 512}, 122 {0x3234103C, "Smart Array P400", &SA5_access},
118 {0x3235103C, "Smart Array P400i", &SA5_access, 512}, 123 {0x3235103C, "Smart Array P400i", &SA5_access},
119 {0x3211103C, "Smart Array E200i", &SA5_access, 120}, 124 {0x3211103C, "Smart Array E200i", &SA5_access},
120 {0x3212103C, "Smart Array E200", &SA5_access, 120}, 125 {0x3212103C, "Smart Array E200", &SA5_access},
121 {0x3213103C, "Smart Array E200i", &SA5_access, 120}, 126 {0x3213103C, "Smart Array E200i", &SA5_access},
122 {0x3214103C, "Smart Array E200i", &SA5_access, 120}, 127 {0x3214103C, "Smart Array E200i", &SA5_access},
123 {0x3215103C, "Smart Array E200i", &SA5_access, 120}, 128 {0x3215103C, "Smart Array E200i", &SA5_access},
124 {0x3237103C, "Smart Array E500", &SA5_access, 512}, 129 {0x3237103C, "Smart Array E500", &SA5_access},
125 {0x323D103C, "Smart Array P700m", &SA5_access, 512}, 130 {0x323D103C, "Smart Array P700m", &SA5_access},
126 {0xFFFF103C, "Unknown Smart Array", &SA5_access, 120}, 131 {0x3241103C, "Smart Array P212", &SA5_access},
132 {0x3243103C, "Smart Array P410", &SA5_access},
133 {0x3245103C, "Smart Array P410i", &SA5_access},
134 {0x3247103C, "Smart Array P411", &SA5_access},
135 {0x3249103C, "Smart Array P812", &SA5_access},
136 {0xFFFF103C, "Unknown Smart Array", &SA5_access},
127}; 137};
128 138
129/* How long to wait (in milliseconds) for board to go into simple mode */ 139/* How long to wait (in milliseconds) for board to go into simple mode */
@@ -3075,11 +3085,20 @@ static int __devinit cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
3075 print_cfg_table(c->cfgtable); 3085 print_cfg_table(c->cfgtable);
3076#endif /* CCISS_DEBUG */ 3086#endif /* CCISS_DEBUG */
3077 3087
3088 /* Some controllers support Zero Memory Raid (ZMR).
3089 * When configured in ZMR mode the number of supported
3090 * commands drops to 64. So instead of just setting an
3091 * arbitrary value we make the driver a little smarter.
3092 * We read the config table to tell us how many commands
3093 * are supported on the controller then subtract 4 to
3094 * leave a little room for ioctl calls.
3095 */
3096 c->max_commands = readl(&(c->cfgtable->CmdsOutMax));
3078 for (i = 0; i < ARRAY_SIZE(products); i++) { 3097 for (i = 0; i < ARRAY_SIZE(products); i++) {
3079 if (board_id == products[i].board_id) { 3098 if (board_id == products[i].board_id) {
3080 c->product_name = products[i].product_name; 3099 c->product_name = products[i].product_name;
3081 c->access = *(products[i].access); 3100 c->access = *(products[i].access);
3082 c->nr_cmds = products[i].nr_cmds; 3101 c->nr_cmds = c->max_commands - 4;
3083 break; 3102 break;
3084 } 3103 }
3085 } 3104 }
@@ -3099,7 +3118,7 @@ static int __devinit cciss_pci_init(ctlr_info_t *c, struct pci_dev *pdev)
3099 if (subsystem_vendor_id == PCI_VENDOR_ID_HP) { 3118 if (subsystem_vendor_id == PCI_VENDOR_ID_HP) {
3100 c->product_name = products[i-1].product_name; 3119 c->product_name = products[i-1].product_name;
3101 c->access = *(products[i-1].access); 3120 c->access = *(products[i-1].access);
3102 c->nr_cmds = products[i-1].nr_cmds; 3121 c->nr_cmds = c->max_commands - 4;
3103 printk(KERN_WARNING "cciss: This is an unknown " 3122 printk(KERN_WARNING "cciss: This is an unknown "
3104 "Smart Array controller.\n" 3123 "Smart Array controller.\n"
3105 "cciss: Please update to the latest driver " 3124 "cciss: Please update to the latest driver "
@@ -3535,6 +3554,10 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
3535 for (j = 0; j <= hba[i]->highest_lun; j++) 3554 for (j = 0; j <= hba[i]->highest_lun; j++)
3536 add_disk(hba[i]->gendisk[j]); 3555 add_disk(hba[i]->gendisk[j]);
3537 3556
3557 /* we must register the controller even if no disks exist */
3558 if (hba[i]->highest_lun == -1)
3559 add_disk(hba[i]->gendisk[0]);
3560
3538 return 1; 3561 return 1;
3539 3562
3540 clean4: 3563 clean4: