Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 07 Aug 2009 00:13:44 +0300
From:      Alexander Motin <mav@FreeBSD.org>
To:        "Sam Fourman Jr." <sfourman@gmail.com>
Cc:        FreeBSD-Current <freebsd-current@freebsd.org>, scottl@freebsd.org
Subject:   Re: RFC: ATA to CAM integration patch
Message-ID:  <4A7B4788.4090103@FreeBSD.org>
In-Reply-To: <11167f520908052336x3fb98290tceb1e984fe9ad6aa@mail.gmail.com>
References:  <4A4517BE.9040504@FreeBSD.org> <11167f520908052336x3fb98290tceb1e984fe9ad6aa@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------030804010009010104080307
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Sam Fourman Jr. wrote:
> On Fri, Jun 26, 2009 at 1:47 PM, Alexander Motin<mav@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

--------------030804010009010104080307
Content-Type: text/plain;
 name="iscsi.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="iscsi.patch"

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;
 }
 

--------------030804010009010104080307--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A7B4788.4090103>