/* Disable Flow Control */
hw->fc = E1000_FC_NONE;
- adapter->rx_buffer_len = E1000_RXBUFFER_2048;
+ adapter->eeprom_wol = 0;
+ adapter->wol = adapter->eeprom_wol;
+ adapter->en_mng_pt = 0;
+ adapter->rx_int_delay = 0;
+ adapter->rx_abs_int_delay = 0;
+
+ adapter->rx_buffer_len = 1600;
adapter->rx_ps_bsize0 = E1000_RXBUFFER_128;
- hw->max_frame_size = E1000_RXBUFFER_2048;
- hw->min_frame_size = 64;
+ hw->max_frame_size = 1600;
+ hw->min_frame_size = ETH_ZLEN;
/* identify the MAC */
e1000_set_media_type ( hw );
- hw->wait_autoneg_complete = FALSE;
+ hw->autoneg = TRUE;
+ hw->autoneg_advertised = AUTONEG_ADVERTISE_SPEED_DEFAULT;
+ hw->wait_autoneg_complete = TRUE;
+
hw->tbi_compatibility_en = TRUE;
hw->adaptive_ifs = TRUE;
for ( i = 0; i < NUM_RX_DESC; i++ ) {
- adapter->rx_iobuf[i] = alloc_iob ( E1000_RXBUFFER_2048 );
+ adapter->rx_iobuf[i] = alloc_iob ( 1600 );
/* If unable to allocate all iobufs, free any that
* were successfully allocated, and return an error
adapter->netdev = netdev;
adapter->pdev = pdev;
adapter->hw.back = adapter;
- adapter->eeprom_wol = 0;
- adapter->wol = adapter->eeprom_wol;
-#if 0
- adapter->en_mng_pt = 0;
- adapter->rx_int_delay = 0;
- adapter->rx_abs_int_delay = 0;
-#endif
+
mmio_start = pci_bar_start ( pdev, PCI_BASE_ADDRESS_0 );
mmio_len = pci_bar_size ( pdev, PCI_BASE_ADDRESS_0 );
/* allocate transmit descriptors */
err = e1000_setup_tx_resources ( adapter );
if (err) {
- goto err_setup_tx;
DBG ( "Error setting up TX resources!\n" );
+ goto err_setup_tx;
}
/* allocate receive descriptors */
e1000_irq_enable ( adapter );
- return E1000_SUCCESS;
+ return 0;
err_setup_rx:
e1000_free_tx_resources ( adapter );
uint8_t status; /* Descriptor status */
uint8_t errors; /* Descriptor Errors */
uint16_t special;
-} __attribute__ (( packed )) ;
+};
/* Receive Descriptor - Extended */
union e1000_rx_desc_extended {
uint16_t special;
} fields;
} upper;
-} __attribute__ (( packed )) ;
+};
/* Transmit Descriptor bit definitions */
#define E1000_TXD_DTYP_D 0x00100000 /* Data Descriptor */
/* Structure containing variables used by the shared code (e1000_hw.c) */
struct e1000_hw {
- uint8_t *hw_addr;
- uint8_t *flash_address;
+ uint8_t *hw_addr;
+ uint8_t *flash_address;
e1000_mac_type mac_type;
e1000_phy_type phy_type;
uint32_t phy_init_script;