Whitespace fixes Signed-off-by: Jeff Kirsher <[EMAIL PROTECTED]> Signed-off-by: John Ronciak <[EMAIL PROTECTED]> Signed-off-by: Jesse Brandeburg <[EMAIL PROTECTED]>
diff -up linux-2.6/drivers/net/ixgb/ixgb.h linux-2.6.new/drivers/net/ixgb/ixgb.h --- linux-2.6/drivers/net/ixgb/ixgb.h 2005-11-14 19:59:34.000000000 -0800 +++ linux-2.6.new/drivers/net/ixgb/ixgb.h 2005-10-31 12:02:56.000000000 -0800 @@ -87,18 +87,20 @@ struct ixgb_adapter; #define IXGB_ERR(args...) printk(KERN_ERR "ixgb: " args) /* TX/RX descriptor defines */ -#define DEFAULT_TXD 256 -#define MAX_TXD 4096 -#define MIN_TXD 64 +#define DEFAULT_TXD 256 +#define MAX_TXD 4096 +#define MIN_TXD 64 /* hardware cannot reliably support more than 512 descriptors owned by - * hardware descrioptor cache otherwise an unreliable ring under heavy + * hardware descrioptor cache otherwise an unreliable ring under heavy * recieve load may result */ -/* #define DEFAULT_RXD 1024 */ -/* #define MAX_RXD 4096 */ -#define DEFAULT_RXD 512 -#define MAX_RXD 512 -#define MIN_RXD 64 + +/* #define DEFAULT_RXD 1024 */ + +/* #define MAX_RXD 4096 */ +#define DEFAULT_RXD 512 +#define MAX_RXD 512 +#define MIN_RXD 64 /* Supported Rx Buffer Sizes */ #define IXGB_RXBUFFER_2048 2048 @@ -193,6 +195,7 @@ struct ixgb_adapter { /* structs defined in ixgb_hw.h */ struct ixgb_hw hw; struct ixgb_hw_stats stats; + uint32_t pci_state[16]; #ifdef CONFIG_PCI_MSI boolean_t have_msi; #endif diff -up linux-2.6/drivers/net/ixgb/ixgb_ee.c linux-2.6.new/drivers/net/ixgb/ixgb_ee.c --- linux-2.6/drivers/net/ixgb/ixgb_ee.c 2005-11-14 19:59:34.000000000 -0800 +++ linux-2.6.new/drivers/net/ixgb/ixgb_ee.c 2005-10-31 12:02:56.000000000 -0800 @@ -86,26 +86,23 @@ ixgb_lower_clock(struct ixgb_hw *hw, * count - number of bits to shift out *****************************************************************************/ static void -ixgb_shift_out_bits(struct ixgb_hw *hw, - uint16_t data, - uint16_t count) +ixgb_shift_out_bits(struct ixgb_hw *hw, uint16_t data, uint16_t count) { uint32_t eecd_reg; uint32_t mask; /* We need to shift "count" bits out to the EEPROM. So, value in the - * "data" parameter will be shifted out to the EEPROM one bit at a time. - * In order to do this, "data" must be broken down into bits. - */ + * "data" parameter will be shifted out to the EEPROM one bit at a + * time. In order to do this, "data" must be broken down into bits. */ mask = 0x01 << (count - 1); eecd_reg = IXGB_READ_REG(hw, EECD); eecd_reg &= ~(IXGB_EECD_DO | IXGB_EECD_DI); do { - /* A "1" is shifted out to the EEPROM by setting bit "DI" to a "1", - * and then raising and then lowering the clock (the SK bit controls - * the clock input to the EEPROM). A "0" is shifted out to the EEPROM - * by setting "DI" to "0" and then raising and then lowering the clock. - */ + /* A "1" is shifted out to the EEPROM by setting bit "DI" to a + * "1", and then raising and then lowering the clock (the SK + * bit controls the clock input to the EEPROM). A "0" is + * shifted out to the EEPROM by setting "DI" to "0" and then + * raising and then lowering the clock. */ eecd_reg &= ~IXGB_EECD_DI; if(data & mask) @@ -487,13 +484,13 @@ ixgb_get_eeprom_data(struct ixgb_hw *hw) return (FALSE); } - if ((ee_map->init_ctrl_reg_1 & le16_to_cpu(EEPROM_ICW1_SIGNATURE_MASK)) - != le16_to_cpu(EEPROM_ICW1_SIGNATURE_VALID)) { + if((ee_map->init_ctrl_reg_1 & le16_to_cpu(EEPROM_ICW1_SIGNATURE_MASK)) + != le16_to_cpu(EEPROM_ICW1_SIGNATURE_VALID)) { DEBUGOUT("ixgb_ee: Signature invalid.\n"); - return(FALSE); + return (FALSE); } - return(TRUE); + return (TRUE); } /****************************************************************************** @@ -526,7 +519,7 @@ ixgb_check_and_get_eeprom_data (struct i * index - Offset of eeprom word * * Returns: - * Word at indexed offset in eeprom, if valid, 0 otherwise. + * Word at indexed offset in eeprom, if valid, 0 otherwise. ******************************************************************************/ uint16_t ixgb_get_eeprom_word(struct ixgb_hw *hw, uint16_t index) @@ -537,20 +519,19 @@ return(hw->eeprom[index]); } - return(0); + return (0); } /****************************************************************************** * return the mac address from EEPROM * - * hw - Struct containing variables accessed by shared code + * hw - Struct containing variables accessed by shared code * mac_addr - Ethernet Address if EEPROM contents are valid, 0 otherwise * * Returns: None. ******************************************************************************/ void -ixgb_get_ee_mac_addr(struct ixgb_hw *hw, - uint8_t *mac_addr) +ixgb_get_ee_mac_addr(struct ixgb_hw *hw, uint8_t *mac_addr) { int i; struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; @@ -572,16 +568,16 @@ ixgb_get_ee_mac_addr(struct ixgb_hw *hw, * hw - Struct containing variables accessed by shared code * * Returns: - * PBA number if EEPROM contents are valid, 0 otherwise + * PBA number if EEPROM contents are valid, 0 otherwise ******************************************************************************/ uint32_t ixgb_get_ee_pba_number(struct ixgb_hw *hw) { if(ixgb_check_and_get_eeprom_data(hw) == TRUE) return (le16_to_cpu(hw->eeprom[EEPROM_PBA_1_2_REG]) - | (le16_to_cpu(hw->eeprom[EEPROM_PBA_3_4_REG])<<16)); + | (le16_to_cpu(hw->eeprom[EEPROM_PBA_3_4_REG]) << 16)); - return(0); + return (0); } @@ -591,7 +587,7 @@ ixgb_get_ee_pba_number(struct ixgb_hw *h * hw - Struct containing variables accessed by shared code * * Returns: - * Device Id if EEPROM contents are valid, 0 otherwise + * Device Id if EEPROM contents are valid, 0 otherwise ******************************************************************************/ uint16_t ixgb_get_ee_device_id(struct ixgb_hw *hw) diff -up linux-2.6/drivers/net/ixgb/ixgb_ethtool.c linux-2.6.new/drivers/net/ixgb/ixgb_ethtool.c --- linux-2.6/drivers/net/ixgb/ixgb_ethtool.c 2005-11-14 19:59:34.000000000 -0800 +++ linux-2.6.new/drivers/net/ixgb/ixgb_ethtool.c 2005-10-31 12:02:56.000000000 -0800 @@ -51,7 +51,7 @@ struct ixgb_stats { }; #define IXGB_STAT(m) sizeof(((struct ixgb_adapter *)0)->m), \ - offsetof(struct ixgb_adapter, m) + offsetof(struct ixgb_adapter, m) static struct ixgb_stats ixgb_gstrings_stats[] = { {"rx_packets", IXGB_STAT(net_stats.rx_packets)}, {"tx_packets", IXGB_STAT(net_stats.tx_packets)}, @@ -125,7 +125,7 @@ ixgb_set_settings(struct net_device *net if(ecmd->autoneg == AUTONEG_ENABLE || ecmd->speed + ecmd->duplex != SPEED_10000 + DUPLEX_FULL) return -EINVAL; - + if(netif_running(adapter->netdev)) { ixgb_down(adapter, TRUE); ixgb_reset(adapter); @@ -143,14 +143,13 @@ ixgb_set_settings(struct net_device *net } static void -ixgb_get_pauseparam(struct net_device *netdev, - struct ethtool_pauseparam *pause) +ixgb_get_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *pause) { struct ixgb_adapter *adapter = netdev_priv(netdev); struct ixgb_hw *hw = &adapter->hw; - + pause->autoneg = AUTONEG_DISABLE; - + if(hw->fc.type == ixgb_fc_rx_pause) pause->rx_pause = 1; else if(hw->fc.type == ixgb_fc_tx_pause) @@ -162,12 +161,11 @@ ixgb_get_pauseparam(struct net_device *n } static int -ixgb_set_pauseparam(struct net_device *netdev, - struct ethtool_pauseparam *pause) +ixgb_set_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *pause) { struct ixgb_adapter *adapter = netdev_priv(netdev); struct ixgb_hw *hw = &adapter->hw; - + if(pause->autoneg == AUTONEG_ENABLE) return -EINVAL; @@ -190,7 +188,7 @@ ixgb_set_pauseparam(struct net_device *n netif_wake_queue(netdev); } else ixgb_reset(adapter); - + return 0; } @@ -210,7 +208,7 @@ ixgb_set_rx_csum(struct net_device *netd adapter->rx_csum = data; if(netif_running(netdev)) { - ixgb_down(adapter,TRUE); + ixgb_down(adapter, TRUE); ixgb_up(adapter); /* be optimistic about our link, since we were up before */ adapter->link_speed = 10000; @@ -221,7 +219,7 @@ ixgb_set_rx_csum(struct net_device *netd ixgb_reset(adapter); return 0; } - + static uint32_t ixgb_get_tx_csum(struct net_device *netdev) { @@ -243,17 +241,18 @@ ixgb_set_tx_csum(struct net_device *netd static int ixgb_set_tso(struct net_device *netdev, uint32_t data) { + if(data) netdev->features |= NETIF_F_TSO; else netdev->features &= ~NETIF_F_TSO; return 0; -} +} #endif /* NETIF_F_TSO */ #define IXGB_GET_STAT(_A_, _R_) _A_->stats._R_ -static int +static int ixgb_get_regs_len(struct net_device *netdev) { #define IXGB_REG_DUMP_LEN 136*sizeof(uint32_t) @@ -261,8 +260,7 @@ ixgb_get_regs_len(struct net_device *net } static void -ixgb_get_regs(struct net_device *netdev, - struct ethtool_regs *regs, void *p) +ixgb_get_regs(struct net_device *netdev, struct ethtool_regs *regs, void *p) { struct ixgb_adapter *adapter = netdev_priv(netdev); struct ixgb_hw *hw = &adapter->hw; @@ -276,10 +274,10 @@ ixgb_get_regs(struct net_device *netdev, regs->version = (1<<24) | hw->revision_id << 16 | hw->device_id; /* General Registers */ - *reg++ = IXGB_READ_REG(hw, CTRL0); /* 0 */ - *reg++ = IXGB_READ_REG(hw, CTRL1); /* 1 */ - *reg++ = IXGB_READ_REG(hw, STATUS); /* 2 */ - *reg++ = IXGB_READ_REG(hw, EECD); /* 3 */ + *reg++ = IXGB_READ_REG(hw, CTRL0); /* 0 */ + *reg++ = IXGB_READ_REG(hw, CTRL1); /* 1 */ + *reg++ = IXGB_READ_REG(hw, STATUS); /* 2 */ + *reg++ = IXGB_READ_REG(hw, EECD); /* 3 */ *reg++ = IXGB_READ_REG(hw, MFS); /* 4 */ /* Interrupt */ @@ -289,18 +287,18 @@ ixgb_get_regs(struct net_device *netdev, *reg++ = IXGB_READ_REG(hw, IMC); /* 8 */ /* Receive */ - *reg++ = IXGB_READ_REG(hw, RCTL); /* 9 */ - *reg++ = IXGB_READ_REG(hw, FCRTL); /* 10 */ - *reg++ = IXGB_READ_REG(hw, FCRTH); /* 11 */ - *reg++ = IXGB_READ_REG(hw, RDBAL); /* 12 */ - *reg++ = IXGB_READ_REG(hw, RDBAH); /* 13 */ - *reg++ = IXGB_READ_REG(hw, RDLEN); /* 14 */ + *reg++ = IXGB_READ_REG(hw, RCTL); /* 9 */ + *reg++ = IXGB_READ_REG(hw, FCRTL); /* 10 */ + *reg++ = IXGB_READ_REG(hw, FCRTH); /* 11 */ + *reg++ = IXGB_READ_REG(hw, RDBAL); /* 12 */ + *reg++ = IXGB_READ_REG(hw, RDBAH); /* 13 */ + *reg++ = IXGB_READ_REG(hw, RDLEN); /* 14 */ *reg++ = IXGB_READ_REG(hw, RDH); /* 15 */ *reg++ = IXGB_READ_REG(hw, RDT); /* 16 */ - *reg++ = IXGB_READ_REG(hw, RDTR); /* 17 */ - *reg++ = IXGB_READ_REG(hw, RXDCTL); /* 18 */ - *reg++ = IXGB_READ_REG(hw, RAIDC); /* 19 */ - *reg++ = IXGB_READ_REG(hw, RXCSUM); /* 20 */ + *reg++ = IXGB_READ_REG(hw, RDTR); /* 17 */ + *reg++ = IXGB_READ_REG(hw, RXDCTL); /* 18 */ + *reg++ = IXGB_READ_REG(hw, RAIDC); /* 19 */ + *reg++ = IXGB_READ_REG(hw, RXCSUM); /* 20 */ /* there are 16 RAR entries in hardware, we only use 3 */ for(i = 0; i < 16; i++) { @@ -309,35 +307,36 @@ ixgb_get_regs(struct net_device *netdev, } /* Transmit */ - *reg++ = IXGB_READ_REG(hw, TCTL); /* 53 */ - *reg++ = IXGB_READ_REG(hw, TDBAL); /* 54 */ - *reg++ = IXGB_READ_REG(hw, TDBAH); /* 55 */ - *reg++ = IXGB_READ_REG(hw, TDLEN); /* 56 */ + *reg++ = IXGB_READ_REG(hw, TCTL); /* 53 */ + *reg++ = IXGB_READ_REG(hw, TDBAL); /* 54 */ + *reg++ = IXGB_READ_REG(hw, TDBAH); /* 55 */ + *reg++ = IXGB_READ_REG(hw, TDLEN); /* 56 */ *reg++ = IXGB_READ_REG(hw, TDH); /* 57 */ *reg++ = IXGB_READ_REG(hw, TDT); /* 58 */ - *reg++ = IXGB_READ_REG(hw, TIDV); /* 59 */ - *reg++ = IXGB_READ_REG(hw, TXDCTL); /* 60 */ - *reg++ = IXGB_READ_REG(hw, TSPMT); /* 61 */ + *reg++ = IXGB_READ_REG(hw, TIDV); /* 59 */ + *reg++ = IXGB_READ_REG(hw, TXDCTL); /* 60 */ + *reg++ = IXGB_READ_REG(hw, TSPMT); /* 61 */ *reg++ = IXGB_READ_REG(hw, PAP); /* 62 */ /* Physical */ - *reg++ = IXGB_READ_REG(hw, PCSC1); /* 63 */ - *reg++ = IXGB_READ_REG(hw, PCSC2); /* 64 */ - *reg++ = IXGB_READ_REG(hw, PCSS1); /* 65 */ - *reg++ = IXGB_READ_REG(hw, PCSS2); /* 66 */ - *reg++ = IXGB_READ_REG(hw, XPCSS); /* 67 */ - *reg++ = IXGB_READ_REG(hw, UCCR); /* 68 */ - *reg++ = IXGB_READ_REG(hw, XPCSTC); /* 69 */ - *reg++ = IXGB_READ_REG(hw, MACA); /* 70 */ - *reg++ = IXGB_READ_REG(hw, APAE); /* 71 */ + *reg++ = IXGB_READ_REG(hw, PCSC1); /* 63 */ + *reg++ = IXGB_READ_REG(hw, PCSC2); /* 64 */ + *reg++ = IXGB_READ_REG(hw, PCSS1); /* 65 */ + *reg++ = IXGB_READ_REG(hw, PCSS2); /* 66 */ + *reg++ = IXGB_READ_REG(hw, XPCSS); /* 67 */ + *reg++ = IXGB_READ_REG(hw, UCCR); /* 68 */ + *reg++ = IXGB_READ_REG(hw, XPCSTC); /* 69 */ + *reg++ = IXGB_READ_REG(hw, MACA); /* 70 */ + *reg++ = IXGB_READ_REG(hw, APAE); /* 71 */ *reg++ = IXGB_READ_REG(hw, ARD); /* 72 */ *reg++ = IXGB_READ_REG(hw, AIS); /* 73 */ - *reg++ = IXGB_READ_REG(hw, MSCA); /* 74 */ - *reg++ = IXGB_READ_REG(hw, MSRWD); /* 75 */ + *reg++ = IXGB_READ_REG(hw, MSCA); /* 74 */ + *reg++ = IXGB_READ_REG(hw, MSRWD); /* 75 */ + /* Statistics */ - *reg++ = IXGB_GET_STAT(adapter, tprl); /* 76 */ - *reg++ = IXGB_GET_STAT(adapter, tprh); /* 77 */ + *reg++ = IXGB_GET_STAT(adapter, tprl); /* 76 */ + *reg++ = IXGB_GET_STAT(adapter, tprh); /* 77 */ *reg++ = IXGB_GET_STAT(adapter, gprcl); /* 78 */ *reg++ = IXGB_GET_STAT(adapter, gprch); /* 79 */ *reg++ = IXGB_GET_STAT(adapter, bprcl); /* 80 */ @@ -352,18 +351,18 @@ ixgb_get_regs(struct net_device *netdev, *reg++ = IXGB_GET_STAT(adapter, jprch); /* 89 */ *reg++ = IXGB_GET_STAT(adapter, gorcl); /* 90 */ *reg++ = IXGB_GET_STAT(adapter, gorch); /* 91 */ - *reg++ = IXGB_GET_STAT(adapter, torl); /* 92 */ - *reg++ = IXGB_GET_STAT(adapter, torh); /* 93 */ - *reg++ = IXGB_GET_STAT(adapter, rnbc); /* 94 */ - *reg++ = IXGB_GET_STAT(adapter, ruc); /* 95 */ - *reg++ = IXGB_GET_STAT(adapter, roc); /* 96 */ - *reg++ = IXGB_GET_STAT(adapter, rlec); /* 97 */ - *reg++ = IXGB_GET_STAT(adapter, crcerrs); /* 98 */ - *reg++ = IXGB_GET_STAT(adapter, icbc); /* 99 */ - *reg++ = IXGB_GET_STAT(adapter, ecbc); /* 100 */ - *reg++ = IXGB_GET_STAT(adapter, mpc); /* 101 */ - *reg++ = IXGB_GET_STAT(adapter, tptl); /* 102 */ - *reg++ = IXGB_GET_STAT(adapter, tpth); /* 103 */ + *reg++ = IXGB_GET_STAT(adapter, torl); /* 92 */ + *reg++ = IXGB_GET_STAT(adapter, torh); /* 93 */ + *reg++ = IXGB_GET_STAT(adapter, rnbc); /* 94 */ + *reg++ = IXGB_GET_STAT(adapter, ruc); /* 95 */ + *reg++ = IXGB_GET_STAT(adapter, roc); /* 96 */ + *reg++ = IXGB_GET_STAT(adapter, rlec); /* 97 */ + *reg++ = IXGB_GET_STAT(adapter, crcerrs); /* 98 */ + *reg++ = IXGB_GET_STAT(adapter, icbc); /* 99 */ + *reg++ = IXGB_GET_STAT(adapter, ecbc); /* 100 */ + *reg++ = IXGB_GET_STAT(adapter, mpc); /* 101 */ + *reg++ = IXGB_GET_STAT(adapter, tptl); /* 102 */ + *reg++ = IXGB_GET_STAT(adapter, tpth); /* 103 */ *reg++ = IXGB_GET_STAT(adapter, gptcl); /* 104 */ *reg++ = IXGB_GET_STAT(adapter, gptch); /* 105 */ *reg++ = IXGB_GET_STAT(adapter, bptcl); /* 106 */ @@ -378,24 +377,24 @@ ixgb_get_regs(struct net_device *netdev, *reg++ = IXGB_GET_STAT(adapter, jptch); /* 115 */ *reg++ = IXGB_GET_STAT(adapter, gotcl); /* 116 */ *reg++ = IXGB_GET_STAT(adapter, gotch); /* 117 */ - *reg++ = IXGB_GET_STAT(adapter, totl); /* 118 */ - *reg++ = IXGB_GET_STAT(adapter, toth); /* 119 */ - *reg++ = IXGB_GET_STAT(adapter, dc); /* 120 */ - *reg++ = IXGB_GET_STAT(adapter, plt64c); /* 121 */ + *reg++ = IXGB_GET_STAT(adapter, totl); /* 118 */ + *reg++ = IXGB_GET_STAT(adapter, toth); /* 119 */ + *reg++ = IXGB_GET_STAT(adapter, dc); /* 120 */ + *reg++ = IXGB_GET_STAT(adapter, plt64c); /* 121 */ *reg++ = IXGB_GET_STAT(adapter, tsctc); /* 122 */ - *reg++ = IXGB_GET_STAT(adapter, tsctfc); /* 123 */ - *reg++ = IXGB_GET_STAT(adapter, ibic); /* 124 */ - *reg++ = IXGB_GET_STAT(adapter, rfc); /* 125 */ - *reg++ = IXGB_GET_STAT(adapter, lfc); /* 126 */ - *reg++ = IXGB_GET_STAT(adapter, pfrc); /* 127 */ - *reg++ = IXGB_GET_STAT(adapter, pftc); /* 128 */ + *reg++ = IXGB_GET_STAT(adapter, tsctfc); /* 123 */ + *reg++ = IXGB_GET_STAT(adapter, ibic); /* 124 */ + *reg++ = IXGB_GET_STAT(adapter, rfc); /* 125 */ + *reg++ = IXGB_GET_STAT(adapter, lfc); /* 126 */ + *reg++ = IXGB_GET_STAT(adapter, pfrc); /* 127 */ + *reg++ = IXGB_GET_STAT(adapter, pftc); /* 128 */ *reg++ = IXGB_GET_STAT(adapter, mcfrc); /* 129 */ *reg++ = IXGB_GET_STAT(adapter, mcftc); /* 130 */ - *reg++ = IXGB_GET_STAT(adapter, xonrxc); /* 131 */ - *reg++ = IXGB_GET_STAT(adapter, xontxc); /* 132 */ - *reg++ = IXGB_GET_STAT(adapter, xoffrxc); /* 133 */ - *reg++ = IXGB_GET_STAT(adapter, xofftxc); /* 134 */ - *reg++ = IXGB_GET_STAT(adapter, rjc); /* 135 */ + *reg++ = IXGB_GET_STAT(adapter, xonrxc); /* 131 */ + *reg++ = IXGB_GET_STAT(adapter, xontxc); /* 132 */ + *reg++ = IXGB_GET_STAT(adapter, xoffrxc); /* 133 */ + *reg++ = IXGB_GET_STAT(adapter, xofftxc); /* 134 */ + *reg++ = IXGB_GET_STAT(adapter, rjc); /* 135 */ regs->len = (reg - reg_start) * sizeof(uint32_t); } @@ -448,7 +447,7 @@ ixgb_get_eeprom(struct net_device *netde } memcpy(bytes, (uint8_t *)eeprom_buff + (eeprom->offset & 1), - eeprom->len); + eeprom->len); kfree(eeprom_buff); geeprom_error: @@ -497,11 +496,12 @@ ixgb_set_eeprom(struct net_device *netde if((eeprom->offset + eeprom->len) & 1) { /* need read/modify/write of last changed EEPROM word */ /* only the first byte of the word is being modified */ - eeprom_buff[last_word - first_word] + eeprom_buff[last_word - first_word] = ixgb_read_eeprom(hw, last_word); } memcpy(ptr, bytes, eeprom->len); + for(i = 0; i <= (last_word - first_word); i++) ixgb_write_eeprom(hw, first_word + i, eeprom_buff[i]); @@ -514,12 +514,11 @@ ixgb_set_eeprom(struct net_device *netde } static void -ixgb_get_drvinfo(struct net_device *netdev, - struct ethtool_drvinfo *drvinfo) +ixgb_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo) { struct ixgb_adapter *adapter = netdev_priv(netdev); - strncpy(drvinfo->driver, ixgb_driver_name, 32); + strncpy(drvinfo->driver, ixgb_driver_name, 32); strncpy(drvinfo->version, ixgb_driver_version, 32); strncpy(drvinfo->fw_version, "N/A", 32); strncpy(drvinfo->bus_info, pci_name(adapter->pdev), 32); @@ -529,14 +528,13 @@ ixgb_get_drvinfo(struct net_device *netd } static void -ixgb_get_ringparam(struct net_device *netdev, - struct ethtool_ringparam *ring) +ixgb_get_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring) { struct ixgb_adapter *adapter = netdev_priv(netdev); struct ixgb_desc_ring *txdr = &adapter->tx_ring; struct ixgb_desc_ring *rxdr = &adapter->rx_ring; - ring->rx_max_pending = MAX_RXD; + ring->rx_max_pending = MAX_RXD; ring->tx_max_pending = MAX_TXD; ring->rx_mini_max_pending = 0; ring->rx_jumbo_max_pending = 0; @@ -546,9 +544,8 @@ ixgb_get_ringparam(struct net_device *ne ring->rx_jumbo_pending = 0; } -static int -ixgb_set_ringparam(struct net_device *netdev, - struct ethtool_ringparam *ring) +static int +ixgb_set_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring) { struct ixgb_adapter *adapter = netdev_priv(netdev); struct ixgb_desc_ring *txdr = &adapter->tx_ring; @@ -559,19 +556,19 @@ ixgb_set_ringparam(struct net_device *ne tx_old = adapter->tx_ring; rx_old = adapter->rx_ring; - if((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) + if((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) return -EINVAL; if(netif_running(adapter->netdev)) - ixgb_down(adapter,TRUE); + 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); + 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 */ @@ -657,75 +654,76 @@ ixgb_phys_id(struct net_device *netdev, return 0; } -static int +static int ixgb_get_stats_count(struct net_device *netdev) { return IXGB_STATS_LEN; } -static void -ixgb_get_ethtool_stats(struct net_device *netdev, - struct ethtool_stats *stats, uint64_t *data) +static void +ixgb_get_ethtool_stats(struct net_device *netdev, struct ethtool_stats *stats, + uint64_t * data) { struct ixgb_adapter *adapter = netdev_priv(netdev); int i; ixgb_update_stats(adapter); for(i = 0; i < IXGB_STATS_LEN; i++) { - char *p = (char *)adapter+ixgb_gstrings_stats[i].stat_offset; - data[i] = (ixgb_gstrings_stats[i].sizeof_stat == - sizeof(uint64_t)) ? *(uint64_t *)p : *(uint32_t *)p; + char *p = (char *)adapter + ixgb_gstrings_stats[i].stat_offset; + + data[i] = (ixgb_gstrings_stats[i].sizeof_stat == + sizeof(uint64_t)) ? *(uint64_t *) p : *(uint32_t *)p; } } -static void +static void ixgb_get_strings(struct net_device *netdev, uint32_t stringset, uint8_t *data) { int i; switch(stringset) { case ETH_SS_STATS: - for(i=0; i < IXGB_STATS_LEN; i++) { - memcpy(data + i * ETH_GSTRING_LEN, - ixgb_gstrings_stats[i].stat_string, - ETH_GSTRING_LEN); + for(i = 0; i < IXGB_STATS_LEN; i++) { + memcpy(data + i * ETH_GSTRING_LEN, + ixgb_gstrings_stats[i].stat_string, + ETH_GSTRING_LEN); } break; } } static struct ethtool_ops ixgb_ethtool_ops = { - .get_settings = ixgb_get_settings, - .set_settings = ixgb_set_settings, - .get_drvinfo = ixgb_get_drvinfo, - .get_regs_len = ixgb_get_regs_len, - .get_regs = ixgb_get_regs, - .get_link = ethtool_op_get_link, - .get_eeprom_len = ixgb_get_eeprom_len, - .get_eeprom = ixgb_get_eeprom, - .set_eeprom = ixgb_set_eeprom, - .get_ringparam = ixgb_get_ringparam, - .set_ringparam = ixgb_set_ringparam, - .get_pauseparam = ixgb_get_pauseparam, - .set_pauseparam = ixgb_set_pauseparam, - .get_rx_csum = ixgb_get_rx_csum, - .set_rx_csum = ixgb_set_rx_csum, - .get_tx_csum = ixgb_get_tx_csum, - .set_tx_csum = ixgb_set_tx_csum, - .get_sg = ethtool_op_get_sg, - .set_sg = ethtool_op_set_sg, + .get_settings = ixgb_get_settings, + .set_settings = ixgb_set_settings, + .get_drvinfo = ixgb_get_drvinfo, + .get_regs_len = ixgb_get_regs_len, + .get_regs = ixgb_get_regs, + .get_link = ethtool_op_get_link, + .get_eeprom_len = ixgb_get_eeprom_len, + .get_eeprom = ixgb_get_eeprom, + .set_eeprom = ixgb_set_eeprom, + .get_ringparam = ixgb_get_ringparam, + .set_ringparam = ixgb_set_ringparam, + .get_pauseparam = ixgb_get_pauseparam, + .set_pauseparam = ixgb_set_pauseparam, + .get_rx_csum = ixgb_get_rx_csum, + .set_rx_csum = ixgb_set_rx_csum, + .get_tx_csum = ixgb_get_tx_csum, + .set_tx_csum = ixgb_set_tx_csum, + .get_sg = ethtool_op_get_sg, + .set_sg = ethtool_op_set_sg, #ifdef NETIF_F_TSO - .get_tso = ethtool_op_get_tso, - .set_tso = ixgb_set_tso, + .get_tso = ethtool_op_get_tso, + .set_tso = ixgb_set_tso, #endif - .get_strings = ixgb_get_strings, - .phys_id = ixgb_phys_id, - .get_stats_count = ixgb_get_stats_count, - .get_ethtool_stats = ixgb_get_ethtool_stats, - .get_perm_addr = ethtool_op_get_perm_addr, + .get_strings = ixgb_get_strings, + .phys_id = ixgb_phys_id, + .get_stats_count = ixgb_get_stats_count, + .get_ethtool_stats = ixgb_get_ethtool_stats, }; -void ixgb_set_ethtool_ops(struct net_device *netdev) +void +set_ethtool_ops(struct net_device *netdev) { SET_ETHTOOL_OPS(netdev, &ixgb_ethtool_ops); } diff -up linux-2.6/drivers/net/ixgb/ixgb_hw.c linux-2.6.new/drivers/net/ixgb/ixgb_hw.c --- linux-2.6/drivers/net/ixgb/ixgb_hw.c 2005-11-14 19:59:34.000000000 -0800 +++ linux-2.6.new/drivers/net/ixgb/ixgb_hw.c 2005-10-31 12:02:56.000000000 -0800 @@ -35,7 +35,7 @@ /* Local function prototypes */ -static uint32_t ixgb_hash_mc_addr(struct ixgb_hw *hw, uint8_t * mc_addr); +static uint32_t ixgb_hash_mc_addr(struct ixgb_hw *hw, uint8_t *mc_addr); static void ixgb_mta_set(struct ixgb_hw *hw, uint32_t hash_value); @@ -111,35 +111,31 @@ ixgb_adapter_stop(struct ixgb_hw *hw) DEBUGFUNC("ixgb_adapter_stop"); /* If we are stopped or resetting exit gracefully and wait to be - * started again before accessing the hardware. - */ + * started again before accessing the hardware. */ if(hw->adapter_stopped) { DEBUGOUT("Exiting because the adapter is already stopped!!!\n"); return FALSE; } - /* Set the Adapter Stopped flag so other driver functions stop - * touching the Hardware. - */ + /* Set the Adapter Stopped flag so other driver functions stop touching + * the Hardware. */ hw->adapter_stopped = TRUE; /* Clear interrupt mask to stop board from generating interrupts */ DEBUGOUT("Masking off all interrupts\n"); IXGB_WRITE_REG(hw, IMC, 0xFFFFFFFF); - /* Disable the Transmit and Receive units. Then delay to allow - * any pending transactions to complete before we hit the MAC with - * the global reset. - */ + /* Disable the Transmit and Receive units. Then delay to allow any + * pending transactions to complete before we hit the MAC with the + * global reset. */ IXGB_WRITE_REG(hw, RCTL, IXGB_READ_REG(hw, RCTL) & ~IXGB_RCTL_RXEN); IXGB_WRITE_REG(hw, TCTL, IXGB_READ_REG(hw, TCTL) & ~IXGB_TCTL_TXEN); msec_delay(IXGB_DELAY_BEFORE_RESET); /* Issue a global reset to the MAC. This will reset the chip's - * transmit, receive, DMA, and link units. It will not effect - * the current PCI configuration. The global reset bit is self- - * clearing, and should clear within a microsecond. - */ + * transmit, receive, DMA, and link units. It will not effect the + * current PCI configuration. The global reset bit is self- clearing, + * and should clear within a microsecond. */ DEBUGOUT("Issuing a global reset to MAC\n"); ctrl_reg = ixgb_mac_reset(hw); @@ -200,7 +196,7 @@ ixgb_identify_xpak_vendor(struct ixgb_hw * Determine the physical layer module on the adapter. * * hw - Struct containing variables accessed by shared code. The device_id - * field must be (correctly) populated before calling this routine. + * field must be (correctly) populated before calling this routine. * * Returns: the phy type of the adapter. *****************************************************************************/ @@ -259,8 +255,8 @@ ixgb_identify_phy(struct ixgb_hw *hw) * Leaves the transmit and receive units disabled and uninitialized. * * Returns: - * TRUE if successful, - * FALSE if unrecoverable problems were encountered. + * TRUE if successful, + * FALSE if unrecoverable problems were encountered. *****************************************************************************/ boolean_t ixgb_init_hw(struct ixgb_hw *hw) @@ -310,7 +280,7 @@ ixgb_init_hw(struct ixgb_hw *hw) */ if (!mac_addr_valid(hw->curr_mac_addr)) { DEBUGOUT("MAC address invalid after ixgb_init_rx_addrs\n"); - return(FALSE); + return (FALSE); } /* tell the routines in this file they can access hardware again */ @@ -441,33 +437,28 @@ ixgb_mc_addr_list_update(struct ixgb_hw DEBUGOUT(" Adding the multicast addresses:\n"); DEBUGOUT7(" MC Addr #%d =%.2X %.2X %.2X %.2X %.2X %.2X\n", i, mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad)], - mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad) + - 1], - mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad) + - 2], - mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad) + - 3], - mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad) + - 4], - mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad) + - 5]); + mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad) + 1], + mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad) + 2], + mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad) + 3], + mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad) + 4], + mc_addr_list[i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad) + 5]); /* Place this multicast address in the RAR if there is room, * - * else put it in the MTA - */ + * else put it in the MTA */ if(rar_used_count < IXGB_RAR_ENTRIES) { ixgb_rar_set(hw, - mc_addr_list + - (i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad)), - rar_used_count); + mc_addr_list + + (i * (IXGB_ETH_LENGTH_OF_ADDRESS + pad)), + rar_used_count); DEBUGOUT1("Added a multicast address to RAR[%d]\n", i); rar_used_count++; } else { - hash_value = ixgb_hash_mc_addr(hw, - mc_addr_list + - (i * - (IXGB_ETH_LENGTH_OF_ADDRESS - + pad))); + hash_value = + ixgb_hash_mc_addr(hw, + mc_addr_list + + (i * + (IXGB_ETH_LENGTH_OF_ADDRESS + + pad))); DEBUGOUT1(" Hash value = 0x%03X\n", hash_value); @@ -637,7 +607,7 @@ ixgb_clear_vfta(struct ixgb_hw *hw) ixgb_setup_fc(struct ixgb_hw *hw) { uint32_t ctrl_reg; - uint32_t pap_reg = 0; /* by default, assume no pause time */ + uint32_t pap_reg = 0; /* by default, assume no pause time */ boolean_t status = TRUE; DEBUGFUNC("ixgb_setup_fc"); @@ -724,7 +715,7 @@ ixgb_setup_fc(struct ixgb_hw *hw) * Reads a word from a device over the Management Data Interface (MDI) bus. * This interface is used to manage Physical layer devices. * - * hw - Struct containing variables accessed by hw code + * hw - Struct containing variables accessed by hw code * reg_address - Offset of device register being read. * phy_address - Address of device on MDI. * @@ -750,22 +716,21 @@ ixgb_read_phy_reg(struct ixgb_hw *hw, ASSERT(device_type <= IXGB_MAX_PHY_DEV_TYPE); /* Setup and write the address cycle command */ - command = ((reg_address << IXGB_MSCA_NP_ADDR_SHIFT) | - (device_type << IXGB_MSCA_DEV_TYPE_SHIFT) | - (phy_address << IXGB_MSCA_PHY_ADDR_SHIFT) | - (IXGB_MSCA_ADDR_CYCLE | IXGB_MSCA_MDI_COMMAND)); + command = ((reg_address << IXGB_MSCA_NP_ADDR_SHIFT) | + (device_type << IXGB_MSCA_DEV_TYPE_SHIFT) | + (phy_address << IXGB_MSCA_PHY_ADDR_SHIFT) | + (IXGB_MSCA_ADDR_CYCLE | IXGB_MSCA_MDI_COMMAND)); IXGB_WRITE_REG(hw, MSCA, command); - /************************************************************** - ** Check every 10 usec to see if the address cycle completed - ** The COMMAND bit will clear when the operation is complete. - ** This may take as long as 64 usecs (we'll wait 100 usecs max) - ** from the CPU Write to the Ready bit assertion. - **************************************************************/ + /************************************************************** + ** Check every 10 usec to see if the address cycle completed + ** The COMMAND bit will clear when the operation is complete. + ** This may take as long as 64 usecs (we'll wait 100 usecs max) + ** from the CPU Write to the Ready bit assertion. + **************************************************************/ - for(i = 0; i < 10; i++) - { + for(i = 0; i < 10; i++) { udelay(10); command = IXGB_READ_REG(hw, MSCA); @@ -777,22 +716,21 @@ ASSERT((command & IXGB_MSCA_MDI_COMMAND) == 0); /* Address cycle complete, setup and write the read command */ - command = ((reg_address << IXGB_MSCA_NP_ADDR_SHIFT) | - (device_type << IXGB_MSCA_DEV_TYPE_SHIFT) | - (phy_address << IXGB_MSCA_PHY_ADDR_SHIFT) | - (IXGB_MSCA_READ | IXGB_MSCA_MDI_COMMAND)); + command = ((reg_address << IXGB_MSCA_NP_ADDR_SHIFT) | + (device_type << IXGB_MSCA_DEV_TYPE_SHIFT) | + (phy_address << IXGB_MSCA_PHY_ADDR_SHIFT) | + (IXGB_MSCA_READ | IXGB_MSCA_MDI_COMMAND)); IXGB_WRITE_REG(hw, MSCA, command); - /************************************************************** - ** Check every 10 usec to see if the read command completed - ** The COMMAND bit will clear when the operation is complete. - ** The read may take as long as 64 usecs (we'll wait 100 usecs max) - ** from the CPU Write to the Ready bit assertion. - **************************************************************/ + /************************************************************** + ** Check every 10 usec to see if the read command completed + ** The COMMAND bit will clear when the operation is complete. + ** The read may take as long as 64 usecs (we'll wait 100 usecs max) + ** from the CPU Write to the Ready bit assertion. + **************************************************************/ - for(i = 0; i < 10; i++) - { + for(i = 0; i < 10; i++) { udelay(10); command = IXGB_READ_REG(hw, MSCA); @@ -804,11 +716,10 @@ ASSERT((command & IXGB_MSCA_MDI_COMMAND) == 0); /* Operation is complete, get the data from the MDIO Read/Write Data - * register and return. - */ + * register and return. */ data = IXGB_READ_REG(hw, MSRWD); data >>= IXGB_MSRWD_READ_DATA_SHIFT; - return((uint16_t) data); + return ((uint16_t)data); } /****************************************************************************** @@ -815,11 +716,11 @@ * Writes a word to a device over the Management Data Interface (MDI) bus. * This interface is used to manage Physical layer devices. * - * hw - Struct containing variables accessed by hw code + * hw - Struct containing variables accessed by hw code * reg_address - Offset of device register being read. * phy_address - Address of device on MDI. * device_type - Also known as the Device ID or DID. - * data - 16-bit value to be written + * data - 16-bit value to be written * * Returns: void. * @@ -860,8 +823,7 @@ ixgb_write_phy_reg(struct ixgb_hw *hw, ** from the CPU Write to the Ready bit assertion. **************************************************************/ - for(i = 0; i < 10; i++) - { + for(i = 0; i < 10; i++) { udelay(10); command = IXGB_READ_REG(hw, MSCA); @@ -887,8 +850,7 @@ ixgb_write_phy_reg(struct ixgb_hw *hw, ** from the CPU Write to the Ready bit assertion. **************************************************************/ - for(i = 0; i < 10; i++) - { + for(i = 0; i < 10; i++) { udelay(10); command = IXGB_READ_REG(hw, MSCA); @@ -1172,7 +1138,7 @@ ixgb_link_reset(struct ixgb_hw *hw) do { /* Reset the link */ IXGB_WRITE_REG(hw, CTRL0, - IXGB_READ_REG(hw, CTRL0) | IXGB_CTRL0_LRST); + IXGB_READ_REG(hw, CTRL0) | IXGB_CTRL0_LRST); /* Wait for link-up and lane re-alignment */ do { diff -up linux-2.6/drivers/net/ixgb/ixgb_hw.h linux-2.6.new/drivers/net/ixgb/ixgb_hw.h --- linux-2.6/drivers/net/ixgb/ixgb_hw.h 2005-11-14 19:59:34.000000000 -0800 +++ linux-2.6.new/drivers/net/ixgb/ixgb_hw.h 2005-10-31 12:02:56.000000000 -0800 @@ -648,32 +648,32 @@ struct ixgb_flash_buffer { * This is a little-endian specific check. */ #define IS_MULTICAST(Address) \ - (boolean_t)(((uint8_t *)(Address))[0] & ((uint8_t)0x01)) + (boolean_t)(((uint8_t *)(Address))[0] & ((uint8_t)0x01)) /* * Check whether an address is broadcast. */ -#define IS_BROADCAST(Address) \ - ((((uint8_t *)(Address))[0] == ((uint8_t)0xff)) && (((uint8_t *)(Address))[1] == ((uint8_t)0xff))) +#define IS_BROADCAST(Address) \ + ((((uint8_t *)(Address))[0] == ((uint8_t)0xff)) && (((uint8_t *)(Address))[1] == ((uint8_t)0xff))) /* Flow control parameters */ struct ixgb_fc { - uint32_t high_water; /* Flow Control High-water */ - uint32_t low_water; /* Flow Control Low-water */ - uint16_t pause_time; /* Flow Control Pause timer */ - boolean_t send_xon; /* Flow control send XON */ - ixgb_fc_type type; /* Type of flow control */ + uint32_t high_water; /* Flow Control High-water */ + uint32_t low_water; /* Flow Control Low-water */ + uint16_t pause_time; /* Flow Control Pause timer */ + boolean_t send_xon; /* Flow control send XON */ + ixgb_fc_type type; /* Type of flow control */ }; /* The historical defaults for the flow control values are given below. */ -#define FC_DEFAULT_HI_THRESH (0x8000) /* 32KB */ -#define FC_DEFAULT_LO_THRESH (0x4000) /* 16KB */ -#define FC_DEFAULT_TX_TIMER (0x100) /* ~130 us */ +#define FC_DEFAULT_HI_THRESH (0x8000) /* 32KB */ +#define FC_DEFAULT_LO_THRESH (0x4000) /* 16KB */ +#define FC_DEFAULT_TX_TIMER (0x100) /* ~130 us */ /* Phy definitions */ -#define IXGB_MAX_PHY_REG_ADDRESS 0xFFFF -#define IXGB_MAX_PHY_ADDRESS 31 -#define IXGB_MAX_PHY_DEV_TYPE 31 +#define IXGB_MAX_PHY_REG_ADDRESS 0xFFFF +#define IXGB_MAX_PHY_ADDRESS 31 +#define IXGB_MAX_PHY_DEV_TYPE 31 /* Bus parameters */ struct ixgb_bus { @@ -683,34 +683,38 @@ struct ixgb_bus { }; struct ixgb_hw { - uint8_t __iomem *hw_addr;/* Base Address of the hardware */ - void *back; /* Pointer to OS-dependent struct */ - struct ixgb_fc fc; /* Flow control parameters */ - struct ixgb_bus bus; /* Bus parameters */ - uint32_t phy_id; /* Phy Identifier */ - uint32_t phy_addr; /* XGMII address of Phy */ - ixgb_mac_type mac_type; /* Identifier for MAC controller */ - ixgb_phy_type phy_type; /* Transceiver/phy identifier */ - uint32_t max_frame_size; /* Maximum frame size supported */ - uint32_t mc_filter_type; /* Multicast filter hash type */ + uint8_t *hw_addr; /* Base Address of the hardware */ + void *back; /* Pointer to OS-dependent struct */ + struct ixgb_fc fc; /* Flow control parameters */ + struct ixgb_bus bus; /* Bus parameters */ + uint32_t phy_id; /* Phy Identifier */ + uint32_t phy_addr; /* XGMII address of Phy */ + ixgb_mac_type mac_type; /* Identifier for MAC controller */ + ixgb_phy_type phy_type; /* Transceiver/phy identifier */ + uint32_t max_frame_size; /* Maximum frame size supported */ + uint32_t mc_filter_type; /* Multicast filter hash type */ uint32_t num_mc_addrs; /* Number of current Multicast addrs */ - uint8_t curr_mac_addr[IXGB_ETH_LENGTH_OF_ADDRESS]; /* Individual address currently programmed in MAC */ - uint32_t num_tx_desc; /* Number of Transmit descriptors */ - uint32_t num_rx_desc; /* Number of Receive descriptors */ - uint32_t rx_buffer_size; /* Size of Receive buffer */ - boolean_t link_up; /* TRUE if link is valid */ - boolean_t adapter_stopped; /* State of adapter */ + /* Individual address currently programmed in MAC */ + uint8_t curr_mac_addr[IXGB_ETH_LENGTH_OF_ADDRESS]; + uint32_t num_tx_desc; /* Number of Transmit descriptors */ + uint32_t num_rx_desc; /* Number of Receive descriptors */ + uint32_t rx_buffer_size; /* Size of Receive buffer */ + boolean_t link_up; /* TRUE if link is valid */ + boolean_t adapter_stopped; /* State of adapter */ uint16_t device_id; /* device id from PCI configuration space */ uint16_t vendor_id; /* vendor id from PCI configuration space */ uint8_t revision_id; /* revision id from PCI configuration space */ - uint16_t subsystem_vendor_id; /* subsystem vendor id from PCI configuration space */ + uint16_t subsystem_vendor_id; /* subsystem vendor id from PCI + * configuration space */ uint16_t subsystem_id; /* subsystem id from PCI configuration space */ - uint32_t bar0; /* Base Address registers */ + uint32_t bar0; /* Base Address registers */ uint32_t bar1; uint32_t bar2; uint32_t bar3; - uint16_t pci_cmd_word; /* PCI command register id from PCI configuration space */ - uint16_t eeprom[IXGB_EEPROM_SIZE]; /* EEPROM contents read at init time */ + uint16_t pci_cmd_word; /* PCI command register id from PCI + * configuration space */ + uint16_t eeprom[IXGB_EEPROM_SIZE]; /* EEPROM contents read at init + * time */ unsigned long io_base; /* Our I/O mapped location */ uint32_t lastLFC; uint32_t lastRFC; diff -up linux-2.6/drivers/net/ixgb/ixgb_main.c linux-2.6.new/drivers/net/ixgb/ixgb_main.c --- linux-2.6/drivers/net/ixgb/ixgb_main.c 2005-11-14 19:59:34.000000000 -0800 +++ linux-2.6.new/drivers/net/ixgb/ixgb_main.c 2005-10-31 12:02:56.000000000 -0800 @@ -71,7 +71,7 @@ static struct pci_device_id ixgb_pci_tbl PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, {INTEL_VENDOR_ID, IXGB_DEVICE_ID_82597EX_SR, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, - {INTEL_VENDOR_ID, IXGB_DEVICE_ID_82597EX_LR, + {INTEL_VENDOR_ID, IXGB_DEVICE_ID_82597EX_LR, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, /* required last entry */ @@ -344,8 +344,7 @@ ixgb_reset(struct ixgb_adapter *adapter) **/ static int __devinit -ixgb_probe(struct pci_dev *pdev, - const struct pci_device_id *ent) +ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { struct net_device *netdev = NULL; struct ixgb_adapter *adapter; @@ -785,8 +788,8 @@ ixgb_setup_rctl(struct ixgb_adapter *ada rctl &= ~(3 << IXGB_RCTL_MO_SHIFT); rctl |= - IXGB_RCTL_BAM | IXGB_RCTL_RDMTS_1_2 | - IXGB_RCTL_RXEN | IXGB_RCTL_CFF | + IXGB_RCTL_BAM | IXGB_RCTL_RDMTS_1_2 | + IXGB_RCTL_RXEN | IXGB_RCTL_CFF | (adapter->hw.mc_filter_type << IXGB_RCTL_MO_SHIFT); rctl |= IXGB_RCTL_SECRC; @@ -1120,8 +1119,7 @@ ixgb_watchdog(unsigned long data) if(netif_carrier_ok(netdev)) { adapter->link_speed = 0; adapter->link_duplex = 0; - printk(KERN_INFO - "ixgb: %s NIC Link is Down\n", + printk(KERN_INFO "ixgb: %s NIC Link is Down\n", netdev->name); netif_carrier_off(netdev); netif_stop_queue(netdev); @@ -1339,7 +1337,8 @@ ixgb_tx_map(struct ixgb_adapter *adapter } static inline void -ixgb_tx_queue(struct ixgb_adapter *adapter, int count, int vlan_id,int tx_flags) +ixgb_tx_queue(struct ixgb_adapter *adapter, int count, int vlan_id, + int tx_flags) { struct ixgb_desc_ring *tx_ring = &adapter->tx_ring; struct ixgb_tx_desc *tx_desc = NULL; @@ -1425,7 +1402,7 @@ ixgb_xmit_frame(struct sk_buff *skb, str } first = adapter->tx_ring.next_to_use; - + tso = ixgb_tso(adapter, skb); if (tso < 0) { dev_kfree_skb_any(skb); @@ -1438,7 +1402,7 @@ tx_flags |= IXGB_TX_FLAGS_CSUM; ixgb_tx_queue(adapter, ixgb_tx_map(adapter, skb, first), vlan_id, - tx_flags); + tx_flags); netdev->trans_start = jiffies; @@ -1702,7 +1647,7 @@ ixgb_intr(int irq, void *data, struct pt if(!ixgb_clean_rx_irq(adapter) & !ixgb_clean_tx_irq(adapter)) break; -#endif +#endif return IRQ_HANDLED; } @@ -1758,7 +1733,7 @@ ixgb_clean_tx_irq(struct ixgb_adapter *a while(eop_desc->status & IXGB_TX_DESC_STATUS_DD) { - for(cleaned = FALSE; !cleaned; ) { + for (cleaned = FALSE; !cleaned;) { tx_desc = IXGB_TX_DESC(*tx_ring, i); buffer_info = &tx_ring->buffer_info[i]; @@ -1903,16 +1902,15 @@ ixgb_clean_rx_irq(struct ixgb_adapter *a /* All receives must fit into a single buffer */ IXGB_DBG("Receive packet consumed multiple buffers " - "length<%x>\n", length); + "length<%x>\n", length); dev_kfree_skb_irq(skb); goto rxdesc_done; } - if (unlikely(rx_desc->errors - & (IXGB_RX_DESC_ERRORS_CE | IXGB_RX_DESC_ERRORS_SE - | IXGB_RX_DESC_ERRORS_P | - IXGB_RX_DESC_ERRORS_RXE))) { + if(unlikely(rx_desc->errors & + (IXGB_RX_DESC_ERRORS_CE | IXGB_RX_DESC_ERRORS_SE | + IXGB_RX_DESC_ERRORS_P | IXGB_RX_DESC_ERRORS_RXE))) { dev_kfree_skb_irq(skb); goto rxdesc_done; @@ -1928,15 +1926,15 @@ ixgb_clean_rx_irq(struct ixgb_adapter *a #ifdef CONFIG_IXGB_NAPI if(adapter->vlgrp && (status & IXGB_RX_DESC_STATUS_VP)) { vlan_hwaccel_receive_skb(skb, adapter->vlgrp, - le16_to_cpu(rx_desc->special) & - IXGB_RX_DESC_SPECIAL_VLAN_MASK); + le16_to_cpu(rx_desc->special) & + IXGB_RX_DESC_SPECIAL_VLAN_MASK); } else { netif_receive_skb(skb); } #else /* CONFIG_IXGB_NAPI */ if(adapter->vlgrp && (status & IXGB_RX_DESC_STATUS_VP)) { vlan_hwaccel_rx(skb, adapter->vlgrp, - le16_to_cpu(rx_desc->special) & + le16_to_cpu(rx_desc->special) & IXGB_RX_DESC_SPECIAL_VLAN_MASK); } else { netif_rx(skb); @@ -1996,10 +1994,9 @@ ixgb_alloc_rx_buffers(struct ixgb_adapte break; } - /* Make buffer alignment 2 beyond a 16 byte boundary - * this will result in a 16 byte aligned IP header after - * the 14 byte MAC header is removed - */ + /* Make buffer alignment 2 beyond a 16 byte boundary this will + * result in a 16 byte aligned IP header after the 14 byte MAC + * header is removed */ skb_reserve(skb, NET_IP_ALIGN); skb->dev = netdev; @@ -2007,10 +2004,8 @@ ixgb_alloc_rx_buffers(struct ixgb_adapte buffer_info->skb = skb; buffer_info->length = adapter->rx_buffer_len; buffer_info->dma = - pci_map_single(pdev, - skb->data, - adapter->rx_buffer_len, - PCI_DMA_FROMDEVICE); + pci_map_single(pdev, skb->data, adapter->rx_buffer_len, + PCI_DMA_FROMDEVICE); rx_desc->buff_addr = cpu_to_le64(buffer_info->dma); /* guarantee DD bit not set now before h/w gets descriptor @@ -2018,11 +2013,11 @@ ixgb_alloc_rx_buffers(struct ixgb_adapte * writeback. */ rx_desc->status = 0; - if((i & ~(num_group_tail_writes- 1)) == i) { + if((i & ~(num_group_tail_writes - 1)) == i) { /* Force memory writes to complete before letting h/w * know there are new descriptors to fetch. (Only - * applicable for weak-ordered memory model archs, - * such as IA-64). */ + * applicable for weak-ordered memory model archs, such + * as IA-64). */ wmb(); IXGB_WRITE_REG(&adapter->hw, RDT, i); @@ -2037,7 +2004,7 @@ ixgb_alloc_rx_buffers(struct ixgb_adapte /** * ixgb_vlan_rx_register - enables or disables vlan tagging/stripping. - * + * * @param netdev network interface device structure * @param grp indicates to enable or disable tagging/stripping **/ @@ -2106,7 +2101,7 @@ ixgb_vlan_rx_kill_vid(struct net_device ixgb_irq_enable(adapter); - /* remove VID from filter table*/ + /* remove VID from filter table */ index = (vid >> 5) & 0x7F; vfta = IXGB_READ_REG_ARRAY(&adapter->hw, VFTA, index); diff -up linux-2.6/drivers/net/ixgb/ixgb_param.c linux-2.6.new/drivers/net/ixgb/ixgb_param.c --- linux-2.6/drivers/net/ixgb/ixgb_param.c 2005-11-14 19:59:34.000000000 -0800 +++ linux-2.6.new/drivers/net/ixgb/ixgb_param.c 2005-10-31 12:02:56.000000000 -0800 @@ -135,7 +135,7 @@ IXGB_PARAM(RxIntDelay, "Receive Interrup /* Flow control request timeout (how long to pause the link partner's tx) * (PAP 15:0) * - * Valid Range: 1 - 65535 + * Valid Range: 1 - 65535 * * Default Value: 256 (0x100) */ - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html