36 #include <linux/pci.h>
65 eeprom_offset, buff, len);
78 const void *
buf,
int len)
101 const void *buff,
int len)
107 ret = eeprom_write_with_enable(dd, eeprom_offset, buff, len);
161 if (oguid > bguid[7]) {
162 if (bguid[6] == 0xff) {
163 if (bguid[5] == 0xff) {
165 "Can't set %s GUID from base, wraps to OUI!\n",
186 "Couldn't allocate memory to read %u bytes from eeprom for GUID\n",
198 qib_dev_err(dd,
"Failed reading GUID from eeprom\n");
203 csum = flash_csum(ifp, 0);
206 "Bad I2C flash checksum: 0x%x, not 0x%x\n",
213 "Invalid GUID %llx from flash; ignoring\n",
214 *(
unsigned long long *) ifp->
if_guid);
220 if (*(
u64 *) ifp->
if_guid == 0x100007511000000ULL)
222 "Warning, GUID %llx is default, probably not correct!\n",
223 *(
unsigned long long *) ifp->
if_guid);
226 if (!bguid[0] && !bguid[1] && !bguid[2]) {
258 len = (
sizeof dd->
serial) - len;
267 "Board SN %s did not pass functional test: %s\n",
317 if (ret == 0 && new_time < 3600)
331 "Couldn't allocate memory to read %u bytes from eeprom for logging\n",
341 qib_dev_err(dd,
"Unable to acquire EEPROM for logging\n");
347 qib_dev_err(dd,
"Unable read EEPROM for logging\n");
352 csum = flash_csum(ifp, 0);
355 qib_dev_err(dd,
"EEPROM cks err (0x%02X, S/B 0x%02X)\n",
396 if (new_time >= 3600) {
397 new_hrs = new_time / 3600;
400 if (new_hrs > 0xFFFF)
420 csum = flash_csum(ifp, 1);
421 ret = eeprom_write_with_enable(dd, 0, buf, hi_water + 1);