Date: Mon, 22 Apr 2019 00:11:53 +1000 (EST) From: Bruce Evans <brde@optusnet.com.au> To: cab902@yahoo.com Cc: bugs@freebsd.org Subject: Re: [Bug 202712] [cam] [ata] System doesn't recognize older hdd after boot Message-ID: <20190421234658.Y4866@besplex.bde.org> In-Reply-To: <bug-202712-227-IkoweLG2Rj@https.bugs.freebsd.org/bugzilla/> References: <bug-202712-227@https.bugs.freebsd.org/bugzilla/> <bug-202712-227-IkoweLG2Rj@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 21 Apr 2019 a bug that doesn't want replies@freebsd.org wrote: > Created attachment 203861 > --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=203861&action=edit > dmesg log with 8.4 livefs disk > > I've booted the FreeBSD 8.4 livefs disk. > > Disk is correctly configured: > ad3: FAILURE - SETFEATURES SET TRANSFER MODE status=51<READY,DSC,ERROR> > error=4<ABORTED> > ad3: 405MB <WDC AC2420F 06.16K25> at ata1-slave WDMA1 > > I've succesfuly mounted the partition: > Filesystem 1K-blocks Used Avail Capacity Mounted on > /dev/md0 4175 3169 1006 76% / > devfs 1 1 0 100% /dev > /dev/acd0 276142 276142 0 100% /dist > /dev/ad3s1d 402150 367694 2284 99% /mnt > > I've succesfuly read all the files on the partition: > find /mnt -type f -exec cat '{}' > /dev/zero ';' > > There was no READ_DMA errors, nor errors of any kind. Any drive as small as that might only support CHS addressing. I have one of a similar size that was new in ~1993. It worked for about 20 years until it was broken in 2013 by dropping support for CHS addressing in r249083. The support was under ATA_CAM, and the main point of r249083 was to remove support for ATA_CAM. FreeBSD-9 still has this support, but FreeBSD-10 doesn't. -current still defines the flag ATA_D_USE_CHS for using this support, but never uses it. The error messages from not detecting the non-support for LBA addressing might be cryptic. I don't have the old system with this drive online for testing. My mail in 2015 to report this gives some boot messages: 2015> On a 15 year old system with 15+ year old drive and a 20+ year old drive, 2015> the 15+ year old drive still works, but the 20+ year old drive fails: 2015> 2015> X atapci0: <Intel PIIX4 UDMA33 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf000-0xf00f at device 7.1 on pci0 2015> X ata0: <ATA channel> at channel 0 on atapci0 2015> X ata1: <ATA channel> at channel 1 on atapci0 2015> X uhub0: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0 2015> X ada0 at ata1 bus 0 scbus1 target 0 lun 0 2015> X ada0: <SAMSUNG SHD-3212A (APOLLO-4) AD AW101S> ATA-0 device 2015> X ada0: Serial Number 462412383105 2015> X ada0: 4.200MB/s transfers (WDMA0, PIO 8192bytes) 2015> X ada0: 407MB (833664 512 byte sectors: 16H 52S/T 1002C) 2015> 2015> This drive fails. It is still identified. I found my old patches which 2015> say that WDMA0 mode doesn't work for writing. It works for reading. 2015> Apparently the probe detects more errors now, but it shouldn't do any 2015> writing. 2015> 2015> The newest kernel that I have on which the drive seems works correctly 2015> is FreeBSD-8. But I had forgotten the details, and only did read-only 2015> tests of this today. 2015> 2015> In some versions of FreeBSD, I changed the mode from WDMA0 to PIO4 in 2015> /etc/rc.early. I stopped doing this because I have a better local fix 2015> (in the patches) and this system is only used for testing and it 2015> atacontrol's binary compatibility keeps breaking (I use mostly FreeBSD-5 2015> utilities with kernels between FreeBSD-4 and -current). 2015> 2015> X ada0: Previously was known as ad2 2015> X ada1 at ata0 bus 0 scbus2 target 0 lun 0 2015> X ada1: <QUANTUM FIREBALL ST6.4A A0F.0800> ATA-3 device 2015> X ada1: Serial Number 156726945059 2015> X ada1: 33.300MB/s transfers (UDMA2, PIO 8192bytes) 2015> X ada1: 6149MB (12594960 512 byte sectors: 15H 63S/T 13328C) 2015> X ada1: Previously was known as ad0 2015> X 2015> X (ada0:ata1:0:0:0): READ_DMA. ACB: c8 00 00 00 00 40 00 00 00 00 01 00 2015> X (ada0:ata1:0:0:0): CAM status: ATA Status Error 2015> X (ada0:ata1:0:0:0): ATA status: 59 (DRDY SERV DRQ ERR), error: 04 (ABRT ) 2015> X (ada0:ata1:0:0:0): RES: 59 04 00 00 00 00 00 00 00 01 00 2015> X (ada0:ata1:0:0:0): Retrying command 2015> X (ada0:ata1:0:0:0): READ_DMA. ACB: c8 00 00 00 00 40 00 00 00 00 01 00 2015> X (ada0:ata1:0:0:0): CAM status: ATA Status Error 2015> X (ada0:ata1:0:0:0): ATA status: 59 (DRDY SERV DRQ ERR), error: 04 (ABRT ) 2015> X (ada0:ata1:0:0:0): RES: 59 04 00 00 00 00 00 00 00 01 00 2015> X (ada0:ata1:0:0:0): Retrying command 2015> X (ada0:ata1:0:0:0): READ_DMA. ACB: c8 00 00 00 00 40 00 00 00 00 01 00 2015> X (ada0:ata1:0:0:0): CAM status: ATA Status Error 2015> X (ada0:ata1:0:0:0): ATA status: 59 (DRDY SERV DRQ ERR), error: 04 (ABRT ) 2015> X (ada0:ata1:0:0:0): RES: 59 04 00 00 00 00 00 00 00 01 00 2015> X (ada0:ata1:0:0:0): Retrying command 2015> X (ada0:ata1:0:0:0): READ_DMA. ACB: c8 00 00 00 00 40 00 00 00 00 01 00 2015> X (ada0:ata1:0:0:0): CAM status: ATA Status Error 2015> X (ada0:ata1:0:0:0): ATA status: 59 (DRDY SERV DRQ ERR), error: 04 (ABRT ) 2015> X (ada0:ata1:0:0:0): RES: 59 04 00 00 00 00 00 00 00 01 00 2015> X (ada0:ata1:0:0:0): Retrying command 2015> X (ada0:ata1:0:0:0): READ_DMA. ACB: c8 00 00 00 00 40 00 00 00 00 01 00 2015> X (ada0:ata1:0:0:0): CAM status: ATA Status Error 2015> X (ada0:ata1:0:0:0): ATA status: 59 (DRDY SERV DRQ ERR), error: 04 (ABRT ) 2015> X (ada0:ata1:0:0:0): RES: 59 04 00 00 00 00 00 00 00 01 00 2015> X (ada0:ata1:0:0:0): Error 5, Retries exhausted 2015> X (ada0:ata1:0:0:0): READ_DMA. ACB: c8 00 00 00 00 40 00 00 00 00 01 00 2015> X (ada0:ata1:0:0:0): CAM status: ATA Status Error 2015> X (ada0:ata1:0:0:0): ATA status: 59 (DRDY SERV DRQ ERR), error: 04 (ABRT ) 2015> X (ada0:ata1:0:0:0): RES: 59 04 00 00 00 00 00 00 00 01 00 2015> X (ada0:ata1:0:0:0): Retrying command 2015> X (ada0:ata1:0:0:0): READ_DMA. ACB: c8 00 00 00 00 40 00 00 00 00 01 00 2015> X (ada0:ata1:0:0:0): CAM status: ATA Status Error 2015> X (ada0:ata1:0:0:0): ATA status: 59 (DRDY SERV DRQ ERR), error: 04 (ABRT ) 2015> X (ada0:ata1:0:0:0): RES: 59 04 00 00 00 00 00 00 00 01 00 2015> X (ada0:ata1:0:0:0): Retrying command 2015> X (ada0:ata1:0:0:0): READ_DMA. ACB: c8 00 00 00 00 40 00 00 00 00 01 00 2015> X (ada0:ata1:0:0:0): CAM status: ATA Status Error 2015> X (ada0:ata1:0:0:0): ATA status: 59 (DRDY SERV DRQ ERR), error: 04 (ABRT ) 2015> X (ada0:ata1:0:0:0): RES: 59 04 00 00 00 00 00 00 00 01 00 2015> X (ada0:ata1:0:0:0): Retrying command 2015> X (ada0:ata1:0:0:0): READ_DMA. ACB: c8 00 00 00 00 40 00 00 00 00 01 00 2015> X (ada0:ata1:0:0:0): CAM status: ATA Status Error 2015> X (ada0:ata1:0:0:0): ATA status: 59 (DRDY SERV DRQ ERR), error: 04 (ABRT ) 2015> X (ada0:ata1:0:0:0): RES: 59 04 00 00 00 00 00 00 00 01 00 2015> X (ada0:ata1:0:0:0): Retrying command 2015> X (ada0:ata1:0:0:0): READ_DMA. ACB: c8 00 00 00 00 40 00 00 00 00 01 00 2015> X (ada0:ata1:0:0:0): CAM status: ATA Status Error 2015> X (ada0:ata1:0:0:0): ATA status: 59 (DRDY SERV DRQ ERR), error: 04 (ABRT ) 2015> X (ada0:ata1:0:0:0): RES: 59 04 00 00 00 00 00 00 00 01 00 2015> X (ada0:ata1:0:0:0): Error 5, Retries exhausted Lots of retries, but it times out. If the DMA worked, that would be worse since it is for a wrong sector. 2015> 2015> It does look like just a mode error. 2015> 2015> This is before mountroot. FreeBSD-10 only fails later in fsck -p 2015> (where it opens the device r/w but shouldn't write anything), and 2015> doesn't print anything in the kernel. Perhaps because it wasn't 2015> attached to cam then? Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190421234658.Y4866>