Hello,
I was trying to make eepro100.c ( IN ETHERBOOT) in my bootloader for tftp
download of my kernel image.
1. Etherboot version seems to be non-concerned about endianness issues so
i am trying to fix the passing of COMMAND and LINK fields of txfd and rxfd
by using a cpu_to_le32 kind of macro.
have some body tested etherboot eepro100 driver on a big endian machine..?
and does it work fine for 82559 ( dev id 0x1229 vendor id 0x8086)..?
2.secondly i have also observed one objectionable issue betwwen linux
eepro100.c and etherboot one.
in etherboot the txfd and commandbits has been defined like,
in ETHERBOOT
enum commands {
CmdNOp = 0, CmdIASetup = 0x10000, CmdConfigure = 0x20000,
CmdMulticastList = 0x30000, CmdTx = 0x40000, CmdTDR = 0x50000,
CmdDump = 0x60000, CmdDiagnose = 0x70000,
CmdSuspend = 0x40000000, /* Suspend after completion. */
CmdIntr = 0x20000000, /* Interrupt after completion. */
CmdTxFlex = 0x00080000, /* Use "Flexible mode" for CmdTx
command. */
};
and in LINUX version it is,
enum commands {
CmdNOp = 0,
CmdIASetup = 1,
CmdConfigure = 2,
CmdMulticastList = 3,
CmdTx = 4,
CmdTDR = 5,
CmdDump = 6,
CmdDiagnose = 7,
CmdSuspend = 0x4000,
CmdIntr = 0x2000,
CmdTxFlex = 0x0008,
};
in ETHERBOOT version the structure TxFD is
static struct TxFD {
volatile s16 status;
s16 command;
u32 link;
u32 tx_desc_addr;
s32 count;
u32 tx_buf_addr0;
s32 tx_buf_size0;
u32 tx_buf_addr1;
s32 tx_buf_size1;
) txfd;
in LINUX version ,
struct TxFD {
s32 status;
u32 link;
u32 tx_desc_addr;
s32 count;
#define TX_DESCR_BUF_OFFSET 16
u32 tx_buf_addr0;
s32 tx_buf_size0;
u32 tx_buf_addr1;
s32 tx_buf_size1;
};
my question is why in linux txfd there is one single s32 status
field instead of s16 status + s16 command field as in etherboot version..?
Best Regards,
Ashish Anand
in linux version TxFD structure defined like,
|