#include <linux/if_ether.h>
-#define BS_ERROR(args)
-
#define SROM_OFFSET(sih) ((sih->ccrev > 31) ? \
(((sih->cccaps & CC_CAP_SROM) == 0) ? NULL : \
((u8 *)curmap + PCI_16KB0_CCREGS_OFFSET + CC_SROM_OTP)) : \
extern char *_vars;
extern uint _varsz;
-#define SROM_CIS_SINGLE 1
-
static int initvars_srom_si(si_t *sih, void *curmap, char **vars, uint *count);
static void _initvars_srom_pci(u8 sromrev, u16 *srom, uint off, varbuf_t *b);
static int initvars_srom_pci(si_t *sih, void *curmap, char **vars, uint *count);
}
if (!wait_cnt) {
- BS_ERROR(("%s: Command 0x%x timed out\n", __func__, cmd));
return 0xffff;
}
if (cmd == SRC_OP_READ)
* is blank, regardless of the rest of the content, so declare
* it bad.
*/
- BS_ERROR(("%s: buf[0] = 0x%x, returning bad-crc\n",
- __func__, buf[0]));
return 1;
}
if (hndcrc8((u8 *) buf, nwords * 2, CRC8_INIT_VALUE) !=
CRC8_GOOD_VALUE) {
/* DBG only pci always read srom4 first, then srom8/9 */
- /* BS_ERROR(("%s: bad crc\n", __func__)); */
err = 1;
}
/* now correct the endianness of the byte array */
* is blank, regardless of the rest of the content, so declare
* it bad.
*/
- BS_ERROR(("%s: buf[0] = 0x%x, returning bad-crc\n", __func__,
- buf[0]));
return 1;
}
htol16_buf(buf, bufsz);
if (hndcrc8((u8 *) buf, SROM4_WORDS * 2, CRC8_INIT_VALUE) !=
CRC8_GOOD_VALUE) {
- BS_ERROR(("%s: bad crc\n", __func__));
err = 1;
}
/* now correct the endianness of the byte array */
sprom_read_pci(sih, sromwindow, 0, srom,
SROM4_WORDS, true);
sromrev = srom[SROM4_CRCREV] & 0xff;
- if (err)
- BS_ERROR(("%s: srom %d, bad crc\n", __func__,
- sromrev));
-
} else if (err == 0) {
/* srom is good and is rev < 4 */
/* top word of sprom contains version and crc8 */
u32 val;
val = 0;
- BS_ERROR(("Neither SPROM nor OTP has valid image\n"));
value = si_getdevpathvar(sih, "sromrev");
if (value) {
sromrev = (u8) simple_strtoul(value, NULL, 0);
goto varscont;
}
- BS_ERROR(("%s, SROM CRC Error\n", __func__));
-
value = si_getnvramflvar(sih, "sromrev");
if (value) {
err = 0;