Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Aug 2018 07:13:36 +0000 (UTC)
From:      Toomas Soome <tsoome@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r337891 - head/stand/i386/libi386
Message-ID:  <201808160713.w7G7DaPs090214@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tsoome
Date: Thu Aug 16 07:13:36 2018
New Revision: 337891
URL: https://svnweb.freebsd.org/changeset/base/337891

Log:
  libi386: bd_io_workaround() is to be called for reads only
  
  bd_io() can perform either reads or writes, we only need bd_io_workaround()
  for reads.

Modified:
  head/stand/i386/libi386/biosdisk.c

Modified: head/stand/i386/libi386/biosdisk.c
==============================================================================
--- head/stand/i386/libi386/biosdisk.c	Thu Aug 16 06:50:53 2018	(r337890)
+++ head/stand/i386/libi386/biosdisk.c	Thu Aug 16 07:13:36 2018	(r337891)
@@ -601,7 +601,7 @@ bd_io_workaround(struct disk_devdesc *dev)
 {
 	uint8_t buf[8 * 1024];
 
-	bd_edd_io(dev, 0xffffffff, 1, (caddr_t)buf, 0);
+	bd_edd_io(dev, 0xffffffff, 1, (caddr_t)buf, BD_RD);
 }
 
 
@@ -628,7 +628,7 @@ bd_io(struct disk_devdesc *dev, daddr_t dblk, int blks
 	 * the buggy read. It is not immediately known whether other models
 	 * are similarly affected.
 	 */
-	if (dblk >= 0x100000000)
+	if (dowrite == BD_RD && dblk >= 0x100000000)
 		bd_io_workaround(dev);
 
 	/* Decide whether we have to bounce */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808160713.w7G7DaPs090214>