Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a36274e0 authored by Martin K. Petersen's avatar Martin K. Petersen Committed by Chris Ball
Browse files

mmc: Remove distinction between hw and phys segments



We have deprecated the distinction between hardware and physical
segments in the block layer.  Consolidate the two limits into one in
drivers/mmc/.

Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 7a5ea56a
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -146,7 +146,7 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock
	}

#ifdef CONFIG_MMC_BLOCK_BOUNCE
	if (host->max_hw_segs == 1) {
	if (host->max_segs == 1) {
		unsigned int bouncesz;

		bouncesz = MMC_QUEUE_BOUNCESZ;
@@ -196,16 +196,16 @@ int mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card, spinlock_t *lock
		blk_queue_bounce_limit(mq->queue, limit);
		blk_queue_max_hw_sectors(mq->queue,
			min(host->max_blk_count, host->max_req_size / 512));
		blk_queue_max_segments(mq->queue, host->max_hw_segs);
		blk_queue_max_segments(mq->queue, host->max_segs);
		blk_queue_max_segment_size(mq->queue, host->max_seg_size);

		mq->sg = kmalloc(sizeof(struct scatterlist) *
			host->max_phys_segs, GFP_KERNEL);
			host->max_segs, GFP_KERNEL);
		if (!mq->sg) {
			ret = -ENOMEM;
			goto cleanup_queue;
		}
		sg_init_table(mq->sg, host->max_phys_segs);
		sg_init_table(mq->sg, host->max_segs);
	}

	init_MUTEX(&mq->thread_sem);
+1 −2
Original line number Diff line number Diff line
@@ -94,8 +94,7 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
	 * By default, hosts do not support SGIO or large requests.
	 * They have to set these according to their abilities.
	 */
	host->max_hw_segs = 1;
	host->max_phys_segs = 1;
	host->max_segs = 1;
	host->max_seg_size = PAGE_CACHE_SIZE;

	host->max_req_size = PAGE_CACHE_SIZE;
+1 −2
Original line number Diff line number Diff line
@@ -947,8 +947,7 @@ static int __init at91_mci_probe(struct platform_device *pdev)
	mmc->max_blk_size  = MCI_MAXBLKSIZE;
	mmc->max_blk_count = MCI_BLKATONCE;
	mmc->max_req_size  = MCI_BUFSIZE;
	mmc->max_phys_segs = MCI_BLKATONCE;
	mmc->max_hw_segs   = MCI_BLKATONCE;
	mmc->max_segs      = MCI_BLKATONCE;
	mmc->max_seg_size  = MCI_BUFSIZE;

	host = mmc_priv(mmc);
+1 −2
Original line number Diff line number Diff line
@@ -1618,8 +1618,7 @@ static int __init atmci_init_slot(struct atmel_mci *host,
	if (slot_data->bus_width >= 4)
		mmc->caps |= MMC_CAP_4_BIT_DATA;

	mmc->max_hw_segs = 64;
	mmc->max_phys_segs = 64;
	mmc->max_segs = 64;
	mmc->max_req_size = 32768 * 512;
	mmc->max_blk_size = 32768;
	mmc->max_blk_count = 512;
+1 −1
Original line number Diff line number Diff line
@@ -998,7 +998,7 @@ static int __devinit au1xmmc_probe(struct platform_device *pdev)
	mmc->f_max = 24000000;

	mmc->max_seg_size = AU1XMMC_DESCRIPTOR_SIZE;
	mmc->max_phys_segs = AU1XMMC_DESCRIPTOR_COUNT;
	mmc->max_segs = AU1XMMC_DESCRIPTOR_COUNT;

	mmc->max_blk_size = 2048;
	mmc->max_blk_count = 512;
Loading