Lines Matching refs:ifp
491 static u8 flash_csum(struct ipath_flash *ifp, int adjust)
493 u8 *ip = (u8 *) ifp;
496 for (len = 0; len < ifp->if_length; len++)
498 csum -= ifp->if_csum;
501 ifp->if_csum = csum;
516 struct ipath_flash *ifp;
566 ifp = (struct ipath_flash *)buf;
568 csum = flash_csum(ifp, 0);
569 if (csum != ifp->if_csum) {
571 "0x%x, not 0x%x\n", csum, ifp->if_csum);
574 if (*(__be64 *) ifp->if_guid == 0ULL ||
575 *(__be64 *) ifp->if_guid == __constant_cpu_to_be64(-1LL)) {
578 *(unsigned long long *) ifp->if_guid);
584 if (*(u64 *) ifp->if_guid == 0x100007511000000ULL)
587 *(unsigned long long *) ifp->if_guid);
589 bguid = ifp->if_guid;
598 guid = *(__be64 *) ifp->if_guid;
602 guid = *(__be64 *) ifp->if_guid;
604 dd->ipath_nguid = ifp->if_numguid;
610 if ((ifp->if_fversion > 1) && ifp->if_sprefix[0]
611 && ((u8 *)ifp->if_sprefix)[0] != 0xFF) {
617 memcpy(snp, ifp->if_sprefix, sizeof ifp->if_sprefix);
618 snp[sizeof ifp->if_sprefix] = '\0';
622 if (len > sizeof ifp->if_serial) {
623 len = sizeof ifp->if_serial;
625 memcpy(snp, ifp->if_serial, len);
627 memcpy(dd->ipath_serial, ifp->if_serial,
628 sizeof ifp->if_serial);
629 if (!strstr(ifp->if_comment, "Tested successfully"))
632 ifp->if_comment);