Re: [PATCH v4] mmc: core: don't set limits.discard_granularity as 0

2020-10-09 Thread Ulf Hansson
On Fri, 2 Oct 2020 at 03:39, Coly Li wrote: > > In mmc_queue_setup_discard() the mmc driver queue's discard_granularity > might be set as 0 (when card->pref_erase > max_discard) while the mmc > device still declares to support discard operation. This is buggy and > triggered the following kernel

Re: [PATCH v4] mmc: core: don't set limits.discard_granularity as 0

2020-10-02 Thread Coly Li
On 2020/10/2 20:57, Martin K. Petersen wrote: > > Coly, > >> diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c >> index 6c022ef0f84d..350d0cc4ee62 100644 >> --- a/drivers/mmc/core/queue.c >> +++ b/drivers/mmc/core/queue.c >> @@ -190,7 +190,7 @@ static void

Re: [PATCH v4] mmc: core: don't set limits.discard_granularity as 0

2020-10-02 Thread Martin K. Petersen
Coly, > diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c > index 6c022ef0f84d..350d0cc4ee62 100644 > --- a/drivers/mmc/core/queue.c > +++ b/drivers/mmc/core/queue.c > @@ -190,7 +190,7 @@ static void mmc_queue_setup_discard(struct request_queue > *q, >

[PATCH v4] mmc: core: don't set limits.discard_granularity as 0

2020-10-01 Thread Coly Li
In mmc_queue_setup_discard() the mmc driver queue's discard_granularity might be set as 0 (when card->pref_erase > max_discard) while the mmc device still declares to support discard operation. This is buggy and triggered the following kernel warning message, WARNING: CPU: 0 PID: 135 at