From owner-freebsd-stable@FreeBSD.ORG Thu Apr 18 11:53:21 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6D48EDD6; Thu, 18 Apr 2013 11:53:21 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-ea0-x22b.google.com (mail-ea0-x22b.google.com [IPv6:2a00:1450:4013:c01::22b]) by mx1.freebsd.org (Postfix) with ESMTP id D5BBB79D; Thu, 18 Apr 2013 11:53:20 +0000 (UTC) Received: by mail-ea0-f171.google.com with SMTP id b15so1192058eae.30 for ; Thu, 18 Apr 2013 04:53:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=kL57ETNIujzLMAuDPLiVdwzx+3/wnUJJQhcsCLW4Bpk=; b=RlJv97dkauOi+y3FHeR4hwnUIKsUSUd4RXP7ejLvrCUGg5GEdhUgXkrShmMul3nTUL qUFUrsoGosKwgXA7StwIJTiZwq8LK8BCvQqZHAgTznPtVhNTeacV2ln2QrDwhe+me2sf qzufBytobsCaBlz/KfMzsz0ZFqIazwtUU5fo4SeTLkuMiOxaU+QIku48lCPwzsOrj/sq W9u34fQKV/0jrFZebjE3L/6jOi2Gzdgh0PvMo5QLtAgmuSnWnzvcbbyHJN8e0OLShT23 QuERivEFrA2CqK5qUxsTAcsxoon3o/bnxZ+z1HBAwI5nfDbIcNEXP/Cj35iqEHJVu0Tp 8Ivw== X-Received: by 10.14.39.5 with SMTP id c5mr29619501eeb.27.1366285998973; Thu, 18 Apr 2013 04:53:18 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPS id cb50sm15238847eeb.14.2013.04.18.04.53.16 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 18 Apr 2013 04:53:17 -0700 (PDT) Sender: Alexander Motin Message-ID: <516FDEAA.4040207@FreeBSD.org> Date: Thu, 18 Apr 2013 14:53:14 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130413 Thunderbird/17.0.5 MIME-Version: 1.0 To: Andre Albsmeier Subject: Re: Lost CDROM on 9.1 with ATA_CAM on Promise controller References: <20130416175520.GA9548@bali> <20130416193822.GA83620@icarus.home.lan> <20130417062600.GA15613@bali> <20130417085354.GA98850@icarus.home.lan> <20130417094712.GA16791@bali> In-Reply-To: <20130417094712.GA16791@bali> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Jeremy Chadwick , Kenneth Merry , "freebsd-stable@freebsd.org" X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2013 11:53:21 -0000 On 17.04.2013 12:47, Andre Albsmeier wrote: > On Wed, 17-Apr-2013 at 10:53:54 +0200, Jeremy Chadwick wrote: >> On Wed, Apr 17, 2013 at 08:26:00AM +0200, Andre Albsmeier wrote: >>> On Tue, 16-Apr-2013 at 21:38:22 +0200, Jeremy Chadwick wrote: >>>> On Tue, Apr 16, 2013 at 07:55:20PM +0200, Andre Albsmeier wrote: >>>>> I have lost one of my CDROM drives (HL-DT-STDVD-RAM GH22LP20/2.00) >>>>> after going from 7.4 to 9.1 when using ATA_CAM. It is attached to >>>>> a Promise PDC20268 UDMA100 controller. A standard harddisk drive >>>>> attached to this controller works well. Cables, controller and drive >>>>> where replaced already. >>>>> >>>>> Kernel gives me: >>>>> >>>>> atapci1: port 0xb000-0xb007,0xa800-0xa803,0xa400-0xa407,0xa000-0xa003,0x9800-0x980f mem 0xdf800000-0xdf803fff irq 11 at device 12.0 on pci0 >>>>> ata2: at channel 0 on atapci1 >>>>> ata3: at channel 1 on atapci1 >>>>> ... >>>>> ada0 at ata2 bus 0 scbus2 target 0 lun 0 >>>>> ada0: ATA-7 device >>>>> ada0: 100.000MB/s transfers (UDMA5, PIO 8192bytes) >>>>> ada0: 286188MB (586114704 512 byte sectors: 16H 63S/T 16383C) >>>>> ... >>>>> (cd2:ata3:0:0:0): got CAM status 0x50 >>>>> (cd2:ata3:0:0:0): fatal error, failed to attach to device >>>>> (cd2:ata3:0:0:0): lost device, 4 refs >>>>> (cd2:ata3:0:0:0): removing device entry >>>>> ... >>>>> >>>>> Attaching the CDROM drive to the controller that is integrated on >>>>> the mainboard (Intel PIIX4 UDMA33 controller) does not show this >>>>> problem (but here I don't have UDMA66). >>>>> >>>>> It also works when not using ATA_CAM: >>>>> >>>>> ... >>>>> acd0: DVDR at ata3-master UDMA66 >>>>> ... >>>>> >>>>> So this semes to be a problem with the Promise controller and ATA_CAM. >>>>> >>>>> Any ideas? Or should I file PR? >>>> >>>> The controller in question is a Promise Ultra100 TX2. >>> >>> Right. Tried with an Ultra133, same effect. >>> >>>> >>>> The error message comes from sys/cam/scsi/scsi_cd.c, in function >>>> cddone(). The logic is a little hard for me to follow (I understand >>>> about 70% of it). Look at lines 1724 to 1877 for stable/9. >>>> >>>> 1. Can you provide full output from a verbose boot when the CD/DVD drive >>>> is attached to the Promise controller? >>> >>> Attached below. I have just filtered out some ahc cruft... >>> >>> Later I will try to boot a -current kernel -- just to see >>> how this behaves... >>> >>>> >>>> 2. What firmware version the card is using? The PDC20268 had many, many >>>> firmware problems relating to ATAPI devices. >>> >>> It is the latest BIOS: 2.20.0.15. >>> >>>> >>>> 3. I wouldn't worry about ATA66 vs. ATA33; this drive can only support >>>> up to about 22MBytes/second so ATA66 isn't going to get you anything, >>>> so as a workaround, using the PIIX4 for it would not hurt you. >>> >>> Probably. But I already had cdrecord complain when it >>> came to the funky DMA speed test it is doing. It went >>> away when using the UDMA66 port. And on the other hand >>> I sometimes use the PIIX4 port for other stuff and I >>> do not want to attach the cdrom to the slave port. >>> >>>> >>>> 4. ONLY if this turns out to be a "controller thing": I'm not sure how >>>> much effort should be spent trying to make this work, as the PDC20268 is >>>> legacy/deprecated hardware (made/released 13 years ago). >>> >>> The whole box is more than 13 years old (good old Asus BX board) ;-) >>> >>> But since it worked in 7.4-STABLE I feel that this is some kind >>> of regression. I do not want to waste anyone's resources in fixing >>> it -- just if someone is curious and/or has an idea how to fix >>> it... >>> >>> And here is the dmesg: >>> >>> {snipping for mail brevity} >> >> Thanks. CC'd ken@ and mav@ for advice on this. Here's the dmesg: >> >> http://lists.freebsd.org/pipermail/freebsd-stable/2013-April/073131.html >> >> Short details: >> >> The device under scrutiny here is cd2 on ata3, which is an ATAPI >> IDE-based optical drive. The drive works when either: >> >> a) Connected to a different IDE controller (atapci0), or, >> b) When ATA_CAM is removed (i.e. use ata(4) exclusively). > > And just as a note: The -current kernel from > > https://snapshots.glenbarber.us/Latest/FreeBSD-10.0-CURRENT-i386-20130316-r248381-bootonly.iso > > shows the same problem... Some of Promise controllers are known to have problems with ATAPI DMA. Have you tried to disable DMA on that channel or device with loader tunable like like hint.ata.3.mode=PIO4 ? -- Alexander Motin