Skip to contentSkip to conversation

Andrew Curtis' PCNet Patch built on MingW

Qemu-devel Garth Dahlstrom 2 participants 2 messages Aug 11, 2004 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): -3725715442654674811@unknownmsgid

#1 lore raw
Quoted 6 lines · Antony T Curtis

There is no such SWSTYLE as 0x04 on the PC-Net chip I emulated. You should be able to safely ignore this message.

maybe the PACKED name conflicts with some existing symbol if you are having to undef it... Can you find what the original definition of it is? And perhaps I should call it PCN_PACKED maybe...

I'm just taking a guess that's the cause, PACKED is defined in /includes/windef.h as the following:
#ifdef __GNUC__
#define PACKED __attribute__((packed))

The line in pcnet.h:
#define PACKED(A) A __attribute__ ((packed)) throws a PACKED redefined warning if I leave it as is...

So in http://www.northern.ca/projects/qemu/qemu-0.6.0-mingw-pcnet-no_dhcp.zip
I did:
#ifdef __GNUC__
#ifdef __MINGW32__ //GED
#undef PACKED
#endif
#define PACKED(A) A __attribute__ ((packed))
#else
#error FixMe
#endif

which gets rid of the warnings, but may also break the code.

Signature · 3 lines
Northern.CA ===--
http://www.northern.ca/
Canada's Search Engine
#2 lore raw
Quoted 29 lines · Garth Dahlstrom
Quoted 6 lines · Antony T Curtis

There is no such SWSTYLE as 0x04 on the PC-Net chip I emulated. You should be able to safely ignore this message.

maybe the PACKED name conflicts with some existing symbol if you are having to undef it... Can you find what the original definition of it is? And perhaps I should call it PCN_PACKED maybe...

I'm just taking a guess that's the cause, PACKED is defined in /includes/windef.h as the following:
#ifdef __GNUC__
#define PACKED __attribute__((packed))

The line in pcnet.h:
#define PACKED(A) A __attribute__ ((packed)) throws a PACKED redefined warning if I leave it as is...

So in http://www.northern.ca/projects/qemu/qemu-0.6.0-mingw-pcnet-no_dhcp.zip
I did:
#ifdef __GNUC__
#ifdef __MINGW32__ //GED
#undef PACKED
#endif
#define PACKED(A) A __attribute__ ((packed))
#else
#error FixMe
#endif

Quoted 1 line

which gets rid of the warnings, but may also break the code.

At the start of pci_pcnet_init(), can you enable the printf() statement which reports the size of the pcnet_RMD and pcnet_TMD structures?

They should both be 16 bytes.

Signature · 3 lines
Antony T Curtis, BSc.                   UNIX, Linux, *BSD, Networking
[email protected]            C++, J2EE, Perl, MySQL, Apache
                                        IT Consultancy.