summaryrefslogtreecommitdiffstats
path: root/sys/dev/hpt27xx
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2014-06-14 00:44:57 +0000
committerdelphij <delphij@FreeBSD.org>2014-06-14 00:44:57 +0000
commitab49cda14759bcd622b82320c0fcf9560ff4ae04 (patch)
tree0053b98943319e89d24149a073779330e5a8ca85 /sys/dev/hpt27xx
parent30000c41d7e2bae2a98ead82306913030d9bc345 (diff)
downloadFreeBSD-src-ab49cda14759bcd622b82320c0fcf9560ff4ae04.zip
FreeBSD-src-ab49cda14759bcd622b82320c0fcf9560ff4ae04.tar.gz
MFC r267368:
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
Diffstat (limited to 'sys/dev/hpt27xx')
-rw-r--r--sys/dev/hpt27xx/hpt27xx_os_bsd.c16
-rw-r--r--sys/dev/hpt27xx/hpt27xx_osm_bsd.c12
2 files changed, 12 insertions, 16 deletions
diff --git a/sys/dev/hpt27xx/hpt27xx_os_bsd.c b/sys/dev/hpt27xx/hpt27xx_os_bsd.c
index 12f832b..1d22fbb 100644
--- a/sys/dev/hpt27xx/hpt27xx_os_bsd.c
+++ b/sys/dev/hpt27xx/hpt27xx_os_bsd.c
@@ -324,21 +324,7 @@ int os_revalidate_device(void *osext, int id)
int os_query_remove_device(void *osext, int id)
{
- PVBUS_EXT vbus_ext = (PVBUS_EXT)osext;
- struct cam_periph *periph = NULL;
- struct cam_path *path;
- int status,retval = 0;
-
- status = xpt_create_path(&path, NULL, vbus_ext->sim->path_id, id, 0);
- if (status == CAM_REQ_CMP) {
- if((periph = cam_periph_find(path, "da")) != NULL){
- if(periph->refcount >= 1)
- retval = -1;
- }
- xpt_free_path(path);
- }
-
- return retval;
+ return 0;
}
HPT_U8 os_get_vbus_seq(void *osext)
diff --git a/sys/dev/hpt27xx/hpt27xx_osm_bsd.c b/sys/dev/hpt27xx/hpt27xx_osm_bsd.c
index d66db18..8dc3be9 100644
--- a/sys/dev/hpt27xx/hpt27xx_osm_bsd.c
+++ b/sys/dev/hpt27xx/hpt27xx_osm_bsd.c
@@ -474,6 +474,16 @@ 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);
return FALSE;
@@ -546,7 +556,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