2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-11-29 12:49:49 +00:00

Autonegotiation fixes. NIC now autonegotiates to whatever the switch supports.

This commit is contained in:
Marty Connor 2007-11-20 12:06:22 -05:00
parent e41550b0ba
commit 8973caa1e6
3 changed files with 22 additions and 18 deletions

View File

@ -267,10 +267,16 @@ e1000_sw_init ( struct e1000_adapter *adapter )
/* 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 */
@ -294,7 +300,10 @@ e1000_sw_init ( struct e1000_adapter *adapter )
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;
@ -512,7 +521,7 @@ e1000_setup_rx_resources ( struct e1000_adapter *adapter )
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
@ -1014,13 +1023,7 @@ e1000_probe ( struct pci_device *pdev,
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 );
@ -1169,8 +1172,8 @@ e1000_open ( struct net_device *netdev )
/* 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 */
@ -1186,7 +1189,7 @@ e1000_open ( struct net_device *netdev )
e1000_irq_enable ( adapter );
return E1000_SUCCESS;
return 0;
err_setup_rx:
e1000_free_tx_resources ( adapter );

View File

@ -598,7 +598,7 @@ struct e1000_rx_desc {
uint8_t status; /* Descriptor status */
uint8_t errors; /* Descriptor Errors */
uint16_t special;
} __attribute__ (( packed )) ;
};
/* Receive Descriptor - Extended */
union e1000_rx_desc_extended {
@ -729,7 +729,7 @@ struct e1000_tx_desc {
uint16_t special;
} fields;
} upper;
} __attribute__ (( packed )) ;
};
/* Transmit Descriptor bit definitions */
#define E1000_TXD_DTYP_D 0x00100000 /* Data Descriptor */
@ -1381,8 +1381,8 @@ struct e1000_hw_stats {
/* 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;

View File

@ -26,6 +26,7 @@
*******************************************************************************/
/* glue for the OS independent part of e1000
* includes register access macros
*/