public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Ulf Hansson <ulf.hansson@linaro•org>, Jens Axboe <axboe@kernel•dk>
Cc: Christoph Hellwig <hch@lst•de>,
	Linus Walleij <linus.walleij@linaro•org>,
	Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
	Linux Next Mailing List <linux-next@vger•kernel.org>
Subject: linux-next: manual merge of the mmc tree with the block tree
Date: Tue, 20 Feb 2024 12:01:17 +1100	[thread overview]
Message-ID: <20240220120117.15188a66@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 2657 bytes --]

Hi all,

Today's linux-next merge of the mmc tree got a conflict in:

  drivers/mmc/core/queue.c

between commit:

  616f87661792 ("mmc: pass queue_limits to blk_mq_alloc_disk")

from the block tree and commit:

  069279d6fef5 ("mmc: core Drop BLK_BOUNCE_HIGH")

from the mmc tree.

I fixed it up (I think - see below) and can carry the fix as necessary.
This is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/mmc/core/queue.c
index 2ae60d208cdf,316415588a77..000000000000
--- a/drivers/mmc/core/queue.c
+++ b/drivers/mmc/core/queue.c
@@@ -343,50 -341,10 +343,47 @@@ static const struct blk_mq_ops mmc_mq_o
  	.timeout	= mmc_mq_timed_out,
  };
  
 -static void mmc_setup_queue(struct mmc_queue *mq, struct mmc_card *card)
 +static struct gendisk *mmc_alloc_disk(struct mmc_queue *mq,
 +		struct mmc_card *card)
  {
  	struct mmc_host *host = card->host;
 -	unsigned block_size = 512;
 +	struct queue_limits lim = { };
 +	struct gendisk *disk;
 +
 +	if (mmc_can_erase(card))
 +		mmc_queue_setup_discard(card, &lim);
 +
- 	if (!mmc_dev(host)->dma_mask || !*mmc_dev(host)->dma_mask)
- 		lim.bounce = BLK_BOUNCE_HIGH;
- 
 +	lim.max_hw_sectors = min(host->max_blk_count, host->max_req_size / 512);
 +
 +	if (mmc_card_mmc(card) && card->ext_csd.data_sector_size)
 +		lim.logical_block_size = card->ext_csd.data_sector_size;
 +	else
 +		lim.logical_block_size = 512;
 +
 +	WARN_ON_ONCE(lim.logical_block_size != 512 &&
 +		     lim.logical_block_size != 4096);
 +
 +	/*
 +	 * Setting a virt_boundary implicity sets a max_segment_size, so try
 +	 * to set the hardware one here.
 +	 */
 +	if (host->can_dma_map_merge) {
 +		lim.virt_boundary_mask = dma_get_merge_boundary(mmc_dev(host));
 +		lim.max_segments = MMC_DMA_MAP_MERGE_SEGMENTS;
 +	} else {
 +		lim.max_segment_size =
 +			round_down(host->max_seg_size, lim.logical_block_size);
 +		lim.max_segments = host->max_segs;
 +	}
 +
 +	disk = blk_mq_alloc_disk(&mq->tag_set, &lim, mq);
 +	if (IS_ERR(disk))
 +		return disk;
 +	mq->queue = disk->queue;
 +
 +	if (mmc_host_is_spi(host) && host->use_spi_crc)
 +		blk_queue_flag_set(QUEUE_FLAG_STABLE_WRITES, mq->queue);
 +	blk_queue_rq_timeout(mq->queue, 60 * HZ);
  
  	blk_queue_flag_set(QUEUE_FLAG_NONROT, mq->queue);
  	blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, mq->queue);

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2024-02-20  1:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20  1:01 Stephen Rothwell [this message]
2024-02-20  8:04 ` linux-next: manual merge of the mmc tree with the block tree Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2022-05-11  2:42 Stephen Rothwell
2017-06-13  4:19 Stephen Rothwell
2016-11-28  2:12 Stephen Rothwell
2016-11-29  9:13 ` Ulf Hansson
2016-11-29  9:16   ` Christoph Hellwig
2016-11-29  9:22     ` Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240220120117.15188a66@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=axboe@kernel$(echo .)dk \
    --cc=hch@lst$(echo .)de \
    --cc=linus.walleij@linaro$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=ulf.hansson@linaro$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox