hptrr_os_bsd.c (274819) | hptrr_os_bsd.c (296135) |
---|---|
1/* 2 * Copyright (c) HighPoint Technologies, Inc. 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/* 2 * Copyright (c) HighPoint Technologies, Inc. 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/dev/hptrr/hptrr_os_bsd.c 274819 2014-11-21 21:01:24Z smh $ | 26 * $FreeBSD: head/sys/dev/hptrr/hptrr_os_bsd.c 296135 2016-02-27 03:34:01Z jhibbits $ |
27 */ 28#include <dev/hptrr/hptrr_config.h> 29/* $Id: os_bsd.c,v 1.11 2005/06/03 14:06:38 kdh Exp $ 30 * 31 * HighPoint RAID Driver for FreeBSD 32 * Copyright (C) 2005 HighPoint Technologies, Inc. All Rights Reserved. 33 */ 34 --- 58 unchanged lines hidden (view full) --- 93 94 hba->pcibar[index].rid = 0x10 + index * 4; 95 96 if (pci_read_config(hba->pcidev, hba->pcibar[index].rid, 4) & 1) 97 hba->pcibar[index].type = SYS_RES_IOPORT; 98 else 99 hba->pcibar[index].type = SYS_RES_MEMORY; 100 | 27 */ 28#include <dev/hptrr/hptrr_config.h> 29/* $Id: os_bsd.c,v 1.11 2005/06/03 14:06:38 kdh Exp $ 30 * 31 * HighPoint RAID Driver for FreeBSD 32 * Copyright (C) 2005 HighPoint Technologies, Inc. All Rights Reserved. 33 */ 34 --- 58 unchanged lines hidden (view full) --- 93 94 hba->pcibar[index].rid = 0x10 + index * 4; 95 96 if (pci_read_config(hba->pcidev, hba->pcibar[index].rid, 4) & 1) 97 hba->pcibar[index].type = SYS_RES_IOPORT; 98 else 99 hba->pcibar[index].type = SYS_RES_MEMORY; 100 |
101 hba->pcibar[index].res = bus_alloc_resource(hba->pcidev, 102 hba->pcibar[index].type, &hba->pcibar[index].rid, 0, ~0, length, RF_ACTIVE); | 101 hba->pcibar[index].res = bus_alloc_resource_any(hba->pcidev, 102 hba->pcibar[index].type, &hba->pcibar[index].rid, RF_ACTIVE); |
103 104 hba->pcibar[index].base = (char *)rman_get_virtual(hba->pcibar[index].res) + offset; 105 return hba->pcibar[index].base; 106} 107 108void os_unmap_pci_bar(void *osext, void *base) 109{ 110 PHBA hba = (PHBA)osext; --- 178 unchanged lines hidden --- | 103 104 hba->pcibar[index].base = (char *)rman_get_virtual(hba->pcibar[index].res) + offset; 105 return hba->pcibar[index].base; 106} 107 108void os_unmap_pci_bar(void *osext, void *base) 109{ 110 PHBA hba = (PHBA)osext; --- 178 unchanged lines hidden --- |