block.c 14.2 KB
Newer Older
L
Linus Torvalds 已提交
1 2 3 4
/*
 * Block driver for media (i.e., flash cards)
 *
 * Copyright 2002 Hewlett-Packard Company
5
 * Copyright 2005-2007 Pierre Ossman
L
Linus Torvalds 已提交
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
 *
 * Use consistent with the GNU GPL is permitted,
 * provided that this copyright notice is
 * preserved in its entirety in all copies and derived works.
 *
 * HEWLETT-PACKARD COMPANY MAKES NO WARRANTIES, EXPRESSED OR IMPLIED,
 * AS TO THE USEFULNESS OR CORRECTNESS OF THIS CODE OR ITS
 * FITNESS FOR ANY PARTICULAR PURPOSE.
 *
 * Many thanks to Alessandro Rubini and Jonathan Corbet!
 *
 * Author:  Andrew Christian
 *          28 May 2002
 */
#include <linux/moduleparam.h>
#include <linux/module.h>
#include <linux/init.h>

#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/errno.h>
#include <linux/hdreg.h>
#include <linux/kdev_t.h>
#include <linux/blkdev.h>
30
#include <linux/mutex.h>
31
#include <linux/scatterlist.h>
L
Linus Torvalds 已提交
32 33

#include <linux/mmc/card.h>
P
Pierre Ossman 已提交
34
#include <linux/mmc/host.h>
P
Pierre Ossman 已提交
35 36
#include <linux/mmc/mmc.h>
#include <linux/mmc/sd.h>
L
Linus Torvalds 已提交
37 38 39 40

#include <asm/system.h>
#include <asm/uaccess.h>

41
#include "queue.h"
L
Linus Torvalds 已提交
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57

/*
 * max 8 partitions per card
 */
#define MMC_SHIFT	3

/*
 * There is one mmc_blk_data per slot.
 */
struct mmc_blk_data {
	spinlock_t	lock;
	struct gendisk	*disk;
	struct mmc_queue queue;

	unsigned int	usage;
	unsigned int	block_bits;
58
	unsigned int	read_only;
L
Linus Torvalds 已提交
59 60
};

61
static DEFINE_MUTEX(open_lock);
L
Linus Torvalds 已提交
62 63 64 65 66

static struct mmc_blk_data *mmc_blk_get(struct gendisk *disk)
{
	struct mmc_blk_data *md;

67
	mutex_lock(&open_lock);
L
Linus Torvalds 已提交
68 69 70 71 72
	md = disk->private_data;
	if (md && md->usage == 0)
		md = NULL;
	if (md)
		md->usage++;
73
	mutex_unlock(&open_lock);
L
Linus Torvalds 已提交
74 75 76 77 78 79

	return md;
}

static void mmc_blk_put(struct mmc_blk_data *md)
{
80
	mutex_lock(&open_lock);
L
Linus Torvalds 已提交
81 82 83 84 85
	md->usage--;
	if (md->usage == 0) {
		put_disk(md->disk);
		kfree(md);
	}
86
	mutex_unlock(&open_lock);
L
Linus Torvalds 已提交
87 88 89 90 91 92 93 94 95 96 97 98
}

static int mmc_blk_open(struct inode *inode, struct file *filp)
{
	struct mmc_blk_data *md;
	int ret = -ENXIO;

	md = mmc_blk_get(inode->i_bdev->bd_disk);
	if (md) {
		if (md->usage == 2)
			check_disk_change(inode->i_bdev);
		ret = 0;
P
Pierre Ossman 已提交
99

100
		if ((filp->f_mode & FMODE_WRITE) && md->read_only)
P
Pierre Ossman 已提交
101
			ret = -EROFS;
L
Linus Torvalds 已提交
102 103 104 105 106 107 108 109 110 111 112 113 114 115
	}

	return ret;
}

static int mmc_blk_release(struct inode *inode, struct file *filp)
{
	struct mmc_blk_data *md = inode->i_bdev->bd_disk->private_data;

	mmc_blk_put(md);
	return 0;
}

