NetBSD-Bugs archive

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

Re: install/47603: Failed installing NetBSD 6.0.1



The following reply was made to PR install/47603; it has been noted by GNATS.

From: Stefanus Hermawan <slashwaves%yahoo.com@localhost>
To: Christos Zoulas <christos%zoulas.com@localhost>
Cc: "gnats-bugs%NetBSD.org@localhost" <gnats-bugs%NetBSD.org@localhost>,
 "install-manager%netbsd.org@localhost" <install-manager%netbsd.org@localhost>,
 "gnats-admin%netbsd.org@localhost" <gnats-admin%netbsd.org@localhost>,
 "netbsd-bugs%netbsd.org@localhost" <netbsd-bugs%netbsd.org@localhost>
Subject: Re: install/47603: Failed installing NetBSD 6.0.1
Date: Tue, 5 Mar 2013 21:29:25 +0700

 Please tell me step by step using this patch.
 
 Sent from my iPhone
 
 On Mar 5, 2013, at 9:22 PM, christos%zoulas.com@localhost (Christos Zoulas) 
wrote:
 
 > On Mar 5, 10:35am, slashwaves%yahoo.com@localhost (Stefanus Hermawan) wrote:
 > -- Subject: Re: install/47603: Failed installing NetBSD 6.0.1
 >=20
 > | The following reply was made to PR install/47603; it has been noted by G=
 NATS.
 > |=20
 > | From: Stefanus Hermawan <slashwaves%yahoo.com@localhost>
 > | To: Christos Zoulas <christos%zoulas.com@localhost>
 > | Cc: "gnats-bugs%NetBSD.org@localhost" <gnats-bugs%NetBSD.org@localhost>,
 > |  "install-manager%netbsd.org@localhost" 
 > <install-manager%netbsd.org@localhost>,
 > |  "gnats-admin%netbsd.org@localhost" <gnats-admin%netbsd.org@localhost>,
 > |  "netbsd-bugs%netbsd.org@localhost" <netbsd-bugs%netbsd.org@localhost>
 > | Subject: Re: install/47603: Failed installing NetBSD 6.0.1
 > | Date: Tue, 5 Mar 2013 15:44:55 +0700
 > |=20
 > |  I re-debug, I just can sort the function that called on the infinite lo=
 op=20
 > | =20
 > |  1. call pckbc_send_devcmd
 > |  2. call pckbc_send_cmd
 > |  3. call pckbc_wait_output
 > |  4. return value of pckbc_wait_output: 1
 > |  5. return value of pckbc_send_cmd: 1
 > |  6. return value of pckbc_send_devcmd: 1
 > |  7. call pckbc_poll_data1
 > |  8. return value of pckbc_poll_data1: 0xfc
 > | =20
 >=20
 > Excellent! You built your own kernel. Please try this patch...
 >=20
 > christos
 >=20
 > Index: pckbdreg.h
 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 > RCS file: /cvsroot/src/sys/dev/pckbport/pckbdreg.h,v
 > retrieving revision 1.2
 > diff -u -p -u -r1.2 pckbdreg.h
 > --- pckbdreg.h    11 Dec 2005 12:23:22 -0000    1.2
 > +++ pckbdreg.h    5 Mar 2013 14:21:45 -0000
 > @@ -19,7 +19,9 @@
 > #define    KBR_EXTENDED0    0xE0    /* extended key sequence */
 > #define    KBR_EXTENDED1    0xE1    /* extended key sequence */
 > #define    KBR_RESEND    0xFE    /* needs resend of command */
 > +#define    KBR_BAT_DONE    0xAA
 > #define    KBR_ACK        0xFA    /* received a valid command */
 > +#define    KBR_BAT_FAIL    0xFC
 > #define    KBR_OVERRUN    0x00    /* flooded */
 > #define    KBR_FAILURE    0xFD    /* diagnostic failure */
 > #define    KBR_BREAK    0xF0    /* break code prefix - sent on key release=
  */
 > Index: pckbport.c
 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 > RCS file: /cvsroot/src/sys/dev/pckbport/pckbport.c,v
 > retrieving revision 1.14
 > diff -u -p -u -r1.14 pckbport.c
 > --- pckbport.c    9 Sep 2011 14:00:01 -0000    1.14
 > +++ pckbport.c    5 Mar 2013 14:21:45 -0000
 > @@ -93,11 +93,15 @@ static const char * const pckbport_slot_
 >=20
 > static struct pckbport_tag pckbport_cntag;
 >=20
 > -#define KBC_DEVCMD_ACK 0xfa
 > -#define KBC_DEVCMD_RESEND 0xfe
 > -
 > #define    KBD_DELAY    DELAY(8)
 >=20
 > +#define PCKBPORTDEBUG
 > +#ifdef PCKBPORTDEBUG
 > +#define DPRINTF(a)    printf a
 > +#else
 > +#define DPRINTF(a)
 > +#endif
 > +
 > static int
 > pckbport_poll_data1(pckbport_tag_t t, pckbport_slot_t slot)
 > {
 > @@ -261,35 +265,29 @@ pckbport_poll_cmd1(struct pckbport_tag *
 >            if (c !=3D -1)
 >                break;
 >        }
 > -
 > -        if (c =3D=3D KBC_DEVCMD_ACK) {
 > +        switch (c) {
 > +        case KBR_ACK:
 >            cmd->cmdidx++;
 >            continue;
 > -        }
 > -        if (c =3D=3D KBC_DEVCMD_RESEND) {
 > -#ifdef PCKBPORTDEBUG
 > -            printf("pckbport_cmd: RESEND\n");
 > -#endif
 > +        case KBR_BAT_DONE:
 > +        case KBR_BAT_FAIL:
 > +        case KBR_RESEND:
 > +            DPRINTF(("%s: %s\n", __func__, c =3D=3D KBR_RESEND ?
 > +                "RESEND" : (c =3D=3D KBR_BAT_DONE ? "BAT_DONE" :
 > +                "BAT_FAIL")));
 >            if (cmd->retries++ < 5)
 >                continue;
 >            else {
 > -#ifdef PCKBPORTDEBUG
 > -                printf("pckbport: cmd failed\n");
 > -#endif
 > +                DPRINTF(("%s: cmd failed\n", __func__));
 >                cmd->status =3D EIO;
 >                return;
 >            }
 > -        }
 > -        if (c =3D=3D -1) {
 > -#ifdef PCKBPORTDEBUG
 > -            printf("pckbport_cmd: timeout\n");
 > -#endif
 > +        case -1:
 > +            DPRINTF(("%s: timeout\n", __func__));
 >            cmd->status =3D EIO;
 >            return;
 >        }
 > -#ifdef PCKBPORTDEBUG
 > -        printf("pckbport_cmd: lost 0x%x\n", c);
 > -#endif
 > +        DPRINTF(("%s: lost 0x%x\n", __func__, c));
 >    }
 >=20
 >    while (cmd->responseidx < cmd->responselen) {
 > @@ -303,9 +301,7 @@ pckbport_poll_cmd1(struct pckbport_tag *
 >                break;
 >        }
 >        if (c =3D=3D -1) {
 > -#ifdef PCKBPORTDEBUG
 > -            printf("pckbport_cmd: no data\n");
 > -#endif
 > +            DPRINTF(("%s: no data\n", __func__));
 >            cmd->status =3D ETIMEDOUT;
 >            return;
 >        } else
 > @@ -344,15 +340,12 @@ void
 > pckbport_cleanqueue(struct pckbport_slotdata *q)
 > {
 >    struct pckbport_devcmd *cmd;
 > -#ifdef PCKBPORTDEBUG
 > -    int i;
 > -#endif
 >=20
 >    while ((cmd =3D TAILQ_FIRST(&q->cmdqueue))) {
 >        TAILQ_REMOVE(&q->cmdqueue, cmd, next);
 > #ifdef PCKBPORTDEBUG
 > -        printf("pckbport_cleanqueue: removing");
 > -        for (i =3D 0; i < cmd->cmdlen; i++)
 > +        printf("%s: removing", __func__);
 > +        for (int i =3D 0; i < cmd->cmdlen; i++)
 >            printf(" %02x", cmd->cmd[i]);
 >        printf("\n");
 > #endif
 > @@ -445,17 +438,15 @@ pckbport_cmdresponse(struct pckbport_tag
 >        panic("pckbport_cmdresponse: no active command");
 > #endif
 >    if (cmd->cmdidx < cmd->cmdlen) {
 > -        if (data !=3D KBC_DEVCMD_ACK && data !=3D KBC_DEVCMD_RESEND)
 > +        if (data !=3D KBR_ACK && data !=3D KBR_RESEND)
 >            return 0;
 >=20
 > -        if (data =3D=3D KBC_DEVCMD_RESEND) {
 > +        if (data =3D=3D KBR_RESEND) {
 >            if (cmd->retries++ < 5)
 >                /* try again last command */
 >                goto restart;
 >            else {
 > -#ifdef PCKBPORTDEBUG
 > -                printf("pckbport: cmd failed\n");
 > -#endif
 > +                DPRINTF(("%s: cmd failed\n", __func__));
 >                cmd->status =3D EIO;
 >                /* dequeue */
 >            }
 > @@ -584,12 +575,11 @@ pckbportintr(pckbport_tag_t t, pckbport_
 >    if (CMD_IN_QUEUE(q) && pckbport_cmdresponse(t, slot, data))
 >        return;
 >=20
 > -    if (t->t_inputhandler[slot])
 > +    if (t->t_inputhandler[slot]) {
 >        (*t->t_inputhandler[slot])(t->t_inputarg[slot], data);
 > -#ifdef PCKBPORTDEBUG
 > -    else
 > -        printf("pckbportintr: slot %d lost %d\n", slot, data);
 > -#endif
 > +        return;
 > +    }
 > +    DPRINTF(("%s: slot %d lost %d\n", slot, data, __func__));
 > }
 >=20
 > int
 


Home | Main Index | Thread Index | Old Index