Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci only apply the satalink 3112 rev 0.1 and earlier...



details:   https://anonhg.NetBSD.org/src/rev/6ef0ce9b6d21
branches:  trunk
changeset: 753335:6ef0ce9b6d21
user:      mrg <mrg%NetBSD.org@localhost>
date:      Tue Mar 23 03:24:53 2010 +0000

description:
only apply the satalink 3112 rev 0.1 and earlier to actual 3112 based
cards, not eg, 3512 cards.

should help performance for 3512 cards, derived from discussions in
PR#42980: satalink DMA fails under amd64.

diffstat:

 sys/dev/pci/satalink.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r f2c0daceeeaa -r 6ef0ce9b6d21 sys/dev/pci/satalink.c
--- a/sys/dev/pci/satalink.c    Mon Mar 22 23:29:11 2010 +0000
+++ b/sys/dev/pci/satalink.c    Tue Mar 23 03:24:53 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: satalink.c,v 1.39 2009/11/26 15:17:10 njoly Exp $      */
+/*     $NetBSD: satalink.c,v 1.40 2010/03/23 03:24:53 mrg Exp $        */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: satalink.c,v 1.39 2009/11/26 15:17:10 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: satalink.c,v 1.40 2010/03/23 03:24:53 mrg Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -469,7 +469,9 @@
         * apparently hard to tickle, but we'll go ahead and play it
         * safe.
         */
-       if (PCI_REVISION(pa->pa_class) <= 0x01) {
+       if ((PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_CMDTECH_3112 ||
+            PCI_PRODUCT(pa->pa_id) == PCI_PRODUCT_CMDTECH_AAR_1210SA) &&
+           PCI_REVISION(pa->pa_class) <= 0x01) {
                sc->sc_dma_maxsegsz = 8192;
                sc->sc_dma_boundary = 8192;
        }



Home | Main Index | Thread Index | Old Index