static int
116
mmc_blk_getgeo(struct block_device *bdev, struct hd_geometry *geo)
L
Linus Torvalds 已提交
117
{
118 119 120 121
	geo->cylinders = get_capacity(bdev->bd_disk) / (4 * 16);
	geo->heads = 4;
	geo->sectors = 16;
	return 0;
L
Linus Torvalds 已提交
122 123 124 125 126
}

static struct block_device_operations mmc_bdops = {
	.open			= mmc_blk_open,
	.release		= mmc_blk_release,
127
	.getgeo			= mmc_blk_getgeo,
L
Linus Torvalds 已提交
128 129 130 131 132 133 134 135 136 137
	.owner			= THIS_MODULE,
};

struct mmc_blk_request {
	struct mmc_request	mrq;
	struct mmc_command	cmd;
	struct mmc_command	stop;
	struct mmc_data		data;
};

138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
static u32 mmc_sd_num_wr_blocks(struct mmc_card *card)
{
	int err;
	u32 blocks;

	struct mmc_request mrq;
	struct mmc_command cmd;
	struct mmc_data data;
	unsigned int timeout_us;

	struct scatterlist sg;

	memset(&cmd, 0, sizeof(struct mmc_command));

	cmd.opcode = MMC_APP_CMD;
	cmd.arg = card->rca << 16;
D
David Brownell 已提交
154
	cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_AC;
155 156

	err = mmc_wait_for_cmd(card->host, &cmd, 0);
D
David Brownell 已提交
157 158 159
	if (err)
		return (u32)-1;
	if (!mmc_host_is_spi(card->host) && !(cmd.resp[0] & R1_APP_CMD))
160 161 162 163 164 165
		return (u32)-1;

	memset(&cmd, 0, sizeof(struct mmc_command));

	cmd.opcode = SD_APP_SEND_NUM_WR_BLKS;
	cmd.arg = 0;
D
David Brownell 已提交
166
	cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC;
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196

	memset(&data, 0, sizeof(struct mmc_data));

	data.timeout_ns = card->csd.tacc_ns * 100;
	data.timeout_clks = card->csd.tacc_clks * 100;

	timeout_us = data.timeout_ns / 1000;
	timeout_us += data.timeout_clks * 1000 /
		(card->host->ios.clock / 1000);

	if (timeout_us > 100000) {
		data.timeout_ns = 100000000;
		data.timeout_clks = 0;
	}

	data.blksz = 4;
	data.blocks = 1;
	data.flags = MMC_DATA_READ;
	data.sg = &sg;
	data.sg_len = 1;

	memset(&mrq, 0, sizeof(struct mmc_request));

	mrq.cmd = &cmd;
	mrq.data = &data;

	sg_init_one(&sg, &blocks, 4);

	mmc_wait_for_req(card->host, &mrq);

P
Pierre Ossman 已提交
197
	if (cmd.error || data.error)
198 199 200 201 202 203 204
		return (u32)-1;

	blocks = ntohl(blocks);

	return blocks;
}

