Deleted Added
full compact
hptnr_os_bsd.c (256281) hptnr_os_bsd.c (270810)
1/* $Id: os_bsd.c,v 1.13 2010/05/11 03:12:11 lcn Exp $ */
2/*-
3 * HighPoint RAID Driver for FreeBSD
4 * Copyright (C) 2005-2011 HighPoint Technologies, Inc. All Rights Reserved.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 11 unchanged lines hidden (view full) ---

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
1/* $Id: os_bsd.c,v 1.13 2010/05/11 03:12:11 lcn Exp $ */
2/*-
3 * HighPoint RAID Driver for FreeBSD
4 * Copyright (C) 2005-2011 HighPoint Technologies, Inc. All Rights Reserved.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 11 unchanged lines hidden (view full) ---

20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * $FreeBSD: stable/10/sys/dev/hptnr/hptnr_os_bsd.c 252867 2013-07-06 07:49:41Z delphij $
28 * $FreeBSD: stable/10/sys/dev/hptnr/hptnr_os_bsd.c 270810 2014-08-29 13:06:30Z delphij $
29 */
30
31#include <dev/hptnr/hptnr_config.h>
32#include <dev/hptnr/os_bsd.h>
33
34BUS_ADDRESS get_dmapool_phy_addr(void *osext, void * dmapool_virt_addr);
35
36/* hardware access */

--- 243 unchanged lines hidden (view full) ---

280int os_revalidate_device(void *osext, int id)
281{
282
283 return 0;
284}
285
286int os_query_remove_device(void *osext, int id)
287{
29 */
30
31#include <dev/hptnr/hptnr_config.h>
32#include <dev/hptnr/os_bsd.h>
33
34BUS_ADDRESS get_dmapool_phy_addr(void *osext, void * dmapool_virt_addr);
35
36/* hardware access */

--- 243 unchanged lines hidden (view full) ---

280int os_revalidate_device(void *osext, int id)
281{
282
283 return 0;
284}
285
286int os_query_remove_device(void *osext, int id)
287{
288 PVBUS_EXT vbus_ext = (PVBUS_EXT)osext;
289 struct cam_periph *periph = NULL;
290 struct cam_path *path;
291 int status,retval = 0;
292
293 status = xpt_create_path(&path, NULL, vbus_ext->sim->path_id, id, 0);
294 if (status == CAM_REQ_CMP) {
295 if((periph = cam_periph_find(path, "da")) != NULL){
296 if(periph->refcount >= 1)
297 retval = -1;
298 }
299 xpt_free_path(path);
300 }
301
302 return retval;
288 return 0;
303}
304
305HPT_U8 os_get_vbus_seq(void *osext)
306{
307 return ((PVBUS_EXT)osext)->sim->path_id;
308}
309
310int os_printk(char *fmt, ...)

--- 21 unchanged lines hidden ---
289}
290
291HPT_U8 os_get_vbus_seq(void *osext)
292{
293 return ((PVBUS_EXT)osext)->sim->path_id;
294}
295
296int os_printk(char *fmt, ...)

--- 21 unchanged lines hidden ---