diff -uprN -X linux-2.6.32.3/Documentation/dontdiff linux-2.6.32.3-vanilla/drivers/misc/eeprom/at25.c linux-2.6.32.3/drivers/misc/eeprom/at25.c --- linux-2.6.32.3-vanilla/drivers/misc/eeprom/at25.c 2010-01-06 17:07:45.000000000 -0600 +++ linux-2.6.32.3/drivers/misc/eeprom/at25.c 2010-10-27 11:05:36.000000000 -0500 @@ -147,6 +147,7 @@ at25_ee_write(struct at25_data *at25, co unsigned written = 0; unsigned buf_size; u8 *bounce; + int a8; if (unlikely(off >= at25->bin.size)) return -EFBIG; @@ -163,6 +164,11 @@ at25_ee_write(struct at25_data *at25, co if (!bounce) return -ENOMEM; + if (!strcmp(at25->chip.name, "at25040b")) + a8 = 1; + else + a8 = 0; + /* For write, rollover is within the page ... so we write at * most one page, then manually roll over to the next page. */ @@ -183,6 +189,13 @@ at25_ee_write(struct at25_data *at25, co break; } + if (a8) { + if (offset & BIT(8)) + bounce[0] |= BIT(3); + else + bounce[0] &= ~BIT(3); + } + /* 8/16/24-bit address is written MSB first */ switch (at25->addrlen) { default: /* case 3 */