From owner-freebsd-current@FreeBSD.ORG Thu Aug 6 21:14:36 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 430FD106568B; Thu, 6 Aug 2009 21:14:36 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id 8E6058FC19; Thu, 6 Aug 2009 21:14:35 +0000 (UTC) Received: from [212.86.226.226] (account mav@alkar.net HELO mavbook.mavhome.dp.ua) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPSA id 250897540; Fri, 07 Aug 2009 00:14:32 +0300 Message-ID: <4A7B4788.4090103@FreeBSD.org> Date: Fri, 07 Aug 2009 00:13:44 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.21 (X11/20090405) MIME-Version: 1.0 To: "Sam Fourman Jr." References: <4A4517BE.9040504@FreeBSD.org> <11167f520908052336x3fb98290tceb1e984fe9ad6aa@mail.gmail.com> In-Reply-To: <11167f520908052336x3fb98290tceb1e984fe9ad6aa@mail.gmail.com> Content-Type: multipart/mixed; boundary="------------030804010009010104080307" Cc: FreeBSD-Current , scottl@freebsd.org Subject: Re: RFC: ATA to CAM integration patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Aug 2009 21:14:36 -0000 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 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: Fixed Direct Access SCSI-3 device GEOM: new disk da0 da0 at iscsi0 bus 0 target 0 lun 0 da0: 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--