dasd_fba.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609
  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.40 $
  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. cqr->device = device;
  325. cqr->expires = 5 * 60 * HZ; /* 5 minutes */
  326. cqr->retries = 32;
  327. cqr->buildclk = get_clock();
  328. cqr->status = DASD_CQR_FILLED;
  329. return cqr;
  330. }
  331. static int
  332. dasd_fba_free_cp(struct dasd_ccw_req *cqr, struct request *req)
  333. {
  334. struct dasd_fba_private *private;
  335. struct ccw1 *ccw;
  336. struct bio *bio;
  337. struct bio_vec *bv;
  338. char *dst, *cda;
  339. unsigned int blksize, off;
  340. int i, status;
  341. if (!dasd_page_cache)
  342. goto out;
  343. private = (struct dasd_fba_private *) cqr->device->private;
  344. blksize = cqr->device->bp_block;
  345. ccw = cqr->cpaddr;
  346. /* Skip over define extent & locate record. */
  347. ccw++;
  348. if (private->rdc_data.mode.bits.data_chain != 0)
  349. ccw++;
  350. rq_for_each_bio(bio, req) bio_for_each_segment(bv, bio, i) {
  351. dst = page_address(bv->bv_page) + bv->bv_offset;
  352. for (off = 0; off < bv->bv_len; off += blksize) {
  353. /* Skip locate record. */
  354. if (private->rdc_data.mode.bits.data_chain == 0)
  355. ccw++;
  356. if (dst) {
  357. if (ccw->flags & CCW_FLAG_IDA)
  358. cda = *((char **)((addr_t) ccw->cda));
  359. else
  360. cda = (char *)((addr_t) ccw->cda);
  361. if (dst != cda) {
  362. if (rq_data_dir(req) == READ)
  363. memcpy(dst, cda, bv->bv_len);
  364. kmem_cache_free(dasd_page_cache,
  365. (void *)((addr_t)cda & PAGE_MASK));
  366. }
  367. dst = NULL;
  368. }
  369. ccw++;
  370. }
  371. }
  372. out:
  373. status = cqr->status == DASD_CQR_DONE;
  374. dasd_sfree_request(cqr, cqr->device);
  375. return status;
  376. }
  377. static int
  378. dasd_fba_fill_info(struct dasd_device * device,
  379. struct dasd_information2_t * info)
  380. {
  381. info->label_block = 1;
  382. info->FBA_layout = 1;
  383. info->format = DASD_FORMAT_LDL;
  384. info->characteristics_size = sizeof(struct dasd_fba_characteristics);
  385. memcpy(info->characteristics,
  386. &((struct dasd_fba_private *) device->private)->rdc_data,
  387. sizeof (struct dasd_fba_characteristics));
  388. info->confdata_size = 0;
  389. return 0;
  390. }
  391. static void
  392. dasd_fba_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req,
  393. struct irb *irb)
  394. {
  395. char *page;
  396. struct ccw1 *act, *end, *last;
  397. int len, sl, sct, count;
  398. page = (char *) get_zeroed_page(GFP_ATOMIC);
  399. if (page == NULL) {
  400. DEV_MESSAGE(KERN_ERR, device, " %s",
  401. "No memory to dump sense data");
  402. return;
  403. }
  404. len = sprintf(page, KERN_ERR PRINTK_HEADER
  405. " I/O status report for device %s:\n",
  406. device->cdev->dev.bus_id);
  407. len += sprintf(page + len, KERN_ERR PRINTK_HEADER
  408. " in req: %p CS: 0x%02X DS: 0x%02X\n", req,
  409. irb->scsw.cstat, irb->scsw.dstat);
  410. len += sprintf(page + len, KERN_ERR PRINTK_HEADER
  411. " device %s: Failing CCW: %p\n",
  412. device->cdev->dev.bus_id,
  413. (void *) (addr_t) irb->scsw.cpa);
  414. if (irb->esw.esw0.erw.cons) {
  415. for (sl = 0; sl < 4; sl++) {
  416. len += sprintf(page + len, KERN_ERR PRINTK_HEADER
  417. " Sense(hex) %2d-%2d:",
  418. (8 * sl), ((8 * sl) + 7));
  419. for (sct = 0; sct < 8; sct++) {
  420. len += sprintf(page + len, " %02x",
  421. irb->ecw[8 * sl + sct]);
  422. }
  423. len += sprintf(page + len, "\n");
  424. }
  425. } else {
  426. len += sprintf(page + len, KERN_ERR PRINTK_HEADER
  427. " SORRY - NO VALID SENSE AVAILABLE\n");
  428. }
  429. MESSAGE_LOG(KERN_ERR, "%s",
  430. page + sizeof(KERN_ERR PRINTK_HEADER));
  431. /* dump the Channel Program */
  432. /* print first CCWs (maximum 8) */
  433. act = req->cpaddr;
  434. for (last = act; last->flags & (CCW_FLAG_CC | CCW_FLAG_DC); last++);
  435. end = min(act + 8, last);
  436. len = sprintf(page, KERN_ERR PRINTK_HEADER
  437. " Related CP in req: %p\n", req);
  438. while (act <= end) {
  439. len += sprintf(page + len, KERN_ERR PRINTK_HEADER
  440. " CCW %p: %08X %08X DAT:",
  441. act, ((int *) act)[0], ((int *) act)[1]);
  442. for (count = 0; count < 32 && count < act->count;
  443. count += sizeof(int))
  444. len += sprintf(page + len, " %08X",
  445. ((int *) (addr_t) act->cda)
  446. [(count>>2)]);
  447. len += sprintf(page + len, "\n");
  448. act++;
  449. }
  450. MESSAGE_LOG(KERN_ERR, "%s",
  451. page + sizeof(KERN_ERR PRINTK_HEADER));
  452. /* print failing CCW area */
  453. len = 0;
  454. if (act < ((struct ccw1 *)(addr_t) irb->scsw.cpa) - 2) {
  455. act = ((struct ccw1 *)(addr_t) irb->scsw.cpa) - 2;
  456. len += sprintf(page + len, KERN_ERR PRINTK_HEADER "......\n");
  457. }
  458. end = min((struct ccw1 *)(addr_t) irb->scsw.cpa + 2, last);
  459. while (act <= end) {
  460. len += sprintf(page + len, KERN_ERR PRINTK_HEADER
  461. " CCW %p: %08X %08X DAT:",
  462. act, ((int *) act)[0], ((int *) act)[1]);
  463. for (count = 0; count < 32 && count < act->count;
  464. count += sizeof(int))
  465. len += sprintf(page + len, " %08X",
  466. ((int *) (addr_t) act->cda)
  467. [(count>>2)]);
  468. len += sprintf(page + len, "\n");
  469. act++;
  470. }
  471. /* print last CCWs */
  472. if (act < last - 2) {
  473. act = last - 2;
  474. len += sprintf(page + len, KERN_ERR PRINTK_HEADER "......\n");
  475. }
  476. while (act <= last) {
  477. len += sprintf(page + len, KERN_ERR PRINTK_HEADER
  478. " CCW %p: %08X %08X DAT:",
  479. act, ((int *) act)[0], ((int *) act)[1]);
  480. for (count = 0; count < 32 && count < act->count;
  481. count += sizeof(int))
  482. len += sprintf(page + len, " %08X",
  483. ((int *) (addr_t) act->cda)
  484. [(count>>2)]);
  485. len += sprintf(page + len, "\n");
  486. act++;
  487. }
  488. if (len > 0)
  489. MESSAGE_LOG(KERN_ERR, "%s",
  490. page + sizeof(KERN_ERR PRINTK_HEADER));
  491. free_page((unsigned long) page);
  492. }
  493. /*
  494. * max_blocks is dependent on the amount of storage that is available
  495. * in the static io buffer for each device. Currently each device has
  496. * 8192 bytes (=2 pages). For 64 bit one dasd_mchunkt_t structure has
  497. * 24 bytes, the struct dasd_ccw_req has 136 bytes and each block can use
  498. * up to 16 bytes (8 for the ccw and 8 for the idal pointer). In
  499. * addition we have one define extent ccw + 16 bytes of data and a
  500. * locate record ccw for each block (stupid devices!) + 16 bytes of data.
  501. * That makes:
  502. * (8192 - 24 - 136 - 8 - 16) / 40 = 200.2 blocks at maximum.
  503. * We want to fit two into the available memory so that we can immediately
  504. * start the next request if one finishes off. That makes 100.1 blocks
  505. * for one request. Give a little safety and the result is 96.
  506. */
  507. static struct dasd_discipline dasd_fba_discipline = {
  508. .owner = THIS_MODULE,
  509. .name = "FBA ",
  510. .ebcname = "FBA ",
  511. .max_blocks = 96,
  512. .check_device = dasd_fba_check_characteristics,
  513. .do_analysis = dasd_fba_do_analysis,
  514. .fill_geometry = dasd_fba_fill_geometry,
  515. .start_IO = dasd_start_IO,
  516. .term_IO = dasd_term_IO,
  517. .examine_error = dasd_fba_examine_error,
  518. .erp_action = dasd_fba_erp_action,
  519. .erp_postaction = dasd_fba_erp_postaction,
  520. .build_cp = dasd_fba_build_cp,
  521. .free_cp = dasd_fba_free_cp,
  522. .dump_sense = dasd_fba_dump_sense,
  523. .fill_info = dasd_fba_fill_info,
  524. };
  525. static int __init
  526. dasd_fba_init(void)
  527. {
  528. int ret;
  529. ASCEBC(dasd_fba_discipline.ebcname, 4);
  530. ret = ccw_driver_register(&dasd_fba_driver);
  531. if (ret)
  532. return ret;
  533. dasd_generic_auto_online(&dasd_fba_driver);
  534. return 0;
  535. }
  536. static void __exit
  537. dasd_fba_cleanup(void)
  538. {
  539. ccw_driver_unregister(&dasd_fba_driver);
  540. }
  541. module_init(dasd_fba_init);
  542. module_exit(dasd_fba_cleanup);
  543. /*
  544. * Overrides for Emacs so that we follow Linus's tabbing style.
  545. * Emacs will notice this stuff at the end of the file and automatically
  546. * adjust the settings for this buffer only. This must remain at the end
  547. * of the file.
  548. * ---------------------------------------------------------------------------
  549. * Local variables:
  550. * c-indent-level: 4
  551. * c-brace-imaginary-offset: 0
  552. * c-brace-offset: -4
  553. * c-argdecl-indent: 4
  554. * c-label-offset: -4
  555. * c-continued-statement-offset: 4
  556. * c-continued-brace-offset: 0
  557. * indent-tabs-mode: 1
  558. * tab-width: 8
  559. * End:
  560. */