Deleted Added
full compact
hptrr_osm_bsd.c (175363) hptrr_osm_bsd.c (176018)
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_osm_bsd.c 175363 2008-01-15 19:21:08Z sobomax $
26 * $FreeBSD: head/sys/dev/hptrr/hptrr_osm_bsd.c 176018 2008-02-06 01:02:20Z scottl $
27 */
28#include <dev/hptrr/hptrr_config.h>
27 */
28#include <dev/hptrr/hptrr_config.h>
29/* $Id: osm_bsd.c,v 1.26 2007/02/28 03:53:47 gmm Exp $
29/* $Id: osm_bsd.c,v 1.27 2007/11/22 07:35:49 gmm Exp $
30 *
31 * HighPoint RAID Driver for FreeBSD
32 * Copyright (C) 2005 HighPoint Technologies, Inc. All Rights Reserved.
33 */
34#include <dev/hptrr/os_bsd.h>
35#include <dev/hptrr/hptintf.h>
36
37static int hpt_probe(device_t dev)

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

257 ldm_initialize_vbus((PVBUS)vbus_ext->vbus, &vbus_ext->hba_list->ldm_adapter);
258 return 0;
259}
260
261static void hpt_flush_done(PCOMMAND pCmd)
262{
263 PVDEV vd = pCmd->target;
264
30 *
31 * HighPoint RAID Driver for FreeBSD
32 * Copyright (C) 2005 HighPoint Technologies, Inc. All Rights Reserved.
33 */
34#include <dev/hptrr/os_bsd.h>
35#include <dev/hptrr/hptintf.h>
36
37static int hpt_probe(device_t dev)

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

257 ldm_initialize_vbus((PVBUS)vbus_ext->vbus, &vbus_ext->hba_list->ldm_adapter);
258 return 0;
259}
260
261static void hpt_flush_done(PCOMMAND pCmd)
262{
263 PVDEV vd = pCmd->target;
264
265 if (mIsArray(vd->Class->type) && vd->u.array.transform && vd!=vd->u.array.transform->target) {
265 if (mIsArray(vd->type) && vd->u.array.transform && vd!=vd->u.array.transform->target) {
266 vd = vd->u.array.transform->target;
267 HPT_ASSERT(vd);
268 pCmd->target = vd;
269 pCmd->Result = RETURN_PENDING;
270 vdev_queue_cmd(pCmd);
271 return;
272 }
273

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

283 PCOMMAND pCmd;
284 int result = 0, done;
285 HPT_UINT count;
286
287 KdPrint(("flusing dev %p", vd));
288
289 hpt_lock_vbus(vbus_ext);
290
266 vd = vd->u.array.transform->target;
267 HPT_ASSERT(vd);
268 pCmd->target = vd;
269 pCmd->Result = RETURN_PENDING;
270 vdev_queue_cmd(pCmd);
271 return;
272 }
273

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

283 PCOMMAND pCmd;
284 int result = 0, done;
285 HPT_UINT count;
286
287 KdPrint(("flusing dev %p", vd));
288
289 hpt_lock_vbus(vbus_ext);
290
291 if (mIsArray(vd->Class->type) && vd->u.array.transform)
291 if (mIsArray(vd->type) && vd->u.array.transform)
292 count = MAX(vd->u.array.transform->source->cmds_per_request,
293 vd->u.array.transform->target->cmds_per_request);
294 else
295 count = vd->cmds_per_request;
296
297 pCmd = ldm_alloc_cmds(vd->vbus, count);
298
299 if (!pCmd) {

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

1009 */
1010static void hpt_final_init(void *dummy)
1011{
1012 int i;
1013 PVBUS_EXT vbus_ext;
1014 PVBUS vbus;
1015 PHBA hba;
1016
292 count = MAX(vd->u.array.transform->source->cmds_per_request,
293 vd->u.array.transform->target->cmds_per_request);
294 else
295 count = vd->cmds_per_request;
296
297 pCmd = ldm_alloc_cmds(vd->vbus, count);
298
299 if (!pCmd) {

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

1009 */
1010static void hpt_final_init(void *dummy)
1011{
1012 int i;
1013 PVBUS_EXT vbus_ext;
1014 PVBUS vbus;
1015 PHBA hba;
1016
1017#ifdef SUPPORT_ALL
1018/* ldm_fix_him() */
1019#endif
1020 /* Clear the config hook */
1021 config_intrhook_disestablish(&hpt_ich);
1022
1023 /* allocate memory */
1024 i = 0;
1025 ldm_for_each_vbus(vbus, vbus_ext) {
1026 if (hpt_alloc_mem(vbus_ext)) {
1027 os_printk("out of memory");

--- 390 unchanged lines hidden ---
1017 /* Clear the config hook */
1018 config_intrhook_disestablish(&hpt_ich);
1019
1020 /* allocate memory */
1021 i = 0;
1022 ldm_for_each_vbus(vbus, vbus_ext) {
1023 if (hpt_alloc_mem(vbus_ext)) {
1024 os_printk("out of memory");

--- 390 unchanged lines hidden ---