From nobody@FreeBSD.org  Sun Dec 13 22:00:27 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DAAAE1065672
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 13 Dec 2009 22:00:27 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id C9B998FC24
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 13 Dec 2009 22:00:27 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id nBDM0RDY006514
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 13 Dec 2009 22:00:27 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id nBDM0Rg5006513;
	Sun, 13 Dec 2009 22:00:27 GMT
	(envelope-from nobody)
Message-Id: <200912132200.nBDM0Rg5006513@www.freebsd.org>
Date: Sun, 13 Dec 2009 22:00:27 GMT
From: Bernard Steiner <zdbs@lif.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: recent changes to ata subsystem lose support for promise PDC40718 SATA300 controller
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         141438
>Category:       kern
>Synopsis:       [ata] recent changes to ata subsystem lose support for promise PDC40718 SATA300 controller [reression]
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    mav
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 13 22:10:02 UTC 2009
>Closed-Date:    Thu Dec 17 21:52:09 UTC 2009
>Last-Modified:  Thu Dec 17 21:52:09 UTC 2009
>Originator:     Bernard Steiner
>Release:        8-STABLE
>Organization:
>Environment:
FreeBSD grimma.anydomain.de 8.0-STABLE FreeBSD 8.0-STABLE #7: Wed Dec  2 20:37:02 CET 2009     root@grimma.anydomain.de:/usr/obj/usr/src/sys/GRIMMA  amd64
vs
FreeBSD 8.0-STABLE #8: Sat Dec 12 23:00:34 CET 2009
    root@grimma.anydomain.de:/usr/obj/usr/src/sys/GRIMMA amd64

>Description:
I have most of my system sitting in zfs, half of the disks attached to a promise PDC40718 SATA300 controller, as of Dec 2nd attached thus:

atapci2: <Promise PDC40718 SATA300 controller> port 0xec00-0xec7f,0xe800-0xe8ff mem 0xfebff000-0xfebfffff,0xfebc0000-0xfebdffff irq 17 at device 5.0 on pci2
atapci2: [ITHREAD]
atapci2: [ITHREAD]
ata4: <ATA channel 0> on atapci2
ata4: SIGNATURE: 00000101
ata4: [ITHREAD]
ata5: <ATA channel 1> on atapci2
ata5: SIGNATURE: 00000101
ata5: [ITHREAD]
ata6: <ATA channel 2> on atapci2
ata6: SIGNATURE: 00000101
ata6: [ITHREAD]
ata7: <ATA channel 3> on atapci2
ata7: SIGNATURE: 00000101
ata7: [ITHREAD]

ad4: 476940MB <Seagate ST3500630AS 3.AAK> at ata2-master SATA150
ad6: 476940MB <Hitachi HDT721050SLA360 ST3OA3AA> at ata3-master SATA150
ad8: 476940MB <Hitachi HCS545050GLA380 GM4OA5DG> at ata4-master SATA300
ad10: 476940MB <WDC WD5000AADS-00L4B1 05.04C05> at ata5-master SATA300
ad12: 476940MB <Hitachi HCS545050GLA380 GM4OA5DG> at ata6-master SATA300
ad14: 476940MB <WDC WD5000AADS-00L4B1 05.04C05> at ata7-master SATA300

(note also ad4 and ad6)

After the recent changes to the ata subsystem, the drives now turn up (as of Dec 12th):

ad4: 476940MB <Seagate ST3500630AS 3.AAK> at ata2-master UDMA100 SATA 1.5Gb/s
ad6: 476940MB <Hitachi HDT721050SLA360 ST3OA3AA> at ata3-master UDMA100 SATA 1.5Gb/s
ad8: 476940MB <Hitachi HCS545050GLA380 GM4OA5DG> at ata4-master UDMA100 
ad10: 476940MB <WDC WD5000AADS-00L4B1 05.04C05> at ata5-master UDMA100 
ad12: 476940MB <Hitachi HCS545050GLA380 GM4OA5DG> at ata6-master UDMA100 
ad14: 476940MB <WDC WD5000AADS-00L4B1 05.04C05> at ata7-master UDMA100

(compare ad4 and ad6)
The system is then unable to access the drives attached to the promise controller.
I keep getting something like "ad8: WARNING: READ_DMA UDMA ICRC error ... LBA=0"
and "ata4: SIGNATURE: ffffffff" when trying to access ad8.

Hey, these are SATA drives and surely not UDMA100...
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->mav 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Dec 14 00:00:13 UTC 2009 
Responsible-Changed-Why:  
mav, can you take a look at this, please? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=141438 

From: Alexander Motin <mav@FreeBSD.org>
To: bug-followup@FreeBSD.org, zdbs@lif.de
Cc:  
Subject: Re: kern/141438: [ata] recent changes to ata subsystem lose support
 for promise PDC40718 SATA300 controller [reression]
