From owner-freebsd-current@FreeBSD.ORG Fri Aug 7 07:42:58 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 4D4DB106566C; Fri, 7 Aug 2009 07:42:58 +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 99C888FC19; Fri, 7 Aug 2009 07:42:55 +0000 (UTC) Received: from orphanage.alkar.net (account mav@alkar.net [212.86.226.11] verified) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPA id 250929538; Fri, 07 Aug 2009 10:42:52 +0300 Message-ID: <4A7BDAFB.7020303@FreeBSD.org> Date: Fri, 07 Aug 2009 10:42:51 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.22 (X11/20090805) MIME-Version: 1.0 To: Scott Long References: <20090806184510.GA12039@triton.kn-bremen.de> <4A7B3328.5020307@FreeBSD.org> <20090806200715.GA16313@triton.kn-bremen.de> <20090806222127.GB1940@triton.kn-bremen.de> <4A7BBA52.306@samsco.org> <4A7BD57E.3040201@FreeBSD.org> <4A7BD64D.60601@samsco.org> In-Reply-To: <4A7BD64D.60601@samsco.org> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org, markus@FreeBSD.org, Juergen Lock Subject: Re: cdparanoia patch for ahci(4)/siis(4) 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: Fri, 07 Aug 2009 07:42:58 -0000 Scott Long wrote: > Alexander Motin wrote: >> CAM reports SCSI protocol for ATAPI devices at this moment. It is not >> good probably. but changing it now may be painful. Checks like >> d->ccb->cpi.transport == XPORT_ATA || >> d->ccb->cpi.transport == XPORT_SATA >> should be for now. "ata" hack should also stay there for now, as >> ATAPICAM emulates SCSI transport now, but not a new ATA one. > > What protocol should CAM be reporting for ATAPI devices? It is SCSI. I > don't understand why we have to keep on diverging from the goal of > having a unified and consistent interface here. ATAPI supports both ATA (partially) and SCSI command sets. And before main SCSI commands can be executed, ATA identification and configuration should be done. Now SATA XPT fetches ATA IDENTIFY and sets respective transfer mode, but it is tricky now for other code to differentiate ATAPI devices from plain SCSI. From the one side transfer negotiation is indeed only a transport feature, but from other side, as in this cdparanoia case ATAPI/SCSI difference somehow affects error handling (haven't looked actually why). -- Alexander Motin