driver - Realtek network adaptor 8168E transmit/receive using loopback -


i trying transmit , receive realtek 8168e using loopback(for windows 7 platform) ( writing tx buffer , reading rx buffer) reading rx buffer gives 0. on checking interrupt status register, tdu , rdu bit set 1 (tx/rx descriptor unavailable)

network adaptor : realtek 8168e

data sheet referred : realtek 8168b

transmitter side configuration - allocated memory tx descriptor per specification given in data sheet (page no:55). aligned descriptor 256 byte alignment.

  • also allocated separate buffer (txbuffer) store data transmitted.

  • placed address of txbuffer specified field in tx descriptor.

  • enabled mac loopback bit in tx config register (40h).

  • then have enabled npq bit in txpoll register (38h).

  • after that, have done nic reset offset 37h.

  • then have enabled loopback bit in bmcr register.

  • enabled tx ok, , tx descriptor unavailable interrupts in interrupt mask register (3ch).

  • placed tx descriptor address mac register tnpds (20h).

  • then @ last enabled te bit in command register (37h).

similarly did required configuration in rx side.

below buffer have given

    //tx buffer desriptor typedef struct _tmp_tbd_struc {     ulong       ulframelength;     ulong            vlan_tag;        ulong         tx_buffer_add_low;        ulong         tx_buffer_add_high; } tbd_tmp_struc, *ptbd_tmp_struc;  //rx buffer desriptor typedef struct _rmp_rbd_struc {     ulong       ulbuffersize;     ulong            vlan_tag;        ulong         rx_buffer_add_low;        ulong         rx_buffer_add_high; } rbd_rmp_struc, *prbd_rmp_struc; 

*pl. suggest how debug such situation. correct seqeunce of tx & rx descriptor configuration, pl share. *


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -