block.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695
  1. /*
  2. * Block driver for media (i.e., flash cards)
  3. *
  4. * Copyright 2002 Hewlett-Packard Company
  5. * Copyright 2005-2008 Pierre Ossman
  6. *
  7. * Use consistent with the GNU GPL is permitted,
  8. * provided that this copyright notice is
  9. * preserved in its entirety in all copies and derived works.
  10. *
  11. * HEWLETT-PACKARD COMPANY MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
  12. * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
  13. * FITNESS FOR ANY PARTICULAR PURPOSE.
  14. *
  15. * Many thanks to Alessandro Rubini and Jonathan Corbet!
  16. *
  17. * Author: Andrew Christian
  18. * 28 May 2002
  19. */
  20. #include <linux/moduleparam.h>
  21. #include <linux/module.h>
  22. #include <linux/init.h>
  23. #include <linux/kernel.h>
  24. #include <linux/fs.h>
  25. #include <linux/errno.h>
  26. #include <linux/hdreg.h>
  27. #include <linux/kdev_t.h>
  28. #include <linux/blkdev.h>
  29. #include <linux/mutex.h>
  30. #include <linux/scatterlist.h>
  31. #include <linux/string_helpers.h>
  32. #include <linux/mmc/card.h>
  33. #include <linux/mmc/host.h>
  34. #include <linux/mmc/mmc.h>
  35. #include <linux/mmc/sd.h>
  36. #include <asm/system.h>
  37. #include <asm/uaccess.h>
  38. #include "queue.h"
  39. MODULE_ALIAS("mmc:block");
  40. /*
  41. * max 8 partitions per card
  42. */
  43. #define MMC_SHIFT 3
  44. #define MMC_NUM_MINORS (256 >> MMC_SHIFT)
  45. static DECLARE_BITMAP(dev_use, MMC_NUM_MINORS);
  46. /*
  47. * There is one mmc_blk_data per slot.
  48. */
  49. struct mmc_blk_data {
  50. spinlock_t lock;
  51. struct gendisk *disk;
  52. struct mmc_queue queue;
  53. unsigned int usage;
  54. unsigned int read_only;
  55. };
  56. static DEFINE_MUTEX(open_lock);
  57. static struct mmc_blk_data *mmc_blk_get(struct gendisk *disk)
  58. {
  59. struct mmc_blk_data *md;
  60. mutex_lock(&open_lock);
  61. md = disk->private_data;
  62. if (md && md->usage == 0)
  63. md = NULL;
  64. if (md)
  65. md->usage++;
  66. mutex_unlock(&open_lock);
  67. return md;
  68. }
  69. static void mmc_blk_put(struct mmc_blk_data *md)
  70. {
  71. mutex_lock(&open_lock);
  72. md->usage--;
  73. if (md->usage == 0) {
  74. int devidx = MINOR(disk_devt(md->disk)) >> MMC_SHIFT;
  75. __clear_bit(devidx, dev_use);
  76. put_disk(md->disk);
  77. kfree(md);
  78. }
  79. mutex_unlock(&open_lock);
  80. }
  81. static int mmc_blk_open(struct block_device *bdev, fmode_t mode)
  82. {
  83. struct mmc_blk_data *md = mmc_blk_get(bdev->bd_disk);
  84. int ret = -ENXIO;
  85. if (md) {
  86. if (md->usage == 2)
  87. check_disk_change(bdev);
  88. ret = 0;
  89. if ((mode & FMODE_WRITE) && md->read_only) {
  90. mmc_blk_put(md);
  91. ret = -EROFS;
  92. }
  93. }
  94. return ret;
  95. }
  96. static int mmc_blk_release(struct gendisk *disk, fmode_t mode)
  97. {
  98. struct mmc_blk_data *md = disk->private_data;
  99. mmc_blk_put(md);
  100. return 0;
  101. }
  102. static int
  103. mmc_blk_getgeo(struct block_device *bdev, struct hd_geometry *geo)
  104. {
  105. geo->cylinders = get_capacity(bdev->bd_disk) / (4 * 16);
  106. geo->heads = 4;
  107. geo->sectors = 16;
  108. return 0;
  109. }
  110. static struct block_device_operations mmc_bdops = {
  111. .open = mmc_blk_open,
  112. .release = mmc_blk_release,
  113. .getgeo = mmc_blk_getgeo,
  114. .owner = THIS_MODULE,
  115. };
  116. struct mmc_blk_request {
  117. struct mmc_request mrq;
  118. struct mmc_command cmd;
  119. struct mmc_command stop;
  120. struct mmc_data data;
  121. };
  122. static u32 mmc_sd_num_wr_blocks(struct mmc_card *card)
  123. {
  124. int err;
  125. __be32 blocks;
  126. struct mmc_request mrq;
  127. struct mmc_command cmd;
  128. struct mmc_data data;
  129. unsigned int timeout_us;
  130. struct scatterlist sg;
  131. memset(&cmd, 0, sizeof(struct mmc_command));
  132. cmd.opcode = MMC_APP_CMD;
  133. cmd.arg = card->rca << 16;
  134. cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_AC;
  135. err = mmc_wait_for_cmd(card->host, &cmd, 0);
  136. if (err)
  137. return (u32)-1;
  138. if (!mmc_host_is_spi(card->host) && !(cmd.resp[0] & R1_APP_CMD))
  139. return (u32)-1;
  140. memset(&cmd, 0, sizeof(struct mmc_command));
  141. cmd.opcode = SD_APP_SEND_NUM_WR_BLKS;
  142. cmd.arg = 0;
  143. cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC;
  144. memset(&data, 0, sizeof(struct mmc_data));
  145. data.timeout_ns = card->csd.tacc_ns * 100;
  146. data.timeout_clks = card->csd.tacc_clks * 100;
  147. timeout_us = data.timeout_ns / 1000;
  148. timeout_us += data.timeout_clks * 1000 /
  149. (card->host->ios.clock / 1000);
  150. if (timeout_us > 100000) {
  151. data.timeout_ns = 100000000;
  152. data.timeout_clks = 0;
  153. }
  154. data.blksz = 4;
  155. data.blocks = 1;
  156. data.flags = MMC_DATA_READ;
  157. data.sg = &sg;
  158. data.sg_len = 1;
  159. memset(&mrq, 0, sizeof(struct mmc_request));
  160. mrq.cmd = &cmd;
  161. mrq.data = &data;
  162. sg_init_one(&sg, &blocks, 4);
  163. mmc_wait_for_req(card->host, &mrq);
  164. if (cmd.error || data.error)
  165. return (u32)-1;
  166. return ntohl(blocks);
  167. }
  168. static u32 get_card_status(struct mmc_card *card, struct request *req)
  169. {
  170. struct mmc_command cmd;
  171. int err;
  172. memset(&cmd, 0, sizeof(struct mmc_command));
  173. cmd.opcode = MMC_SEND_STATUS;
  174. if (!mmc_host_is_spi(card->host))
  175. cmd.arg = card->rca << 16;
  176. cmd.flags = MMC_RSP_SPI_R2 | MMC_RSP_R1 | MMC_CMD_AC;
  177. err = mmc_wait_for_cmd(card->host, &cmd, 0);
  178. if (err)
  179. printk(KERN_ERR "%s: error %d sending status comand",
  180. req->rq_disk->disk_name, err);
  181. return cmd.resp[0];
  182. }
  183. static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
  184. {
  185. struct mmc_blk_data *md = mq->data;
  186. struct mmc_card *card = md->queue.card;
  187. struct mmc_blk_request brq;
  188. int ret = 1, disable_multi = 0;
  189. mmc_claim_host(card->host);
  190. do {
  191. struct mmc_command cmd;
  192. u32 readcmd, writecmd, status = 0;
  193. memset(&brq, 0, sizeof(struct mmc_blk_request));
  194. brq.mrq.cmd = &brq.cmd;
  195. brq.mrq.data = &brq.data;
  196. brq.cmd.arg = req->sector;
  197. if (!mmc_card_blockaddr(card))
  198. brq.cmd.arg <<= 9;
  199. brq.cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC;
  200. brq.data.blksz = 512;
  201. brq.stop.opcode = MMC_STOP_TRANSMISSION;
  202. brq.stop.arg = 0;
  203. brq.stop.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC;
  204. brq.data.blocks = req->nr_sectors;
  205. /*
  206. * The block layer doesn't support all sector count
  207. * restrictions, so we need to be prepared for too big
  208. * requests.
  209. */
  210. if (brq.data.blocks > card->host->max_blk_count)
  211. brq.data.blocks = card->host->max_blk_count;
  212. /*
  213. * After a read error, we redo the request one sector at a time
  214. * in order to accurately determine which sectors can be read
  215. * successfully.
  216. */
  217. if (disable_multi && brq.data.blocks > 1)
  218. brq.data.blocks = 1;
  219. if (brq.data.blocks > 1) {
  220. /* SPI multiblock writes terminate using a special
  221. * token, not a STOP_TRANSMISSION request.
  222. */
  223. if (!mmc_host_is_spi(card->host)
  224. || rq_data_dir(req) == READ)
  225. brq.mrq.stop = &brq.stop;
  226. readcmd = MMC_READ_MULTIPLE_BLOCK;
  227. writecmd = MMC_WRITE_MULTIPLE_BLOCK;
  228. } else {
  229. brq.mrq.stop = NULL;
  230. readcmd = MMC_READ_SINGLE_BLOCK;
  231. writecmd = MMC_WRITE_BLOCK;
  232. }
  233. if (rq_data_dir(req) == READ) {
  234. brq.cmd.opcode = readcmd;
  235. brq.data.flags |= MMC_DATA_READ;
  236. } else {
  237. brq.cmd.opcode = writecmd;
  238. brq.data.flags |= MMC_DATA_WRITE;
  239. }
  240. mmc_set_data_timeout(&brq.data, card);
  241. brq.data.sg = mq->sg;
  242. brq.data.sg_len = mmc_queue_map_sg(mq);
  243. /*
  244. * Adjust the sg list so it is the same size as the
  245. * request.
  246. */
  247. if (brq.data.blocks != req->nr_sectors) {
  248. int i, data_size = brq.data.blocks << 9;
  249. struct scatterlist *sg;
  250. for_each_sg(brq.data.sg, sg, brq.data.sg_len, i) {
  251. data_size -= sg->length;
  252. if (data_size <= 0) {
  253. sg->length += data_size;
  254. i++;
  255. break;
  256. }
  257. }
  258. brq.data.sg_len = i;
  259. }
  260. mmc_queue_bounce_pre(mq);
  261. mmc_wait_for_req(card->host, &brq.mrq);
  262. mmc_queue_bounce_post(mq);
  263. /*
  264. * Check for errors here, but don't jump to cmd_err
  265. * until later as we need to wait for the card to leave
  266. * programming mode even when things go wrong.
  267. */
  268. if (brq.cmd.error || brq.data.error || brq.stop.error) {
  269. if (brq.data.blocks > 1 && rq_data_dir(req) == READ) {
  270. /* Redo read one sector at a time */
  271. printk(KERN_WARNING "%s: retrying using single "
  272. "block read\n", req->rq_disk->disk_name);
  273. disable_multi = 1;
  274. continue;
  275. }
  276. status = get_card_status(card, req);
  277. }
  278. if (brq.cmd.error) {
  279. printk(KERN_ERR "%s: error %d sending read/write "
  280. "command, response %#x, card status %#x\n",
  281. req->rq_disk->disk_name, brq.cmd.error,
  282. brq.cmd.resp[0], status);
  283. }
  284. if (brq.data.error) {
  285. if (brq.data.error == -ETIMEDOUT && brq.mrq.stop)
  286. /* 'Stop' response contains card status */
  287. status = brq.mrq.stop->resp[0];
  288. printk(KERN_ERR "%s: error %d transferring data,"
  289. " sector %u, nr %u, card status %#x\n",
  290. req->rq_disk->disk_name, brq.data.error,
  291. (unsigned)req->sector,
  292. (unsigned)req->nr_sectors, status);
  293. }
  294. if (brq.stop.error) {
  295. printk(KERN_ERR "%s: error %d sending stop command, "
  296. "response %#x, card status %#x\n",
  297. req->rq_disk->disk_name, brq.stop.error,
  298. brq.stop.resp[0], status);
  299. }
  300. if (!mmc_host_is_spi(card->host) && rq_data_dir(req) != READ) {
  301. do {
  302. int err;
  303. cmd.opcode = MMC_SEND_STATUS;
  304. cmd.arg = card->rca << 16;
  305. cmd.flags = MMC_RSP_R1 | MMC_CMD_AC;
  306. err = mmc_wait_for_cmd(card->host, &cmd, 5);
  307. if (err) {
  308. printk(KERN_ERR "%s: error %d requesting status\n",
  309. req->rq_disk->disk_name, err);
  310. goto cmd_err;
  311. }
  312. /*
  313. * Some cards mishandle the status bits,
  314. * so make sure to check both the busy
  315. * indication and the card state.
  316. */
  317. } while (!(cmd.resp[0] & R1_READY_FOR_DATA) ||
  318. (R1_CURRENT_STATE(cmd.resp[0]) == 7));
  319. #if 0
  320. if (cmd.resp[0] & ~0x00000900)
  321. printk(KERN_ERR "%s: status = %08x\n",
  322. req->rq_disk->disk_name, cmd.resp[0]);
  323. if (mmc_decode_status(cmd.resp))
  324. goto cmd_err;
  325. #endif
  326. }
  327. if (brq.cmd.error || brq.stop.error || brq.data.error) {
  328. if (rq_data_dir(req) == READ) {
  329. /*
  330. * After an error, we redo I/O one sector at a
  331. * time, so we only reach here after trying to
  332. * read a single sector.
  333. */
  334. spin_lock_irq(&md->lock);
  335. ret = __blk_end_request(req, -EIO, brq.data.blksz);
  336. spin_unlock_irq(&md->lock);
  337. continue;
  338. }
  339. goto cmd_err;
  340. }
  341. /*
  342. * A block was successfully transferred.
  343. */
  344. spin_lock_irq(&md->lock);
  345. ret = __blk_end_request(req, 0, brq.data.bytes_xfered);
  346. spin_unlock_irq(&md->lock);
  347. } while (ret);
  348. mmc_release_host(card->host);
  349. return 1;
  350. cmd_err:
  351. /*
  352. * If this is an SD card and we're writing, we can first
  353. * mark the known good sectors as ok.
  354. *
  355. * If the card is not SD, we can still ok written sectors
  356. * as reported by the controller (which might be less than
  357. * the real number of written sectors, but never more).
  358. */
  359. if (mmc_card_sd(card)) {
  360. u32 blocks;
  361. blocks = mmc_sd_num_wr_blocks(card);
  362. if (blocks != (u32)-1) {
  363. spin_lock_irq(&md->lock);
  364. ret = __blk_end_request(req, 0, blocks << 9);
  365. spin_unlock_irq(&md->lock);
  366. }
  367. } else {
  368. spin_lock_irq(&md->lock);
  369. ret = __blk_end_request(req, 0, brq.data.bytes_xfered);
  370. spin_unlock_irq(&md->lock);
  371. }
  372. mmc_release_host(card->host);
  373. spin_lock_irq(&md->lock);
  374. while (ret)
  375. ret = __blk_end_request(req, -EIO, blk_rq_cur_bytes(req));
  376. spin_unlock_irq(&md->lock);
  377. return 0;
  378. }
  379. static inline int mmc_blk_readonly(struct mmc_card *card)
  380. {
  381. return mmc_card_readonly(card) ||
  382. !(card->csd.cmdclass & CCC_BLOCK_WRITE);
  383. }
  384. static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
  385. {
  386. struct mmc_blk_data *md;
  387. int devidx, ret;
  388. devidx = find_first_zero_bit(dev_use, MMC_NUM_MINORS);
  389. if (devidx >= MMC_NUM_MINORS)
  390. return ERR_PTR(-ENOSPC);
  391. __set_bit(devidx, dev_use);
  392. md = kzalloc(sizeof(struct mmc_blk_data), GFP_KERNEL);
  393. if (!md) {
  394. ret = -ENOMEM;
  395. goto out;
  396. }
  397. /*
  398. * Set the read-only status based on the supported commands
  399. * and the write protect switch.
  400. */
  401. md->read_only = mmc_blk_readonly(card);
  402. md->disk = alloc_disk(1 << MMC_SHIFT);
  403. if (md->disk == NULL) {
  404. ret = -ENOMEM;
  405. goto err_kfree;
  406. }
  407. spin_lock_init(&md->lock);
  408. md->usage = 1;
  409. ret = mmc_init_queue(&md->queue, card, &md->lock);
  410. if (ret)
  411. goto err_putdisk;
  412. md->queue.issue_fn = mmc_blk_issue_rq;
  413. md->queue.data = md;
  414. md->disk->major = MMC_BLOCK_MAJOR;
  415. md->disk->first_minor = devidx << MMC_SHIFT;
  416. md->disk->fops = &mmc_bdops;
  417. md->disk->private_data = md;
  418. md->disk->queue = md->queue.queue;
  419. md->disk->driverfs_dev = &card->dev;
  420. /*
  421. * As discussed on lkml, GENHD_FL_REMOVABLE should:
  422. *
  423. * - be set for removable media with permanent block devices
  424. * - be unset for removable block devices with permanent media
  425. *
  426. * Since MMC block devices clearly fall under the second
  427. * case, we do not set GENHD_FL_REMOVABLE. Userspace
  428. * should use the block device creation/destruction hotplug
  429. * messages to tell when the card is present.
  430. */
  431. sprintf(md->disk->disk_name, "mmcblk%d", devidx);
  432. blk_queue_hardsect_size(md->queue.queue, 512);
  433. if (!mmc_card_sd(card) && mmc_card_blockaddr(card)) {
  434. /*
  435. * The EXT_CSD sector count is in number or 512 byte
  436. * sectors.
  437. */
  438. set_capacity(md->disk, card->ext_csd.sectors);
  439. } else {
  440. /*
  441. * The CSD capacity field is in units of read_blkbits.
  442. * set_capacity takes units of 512 bytes.
  443. */
  444. set_capacity(md->disk,
  445. card->csd.capacity << (card->csd.read_blkbits - 9));
  446. }
  447. return md;
  448. err_putdisk:
  449. put_disk(md->disk);
  450. err_kfree:
  451. kfree(md);
  452. out:
  453. return ERR_PTR(ret);
  454. }
  455. static int
  456. mmc_blk_set_blksize(struct mmc_blk_data *md, struct mmc_card *card)
  457. {
  458. struct mmc_command cmd;
  459. int err;
  460. /* Block-addressed cards ignore MMC_SET_BLOCKLEN. */
  461. if (mmc_card_blockaddr(card))
  462. return 0;
  463. mmc_claim_host(card->host);
  464. cmd.opcode = MMC_SET_BLOCKLEN;
  465. cmd.arg = 512;
  466. cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_AC;
  467. err = mmc_wait_for_cmd(card->host, &cmd, 5);
  468. mmc_release_host(card->host);
  469. if (err) {
  470. printk(KERN_ERR "%s: unable to set block size to %d: %d\n",
  471. md->disk->disk_name, cmd.arg, err);
  472. return -EINVAL;
  473. }
  474. return 0;
  475. }
  476. static int mmc_blk_probe(struct mmc_card *card)
  477. {
  478. struct mmc_blk_data *md;
  479. int err;
  480. char cap_str[10];
  481. /*
  482. * Check that the card supports the command class(es) we need.
  483. */
  484. if (!(card->csd.cmdclass & CCC_BLOCK_READ))
  485. return -ENODEV;
  486. md = mmc_blk_alloc(card);
  487. if (IS_ERR(md))
  488. return PTR_ERR(md);
  489. err = mmc_blk_set_blksize(md, card);
  490. if (err)
  491. goto out;
  492. string_get_size((u64)get_capacity(md->disk) << 9, STRING_UNITS_2,
  493. cap_str, sizeof(cap_str));
  494. printk(KERN_INFO "%s: %s %s %s %s\n",
  495. md->disk->disk_name, mmc_card_id(card), mmc_card_name(card),
  496. cap_str, md->read_only ? "(ro)" : "");
  497. mmc_set_drvdata(card, md);
  498. add_disk(md->disk);
  499. return 0;
  500. out:
  501. mmc_blk_put(md);
  502. return err;
  503. }
  504. static void mmc_blk_remove(struct mmc_card *card)
  505. {
  506. struct mmc_blk_data *md = mmc_get_drvdata(card);
  507. if (md) {
  508. /* Stop new requests from getting into the queue */
  509. del_gendisk(md->disk);
  510. /* Then flush out any already in there */
  511. mmc_cleanup_queue(&md->queue);
  512. mmc_blk_put(md);
  513. }
  514. mmc_set_drvdata(card, NULL);
  515. }
  516. #ifdef CONFIG_PM
  517. static int mmc_blk_suspend(struct mmc_card *card, pm_message_t state)
  518. {
  519. struct mmc_blk_data *md = mmc_get_drvdata(card);
  520. if (md) {
  521. mmc_queue_suspend(&md->queue);
  522. }
  523. return 0;
  524. }
  525. static int mmc_blk_resume(struct mmc_card *card)
  526. {
  527. struct mmc_blk_data *md = mmc_get_drvdata(card);
  528. if (md) {
  529. mmc_blk_set_blksize(md, card);
  530. mmc_queue_resume(&md->queue);
  531. }
  532. return 0;
  533. }
  534. #else
  535. #define mmc_blk_suspend NULL
  536. #define mmc_blk_resume NULL
  537. #endif
  538. static struct mmc_driver mmc_driver = {
  539. .drv = {
  540. .name = "mmcblk",
  541. },
  542. .probe = mmc_blk_probe,
  543. .remove = mmc_blk_remove,
  544. .suspend = mmc_blk_suspend,
  545. .resume = mmc_blk_resume,
  546. };
  547. static int __init mmc_blk_init(void)
  548. {
  549. int res;
  550. res = register_blkdev(MMC_BLOCK_MAJOR, "mmc");
  551. if (res)
  552. goto out;
  553. res = mmc_register_driver(&mmc_driver);
  554. if (res)
  555. goto out2;
  556. return 0;
  557. out2:
  558. unregister_blkdev(MMC_BLOCK_MAJOR, "mmc");
  559. out:
  560. return res;
  561. }
  562. static void __exit mmc_blk_exit(void)
  563. {
  564. mmc_unregister_driver(&mmc_driver);
  565. unregister_blkdev(MMC_BLOCK_MAJOR, "mmc");
  566. }
  567. module_init(mmc_blk_init);
  568. module_exit(mmc_blk_exit);
  569. MODULE_LICENSE("GPL");
  570. MODULE_DESCRIPTION("Multimedia Card (MMC) block device driver");