]> git.openfabrics.org - ~shefty/rdma-dev.git/blob - drivers/s390/block/dasd_fba.c
[S390] dasd: tunable missing interrupt handler
[~shefty/rdma-dev.git] / drivers / s390 / block / dasd_fba.c
1 /*
2  * File...........: linux/drivers/s390/block/dasd_fba.c
3  * Author(s)......: Holger Smolinski <Holger.Smolinski@de.ibm.com>
4  * Bugreports.to..: <Linux390@de.ibm.com>
5  * Copyright IBM Corp. 1999, 2009
6  */
7
8 #define KMSG_COMPONENT "dasd-fba"
9
10 #include <linux/stddef.h>
11 #include <linux/kernel.h>
12 #include <asm/debug.h>
13
14 #include <linux/slab.h>
15 #include <linux/hdreg.h>        /* HDIO_GETGEO                      */
16 #include <linux/bio.h>
17 #include <linux/module.h>
18 #include <linux/init.h>
19
20 #include <asm/idals.h>
21 #include <asm/ebcdic.h>
22 #include <asm/io.h>
23 #include <asm/ccwdev.h>
24
25 #include "dasd_int.h"
26 #include "dasd_fba.h"
27
28 #ifdef PRINTK_HEADER
29 #undef PRINTK_HEADER
30 #endif                          /* PRINTK_HEADER */
31 #define PRINTK_HEADER "dasd(fba):"
32
33 #define DASD_FBA_CCW_WRITE 0x41
34 #define DASD_FBA_CCW_READ 0x42
35 #define DASD_FBA_CCW_LOCATE 0x43
36 #define DASD_FBA_CCW_DEFINE_EXTENT 0x63
37
38 MODULE_LICENSE("GPL");
39
40 static struct dasd_discipline dasd_fba_discipline;
41
42 struct dasd_fba_private {
43         struct dasd_fba_characteristics rdc_data;
44 };
45
46 static struct ccw_device_id dasd_fba_ids[] = {
47         { CCW_DEVICE_DEVTYPE (0x6310, 0, 0x9336, 0), .driver_info = 0x1},
48         { CCW_DEVICE_DEVTYPE (0x3880, 0, 0x3370, 0), .driver_info = 0x2},
49         { /* end of list */ },
50 };
51
52 MODULE_DEVICE_TABLE(ccw, dasd_fba_ids);
53
54 static struct ccw_driver dasd_fba_driver; /* see below */
55 static int
56 dasd_fba_probe(struct ccw_device *cdev)
57 {
58         return dasd_generic_probe(cdev, &dasd_fba_discipline);
59 }
60
61 static int
62 dasd_fba_set_online(struct ccw_device *cdev)
63 {
64         return dasd_generic_set_online(cdev, &dasd_fba_discipline);
65 }
66
67 static struct ccw_driver dasd_fba_driver = {
68         .name        = "dasd-fba",
69         .owner       = THIS_MODULE,
70         .ids         = dasd_fba_ids,
71         .probe       = dasd_fba_probe,
72         .remove      = dasd_generic_remove,
73         .set_offline = dasd_generic_set_offline,
74         .set_online  = dasd_fba_set_online,
75         .notify      = dasd_generic_notify,
76         .freeze      = dasd_generic_pm_freeze,
77         .thaw        = dasd_generic_restore_device,
78         .restore     = dasd_generic_restore_device,
79 };
80
81 static void
82 define_extent(struct ccw1 * ccw, struct DE_fba_data *data, int rw,
83               int blksize, int beg, int nr)
84 {
85         ccw->cmd_code = DASD_FBA_CCW_DEFINE_EXTENT;
86         ccw->flags = 0;
87         ccw->count = 16;
88         ccw->cda = (__u32) __pa(data);
89         memset(data, 0, sizeof (struct DE_fba_data));
90         if (rw == WRITE)
91                 (data->mask).perm = 0x0;
92         else if (rw == READ)
93                 (data->mask).perm = 0x1;
94         else
95                 data->mask.perm = 0x2;
96         data->blk_size = blksize;
97         data->ext_loc = beg;
98         data->ext_end = nr - 1;
99 }
100
101 static void
102 locate_record(struct ccw1 * ccw, struct LO_fba_data *data, int rw,
103               int block_nr, int block_ct)
104 {
105         ccw->cmd_code = DASD_FBA_CCW_LOCATE;
106         ccw->flags = 0;
107         ccw->count = 8;
108         ccw->cda = (__u32) __pa(data);
109         memset(data, 0, sizeof (struct LO_fba_data));
110         if (rw == WRITE)
111                 data->operation.cmd = 0x5;
112         else if (rw == READ)
113                 data->operation.cmd = 0x6;
114         else
115                 data->operation.cmd = 0x8;
116         data->blk_nr = block_nr;
117         data->blk_ct = block_ct;
118 }
119
120 static int
121 dasd_fba_check_characteristics(struct dasd_device *device)
122 {
123         struct dasd_block *block;
124         struct dasd_fba_private *private;
125         struct ccw_device *cdev = device->cdev;
126         int rc;
127         int readonly;
128
129         private = (struct dasd_fba_private *) device->private;
130         if (!private) {
131                 private = kzalloc(sizeof(*private), GFP_KERNEL | GFP_DMA);
132                 if (!private) {
133                         dev_warn(&device->cdev->dev,
134                                  "Allocating memory for private DASD "
135                                  "data failed\n");
136                         return -ENOMEM;
137                 }
138                 device->private = (void *) private;
139         } else {
140                 memset(private, 0, sizeof(*private));
141         }
142         block = dasd_alloc_block();
143         if (IS_ERR(block)) {
144                 DBF_EVENT_DEVID(DBF_WARNING, cdev, "%s", "could not allocate "
145                                 "dasd block structure");
146                 device->private = NULL;
147                 kfree(private);
148                 return PTR_ERR(block);
149         }
150         device->block = block;
151         block->base = device;
152
153         /* Read Device Characteristics */
154         rc = dasd_generic_read_dev_chars(device, DASD_FBA_MAGIC,
155                                          &private->rdc_data, 32);
156         if (rc) {
157                 DBF_EVENT_DEVID(DBF_WARNING, cdev, "Read device "
158                                 "characteristics returned error %d", rc);
159                 device->block = NULL;
160                 dasd_free_block(block);
161                 device->private = NULL;
162                 kfree(private);
163                 return rc;
164         }
165
166         device->default_expires = DASD_EXPIRES;
167
168         readonly = dasd_device_is_ro(device);
169         if (readonly)
170                 set_bit(DASD_FLAG_DEVICE_RO, &device->flags);
171
172         dev_info(&device->cdev->dev,
173                  "New FBA DASD %04X/%02X (CU %04X/%02X) with %d MB "
174                  "and %d B/blk%s\n",
175                  cdev->id.dev_type,
176                  cdev->id.dev_model,
177                  cdev->id.cu_type,
178                  cdev->id.cu_model,
179                  ((private->rdc_data.blk_bdsa *
180                    (private->rdc_data.blk_size >> 9)) >> 11),
181                  private->rdc_data.blk_size,
182                  readonly ? ", read-only device" : "");
183         return 0;
184 }
185
186 static int dasd_fba_do_analysis(struct dasd_block *block)
187 {
188         struct dasd_fba_private *private;
189         int sb, rc;
190
191         private = (struct dasd_fba_private *) block->base->private;
192         rc = dasd_check_blocksize(private->rdc_data.blk_size);
193         if (rc) {
194                 DBF_DEV_EVENT(DBF_WARNING, block->base, "unknown blocksize %d",
195                             private->rdc_data.blk_size);
196                 return rc;
197         }
198         block->blocks = private->rdc_data.blk_bdsa;
199         block->bp_block = private->rdc_data.blk_size;
200         block->s2b_shift = 0;   /* bits to shift 512 to get a block */
201         for (sb = 512; sb < private->rdc_data.blk_size; sb = sb << 1)
202                 block->s2b_shift++;
203         return 0;
204 }
205
206 static int dasd_fba_fill_geometry(struct dasd_block *block,
207                                   struct hd_geometry *geo)
208 {
209         if (dasd_check_blocksize(block->bp_block) != 0)
210                 return -EINVAL;
211         geo->cylinders = (block->blocks << block->s2b_shift) >> 10;
212         geo->heads = 16;
213         geo->sectors = 128 >> block->s2b_shift;
214         return 0;
215 }
216
217 static dasd_erp_fn_t
218 dasd_fba_erp_action(struct dasd_ccw_req * cqr)
219 {
220         return dasd_default_erp_action;
221 }
222
223 static dasd_erp_fn_t
224 dasd_fba_erp_postaction(struct dasd_ccw_req * cqr)
225 {
226         if (cqr->function == dasd_default_erp_action)
227                 return dasd_default_erp_postaction;
228
229         DBF_DEV_EVENT(DBF_WARNING, cqr->startdev, "unknown ERP action %p",
230                     cqr->function);
231         return NULL;
232 }
233
234 static void dasd_fba_handle_unsolicited_interrupt(struct dasd_device *device,
235                                                    struct irb *irb)
236 {
237         char mask;
238
239         /* first of all check for state change pending interrupt */
240         mask = DEV_STAT_ATTENTION | DEV_STAT_DEV_END | DEV_STAT_UNIT_EXCEP;
241         if ((irb->scsw.cmd.dstat & mask) == mask) {
242                 dasd_generic_handle_state_change(device);
243                 return;
244         }
245
246         /* check for unsolicited interrupts */
247         DBF_DEV_EVENT(DBF_WARNING, device, "%s",
248                     "unsolicited interrupt received");
249         device->discipline->dump_sense_dbf(device, irb, "unsolicited");
250         dasd_schedule_device_bh(device);
251         return;
252 };
253
254 static struct dasd_ccw_req *dasd_fba_build_cp(struct dasd_device * memdev,
255                                               struct dasd_block *block,
256                                               struct request *req)
257 {
258         struct dasd_fba_private *private;
259         unsigned long *idaws;
260         struct LO_fba_data *LO_data;
261         struct dasd_ccw_req *cqr;
262         struct ccw1 *ccw;
263         struct req_iterator iter;
264         struct bio_vec *bv;
265         char *dst;
266         int count, cidaw, cplength, datasize;
267         sector_t recid, first_rec, last_rec;
268         unsigned int blksize, off;
269         unsigned char cmd;
270
271         private = (struct dasd_fba_private *) block->base->private;
272         if (rq_data_dir(req) == READ) {
273                 cmd = DASD_FBA_CCW_READ;
274         } else if (rq_data_dir(req) == WRITE) {
275                 cmd = DASD_FBA_CCW_WRITE;
276         } else
277                 return ERR_PTR(-EINVAL);
278         blksize = block->bp_block;
279         /* Calculate record id of first and last block. */
280         first_rec = blk_rq_pos(req) >> block->s2b_shift;
281         last_rec =
282                 (blk_rq_pos(req) + blk_rq_sectors(req) - 1) >> block->s2b_shift;
283         /* Check struct bio and count the number of blocks for the request. */
284         count = 0;
285         cidaw = 0;
286         rq_for_each_segment(bv, req, iter) {
287                 if (bv->bv_len & (blksize - 1))
288                         /* Fba can only do full blocks. */
289                         return ERR_PTR(-EINVAL);
290                 count += bv->bv_len >> (block->s2b_shift + 9);
291 #if defined(CONFIG_64BIT)
292                 if (idal_is_needed (page_address(bv->bv_page), bv->bv_len))
293                         cidaw += bv->bv_len / blksize;
294 #endif
295         }
296         /* Paranoia. */
297         if (count != last_rec - first_rec + 1)
298                 return ERR_PTR(-EINVAL);
299         /* 1x define extent + 1x locate record + number of blocks */
300         cplength = 2 + count;
301         /* 1x define extent + 1x locate record */
302         datasize = sizeof(struct DE_fba_data) + sizeof(struct LO_fba_data) +
303                 cidaw * sizeof(unsigned long);
304         /*
305          * Find out number of additional locate record ccws if the device
306          * can't do data chaining.
307          */
308         if (private->rdc_data.mode.bits.data_chain == 0) {
309                 cplength += count - 1;
310                 datasize += (count - 1)*sizeof(struct LO_fba_data);
311         }
312         /* Allocate the ccw request. */
313         cqr = dasd_smalloc_request(DASD_FBA_MAGIC, cplength, datasize, memdev);
314         if (IS_ERR(cqr))
315                 return cqr;
316         ccw = cqr->cpaddr;
317         /* First ccw is define extent. */
318         define_extent(ccw++, cqr->data, rq_data_dir(req),
319                       block->bp_block, blk_rq_pos(req), blk_rq_sectors(req));
320         /* Build locate_record + read/write ccws. */
321         idaws = (unsigned long *) (cqr->data + sizeof(struct DE_fba_data));
322         LO_data = (struct LO_fba_data *) (idaws + cidaw);
323         /* Locate record for all blocks for smart devices. */
324         if (private->rdc_data.mode.bits.data_chain != 0) {
325                 ccw[-1].flags |= CCW_FLAG_CC;
326                 locate_record(ccw++, LO_data++, rq_data_dir(req), 0, count);
327         }
328         recid = first_rec;
329         rq_for_each_segment(bv, req, iter) {
330                 dst = page_address(bv->bv_page) + bv->bv_offset;
331                 if (dasd_page_cache) {
332                         char *copy = kmem_cache_alloc(dasd_page_cache,
333                                                       GFP_DMA | __GFP_NOWARN);
334                         if (copy && rq_data_dir(req) == WRITE)
335                                 memcpy(copy + bv->bv_offset, dst, bv->bv_len);
336                         if (copy)
337                                 dst = copy + bv->bv_offset;
338                 }
339                 for (off = 0; off < bv->bv_len; off += blksize) {
340                         /* Locate record for stupid devices. */
341                         if (private->rdc_data.mode.bits.data_chain == 0) {
342                                 ccw[-1].flags |= CCW_FLAG_CC;
343                                 locate_record(ccw, LO_data++,
344                                               rq_data_dir(req),
345                                               recid - first_rec, 1);
346                                 ccw->flags = CCW_FLAG_CC;
347                                 ccw++;
348                         } else {
349                                 if (recid > first_rec)
350                                         ccw[-1].flags |= CCW_FLAG_DC;
351                                 else
352                                         ccw[-1].flags |= CCW_FLAG_CC;
353                         }
354                         ccw->cmd_code = cmd;
355                         ccw->count = block->bp_block;
356                         if (idal_is_needed(dst, blksize)) {
357                                 ccw->cda = (__u32)(addr_t) idaws;
358                                 ccw->flags = CCW_FLAG_IDA;
359                                 idaws = idal_create_words(idaws, dst, blksize);
360                         } else {
361                                 ccw->cda = (__u32)(addr_t) dst;
362                                 ccw->flags = 0;
363                         }
364                         ccw++;
365                         dst += blksize;
366                         recid++;
367                 }
368         }
369         if (blk_noretry_request(req) ||
370             block->base->features & DASD_FEATURE_FAILFAST)
371                 set_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags);
372         cqr->startdev = memdev;
373         cqr->memdev = memdev;
374         cqr->block = block;
375         cqr->expires = memdev->default_expires * HZ;    /* default 5 minutes */
376         cqr->retries = 32;
377         cqr->buildclk = get_clock();
378         cqr->status = DASD_CQR_FILLED;
379         return cqr;
380 }
381
382 static int
383 dasd_fba_free_cp(struct dasd_ccw_req *cqr, struct request *req)
384 {
385         struct dasd_fba_private *private;
386         struct ccw1 *ccw;
387         struct req_iterator iter;
388         struct bio_vec *bv;
389         char *dst, *cda;
390         unsigned int blksize, off;
391         int status;
392
393         if (!dasd_page_cache)
394                 goto out;
395         private = (struct dasd_fba_private *) cqr->block->base->private;
396         blksize = cqr->block->bp_block;
397         ccw = cqr->cpaddr;
398         /* Skip over define extent & locate record. */
399         ccw++;
400         if (private->rdc_data.mode.bits.data_chain != 0)
401                 ccw++;
402         rq_for_each_segment(bv, req, iter) {
403                 dst = page_address(bv->bv_page) + bv->bv_offset;
404                 for (off = 0; off < bv->bv_len; off += blksize) {
405                         /* Skip locate record. */
406                         if (private->rdc_data.mode.bits.data_chain == 0)
407                                 ccw++;
408                         if (dst) {
409                                 if (ccw->flags & CCW_FLAG_IDA)
410                                         cda = *((char **)((addr_t) ccw->cda));
411                                 else
412                                         cda = (char *)((addr_t) ccw->cda);
413                                 if (dst != cda) {
414                                         if (rq_data_dir(req) == READ)
415                                                 memcpy(dst, cda, bv->bv_len);
416                                         kmem_cache_free(dasd_page_cache,
417                                             (void *)((addr_t)cda & PAGE_MASK));
418                                 }
419                                 dst = NULL;
420                         }
421                         ccw++;
422                 }
423         }
424 out:
425         status = cqr->status == DASD_CQR_DONE;
426         dasd_sfree_request(cqr, cqr->memdev);
427         return status;
428 }
429
430 static void dasd_fba_handle_terminated_request(struct dasd_ccw_req *cqr)
431 {
432         cqr->status = DASD_CQR_FILLED;
433 };
434
435 static int
436 dasd_fba_fill_info(struct dasd_device * device,
437                    struct dasd_information2_t * info)
438 {
439         info->label_block = 1;
440         info->FBA_layout = 1;
441         info->format = DASD_FORMAT_LDL;
442         info->characteristics_size = sizeof(struct dasd_fba_characteristics);
443         memcpy(info->characteristics,
444                &((struct dasd_fba_private *) device->private)->rdc_data,
445                sizeof (struct dasd_fba_characteristics));
446         info->confdata_size = 0;
447         return 0;
448 }
449
450 static void
451 dasd_fba_dump_sense_dbf(struct dasd_device *device, struct irb *irb,
452                         char *reason)
453 {
454         u64 *sense;
455
456         sense = (u64 *) dasd_get_sense(irb);
457         if (sense) {
458                 DBF_DEV_EVENT(DBF_EMERG, device,
459                               "%s: %s %02x%02x%02x %016llx %016llx %016llx "
460                               "%016llx", reason,
461                               scsw_is_tm(&irb->scsw) ? "t" : "c",
462                               scsw_cc(&irb->scsw), scsw_cstat(&irb->scsw),
463                               scsw_dstat(&irb->scsw), sense[0], sense[1],
464                               sense[2], sense[3]);
465         } else {
466                 DBF_DEV_EVENT(DBF_EMERG, device, "%s",
467                               "SORRY - NO VALID SENSE AVAILABLE\n");
468         }
469 }
470
471
472 static void
473 dasd_fba_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req,
474                     struct irb *irb)
475 {
476         char *page;
477         struct ccw1 *act, *end, *last;
478         int len, sl, sct, count;
479
480         page = (char *) get_zeroed_page(GFP_ATOMIC);
481         if (page == NULL) {
482                 DBF_DEV_EVENT(DBF_WARNING, device, "%s",
483                             "No memory to dump sense data");
484                 return;
485         }
486         len = sprintf(page, KERN_ERR PRINTK_HEADER
487                       " I/O status report for device %s:\n",
488                       dev_name(&device->cdev->dev));
489         len += sprintf(page + len, KERN_ERR PRINTK_HEADER
490                        " in req: %p CS: 0x%02X DS: 0x%02X\n", req,
491                        irb->scsw.cmd.cstat, irb->scsw.cmd.dstat);
492         len += sprintf(page + len, KERN_ERR PRINTK_HEADER
493                        " device %s: Failing CCW: %p\n",
494                        dev_name(&device->cdev->dev),
495                        (void *) (addr_t) irb->scsw.cmd.cpa);
496         if (irb->esw.esw0.erw.cons) {
497                 for (sl = 0; sl < 4; sl++) {
498                         len += sprintf(page + len, KERN_ERR PRINTK_HEADER
499                                        " Sense(hex) %2d-%2d:",
500                                        (8 * sl), ((8 * sl) + 7));
501
502                         for (sct = 0; sct < 8; sct++) {
503                                 len += sprintf(page + len, " %02x",
504                                                irb->ecw[8 * sl + sct]);
505                         }
506                         len += sprintf(page + len, "\n");
507                 }
508         } else {
509                 len += sprintf(page + len, KERN_ERR PRINTK_HEADER
510                                " SORRY - NO VALID SENSE AVAILABLE\n");
511         }
512         printk(KERN_ERR "%s", page);
513
514         /* dump the Channel Program */
515         /* print first CCWs (maximum 8) */
516         act = req->cpaddr;
517         for (last = act; last->flags & (CCW_FLAG_CC | CCW_FLAG_DC); last++);
518         end = min(act + 8, last);
519         len = sprintf(page, KERN_ERR PRINTK_HEADER
520                       " Related CP in req: %p\n", req);
521         while (act <= end) {
522                 len += sprintf(page + len, KERN_ERR PRINTK_HEADER
523                                " CCW %p: %08X %08X DAT:",
524                                act, ((int *) act)[0], ((int *) act)[1]);
525                 for (count = 0; count < 32 && count < act->count;
526                      count += sizeof(int))
527                         len += sprintf(page + len, " %08X",
528                                        ((int *) (addr_t) act->cda)
529                                        [(count>>2)]);
530                 len += sprintf(page + len, "\n");
531                 act++;
532         }
533         printk(KERN_ERR "%s", page);
534
535
536         /* print failing CCW area */
537         len = 0;
538         if (act <  ((struct ccw1 *)(addr_t) irb->scsw.cmd.cpa) - 2) {
539                 act = ((struct ccw1 *)(addr_t) irb->scsw.cmd.cpa) - 2;
540                 len += sprintf(page + len, KERN_ERR PRINTK_HEADER "......\n");
541         }
542         end = min((struct ccw1 *)(addr_t) irb->scsw.cmd.cpa + 2, last);
543         while (act <= end) {
544                 len += sprintf(page + len, KERN_ERR PRINTK_HEADER
545                                " CCW %p: %08X %08X DAT:",
546                                act, ((int *) act)[0], ((int *) act)[1]);
547                 for (count = 0; count < 32 && count < act->count;
548                      count += sizeof(int))
549                         len += sprintf(page + len, " %08X",
550                                        ((int *) (addr_t) act->cda)
551                                        [(count>>2)]);
552                 len += sprintf(page + len, "\n");
553                 act++;
554         }
555
556         /* print last CCWs */
557         if (act <  last - 2) {
558                 act = last - 2;
559                 len += sprintf(page + len, KERN_ERR PRINTK_HEADER "......\n");
560         }
561         while (act <= last) {
562                 len += sprintf(page + len, KERN_ERR PRINTK_HEADER
563                                " CCW %p: %08X %08X DAT:",
564                                act, ((int *) act)[0], ((int *) act)[1]);
565                 for (count = 0; count < 32 && count < act->count;
566                      count += sizeof(int))
567                         len += sprintf(page + len, " %08X",
568                                        ((int *) (addr_t) act->cda)
569                                        [(count>>2)]);
570                 len += sprintf(page + len, "\n");
571                 act++;
572         }
573         if (len > 0)
574                 printk(KERN_ERR "%s", page);
575         free_page((unsigned long) page);
576 }
577
578 /*
579  * max_blocks is dependent on the amount of storage that is available
580  * in the static io buffer for each device. Currently each device has
581  * 8192 bytes (=2 pages). For 64 bit one dasd_mchunkt_t structure has
582  * 24 bytes, the struct dasd_ccw_req has 136 bytes and each block can use
583  * up to 16 bytes (8 for the ccw and 8 for the idal pointer). In
584  * addition we have one define extent ccw + 16 bytes of data and a
585  * locate record ccw for each block (stupid devices!) + 16 bytes of data.
586  * That makes:
587  * (8192 - 24 - 136 - 8 - 16) / 40 = 200.2 blocks at maximum.
588  * We want to fit two into the available memory so that we can immediately
589  * start the next request if one finishes off. That makes 100.1 blocks
590  * for one request. Give a little safety and the result is 96.
591  */
592 static struct dasd_discipline dasd_fba_discipline = {
593         .owner = THIS_MODULE,
594         .name = "FBA ",
595         .ebcname = "FBA ",
596         .max_blocks = 96,
597         .check_device = dasd_fba_check_characteristics,
598         .do_analysis = dasd_fba_do_analysis,
599         .fill_geometry = dasd_fba_fill_geometry,
600         .start_IO = dasd_start_IO,
601         .term_IO = dasd_term_IO,
602         .handle_terminated_request = dasd_fba_handle_terminated_request,
603         .erp_action = dasd_fba_erp_action,
604         .erp_postaction = dasd_fba_erp_postaction,
605         .handle_unsolicited_interrupt = dasd_fba_handle_unsolicited_interrupt,
606         .build_cp = dasd_fba_build_cp,
607         .free_cp = dasd_fba_free_cp,
608         .dump_sense = dasd_fba_dump_sense,
609         .dump_sense_dbf = dasd_fba_dump_sense_dbf,
610         .fill_info = dasd_fba_fill_info,
611 };
612
613 static int __init
614 dasd_fba_init(void)
615 {
616         int ret;
617
618         ASCEBC(dasd_fba_discipline.ebcname, 4);
619         ret = ccw_driver_register(&dasd_fba_driver);
620         if (!ret)
621                 wait_for_device_probe();
622
623         return ret;
624 }
625
626 static void __exit
627 dasd_fba_cleanup(void)
628 {
629         ccw_driver_unregister(&dasd_fba_driver);
630 }
631
632 module_init(dasd_fba_init);
633 module_exit(dasd_fba_cleanup);