L
Linus Torvalds 已提交
205 206 207 208
static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
{
	struct mmc_blk_data *md = mq->data;
	struct mmc_card *card = md->queue.card;
209
	struct mmc_blk_request brq;
210
	int ret = 1, sg_pos, data_size;
L
Linus Torvalds 已提交
211

P
Pierre Ossman 已提交
212
	mmc_claim_host(card->host);
L
Linus Torvalds 已提交
213 214 215

	do {
		struct mmc_command cmd;
216
		u32 readcmd, writecmd;
L
Linus Torvalds 已提交
217 218 219 220 221

		memset(&brq, 0, sizeof(struct mmc_blk_request));
		brq.mrq.cmd = &brq.cmd;
		brq.mrq.data = &brq.data;

222 223 224
		brq.cmd.arg = req->sector;
		if (!mmc_card_blockaddr(card))
			brq.cmd.arg <<= 9;
D
David Brownell 已提交
225
		brq.cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_ADTC;
226
		brq.data.blksz = 1 << md->block_bits;
L
Linus Torvalds 已提交
227 228
		brq.stop.opcode = MMC_STOP_TRANSMISSION;
		brq.stop.arg = 0;
D
David Brownell 已提交
229
		brq.stop.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC;
230 231 232
		brq.data.blocks = req->nr_sectors >> (md->block_bits - 9);
		if (brq.data.blocks > card->host->max_blk_count)
			brq.data.blocks = card->host->max_blk_count;
L
Linus Torvalds 已提交
233

234 235
		/*
		 * If the host doesn't support multiple block writes, force
236 237 238
		 * block writes to single block. SD cards are excepted from
		 * this rule as they support querying the number of
		 * successfully written sectors.
239 240
		 */
		if (rq_data_dir(req) != READ &&
241 242
		    !(card->host->caps & MMC_CAP_MULTIWRITE) &&
		    !mmc_card_sd(card))
L
Linus Torvalds 已提交
243
			brq.data.blocks = 1;
R
Russell King 已提交
244 245

		if (brq.data.blocks > 1) {
D
David Brownell 已提交
246 247 248 249 250 251
			/* SPI multiblock writes terminate using a special
			 * token, not a STOP_TRANSMISSION request.
			 */
			if (!mmc_host_is_spi(card->host)
					|| rq_data_dir(req) == READ)
				brq.mrq.stop = &brq.stop;
252 253
			readcmd = MMC_READ_MULTIPLE_BLOCK;
			writecmd = MMC_WRITE_MULTIPLE_BLOCK;
R
Russell King 已提交
254 255
		} else {
			brq.mrq.stop = NULL;
256 257 258 259 260 261 262 263 264 265
			readcmd = MMC_READ_SINGLE_BLOCK;
			writecmd = MMC_WRITE_BLOCK;
		}

		if (rq_data_dir(req) == READ) {
			brq.cmd.opcode = readcmd;
			brq.data.flags |= MMC_DATA_READ;
		} else {
			brq.cmd.opcode = writecmd;
			brq.data.flags |= MMC_DATA_WRITE;
R
Russell King 已提交
266
		}
L
Linus Torvalds 已提交
267

268 269
		mmc_set_data_timeout(&brq.data, card);

L
Linus Torvalds 已提交
270
		brq.data.sg = mq->sg;
271 272 273
		brq.data.sg_len = mmc_queue_map_sg(mq);

		mmc_queue_bounce_pre(mq);
L
Linus Torvalds 已提交
274

275 276 277 278 279 280 281 282 283 284 285 286 287 288
		if (brq.data.blocks !=
		    (req->nr_sectors >> (md->block_bits - 9))) {
			data_size = brq.data.blocks * brq.data.blksz;
			for (sg_pos = 0; sg_pos < brq.data.sg_len; sg_pos++) {
				data_size -= mq->sg[sg_pos].length;
				if (data_size <= 0) {
					mq->sg[sg_pos].length += data_size;
					sg_pos++;
					break;
				}
			}
			brq.data.sg_len = sg_pos;
		}

L
Linus Torvalds 已提交
289
		mmc_wait_for_req(card->host, &brq.mrq);
290 291 292

		mmc_queue_bounce_post(mq);

L
Linus Torvalds 已提交
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310
		if (brq.cmd.error) {
			printk(KERN_ERR "%s: error %d sending read/write command\n",
			       req->rq_disk->disk_name, brq.cmd.error);
			goto cmd_err;
		}

		if (brq.data.error) {
			printk(KERN_ERR "%s: error %d transferring data\n",
			       req->rq_disk->disk_name, brq.data.error);
			goto cmd_err;
		}

		if (brq.stop.error) {
			printk(KERN_ERR "%s: error %d sending stop command\n",
			       req->rq_disk->disk_name, brq.stop.error);
			goto cmd_err;
		}

D
David Brownell 已提交
311
		if (!mmc_host_is_spi(card->host) && rq_data_dir(req) != READ) {
312 313 314 315 316 317 318 319 320 321 322 323 324
			do {
				int err;

				cmd.opcode = MMC_SEND_STATUS;
				cmd.arg = card->rca << 16;
				cmd.flags = MMC_RSP_R1 | MMC_CMD_AC;
				err = mmc_wait_for_cmd(card->host, &cmd, 5);
				if (err) {
					printk(KERN_ERR "%s: error %d requesting status\n",
					       req->rq_disk->disk_name, err);
					goto cmd_err;
				}
			} while (!(cmd.resp[0] & R1_READY_FOR_DATA));
L
Linus Torvalds 已提交
325 326

#if 0
327 328 329 330 331
			if (cmd.resp[0] & ~0x00000900)
				printk(KERN_ERR "%s: status = %08x\n",
				       req->rq_disk->disk_name, cmd.resp[0]);
			if (mmc_decode_status(cmd.resp))
				goto cmd_err;
L
Linus Torvalds 已提交
332
#endif
333
		}
L
Linus Torvalds 已提交
334 335 336 337 338 339 340 341 342 343 344 345

		/*
		 * A block was successfully transferred.
		 */
		spin_lock_irq(&md->lock);
		ret = end_that_request_chunk(req, 1, brq.data.bytes_xfered);
		if (!ret) {
			/*
			 * The whole request completed successfully.
			 */
			add_disk_randomness(req->rq_disk);
			blkdev_dequeue_request(req);
346
			end_that_request_last(req, 1);
L
Linus Torvalds 已提交
347 348 349 350
		}
		spin_unlock_irq(&md->lock);
	} while (ret);

P
Pierre Ossman 已提交
351
	mmc_release_host(card->host);
L
Linus Torvalds 已提交
352 353 354 355

	return 1;

 cmd_err:
356 357 358 359 360 361
 	/*
 	 * If this is an SD card and we're writing, we can first
 	 * mark the known good sectors as ok.
 	 *
	 * If the card is not SD, we can still ok written sectors
	 * if the controller can do proper error reporting.
362 363 364
	 *
	 * For reads we just fail the entire chunk as that should
	 * be safe in all cases.
L
Linus Torvalds 已提交
365
	 */
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381
 	if (rq_data_dir(req) != READ && mmc_card_sd(card)) {
		u32 blocks;
		unsigned int bytes;

		blocks = mmc_sd_num_wr_blocks(card);
		if (blocks != (u32)-1) {
			if (card->csd.write_partial)
				bytes = blocks << md->block_bits;
			else
				bytes = blocks << 9;
			spin_lock_irq(&md->lock);
			ret = end_that_request_chunk(req, 1, bytes);
			spin_unlock_irq(&md->lock);
		}
	} else if (rq_data_dir(req) != READ &&
		   (card->host->caps & MMC_CAP_MULTIWRITE)) {
382 383 384 385 386
		spin_lock_irq(&md->lock);
		ret = end_that_request_chunk(req, 1, brq.data.bytes_xfered);
		spin_unlock_irq(&md->lock);
	}

P
Pierre Ossman 已提交
387
	mmc_release_host(card->host);
388

L
Linus Torvalds 已提交
389
	spin_lock_irq(&md->lock);
390
	while (ret) {
L
Linus Torvalds 已提交
391 392
		ret = end_that_request_chunk(req, 0,
				req->current_nr_sectors << 9);
393
	}
L
Linus Torvalds 已提交
394 395 396

	add_disk_randomness(req->rq_disk);
	blkdev_dequeue_request(req);
397
	end_that_request_last(req, 0);
L
Linus Torvalds 已提交
398 399 400 401 402 403 404 405 406
	spin_unlock_irq(&md->lock);

	return 0;
}

