RFC: ATA to CAM integration patch
Alexander Motin
mav at FreeBSD.org
Thu Aug 6 21:14:36 UTC 2009
Sam Fourman Jr. wrote:
> On Fri, Jun 26, 2009 at 1:47 PM, Alexander Motin<mav at freebsd.org> wrote:
>> Hi.
>>
>> I would like to present for testing and feedback present state of my and
>> Scott work on extending CAM subsystem to support ATA in addition to
>> SCSI. At this moment we have
>
> Are these patches in FreeBSD BETA2 (src from today)
>
> I decided to try the iscsi client on FreeBSD 8 and I noticed that
> da0 will not attach, but the same setup works on PC-BSD computer
> aka FreeBSD 7.2
>
> on the FreeBSD 8 i386 machine I get this message after
>
> iscsi: version 2.1.0
> xpt_dev_async called <-- This is why I am asking if it has anything
> to do with these patches
I've reproduced your problem.
Try attached patch. It fixed problem for me:
iscsi: version 2.1.0
pass0 at iscsi0 bus 0 target 0 lun 0
pass0: <NetBSD NetBSD iSCSI 0> Fixed Direct Access SCSI-3 device
GEOM: new disk da0
da0 at iscsi0 bus 0 target 0 lun 0
da0: <NetBSD NetBSD iSCSI 0> Fixed Direct Access SCSI-3 device
--
Alexander Motin
-------------- next part --------------
diff -ruNp sys/cam.prev/cam_ccb.h sys/cam/cam_ccb.h
--- sys/cam.prev/cam_ccb.h 2009-07-19 11:26:54.000000000 +0300
+++ sys/cam/cam_ccb.h 2009-08-06 23:28:36.000000000 +0300
@@ -230,6 +230,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 -ruNp sys/cam.prev/cam_xpt.c sys/cam/cam_xpt.c
--- sys/cam.prev/cam_xpt.c 2009-07-25 15:19:01.000000000 +0300
+++ sys/cam/cam_xpt.c 2009-08-06 23:29:03.000000000 +0300
@@ -3799,6 +3799,7 @@ xpt_bus_register(struct cam_sim *sim, de
case XPORT_SAS:
case XPORT_FC:
case XPORT_USB:
+ case XPORT_ISCSI:
new_bus->xport = scsi_get_xport();
break;
case XPORT_ATA:
--- sys/dev/iscsi/initiator/isc_cam.c.prev 2009-05-19 07:37:07.000000000 +0300
+++ sys/dev/iscsi/initiator/isc_cam.c 2009-08-06 23:30:35.000000000 +0300
@@ -190,6 +190,8 @@ _inq(struct cam_sim *sim, union ccb *ccb
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;
}
More information about the freebsd-current
mailing list