summaryrefslogtreecommitdiffstats
path: root/sys/dev/hptrr/hptrr_osm_bsd.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2014-06-11 18:24:51 +0000
committerdelphij <delphij@FreeBSD.org>2014-06-11 18:24:51 +0000
commit941bee44fccb1cf457ce8cd5ca79747b2caa8c87 (patch)
treed50ebb376ac30f4a3f1d0d5f50e14d37807afa21 /sys/dev/hptrr/hptrr_osm_bsd.c
parented2e02ec739554c703bb730ff21abfc062445087 (diff)
downloadFreeBSD-src-941bee44fccb1cf457ce8cd5ca79747b2caa8c87.zip
FreeBSD-src-941bee44fccb1cf457ce8cd5ca79747b2caa8c87.tar.gz
Apply vendor fixes to the High Point drivers:
- Don't call xpt_free_path() in os_query_remove_device() and always return TRUE. - Update os_buildsgl() to support build logical SG table which will be used by lower RAID module. - Return CAM_SEL_TIMEOUTstatus for SCSIcommand failed as target missing. Many thanks to HighPoint for providing this driver update. Submitted by: Steve Chang Reviewed by: mav MFC after: 3 days
Diffstat (limited to 'sys/dev/hptrr/hptrr_osm_bsd.c')
-rw-r--r--sys/dev/hptrr/hptrr_osm_bsd.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/dev/hptrr/hptrr_osm_bsd.c b/sys/dev/hptrr/hptrr_osm_bsd.c
index 3d83de6..25785c9 100644
--- a/sys/dev/hptrr/hptrr_osm_bsd.c
+++ b/sys/dev/hptrr/hptrr_osm_bsd.c
@@ -61,7 +61,7 @@ static int hpt_probe(device_t dev)
memset(hba, 0, sizeof(HBA));
hba->ext_type = EXT_TYPE_HBA;
hba->ldm_adapter.him = him;
- return 0;
+ return (BUS_PROBE_DEFAULT);
}
}
}
@@ -482,6 +482,15 @@ static void os_cmddone(PCOMMAND pCmd)
static int os_buildsgl(PCOMMAND pCmd, PSG pSg, int logical)
{
+ POS_CMDEXT ext = (POS_CMDEXT)pCmd->priv;
+ union ccb *ccb = ext->ccb;
+
+ if (logical) {
+ os_set_sgptr(pSg, (HPT_U8 *)ccb->csio.data_ptr);
+ pSg->size = ccb->csio.dxfer_len;
+ pSg->eot = 1;
+ return TRUE;
+ }
/* since we have provided physical sg, nobody will ask us to build physical sg */
HPT_ASSERT(0);
@@ -555,7 +564,7 @@ static void hpt_scsi_io(PVBUS_EXT vbus_ext, union ccb *ccb)
vd = ldm_find_target(vbus, ccb->ccb_h.target_id);
if (!vd) {
- ccb->ccb_h.status = CAM_TID_INVALID;
+ ccb->ccb_h.status = CAM_SEL_TIMEOUT;
xpt_done(ccb);
return;
}
OpenPOWER on IntegriCloud