From a31a4d56633fb5503f977264bfc5e1613bcc6249 Mon Sep 17 00:00:00 2001 From: neil Date: Sun, 16 Feb 2014 22:26:48 +0000 Subject: [PATCH] Added debugging code to ata_WaitTO(). git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@48814 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- rom/devs/ata/waitto.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/rom/devs/ata/waitto.c b/rom/devs/ata/waitto.c index f943a60c4d..44bf17d785 100644 --- a/rom/devs/ata/waitto.c +++ b/rom/devs/ata/waitto.c @@ -1,5 +1,5 @@ /* - Copyright © 2013, The AROS Development Team. All rights reserved + Copyright © 2013-2014, The AROS Development Team. All rights reserved $Id$ */ @@ -13,18 +13,25 @@ #include "timer.h" #include "ata.h" +/* Waits for a signal or a timeout */ ULONG ata_WaitTO(struct IORequest* tmr, ULONG secs, ULONG micro, ULONG sigs) { ULONG sig = 1 << tmr->io_Message.mn_ReplyPort->mp_SigBit; - //D(bug("[ATA--] Timed wait %lds %ldu\n", secs, micro)); + D(struct Node *t = FindTask(NULL)); + D(bug("[ATA ] Timed wait %lds %ldu (task='%s')\n", secs, micro, + t->ln_Name)); tmr->io_Command = TR_ADDREQUEST; ((struct timerequest*)tmr)->tr_time.tv_secs = secs; ((struct timerequest*)tmr)->tr_time.tv_micro = micro; SendIO(tmr); + D(bug("[ATA ] Preset signals: %lx ('%s')\n", SetSignal(0, 0), t->ln_Name)); + D(bug("[ATA ] Signals requested: %lx ('%s')\n", sigs, t->ln_Name)); + D(bug("[ATA ] Timer signal: %lx ('%s')\n", sig, t->ln_Name)); sigs = Wait(sigs | sig); + D(bug("[ATA ] Signals received: %lx ('%s')\n", sigs, t->ln_Name)); if (0 == (sigs & sig)) { if (!CheckIO(tmr)) -- 2.11.4.GIT