From owner-p4-projects@FreeBSD.ORG Mon May 14 21:50:32 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DFFFB16A406; Mon, 14 May 2007 21:50:31 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7633116A402 for ; Mon, 14 May 2007 21:50:31 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 6620513C489 for ; Mon, 14 May 2007 21:50:31 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l4ELoVRc066384 for ; Mon, 14 May 2007 21:50:31 GMT (envelope-from bms@incunabulum.net) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l4ELoVSR066366 for perforce@freebsd.org; Mon, 14 May 2007 21:50:31 GMT (envelope-from bms@incunabulum.net) Date: Mon, 14 May 2007 21:50:31 GMT Message-Id: <200705142150.l4ELoVSR066366@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bms@incunabulum.net using -f From: Bruce M Simpson To: Perforce Change Reviews Cc: Subject: PERFORCE change 119856 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2007 21:50:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=119856 Change 119856 by bms@bms_anglepoise on 2007/05/14 21:50:17 Really be more like pci in output. Affected files ... .. //depot/projects/mips2/src/sys/dev/siba/siba.c#6 edit .. //depot/projects/mips2/src/sys/dev/siba/sibavar.h#3 edit Differences ... ==== //depot/projects/mips2/src/sys/dev/siba/siba.c#6 (text+ko) ==== @@ -565,6 +565,9 @@ case SIBA_IVAR_REVID: *result = sdi->sdi_rev; break; + case SIBA_IVAR_CORE_INDEX: + *result = sdi->sdi_idx; + break; default: return (ENOENT); } @@ -588,12 +591,19 @@ */ if (siba_debug) { struct siba_devid *sd; + sd = siba_dev_match(siba_get_vendor(child), siba_get_device(child), SIBA_REV_ANY); - device_printf(dev, - "<0x%04x, 0x%04x \"%s\"> (driver not attached)\n", - siba_get_vendor(child), siba_get_device(child), - sd != NULL ? sd->sd_desc : "unknown"); + if (sd != NULL && sd->sd_desc != NULL) { + device_printf(dev, "<%s> " + "at device %d (no driver attached)\n", + sd->sd_desc, siba_get_core_index(child)); + } else { + device_printf(dev, "<0x%04x, 0x%04x> " + "at device %d (no driver attached)\n", + siba_get_vendor(child), siba_get_device(child), + siba_get_core_index(child)); + } } } ==== //depot/projects/mips2/src/sys/dev/siba/sibavar.h#3 (text+ko) ==== @@ -73,15 +73,17 @@ enum siba_device_ivars { SIBA_IVAR_VENDOR, SIBA_IVAR_DEVICE, - SIBA_IVAR_REVID + SIBA_IVAR_REVID, + SIBA_IVAR_CORE_INDEX }; #define SIBA_ACCESSOR(var, ivar, type) \ __BUS_ACCESSOR(siba, var, SIBA, ivar, type) -SIBA_ACCESSOR(vendor, VENDOR, uint16_t) -SIBA_ACCESSOR(device, DEVICE, uint16_t) -SIBA_ACCESSOR(revid, REVID, uint8_t) +SIBA_ACCESSOR(vendor, VENDOR, uint16_t) +SIBA_ACCESSOR(device, DEVICE, uint16_t) +SIBA_ACCESSOR(revid, REVID, uint8_t) +SIBA_ACCESSOR(core_index, CORE_INDEX, uint8_t) #undef SIBA_ACCESSOR