modify the failure of SD-sdio in some case,due to print too much to invalid
authorxbw <xbw@rock-chips.com>
Thu, 15 Dec 2011 03:04:31 +0000 (11:04 +0800)
committerxbw <xbw@rock-chips.com>
Thu, 15 Dec 2011 03:04:31 +0000 (11:04 +0800)
block/blk-core.c [changed mode: 0644->0755]
drivers/mmc/card/block.c
drivers/mmc/core/core.c
drivers/mmc/core/mmc_ops.c [changed mode: 0644->0755]
drivers/mmc/core/sdio.c
drivers/mmc/core/sdio_cis.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 847d04e..249d1a0
@@ -2045,9 +2045,16 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes)
                        error_type = "I/O";
                        break;
                }
+#if defined(CONFIG_SDMMC_RK29) && !defined(CONFIG_SDMMC_RK29_OLD)  //Modifyed by xbw at 2011-21-14
+        printk(KERN_DEBUG "end_request: %s error, dev %s, sector %llu\n",
+               error_type, req->rq_disk ? req->rq_disk->disk_name : "?",
+               (unsigned long long)blk_rq_pos(req));
+
+#else
                printk(KERN_ERR "end_request: %s error, dev %s, sector %llu\n",
                       error_type, req->rq_disk ? req->rq_disk->disk_name : "?",
                       (unsigned long long)blk_rq_pos(req));
+#endif      
        }
 
        blk_account_io_completion(req, nr_bytes);
index 5e8e5890d7661240024e5e76d0a8aff355e25d2a..f7f7a3c9f3cd74ea10f4fe7f6f5d57585d20319d 100755 (executable)
@@ -1021,14 +1021,16 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *req)
         if (brq.sbc.error || brq.cmd.error || brq.stop.error || brq.data.error) {   //modifyed by xbw at 2011-11-17
 #else
                if (brq.data.error) {
-#endif
                        pr_err("%s: error %d transferring data, sector %u, nr %u, cmd response %#x, card status %#x\n",
                                req->rq_disk->disk_name, brq.data.error,
                                (unsigned)blk_rq_pos(req),
                                (unsigned)blk_rq_sectors(req),
                                brq.cmd.resp[0], brq.stop.resp[0]);
-
+#endif
                        if (rq_data_dir(req) == READ) {
+                         #if defined(CONFIG_SDMMC_RK29) && !defined(CONFIG_SDMMC_RK29_OLD)
+                         //direct to exit when error happen; deleted by xbw at 2011-12-14
+                         #else
                                if (brq.data.blocks > 1) {
                                        /* Redo read one sector at a time */
                                        pr_warning("%s: retrying using single block read\n",
@@ -1036,6 +1038,7 @@ static int mmc_blk_issue_rw_rq(struct mmc_queue *mq, struct request *req)
                                        disable_multi = 1;
                                        continue;
                                }
+                               #endif
 
                                /*
                                 * After an error, we redo I/O one sector at a
index 21bca485be62d537b6413ed6ff881f3bb8615ee0..0132936607d75432a2316544cba56da234853046 100755 (executable)
@@ -1665,7 +1665,7 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq)
 #if !defined(CONFIG_USE_SDMMC0_FOR_WIFI_DEVELOP_BOARD)
     if( strncmp( mmc_hostname(host) ,"mmc0" , strlen("mmc0")) )
     {
-           sdio_reset(host);
+           //sdio_reset(host);//make no sense; noteed by xbw at 2011-12-14
        mmc_go_idle(host);
 
        if (!(init_ret=mmc_attach_sdio(host)))
@@ -1690,7 +1690,7 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq)
         mmc_go_idle(host);
     }
 #else
-    sdio_reset(host);
+    //sdio_reset(host); //make no sense; noteed by xbw at 2011-12-14
        mmc_go_idle(host);
 
        if (!(init_ret=mmc_attach_sdio(host)))
old mode 100644 (file)
new mode 100755 (executable)
index 6a30bf3011d97df02cfe9a656fe5cf7df33139b7..7c4bcfea2833e10357119ad908c76eabd9d44926 100755 (executable)
@@ -947,6 +947,7 @@ int sdio_reset_comm(struct mmc_card *card)
 
 #if defined(CONFIG_SDMMC_RK29) && !defined(CONFIG_SDMMC_RK29_OLD)
        host->sdmmc_host_hw_init(mmc_priv(host));  //added by xbw , at 2011-10-18
+       host->ios.clock = host->f_min; //for avoid 25MHz once again during init process.noted by xbw at 2011-11-14
 #endif
 
        mmc_go_idle(host);
old mode 100644 (file)
new mode 100755 (executable)
index 541bdb8..25c9779
@@ -313,10 +313,19 @@ static int sdio_read_cis(struct mmc_card *card, struct sdio_func *func)
 
                        if (ret == -ENOENT) {
                                /* warn about unknown tuples */
-                               printk(KERN_WARNING "%s: queuing unknown"
+#if defined(CONFIG_SDMMC_RK29) && !defined(CONFIG_SDMMC_RK29_OLD)
+                // This is the normal exit procedure,rather than an error.noted by xbw at 2011-12-14
+                               printk(KERN_DEBUG "%s: queuing unknown"
                                       " CIS tuple 0x%02x (%u bytes)\n",
                                       mmc_hostname(card->host),
                                       tpl_code, tpl_link);
+#else
+                printk(KERN_WARNING "%s: queuing unknown"
+                                      " CIS tuple 0x%02x (%u bytes)\n",
+                                      mmc_hostname(card->host),
+                                      tpl_code, tpl_link);
+
+#endif
                        }
 
                        /* keep on analyzing tuples */