From owner-freebsd-scsi@FreeBSD.ORG Sun Apr 22 08:32:48 2007 Return-Path: X-Original-To: freebsd-scsi@hub.freebsd.org Delivered-To: freebsd-scsi@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EDD0916A400; Sun, 22 Apr 2007 08:32:48 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id C71B413C45D; Sun, 22 Apr 2007 08:32:48 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l3M8WmNp047484; Sun, 22 Apr 2007 08:32:48 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l3M8WmuA047480; Sun, 22 Apr 2007 08:32:48 GMT (envelope-from linimon) Date: Sun, 22 Apr 2007 08:32:48 GMT From: Mark Linimon Message-Id: <200704220832.l3M8WmuA047480@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-scsi@FreeBSD.org Cc: Subject: Re: kern/110847: [ahd] Tyan U320 onboard problem with more than 3 disks X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2007 08:32:49 -0000 Synopsis: [ahd] Tyan U320 onboard problem with more than 3 disks Responsible-Changed-From-To: freebsd-bugs->freebsd-scsi Responsible-Changed-By: linimon Responsible-Changed-When: Sun Apr 22 08:32:07 UTC 2007 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=110847 From owner-freebsd-scsi@FreeBSD.ORG Sun Apr 22 09:21:40 2007 Return-Path: X-Original-To: freebsd-scsi@hub.freebsd.org Delivered-To: freebsd-scsi@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B14C616A401; Sun, 22 Apr 2007 09:21:40 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 89E6613C44B; Sun, 22 Apr 2007 09:21:40 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l3M9LeFO051966; Sun, 22 Apr 2007 09:21:40 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l3M9Leru051962; Sun, 22 Apr 2007 09:21:40 GMT (envelope-from linimon) Date: Sun, 22 Apr 2007 09:21:40 GMT From: Mark Linimon Message-Id: <200704220921.l3M9Leru051962@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-i386@FreeBSD.org, freebsd-scsi@FreeBSD.org Cc: Subject: Re: kern/109968: [panic] Panic while booting with PCscsi II AM53C974AKC SCSI card by 6.1RC or 6.2 iso CD (regression) X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2007 09:21:40 -0000 Synopsis: [panic] Panic while booting with PCscsi II AM53C974AKC SCSI card by 6.1RC or 6.2 iso CD (regression) Responsible-Changed-From-To: freebsd-i386->freebsd-scsi Responsible-Changed-By: linimon Responsible-Changed-When: Sun Apr 22 09:21:28 UTC 2007 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=109968 From owner-freebsd-scsi@FreeBSD.ORG Sun Apr 22 09:56:42 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AA3E216A476 for ; Sun, 22 Apr 2007 09:56:42 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 5EC8713C480 for ; Sun, 22 Apr 2007 09:56:42 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id l3M9ud9P074414; Sun, 22 Apr 2007 03:56:39 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <462B3143.2070209@samsco.org> Date: Sun, 22 Apr 2007 03:56:19 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1 MIME-Version: 1.0 To: Mark Linimon References: <200704220921.l3M9Leru051962@freefall.freebsd.org> In-Reply-To: <200704220921.l3M9Leru051962@freefall.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Sun, 22 Apr 2007 03:56:39 -0600 (MDT) X-Spam-Status: No, score=-1.4 required=5.5 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-scsi@freebsd.org, freebsd-i386@freebsd.org Subject: Re: kern/109968: [panic] Panic while booting with PCscsi II AM53C974AKC SCSI card by 6.1RC or 6.2 iso CD (regression) X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2007 09:56:42 -0000 Mark Linimon wrote: > Synopsis: [panic] Panic while booting with PCscsi II AM53C974AKC SCSI card by 6.1RC or 6.2 iso CD (regression) > > Responsible-Changed-From-To: freebsd-i386->freebsd-scsi > Responsible-Changed-By: linimon > Responsible-Changed-When: Sun Apr 22 09:21:28 UTC 2007 > Responsible-Changed-Why: > Over to maintainer(s). > > http://www.freebsd.org/cgi/query-pr.cgi?pr=109968 This is a problem with the bootloader, not the FreeBSD SCSI stack. Please bounce this PR back to freebsd-i386, or assign it directly to someone like John. Scott From owner-freebsd-scsi@FreeBSD.ORG Sun Apr 22 10:18:38 2007 Return-Path: X-Original-To: freebsd-scsi@hub.freebsd.org Delivered-To: freebsd-scsi@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B002816A408; Sun, 22 Apr 2007 10:18:38 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 8905E13C487; Sun, 22 Apr 2007 10:18:38 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l3MAIcNF057085; Sun, 22 Apr 2007 10:18:38 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l3MAIcap057081; Sun, 22 Apr 2007 10:18:38 GMT (envelope-from linimon) Date: Sun, 22 Apr 2007 10:18:38 GMT From: Mark Linimon Message-Id: <200704221018.l3MAIcap057081@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-scsi@FreeBSD.org, freebsd-bugs@FreeBSD.org Cc: Subject: Re: kern/109968: [panic] Panic while booting with PCscsi II AM53C974AKC SCSI card by 6.1RC or 6.2 iso CD (regression) X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Apr 2007 10:18:38 -0000 Synopsis: [panic] Panic while booting with PCscsi II AM53C974AKC SCSI card by 6.1RC or 6.2 iso CD (regression) Responsible-Changed-From-To: freebsd-scsi->freebsd-bugs Responsible-Changed-By: linimon Responsible-Changed-When: Sun Apr 22 10:18:07 UTC 2007 Responsible-Changed-Why: scottl says this is a problem with the boot loader, not scsi. http://www.freebsd.org/cgi/query-pr.cgi?pr=109968 From owner-freebsd-scsi@FreeBSD.ORG Mon Apr 23 11:08:49 2007 Return-Path: X-Original-To: freebsd-scsi@FreeBSD.org Delivered-To: freebsd-scsi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3421116A406 for ; Mon, 23 Apr 2007 11:08:49 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 21FA213C48C for ; Mon, 23 Apr 2007 11:08:49 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l3NB8mb5093254 for ; Mon, 23 Apr 2007 11:08:48 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l3NB8lNW093250 for freebsd-scsi@FreeBSD.org; Mon, 23 Apr 2007 11:08:47 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 23 Apr 2007 11:08:47 GMT Message-Id: <200704231108.l3NB8lNW093250@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: linimon set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-scsi@FreeBSD.org Cc: Subject: Current problem reports assigned to you X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2007 11:08:49 -0000 Current FreeBSD problem reports Critical problems Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/39388 scsi ncr/sym drivers fail with 53c810 and more than 256MB m o kern/40895 scsi wierd kernel / device driver bug o kern/52638 scsi [panic] SCSI U320 on SMP server won't run faster than s kern/57398 scsi [mly] Current fails to install on mly(4) based RAID di o kern/60598 scsi wire down of scsi devices conflicts with config o kern/60641 scsi [sym] Sporadic SCSI bus resets with 53C810 under load s kern/61165 scsi [panic] kernel page fault after calling cam_send_ccb o kern/74627 scsi [ahc] [hang] Adaptec 2940U2W Can't boot 5.3 o kern/81887 scsi [aac] Adaptec SCSI 2130S aac0: GetDeviceProbeInfo comm o kern/90282 scsi [sym] SCSI bus resets cause loss of ch device o kern/92798 scsi [ahc] SCSI problem with timeouts o kern/93128 scsi [sym] FreeBSD 6.1 BETA 1 has problems with Symbios/LSI o kern/94838 scsi Kernel panic while mounting SD card with lock switch o o kern/99954 scsi [ahc] reading from DVD failes on 6.x (regression) o kern/110847 scsi [ahd] Tyan U320 onboard problem with more than 3 disks 15 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/23314 scsi aic driver fails to detect Adaptec 1520B unless PnP is o kern/35234 scsi World access to /dev/pass? (for scanner) requires acce o kern/38828 scsi [feature request] DPT PM2012B/90 doesn't work o kern/44587 scsi dev/dpt/dpt.h is missing defines required for DPT_HAND o kern/76178 scsi [ahd] Problem with ahd and large SCSI Raid system o kern/96133 scsi [scsi] [patch] add scsi quirk for joyfly 128mb flash u o kern/103702 scsi [cam] [patch] ChipsBnk: Unsupported USB memory stick 7 problems total. From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 24 16:20:10 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8D0D916A403; Tue, 24 Apr 2007 16:20:10 +0000 (UTC) (envelope-from thomas@FreeBSD.ORG) Received: from melamine.cuivre.fr.eu.org (melusine.cuivre.fr.eu.org [82.225.155.84]) by mx1.freebsd.org (Postfix) with ESMTP id 1A58313C469; Tue, 24 Apr 2007 16:20:10 +0000 (UTC) (envelope-from thomas@FreeBSD.ORG) Received: by melamine.cuivre.fr.eu.org (Postfix, from userid 1000) id 822675C0F6; Tue, 24 Apr 2007 18:20:08 +0200 (CEST) Date: Tue, 24 Apr 2007 18:20:08 +0200 From: Thomas Quinot To: Josh Carroll Message-ID: <20070424162008.GA7087@melamine.cuivre.fr.eu.org> References: <20070326180018.GA23771@melamine.cuivre.fr.eu.org> <460829E9.3080102@samsco.org> <8cb6106e0703261318o120c620ar6b2461802632fc01@mail.gmail.com> <8cb6106e0703262119g5a9afd4m2c3d5665c85c4969@mail.gmail.com> <4608A35E.3010404@samsco.org> <8cb6106e0703262157m7fd0ae96p3bb5368af797dc6b@mail.gmail.com> <460AA9E3.4030106@samsco.org> <8cb6106e0703281531k4c5bebecp5566c64c8f458a74@mail.gmail.com> <8cb6106e0704030039if46397fvfc993d9c9e19e1fc@mail.gmail.com> <8cb6106e0704032107w457026b1t1e04ed11008af48a@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="jRHKVT23PllUwdXP" Content-Disposition: inline In-Reply-To: <8cb6106e0704032107w457026b1t1e04ed11008af48a@mail.gmail.com> X-message-flag: WARNING! Using Outlook can damage your computer. User-Agent: Mutt/1.5.11 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-scsi@freebsd.org, bug-followup@freebsd.org Subject: Re: kern/103602: drive gets wedged on READ CD CAPACITY if no disc is in X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2007 16:20:10 -0000 --jRHKVT23PllUwdXP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline * Josh Carroll, 2007-04-04 : > Thinking out of the box, I decided to use sg3_utils on both the > semi-working 7.0-CURRENT kernel I had, and on a Linux Knoppix 5.1 live > CD. OK, this is a useful experiment. It really looks to me like some error condition that *could* be correctly detected (because it *is* detected under Knoppix) is *not* correctly detected in FreeBSD, causing various commands to time out. Now what I think would be really useful would be to try to reproduce these timeouts with ATAPI/CAM out of the loop, calling directly the ATAPI layer instead. I wrote a small program that tests that, which you'll find attached to this message. You can compile it using: gcc -o readcap readcap.c You can then try: $ readcap /dev/acd0 Here's what I observe here, first with no disk in the drive (the important item is sk=02, NOT READY), second with a disk in the drive. $ ./readcap /dev/acd0 ioctl returned error 5 Input/output error Sense data: error=70 sk=02 asc=3a ascq=00 $ ./readcap /dev/acd0 ioctl returned error 0 Unknown error: 0 Sense data: error=00 sk=00 asc=00 ascq=00 LBA of last sector in last session: 187279 Sector size: 2048 > Interestingly, the sg_vpd command fails to read the serial # as well, > so that is definitely a known bug with this drive I think. Here is the > sg_vpd output on Knoppix: OK, so ultimately we might need to include this quirk anyway. We'll see. Thomas. --jRHKVT23PllUwdXP-- From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 24 16:29:54 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 76E5416A401 for ; Tue, 24 Apr 2007 16:29:54 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.237]) by mx1.freebsd.org (Postfix) with ESMTP id 3278913C43E for ; Tue, 24 Apr 2007 16:29:54 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: by wr-out-0506.google.com with SMTP id 70so2097012wra for ; Tue, 24 Apr 2007 09:29:53 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=FwzpZv8CyZ9AcmfDq4jllzNDG1kQ8bzMcVcT/UsvUrSUu1jaX/6iN6gL27uKbP20lEbUt6s6+DSQby4YnmMRogkPVHmtwtNt6kqIE4lUT27uaPvmzHQ+6sCj9oUofmb9Vz/z0Um+GGTXJUjWdVGj9UGwUwH4lU+mij0KN3GmV7M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=HbCAwOCx6I+1PAODKwyPNHKS/yX3PG1b3nnnq4Z0NjHTzmEutDflc/SJyIGcXetW1tTYzYgxFs6cXPudKbjWojaYvnRHuC1grBrGWZsaCxEb+f8+JW4w+HwNQNtmBGuUo26P93Qp/b3H5YP4ayF+KowoWLE190xoLXoUkfZFpfE= Received: by 10.90.56.14 with SMTP id e14mr6289344aga.1177432193558; Tue, 24 Apr 2007 09:29:53 -0700 (PDT) Received: by 10.100.231.9 with HTTP; Tue, 24 Apr 2007 09:29:53 -0700 (PDT) Message-ID: <8cb6106e0704240929j38178df6k1b6391446c69a2ae@mail.gmail.com> Date: Tue, 24 Apr 2007 09:29:53 -0700 From: "Josh Carroll" To: "Thomas Quinot" In-Reply-To: <20070424162008.GA7087@melamine.cuivre.fr.eu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070326180018.GA23771@melamine.cuivre.fr.eu.org> <8cb6106e0703261318o120c620ar6b2461802632fc01@mail.gmail.com> <8cb6106e0703262119g5a9afd4m2c3d5665c85c4969@mail.gmail.com> <4608A35E.3010404@samsco.org> <8cb6106e0703262157m7fd0ae96p3bb5368af797dc6b@mail.gmail.com> <460AA9E3.4030106@samsco.org> <8cb6106e0703281531k4c5bebecp5566c64c8f458a74@mail.gmail.com> <8cb6106e0704030039if46397fvfc993d9c9e19e1fc@mail.gmail.com> <8cb6106e0704032107w457026b1t1e04ed11008af48a@mail.gmail.com> <20070424162008.GA7087@melamine.cuivre.fr.eu.org> Cc: freebsd-scsi@freebsd.org, bug-followup@freebsd.org Subject: Re: kern/103602: drive gets wedged on READ CD CAPACITY if no disc is in X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: josh.carroll@gmail.com List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2007 16:29:54 -0000 > Here's what I observe here, first with no disk in the drive (the > important item is sk=02, NOT READY), second with a disk in the drive. Here is my output (first with no disk, second with). I see sk=02 here as well: % ./readcap /dev/acd0 ioctl returned error 5 Input/output error Sense data: error=70 sk=02 asc=3a ascq=00 % ./readcap /dev/acd0 ioctl returned error 0 Unknown error: 0 Sense data: error=00 sk=00 asc=00 ascq=00 LBA of last sector in last session: 185805 Sector size: 2048 So it looks like directly talking to the ATAPI layer works ok here as well. At least, my results look the same as yours. > > Interestingly, the sg_vpd command fails to read the serial # as well, > > so that is definitely a known bug with this drive I think. Here is the > > sg_vpd output on Knoppix: > > OK, so ultimately we might need to include this quirk anyway. We'll see. I was able to boot into Windows XP and run sg_vpd in there as well, and it also fails to read the serial number. Just some additional info on that. :) Thanks, Josh From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 24 16:58:45 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F2A5A16A403; Tue, 24 Apr 2007 16:58:44 +0000 (UTC) (envelope-from thomas@FreeBSD.ORG) Received: from melamine.cuivre.fr.eu.org (melusine.cuivre.fr.eu.org [82.225.155.84]) by mx1.freebsd.org (Postfix) with ESMTP id 74AD513C469; Tue, 24 Apr 2007 16:58:44 +0000 (UTC) (envelope-from thomas@FreeBSD.ORG) Received: by melamine.cuivre.fr.eu.org (Postfix, from userid 1000) id 653BE5C216; Tue, 24 Apr 2007 18:58:43 +0200 (CEST) Date: Tue, 24 Apr 2007 18:58:43 +0200 From: Thomas Quinot To: Josh Carroll Message-ID: <20070424165843.GD7087@melamine.cuivre.fr.eu.org> References: <8cb6106e0703261318o120c620ar6b2461802632fc01@mail.gmail.com> <8cb6106e0703262119g5a9afd4m2c3d5665c85c4969@mail.gmail.com> <4608A35E.3010404@samsco.org> <8cb6106e0703262157m7fd0ae96p3bb5368af797dc6b@mail.gmail.com> <460AA9E3.4030106@samsco.org> <8cb6106e0703281531k4c5bebecp5566c64c8f458a74@mail.gmail.com> <8cb6106e0704030039if46397fvfc993d9c9e19e1fc@mail.gmail.com> <8cb6106e0704032107w457026b1t1e04ed11008af48a@mail.gmail.com> <20070424162008.GA7087@melamine.cuivre.fr.eu.org> <8cb6106e0704240929j38178df6k1b6391446c69a2ae@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="4SFOXa2GPu3tIq4H" Content-Disposition: inline In-Reply-To: <8cb6106e0704240929j38178df6k1b6391446c69a2ae@mail.gmail.com> X-message-flag: WARNING! Using Outlook can damage your computer. User-Agent: Mutt/1.5.11 Cc: freebsd-scsi@freebsd.org, bug-followup@freebsd.org Subject: Re: kern/103602: drive gets wedged on READ CD CAPACITY if no disc is in X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2007 16:58:45 -0000 --4SFOXa2GPu3tIq4H Content-Type: text/plain; charset=us-ascii Content-Disposition: inline * Josh Carroll, 2007-04-24 : > Here is my output (first with no disk, second with). I see sk=02 here as > well: > > % ./readcap /dev/acd0 > ioctl returned error 5 Input/output error > Sense data: error=70 sk=02 asc=3a ascq=00 > > % ./readcap /dev/acd0 > ioctl returned error 0 Unknown error: 0 > Sense data: error=00 sk=00 asc=00 ascq=00 > LBA of last sector in last session: 185805 > Sector size: 2048 It just occurred to me that there is one point that is different when using readcap, compared to sg_readcap+ATAPI/CAM: only in the latter case is DMA used. *And* you mentioned, very early in this PR, that disabling DMA altogether made the problem disappear. So, let's try something: enable DMA only for READ and WRITE commands (where it's most useful). Apparently it's not a completely unhead-of situation that some drives have problems with DMA for commands other than READ and WRITE, see: http://www.mail-archive.com/linux-ide@vger.kernel.org/msg05425.html Patch attached. Thomas. --4SFOXa2GPu3tIq4H Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=d Index: sys/dev/ata/atapi-cam.c =================================================================== RCS file: /space/mirror/ncvs/src/sys/dev/ata/atapi-cam.c,v retrieving revision 1.50 diff -u -r1.50 atapi-cam.c --- sys/dev/ata/atapi-cam.c 14 Mar 2007 01:59:00 -0000 1.50 +++ sys/dev/ata/atapi-cam.c 24 Apr 2007 16:57:11 -0000 @@ -516,10 +516,10 @@ switch (ccb_h->flags & CAM_DIR_MASK) { case CAM_DIR_IN: - request_flags |= ATA_R_READ|ATA_R_DMA; + request_flags |= ATA_R_READ; break; case CAM_DIR_OUT: - request_flags |= ATA_R_WRITE|ATA_R_DMA; + request_flags |= ATA_R_WRITE; break; case CAM_DIR_NONE: /* No flags need to be set */ @@ -528,8 +528,6 @@ device_printf(softc->dev, "unknown IO operation\n"); goto action_invalid; } - if (softc->atadev[tid]->mode < ATA_DMA) - request_flags &= ~ATA_R_DMA; if ((hcb = allocate_hcb(softc, unit, bus, ccb)) == NULL) { printf("cannot allocate ATAPI/CAM hcb\n"); @@ -594,7 +592,23 @@ request->u.atapi.ccb[3] = request->u.atapi.ccb[1] & 0x1f; request->u.atapi.ccb[2] = 0; request->u.atapi.ccb[1] = 0; + + case READ_10: + /* FALLTHROUGH */ + case WRITE_10: + /* FALLTHROUGH */ + case READ_12: + /* FALLTHROUGH */ + case WRITE_12: + /* + * Enable DMA (if target supports it) for READ and WRITE commands + * only, as some combinations of drive, controller and chipset do + * not behave correctly when DMA is enabled for other commands. + */ + if (softc->atadev[tid]->mode >= ATA_DMA) + request_flags |= ATA_R_DMA; break; + } if ((ccb_h->flags & CAM_DIR_MASK) == CAM_DIR_IN && (len & 1)) { @@ -616,7 +630,7 @@ /* * no retries are to be performed at the ATA level; any retries - * will be done by CAM . + * will be done by CAM. */ request->retries = 0; --4SFOXa2GPu3tIq4H-- From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 24 18:32:02 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 265B316A400 for ; Tue, 24 Apr 2007 18:32:02 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.227]) by mx1.freebsd.org (Postfix) with ESMTP id D57E613C44C for ; Tue, 24 Apr 2007 18:32:01 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so2242142wxc for ; Tue, 24 Apr 2007 11:32:01 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=pLMxk7BxYvnb8ru1Nv98UqXAuH6P5/UcQxw6VHP5ISwybvzV/JhSdtAj3z5pMBehtNNAHHvqs1522BUfOZs79wgtmgcivlpk83AM0FlaP9zSZeovm/zKXeyHSCJrK4uy3Ilr2kbtNEyg640SF4poJ3SgTfEWloNN4WTs5ZvPyOM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dtrYbhSAm3d0SMA+ZMbyKoCNGp+wPKZ12mBgkO4I+Ciq/IRyUZO8pTKjtxuU07UNws0EledyW2w2CSJxjOPeJs29K0GtpWtfY+nYiLvbN96nF0XYSy2Pr5XJDE1MOtqCuyAhz5lNwtzrW6wMwrwX7OBvU1Xm1T/Hb4MQZVaK9p0= Received: by 10.90.105.19 with SMTP id d19mr2586123agc.1177439520947; Tue, 24 Apr 2007 11:32:00 -0700 (PDT) Received: by 10.100.231.9 with HTTP; Tue, 24 Apr 2007 11:32:00 -0700 (PDT) Message-ID: <8cb6106e0704241132vfa6b312s3b4cbea0c823b796@mail.gmail.com> Date: Tue, 24 Apr 2007 11:32:00 -0700 From: "Josh Carroll" To: "Thomas Quinot" In-Reply-To: <20070424165843.GD7087@melamine.cuivre.fr.eu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8cb6106e0703261318o120c620ar6b2461802632fc01@mail.gmail.com> <4608A35E.3010404@samsco.org> <8cb6106e0703262157m7fd0ae96p3bb5368af797dc6b@mail.gmail.com> <460AA9E3.4030106@samsco.org> <8cb6106e0703281531k4c5bebecp5566c64c8f458a74@mail.gmail.com> <8cb6106e0704030039if46397fvfc993d9c9e19e1fc@mail.gmail.com> <8cb6106e0704032107w457026b1t1e04ed11008af48a@mail.gmail.com> <20070424162008.GA7087@melamine.cuivre.fr.eu.org> <8cb6106e0704240929j38178df6k1b6391446c69a2ae@mail.gmail.com> <20070424165843.GD7087@melamine.cuivre.fr.eu.org> Cc: freebsd-scsi@freebsd.org, bug-followup@freebsd.org Subject: Re: kern/103602: drive gets wedged on READ CD CAPACITY if no disc is in X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: josh.carroll@gmail.com List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2007 18:32:02 -0000 > *And* you mentioned, very early in this PR, that disabling DMA > altogether made the problem disappear. So, let's try something: enable > DMA only for READ and WRITE commands (where it's most useful). > > Apparently it's not a completely unhead-of situation that some drives > have problems with DMA for commands other than READ and WRITE, see: > http://www.mail-archive.com/linux-ide@vger.kernel.org/msg05425.html > Hi Thomas, Unfortunately, the other patches along with this produced a panic about a MTX not owned, and removing the CAMDEBUG options resulted in a different panic about ATAPICAM not locked. I'll look more closely tonight to see if I can get the kernel to load without a panic. Thanks, Josh From owner-freebsd-scsi@FreeBSD.ORG Wed Apr 25 01:45:30 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5DA4E16A400 for ; Wed, 25 Apr 2007 01:45:30 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.236]) by mx1.freebsd.org (Postfix) with ESMTP id 075CB13C468 for ; Wed, 25 Apr 2007 01:45:29 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so61211wxc for ; Tue, 24 Apr 2007 18:45:28 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Xd3ncVD4LtRJLWMvnS+tPeH8pqHwdtk/TSbc26lnDhhaqbbqh3cc/tm5SAfFJ8QoH/zkzXr8GnIB0LepZJS/1USKAOmUTh+zTTMss/kAM6KDQXlJRKqW5JYNFl6TcrMnTMtNT/U/ye81QOIViQuKitqw4imreaR8nWkTlagi4lU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UqWg7w+4ElTz/HOPcgnMnl7A1bd+rU2rJFo3z/Wl24iojPakPrHWV5KYkoC0qi9Bmxc+7yTnouycigYSRuMugDdfkGHQHM8gRqwykFpveGabCnMpEn/Of3jTYKSkOgpEiqrRFHwZOPqQw6JeBE1Wq2rxWaenjulBX3HwbfOFluM= Received: by 10.70.60.7 with SMTP id i7mr355988wxa.1177465528497; Tue, 24 Apr 2007 18:45:28 -0700 (PDT) Received: by 10.100.231.9 with HTTP; Tue, 24 Apr 2007 18:45:28 -0700 (PDT) Message-ID: <8cb6106e0704241845r737dca05p50fc967a61d66677@mail.gmail.com> Date: Tue, 24 Apr 2007 18:45:28 -0700 From: "Josh Carroll" To: "Thomas Quinot" In-Reply-To: <8cb6106e0704241132vfa6b312s3b4cbea0c823b796@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8cb6106e0703261318o120c620ar6b2461802632fc01@mail.gmail.com> <8cb6106e0703262157m7fd0ae96p3bb5368af797dc6b@mail.gmail.com> <460AA9E3.4030106@samsco.org> <8cb6106e0703281531k4c5bebecp5566c64c8f458a74@mail.gmail.com> <8cb6106e0704030039if46397fvfc993d9c9e19e1fc@mail.gmail.com> <8cb6106e0704032107w457026b1t1e04ed11008af48a@mail.gmail.com> <20070424162008.GA7087@melamine.cuivre.fr.eu.org> <8cb6106e0704240929j38178df6k1b6391446c69a2ae@mail.gmail.com> <20070424165843.GD7087@melamine.cuivre.fr.eu.org> <8cb6106e0704241132vfa6b312s3b4cbea0c823b796@mail.gmail.com> Cc: freebsd-scsi@freebsd.org, bug-followup@freebsd.org, c47g@gmx.at Subject: Re: kern/103602: drive gets wedged on READ CD CAPACITY if no disc is in X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: josh.carroll@gmail.com List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2007 01:45:30 -0000 > > *And* you mentioned, very early in this PR, that disabling DMA > > altogether made the problem disappear. So, let's try something: enable > > DMA only for READ and WRITE commands (where it's most useful). > > > > Apparently it's not a completely unhead-of situation that some drives > > have problems with DMA for commands other than READ and WRITE, see: > > http://www.mail-archive.com/linux-ide@vger.kernel.org/msg05425.html > > I had to go back to my snapshot of -CURRENT from 4/2 (or so), as I was getting panics with -CURRENT cvsup'd as of today. But with the old source, I think disabling DMA except for READ/WRITE did the trick. When I run sg_readcap /dev/cd0 now, I get: READ CAPACITY (10) failed, device not ready I get this immediately with no delay! I decided to try to burn a disk with growisofs, which worked, though I saw the following in dmesg (I had disabled CAMDEBUG once I knew it was working): acd0: FAILURE - READ_BUFFER ILLEGAL REQUEST asc=0x24 ascq=0x00 acd0: FAILURE - MODE_SELECT_BIG ILLEGAL REQUEST asc=0x24 ascq=0x00 acd0: FAILURE - READ_TOC ILLEGAL REQUEST asc=0x24 ascq=0x00 The disk only burned at 6x, even though the media and drive support 16x. But that may not be related to the above at all, unless it's related to the MODE_SELECT_BIG error? Thanks, Josh From owner-freebsd-scsi@FreeBSD.ORG Wed Apr 25 04:19:17 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 49D5916A406 for ; Wed, 25 Apr 2007 04:19:17 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.227]) by mx1.freebsd.org (Postfix) with ESMTP id C577713C45B for ; Wed, 25 Apr 2007 04:19:16 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so98739wxc for ; Tue, 24 Apr 2007 21:19:16 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=cORDRjg7cHLcwQ0mpMB6ameCSaV3Jlj+Y0Kr8FRKJ44eURuS86sEGgHr32VFFU5I4Z/t45jPPEtq9GXcMtRUZA79XklQygy8RnLOBlwiY6CIOP9k5/q+TBRPo7zpyhxEzGW+Rwq0FHhcZmiDxDtoEPk7hXxIBBSquwV7JMDAi1I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:references; b=fO70H29iCED8sF7ulo8PH8r+lJ7Pv8uBWzjLuAYp94UgHa3DODwR/lGGIiUal27oMvQ7m8WF08YHslsyDXRxMlLFEDUv1jnaM9KffqnxG9YeRjRW3VFGsy1kWe6hKVXsiJMCk5qmQkF5lvwhyGA7kTV3Wds1m+EsJnZ3M9pAM7Q= Received: by 10.70.19.16 with SMTP id 16mr166341wxs.1177474755897; Tue, 24 Apr 2007 21:19:15 -0700 (PDT) Received: by 10.100.231.9 with HTTP; Tue, 24 Apr 2007 21:19:15 -0700 (PDT) Message-ID: <8cb6106e0704242119h4a09d7d4v667d64071b3bd053@mail.gmail.com> Date: Tue, 24 Apr 2007 21:19:15 -0700 From: "Josh Carroll" To: "Thomas Quinot" In-Reply-To: <8cb6106e0704241845r737dca05p50fc967a61d66677@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_169176_7582099.1177474755826" References: <8cb6106e0703261318o120c620ar6b2461802632fc01@mail.gmail.com> <460AA9E3.4030106@samsco.org> <8cb6106e0703281531k4c5bebecp5566c64c8f458a74@mail.gmail.com> <8cb6106e0704030039if46397fvfc993d9c9e19e1fc@mail.gmail.com> <8cb6106e0704032107w457026b1t1e04ed11008af48a@mail.gmail.com> <20070424162008.GA7087@melamine.cuivre.fr.eu.org> <8cb6106e0704240929j38178df6k1b6391446c69a2ae@mail.gmail.com> <20070424165843.GD7087@melamine.cuivre.fr.eu.org> <8cb6106e0704241132vfa6b312s3b4cbea0c823b796@mail.gmail.com> <8cb6106e0704241845r737dca05p50fc967a61d66677@mail.gmail.com> Cc: freebsd-scsi@freebsd.org, bug-followup@freebsd.org, c47g@gmx.at Subject: Re: kern/103602: drive gets wedged on READ CD CAPACITY if no disc is in X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: josh.carroll@gmail.com List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2007 04:19:17 -0000 ------=_Part_169176_7582099.1177474755826 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I used the following patch (attached) against a RELENG_6_2 src tree, and it's working brilliantly. No problems to speak of. I can boot with atapicam in the kernel without a disk in the drive and there were no hangs at all. The sg_readcap command still gives (immediately): READ CAPACITY (10) failed, device not ready I was able to burn a DVD-R with growisofs and blank and burn a CD-RW with cdrecord. So all seems well, though I'll continue to keep an eye on it. I'm not sure which patches need to be committed, etc. But I wanted to include the cumulative patch against the 6.2-R src in case it helps you decide which code to commit to -CURRENT/etc. Christian - can you give the attached patch a shot if you've got a 6.2-R kernel/install handy on your P5B-E? Thanks for all your help Thomas! Josh ------=_Part_169176_7582099.1177474755826 Content-Type: application/octet-stream; name=RELENG_6_2.atapicam.patch Content-Transfer-Encoding: base64 X-Attachment-Id: f_f0x9z6p0 Content-Disposition: attachment; filename="RELENG_6_2.atapicam.patch" ZGlmZiAtdXJOIHN5cy5vbGQvY2FtL2NhbV94cHQuYyBzeXMvY2FtL2NhbV94cHQuYwotLS0gc3lz Lm9sZC9jYW0vY2FtX3hwdC5jCVNhdCBTZXAg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R1cyAmIH4oQ0FNX1NUQVRV U19NQVNLIHwgQ0FNX1NJTV9RVUVVRUQpKTsKKyAgICBtdHhfbG9jaygmR2lhbnQpOwogICAgIHhw dF9kb25lKGNjYik7CisgICAgbXR4X3VubG9jaygmR2lhbnQpOwogfQogCiBzdGF0aWMgdm9pZAo= ------=_Part_169176_7582099.1177474755826-- From owner-freebsd-scsi@FreeBSD.ORG Wed Apr 25 05:44:56 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2EAC416A406 for ; Wed, 25 Apr 2007 05:44:56 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.232]) by mx1.freebsd.org (Postfix) with ESMTP id D5A5213C45A for ; Wed, 25 Apr 2007 05:44:55 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so116716wxc for ; Tue, 24 Apr 2007 22:44:55 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UHk2jL5wKcrYno30pCXLNnk8a5GybsgQ8tboXz9cE9Nwz4VYZocVAFLEzcVsGChnGZYq7mwSFl0fDc47bI9k8jbMETajsYFr8eGrLD7Ealg7BzMkHswu0xUowANcPbmDevIv/B4uJ9UnZn9jAgcmUeYXiPTUmoeM+QnZZ3rHyHI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=FIvwY7vQ3S5wVN4tjMJZ0qFaZ8PG6B2CTwS2NqO21ZNDu3bU72MCWqJ7gKacm+az7c3qA3EL5zADTd2GxjQYH7xW+etaNjicsTeJiLfQlcM4DdI/3KVHs6AFVc6YBd/9N+xT19P2Fo0cbqlNIiGHnRYxW60IRBbYUK3rXxdg4Xo= Received: by 10.70.129.4 with SMTP id b4mr280109wxd.1177479894822; Tue, 24 Apr 2007 22:44:54 -0700 (PDT) Received: by 10.100.231.9 with HTTP; Tue, 24 Apr 2007 22:44:54 -0700 (PDT) Message-ID: <8cb6106e0704242244i6b23e0a3s9a7c47cefd7975d7@mail.gmail.com> Date: Tue, 24 Apr 2007 22:44:54 -0700 From: "Josh Carroll" To: "Thomas Quinot" In-Reply-To: <8cb6106e0704242119h4a09d7d4v667d64071b3bd053@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8cb6106e0703261318o120c620ar6b2461802632fc01@mail.gmail.com> <8cb6106e0703281531k4c5bebecp5566c64c8f458a74@mail.gmail.com> <8cb6106e0704030039if46397fvfc993d9c9e19e1fc@mail.gmail.com> <8cb6106e0704032107w457026b1t1e04ed11008af48a@mail.gmail.com> <20070424162008.GA7087@melamine.cuivre.fr.eu.org> <8cb6106e0704240929j38178df6k1b6391446c69a2ae@mail.gmail.com> <20070424165843.GD7087@melamine.cuivre.fr.eu.org> <8cb6106e0704241132vfa6b312s3b4cbea0c823b796@mail.gmail.com> <8cb6106e0704241845r737dca05p50fc967a61d66677@mail.gmail.com> <8cb6106e0704242119h4a09d7d4v667d64071b3bd053@mail.gmail.com> Cc: freebsd-scsi@freebsd.org, bug-followup@freebsd.org, c47g@gmx.at Subject: Re: kern/103602: drive gets wedged on READ CD CAPACITY if no disc is in X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: josh.carroll@gmail.com List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2007 05:44:56 -0000 Oops, I think gmail attached the patch as a MIME encoded attachment. Here's the patch: diff -urN sys.old/cam/cam_xpt.c sys/cam/cam_xpt.c --- sys.old/cam/cam_xpt.c Sat Sep 23 11:42:08 2006 +++ sys/cam/cam_xpt.c Tue Apr 24 13:31:28 2007 @@ -254,6 +254,11 @@ static struct xpt_quirk_entry xpt_quirk_table[] = { { + /* Hangs on INQUIRY with EVPD flag??? */ + { T_CDROM, SIP_MEDIA_REMOVABLE, sony, "DVD RW DRU*", "*" }, + CAM_QUIRK_NOSERIAL, /*mintags*/0, /*maxtags*/0 + }, + { /* Reports QUEUE FULL for temporary resource shortages */ { T_DIRECT, SIP_MEDIA_FIXED, quantum, "XP39100*", "*" }, /*quirks*/0, /*mintags*/24, /*maxtags*/32 diff -urN sys.old/cam/scsi/scsi_cd.c sys/cam/scsi/scsi_cd.c --- sys.old/cam/scsi/scsi_cd.c Wed Jul 26 00:48:51 2006 +++ sys/cam/scsi/scsi_cd.c Tue Apr 24 13:31:28 2007 @@ -107,9 +107,10 @@ } cd_flags; typedef enum { - CD_CCB_PROBE = 0x01, - CD_CCB_BUFFER_IO = 0x02, - CD_CCB_WAITING = 0x03, + CD_CCB_PROBE_TUR = 0x01, + CD_CCB_PROBE_RCAP = 0x02, + CD_CCB_BUFFER_IO = 0x03, + CD_CCB_WAITING = 0x04, CD_CCB_TYPE_MASK = 0x0F, CD_CCB_RETRY_UA = 0x10 } cd_ccb_state; @@ -135,7 +136,8 @@ }; typedef enum { - CD_STATE_PROBE, + CD_STATE_PROBE_RCAP, + CD_STATE_PROBE_TUR, CD_STATE_NORMAL } cd_state; @@ -675,7 +677,7 @@ bzero(softc, sizeof(*softc)); LIST_INIT(&softc->pending_ccbs); STAILQ_INIT(&softc->mode_queue); - softc->state = CD_STATE_PROBE; + softc->state = CD_STATE_PROBE_TUR; bioq_init(&softc->bio_queue); if (SID_IS_REMOVABLE(&cgd->inq_data)) softc->flags |= CD_FLAG_DISC_REMOVABLE; @@ -1561,7 +1563,21 @@ } break; } - case CD_STATE_PROBE: + case CD_STATE_PROBE_TUR: + { + csio = &start_ccb->csio; + scsi_test_unit_ready(csio, + /*retries*/4, + cddone, + MSG_SIMPLE_Q_TAG, + SSD_FULL_SIZE, + /*timeout*/10000); + start_ccb->ccb_h.ccb_bp = NULL; + start_ccb->ccb_h.ccb_state = CD_CCB_PROBE_TUR; + xpt_action(start_ccb); + break; + } + case CD_STATE_PROBE_RCAP: { rcap = (struct scsi_read_capacity_data *)malloc(sizeof(*rcap), @@ -1582,7 +1598,7 @@ SSD_FULL_SIZE, /*timeout*/20000); start_ccb->ccb_h.ccb_bp = NULL; - start_ccb->ccb_h.ccb_state = CD_CCB_PROBE; + start_ccb->ccb_h.ccb_state = CD_CCB_PROBE_RCAP; xpt_action(start_ccb); break; } @@ -1673,7 +1689,35 @@ biofinish(bp, NULL, 0); break; } - case CD_CCB_PROBE: + case CD_CCB_PROBE_TUR: + { + if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) { + softc->state = CD_STATE_PROBE_RCAP; + xpt_release_ccb(done_ccb); + xpt_schedule(periph, /*priority*/5); + return; + } + if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { + /* Don't wedge the queue */ + cam_release_devq(done_ccb->ccb_h.path, + /*relsim_flags*/0, + /*reduction*/0, + /*timeout*/0, + /*getcount_only*/0); + } + if (bootverbose) + cam_error_print(done_ccb, CAM_ESF_ALL, CAM_EPF_ALL); + /* + * The TUR generated an error, so there likely isn't media in + * the drive. Some drives lock up if they are sent a read + * capacity command while in this state, so avoid doing that. + */ + softc->state = CD_STATE_NORMAL; + xpt_release_ccb(done_ccb); + cam_periph_unlock(periph); + return; + } + case CD_CCB_PROBE_RCAP: { struct scsi_read_capacity_data *rdcap; char announce_buf[120]; /* diff -urN sys.old/dev/ata/atapi-cam.c sys/dev/ata/atapi-cam.c --- sys.old/dev/ata/atapi-cam.c Tue Apr 4 09:07:42 2006 +++ sys/dev/ata/atapi-cam.c Tue Apr 24 13:31:22 2007 @@ -505,10 +505,10 @@ switch (ccb_h->flags & CAM_DIR_MASK) { case CAM_DIR_IN: - request_flags |= ATA_R_READ|ATA_R_DMA; + request_flags |= ATA_R_READ; break; case CAM_DIR_OUT: - request_flags |= ATA_R_WRITE|ATA_R_DMA; + request_flags |= ATA_R_WRITE; break; case CAM_DIR_NONE: /* No flags need to be set */ @@ -517,8 +517,6 @@ device_printf(softc->dev, "unknown IO operation\n"); goto action_invalid; } - if (softc->atadev[tid]->mode < ATA_DMA) - request_flags &= ~ATA_R_DMA; if ((hcb = allocate_hcb(softc, unit, bus, ccb)) == NULL) { printf("cannot allocate ATAPI/CAM hcb\n"); @@ -580,7 +578,23 @@ request->u.atapi.ccb[3] = request->u.atapi.ccb[1] & 0x1f; request->u.atapi.ccb[2] = 0; request->u.atapi.ccb[1] = 0; + + case READ_10: + /* FALLTHROUGH */ + case WRITE_10: + /* FALLTHROUGH */ + case READ_12: + /* FALLTHROUGH */ + case WRITE_12: + /* + * Enable DMA (if target supports it) for READ and WRITE commands + * only, as some combinations of drive, controller and chipset do + * not behave correctly when DMA is enabled for other commands. + */ + if (softc->atadev[tid]->mode >= ATA_DMA) + request_flags |= ATA_R_DMA; break; + } if ((ccb_h->flags & CAM_DIR_MASK) == CAM_DIR_IN && (len & 1)) { @@ -746,7 +760,9 @@ free_hcb(hcb); ccb->ccb_h.status = status | (ccb->ccb_h.status & ~(CAM_STATUS_MASK | CAM_SIM_QUEUED)); + mtx_lock(&Giant); xpt_done(ccb); + mtx_unlock(&Giant); } static void From owner-freebsd-scsi@FreeBSD.ORG Wed Apr 25 18:27:10 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CE9C516A404 for ; Wed, 25 Apr 2007 18:27:10 +0000 (UTC) (envelope-from c47g@gmx.at) Received: from email.aon.at (nat-warsl417-01.aon.at [195.3.96.119]) by mx1.freebsd.org (Postfix) with ESMTP id 320A213C448 for ; Wed, 25 Apr 2007 18:27:09 +0000 (UTC) (envelope-from c47g@gmx.at) Received: (qmail 20642 invoked from network); 25 Apr 2007 18:00:29 -0000 Received: from unknown (HELO email.aon.at) ([172.18.5.234]) (envelope-sender ) by fallback02.highway.telekom.at (qmail-ldap-1.03) with SMTP for ; 25 Apr 2007 18:00:29 -0000 Received: (qmail 3722 invoked from network); 25 Apr 2007 18:00:27 -0000 Received: from m3639p010.adsl.highway.telekom.at (HELO bones) ([88.117.102.202]) (envelope-sender ) by smarthub79.highway.telekom.at (qmail-ldap-1.03) with SMTP for ; 25 Apr 2007 18:00:27 -0000 From: Christian Gusenbauer To: josh.carroll@gmail.com Date: Wed, 25 Apr 2007 20:01:36 +0200 User-Agent: KMail/1.9.6 References: <8cb6106e0703261318o120c620ar6b2461802632fc01@mail.gmail.com> <8cb6106e0704241845r737dca05p50fc967a61d66677@mail.gmail.com> <8cb6106e0704242119h4a09d7d4v667d64071b3bd053@mail.gmail.com> In-Reply-To: <8cb6106e0704242119h4a09d7d4v667d64071b3bd053@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200704252001.37696.c47g@gmx.at> Cc: freebsd-scsi@freebsd.org, bug-followup@freebsd.org, Thomas Quinot Subject: Re: kern/103602: drive gets wedged on READ CD CAPACITY if no disc is in X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2007 18:27:10 -0000 Hi Josh! Thanks for your patch. But unfortunately, my problem is a little bit different to yours. I get the errors when accessing the ATA drive using /dev/acd0. My problem doesn't seem to be ATAPI-CAM related. So, I'm glad that obviously Thomas' last patch solved your problem, but I' afraid, it is not the solution for my problem :-(. Ciao, Christian. On Wednesday, 25. April 2007, Josh Carroll wrote: > I used the following patch (attached) against a RELENG_6_2 src tree, > and it's working brilliantly. No problems to speak of. I can boot with > atapicam in the kernel without a disk in the drive and there were no > hangs at all. > > The sg_readcap command still gives (immediately): > > READ CAPACITY (10) failed, device not ready > > I was able to burn a DVD-R with growisofs and blank and burn a CD-RW > with cdrecord. So all seems well, though I'll continue to keep an eye > on it. > > I'm not sure which patches need to be committed, etc. But I wanted to > include the cumulative patch against the 6.2-R src in case it helps > you decide which code to commit to -CURRENT/etc. > > Christian - can you give the attached patch a shot if you've got a > 6.2-R kernel/install handy on your P5B-E? > > Thanks for all your help Thomas! > Josh From owner-freebsd-scsi@FreeBSD.ORG Wed Apr 25 21:09:24 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E65A316A401; Wed, 25 Apr 2007 21:09:24 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 7FAC413C483; Wed, 25 Apr 2007 21:09:24 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id l3PL9KPS016197; Wed, 25 Apr 2007 15:09:21 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <462FC366.6060105@samsco.org> Date: Wed, 25 Apr 2007 15:08:54 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1 MIME-Version: 1.0 To: Christian Gusenbauer References: <8cb6106e0703261318o120c620ar6b2461802632fc01@mail.gmail.com> <8cb6106e0704241845r737dca05p50fc967a61d66677@mail.gmail.com> <8cb6106e0704242119h4a09d7d4v667d64071b3bd053@mail.gmail.com> <200704252001.37696.c47g@gmx.at> In-Reply-To: <200704252001.37696.c47g@gmx.at> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Wed, 25 Apr 2007 15:09:21 -0600 (MDT) X-Spam-Status: No, score=-1.4 required=5.5 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: josh.carroll@gmail.com, freebsd-scsi@freebsd.org, bug-followup@freebsd.org, Thomas Quinot Subject: Re: kern/103602: drive gets wedged on READ CD CAPACITY if no disc is in X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2007 21:09:25 -0000 Are you talking about an ATA disk drive or a SATA CDROM drive? Scott Christian Gusenbauer wrote: > Hi Josh! > > Thanks for your patch. But unfortunately, my problem is a little bit different > to yours. I get the errors when accessing the ATA drive using /dev/acd0. My > problem doesn't seem to be ATAPI-CAM related. > > So, I'm glad that obviously Thomas' last patch solved your problem, but I' > afraid, it is not the solution for my problem :-(. > > Ciao, > Christian. > > On Wednesday, 25. April 2007, Josh Carroll wrote: >> I used the following patch (attached) against a RELENG_6_2 src tree, >> and it's working brilliantly. No problems to speak of. I can boot with >> atapicam in the kernel without a disk in the drive and there were no >> hangs at all. >> >> The sg_readcap command still gives (immediately): >> >> READ CAPACITY (10) failed, device not ready >> >> I was able to burn a DVD-R with growisofs and blank and burn a CD-RW >> with cdrecord. So all seems well, though I'll continue to keep an eye >> on it. >> >> I'm not sure which patches need to be committed, etc. But I wanted to >> include the cumulative patch against the 6.2-R src in case it helps >> you decide which code to commit to -CURRENT/etc. >> >> Christian - can you give the attached patch a shot if you've got a >> 6.2-R kernel/install handy on your P5B-E? >> >> Thanks for all your help Thomas! >> Josh > > From owner-freebsd-scsi@FreeBSD.ORG Thu Apr 26 05:35:53 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 09F1316A401 for ; Thu, 26 Apr 2007 05:35:53 +0000 (UTC) (envelope-from c47g@gmx.at) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 66EC813C45D for ; Thu, 26 Apr 2007 05:35:52 +0000 (UTC) (envelope-from c47g@gmx.at) Received: (qmail 16164 invoked by uid 0); 26 Apr 2007 05:09:11 -0000 Received: from 212.183.10.52 by www007.gmx.net with HTTP; Thu, 26 Apr 2007 07:09:11 +0200 (CEST) Content-Type: text/plain; charset="us-ascii" Date: Thu, 26 Apr 2007 07:09:11 +0200 From: "Christian Gusenbauer" In-Reply-To: <462FC366.6060105@samsco.org> Message-ID: <20070426050911.267460@gmx.net> MIME-Version: 1.0 References: <8cb6106e0703261318o120c620ar6b2461802632fc01@mail.gmail.com> <8cb6106e0704241845r737dca05p50fc967a61d66677@mail.gmail.com> <8cb6106e0704242119h4a09d7d4v667d64071b3bd053@mail.gmail.com> <200704252001.37696.c47g@gmx.at> <462FC366.6060105@samsco.org> To: Scott Long X-Authenticated: #9978462 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Priority: 3 X-Provags-ID: V01U2FsdGVkX1/dxFQmgkndjNwwPms04hUPzUHMOT8bGQ8kC5hmq1 SDahXXkjpTC3GKueXTCM7fP9En4S676EEdAw== Content-Transfer-Encoding: 7bit X-GMX-UID: oFZCZh4JeSEqRz8h83QhCzR+IGRvb8AM Cc: josh.carroll@gmail.com, freebsd-scsi@freebsd.org, bug-followup@freebsd.org, thomas@freebsd.org Subject: Re: kern/103602: drive gets wedged on READ CD CAPACITY if no disc is in X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2007 05:35:53 -0000 Hi Scott! I'm talking about an ATA DVD writer. Ciao, Christian. -------- Original-Nachricht -------- Datum: Wed, 25 Apr 2007 15:08:54 -0600 Von: Scott Long An: Christian Gusenbauer CC: josh.carroll@gmail.com, Thomas Quinot , freebsd-scsi@freebsd.org, bug-followup@freebsd.org Betreff: Re: kern/103602: drive gets wedged on READ CD CAPACITY if no disc is in > Are you talking about an ATA disk drive or a SATA CDROM drive? > > Scott > > > Christian Gusenbauer wrote: > > Hi Josh! > > > > Thanks for your patch. But unfortunately, my problem is a little bit > different > > to yours. I get the errors when accessing the ATA drive using /dev/acd0. > My > > problem doesn't seem to be ATAPI-CAM related. > > > > So, I'm glad that obviously Thomas' last patch solved your problem, but > I' > > afraid, it is not the solution for my problem :-(. > > > > Ciao, > > Christian. > > > > On Wednesday, 25. April 2007, Josh Carroll wrote: > >> I used the following patch (attached) against a RELENG_6_2 src tree, > >> and it's working brilliantly. No problems to speak of. I can boot with > >> atapicam in the kernel without a disk in the drive and there were no > >> hangs at all. > >> > >> The sg_readcap command still gives (immediately): > >> > >> READ CAPACITY (10) failed, device not ready > >> > >> I was able to burn a DVD-R with growisofs and blank and burn a CD-RW > >> with cdrecord. So all seems well, though I'll continue to keep an eye > >> on it. > >> > >> I'm not sure which patches need to be committed, etc. But I wanted to > >> include the cumulative patch against the 6.2-R src in case it helps > >> you decide which code to commit to -CURRENT/etc. > >> > >> Christian - can you give the attached patch a shot if you've got a > >> 6.2-R kernel/install handy on your P5B-E? > >> > >> Thanks for all your help Thomas! > >> Josh > > > > -- "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail From owner-freebsd-scsi@FreeBSD.ORG Thu Apr 26 05:50:08 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6D47216A40A; Thu, 26 Apr 2007 05:50:08 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 1364013C483; Thu, 26 Apr 2007 05:50:07 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id l3Q5o4KE018135; Wed, 25 Apr 2007 23:50:04 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <46303D71.5050605@samsco.org> Date: Wed, 25 Apr 2007 23:49:37 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1 MIME-Version: 1.0 To: Christian Gusenbauer References: <8cb6106e0703261318o120c620ar6b2461802632fc01@mail.gmail.com> <8cb6106e0704241845r737dca05p50fc967a61d66677@mail.gmail.com> <8cb6106e0704242119h4a09d7d4v667d64071b3bd053@mail.gmail.com> <200704252001.37696.c47g@gmx.at> <462FC366.6060105@samsco.org> <20070426050911.267460@gmx.net> In-Reply-To: <20070426050911.267460@gmx.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Wed, 25 Apr 2007 23:50:04 -0600 (MDT) X-Spam-Status: No, score=-1.4 required=5.5 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: josh.carroll@gmail.com, freebsd-scsi@freebsd.org, bug-followup@freebsd.org, thomas@freebsd.org Subject: Re: kern/103602: drive gets wedged on READ CD CAPACITY if no disc is in X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2007 05:50:08 -0000 IDE, not SATA, right? Just so we have the terms straight, let me explain: IDE = 40/80 pin ribbon cable, connects motherboard to disk and CD/DVD drives SATA = 4 pin twisted serial cable. Connects motherboard to disk and CD/DVD drives ATA = Command language spoken by _hard_drives_ that are connected via IDE or SATA ATAPI = Command language, similar to SCSI, that is spoken by CD/DVD drives over IDE and SATA There is no such a thing as an ATA DVD drive, but there are ATAPI DVD drives. The interesting question is whether yours is IDE or SATA. Scott Christian Gusenbauer wrote: > Hi Scott! > > I'm talking about an ATA DVD writer. > > Ciao, > Christian. > > -------- Original-Nachricht -------- > Datum: Wed, 25 Apr 2007 15:08:54 -0600 > Von: Scott Long > An: Christian Gusenbauer > CC: josh.carroll@gmail.com, Thomas Quinot , freebsd-scsi@freebsd.org, bug-followup@freebsd.org > Betreff: Re: kern/103602: drive gets wedged on READ CD CAPACITY if no disc is in > >> Are you talking about an ATA disk drive or a SATA CDROM drive? >> >> Scott >> >> >> Christian Gusenbauer wrote: >>> Hi Josh! >>> >>> Thanks for your patch. But unfortunately, my problem is a little bit >> different >>> to yours. I get the errors when accessing the ATA drive using /dev/acd0. >> My >>> problem doesn't seem to be ATAPI-CAM related. >>> >>> So, I'm glad that obviously Thomas' last patch solved your problem, but >> I' >>> afraid, it is not the solution for my problem :-(. >>> >>> Ciao, >>> Christian. >>> >>> On Wednesday, 25. April 2007, Josh Carroll wrote: >>>> I used the following patch (attached) against a RELENG_6_2 src tree, >>>> and it's working brilliantly. No problems to speak of. I can boot with >>>> atapicam in the kernel without a disk in the drive and there were no >>>> hangs at all. >>>> >>>> The sg_readcap command still gives (immediately): >>>> >>>> READ CAPACITY (10) failed, device not ready >>>> >>>> I was able to burn a DVD-R with growisofs and blank and burn a CD-RW >>>> with cdrecord. So all seems well, though I'll continue to keep an eye >>>> on it. >>>> >>>> I'm not sure which patches need to be committed, etc. But I wanted to >>>> include the cumulative patch against the 6.2-R src in case it helps >>>> you decide which code to commit to -CURRENT/etc. >>>> >>>> Christian - can you give the attached patch a shot if you've got a >>>> 6.2-R kernel/install handy on your P5B-E? >>>> >>>> Thanks for all your help Thomas! >>>> Josh >>> > From owner-freebsd-scsi@FreeBSD.ORG Thu Apr 26 06:31:04 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9B4DE16A40B for ; Thu, 26 Apr 2007 06:31:04 +0000 (UTC) (envelope-from chrisg1331@gmx.at) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id D51BA13C465 for ; Thu, 26 Apr 2007 06:31:03 +0000 (UTC) (envelope-from chrisg1331@gmx.at) Received: (qmail 21800 invoked by uid 0); 26 Apr 2007 06:04:20 -0000 Received: from 212.183.10.52 by www047.gmx.net with HTTP; Thu, 26 Apr 2007 08:04:20 +0200 (CEST) Content-Type: text/plain; charset="us-ascii" Date: Thu, 26 Apr 2007 08:04:20 +0200 From: "Christian Gusenbauer" In-Reply-To: <46303D71.5050605@samsco.org> Message-ID: <20070426060420.66700@gmx.net> MIME-Version: 1.0 References: <8cb6106e0703261318o120c620ar6b2461802632fc01@mail.gmail.com> <8cb6106e0704241845r737dca05p50fc967a61d66677@mail.gmail.com> <8cb6106e0704242119h4a09d7d4v667d64071b3bd053@mail.gmail.com> <200704252001.37696.c47g@gmx.at> <462FC366.6060105@samsco.org> <20070426050911.267460@gmx.net> <46303D71.5050605@samsco.org> To: Scott Long X-Authenticated: #9978462 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Priority: 3 X-Provags-ID: V01U2FsdGVkX18d3pMqE3kdZjjivwezZY+dLqC2yCIy9J6Wniwlds S9egsE1D4GcZeLCby2JrMeGq5nVkSw7z4iBQ== Content-Transfer-Encoding: 7bit X-GMX-UID: 3XgGD0ZdQEV/FGl08XVpURpCNzg2NUJ8 Cc: josh.carroll@gmail.com, freebsd-scsi@freebsd.org, bug-followup@freebsd.org, thomas@freebsd.org Subject: Re: kern/103602: drive gets wedged on READ CD CAPACITY if no disc is in X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2007 06:31:04 -0000 Hi Scott! Ahh, I see. Sorry for the confusion. OK, then it's an IDE one. Ciao, Christian. -------- Original-Nachricht -------- Datum: Wed, 25 Apr 2007 23:49:37 -0600 Von: Scott Long An: Christian Gusenbauer CC: bug-followup@freebsd.org, freebsd-scsi@freebsd.org, thomas@freebsd.org, josh.carroll@gmail.com Betreff: Re: kern/103602: drive gets wedged on READ CD CAPACITY if no disc is in > IDE, not SATA, right? Just so we have the terms straight, let me explain: > > IDE = 40/80 pin ribbon cable, connects motherboard to disk and CD/DVD > drives > > SATA = 4 pin twisted serial cable. Connects motherboard to disk and > CD/DVD drives > > ATA = Command language spoken by _hard_drives_ that are connected via > IDE or SATA > > ATAPI = Command language, similar to SCSI, that is spoken by CD/DVD > drives over IDE and SATA > > There is no such a thing as an ATA DVD drive, but there are ATAPI DVD > drives. The interesting question is whether yours is IDE or SATA. > > Scott > > Christian Gusenbauer wrote: > > Hi Scott! > > > > I'm talking about an ATA DVD writer. > > > > Ciao, > > Christian. > > > > -------- Original-Nachricht -------- > > Datum: Wed, 25 Apr 2007 15:08:54 -0600 > > Von: Scott Long > > An: Christian Gusenbauer > > CC: josh.carroll@gmail.com, Thomas Quinot , > freebsd-scsi@freebsd.org, bug-followup@freebsd.org > > Betreff: Re: kern/103602: drive gets wedged on READ CD CAPACITY if no > disc is in > > > >> Are you talking about an ATA disk drive or a SATA CDROM drive? > >> > >> Scott > >> > >> > >> Christian Gusenbauer wrote: > >>> Hi Josh! > >>> > >>> Thanks for your patch. But unfortunately, my problem is a little bit > >> different > >>> to yours. I get the errors when accessing the ATA drive using > /dev/acd0. > >> My > >>> problem doesn't seem to be ATAPI-CAM related. > >>> > >>> So, I'm glad that obviously Thomas' last patch solved your problem, > but > >> I' > >>> afraid, it is not the solution for my problem :-(. > >>> > >>> Ciao, > >>> Christian. > >>> > >>> On Wednesday, 25. April 2007, Josh Carroll wrote: > >>>> I used the following patch (attached) against a RELENG_6_2 src tree, > >>>> and it's working brilliantly. No problems to speak of. I can boot > with > >>>> atapicam in the kernel without a disk in the drive and there were no > >>>> hangs at all. > >>>> > >>>> The sg_readcap command still gives (immediately): > >>>> > >>>> READ CAPACITY (10) failed, device not ready > >>>> > >>>> I was able to burn a DVD-R with growisofs and blank and burn a CD-RW > >>>> with cdrecord. So all seems well, though I'll continue to keep an eye > >>>> on it. > >>>> > >>>> I'm not sure which patches need to be committed, etc. But I wanted to > >>>> include the cumulative patch against the 6.2-R src in case it helps > >>>> you decide which code to commit to -CURRENT/etc. > >>>> > >>>> Christian - can you give the attached patch a shot if you've got a > >>>> 6.2-R kernel/install handy on your P5B-E? > >>>> > >>>> Thanks for all your help Thomas! > >>>> Josh > >>> > > -- "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail