2 * Engenio/LSI RDAC SCSI Device Handler
4 * Copyright (C) 2005 Mike Christie. All rights reserved.
5 * Copyright (C) Chandra Seetharaman, IBM Corp. 2007
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 #include <scsi/scsi.h>
23 #include <scsi/scsi_eh.h>
24 #include <scsi/scsi_dh.h>
25 #include <linux/workqueue.h>
26 #include <linux/slab.h>
28 #define RDAC_NAME "rdac"
29 #define RDAC_RETRY_COUNT 5
34 * These struct definitions and the forming of the
35 * mode page were taken from the LSI RDAC 2.4 GPL'd
36 * driver, and then converted to Linux conventions.
38 #define RDAC_QUIESCENCE_TIME 20;
42 #define RDAC_PAGE_CODE_REDUNDANT_CONTROLLER 0x2c
45 * Controller modes definitions
47 #define RDAC_MODE_TRANSFER_SPECIFIED_LUNS 0x02
52 #define RDAC_FORCED_QUIESENCE 0x02
54 #define RDAC_TIMEOUT (60 * HZ)
55 #define RDAC_RETRIES 3
57 struct rdac_mode_6_hdr {
64 struct rdac_mode_10_hdr {
72 struct rdac_mode_common {
73 u8 controller_serial[16];
74 u8 alt_controller_serial[16];
77 u8 quiescence_timeout;
81 struct rdac_pg_legacy {
82 struct rdac_mode_6_hdr hdr;
85 struct rdac_mode_common common;
86 #define MODE6_MAX_LUN 32
87 u8 lun_table[MODE6_MAX_LUN];
93 struct rdac_pg_expanded {
94 struct rdac_mode_10_hdr hdr;
98 struct rdac_mode_common common;
106 u8 page_code; /* 0xC9 */
109 u8 page_id[4]; /* "vace" */
115 #define SUBSYS_ID_LEN 16
116 #define SLOT_ID_LEN 2
117 #define ARRAY_LABEL_LEN 31
121 u8 page_code; /* 0xC4 */
124 u8 page_id[4]; /* "subs" */
125 u8 subsys_id[SUBSYS_ID_LEN];
127 u8 slot_id[SLOT_ID_LEN];
131 struct rdac_controller {
132 u8 subsys_id[SUBSYS_ID_LEN];
133 u8 slot_id[SLOT_ID_LEN];
136 struct list_head node; /* list of all controllers */
138 struct rdac_pg_legacy legacy;
139 struct rdac_pg_expanded expanded;
142 u8 array_name[ARRAY_LABEL_LEN];
145 struct work_struct ms_work;
146 struct scsi_device *ms_sdev;
147 struct list_head ms_head;
152 u8 page_code; /* 0xC8 */
155 u8 page_id[4]; /* "edid" */
159 u8 vol_user_label_len;
160 u8 vol_user_label[60];
161 u8 array_uniq_id_len;
162 u8 array_unique_id[16];
163 u8 array_user_label_len;
164 u8 array_user_label[60];
170 u8 page_code; /* 0xC2 */
173 u8 page_id[4]; /* "swr4" */
177 u8 max_lun_supported;
178 u8 partitions[239]; /* Total allocation length should be 0xFF */
181 struct rdac_dh_data {
182 struct rdac_controller *ctlr;
183 #define UNINITIALIZED_LUN (1 << 8)
185 #define RDAC_STATE_ACTIVE 0
186 #define RDAC_STATE_PASSIVE 1
189 #define RDAC_LUN_UNOWNED 0
190 #define RDAC_LUN_OWNED 1
191 #define RDAC_LUN_AVT 2
193 unsigned char sense[SCSI_SENSE_BUFFERSIZE];
195 struct c2_inquiry c2;
196 struct c4_inquiry c4;
197 struct c8_inquiry c8;
198 struct c9_inquiry c9;
202 static const char *lun_state[] =
209 struct rdac_queue_data {
210 struct list_head entry;
211 struct rdac_dh_data *h;
212 activate_complete callback_fn;
216 static LIST_HEAD(ctlr_list);
217 static DEFINE_SPINLOCK(list_lock);
218 static struct workqueue_struct *kmpath_rdacd;
219 static void send_mode_select(struct work_struct *work);
222 * module parameter to enable rdac debug logging.
223 * 2 bits for each type of logging, only two types defined for now
224 * Can be enhanced if required at later point
226 static int rdac_logging = 1;
227 module_param(rdac_logging, int, S_IRUGO|S_IWUSR);
228 MODULE_PARM_DESC(rdac_logging, "A bit mask of rdac logging levels, "
229 "Default is 1 - failover logging enabled, "
230 "set it to 0xF to enable all the logs");
232 #define RDAC_LOG_FAILOVER 0
233 #define RDAC_LOG_SENSE 2
235 #define RDAC_LOG_BITS 2
237 #define RDAC_LOG_LEVEL(SHIFT) \
238 ((rdac_logging >> (SHIFT)) & ((1 << (RDAC_LOG_BITS)) - 1))
240 #define RDAC_LOG(SHIFT, sdev, f, arg...) \
242 if (unlikely(RDAC_LOG_LEVEL(SHIFT))) \
243 sdev_printk(KERN_INFO, sdev, RDAC_NAME ": " f "\n", ## arg); \
246 static inline struct rdac_dh_data *get_rdac_data(struct scsi_device *sdev)
248 struct scsi_dh_data *scsi_dh_data = sdev->scsi_dh_data;
249 BUG_ON(scsi_dh_data == NULL);
250 return ((struct rdac_dh_data *) scsi_dh_data->buf);
253 static struct request *get_rdac_req(struct scsi_device *sdev,
254 void *buffer, unsigned buflen, int rw)
257 struct request_queue *q = sdev->request_queue;
259 rq = blk_get_request(q, rw, GFP_NOIO);
262 sdev_printk(KERN_INFO, sdev,
263 "get_rdac_req: blk_get_request failed.\n");
267 if (buflen && blk_rq_map_kern(q, rq, buffer, buflen, GFP_NOIO)) {
269 sdev_printk(KERN_INFO, sdev,
270 "get_rdac_req: blk_rq_map_kern failed.\n");
274 rq->cmd_type = REQ_TYPE_BLOCK_PC;
275 rq->cmd_flags |= REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT |
277 rq->retries = RDAC_RETRIES;
278 rq->timeout = RDAC_TIMEOUT;
283 static struct request *rdac_failover_get(struct scsi_device *sdev,
284 struct rdac_dh_data *h, struct list_head *list)
287 struct rdac_mode_common *common;
289 struct rdac_queue_data *qdata;
292 if (h->ctlr->use_ms10) {
293 struct rdac_pg_expanded *rdac_pg;
295 data_size = sizeof(struct rdac_pg_expanded);
296 rdac_pg = &h->ctlr->mode_select.expanded;
297 memset(rdac_pg, 0, data_size);
298 common = &rdac_pg->common;
299 rdac_pg->page_code = RDAC_PAGE_CODE_REDUNDANT_CONTROLLER + 0x40;
300 rdac_pg->subpage_code = 0x1;
301 rdac_pg->page_len[0] = 0x01;
302 rdac_pg->page_len[1] = 0x28;
303 lun_table = rdac_pg->lun_table;
305 struct rdac_pg_legacy *rdac_pg;
307 data_size = sizeof(struct rdac_pg_legacy);
308 rdac_pg = &h->ctlr->mode_select.legacy;
309 memset(rdac_pg, 0, data_size);
310 common = &rdac_pg->common;
311 rdac_pg->page_code = RDAC_PAGE_CODE_REDUNDANT_CONTROLLER;
312 rdac_pg->page_len = 0x68;
313 lun_table = rdac_pg->lun_table;
315 common->rdac_mode[1] = RDAC_MODE_TRANSFER_SPECIFIED_LUNS;
316 common->quiescence_timeout = RDAC_QUIESCENCE_TIME;
317 common->rdac_options = RDAC_FORCED_QUIESENCE;
319 list_for_each_entry(qdata, list, entry) {
320 lun_table[qdata->h->lun] = 0x81;
323 /* get request for block layer packet command */
324 rq = get_rdac_req(sdev, &h->ctlr->mode_select, data_size, WRITE);
328 /* Prepare the command. */
329 if (h->ctlr->use_ms10) {
330 rq->cmd[0] = MODE_SELECT_10;
331 rq->cmd[7] = data_size >> 8;
332 rq->cmd[8] = data_size & 0xff;
334 rq->cmd[0] = MODE_SELECT;
335 rq->cmd[4] = data_size;
337 rq->cmd_len = COMMAND_SIZE(rq->cmd[0]);
339 rq->sense = h->sense;
340 memset(rq->sense, 0, SCSI_SENSE_BUFFERSIZE);
346 static void release_controller(struct kref *kref)
348 struct rdac_controller *ctlr;
349 ctlr = container_of(kref, struct rdac_controller, kref);
351 flush_workqueue(kmpath_rdacd);
352 spin_lock(&list_lock);
353 list_del(&ctlr->node);
354 spin_unlock(&list_lock);
358 static struct rdac_controller *get_controller(u8 *subsys_id, u8 *slot_id,
361 struct rdac_controller *ctlr, *tmp;
363 spin_lock(&list_lock);
365 list_for_each_entry(tmp, &ctlr_list, node) {
366 if ((memcmp(tmp->subsys_id, subsys_id, SUBSYS_ID_LEN) == 0) &&
367 (memcmp(tmp->slot_id, slot_id, SLOT_ID_LEN) == 0)) {
368 kref_get(&tmp->kref);
369 spin_unlock(&list_lock);
373 ctlr = kmalloc(sizeof(*ctlr), GFP_ATOMIC);
377 /* initialize fields of controller */
378 memcpy(ctlr->subsys_id, subsys_id, SUBSYS_ID_LEN);
379 memcpy(ctlr->slot_id, slot_id, SLOT_ID_LEN);
380 memcpy(ctlr->array_name, array_name, ARRAY_LABEL_LEN);
382 /* update the controller index */
383 if (slot_id[1] == 0x31)
388 kref_init(&ctlr->kref);
391 ctlr->ms_sdev = NULL;
392 spin_lock_init(&ctlr->ms_lock);
393 INIT_WORK(&ctlr->ms_work, send_mode_select);
394 INIT_LIST_HEAD(&ctlr->ms_head);
395 list_add(&ctlr->node, &ctlr_list);
397 spin_unlock(&list_lock);
401 static int submit_inquiry(struct scsi_device *sdev, int page_code,
402 unsigned int len, struct rdac_dh_data *h)
405 struct request_queue *q = sdev->request_queue;
406 int err = SCSI_DH_RES_TEMP_UNAVAIL;
408 rq = get_rdac_req(sdev, &h->inq, len, READ);
412 /* Prepare the command. */
413 rq->cmd[0] = INQUIRY;
415 rq->cmd[2] = page_code;
417 rq->cmd_len = COMMAND_SIZE(INQUIRY);
419 rq->sense = h->sense;
420 memset(rq->sense, 0, SCSI_SENSE_BUFFERSIZE);
423 err = blk_execute_rq(q, NULL, rq, 1);
432 static int get_lun_info(struct scsi_device *sdev, struct rdac_dh_data *h,
436 struct c8_inquiry *inqp;
438 err = submit_inquiry(sdev, 0xC8, sizeof(struct c8_inquiry), h);
439 if (err == SCSI_DH_OK) {
441 if (inqp->page_code != 0xc8)
442 return SCSI_DH_NOSYS;
443 if (inqp->page_id[0] != 'e' || inqp->page_id[1] != 'd' ||
444 inqp->page_id[2] != 'i' || inqp->page_id[3] != 'd')
445 return SCSI_DH_NOSYS;
446 h->lun = inqp->lun[7]; /* Uses only the last byte */
448 for(i=0; i<ARRAY_LABEL_LEN-1; ++i)
449 *(array_name+i) = inqp->array_user_label[(2*i)+1];
451 *(array_name+ARRAY_LABEL_LEN-1) = '\0';
456 static int check_ownership(struct scsi_device *sdev, struct rdac_dh_data *h)
459 struct c9_inquiry *inqp;
461 h->lun_state = RDAC_LUN_UNOWNED;
462 h->state = RDAC_STATE_ACTIVE;
463 err = submit_inquiry(sdev, 0xC9, sizeof(struct c9_inquiry), h);
464 if (err == SCSI_DH_OK) {
466 if ((inqp->avte_cvp >> 7) == 0x1) {
467 /* LUN in AVT mode */
468 sdev_printk(KERN_NOTICE, sdev,
469 "%s: AVT mode detected\n",
471 h->lun_state = RDAC_LUN_AVT;
472 } else if ((inqp->avte_cvp & 0x1) != 0) {
473 /* LUN was owned by the controller */
474 h->lun_state = RDAC_LUN_OWNED;
478 if (h->lun_state == RDAC_LUN_UNOWNED)
479 h->state = RDAC_STATE_PASSIVE;
484 static int initialize_controller(struct scsi_device *sdev,
485 struct rdac_dh_data *h, char *array_name)
488 struct c4_inquiry *inqp;
490 err = submit_inquiry(sdev, 0xC4, sizeof(struct c4_inquiry), h);
491 if (err == SCSI_DH_OK) {
493 h->ctlr = get_controller(inqp->subsys_id, inqp->slot_id,
496 err = SCSI_DH_RES_TEMP_UNAVAIL;
501 static int set_mode_select(struct scsi_device *sdev, struct rdac_dh_data *h)
504 struct c2_inquiry *inqp;
506 err = submit_inquiry(sdev, 0xC2, sizeof(struct c2_inquiry), h);
507 if (err == SCSI_DH_OK) {
510 * If more than MODE6_MAX_LUN luns are supported, use
513 if (inqp->max_lun_supported >= MODE6_MAX_LUN)
514 h->ctlr->use_ms10 = 1;
516 h->ctlr->use_ms10 = 0;
521 static int mode_select_handle_sense(struct scsi_device *sdev,
522 unsigned char *sensebuf)
524 struct scsi_sense_hdr sense_hdr;
525 int err = SCSI_DH_IO, ret;
526 struct rdac_dh_data *h = get_rdac_data(sdev);
528 ret = scsi_normalize_sense(sensebuf, SCSI_SENSE_BUFFERSIZE, &sense_hdr);
532 switch (sense_hdr.sense_key) {
534 case ABORTED_COMMAND:
539 if (sense_hdr.asc == 0x04 && sense_hdr.ascq == 0x01)
540 /* LUN Not Ready and is in the Process of Becoming
545 case ILLEGAL_REQUEST:
546 if (sense_hdr.asc == 0x91 && sense_hdr.ascq == 0x36)
548 * Command Lock contention
556 RDAC_LOG(RDAC_LOG_FAILOVER, sdev, "array %s, ctlr %d, "
557 "MODE_SELECT returned with sense %02x/%02x/%02x",
558 (char *) h->ctlr->array_name, h->ctlr->index,
559 sense_hdr.sense_key, sense_hdr.asc, sense_hdr.ascq);
565 static void send_mode_select(struct work_struct *work)
567 struct rdac_controller *ctlr =
568 container_of(work, struct rdac_controller, ms_work);
570 struct scsi_device *sdev = ctlr->ms_sdev;
571 struct rdac_dh_data *h = get_rdac_data(sdev);
572 struct request_queue *q = sdev->request_queue;
573 int err, retry_cnt = RDAC_RETRY_COUNT;
574 struct rdac_queue_data *tmp, *qdata;
577 spin_lock(&ctlr->ms_lock);
578 list_splice_init(&ctlr->ms_head, &list);
580 ctlr->ms_sdev = NULL;
581 spin_unlock(&ctlr->ms_lock);
584 err = SCSI_DH_RES_TEMP_UNAVAIL;
585 rq = rdac_failover_get(sdev, h, &list);
589 RDAC_LOG(RDAC_LOG_FAILOVER, sdev, "array %s, ctlr %d, "
590 "%s MODE_SELECT command",
591 (char *) h->ctlr->array_name, h->ctlr->index,
592 (retry_cnt == RDAC_RETRY_COUNT) ? "queueing" : "retrying");
594 err = blk_execute_rq(q, NULL, rq, 1);
596 if (err != SCSI_DH_OK) {
597 err = mode_select_handle_sense(sdev, h->sense);
598 if (err == SCSI_DH_RETRY && retry_cnt--)
601 if (err == SCSI_DH_OK) {
602 h->state = RDAC_STATE_ACTIVE;
603 RDAC_LOG(RDAC_LOG_FAILOVER, sdev, "array %s, ctlr %d, "
604 "MODE_SELECT completed",
605 (char *) h->ctlr->array_name, h->ctlr->index);
609 list_for_each_entry_safe(qdata, tmp, &list, entry) {
610 list_del(&qdata->entry);
611 if (err == SCSI_DH_OK)
612 qdata->h->state = RDAC_STATE_ACTIVE;
613 if (qdata->callback_fn)
614 qdata->callback_fn(qdata->callback_data, err);
620 static int queue_mode_select(struct scsi_device *sdev,
621 activate_complete fn, void *data)
623 struct rdac_queue_data *qdata;
624 struct rdac_controller *ctlr;
626 qdata = kzalloc(sizeof(*qdata), GFP_KERNEL);
628 return SCSI_DH_RETRY;
630 qdata->h = get_rdac_data(sdev);
631 qdata->callback_fn = fn;
632 qdata->callback_data = data;
634 ctlr = qdata->h->ctlr;
635 spin_lock(&ctlr->ms_lock);
636 list_add_tail(&qdata->entry, &ctlr->ms_head);
637 if (!ctlr->ms_queued) {
639 ctlr->ms_sdev = sdev;
640 queue_work(kmpath_rdacd, &ctlr->ms_work);
642 spin_unlock(&ctlr->ms_lock);
646 static int rdac_activate(struct scsi_device *sdev,
647 activate_complete fn, void *data)
649 struct rdac_dh_data *h = get_rdac_data(sdev);
650 int err = SCSI_DH_OK;
652 err = check_ownership(sdev, h);
653 if (err != SCSI_DH_OK)
656 if (h->lun_state == RDAC_LUN_UNOWNED) {
657 err = queue_mode_select(sdev, fn, data);
658 if (err == SCSI_DH_OK)
667 static int rdac_prep_fn(struct scsi_device *sdev, struct request *req)
669 struct rdac_dh_data *h = get_rdac_data(sdev);
670 int ret = BLKPREP_OK;
672 if (h->state != RDAC_STATE_ACTIVE) {
674 req->cmd_flags |= REQ_QUIET;
680 static int rdac_check_sense(struct scsi_device *sdev,
681 struct scsi_sense_hdr *sense_hdr)
683 struct rdac_dh_data *h = get_rdac_data(sdev);
685 RDAC_LOG(RDAC_LOG_SENSE, sdev, "array %s, ctlr %d, "
686 "I/O returned with sense %02x/%02x/%02x",
687 (char *) h->ctlr->array_name, h->ctlr->index,
688 sense_hdr->sense_key, sense_hdr->asc, sense_hdr->ascq);
690 switch (sense_hdr->sense_key) {
692 if (sense_hdr->asc == 0x04 && sense_hdr->ascq == 0x01)
693 /* LUN Not Ready - Logical Unit Not Ready and is in
694 * the process of becoming ready
697 return ADD_TO_MLQUEUE;
698 if (sense_hdr->asc == 0x04 && sense_hdr->ascq == 0x81)
699 /* LUN Not Ready - Storage firmware incompatible
700 * Manual code synchonisation required.
702 * Nothing we can do here. Try to bypass the path.
705 if (sense_hdr->asc == 0x04 && sense_hdr->ascq == 0xA1)
706 /* LUN Not Ready - Quiescense in progress
708 * Just retry and wait.
710 return ADD_TO_MLQUEUE;
711 if (sense_hdr->asc == 0xA1 && sense_hdr->ascq == 0x02)
712 /* LUN Not Ready - Quiescense in progress
713 * or has been achieved
716 return ADD_TO_MLQUEUE;
718 case ILLEGAL_REQUEST:
719 if (sense_hdr->asc == 0x94 && sense_hdr->ascq == 0x01) {
720 /* Invalid Request - Current Logical Unit Ownership.
721 * Controller is not the current owner of the LUN,
722 * Fail the path, so that the other path be used.
724 h->state = RDAC_STATE_PASSIVE;
729 if (sense_hdr->asc == 0x29 && sense_hdr->ascq == 0x00)
731 * Power On, Reset, or Bus Device Reset, just retry.
733 return ADD_TO_MLQUEUE;
734 if (sense_hdr->asc == 0x8b && sense_hdr->ascq == 0x02)
736 * Quiescence in progress , just retry.
738 return ADD_TO_MLQUEUE;
741 /* success just means we do not care what scsi-ml does */
742 return SCSI_RETURN_NOT_HANDLED;
745 static const struct scsi_dh_devlist rdac_dev_list[] = {
759 {"STK", "OPENstorage D280"},
761 {"SUN", "LCSM100_I"},
762 {"SUN", "LCSM100_S"},
763 {"SUN", "LCSM100_E"},
764 {"SUN", "LCSM100_F"},
770 {"LSI", "INF-01-00"},
771 {"ENGENIO", "INF-01-00"},
772 {"STK", "FLEXLINE 380"},
773 {"SUN", "CSM100_R_FC"},
774 {"SUN", "STK6580_6780"},
779 static int rdac_bus_attach(struct scsi_device *sdev);
780 static void rdac_bus_detach(struct scsi_device *sdev);
782 static struct scsi_device_handler rdac_dh = {
784 .module = THIS_MODULE,
785 .devlist = rdac_dev_list,
786 .prep_fn = rdac_prep_fn,
787 .check_sense = rdac_check_sense,
788 .attach = rdac_bus_attach,
789 .detach = rdac_bus_detach,
790 .activate = rdac_activate,
793 static int rdac_bus_attach(struct scsi_device *sdev)
795 struct scsi_dh_data *scsi_dh_data;
796 struct rdac_dh_data *h;
799 char array_name[ARRAY_LABEL_LEN];
801 scsi_dh_data = kzalloc(sizeof(*scsi_dh_data)
802 + sizeof(*h) , GFP_KERNEL);
804 sdev_printk(KERN_ERR, sdev, "%s: Attach failed\n",
809 scsi_dh_data->scsi_dh = &rdac_dh;
810 h = (struct rdac_dh_data *) scsi_dh_data->buf;
811 h->lun = UNINITIALIZED_LUN;
812 h->state = RDAC_STATE_ACTIVE;
814 err = get_lun_info(sdev, h, array_name);
815 if (err != SCSI_DH_OK)
818 err = initialize_controller(sdev, h, array_name);
819 if (err != SCSI_DH_OK)
822 err = check_ownership(sdev, h);
823 if (err != SCSI_DH_OK)
826 err = set_mode_select(sdev, h);
827 if (err != SCSI_DH_OK)
830 if (!try_module_get(THIS_MODULE))
833 spin_lock_irqsave(sdev->request_queue->queue_lock, flags);
834 sdev->scsi_dh_data = scsi_dh_data;
835 spin_unlock_irqrestore(sdev->request_queue->queue_lock, flags);
837 sdev_printk(KERN_NOTICE, sdev,
839 RDAC_NAME, h->lun, lun_state[(int)h->lun_state]);
844 kref_put(&h->ctlr->kref, release_controller);
848 sdev_printk(KERN_ERR, sdev, "%s: not attached\n",
853 static void rdac_bus_detach( struct scsi_device *sdev )
855 struct scsi_dh_data *scsi_dh_data;
856 struct rdac_dh_data *h;
859 spin_lock_irqsave(sdev->request_queue->queue_lock, flags);
860 scsi_dh_data = sdev->scsi_dh_data;
861 sdev->scsi_dh_data = NULL;
862 spin_unlock_irqrestore(sdev->request_queue->queue_lock, flags);
864 h = (struct rdac_dh_data *) scsi_dh_data->buf;
866 kref_put(&h->ctlr->kref, release_controller);
868 module_put(THIS_MODULE);
869 sdev_printk(KERN_NOTICE, sdev, "%s: Detached\n", RDAC_NAME);
874 static int __init rdac_init(void)
878 r = scsi_register_device_handler(&rdac_dh);
880 printk(KERN_ERR "Failed to register scsi device handler.");
885 * Create workqueue to handle mode selects for rdac
887 kmpath_rdacd = create_singlethread_workqueue("kmpath_rdacd");
889 scsi_unregister_device_handler(&rdac_dh);
890 printk(KERN_ERR "kmpath_rdacd creation failed.\n");
896 static void __exit rdac_exit(void)
898 destroy_workqueue(kmpath_rdacd);
899 scsi_unregister_device_handler(&rdac_dh);
902 module_init(rdac_init);
903 module_exit(rdac_exit);
905 MODULE_DESCRIPTION("Multipath LSI/Engenio RDAC driver");
906 MODULE_AUTHOR("Mike Christie, Chandra Seetharaman");
907 MODULE_LICENSE("GPL");