dasd_fba.c 17 KB

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