From owner-freebsd-current@freebsd.org Tue May 24 05:04:31 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58282B47FE4 for ; Tue, 24 May 2016 05:04:31 +0000 (UTC) (envelope-from oleg@opentransfer.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 3CC2D1675 for ; Tue, 24 May 2016 05:04:31 +0000 (UTC) (envelope-from oleg@opentransfer.com) Received: by mailman.ysv.freebsd.org (Postfix) id 3877CB47FE3; Tue, 24 May 2016 05:04:31 +0000 (UTC) Delivered-To: current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 381A5B47FE1 for ; Tue, 24 May 2016 05:04:31 +0000 (UTC) (envelope-from oleg@opentransfer.com) Received: from oleg.opentransfer.com (oleg.opentransfer.com [91.217.144.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "oleg-10.opentransfer.com", Issuer "oleg-10.opentransfer.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A97391673; Tue, 24 May 2016 05:04:30 +0000 (UTC) (envelope-from oleg@opentransfer.com) Received: from asus.theweb.org.ua ([10.0.8.4]) by oleg.opentransfer.com (8.15.2/8.15.2) with ESMTPS id u4O58kDG062984 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 24 May 2016 08:08:48 +0300 (EEST) (envelope-from oleg@opentransfer.com) Received: from asus.theweb.org.ua (localhost [127.0.0.1]) by asus.theweb.org.ua (8.15.2/8.15.2) with ESMTPS id u4O54MWb065844 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 24 May 2016 08:04:22 +0300 (EEST) (envelope-from oleg@opentransfer.com) Received: (from oleg@localhost) by asus.theweb.org.ua (8.15.2/8.15.2/Submit) id u4O54LXv065843; Tue, 24 May 2016 08:04:21 +0300 (EEST) (envelope-from oleg@opentransfer.com) X-Authentication-Warning: asus.theweb.org.ua: oleg set sender to oleg@opentransfer.com using -f From: "Oleg V. Nauman" To: "Kenneth D. Merry" Cc: current@freebsd.org Subject: Re: ATA? related trouble with r300299 Date: Tue, 24 May 2016 08:04:21 +0300 Message-ID: <1679722.baB5vE8cei@asus.theweb.org.ua> Organization: Ecommerce LLC User-Agent: KMail/4.14.3 (FreeBSD/11.0-CURRENT; KDE/4.14.3; amd64; ; ) In-Reply-To: <20160523230816.GA54355@mithlond.kdm.org> References: <16296020.R5v2TQkD2c@asus.theweb.org.ua> <1867408.u01hNEiJM1@asus.theweb.org.ua> <20160523230816.GA54355@mithlond.kdm.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 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: Tue, 24 May 2016 05:04:31 -0000 On Monday 23 May 2016 19:08:16 Kenneth D. Merry wrote: > On Tue, May 24, 2016 at 00:59:34 +0300, Oleg V. Nauman wrote: > > On Monday 23 May 2016 17:30:45 you wrote: > > > On Tue, May 24, 2016 at 00:15:25 +0300, Oleg V. Nauman wrote: > > > > On Monday 23 May 2016 17:11:34 Kenneth D. Merry wrote: > > > > > On Tue, May 24, 2016 at 00:05:49 +0300, Oleg V. Nauman wrote: > > > > > > On Monday 23 May 2016 16:53:55 Kenneth D. Merry wrote: > > > > > > > On Mon, May 23, 2016 at 23:21:32 +0300, Oleg V. Nauman wrote: > > > > > > > > On Monday 23 May 2016 15:25:39 Kenneth D. Merry wrote: > > > > > > > > > On Sat, May 21, 2016 at 09:30:35 +0300, Oleg V. Nauman wrote: > > > > > > > > > > I have faced the issue with fresh CURRENT stopped to boot > > > > > > > > > > on > > > > > > > > > > my > > > > > > > > > > old > > > > > > > > > > desktop > > > > > > > > > > > > > > > > > > > > after update to r300299 > > > > > > > > > > Verbose boot shows the endless cycle of > > > > > > > > > > > > > > > > > > > > ata2: SATA reset: ports status=0x05 > > > > > > > > > > ata2: reset tp1 mask=03 ostat0=50 ostat1=50 > > > > > > > > > > ata2: stat0=0x50 err=0x01 lsb=0x00 msb=0x00 > > > > > > > > > > ata2: stat1=0x50 err=0x01 lsb=0x00 msb=0x00 > > > > > > > > > > ata2: reset tp2 stat0=50 stat1=50 devices=0x3 > > > > > > > > > > messages logged to console. > > > > > > > > > > > > > > > > > > > > Below is the relevant portion of ATA controller/devices > > > > > > > > > > probed/attached > > > > > > > > > > during the boot: > > > > > > > > > > > > > > > > > > > > atapci0: port > > > > > > > > > > 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xffa0-0xffaf at > > > > > > > > > > device > > > > > > > > > > 31.1 > > > > > > > > > > on > > > > > > > > > > pci0 > > > > > > > > > > ata0: at channel 0 on atapci0 > > > > > > > > > > atapci1: port > > > > > > > > > > 0xd080-0xd087, > > > > > > > > > > 0xd000-0xd003, > > > > > > > > > > 0xcc00-0xcc07,0xc880-0xc883,0xc800-0xc80f irq 19 at device > > > > > > > > > > 31.2 on > > > > > > > > > > pci0 > > > > > > > > > > ata2: at channel 0 on atapci1 > > > > > > > > > > ata3: at channel 1 on atapci1 > > > > > > > > > > ada0 at ata2 bus 0 scbus1 target 0 lun 0 > > > > > > > > > > ada0: ATA-7 SATA 2.x device > > > > > > > > > > ada1 at ata2 bus 0 scbus1 target 1 lun 0 > > > > > > > > > > ada1: ATA8-ACS SATA 3.x device > > > > > > > > > > cd0 at ata0 bus 0 scbus0 target 0 lun 0 > > > > > > > > > > cd0: <_NEC DVD_RW ND-3570A 1.11> Removable CD-ROM SCSI > > > > > > > > > > device > > > > > > > > > > > > > > > > > > I'm not entirely sure what is causing the problem with your > > > > > > > > > system, > > > > > > > > > but > > > > > > > > > hopefully we can narrow it down a bit. > > > > > > > > > > > > > > > > > > There is a bug that came in with my SMR changes in revision > > > > > > > > > 300207 > > > > > > > > > that > > > > > > > > > broke the quirk functionality in the ada(4) driver. I don't > > > > > > > > > think > > > > > > > > > that > > > > > > > > > is > > > > > > > > > the problem you're seeing, though. > > > > > > > > > > > > > > > > > > Can you try out this patch: > > > > > > > > > > > > > > > > > > https://people.freebsd.org/~ken/cam_smr_ada_patch.20160523.1 > > > > > > > > > .txt > > > > > > > > > > > > > > > > > > In /boot/loader.conf, put the following: > > > > > > > > > > > > > > > > > > kern.cam.ada.0.quirks="0x04" > > > > > > > > > kern.cam.ada.1.quirks="0x04" > > > > > > > > > > > > > > > > > > If you're able to boot with those quirk entries in the > > > > > > > > > loader.conf, > > > > > > > > > try > > > > > > > > > taking one of them out, and reboot. If that works, try > > > > > > > > > taking > > > > > > > > > the > > > > > > > > > other > > > > > > > > > one out and reboot. > > > > > > > > > > > > > > > > > > What I'm trying to figure out here is where the problem > > > > > > > > > lies: > > > > > > > > > > > > > > > > > > 1. The bug with the ada(4) driver (in where it loaded the > > > > > > > > > quirks). > > > > > > > > > 2. The extra probe steps in the ada(4) driver might be > > > > > > > > > causing a > > > > > > > > > problem > > > > > > > > > > > > > > > > > > with ada0 (Samsung drive). > > > > > > > > > > > > > > > > > > 3. The extra probe steps in the ada(4) driver might be > > > > > > > > > causing a > > > > > > > > > problem > > > > > > > > > > > > > > > > > > with ada1 (Seagate drive). > > > > > > > > > > > > > > > > > > 4. Something else. > > > > > > > > > > > > > > > > > > So, if you can try the patch and try to eliminate a few > > > > > > > > > possibilities, > > > > > > > > > we > > > > > > > > > may be able to narrow it down. > > > > > > > > > > > > > > > > I was able to boot after applying the patch ; > > > > > > > > > > > > > > > > kern.cam.ada.0.quirks="0x04" > > > > > > > > was the quirk in effect. It is quirk for my Samsung HD200HJ > > > > > > > > KF100-06 > > > > > > > > hard > > > > > > > > drive. > > > > > > > > > > > > > > Okay. Just so we can narrow it down a little more, can you try > > > > > > > this: > > > > > > > > > > > > > > First, let's try getting an ATA Log directory using the PIO > > > > > > > version > > > > > > > of > > > > > > > the > > > > > > > command: > > > > > > > > > > > > > > camcontrol cmd ada0 -v -a "2f 0 0 0 0 0 0 0 0 0 1 0" -i 512 - > > > > > > > |hd > > > > > > > > > > > > > > If that works (you should get hexdump output), try the DMA > > > > > > > version > > > > > > > of > > > > > > > the > > > > > > > command: > > > > > > > > > > > > > > camcontrol cmd ada0 -v -d -a "47 0 0 0 0 0 0 0 0 0 1 0" -i 512 - > > > > > > > |hd > > > > > > > > > > > > "Expecting a character pointer argument." error for both commands. > > > > > > > > > > Did the double quotes make it onto the command line? Both of those > > > > > work > > > > > for me... > > > > > > > > Something went wrong from my side, sorry. > > > > > > > > Below is the output of commands: > > > > > > > > root@desktop:~ # camcontrol cmd ada0 -v -a "2f 0 0 0 0 0 0 0 0 0 1 0" > > > > -i > > > > 512 -> > > > > > > > > |hd > > > > > > > > camcontrol: error sending command > > > > (pass1:ata2:0:0:0): READ_LOG_EXT. ACB: 2f 00 00 00 00 00 00 00 00 00 > > > > 01 00 > > > > (pass1:ata2:0:0:0): CAM status: ATA Status Error > > > > (pass1:ata2:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 04 (ABRT ) > > > > (pass1:ata2:0:0:0): RES: 51 04 00 00 00 00 00 00 00 01 00 > > > > root@desktop:~ # camcontrol cmd ada0 -v -d -a "47 0 0 0 0 0 0 0 0 0 1 > > > > 0" > > > > -i > > > > 512 - |hd > > > > camcontrol: error sending command > > > > (pass1:ata2:0:0:0): READ_LOG_DMA_EXT. ACB: 47 00 00 00 00 00 00 00 00 > > > > 00 > > > > 01 00 (pass1:ata2:0:0:0): CAM status: ATA Status Error > > > > (pass1:ata2:0:0:0): ATA status: 51 (DRDY SERV ERR), error: 04 (ABRT ) > > > > (pass1:ata2:0:0:0): RES: 51 04 00 00 00 00 00 00 00 01 00 > > > > > > Okay, at least it consistently fails with both the PIO and DMA versions. > > > Looks like the drive claims to support READ LOG, but doesn't actually > > > support it. > > > > > > Can you revert the previous patch, take the quirk out of loader.conf, > > > and > > > try this patch? > > > > > > https://people.freebsd.org/~ken/cam_smr_ada_patch.20160523.2.txt > > > > > > It adds the model number for your drive into the ada(4) driver as a > > > quirk. > > > > Unfortunately it is not working ; but allows to boot with quirk added > > back to> > > loader.conf > > Okay, try this one. I put a question mark in place of the space, perhaps > that will match it. > > https://people.freebsd.org/~ken/cam_smr_ada_patch.20160523.3.txt Still no luck, but it works with quirk in the loader.conf Below is the drive identification from 'smartctl' output: === START OF INFORMATION SECTION === Model Family: SAMSUNG SpinPoint S250 Device Model: SAMSUNG HD200HJ Serial Number: S16KJ1CQ500218 LU WWN Device Id: 5 0000f0 01b500218 Firmware Version: KF100-06 Thank you > > Thanks, > > Ken