Lines Matching refs:ifp

114 static u8 flash_csum(struct qib_flash *ifp, int adjust)  in flash_csum()  argument
116 u8 *ip = (u8 *) ifp; in flash_csum()
124 len = ifp->if_length; in flash_csum()
129 csum -= ifp->if_csum; in flash_csum()
132 ifp->if_csum = csum; in flash_csum()
147 struct qib_flash *ifp; in qib_get_eeprom_info() local
197 ifp = (struct qib_flash *)buf; in qib_get_eeprom_info()
199 csum = flash_csum(ifp, 0); in qib_get_eeprom_info()
200 if (csum != ifp->if_csum) { in qib_get_eeprom_info()
203 csum, ifp->if_csum); in qib_get_eeprom_info()
206 if (*(__be64 *) ifp->if_guid == cpu_to_be64(0) || in qib_get_eeprom_info()
207 *(__be64 *) ifp->if_guid == ~cpu_to_be64(0)) { in qib_get_eeprom_info()
210 *(unsigned long long *) ifp->if_guid); in qib_get_eeprom_info()
216 if (*(u64 *) ifp->if_guid == 0x100007511000000ULL) in qib_get_eeprom_info()
219 *(unsigned long long *) ifp->if_guid); in qib_get_eeprom_info()
221 bguid = ifp->if_guid; in qib_get_eeprom_info()
232 guid = *(__be64 *) ifp->if_guid; in qib_get_eeprom_info()
234 guid = *(__be64 *) ifp->if_guid; in qib_get_eeprom_info()
236 dd->nguid = ifp->if_numguid; in qib_get_eeprom_info()
242 if ((ifp->if_fversion > 1) && ifp->if_sprefix[0] && in qib_get_eeprom_info()
243 ((u8 *) ifp->if_sprefix)[0] != 0xFF) { in qib_get_eeprom_info()
250 memcpy(snp, ifp->if_sprefix, sizeof(ifp->if_sprefix)); in qib_get_eeprom_info()
251 snp[sizeof(ifp->if_sprefix)] = '\0'; in qib_get_eeprom_info()
255 if (len > sizeof(ifp->if_serial)) in qib_get_eeprom_info()
256 len = sizeof(ifp->if_serial); in qib_get_eeprom_info()
257 memcpy(snp, ifp->if_serial, len); in qib_get_eeprom_info()
259 memcpy(dd->serial, ifp->if_serial, sizeof(ifp->if_serial)); in qib_get_eeprom_info()
261 if (!strstr(ifp->if_comment, "Tested successfully")) in qib_get_eeprom_info()
264 dd->serial, ifp->if_comment); in qib_get_eeprom_info()