lkml.org 
[lkml]   [2011]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 2/2] mmc: core: Support packed command for eMMC4.5 device
Date
Maya Erez wrote:
> > Maya Erez wrote:
> >> >> >> On Wed, Nov 2, 2011 at 1:33 PM, Seungwon Jeon
> >> <tgih.jun@samsung.com>
> >> >> wrote:
> >> >> >> > @@ -980,12 +988,67 @@ static int mmc_blk_err_check(struct
> >> mmc_card
> >> >> *card,
> >> >> >> >        if (!brq->data.bytes_xfered)
> >> >> >> >                return MMC_BLK_RETRY;
> >> >> >> >
> >> >> >> > +       if (mq_mrq->packed_cmd != MMC_PACKED_NONE) {
> >> >> >> > +               if (unlikely(brq->data.blocks << 9 !=
> >> >> brq->data.bytes_xfered))
> >> >> >> > +                       return MMC_BLK_PARTIAL;
> >> >> >> > +               else
> >> >> >> > +                       return MMC_BLK_SUCCESS;
> >> >> >> > +       }
> >> >> >> > +
> >> >> >> >        if (blk_rq_bytes(req) != brq->data.bytes_xfered)
> >> >> >> >                return MMC_BLK_PARTIAL;
> >> >> >> >
> >> >> >> >        return MMC_BLK_SUCCESS;
> >> >> >> >  }
> >> >> >> >
> >> >> >> > +static int mmc_blk_packed_err_check(struct mmc_card *card, +
> >>                        struct mmc_async_req *areq)
> >> >> >> > +{
> >> >> >> > +       struct mmc_queue_req *mq_mrq = container_of(areq, struct
> >> >> mmc_queue_req,
> >> >> >> > +                                                   mmc_active);
> >> +
> >>       int err, check, status;
> >> >> >> > +       u8 ext_csd[512];
> >> >> >> > +
> >> >> >> > +       check = mmc_blk_err_check(card, areq);
> >> >> >> > +
> >> >> >> > +       if (check == MMC_BLK_SUCCESS)
> >> >> >> > +               return check;
> >> I think we need to check the status for all cases and not only in case
> >> of
> >> MMC_BLK_PARTIAL. For example, in cases where the header was traferred
> >> successfully but had logic errors (wrong number of sectors etc.)
> >> mmc_blk_err_check will return MMC_BLK_SUCCESS although the packed
> >> commands
> >> failed.
> > Similarly, Sahitya Tummala is already mentioned this.
> > Other error case will be checked in next version.
> > The case you suggested is about read or write?
> > Device may detect error and stop transferring the data.
> Sahitya suggested to also check other error cases that mmc_blk_err_check
> returns (such as MMC_BLK_CMD_ERR, MMC_BLK_ECC_ERR and MMC_BLK_DATA_ERR).
> I suggest to also check the exception bit in the status even if
> mmc_blk_err_check returned success, since mmc_blk_err_check might not
> catch all the packed commands failures. One example for such a failure is
> when the header of read packed commands will have logical error.
This part is modified in next version.

Thanks,
Seungwon Jeon.

> Thanks,
> Maya
> --
> Seny by a Consultant for Qualcomm innovation center, Inc.
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
>
>
>
> --
> 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-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-12-02 10:09    [W:0.079 / U:0.760 seconds]
©2003-2014 Jasper Spaans. Advertise on this site