Message ID | 001d01cdf88d$f4214270$dc63c750$%jun@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Great.. I also found this problem and sent the similar patch at mailing. But i think this patch is more generic. Acked-by: Jaehoon Chung <jh80.chung@samsung.com> On 01/22/2013 07:48 PM, Seungwon Jeon wrote: > This patch is derived from 'mmc: fix async request mechanism ...'. > According as async transfer, a request is handled with twice mmc_start_req. > When the card is removed, the request is actually not issued in the first > mmc_start_req [__mmc_start_data_req]. And then mmc_wait_for_data_req_done > will come in the next mmc_start_req. But there is no event for completions. > wake_up_interruptible is needed in __mmc_start_data_req for the case of > removed card. > > Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> > --- > drivers/mmc/core/core.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c > index 8b3a122..997b257 100644 > --- a/drivers/mmc/core/core.c > +++ b/drivers/mmc/core/core.c > @@ -350,6 +350,7 @@ static int __mmc_start_data_req(struct mmc_host *host, struct mmc_request *mrq) > mrq->host = host; > if (mmc_card_removed(host->card)) { > mrq->cmd->error = -ENOMEDIUM; > + mmc_wait_data_done(mrq); > return -ENOMEDIUM; > } > mmc_start_request(host, mrq); > -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
I hope that you find another patch. [PATCH 2/2] mmc: block: don't start new request when the card is removed I'd appreciate if you can review it. Thanks, Seungwon Jeon On Thursday, January 31, 2013, Jaehoon Chung wrote: > Great.. > > I also found this problem and sent the similar patch at mailing. > But i think this patch is more generic. > > Acked-by: Jaehoon Chung <jh80.chung@samsung.com> > > On 01/22/2013 07:48 PM, Seungwon Jeon wrote: > > This patch is derived from 'mmc: fix async request mechanism ...'. > > According as async transfer, a request is handled with twice mmc_start_req. > > When the card is removed, the request is actually not issued in the first > > mmc_start_req [__mmc_start_data_req]. And then mmc_wait_for_data_req_done > > will come in the next mmc_start_req. But there is no event for completions. > > wake_up_interruptible is needed in __mmc_start_data_req for the case of > > removed card. > > > > Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> > > --- > > drivers/mmc/core/core.c | 1 + > > 1 files changed, 1 insertions(+), 0 deletions(-) > > > > diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c > > index 8b3a122..997b257 100644 > > --- a/drivers/mmc/core/core.c > > +++ b/drivers/mmc/core/core.c > > @@ -350,6 +350,7 @@ static int __mmc_start_data_req(struct mmc_host *host, struct mmc_request *mrq) > > mrq->host = host; > > if (mmc_card_removed(host->card)) { > > mrq->cmd->error = -ENOMEDIUM; > > + mmc_wait_data_done(mrq); > > return -ENOMEDIUM; > > } > > mmc_start_request(host, mrq); > > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Works for me. Tested-by: Konstantin Dorfman <kdorfman@codeaurora.org> On 01/22/2013 12:48 PM, Seungwon Jeon wrote: > This patch is derived from 'mmc: fix async request mechanism ...'. > According as async transfer, a request is handled with twice mmc_start_req. > When the card is removed, the request is actually not issued in the first > mmc_start_req [__mmc_start_data_req]. And then mmc_wait_for_data_req_done > will come in the next mmc_start_req. But there is no event for completions. > wake_up_interruptible is needed in __mmc_start_data_req for the case of > removed card. > > Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> > --- > drivers/mmc/core/core.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c > index 8b3a122..997b257 100644 > --- a/drivers/mmc/core/core.c > +++ b/drivers/mmc/core/core.c > @@ -350,6 +350,7 @@ static int __mmc_start_data_req(struct mmc_host *host, struct mmc_request *mrq) > mrq->host = host; > if (mmc_card_removed(host->card)) { > mrq->cmd->error = -ENOMEDIUM; > + mmc_wait_data_done(mrq); > return -ENOMEDIUM; > } > mmc_start_request(host, mrq); >
Hi, On Tue, Jan 22 2013, Seungwon Jeon wrote: > This patch is derived from 'mmc: fix async request mechanism ...'. > According as async transfer, a request is handled with twice mmc_start_req. > When the card is removed, the request is actually not issued in the first > mmc_start_req [__mmc_start_data_req]. And then mmc_wait_for_data_req_done > will come in the next mmc_start_req. But there is no event for completions. > wake_up_interruptible is needed in __mmc_start_data_req for the case of > removed card. > > Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> > --- > drivers/mmc/core/core.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c > index 8b3a122..997b257 100644 > --- a/drivers/mmc/core/core.c > +++ b/drivers/mmc/core/core.c > @@ -350,6 +350,7 @@ static int __mmc_start_data_req(struct mmc_host *host, struct mmc_request *mrq) > mrq->host = host; > if (mmc_card_removed(host->card)) { > mrq->cmd->error = -ENOMEDIUM; > + mmc_wait_data_done(mrq); > return -ENOMEDIUM; > } > mmc_start_request(host, mrq); Thanks, pushed to mmc-next for 3.9. - Chris.
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 8b3a122..997b257 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -350,6 +350,7 @@ static int __mmc_start_data_req(struct mmc_host *host, struct mmc_request *mrq) mrq->host = host; if (mmc_card_removed(host->card)) { mrq->cmd->error = -ENOMEDIUM; + mmc_wait_data_done(mrq); return -ENOMEDIUM; } mmc_start_request(host, mrq);
This patch is derived from 'mmc: fix async request mechanism ...'. According as async transfer, a request is handled with twice mmc_start_req. When the card is removed, the request is actually not issued in the first mmc_start_req [__mmc_start_data_req]. And then mmc_wait_for_data_req_done will come in the next mmc_start_req. But there is no event for completions. wake_up_interruptible is needed in __mmc_start_data_req for the case of removed card. Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> --- drivers/mmc/core/core.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)