Improved error messages on EEPROM writing.
authorFlorian Pose <fp@igh-essen.com>
Tue, 04 Mar 2008 08:52:39 +0000
changeset 856 7b8be5c61d92
parent 855 429aa8559b30
child 857 7874c884dc2b
Improved error messages on EEPROM writing.
master/slave.c
--- a/master/slave.c	Mon Mar 03 16:24:59 2008 +0000
+++ b/master/slave.c	Tue Mar 04 08:52:39 2008 +0000
@@ -932,7 +932,8 @@
     }
 
     if (size % 2) {
-        EC_ERR("EEPROM data size is odd! Dropping.\n");
+        EC_ERR("EEPROM data size is odd (%u bytes)! SII data must be"
+                " word-aligned. Dropping.\n", size);
         return -EINVAL;
     }
 
@@ -944,7 +945,9 @@
     request.word_size = size / 2;
 
     if (request.word_size < 0x0041) {
-        EC_ERR("EEPROM data too short! Dropping.\n");
+        EC_ERR("EEPROM data too short (%u words)! Mimimum is"
+                " 40 fixed words + 1 delimiter. Dropping.\n",
+                request.word_size);
         return -EINVAL;
     }