From 33ea30fed7516e17d712d96e2d961331bfc94c9c Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Tue, 18 Aug 2009 08:46:54 +0000 Subject: [PATCH] Fix iSCSI initiator and vpo driver operation, broken by CAM changes. Reviewed by: scottl, Danny Braniss Approved by: re (rwatson) --- sys/cam/cam_ccb.h | 1 + sys/cam/cam_xpt.c | 2 ++ sys/dev/iscsi/initiator/isc_cam.c | 2 ++ sys/dev/ppbus/vpo.c | 2 ++ 4 files changed, 7 insertions(+) diff --git a/sys/cam/cam_ccb.h b/sys/cam/cam_ccb.h index 61a57e3b2ab5..a750d935f43f 100644 --- a/sys/cam/cam_ccb.h +++ b/sys/cam/cam_ccb.h @@ -243,6 +243,7 @@ typedef enum { XPORT_ATA, /* AT Attachment */ XPORT_SAS, /* Serial Attached SCSI */ XPORT_SATA, /* Serial AT Attachment */ + XPORT_ISCSI, /* iSCSI */ } cam_xport; #define PROTO_VERSION_UNKNOWN (UINT_MAX - 1) diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index ea259668acf4..1c2f61430a6d 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -3803,6 +3803,8 @@ xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus) case XPORT_SAS: case XPORT_FC: case XPORT_USB: + case XPORT_ISCSI: + case XPORT_PPB: new_bus->xport = scsi_get_xport(); break; case XPORT_ATA: diff --git a/sys/dev/iscsi/initiator/isc_cam.c b/sys/dev/iscsi/initiator/isc_cam.c index fbd5b3d406f3..0d8782351c86 100644 --- a/sys/dev/iscsi/initiator/isc_cam.c +++ b/sys/dev/iscsi/initiator/isc_cam.c @@ -190,6 +190,8 @@ _inq(struct cam_sim *sim, union ccb *ccb, int maxluns) strncpy(cpi->hba_vid, "iSCSI", HBA_IDLEN); strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); cpi->unit_number = cam_sim_unit(sim); + cpi->transport = XPORT_ISCSI; + cpi->transport_version = 0; cpi->ccb_h.status = CAM_REQ_CMP; } diff --git a/sys/dev/ppbus/vpo.c b/sys/dev/ppbus/vpo.c index f63ff49e374c..40091787a4f0 100644 --- a/sys/dev/ppbus/vpo.c +++ b/sys/dev/ppbus/vpo.c @@ -427,6 +427,8 @@ vpo_action(struct cam_sim *sim, union ccb *ccb) strncpy(cpi->hba_vid, "Iomega", HBA_IDLEN); strncpy(cpi->dev_name, sim->sim_name, DEV_IDLEN); cpi->unit_number = sim->unit_number; + cpi->transport = XPORT_PPB; + cpi->transport_version = 0; cpi->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb);