Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c3033b01 authored by Joe Perches's avatar Joe Perches Committed by Jeff Garzik
Browse files

e1000: Convert boolean_t to bool



On Thu, 2008-03-06 at 10:07 -0800, Kok, Auke wrote:
> send me a patch for e1000 and for ixgb and I'll happily apply those :)

boolean_t to bool
TRUE to true
FALSE to false
comment typo ahread to ahead

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarAuke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent f89e6e38
Loading
Loading
Loading
Loading
+13 −13
Original line number Original line Diff line number Diff line
@@ -188,7 +188,7 @@ struct e1000_tx_ring {
	spinlock_t tx_lock;
	spinlock_t tx_lock;
	uint16_t tdh;
	uint16_t tdh;
	uint16_t tdt;
	uint16_t tdt;
	boolean_t last_tx_tso;
	bool last_tx_tso;
};
};


struct e1000_rx_ring {
struct e1000_rx_ring {
@@ -283,16 +283,16 @@ struct e1000_adapter {
	uint32_t tx_fifo_size;
	uint32_t tx_fifo_size;
	uint8_t  tx_timeout_factor;
	uint8_t  tx_timeout_factor;
	atomic_t tx_fifo_stall;
	atomic_t tx_fifo_stall;
	boolean_t pcix_82544;
	bool pcix_82544;
	boolean_t detect_tx_hung;
	bool detect_tx_hung;


	/* RX */
	/* RX */
#ifdef CONFIG_E1000_NAPI
#ifdef CONFIG_E1000_NAPI
	boolean_t (*clean_rx) (struct e1000_adapter *adapter,
	bool (*clean_rx) (struct e1000_adapter *adapter,
			  struct e1000_rx_ring *rx_ring,
			  struct e1000_rx_ring *rx_ring,
			  int *work_done, int work_to_do);
			  int *work_done, int work_to_do);
#else
#else
	boolean_t (*clean_rx) (struct e1000_adapter *adapter,
	bool (*clean_rx) (struct e1000_adapter *adapter,
			  struct e1000_rx_ring *rx_ring);
			  struct e1000_rx_ring *rx_ring);
#endif
#endif
	void (*alloc_rx_buf) (struct e1000_adapter *adapter,
	void (*alloc_rx_buf) (struct e1000_adapter *adapter,
@@ -312,7 +312,7 @@ struct e1000_adapter {
	uint32_t alloc_rx_buff_failed;
	uint32_t alloc_rx_buff_failed;
	uint32_t rx_int_delay;
	uint32_t rx_int_delay;
	uint32_t rx_abs_int_delay;
	uint32_t rx_abs_int_delay;
	boolean_t rx_csum;
	bool rx_csum;
	unsigned int rx_ps_pages;
	unsigned int rx_ps_pages;
	uint32_t gorcl;
	uint32_t gorcl;
	uint64_t gorcl_old;
	uint64_t gorcl_old;
@@ -335,12 +335,12 @@ struct e1000_adapter {
	struct e1000_rx_ring test_rx_ring;
	struct e1000_rx_ring test_rx_ring;


	int msg_enable;
	int msg_enable;
	boolean_t have_msi;
	bool have_msi;


	/* to not mess up cache alignment, always add to the bottom */
	/* to not mess up cache alignment, always add to the bottom */
	boolean_t tso_force;
	bool tso_force;
	boolean_t smart_power_down;	/* phy smart power down */
	bool smart_power_down;	/* phy smart power down */
	boolean_t quad_port_a;
	bool quad_port_a;
	unsigned long flags;
	unsigned long flags;
	uint32_t eeprom_wol;
	uint32_t eeprom_wol;
};
};
+9 −8
Original line number Original line Diff line number Diff line
@@ -353,7 +353,7 @@ e1000_set_tso(struct net_device *netdev, uint32_t data)
		netdev->features &= ~NETIF_F_TSO6;
		netdev->features &= ~NETIF_F_TSO6;


	DPRINTK(PROBE, INFO, "TSO is %s\n", data ? "Enabled" : "Disabled");
	DPRINTK(PROBE, INFO, "TSO is %s\n", data ? "Enabled" : "Disabled");
	adapter->tso_force = TRUE;
	adapter->tso_force = true;
	return 0;
	return 0;
}
}


@@ -922,7 +922,8 @@ static int
e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data)
e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data)
{
{
	struct net_device *netdev = adapter->netdev;
	struct net_device *netdev = adapter->netdev;
	uint32_t mask, i=0, shared_int = TRUE;
	uint32_t mask, i = 0;
	bool shared_int = true;
	uint32_t irq = adapter->pdev->irq;
	uint32_t irq = adapter->pdev->irq;


	*data = 0;
	*data = 0;
@@ -931,7 +932,7 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data)
	/* Hook up test interrupt handler just for this test */
	/* Hook up test interrupt handler just for this test */
	if (!request_irq(irq, &e1000_test_intr, IRQF_PROBE_SHARED, netdev->name,
	if (!request_irq(irq, &e1000_test_intr, IRQF_PROBE_SHARED, netdev->name,
	                 netdev))
	                 netdev))
		shared_int = FALSE;
		shared_int = false;
	else if (request_irq(irq, &e1000_test_intr, IRQF_SHARED,
	else if (request_irq(irq, &e1000_test_intr, IRQF_SHARED,
	         netdev->name, netdev)) {
	         netdev->name, netdev)) {
		*data = 1;
		*data = 1;
@@ -1295,7 +1296,7 @@ e1000_integrated_phy_loopback(struct e1000_adapter *adapter)
	uint32_t ctrl_reg = 0;
	uint32_t ctrl_reg = 0;
	uint32_t stat_reg = 0;
	uint32_t stat_reg = 0;


	adapter->hw.autoneg = FALSE;
	adapter->hw.autoneg = false;


	if (adapter->hw.phy_type == e1000_phy_m88) {
	if (adapter->hw.phy_type == e1000_phy_m88) {
		/* Auto-MDI/MDIX Off */
		/* Auto-MDI/MDIX Off */
@@ -1473,7 +1474,7 @@ e1000_loopback_cleanup(struct e1000_adapter *adapter)
	case e1000_82545_rev_3:
	case e1000_82545_rev_3:
	case e1000_82546_rev_3:
	case e1000_82546_rev_3:
	default:
	default:
		hw->autoneg = TRUE;
		hw->autoneg = true;
		if (hw->phy_type == e1000_phy_gg82563)
		if (hw->phy_type == e1000_phy_gg82563)
			e1000_write_phy_reg(hw,
			e1000_write_phy_reg(hw,
					    GG82563_PHY_KMRN_MODE_CTRL,
					    GG82563_PHY_KMRN_MODE_CTRL,
@@ -1607,13 +1608,13 @@ e1000_link_test(struct e1000_adapter *adapter, uint64_t *data)
	*data = 0;
	*data = 0;
	if (adapter->hw.media_type == e1000_media_type_internal_serdes) {
	if (adapter->hw.media_type == e1000_media_type_internal_serdes) {
		int i = 0;
		int i = 0;
		adapter->hw.serdes_link_down = TRUE;
		adapter->hw.serdes_link_down = true;


		/* On some blade server designs, link establishment
		/* On some blade server designs, link establishment
		 * could take as long as 2-3 minutes */
		 * could take as long as 2-3 minutes */
		do {
		do {
			e1000_check_for_link(&adapter->hw);
			e1000_check_for_link(&adapter->hw);
			if (adapter->hw.serdes_link_down == FALSE)
			if (!adapter->hw.serdes_link_down)
				return *data;
				return *data;
			msleep(20);
			msleep(20);
		} while (i++ < 3750);
		} while (i++ < 3750);
@@ -1649,7 +1650,7 @@ e1000_diag_test(struct net_device *netdev,
		   struct ethtool_test *eth_test, uint64_t *data)
		   struct ethtool_test *eth_test, uint64_t *data)
{
{
	struct e1000_adapter *adapter = netdev_priv(netdev);
	struct e1000_adapter *adapter = netdev_priv(netdev);
	boolean_t if_running = netif_running(netdev);
	bool if_running = netif_running(netdev);


	set_bit(__E1000_TESTING, &adapter->flags);
	set_bit(__E1000_TESTING, &adapter->flags);
	if (eth_test->flags == ETH_TEST_FL_OFFLINE) {
	if (eth_test->flags == ETH_TEST_FL_OFFLINE) {
Loading