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

Re: aac timeout debugging



Okay, I think I'm definitely getting somewhere here.  From what I can
tell, aac_exec_ccb() is always returning the same value to
aac_start_ccb(), even if aac_start() returns EBUSY.  Hence, a timeout is
set and the ccb comes off the queue even though the fib never goes on.
The diff below illustrates this.  I no longer get the time out errors.

Now I get stuff like this...
aac: queue busy...come back later!
sd0: not queued, error 5
aac: queue busy...come back later!
sd0: not queued, error 5
sd1: not queued, error 5
aac: queue busy...come back later!

The following diff is just to demonstrate where the error lies.

$ cvs diff -c
cvs diff: Diffing .
Index: aac.c
===================================================================
RCS file: /home/cvsup/src/sys/dev/ic/aac.c,v
retrieving revision 1.14
diff -c -r1.14 aac.c
*** aac.c       27 Mar 2002 15:02:59 -0000      1.14
--- aac.c       3 May 2002 19:10:34 -0000
***************
*** 1569,1575 ****
                    sizeof(struct aac_sg_entry);
        }

!       aac_start(ccb);

        xs->error = XS_NOERROR;
        xs->resid = 0;
--- 1569,1577 ----
                    sizeof(struct aac_sg_entry);
        }

!       /* XXX I guess rebuilding the fib if this fails could suck */
!       if(aac_start(ccb) == EBUSY)
!           return 0;

        xs->error = XS_NOERROR;
        xs->resid = 0;
***************
*** 1598,1605 ****
        ccb->ac_fib->Header.SenderData = (u_int32_t)ccb; /* XXX ack,
sizing */

        /* put the FIB on the outbound queue */
!       if (aac_enqueue_fib(sc, AAC_ADAP_NORM_CMD_QUEUE, ccb))
                return (EBUSY);

        return (0);
  }
--- 1600,1609 ----
        ccb->ac_fib->Header.SenderData = (u_int32_t)ccb; /* XXX ack,
sizing */

        /* put the FIB on the outbound queue */
!       if (aac_enqueue_fib(sc, AAC_ADAP_NORM_CMD_QUEUE, ccb)) {
!               printf("aac: queue busy...come back later!\n");
                return (EBUSY);
+       }

        return (0);
  }


-- 
Brandin Claar
Assistant Research Engineer 
Penn State Applied Research Lab