#define MMC_NUM_MINORS	(256 >> MMC_SHIFT)

static unsigned long dev_use[MMC_NUM_MINORS/(8*sizeof(unsigned long))];

407 408 409 410 411 412
static inline int mmc_blk_readonly(struct mmc_card *card)
{
	return mmc_card_readonly(card) ||
	       !(card->csd.cmdclass & CCC_BLOCK_WRITE);
}

L
Linus Torvalds 已提交
413 414 415 416 417 418 419 420 421 422
static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
{
	struct mmc_blk_data *md;
	int devidx, ret;

	devidx = find_first_zero_bit(dev_use, MMC_NUM_MINORS);
	if (devidx >= MMC_NUM_MINORS)
		return ERR_PTR(-ENOSPC);
	__set_bit(devidx, dev_use);

423
	md = kzalloc(sizeof(struct mmc_blk_data), GFP_KERNEL);
424 425 426 427
	if (!md) {
		ret = -ENOMEM;
		goto out;
	}
L
Linus Torvalds 已提交
428 429


430 431 432 433 434
	/*
	 * Set the read-only status based on the supported commands
	 * and the write protect switch.
	 */
	md->read_only = mmc_blk_readonly(card);
L
Linus Torvalds 已提交
435

436
	/*
437 438 439
	 * Both SD and MMC specifications state (although a bit
	 * unclearly in the MMC case) that a block size of 512
	 * bytes must always be supported by the card.
440
	 */
441
	md->block_bits = 9;
L
Linus Torvalds 已提交
442

443 444 445 446 447
	md->disk = alloc_disk(1 << MMC_SHIFT);
	if (md->disk == NULL) {
		ret = -ENOMEM;
		goto err_kfree;
	}
L
Linus Torvalds 已提交
448

449 450
	spin_lock_init(&md->lock);
	md->usage = 1;
L
Linus Torvalds 已提交
451

452 453 454
	ret = mmc_init_queue(&md->queue, card, &md->lock);
	if (ret)
		goto err_putdisk;
L
Linus Torvalds 已提交
455

456 457
	md->queue.issue_fn = mmc_blk_issue_rq;
	md->queue.data = md;
458

459
	md->disk->major	= MMC_BLOCK_MAJOR;
460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481
	md->disk->first_minor = devidx << MMC_SHIFT;
	md->disk->fops = &mmc_bdops;
	md->disk->private_data = md;
	md->disk->queue = md->queue.queue;
	md->disk->driverfs_dev = &card->dev;

	/*
	 * As discussed on lkml, GENHD_FL_REMOVABLE should:
	 *
	 * - be set for removable media with permanent block devices
	 * - be unset for removable block devices with permanent media
	 *
	 * Since MMC block devices clearly fall under the second
	 * case, we do not set GENHD_FL_REMOVABLE.  Userspace
	 * should use the block device creation/destruction hotplug
	 * messages to tell when the card is present.
	 */

	sprintf(md->disk->disk_name, "mmcblk%d", devidx);

	blk_queue_hardsect_size(md->queue.queue, 1 << md->block_bits);

P
Pierre Ossman 已提交
482 483 484 485 486 487 488 489 490 491 492 493 494 495
	if (!mmc_card_sd(card) && mmc_card_blockaddr(card)) {
		/*
		 * The EXT_CSD sector count is in number or 512 byte
		 * sectors.
		 */
		set_capacity(md->disk, card->ext_csd.sectors);
	} else {
		/*
		 * The CSD capacity field is in units of read_blkbits.
		 * set_capacity takes units of 512 bytes.
		 */
		set_capacity(md->disk,
			card->csd.capacity << (card->csd.read_blkbits - 9));
	}
L
Linus Torvalds 已提交
496
	return md;
497 498 499 500 501 502 503

 err_putdisk:
	put_disk(md->disk);
 err_kfree:
	kfree(md);
 out:
	return ERR_PTR(ret);
L
Linus Torvalds 已提交
504 505 506 507 508 509 510 511
}

