Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic It seems mvsata_bio_ready() is actually needed, a...



details:   https://anonhg.NetBSD.org/src/rev/05601480dd6f
branches:  trunk
changeset: 769156:05601480dd6f
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Thu Sep 01 14:55:58 2011 +0000

description:
It seems mvsata_bio_ready() is actually needed, and it seems
to work better if we always poll for completion for the
duration of this function.

diffstat:

 sys/dev/ic/mvsata.c |  10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diffs (43 lines):

diff -r a7220c4cbe48 -r 05601480dd6f sys/dev/ic/mvsata.c
--- a/sys/dev/ic/mvsata.c       Thu Sep 01 14:46:23 2011 +0000
+++ b/sys/dev/ic/mvsata.c       Thu Sep 01 14:55:58 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mvsata.c,v 1.10 2011/08/15 01:04:04 jakllsch Exp $     */
+/*     $NetBSD: mvsata.c,v 1.11 2011/09/01 14:55:58 jakllsch Exp $     */
 /*
  * Copyright (c) 2008 KIYOHARA Takashi
  * All rights reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.10 2011/08/15 01:04:04 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.11 2011/09/01 14:55:58 jakllsch Exp $");
 
 #include "opt_mvsata.h"
 
@@ -1410,12 +1410,13 @@
 mvsata_bio_ready(struct mvsata_port *mvport, struct ata_bio *ata_bio, int drive,
                 int flags)
 {
-#if 0
        struct ata_channel *chp = &mvport->port_ata_channel;
        struct atac_softc *atac = chp->ch_atac;
        struct ata_drive_datas *drvp = &chp->ch_drive[drive];
        const char *errstring;
 
+       flags |= AT_POLL;       /* XXX */
+
        /*
         * disable interrupts, all commands here should be quick
         * enough to be able to poll, and we don't go here that often
@@ -1510,9 +1511,6 @@
        drvp->state = 0;
        MVSATA_WDC_WRITE_1(mvport, SRB_CAS, WDCTL_4BIT);
        return -1;
-#endif
-       mvport->port_ata_channel.ch_drive[drive].state = READY;
-       return 0;
 }
 
 static void



Home | Main Index | Thread Index | Old Index