Date: Mon, 14 Dec 2009 14:12:10 +0200

 Send me please full _verbose_ dmesg with original kernel and if possible
 with new. If you can't get full with new, enable verbose messages and
 make screenshots of drives detection and first errors.
 
 That fact that drives were not reported as SATA is mostly just a
 cosmetics. It is not a problem.
 
 -- 
 Alexander Motin

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/141438: commit references a PR
Date: Wed, 16 Dec 2009 17:42:16 +0000 (UTC)

 Author: mav
 Date: Wed Dec 16 17:42:02 2009
 New Revision: 200607
 URL: http://svn.freebsd.org/changeset/base/200607
 
 Log:
   Large I/Os on Promise controllers reported to cause UDMA ICRC errors and
   subsequent timeouts. Restore previous limit for now, at least until
   I will have hardware to experiment.
   
   PR:             kern/141438
 
 Modified:
   head/sys/dev/ata/chipsets/ata-promise.c
 
 Modified: head/sys/dev/ata/chipsets/ata-promise.c
 ==============================================================================
 --- head/sys/dev/ata/chipsets/ata-promise.c	Wed Dec 16 17:17:40 2009	(r200606)
 +++ head/sys/dev/ata/chipsets/ata-promise.c	Wed Dec 16 17:42:02 2009	(r200607)
 @@ -957,6 +957,7 @@ ata_promise_mio_dmainit(device_t dev)
      ata_dmainit(dev);
      /* note start and stop are not used here */
      ch->dma.setprd = ata_promise_mio_setprd;
 +    ch->dma.max_iosize = 65536;
  }
  
  
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/141438: commit references a PR
Date: Wed, 16 Dec 2009 17:48:35 +0000 (UTC)

 Author: mav
 Date: Wed Dec 16 17:48:26 2009
 New Revision: 200608
 URL: http://svn.freebsd.org/changeset/base/200608
 
 Log:
   MFC r200607:
   Large I/Os on Promise controllers reported to cause UDMA ICRC errors and
   subsequent timeouts. Restore previous limit for now, at least until
   I will have hardware to experiment.
   
   PR:             kern/141438
 
 Modified:
   stable/8/sys/dev/ata/chipsets/ata-promise.c
 Directory Properties:
   stable/8/sys/   (props changed)
   stable/8/sys/amd64/include/xen/   (props changed)
   stable/8/sys/cddl/contrib/opensolaris/   (props changed)
   stable/8/sys/contrib/dev/acpica/   (props changed)
   stable/8/sys/contrib/pf/   (props changed)
   stable/8/sys/dev/xen/xenpci/   (props changed)
 
 Modified: stable/8/sys/dev/ata/chipsets/ata-promise.c
 ==============================================================================
 --- stable/8/sys/dev/ata/chipsets/ata-promise.c	Wed Dec 16 17:42:02 2009	(r200607)
 +++ stable/8/sys/dev/ata/chipsets/ata-promise.c	Wed Dec 16 17:48:26 2009	(r200608)
 @@ -957,6 +957,7 @@ ata_promise_mio_dmainit(device_t dev)
      ata_dmainit(dev);
      /* note start and stop are not used here */
      ch->dma.setprd = ata_promise_mio_setprd;
 +    ch->dma.max_iosize = 65536;
  }
  
  
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: "Steiner, Bernard" <Bernard.Steiner@lahmeyer.de>
To: "Alexander Motin" <mav@FreeBSD.org>, <bug-followup@FreeBSD.org>
Cc:  
Subject: RE: kern/141438: [ata] recent changes to ata subsystem lose support for promise PDC40718 SATA300 controller [reression]
Date: Thu, 17 Dec 2009 09:28:58 +0100

 I am happy to confirm that limiting the dma iosize to 64k has restored
 functionality to the promise controller.
 
 Thank you :-)
 
 Bernard
 
 -- 
 i.A. Dipl.-Inform. Bernard Steiner
 Netzwerk- und Systemadministrator
 Phone: +49 6101 55 1280, Fax: +49 6101 55 1623
 
 Lahmeyer International GmbH
 Friedberger Strasse 173, 61118 Bad Vilbel, Deutschland/Germany
 
 Geschaeftsfuehrer/Managing Directors:
 Dr. Henning Nothdurft (Vorsitzender/President), Burkhard Neumann
 
 Firmensitz/Registered office: Bad Vilbel
 Registergericht/Registry court: Frankfurt am Main HRB 80852
 
 Internet: http://www.lahmeyer.de/
 Disclaimer: http://www.lahmeyer.de/disclaimer/
State-Changed-From-To: open->closed 
State-Changed-By: mav 
State-Changed-When: Thu Dec 17 21:51:46 UTC 2009 
State-Changed-Why:  
Fixed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=141438 
>Unformatted:
