NetBSD-Bugs archive

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

kern/43293: iavc driver does not compile under 5.0.2 anymore



>Number:         43293
>Category:       kern
>Synopsis:       iavc driver does not compile under 5.0.2 anymore
>Confidential:   yes
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed May 12 08:40:00 +0000 2010
>Originator:     W. Stukenbrock
>Release:        NetBSD 5.0.2
>Organization:
Dr. Nagler & Company GmbH
        
>Environment:
        
        
System: NetBSD s012 4.0 NetBSD 4.0 (NSW-S012) #11: Fri Mar 26 15:01:49 CET 2010 
root@s012:/usr/src/sys/arch/amd64/compile/NSW-S012 amd64
Architecture: x86_64
Machine: amd64
>Description:
        From 4.x to 5.0.2 in the iavc_softtc_t the send and recieve buffer
        elements changed type to "void*". So it is no longer possible to
        reference them - still done in iavc.c ...
>How-To-Repeat:
        Setup a kernel with the iavc driver and try to compile it.
>Fix:
        The following patch will remove the problem:


--- iavc.c      2010/05/12 08:28:01     1.1
+++ iavc.c      2010/05/12 08:28:27
@@ -1004,9 +1004,9 @@
        /* Copy message to DMA buffer. */
 
        if (m->m_next)
-           dmabuf = amcc_put_byte(&sc->sc_sendbuf[0], SEND_DATA_B3_REQ);
+           dmabuf = amcc_put_byte(sc->sc_sendbuf, SEND_DATA_B3_REQ);
        else
-           dmabuf = amcc_put_byte(&sc->sc_sendbuf[0], SEND_MESSAGE);
+           dmabuf = amcc_put_byte(sc->sc_sendbuf, SEND_MESSAGE);
 
        dmabuf = amcc_put_word(dmabuf, m->m_len);
        memcpy(dmabuf, m->m_data, m->m_len);
@@ -1061,7 +1061,7 @@
     uint8_t *dmabuf;
 
     if (sc->sc_dma) {
-       memcpy(&sc->sc_sendbuf[0], m->m_data + 2, m->m_len - 2);
+       memcpy(sc->sc_sendbuf, m->m_data + 2, m->m_len - 2);
        txlen = m->m_len - 2;
     } else {
 

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index