aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_eeprom.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_eeprom.c b/drivers/infiniband/hw/ipath/ipath_eeprom.c
index b4503e9c1e95..bcfa3ccb555f 100644
--- a/drivers/infiniband/hw/ipath/ipath_eeprom.c
+++ b/drivers/infiniband/hw/ipath/ipath_eeprom.c
@@ -596,7 +596,11 @@ void ipath_get_eeprom_info(struct ipath_devdata *dd)
596 goto bail; 596 goto bail;
597 } 597 }
598 598
599 len = offsetof(struct ipath_flash, if_future); 599 /*
600 * read full flash, not just currently used part, since it may have
601 * been written with a newer definition
602 * */
603 len = sizeof(struct ipath_flash);
600 buf = vmalloc(len); 604 buf = vmalloc(len);
601 if (!buf) { 605 if (!buf) {
602 ipath_dev_err(dd, "Couldn't allocate memory to read %u " 606 ipath_dev_err(dd, "Couldn't allocate memory to read %u "
@@ -737,8 +741,10 @@ int ipath_update_eeprom_log(struct ipath_devdata *dd)
737 /* 741 /*
738 * The quick-check above determined that there is something worthy 742 * The quick-check above determined that there is something worthy
739 * of logging, so get current contents and do a more detailed idea. 743 * of logging, so get current contents and do a more detailed idea.
744 * read full flash, not just currently used part, since it may have
745 * been written with a newer definition
740 */ 746 */
741 len = offsetof(struct ipath_flash, if_future); 747 len = sizeof(struct ipath_flash);
742 buf = vmalloc(len); 748 buf = vmalloc(len);
743 ret = 1; 749 ret = 1;
744 if (!buf) { 750 if (!buf) {