Hello, I've tried to put the OpenBSD code for Broadcom BCM5906M into my -current source tree but it doesn't compile :-( My problem is that I have no knowledge of driver/kernel coding so I'm bound to look and copy/paste code. The error I get is: ../../../../dev/pci/if_bge.c: In function 'bge_writembx': ../../../../dev/pci/if_bge.c:419: error: 'BGE_ASICREV_BCM5906' undeclared (first use in this function) ../../../../dev/pci/if_bge.c:419: error: (Each undeclared identifier is reported only once ../../../../dev/pci/if_bge.c:419: error: for each function it appears in.) cc1: warnings being treated as errors ../../../../dev/pci/if_bge.c: At top level: ../../../../dev/pci/if_bge.c:427: warning: no previous prototype for 'bge_nvram_getbyte' ../../../../dev/pci/if_bge.c: In function 'bge_nvram_getbyte': ../../../../dev/pci/if_bge.c:456: error: request for member 'dv_xname' in something not a structure or union ../../../../dev/pci/if_bge.c:463: warning: implicit declaration of function 'swap32' ../../../../dev/pci/if_bge.c: At top level: ../../../../dev/pci/if_bge.c:480: error: expected declaration specifiers or '...' before 'caddr_t' ../../../../dev/pci/if_bge.c:481: warning: no previous prototype for 'bge_read_nvram' ../../../../dev/pci/if_bge.c: In function 'bge_read_nvram': ../../../../dev/pci/if_bge.c:485: error: 'BGE_ASICREV_BCM5906' undeclared (first use in this function) ../../../../dev/pci/if_bge.c:492: error: 'dest' undeclared (first use in this function) ../../../../dev/pci/if_bge.c: In function 'bge_blockinit': ../../../../dev/pci/if_bge.c:1551: error: 'BGE_ASICREV_BCM5906' undeclared (first use in this function) ../../../../dev/pci/if_bge.c: At top level: ../../../../dev/pci/if_bge.c:2166: error: 'BGE_ASICREV_BCM5906' undeclared here (not in a function) ../../../../dev/pci/if_bge.c:2408: error: 'PCI_PRODUCT_BROADCOM_BCM5906A1' undeclared here (not in a function) ../../../../dev/pci/if_bge.c:2408: error: initializer element is not constant ../../../../dev/pci/if_bge.c:2408: error: (near initialization for 'bge_products[44].bp_product') ../../../../dev/pci/if_bge.c:2412: error: 'PCI_PRODUCT_BROADCOM_BCM5906A2' undeclared here (not in a function) ../../../../dev/pci/if_bge.c:2412: error: initializer element is not constant ../../../../dev/pci/if_bge.c:2412: error: (near initialization for 'bge_products[45].bp_product') ../../../../dev/pci/if_bge.c: In function 'bge_reset': ../../../../dev/pci/if_bge.c:2930: warning: comparison between pointer and integer ../../../../dev/pci/if_bge.c:2940: error: 'BGE_NO_EEPROM' undeclared (first use in this function) ../../../../dev/pci/if_bge.c:2940: error: invalid operands to binary | ../../../../dev/pci/if_bge.c:2940: error: incompatible types in assignment ../../../../dev/pci/if_bge.c:2940: warning: statement with no effect ../../../../dev/pci/if_bge.c:2992: warning: comparison between pointer and integer ../../../../dev/pci/if_bge.c:3001: error: request for member 'dv_xname' in something not a structure or union ../../../../dev/pci/if_bge.c:3001: warning: format '%s' expects type 'char *', but argument 2 has type 'const struct bge_product *' ../../../../dev/pci/if_bge.c: In function 'bge_encap': ../../../../dev/pci/if_bge.c:3828: warning: comparison between pointer and integer ../../../../dev/pci/if_bge.c:3859: warning: comparison between pointer and integer ../../../../dev/pci/if_bge.c:3859: warning: comparison between pointer and integer ../../../../dev/pci/if_bge.c:3913: warning: comparison between pointer and integer *** Error code 1 I have absolutely no idea of how much work is left. I got the inital code from http://www.openbsd.org/cgi-bin/cvsweb/src/sys/dev/pci/if_bge.c.diff?r1=1.214&r2=1.215&f=h http://www.openbsd.org/cgi-bin/cvsweb/src/sys/dev/pci/if_bgereg.h.diff?r1=1.73&r2=1.74&f=h I've attached my first diff. Anyone can see which part I forgot to copy/paste ? TIA, Jo
Attachment:
if_bge.c.diff.gz
Description: application/gunzip
Attachment:
if_bgereg.h.diff.gz
Description: application/gunzip
Attachment:
pgpMo50fSFSKr.pgp
Description: PGP signature