[merged] mg_disk-fix-reading-invalid-status-when-use-polling-driver.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     mg_disk: fix reading invalid status when use polling driver
has been removed from the -mm tree.  Its filename was
     mg_disk-fix-reading-invalid-status-when-use-polling-driver.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: mg_disk: fix reading invalid status when use polling driver
From: unsik Kim <donari75@xxxxxxxxx>

When using polling driver, little delay is required to access status
register.  Without this, host might read invalid status.

Signed-off-by: unsik Kim <donari75@xxxxxxxxx>
Cc: Jens Axboe <jens.axboe@xxxxxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/block/mg_disk.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff -puN drivers/block/mg_disk.c~mg_disk-fix-reading-invalid-status-when-use-polling-driver drivers/block/mg_disk.c
--- a/drivers/block/mg_disk.c~mg_disk-fix-reading-invalid-status-when-use-polling-driver
+++ a/drivers/block/mg_disk.c
@@ -219,6 +219,16 @@ static unsigned int mg_wait(struct mg_ho
 	host->error = MG_ERR_NONE;
 	expire = jiffies + msecs_to_jiffies(msec);
 
+	/* These 2 times dummy status read prevents reading invalid
+	 * status. A very little time (3 times of mflash operating clk)
+	 * is required for busy bit is set. Use dummy read instead of
+	 * busy wait, because mflash's PLL is machine dependent.
+	 */
+	if (prv_data->use_polling) {
+		status = inb((unsigned long)host->dev_base + MG_REG_STATUS);
+		status = inb((unsigned long)host->dev_base + MG_REG_STATUS);
+	}
+
 	status = inb((unsigned long)host->dev_base + MG_REG_STATUS);
 
 	do {
_

Patches currently in -mm which might be from donari75@xxxxxxxxx are

linux-next.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux