ahc_platform_abort_scbs()

Justin T. Gibbs gibbs at scsiguy.com
Mon Mar 11 07:52:10 PST 2002


>ahc_platform_abort_scbs is looping on my Solaris 2.8 machine.
>
>I must be missing something, but I don't see how ahc_platform_abort_scbs()
>can do anything but loop in this bit:
>
>                                busyq = &dev->busyq;
>                                while ((acmd = TAILQ_FIRST(busyq)) != NULL) {
>                                        ,,,
>                                        TAILQ_REMOVE(busyq, acmd,
>                                                     acmd_links.tqe);
>                                        ,,,
>                                }
>
>since TAILQ_FIRST is defined as ((head)->tqh_first and TAILQ_REMOVE doesn't up
>date tqh_first,

Yes it does.  Take a look at TAILQ_INSERT_HEAD().  The "previous element"
of the first element in a TAILQ is the head structure itself.  This is
why you can remove any element of a TAILQ without knowing or caring if
it is the first element in the list.

--
Justin

To Unsubscribe: send mail to majordomo at FreeBSD.org
with "unsubscribe aic7xxx" in the body of the message




More information about the aic7xxx mailing list