rctl &= ~(E1000_RCTL_SZ_4096); rctl |= (E1000_RCTL_BSEX | E1000_RCTL_LPE); switch (adapter->rx_buffer_len) { case E1000_RXBUFFER_2048: default: rctl |= E1000_RCTL_SZ_2048; rctl &= ~(E1000_RCTL_BSEX | E1000_RCTL_LPE); break; case E1000_RXBUFFER_4096: rctl |= E1000_RCTL_SZ_4096; break; case E1000_RXBUFFER_8192: rctl |= E1000_RCTL_SZ_8192; break; case E1000_RXBUFFER_16384: rctl |= E1000_RCTL_SZ_16384; break; 
if(adapter->hw.mac_type == e1000_82573) { /* We can now specify buffers in 1K increments. * BSIZE and BSEX are ignored in this case. */ rctl |= adapter->rx_buffer_len << 0x11; } else { rctl &= ~E1000_RCTL_SZ_4096; rctl |= E1000_RCTL_BSEX; switch (adapter->rx_buffer_len) { case E1000_RXBUFFER_2048: default: rctl |= E1000_RCTL_SZ_2048; rctl &= ~E1000_RCTL_BSEX; break; case E1000_RXBUFFER_4096: rctl |= E1000_RCTL_SZ_4096; break; case E1000_RXBUFFER_8192: rctl |= E1000_RCTL_SZ_8192; break; case E1000_RXBUFFER_16384: rctl |= E1000_RCTL_SZ_16384; break; } }  #ifdef CONFIG_E1000_PACKET_SPLIT /* 82571 and greater support packet-split where the protocol * header is placed in skb->data and the packet data is * placed in pages hanging off of skb_shinfo(skb)->nr_frags. * In the case of a non-split, skb->data is linearly filled, * followed by the page buffers.  Therefore, skb->data is * sized to hold the largest protocol header. */ adapter->rx_ps = (adapter->hw.mac_type > e1000_82547_rev_2) && (adapter->netdev->mtu < ((3 * PAGE_SIZE) + adapter->rx_ps_bsize0)); #endif if(adapter->rx_ps) { /* Configure extra packet-split registers */ rfctl = E1000_READ_REG(&adapter->hw, RFCTL); rfctl |= E1000_RFCTL_EXTEN; /* disable IPv6 packet split support */ rfctl |= E1000_RFCTL_IPV6_DIS; E1000_WRITE_REG(&adapter->hw, RFCTL, rfctl);  rctl |= E1000_RCTL_DTYP_PS | E1000_RCTL_SECRC;  psrctl |= adapter->rx_ps_bsize0 >> E1000_PSRCTL_BSIZE0_SHIFT; psrctl |= PAGE_SIZE >> E1000_PSRCTL_BSIZE1_SHIFT; psrctl |= PAGE_SIZE << E1000_PSRCTL_BSIZE2_SHIFT; psrctl |= PAGE_SIZE << E1000_PSRCTL_BSIZE3_SHIFT;  E1000_WRITE_REG(&adapter->hw, PSRCTL, psrctl); 
e1000_setup_rctl(struct e1000_adapter *adapter){	uint32_t rctl;	rctl = E1000_READ_REG(&adapter->hw, RCTL);	rctl &= ~(3 << E1000_RCTL_MO_SHIFT);	rctl |= E1000_RCTL_EN | E1000_RCTL_BAM |		E1000_RCTL_LBM_NO | E1000_RCTL_RDMTS_HALF |		(adapter->hw.mc_filter_type << E1000_RCTL_MO_SHIFT);	if(adapter->hw.tbi_compatibility_on == 1)		rctl |= E1000_RCTL_SBP;	else		rctl &= ~E1000_RCTL_SBP;	/* Setup buffer sizes */	rctl &= ~(E1000_RCTL_SZ_4096);	rctl |= (E1000_RCTL_BSEX | E1000_RCTL_LPE);	switch (adapter->rx_buffer_len) {	case E1000_RXBUFFER_2048:	default:		rctl |= E1000_RCTL_SZ_2048;		rctl &= ~(E1000_RCTL_BSEX | E1000_RCTL_LPE);		break;	case E1000_RXBUFFER_4096:		rctl |= E1000_RCTL_SZ_4096;		break;	case E1000_RXBUFFER_8192:		rctl |= E1000_RCTL_SZ_8192;		break;	case E1000_RXBUFFER_16384:		rctl |= E1000_RCTL_SZ_16384;		break;	}	E1000_WRITE_REG(&adapter->hw, RCTL, rctl);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/2d7edb923a823660b081bd4c660300ee19adca8d/e1000_main.c/clean/drivers/net/e1000/e1000_main.c