dasd_fba.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  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. * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
  6. *
  7. * $Revision: 1.41 $
  8. */
  9. #include <linux/config.h>
  10. #include <linux/stddef.h>
  11. #include <linux/kernel.h>
  12. #include <asm/debug.h>
  13. #include <linux/slab.h>
  14. #include <linux/hdreg.h> /* HDIO_GETGEO */
  15. #include <linux/bio.h>
  16. #include <linux/module.h>
  17. #include <linux/init.h>
  18. #include <asm/idals.h>
  19. #include <asm/ebcdic.h>
  20. #include <asm/io.h>
  21. #include <asm/todclk.h>
  22. #include <asm/ccwdev.h>
  23. #include "dasd_int.h"
  24. #include "dasd_fba.h"
  25. #ifdef PRINTK_HEADER
  26. #undef PRINTK_HEADER
  27. #endif /* PRINTK_HEADER */
  28. #define PRINTK_HEADER "dasd(fba):"
  29. #define DASD_FBA_CCW_WRITE 0x41
  30. #define DASD_FBA_CCW_READ 0x42
  31. #define DASD_FBA_CCW_LOCATE 0x43
  32. #define DASD_FBA_CCW_DEFINE_EXTENT 0x63
  33. MODULE_LICENSE("GPL");
  34. static struct dasd_discipline dasd_fba_discipline;
  35. struct dasd_fba_private {
  36. struct dasd_fba_characteristics rdc_data;
  37. };
  38. static struct ccw_device_id dasd_fba_ids[] = {
  39. { CCW_DEVICE_DEVTYPE (0x6310, 0, 0x9336, 0), driver_info: 0x1},
  40. { CCW_DEVICE_DEVTYPE (0x3880, 0, 0x3370, 0), driver_info: 0x2},
  41. { /* end of list */ },
  42. };
  43. MODULE_DEVICE_TABLE(ccw, dasd_fba_ids);
  44. static struct ccw_driver dasd_fba_driver; /* see below */
  45. static int
  46. dasd_fba_probe(struct ccw_device *cdev)
  47. {
  48. int ret;
  49. ret = dasd_generic_probe (cdev, &dasd_fba_discipline);
  50. if (ret)
  51. return ret;
  52. ccw_device_set_options(cdev, CCWDEV_DO_PATHGROUP);
  53. return 0;
  54. }
  55. static int
  56. dasd_fba_set_online(struct ccw_device *cdev)
  57. {
  58. return dasd_generic_set_online (cdev, &dasd_fba_discipline);
  59. }
  60. static struct ccw_driver dasd_fba_driver = {
  61. .name = "dasd-fba",
  62. .owner = THIS_MODULE,
  63. .ids = dasd_fba_ids,
  64. .probe = dasd_fba_probe,
  65. .remove = dasd_generic_remove,
  66. .set_offline = dasd_generic_set_offline,
  67. .set_online = dasd_fba_set_online,
  68. .notify = dasd_generic_notify,
  69. };
  70. static inline void
  71. define_extent(struct ccw1 * ccw, struct DE_fba_data *data, int rw,
  72. int blksize, int beg, int nr)
  73. {
  74. ccw->cmd_code = DASD_FBA_CCW_DEFINE_EXTENT;
  75. ccw->flags = 0;
  76. ccw->count = 16;
  77. ccw->cda = (__u32) __pa(data);
  78. memset(data, 0, sizeof (struct DE_fba_data));
  79. if (rw == WRITE)
  80. (data->mask).perm = 0x0;
  81. else if (rw == READ)
  82. (data->mask).perm = 0x1;
  83. else
  84. data->mask.perm = 0x2;
  85. data->blk_size = blksize;
  86. data->ext_loc = beg;
  87. data->ext_end = nr - 1;
  88. }
  89. static inline void
  90. locate_record(struct ccw1 * ccw, struct LO_fba_data *data, int rw,
  91. int block_nr, int block_ct)
  92. {
  93. ccw->cmd_code = DASD_FBA_CCW_LOCATE;
  94. ccw->flags = 0;
  95. ccw->count = 8;
  96. ccw->cda = (__u32) __pa(data);
  97. memset(data, 0, sizeof (struct LO_fba_data));
  98. if (rw == WRITE)
  99. data->operation.cmd = 0x5;
  100. else if (rw == READ)
  101. data->operation.cmd = 0x6;
  102. else
  103. data->operation.cmd = 0x8;
  104. data->blk_nr = block_nr;
  105. data->blk_ct = block_ct;
  106. }
  107. static int
  108. dasd_fba_check_characteristics(struct dasd_device *device)
  109. {
  110. struct dasd_fba_private *private;
  111. struct ccw_device *cdev = device->cdev;
  112. void *rdc_data;
  113. int rc;
  114. private = (struct dasd_fba_private *) device->private;
  115. if (private == NULL) {
  116. private = kmalloc(sizeof(struct dasd_fba_private), GFP_KERNEL);
  117. if (private == NULL) {
  118. DEV_MESSAGE(KERN_WARNING, device, "%s",
  119. "memory allocation failed for private "
  120. "data");
  121. return -ENOMEM;
  122. }
  123. device->private = (void *) private;
  124. }
  125. /* Read Device Characteristics */
  126. rdc_data = (void *) &(private->rdc_data);
  127. rc = read_dev_chars(device->cdev, &rdc_data, 32);
  128. if (rc) {
  129. DEV_MESSAGE(KERN_WARNING, device,
  130. "Read device characteristics returned error %d",
  131. rc);
  132. return rc;
  133. }
  134. DEV_MESSAGE(KERN_INFO, device,
  135. "%04X/%02X(CU:%04X/%02X) %dMB at(%d B/blk)",
  136. cdev->id.dev_type,
  137. cdev->id.dev_model,
  138. cdev->id.cu_type,
  139. cdev->id.cu_model,
  140. ((private->rdc_data.blk_bdsa *
  141. (private->rdc_data.blk_size >> 9)) >> 11),
  142. private->rdc_data.blk_size);
  143. return 0;
  144. }
  145. static int
  146. dasd_fba_do_analysis(struct dasd_device *device)
  147. {
  148. struct dasd_fba_private *private;
  149. int sb, rc;
  150. private = (struct dasd_fba_private *) device->private;
  151. rc = dasd_check_blocksize(private->rdc_data.blk_size);
  152. if (rc) {
  153. DEV_MESSAGE(KERN_INFO, device, "unknown blocksize %d",
  154. private->rdc_data.blk_size);
  155. return rc;
  156. }
  157. device->blocks = private->rdc_data.blk_bdsa;
  158. device->bp_block = private->rdc_data.blk_size;
  159. device->s2b_shift = 0; /* bits to shift 512 to get a block */
  160. for (sb = 512; sb < private->rdc_data.blk_size; sb = sb << 1)
  161. device->s2b_shift++;
  162. return 0;
  163. }
  164. static int
  165. dasd_fba_fill_geometry(struct dasd_device *device, struct hd_geometry *geo)
  166. {
  167. if (dasd_check_blocksize(device->bp_block) != 0)
  168. return -EINVAL;
  169. geo->cylinders = (device->blocks << device->s2b_shift) >> 10;
  170. geo->heads = 16;
  171. geo->sectors = 128 >> device->s2b_shift;
  172. return 0;
  173. }
  174. static dasd_era_t
  175. dasd_fba_examine_error(struct dasd_ccw_req * cqr, struct irb * irb)
  176. {
  177. struct dasd_device *device;
  178. struct ccw_device *cdev;
  179. device = (struct dasd_device *) cqr->device;
  180. if (irb->scsw.cstat == 0x00 &&
  181. irb->scsw.dstat == (DEV_STAT_CHN_END | DEV_STAT_DEV_END))
  182. return dasd_era_none;
  183. cdev = device->cdev;
  184. switch (cdev->id.dev_type) {
  185. case 0x3370:
  186. return dasd_3370_erp_examine(cqr, irb);
  187. case 0x9336:
  188. return dasd_9336_erp_examine(cqr, irb);
  189. default:
  190. return dasd_era_recover;
  191. }
  192. }
  193. static dasd_erp_fn_t
  194. dasd_fba_erp_action(struct dasd_ccw_req * cqr)
  195. {
  196. return dasd_default_erp_action;
  197. }
  198. static dasd_erp_fn_t
  199. dasd_fba_erp_postaction(struct dasd_ccw_req * cqr)
  200. {
  201. if (cqr->function == dasd_default_erp_action)
  202. return dasd_default_erp_postaction;
  203. DEV_MESSAGE(KERN_WARNING, cqr->device, "unknown ERP action %p",
  204. cqr->function);
  205. return NULL;
  206. }
  207. static struct dasd_ccw_req *
  208. dasd_fba_build_cp(struct dasd_device * device, struct request *req)
  209. {
  210. struct dasd_fba_private *private;
  211. unsigned long *idaws;
  212. struct LO_fba_data *LO_data;
  213. struct dasd_ccw_req *cqr;
  214. struct ccw1 *ccw;
  215. struct bio *bio;
  216. struct bio_vec *bv;
  217. char *dst;
  218. int count, cidaw, cplength, datasize;
  219. sector_t recid, first_rec, last_rec;
  220. unsigned int blksize, off;
  221. unsigned char cmd;
  222. int i;
  223. private = (struct dasd_fba_private *) device->private;
  224. if (rq_data_dir(req) == READ) {
  225. cmd = DASD_FBA_CCW_READ;
  226. } else if (rq_data_dir(req) == WRITE) {
  227. cmd = DASD_FBA_CCW_WRITE;
  228. } else
  229. return ERR_PTR(-EINVAL);
  230. blksize = device->bp_block;
  231. /* Calculate record id of first and last block. */
  232. first_rec = req->sector >> device->s2b_shift;
  233. last_rec = (req->sector + req->nr_sectors - 1) >> device->s2b_shift;
  234. /* Check struct bio and count the number of blocks for the request. */
  235. count = 0;
  236. cidaw = 0;
  237. rq_for_each_bio(bio, req) {
  238. bio_for_each_segment(bv, bio, i) {
  239. if (bv->bv_len & (blksize - 1))
  240. /* Fba can only do full blocks. */
  241. return ERR_PTR(-EINVAL);
  242. count += bv->bv_len >> (device->s2b_shift + 9);
  243. #if defined(CONFIG_ARCH_S390X)
  244. if (idal_is_needed (page_address(bv->bv_page),
  245. bv->bv_len))
  246. cidaw += bv->bv_len / blksize;
  247. #endif
  248. }
  249. }
  250. /* Paranoia. */
  251. if (count != last_rec - first_rec + 1)
  252. return ERR_PTR(-EINVAL);
  253. /* 1x define extent + 1x locate record + number of blocks */
  254. cplength = 2 + count;
  255. /* 1x define extent + 1x locate record */
  256. datasize = sizeof(struct DE_fba_data) + sizeof(struct LO_fba_data) +
  257. cidaw * sizeof(unsigned long);
  258. /*
  259. * Find out number of additional locate record ccws if the device
  260. * can't do data chaining.
  261. */
  262. if (private->rdc_data.mode.bits.data_chain == 0) {
  263. cplength += count - 1;
  264. datasize += (count - 1)*sizeof(struct LO_fba_data);
  265. }
  266. /* Allocate the ccw request. */
  267. cqr = dasd_smalloc_request(dasd_fba_discipline.name,
  268. cplength, datasize, device);
  269. if (IS_ERR(cqr))
  270. return cqr;
  271. ccw = cqr->cpaddr;
  272. /* First ccw is define extent. */
  273. define_extent(ccw++, cqr->data, rq_data_dir(req),
  274. device->bp_block, req->sector, req->nr_sectors);
  275. /* Build locate_record + read/write ccws. */
  276. idaws = (unsigned long *) (cqr->data + sizeof(struct DE_fba_data));
  277. LO_data = (struct LO_fba_data *) (idaws + cidaw);
  278. /* Locate record for all blocks for smart devices. */
  279. if (private->rdc_data.mode.bits.data_chain != 0) {
  280. ccw[-1].flags |= CCW_FLAG_CC;
  281. locate_record(ccw++, LO_data++, rq_data_dir(req), 0, count);
  282. }
  283. recid = first_rec;
  284. rq_for_each_bio(bio, req) bio_for_each_segment(bv, bio, i) {
  285. dst = page_address(bv->bv_page) + bv->bv_offset;
  286. if (dasd_page_cache) {
  287. char *copy = kmem_cache_alloc(dasd_page_cache,
  288. SLAB_DMA | __GFP_NOWARN);
  289. if (copy && rq_data_dir(req) == WRITE)
  290. memcpy(copy + bv->bv_offset, dst, bv->bv_len);
  291. if (copy)
  292. dst = copy + bv->bv_offset;
  293. }
  294. for (off = 0; off < bv->bv_len; off += blksize) {
  295. /* Locate record for stupid devices. */
  296. if (private->rdc_data.mode.bits.data_chain == 0) {
  297. ccw[-1].flags |= CCW_FLAG_CC;
  298. locate_record(ccw, LO_data++,
  299. rq_data_dir(req),
  300. recid - first_rec, 1);
  301. ccw->flags = CCW_FLAG_CC;
  302. ccw++;
  303. } else {
  304. if (recid > first_rec)
  305. ccw[-1].flags |= CCW_FLAG_DC;
  306. else
  307. ccw[-1].flags |= CCW_FLAG_CC;
  308. }
  309. ccw->cmd_code = cmd;
  310. ccw->count = device->bp_block;
  311. if (idal_is_needed(dst, blksize)) {
  312. ccw->cda = (__u32)(addr_t) idaws;
  313. ccw->flags = CCW_FLAG_IDA;
  314. idaws = idal_create_words(idaws, dst, blksize);
  315. } else {
  316. ccw->cda = (__u32)(addr_t) dst;
  317. ccw->flags = 0;
  318. }
  319. ccw++;
  320. dst += blksize;
  321. recid++;
  322. }
  323. }
  324. if (req->flags & REQ_FAILFAST)
  325. set_bit(DASD_CQR_FLAGS_FAILFAST, &cqr->flags);
  326. cqr->device = device;
  327. cqr->expires = 5 * 60 * HZ; /* 5 minutes */
  328. cqr->retries = 32;
  329. cqr->buildclk = get_clock();
  330. cqr->status = DASD_CQR_FILLED;
  331. return cqr;
  332. }
  333. static int
  334. dasd_fba_free_cp(struct dasd_ccw_req *cqr, struct request *req)
  335. {
  336. struct dasd_fba_private *private;
  337. struct ccw1 *ccw;
  338. struct bio *bio;
  339. struct bio_vec *bv;
  340. char *dst, *cda;
  341. unsigned int blksize, off;
  342. int i, status;
  343. if (!dasd_page_cache)
  344. goto out;
  345. private = (struct dasd_fba_private *) cqr->device->private;
  346. blksize = cqr->device->bp_block;
  347. ccw = cqr->cpaddr;
  348. /* Skip over define extent & locate record. */
  349. ccw++;
  350. if (private->rdc_data.mode.bits.data_chain != 0)
  351. ccw++;
  352. rq_for_each_bio(bio, req) bio_for_each_segment(bv, bio, i) {
  353. dst = page_address(bv->bv_page) + bv->bv_offset;
  354. for (off = 0; off < bv->bv_len; off += blksize) {
  355. /* Skip locate record. */
  356. if (private->rdc_data.mode.bits.data_chain == 0)
  357. ccw++;
  358. if (dst) {
  359. if (ccw->flags & CCW_FLAG_IDA)
  360. cda = *((char **)((addr_t) ccw->cda));
  361. else
  362. cda = (char *)((addr_t) ccw->cda);
  363. if (dst != cda) {
  364. if (rq_data_dir(req) == READ)
  365. memcpy(dst, cda, bv->bv_len);
  366. kmem_cache_free(dasd_page_cache,
  367. (void *)((addr_t)cda & PAGE_MASK));
  368. }
  369. dst = NULL;
  370. }
  371. ccw++;
  372. }
  373. }
  374. out:
  375. status = cqr->status == DASD_CQR_DONE;
  376. dasd_sfree_request(cqr, cqr->device);
  377. return status;
  378. }
  379. static int
  380. dasd_fba_fill_info(struct dasd_device * device,
  381. struct dasd_information2_t * info)
  382. {
  383. info->label_block = 1;
  384. info->FBA_layout = 1;
  385. info->format = DASD_FORMAT_LDL;
  386. info->characteristics_size = sizeof(struct dasd_fba_characteristics);
  387. memcpy(info->characteristics,
  388. &((struct dasd_fba_private *) device->private)->rdc_data,
  389. sizeof (struct dasd_fba_characteristics));
  390. info->confdata_size = 0;
  391. return 0;
  392. }
  393. static void
  394. dasd_fba_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req,
  395. struct irb *irb)
  396. {
  397. char *page;
  398. struct ccw1 *act, *end, *last;
  399. int len, sl, sct, count;
  400. page = (char *) get_zeroed_page(GFP_ATOMIC);
  401. if (page == NULL) {
  402. DEV_MESSAGE(KERN_ERR, device, " %s",
  403. "No memory to dump sense data");
  404. return;
  405. }
  406. len = sprintf(page, KERN_ERR PRINTK_HEADER
  407. " I/O status report for device %s:\n",
  408. device->cdev->dev.bus_id);
  409. len += sprintf(page + len, KERN_ERR PRINTK_HEADER
  410. " in req: %p CS: 0x%02X DS: 0x%02X\n", req,
  411. irb->scsw.cstat, irb->scsw.dstat);
  412. len += sprintf(page + len, KERN_ERR PRINTK_HEADER
  413. " device %s: Failing CCW: %p\n",
  414. device->cdev->dev.bus_id,
  415. (void *) (addr_t) irb->scsw.cpa);
  416. if (irb->esw.esw0.erw.cons) {
  417. for (sl = 0; sl < 4; sl++) {
  418. len += sprintf(page + len, KERN_ERR PRINTK_HEADER
  419. " Sense(hex) %2d-%2d:",
  420. (8 * sl), ((8 * sl) + 7));
  421. for (sct = 0; sct < 8; sct++) {
  422. len += sprintf(page + len, " %02x",
  423. irb->ecw[8 * sl + sct]);
  424. }
  425. len += sprintf(page + len, "\n");
  426. }
  427. } else {
  428. len += sprintf(page + len, KERN_ERR PRINTK_HEADER
  429. " SORRY - NO VALID SENSE AVAILABLE\n");
  430. }
  431. MESSAGE_LOG(KERN_ERR, "%s",
  432. page + sizeof(KERN_ERR PRINTK_HEADER));
  433. /* dump the Channel Program */
  434. /* print first CCWs (maximum 8) */
  435. act = req->cpaddr;
  436. for (last = act; last->flags & (CCW_FLAG_CC | CCW_FLAG_DC); last++);
  437. end = min(act + 8, last);
  438. len = sprintf(page, KERN_ERR PRINTK_HEADER
  439. " Related CP in req: %p\n", req);
  440. while (act <= end) {
  441. len += sprintf(page + len, KERN_ERR PRINTK_HEADER
  442. " CCW %p: %08X %08X DAT:",
  443. act, ((int *) act)[0], ((int *) act)[1]);
  444. for (count = 0; count < 32 && count < act->count;
  445. count += sizeof(int))
  446. len += sprintf(page + len, " %08X",
  447. ((int *) (addr_t) act->cda)
  448. [(count>>2)]);
  449. len += sprintf(page + len, "\n");
  450. act++;
  451. }
  452. MESSAGE_LOG(KERN_ERR, "%s",
  453. page + sizeof(KERN_ERR PRINTK_HEADER));
  454. /* print failing CCW area */
  455. len = 0;
  456. if (act < ((struct ccw1 *)(addr_t) irb->scsw.cpa) - 2) {
  457. act = ((struct ccw1 *)(addr_t) irb->scsw.cpa) - 2;
  458. len += sprintf(page + len, KERN_ERR PRINTK_HEADER "......\n");
  459. }
  460. end = min((struct ccw1 *)(addr_t) irb->scsw.cpa + 2, last);
  461. while (act <= end) {
  462. len += sprintf(page + len, KERN_ERR PRINTK_HEADER
  463. " CCW %p: %08X %08X DAT:",
  464. act, ((int *) act)[0], ((int *) act)[1]);
  465. for (count = 0; count < 32 && count < act->count;
  466. count += sizeof(int))
  467. len += sprintf(page + len, " %08X",
  468. ((int *) (addr_t) act->cda)
  469. [(count>>2)]);
  470. len += sprintf(page + len, "\n");
  471. act++;
  472. }
  473. /* print last CCWs */
  474. if (act < last - 2) {
  475. act = last - 2;
  476. len += sprintf(page + len, KERN_ERR PRINTK_HEADER "......\n");
  477. }
  478. while (act <= last) {
  479. len += sprintf(page + len, KERN_ERR PRINTK_HEADER
  480. " CCW %p: %08X %08X DAT:",
  481. act, ((int *) act)[0], ((int *) act)[1]);
  482. for (count = 0; count < 32 && count < act->count;
  483. count += sizeof(int))
  484. len += sprintf(page + len, " %08X",
  485. ((int *) (addr_t) act->cda)
  486. [(count>>2)]);
  487. len += sprintf(page + len, "\n");
  488. act++;
  489. }
  490. if (len > 0)
  491. MESSAGE_LOG(KERN_ERR, "%s",
  492. page + sizeof(KERN_ERR PRINTK_HEADER));
  493. free_page((unsigned long) page);
  494. }
  495. /*
  496. * max_blocks is dependent on the amount of storage that is available
  497. * in the static io buffer for each device. Currently each device has
  498. * 8192 bytes (=2 pages). For 64 bit one dasd_mchunkt_t structure has
  499. * 24 bytes, the struct dasd_ccw_req has 136 bytes and each block can use
  500. * up to 16 bytes (8 for the ccw and 8 for the idal pointer). In
  501. * addition we have one define extent ccw + 16 bytes of data and a
  502. * locate record ccw for each block (stupid devices!) + 16 bytes of data.
  503. * That makes:
  504. * (8192 - 24 - 136 - 8 - 16) / 40 = 200.2 blocks at maximum.
  505. * We want to fit two into the available memory so that we can immediately
  506. * start the next request if one finishes off. That makes 100.1 blocks
  507. * for one request. Give a little safety and the result is 96.
  508. */
  509. static struct dasd_discipline dasd_fba_discipline = {
  510. .owner = THIS_MODULE,
  511. .name = "FBA ",
  512. .ebcname = "FBA ",
  513. .max_blocks = 96,
  514. .check_device = dasd_fba_check_characteristics,
  515. .do_analysis = dasd_fba_do_analysis,
  516. .fill_geometry = dasd_fba_fill_geometry,
  517. .start_IO = dasd_start_IO,
  518. .term_IO = dasd_term_IO,
  519. .examine_error = dasd_fba_examine_error,
  520. .erp_action = dasd_fba_erp_action,
  521. .erp_postaction = dasd_fba_erp_postaction,
  522. .build_cp = dasd_fba_build_cp,
  523. .free_cp = dasd_fba_free_cp,
  524. .dump_sense = dasd_fba_dump_sense,
  525. .fill_info = dasd_fba_fill_info,
  526. };
  527. static int __init
  528. dasd_fba_init(void)
  529. {
  530. int ret;
  531. ASCEBC(dasd_fba_discipline.ebcname, 4);
  532. ret = ccw_driver_register(&dasd_fba_driver);
  533. if (ret)
  534. return ret;
  535. dasd_generic_auto_online(&dasd_fba_driver);
  536. return 0;
  537. }
  538. static void __exit
  539. dasd_fba_cleanup(void)
  540. {
  541. ccw_driver_unregister(&dasd_fba_driver);
  542. }
  543. module_init(dasd_fba_init);
  544. module_exit(dasd_fba_cleanup);
  545. /*
  546. * Overrides for Emacs so that we follow Linus's tabbing style.
  547. * Emacs will notice this stuff at the end of the file and automatically
  548. * adjust the settings for this buffer only. This must remain at the end
  549. * of the file.
  550. * ---------------------------------------------------------------------------
  551. * Local variables:
  552. * c-indent-level: 4
  553. * c-brace-imaginary-offset: 0
  554. * c-brace-offset: -4
  555. * c-argdecl-indent: 4
  556. * c-label-offset: -4
  557. * c-continued-statement-offset: 4
  558. * c-continued-brace-offset: 0
  559. * indent-tabs-mode: 1
  560. * tab-width: 8
  561. * End:
  562. */