Lines Matching refs:rc
191 int rc;
218 rc = smbus_readb(sc->smbus, sc->spd_addr, SPD_OFFSET_DRAM_TYPE, &byte);
219 if (rc != 0) {
220 device_printf(dev, "failed to read dram_type: %d\n", rc);
243 rc = EINVAL;
248 /* bootverbose debuggery is best-effort, so ignore the rc. */
255 rc = jedec_dimm_capacity(sc, type, &sc->capacity_mb);
256 if (rc != 0) {
260 rc = jedec_dimm_field_to_str(sc, sc->part_str, sizeof(sc->part_str),
262 if (rc != 0) {
266 rc = jedec_dimm_field_to_str(sc, sc->serial_str, sizeof(sc->serial_str),
268 if (rc != 0) {
284 rc = smbus_readb(sc->smbus, sc->spd_addr, tsod_present_offset, &byte);
285 if (rc != 0) {
287 rc);
292 rc = jedec_dimm_readw_be(sc, TSOD_REG_MANUFACTURER, &vendorid);
293 if (rc != 0) {
296 rc = 0;
299 rc = jedec_dimm_readw_be(sc, TSOD_REG_DEV_REV, &devid);
300 if (rc != 0) {
302 rc = 0;
384 return (rc);
426 int rc;
444 rc = EINVAL;
448 rc = smbus_readb(sc->smbus, sc->spd_addr, bus_width_offset,
450 if (rc != 0) {
451 device_printf(sc->dev, "failed to read bus_width: %d\n", rc);
455 rc = smbus_readb(sc->smbus, sc->spd_addr, dimm_ranks_offset,
457 if (rc != 0) {
458 device_printf(sc->dev, "failed to read dimm_ranks: %d\n", rc);
462 rc = smbus_readb(sc->smbus, sc->spd_addr, sdram_capacity_offset,
464 if (rc != 0) {
466 rc);
470 rc = smbus_readb(sc->smbus, sc->spd_addr, sdram_width_offset,
472 if (rc != 0) {
473 device_printf(sc->dev, "failed to read sdram_width: %d\n", rc);
479 rc = smbus_readb(sc->smbus, sc->spd_addr, sdram_pkg_type_offset,
481 if (rc != 0) {
483 "failed to read sdram_pkg_type: %d\n", rc);
495 rc = EINVAL;
508 rc = EINVAL;
513 rc = EINVAL;
530 rc = EINVAL;
535 rc = EINVAL;
546 rc = EINVAL;
569 return (rc);
608 int rc;
615 rc = smbus_readb(sc->smbus, sc->spd_addr, i, &bytes[i]);
616 if (rc != 0) {
618 "unable to read page0:0x%02x: %d\n", i, rc);
628 rc = smbus_writeb(sc->smbus,
630 if (rc != 0) {
636 rc);
642 rc = smbus_readb(sc->smbus, sc->spd_addr, i,
644 if (rc != 0) {
646 "unable to read page1:0x%02x: %d\n", i, rc);
666 return (rc);
701 int rc;
719 rc = smbus_writeb(sc->smbus,
721 if (rc != 0) {
724 offset, rc);
730 rc = EINVAL;
739 rc = EINVAL;
744 rc = EINVAL;
760 rc = EINVAL;
768 rc = EINVAL;
778 rc = smbus_readb(sc->smbus, sc->spd_addr, (offset + i), &byte);
779 if (rc != 0) {
782 (offset + i), rc);
822 return (rc);
840 int rc;
854 rc = ENXIO;
859 rc = smbus_readb(smbus, addr, SPD_OFFSET_DRAM_TYPE, &byte);
860 if (rc != 0) {
869 rc = BUS_PROBE_DEFAULT;
873 rc = BUS_PROBE_DEFAULT;
877 rc = ENXIO;
882 return (rc);
903 int rc;
905 rc = smbus_readw(sc->smbus, sc->tsod_addr, reg, val);
906 if (rc != 0) {
912 return (rc);
925 int rc;
932 rc = jedec_dimm_readw_be(sc, TSOD_REG_TEMPERATURE, &val);
933 if (rc != 0) {
951 rc = sysctl_handle_int(oidp, &temp, 0, req);
954 return (rc);