From 52c9474e101cfa61f19091e05cf1c8de31f37b9a Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 2 Sep 1999 05:20:08 +0000 Subject: Take a shot at getting this to compile under newpnp. --- contrib/pnpinfo/pnpinfo.c | 79 ++++++++++++++++++++++++----------------------- 1 file changed, 41 insertions(+), 38 deletions(-) (limited to 'contrib/pnpinfo/pnpinfo.c') diff --git a/contrib/pnpinfo/pnpinfo.c b/contrib/pnpinfo/pnpinfo.c index f37c3f4..5ecdec9 100644 --- a/contrib/pnpinfo/pnpinfo.c +++ b/contrib/pnpinfo/pnpinfo.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: pnpinfo.c,v 1.4 1999/05/04 16:59:42 luoqi Exp $ + * $Id: pnpinfo.c,v 1.5 1999/05/22 17:35:43 dfr Exp $ */ #include @@ -36,7 +36,7 @@ #include -#include +#include #ifdef DEBUG #define DEB(x) x @@ -112,7 +112,7 @@ send_Initiation_LFSR() { int cur, i; - pnp_write(CONFIG_CONTROL, 0x2); + pnp_write(PNP_CONFIG_CONTROL, 0x2); /* Reset the LSFR */ outb(_PNP_ADDRESS, 0); @@ -169,7 +169,7 @@ get_resource_info(u_char *buffer, int len) int i, j; for (i = 0; i < len; i++) { - outb(_PNP_ADDRESS, STATUS); + outb(_PNP_ADDRESS, PNP_STATUS); for (j = 0; j < 100; j++) { if ((inb((rd_port << 2) | 0x3)) & 0x1) break; @@ -179,7 +179,7 @@ get_resource_info(u_char *buffer, int len) printf("PnP device failed to report resource data\n"); return 0; } - outb(_PNP_ADDRESS, RESOURCE_DATA); + outb(_PNP_ADDRESS, PNP_RESOURCE_DATA); buffer[i] = inb((rd_port << 2) | 0x3); DEB(printf("--- get_resource_info: got 0x%02x\n",(unsigned)buffer[i])); } @@ -303,11 +303,11 @@ handle_small_res(u_char *resinfo, int item, int len) default: printf("*** ITEM 0x%02x detected\n", item); break; - case PNP_VERSION: + case PNP_TAG_VERSION: printf("PnP Version %d.%d, Vendor Version %d\n", resinfo[0] >> 4, resinfo[0] & (0xf), resinfo[1]); break; - case LOG_DEVICE_ID: + case PNP_TAG_LOGICAL_DEVICE: printf("\nLogical Device ID: %c%c%c%02x%02x 0x%08x #%d\n", ((resinfo[0] & 0x7c) >> 2) + 64, (((resinfo[0] & 0x03) << 3) | @@ -327,7 +327,7 @@ handle_small_res(u_char *resinfo, int item, int len) if (len == 6) printf("\tVendor register funcs %02x\n", resinfo[5]); break; - case COMP_DEVICE_ID: + case PNP_TAG_COMPAT_DEVICE: printf("Compatible Device ID: %c%c%c%02x%02x (%08x)\n", ((resinfo[0] & 0x7c) >> 2) + 64, (((resinfo[0] & 0x03) << 3) | @@ -335,7 +335,7 @@ handle_small_res(u_char *resinfo, int item, int len) (resinfo[1] & 0x1f) + 64, resinfo[2], resinfo[3], *(int *)resinfo); break; - case IRQ_FORMAT: + case PNP_TAG_IRQ_FORMAT: printf(" IRQ: "); for (i = 0; i < 8; i++) @@ -357,7 +357,7 @@ handle_small_res(u_char *resinfo, int item, int len) printf(" - only one type (true/edge)\n"); } break; - case DMA_FORMAT: + case PNP_TAG_DMA_FORMAT: printf(" DMA: channel(s) "); for (i = 0; i < 8; i++) if (resinfo[0] & (1<> 2) + 64, (((data[0] & 0x03) << 3) | ((data[1] & 0xe0) >> 5)) + 64, @@ -527,18 +529,19 @@ dump_resdata(u_char *data, int csn) for (i=0; i