ata-pci.c (87206) | ata-pci.c (87951) |
---|---|
1/*- 2 * Copyright (c) 1998,1999,2000,2001 S�ren Schmidt <sos@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * | 1/*- 2 * Copyright (c) 1998,1999,2000,2001 S�ren Schmidt <sos@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/sys/dev/ata/ata-pci.c 87206 2001-12-02 12:19:16Z sos $ | 28 * $FreeBSD: head/sys/dev/ata/ata-pci.c 87951 2001-12-14 21:28:49Z sos $ |
29 */ 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/kernel.h> 34#include <sys/disk.h> 35#include <sys/module.h> 36#include <sys/bus.h> --- 33 unchanged lines hidden (view full) --- 70{ 71 device_t *children; 72 int nchildren, i; 73 74 if (device_get_children(device_get_parent(dev), &children, &nchildren)) 75 return 0; 76 77 for (i = 0; i < nchildren; i++) { | 29 */ 30 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/kernel.h> 34#include <sys/disk.h> 35#include <sys/module.h> 36#include <sys/bus.h> --- 33 unchanged lines hidden (view full) --- 70{ 71 device_t *children; 72 int nchildren, i; 73 74 if (device_get_children(device_get_parent(dev), &children, &nchildren)) 75 return 0; 76 77 for (i = 0; i < nchildren; i++) { |
78 if (pci_get_slot(dev) == pci_get_slot(children[i]) && 79 pci_get_devid(children[i]) == devid && | 78 if (pci_get_devid(children[i]) == devid && |
80 pci_get_revid(children[i]) >= revid) { 81 free(children, M_TEMP); 82 return 1; 83 } 84 } 85 free(children, M_TEMP); 86 return 0; 87} --- 52 unchanged lines hidden (view full) --- 140 case 0x244b8086: 141 return "Intel ICH2 ATA100 controller"; 142 143 case 0x248a8086: 144 case 0x248b8086: 145 return "Intel ICH3 ATA100 controller"; 146 147 case 0x522910b9: | 79 pci_get_revid(children[i]) >= revid) { 80 free(children, M_TEMP); 81 return 1; 82 } 83 } 84 free(children, M_TEMP); 85 return 0; 86} --- 52 unchanged lines hidden (view full) --- 139 case 0x244b8086: 140 return "Intel ICH2 ATA100 controller"; 141 142 case 0x248a8086: 143 case 0x248b8086: 144 return "Intel ICH3 ATA100 controller"; 145 146 case 0x522910b9: |
148 if (pci_get_revid(dev) < 0x20) 149 return "AcerLabs Aladdin ATA controller"; 150 else | 147 if (pci_get_revid(dev) >= 0xc4) 148 return "AcerLabs Aladdin ATA100 controller"; 149 else if (pci_get_revid(dev) >= 0xc2) 150 return "AcerLabs Aladdin ATA66 controller"; 151 else if (pci_get_revid(dev) >= 0x20) |
151 return "AcerLabs Aladdin ATA33 controller"; | 152 return "AcerLabs Aladdin ATA33 controller"; |
153 else 154 return "AcerLabs Aladdin ATA controller"; |
|
152 153 case 0x05711106: 154 if (ata_find_dev(dev, 0x05861106, 0x02)) 155 return "VIA 82C586 ATA33 controller"; 156 if (ata_find_dev(dev, 0x05861106, 0)) 157 return "VIA 82C586 ATA controller"; 158 if (ata_find_dev(dev, 0x05961106, 0x12)) 159 return "VIA 82C596 ATA66 controller"; --- 593 unchanged lines hidden --- | 155 156 case 0x05711106: 157 if (ata_find_dev(dev, 0x05861106, 0x02)) 158 return "VIA 82C586 ATA33 controller"; 159 if (ata_find_dev(dev, 0x05861106, 0)) 160 return "VIA 82C586 ATA controller"; 161 if (ata_find_dev(dev, 0x05961106, 0x12)) 162 return "VIA 82C596 ATA66 controller"; --- 593 unchanged lines hidden --- |