From 361e948a7a76afed699c019fc35050cdddf3f89a Mon Sep 17 00:00:00 2001
From: Joerg Wunsch <j@uriah.heep.sax.de>
Date: Mon, 6 Oct 2014 13:35:14 +0000
Subject: [PATCH] bug #22248: Read efuse error * avrdude.conf.in (m168, m328,
 m48, m88, t1634, t26, t261, t461, t861, t88): In efuse (or hfuse for t26)
 read operation, turn all bits in byte 3 from "x" to "o" (output); this is a
 first step towards fixing the symptoms mentioned in the bug, by unifying the
 behaviour between different AVRs.  Not touched are the historic devices where
 the fuses are not documented to form a full byte each (2333, 4433, 4434,
 8535, m103, m161, m163).

git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1335 81a1dc3b-b13d-400b-aceb-764788c761c2
---
 ChangeLog       | 11 +++++++++++
 NEWS            |  2 +-
 avrdude.conf.in | 20 ++++++++++----------
 3 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 57d0fe3f..f7e12952 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2014-10-06  Joerg Wunsch <j.gnu@uriah.heep.sax.de>
+
+	bug #22248: Read efuse error
+	* avrdude.conf.in (m168, m328, m48, m88, t1634, t26, t261, t461,
+	t861, t88): In efuse (or hfuse for t26) read operation, turn all
+	bits in byte 3 from "x" to "o" (output); this is a first step
+	towards fixing the symptoms mentioned in the bug, by unifying the
+	behaviour between different AVRs.  Not touched are the historic
+	devices where the fuses are not documented to form a full byte
+	each (2333, 4433, 4434, 8535, m103, m161, m163).
+
 2014-09-22  Joerg Wunsch <j.gnu@uriah.heep.sax.de>
 
 	bug #43268: usb_drain() call causes LUFA AVR-ISP MKII Code to Fail
diff --git a/NEWS b/NEWS
index fece398d..83e7d32e 100644
--- a/NEWS
+++ b/NEWS
@@ -14,7 +14,7 @@ Current:
     - ...
 
   * Bugfixes
-    - ...
+    - bug #22248: Read efuse error (partial fix)
 
   * Internals:
     - ...
diff --git a/avrdude.conf.in b/avrdude.conf.in
index d6c53d66..a5596e31 100644
--- a/avrdude.conf.in
+++ b/avrdude.conf.in
@@ -6939,7 +6939,7 @@ part
                           "x x x x  x x x x  x x x i  i i i i";
 
         read            = "0 1 0 1  1 0 0 0  0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x  x x x o  o o o o";
+                          "x x x x  x x x x  o o o o  o o o o";
         min_write_delay = 9000;
         max_write_delay = 9000;
       ;
@@ -7130,7 +7130,7 @@ part
                           "x x x x  x x x x   x x x x  x x x i";
 
         read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   x x x x  x x x o";
+                          "x x x x  x x x x   o o o o  o o o o";
         min_write_delay = 4500;
         max_write_delay = 4500;
       ;
@@ -7321,7 +7321,7 @@ part
                           "x x x x  x x x x   x x x x  x x x i";
 
         read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   x x x x  x x x o";
+                          "x x x x  x x x x   o o o o  o o o o";
         min_write_delay = 4500;
         max_write_delay = 4500;
       ;
@@ -7512,7 +7512,7 @@ part
                           "x x x x  x x x x   x x x x  x x x i";
 
         read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   x x x x  x x x o";
+                          "x x x x  x x x x   o o o o  o o o o";
         min_write_delay = 4500;
         max_write_delay = 4500;
       ;
@@ -7684,7 +7684,7 @@ part
         min_write_delay = 4500;
         max_write_delay = 4500;
         read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   x x x x  x x x o";
+                          "x x x x  x x x x   o o o o  o o o o";
 
         write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
                           "x x x x  x x x x   x x x x  x x x i";
@@ -7884,7 +7884,7 @@ part
         min_write_delay = 4500;
         max_write_delay = 4500;
         read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   x x x x  x o o o";
+                          "x x x x  x x x x   o o o o  o o o o";
 
         write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
                           "x x x x  x x x x   x x x x  x i i i";
@@ -8086,7 +8086,7 @@ part
         min_write_delay = 4500;
         max_write_delay = 4500;
         read            = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
-                          "x x x x x x x x x x x x x o o o";
+                          "x x x x x x x x o o o o o o o o";
         
         write           = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
                           "x x x x x x x x x x x x x i i i";
@@ -8286,7 +8286,7 @@ part
         min_write_delay = 4500;
         max_write_delay = 4500;
         read            = "0 1 0 1  0 0 0 0   0 0 0 0  1 0 0 0",
-                          "x x x x  x x x x   x x x x  x o o o";
+                          "x x x x  x x x x   o o o o  o o o o";
 
         write           = "1 0 1 0  1 1 0 0   1 0 1 0  0 1 0 0",
                           "x x x x  x x x x   x x x x  x x x i";
@@ -8476,7 +8476,7 @@ part
 	min_write_delay = 4500;
 	max_write_delay = 4500;
 	read = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
-	       "x x x x x x x x x x x x x o o o";
+	       "x x x x x x x x o o o o o o o o";
 
 	write = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
 	      	"x x x x x x x x x x x x x i i i";
@@ -14576,7 +14576,7 @@ part
         min_write_delay = 4500;
         max_write_delay = 4500;
         read            = "0 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0",
-                          "x x x x x x x x x x x o o o o o";
+                          "x x x x x x x x o o o o o o o o";
 
         write           = "1 0 1 0 1 1 0 0 1 0 1 0 0 1 0 0",
                           "x x x x x x x x x x x i i i i i";