static int
mmc_blk_set_blksize(struct mmc_blk_data *md, struct mmc_card *card)
{
	struct mmc_command cmd;
	int err;

512 513 514 515
	/* Block-addressed cards ignore MMC_SET_BLOCKLEN. */
	if (mmc_card_blockaddr(card))
		return 0;

P
Pierre Ossman 已提交
516
	mmc_claim_host(card->host);
L
Linus Torvalds 已提交
517
	cmd.opcode = MMC_SET_BLOCKLEN;
518
	cmd.arg = 1 << md->block_bits;
D
David Brownell 已提交
519
	cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_AC;
L
Linus Torvalds 已提交
520
	err = mmc_wait_for_cmd(card->host, &cmd, 5);
P
Pierre Ossman 已提交
521
	mmc_release_host(card->host);
L
Linus Torvalds 已提交
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536

	if (err) {
		printk(KERN_ERR "%s: unable to set block size to %d: %d\n",
			md->disk->disk_name, cmd.arg, err);
		return -EINVAL;
	}

	return 0;
}

static int mmc_blk_probe(struct mmc_card *card)
{
	struct mmc_blk_data *md;
	int err;

537 538 539 540
	/*
	 * Check that the card supports the command class(es) we need.
	 */
	if (!(card->csd.cmdclass & CCC_BLOCK_READ))
L
Linus Torvalds 已提交
541 542 543 544 545 546 547 548 549 550
		return -ENODEV;

	md = mmc_blk_alloc(card);
	if (IS_ERR(md))
		return PTR_ERR(md);

	err = mmc_blk_set_blksize(md, card);
	if (err)
		goto out;

551
	printk(KERN_INFO "%s: %s %s %lluKiB %s\n",
L
Linus Torvalds 已提交
552
		md->disk->disk_name, mmc_card_id(card), mmc_card_name(card),
553 554
		(unsigned long long)(get_capacity(md->disk) >> 1),
		md->read_only ? "(ro)" : "");
L
Linus Torvalds 已提交
555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572

	mmc_set_drvdata(card, md);
	add_disk(md->disk);
	return 0;

 out:
	mmc_blk_put(md);

	return err;
}

