iir_pci.c (112367) | iir_pci.c (114001) |
---|---|
1/* $FreeBSD: head/sys/dev/iir/iir_pci.c 112367 2003-03-18 08:45:25Z phk $ */ | 1/* $FreeBSD: head/sys/dev/iir/iir_pci.c 114001 2003-04-25 05:37:04Z scottl $ */ |
2/* 3 * Copyright (c) 2000-01 Intel Corporation 4 * All Rights Reserved 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright --- 198 unchanged lines hidden (view full) --- 208 bzero(gdt, sizeof(struct gdt_softc)); 209 gdt->sc_init_level = 0; 210 gdt->sc_dpmemt = rman_get_bustag(io); 211 gdt->sc_dpmemh = rman_get_bushandle(io); 212 gdt->sc_dpmembase = rman_get_start(io); 213 gdt->sc_hanum = device_get_unit(dev); 214 gdt->sc_bus = pci_get_bus(dev); 215 gdt->sc_slot = pci_get_slot(dev); | 2/* 3 * Copyright (c) 2000-01 Intel Corporation 4 * All Rights Reserved 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright --- 198 unchanged lines hidden (view full) --- 208 bzero(gdt, sizeof(struct gdt_softc)); 209 gdt->sc_init_level = 0; 210 gdt->sc_dpmemt = rman_get_bustag(io); 211 gdt->sc_dpmemh = rman_get_bushandle(io); 212 gdt->sc_dpmembase = rman_get_start(io); 213 gdt->sc_hanum = device_get_unit(dev); 214 gdt->sc_bus = pci_get_bus(dev); 215 gdt->sc_slot = pci_get_slot(dev); |
216 gdt->sc_vendor = pci_get_vendor(dev); |
|
216 gdt->sc_device = pci_get_device(dev); 217 gdt->sc_subdevice = pci_get_subdevice(dev); 218 gdt->sc_class = GDT_MPR; 219/* no FC ctr. 220 if (gdt->sc_device >= GDT_PCI_PRODUCT_FC) 221 gdt->sc_class |= GDT_FC; 222*/ 223 --- 34 unchanged lines hidden (view full) --- 258 if (--retries == 0) { 259 printf("DEINIT failed\n"); 260 error = ENXIO; 261 goto err; 262 } 263 DELAY(1); 264 } 265 | 217 gdt->sc_device = pci_get_device(dev); 218 gdt->sc_subdevice = pci_get_subdevice(dev); 219 gdt->sc_class = GDT_MPR; 220/* no FC ctr. 221 if (gdt->sc_device >= GDT_PCI_PRODUCT_FC) 222 gdt->sc_class |= GDT_FC; 223*/ 224 --- 34 unchanged lines hidden (view full) --- 259 if (--retries == 0) { 260 printf("DEINIT failed\n"); 261 error = ENXIO; 262 goto err; 263 } 264 DELAY(1); 265 } 266 |
266 protocol = (u_int8_t)letoh32(bus_space_read_4(gdt->sc_dpmemt, gdt->sc_dpmemh, | 267 protocol = (uint8_t)le32toh(bus_space_read_4(gdt->sc_dpmemt, gdt->sc_dpmemh, |
267 GDT_MPR_IC + GDT_S_INFO)); 268 bus_space_write_1(gdt->sc_dpmemt, gdt->sc_dpmemh, GDT_MPR_IC + GDT_S_STATUS, 269 0); 270 if (protocol != GDT_PROTOCOL_VERSION) { 271 printf("unsupported protocol %d\n", protocol); 272 error = ENXIO; 273 goto err; 274 } --- 203 unchanged lines hidden --- | 268 GDT_MPR_IC + GDT_S_INFO)); 269 bus_space_write_1(gdt->sc_dpmemt, gdt->sc_dpmemh, GDT_MPR_IC + GDT_S_STATUS, 270 0); 271 if (protocol != GDT_PROTOCOL_VERSION) { 272 printf("unsupported protocol %d\n", protocol); 273 error = ENXIO; 274 goto err; 275 } --- 203 unchanged lines hidden --- |