hpt27xx_osm_bsd.c (267290) | hpt27xx_osm_bsd.c (267368) |
---|---|
1/*- 2 * Copyright (c) 2011 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) 2011 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/hpt27xx/hpt27xx_osm_bsd.c 267290 2014-06-09 18:15:05Z jhb $ | 26 * $FreeBSD: head/sys/dev/hpt27xx/hpt27xx_osm_bsd.c 267368 2014-06-11 18:24:51Z delphij $ |
27 */ 28 29#include <dev/hpt27xx/hpt27xx_config.h> 30 31#include <dev/hpt27xx/os_bsd.h> 32#include <dev/hpt27xx/hptintf.h> 33 34static HIM *hpt_match(device_t dev) --- 443 unchanged lines hidden (view full) --- 478 479 cmdext_put(ext); 480 ldm_free_cmds(pCmd); 481 xpt_done(ccb); 482} 483 484static int os_buildsgl(PCOMMAND pCmd, PSG pSg, int logical) 485{ | 27 */ 28 29#include <dev/hpt27xx/hpt27xx_config.h> 30 31#include <dev/hpt27xx/os_bsd.h> 32#include <dev/hpt27xx/hptintf.h> 33 34static HIM *hpt_match(device_t dev) --- 443 unchanged lines hidden (view full) --- 478 479 cmdext_put(ext); 480 ldm_free_cmds(pCmd); 481 xpt_done(ccb); 482} 483 484static int os_buildsgl(PCOMMAND pCmd, PSG pSg, int logical) 485{ |
486 POS_CMDEXT ext = (POS_CMDEXT)pCmd->priv; 487 union ccb *ccb = ext->ccb; 488 489 if (logical) { 490 os_set_sgptr(pSg, (HPT_U8 *)ccb->csio.data_ptr); 491 pSg->size = ccb->csio.dxfer_len; 492 pSg->eot = 1; 493 return TRUE; 494 } 495 |
|
486 /* since we have provided physical sg, nobody will ask us to build physical sg */ 487 HPT_ASSERT(0); 488 return FALSE; 489} 490 491static void hpt_io_dmamap_callback(void *arg, bus_dma_segment_t *segs, int nsegs, int error) 492{ 493 PCOMMAND pCmd = (PCOMMAND)arg; --- 56 unchanged lines hidden (view full) --- 550 ccb->ccb_h.status = CAM_TID_INVALID; 551 xpt_done(ccb); 552 return; 553 } 554 555 vd = ldm_find_target(vbus, ccb->ccb_h.target_id); 556 557 if (!vd) { | 496 /* since we have provided physical sg, nobody will ask us to build physical sg */ 497 HPT_ASSERT(0); 498 return FALSE; 499} 500 501static void hpt_io_dmamap_callback(void *arg, bus_dma_segment_t *segs, int nsegs, int error) 502{ 503 PCOMMAND pCmd = (PCOMMAND)arg; --- 56 unchanged lines hidden (view full) --- 560 ccb->ccb_h.status = CAM_TID_INVALID; 561 xpt_done(ccb); 562 return; 563 } 564 565 vd = ldm_find_target(vbus, ccb->ccb_h.target_id); 566 567 if (!vd) { |
558 ccb->ccb_h.status = CAM_TID_INVALID; | 568 ccb->ccb_h.status = CAM_SEL_TIMEOUT; |
559 xpt_done(ccb); 560 return; 561 } 562 563 switch (cdb[0]) { 564 case TEST_UNIT_READY: 565 case START_STOP_UNIT: 566 case SYNCHRONIZE_CACHE: --- 800 unchanged lines hidden --- | 569 xpt_done(ccb); 570 return; 571 } 572 573 switch (cdb[0]) { 574 case TEST_UNIT_READY: 575 case START_STOP_UNIT: 576 case SYNCHRONIZE_CACHE: --- 800 unchanged lines hidden --- |