static void mmc_blk_remove(struct mmc_card *card)
{
	struct mmc_blk_data *md = mmc_get_drvdata(card);

	if (md) {
		int devidx;

573
		/* Stop new requests from getting into the queue */
L
Linus Torvalds 已提交
574 575
		del_gendisk(md->disk);

576 577
		/* Then flush out any already in there */
		mmc_cleanup_queue(&md->queue);
L
Linus Torvalds 已提交
578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626

		devidx = md->disk->first_minor >> MMC_SHIFT;
		__clear_bit(devidx, dev_use);

		mmc_blk_put(md);
	}
	mmc_set_drvdata(card, NULL);
}

#ifdef CONFIG_PM
static int mmc_blk_suspend(struct mmc_card *card, pm_message_t state)
{
	struct mmc_blk_data *md = mmc_get_drvdata(card);

	if (md) {
		mmc_queue_suspend(&md->queue);
	}
	return 0;
}

static int mmc_blk_resume(struct mmc_card *card)
{
	struct mmc_blk_data *md = mmc_get_drvdata(card);

	if (md) {
		mmc_blk_set_blksize(md, card);
		mmc_queue_resume(&md->queue);
	}
	return 0;
}
#else
#define	mmc_blk_suspend	NULL
#define mmc_blk_resume	NULL
#endif

static struct mmc_driver mmc_driver = {
	.drv		= {
		.name	= "mmcblk",
	},
	.probe		= mmc_blk_probe,
	.remove		= mmc_blk_remove,
	.suspend	= mmc_blk_suspend,
	.resume		= mmc_blk_resume,
};

static int __init mmc_blk_init(void)
{
	int res = -ENOMEM;

627 628
	res = register_blkdev(MMC_BLOCK_MAJOR, "mmc");
	if (res)
L
Linus Torvalds 已提交
629 630 631 632 633 634 635 636 637 638 639
		goto out;

	return mmc_register_driver(&mmc_driver);

 out:
	return res;
}

static void __exit mmc_blk_exit(void)
{
	mmc_unregister_driver(&mmc_driver);
640
	unregister_blkdev(MMC_BLOCK_MAJOR, "mmc");
L
Linus Torvalds 已提交
641 642 643 644 645 646 647 648
}

module_init(mmc_blk_init);
module_exit(mmc_blk_exit);

MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Multimedia Card (MMC) block device driver");