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 */
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to