/* be optimistic about our link, since we were up before */ adapter->link_speed = 10000; adapter->link_duplex = FULL_DUPLEX; netif_carrier_on(netdev); netif_wake_queue(netdev); 
ixgb_set_ringparam(struct net_device *netdev,		struct ethtool_ringparam *ring){	struct ixgb_adapter *adapter = netdev->priv;	struct ixgb_desc_ring *txdr = &adapter->tx_ring;	struct ixgb_desc_ring *rxdr = &adapter->rx_ring;	struct ixgb_desc_ring tx_old, tx_new, rx_old, rx_new;	int err;	tx_old = adapter->tx_ring;	rx_old = adapter->rx_ring;	if((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) 		return -EINVAL;	if(netif_running(adapter->netdev))		ixgb_down(adapter,TRUE);	rxdr->count = max(ring->rx_pending,(uint32_t)MIN_RXD);	rxdr->count = min(rxdr->count,(uint32_t)MAX_RXD);	IXGB_ROUNDUP(rxdr->count, IXGB_REQ_RX_DESCRIPTOR_MULTIPLE); 	txdr->count = max(ring->tx_pending,(uint32_t)MIN_TXD);	txdr->count = min(txdr->count,(uint32_t)MAX_TXD);	IXGB_ROUNDUP(txdr->count, IXGB_REQ_TX_DESCRIPTOR_MULTIPLE); 	if(netif_running(adapter->netdev)) {		/* Try to get new resources before deleting old */		if((err = ixgb_setup_rx_resources(adapter)))			goto err_setup_rx;		if((err = ixgb_setup_tx_resources(adapter)))			goto err_setup_tx;		/* save the new, restore the old in order to free it,		 * then restore the new back again */		rx_new = adapter->rx_ring;		tx_new = adapter->tx_ring;		adapter->rx_ring = rx_old;		adapter->tx_ring = tx_old;		ixgb_free_rx_resources(adapter);		ixgb_free_tx_resources(adapter);		adapter->rx_ring = rx_new;		adapter->tx_ring = tx_new;		if((err = ixgb_up(adapter)))			return err;	}	return 0;err_setup_tx:	ixgb_free_rx_resources(adapter);err_setup_rx:	adapter->rx_ring = rx_old;	adapter->tx_ring = tx_old;	ixgb_up(adapter);	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/51b54b512cd26c4477ccd57b8d3736b99ccef7a0/ixgb_ethtool.c/buggy/drivers/net/ixgb/ixgb_ethtool.c