Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (60 commits)
  [NIU]: Bump driver version and release date.
  [NIU]: Fix BMAC alternate MAC address indexing.
  net: fix kernel-doc warnings in header files
  [IPV6]: Use BUG_ON instead of if + BUG in fib6_del_route.
  [IPV6]: dst_entry leak in ip4ip6_err. (resend)
  bluetooth: do not move child device other than rfcomm
  bluetooth: put hci dev after del conn
  [NET]: Elminate spurious print_mac() calls.
  [BLUETOOTH] hci_sysfs.c: Kill build warning.
  [NET]: Remove MAC_FMT
  net/8021q/vlan_dev.c: Use print_mac.
  [XFRM]: Fix ordering issue in xfrm_dst_hash_transfer().
  [BLUETOOTH] net/bluetooth/hci_core.c: Use time_* macros
  [IPV6]: Fix hardcoded removing of old module code
  [NETLABEL]: Move some initialization code into __init section.
  [NETLABEL]: Shrink the genl-ops registration code.
  [AX25] ax25_out: check skb for NULL in ax25_kick()
  [TCP]: Fix tcp_v4_send_synack() comment
  [IPV4]: fix alignment of IP-Config output
  Documentation: fix tcp.txt
  ...
  • Loading branch information
Linus Torvalds committed Feb 19, 2008
2 parents 4bc87e6 + a442585 commit 07ce198
Show file tree
Hide file tree
Showing 54 changed files with 572 additions and 474 deletions.
8 changes: 4 additions & 4 deletions Documentation/networking/tcp.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
TCP protocol
============

Last updated: 21 June 2005
Last updated: 9 February 2008

Contents
========
Expand Down Expand Up @@ -52,9 +52,9 @@ research and RFC's before developing new modules.
The method that is used to determine which congestion control mechanism is
determined by the setting of the sysctl net.ipv4.tcp_congestion_control.
The default congestion control will be the last one registered (LIFO);
so if you built everything as modules. the default will be reno. If you
build with the default's from Kconfig, then BIC will be builtin (not a module)
and it will end up the default.
so if you built everything as modules, the default will be reno. If you
build with the defaults from Kconfig, then CUBIC will be builtin (not a
module) and it will end up the default.

If you really want a particular default value then you will need
to set it with the sysctl. If you use a sysctl, the module will be autoloaded
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/e1000/e1000_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ struct e1000_stats {
int stat_offset;
};

#define E1000_STAT(m) sizeof(((struct e1000_adapter *)0)->m), \
#define E1000_STAT(m) FIELD_SIZEOF(struct e1000_adapter, m), \
offsetof(struct e1000_adapter, m)
static const struct e1000_stats e1000_gstrings_stats[] = {
{ "rx_packets", E1000_STAT(stats.gprc) },
Expand Down
8 changes: 8 additions & 0 deletions drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,14 @@ e1000_probe(struct pci_dev *pdev,

printk("%s\n", print_mac(mac, netdev->dev_addr));

if (adapter->hw.bus_type == e1000_bus_type_pci_express) {
DPRINTK(PROBE, WARNING, "This device (id %04x:%04x) will no "
"longer be supported by this driver in the future.\n",
pdev->vendor, pdev->device);
DPRINTK(PROBE, WARNING, "please use the \"e1000e\" "
"driver instead.\n");
}

/* reset the hardware with the new settings */
e1000_reset(adapter);

Expand Down
34 changes: 4 additions & 30 deletions drivers/net/e1000e/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1055,23 +1055,6 @@ static void e1000_release_hw_control(struct e1000_adapter *adapter)
}
}

static void e1000_release_manageability(struct e1000_adapter *adapter)
{
if (adapter->flags & FLAG_MNG_PT_ENABLED) {
struct e1000_hw *hw = &adapter->hw;

u32 manc = er32(MANC);

/* re-enable hardware interception of ARP */
manc |= E1000_MANC_ARP_EN;
manc &= ~E1000_MANC_EN_MNG2HOST;

/* don't explicitly have to mess with MANC2H since
* MANC has an enable disable that gates MANC2H */
ew32(MANC, manc);
}
}

/**
* @e1000_alloc_ring - allocate memory for a ring structure
**/
Expand Down Expand Up @@ -1561,9 +1544,6 @@ static void e1000_init_manageability(struct e1000_adapter *adapter)

manc = er32(MANC);

/* disable hardware interception of ARP */
manc &= ~(E1000_MANC_ARP_EN);

/* enable receiving management packets to the host. this will probably
* generate destination unreachable messages from the host OS, but
* the packets will be handled on SMBUS */
Expand Down Expand Up @@ -1690,6 +1670,9 @@ static void e1000_setup_rctl(struct e1000_adapter *adapter)
else
rctl |= E1000_RCTL_LPE;

/* Enable hardware CRC frame stripping */
rctl |= E1000_RCTL_SECRC;

/* Setup buffer sizes */
rctl &= ~E1000_RCTL_SZ_4096;
rctl |= E1000_RCTL_BSEX;
Expand Down Expand Up @@ -1755,9 +1738,6 @@ static void e1000_setup_rctl(struct e1000_adapter *adapter)

/* Enable Packet split descriptors */
rctl |= E1000_RCTL_DTYP_PS;

/* Enable hardware CRC frame stripping */
rctl |= E1000_RCTL_SECRC;

psrctl |= adapter->rx_ps_bsize0 >>
E1000_PSRCTL_BSIZE0_SHIFT;
Expand Down Expand Up @@ -2008,7 +1988,7 @@ static void e1000_power_down_phy(struct e1000_adapter *adapter)
u16 mii_reg;

/* WoL is enabled */
if (!adapter->wol)
if (adapter->wol)
return;

/* non-copper PHY? */
Expand Down Expand Up @@ -2140,8 +2120,6 @@ void e1000e_reset(struct e1000_adapter *adapter)
phy_data &= ~IGP02E1000_PM_SPD;
e1e_wphy(hw, IGP02E1000_PHY_POWER_MGMT, phy_data);
}

e1000_release_manageability(adapter);
}

int e1000e_up(struct e1000_adapter *adapter)
Expand Down Expand Up @@ -3487,8 +3465,6 @@ static int e1000_suspend(struct pci_dev *pdev, pm_message_t state)
pci_enable_wake(pdev, PCI_D3cold, 0);
}

e1000_release_manageability(adapter);

/* make sure adapter isn't asleep if manageability is enabled */
if (adapter->flags & FLAG_MNG_PT_ENABLED) {
pci_enable_wake(pdev, PCI_D3hot, 1);
Expand Down Expand Up @@ -4054,8 +4030,6 @@ static void __devexit e1000_remove(struct pci_dev *pdev)

flush_scheduled_work();

e1000_release_manageability(adapter);

/* Release control of h/w to f/w. If f/w is AMT enabled, this
* would have already happened in close and is redundant. */
e1000_release_hw_control(adapter);
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ static void free_skb_resources(struct gfar_private *priv);
static void gfar_set_multi(struct net_device *dev);
static void gfar_set_hash_for_addr(struct net_device *dev, u8 *addr);
static void gfar_configure_serdes(struct net_device *dev);
extern int gfar_local_mdio_write(struct gfar_mii *regs, int mii_id, int regnum, u16 value);
extern int gfar_local_mdio_read(struct gfar_mii *regs, int mii_id, int regnum);
extern int gfar_local_mdio_write(struct gfar_mii __iomem *regs, int mii_id, int regnum, u16 value);
extern int gfar_local_mdio_read(struct gfar_mii __iomem *regs, int mii_id, int regnum);
#ifdef CONFIG_GFAR_NAPI
static int gfar_poll(struct napi_struct *napi, int budget);
#endif
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/gianfar_mii.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
* the local mdio pins, which may not be the same as system mdio bus, used for
* controlling the external PHYs, for example.
*/
int gfar_local_mdio_write(struct gfar_mii *regs, int mii_id,
int gfar_local_mdio_write(struct gfar_mii __iomem *regs, int mii_id,
int regnum, u16 value)
{
/* Set the PHY address and the register address we want to write */
Expand All @@ -77,7 +77,7 @@ int gfar_local_mdio_write(struct gfar_mii *regs, int mii_id,
* and are always tied to the local mdio pins, which may not be the
* same as system mdio bus, used for controlling the external PHYs, for eg.
*/
int gfar_local_mdio_read(struct gfar_mii *regs, int mii_id, int regnum)
int gfar_local_mdio_read(struct gfar_mii __iomem *regs, int mii_id, int regnum)

{
u16 value;
Expand Down
5 changes: 2 additions & 3 deletions drivers/net/hamradio/mkiss.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,25 +289,24 @@ static void ax_bump(struct mkiss *ax)
*ax->rbuff &= ~0x20;
}
}
spin_unlock_bh(&ax->buflock);

count = ax->rcount;

if ((skb = dev_alloc_skb(count)) == NULL) {
printk(KERN_ERR "mkiss: %s: memory squeeze, dropping packet.\n",
ax->dev->name);
ax->stats.rx_dropped++;
spin_unlock_bh(&ax->buflock);
return;
}

spin_lock_bh(&ax->buflock);
memcpy(skb_put(skb,count), ax->rbuff, count);
spin_unlock_bh(&ax->buflock);
skb->protocol = ax25_type_trans(skb, ax->dev);
netif_rx(skb);
ax->dev->last_rx = jiffies;
ax->stats.rx_packets++;
ax->stats.rx_bytes += count;
spin_unlock_bh(&ax->buflock);
}

static void kiss_unesc(struct mkiss *ax, unsigned char s)
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/igb/igb_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct igb_stats {
int stat_offset;
};

#define IGB_STAT(m) sizeof(((struct igb_adapter *)0)->m), \
#define IGB_STAT(m) FIELD_SIZEOF(struct igb_adapter, m), \
offsetof(struct igb_adapter, m)
static const struct igb_stats igb_gstrings_stats[] = {
{ "rx_packets", IGB_STAT(stats.gprc) },
Expand Down
28 changes: 0 additions & 28 deletions drivers/net/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -606,9 +606,6 @@ static void igb_init_manageability(struct igb_adapter *adapter)
u32 manc2h = rd32(E1000_MANC2H);
u32 manc = rd32(E1000_MANC);

/* disable hardware interception of ARP */
manc &= ~(E1000_MANC_ARP_EN);

/* enable receiving management packets to the host */
/* this will probably generate destination unreachable messages
* from the host OS, but the packets will be handled on SMBUS */
Expand All @@ -623,25 +620,6 @@ static void igb_init_manageability(struct igb_adapter *adapter)
}
}

static void igb_release_manageability(struct igb_adapter *adapter)
{
struct e1000_hw *hw = &adapter->hw;

if (adapter->en_mng_pt) {
u32 manc = rd32(E1000_MANC);

/* re-enable hardware interception of ARP */
manc |= E1000_MANC_ARP_EN;
manc &= ~E1000_MANC_EN_MNG2HOST;

/* don't explicitly have to mess with MANC2H since
* MANC has an enable disable that gates MANC2H */

/* XXX stop the hardware watchdog ? */
wr32(E1000_MANC, manc);
}
}

/**
* igb_configure - configure the hardware for RX and TX
* @adapter: private board structure
Expand Down Expand Up @@ -844,7 +822,6 @@ void igb_reset(struct igb_adapter *adapter)

igb_reset_adaptive(&adapter->hw);
adapter->hw.phy.ops.get_phy_info(&adapter->hw);
igb_release_manageability(adapter);
}

/**
Expand Down Expand Up @@ -1178,9 +1155,6 @@ static void __devexit igb_remove(struct pci_dev *pdev)

flush_scheduled_work();


igb_release_manageability(adapter);

/* Release control of h/w to f/w. If f/w is AMT enabled, this
* would have already happened in close and is redundant. */
igb_release_hw_control(adapter);
Expand Down Expand Up @@ -3955,8 +3929,6 @@ static int igb_suspend(struct pci_dev *pdev, pm_message_t state)
pci_enable_wake(pdev, PCI_D3cold, 0);
}

igb_release_manageability(adapter);

/* make sure adapter isn't asleep if manageability is enabled */
if (adapter->en_mng_pt) {
pci_enable_wake(pdev, PCI_D3hot, 1);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ixgb/ixgb_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct ixgb_stats {
int stat_offset;
};

#define IXGB_STAT(m) sizeof(((struct ixgb_adapter *)0)->m), \
#define IXGB_STAT(m) FIELD_SIZEOF(struct ixgb_adapter, m), \
offsetof(struct ixgb_adapter, m)
static struct ixgb_stats ixgb_gstrings_stats[] = {
{"rx_packets", IXGB_STAT(net_stats.rx_packets)},
Expand Down
41 changes: 33 additions & 8 deletions drivers/net/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,18 +220,13 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_adapter *adapter,
tx_ring->stats.bytes += tx_buffer_info->length;
if (cleaned) {
struct sk_buff *skb = tx_buffer_info->skb;
#ifdef NETIF_F_TSO
unsigned int segs, bytecount;
segs = skb_shinfo(skb)->gso_segs ?: 1;
/* multiply data chunks by size of headers */
bytecount = ((segs - 1) * skb_headlen(skb)) +
skb->len;
total_tx_packets += segs;
total_tx_bytes += bytecount;
#else
total_tx_packets++;
total_tx_bytes += skb->len;
#endif
}
ixgbe_unmap_and_free_tx_resource(adapter,
tx_buffer_info);
Expand Down Expand Up @@ -1942,6 +1937,10 @@ static int ixgbe_open(struct net_device *netdev)
int err;
u32 num_rx_queues = adapter->num_rx_queues;

/* disallow open during test */
if (test_bit(__IXGBE_TESTING, &adapter->state))
return -EBUSY;

try_intr_reinit:
/* allocate transmit descriptors */
err = ixgbe_setup_all_tx_resources(adapter);
Expand Down Expand Up @@ -2278,11 +2277,29 @@ static bool ixgbe_tx_csum(struct ixgbe_adapter *adapter,
IXGBE_ADVTXD_DTYP_CTXT);

if (skb->ip_summed == CHECKSUM_PARTIAL) {
if (skb->protocol == htons(ETH_P_IP))
switch (skb->protocol) {
case __constant_htons(ETH_P_IP):
type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_IPV4;
if (ip_hdr(skb)->protocol == IPPROTO_TCP)
type_tucmd_mlhl |=
IXGBE_ADVTXD_TUCMD_L4T_TCP;
break;

case __constant_htons(ETH_P_IPV6):
/* XXX what about other V6 headers?? */
if (ipv6_hdr(skb)->nexthdr == IPPROTO_TCP)
type_tucmd_mlhl |=
IXGBE_ADVTXD_TUCMD_L4T_TCP;
break;

if (skb->sk->sk_protocol == IPPROTO_TCP)
type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_L4T_TCP;
default:
if (unlikely(net_ratelimit())) {
DPRINTK(PROBE, WARNING,
"partial checksum but proto=%x!\n",
skb->protocol);
}
break;
}
}

context_desc->type_tucmd_mlhl = cpu_to_le32(type_tucmd_mlhl);
Expand Down Expand Up @@ -2778,6 +2795,14 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
hw->mac.type, hw->phy.type,
(part_num >> 8), (part_num & 0xff));

if (link_width <= IXGBE_PCI_LINK_WIDTH_4) {
dev_warn(&pdev->dev, "PCI-Express bandwidth available for "
"this card is not sufficient for optimal "
"performance.\n");
dev_warn(&pdev->dev, "For optimal performance a x8 "
"PCI-Express slot is required.\n");
}

/* reset the hardware with the new settings */
ixgbe_start_hw(hw);

Expand Down
11 changes: 8 additions & 3 deletions drivers/net/niu.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@

#define DRV_MODULE_NAME "niu"
#define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "0.6"
#define DRV_MODULE_RELDATE "January 5, 2008"
#define DRV_MODULE_VERSION "0.7"
#define DRV_MODULE_RELDATE "February 18, 2008"

static char version[] __devinitdata =
DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
Expand Down Expand Up @@ -5147,7 +5147,12 @@ static void niu_set_rx_mode(struct net_device *dev)
index++;
}
} else {
for (i = 0; i < niu_num_alt_addr(np); i++) {
int alt_start;
if (np->flags & NIU_FLAGS_XMAC)
alt_start = 0;
else
alt_start = 1;
for (i = alt_start; i < niu_num_alt_addr(np); i++) {
err = niu_enable_alt_mac(np, i, 0);
if (err)
printk(KERN_WARNING PFX "%s: Error %d "
Expand Down
12 changes: 10 additions & 2 deletions drivers/net/pcmcia/smc91c92_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,16 @@ static int mhz_setup(struct pcmcia_device *link)

/* Read the station address from the CIS. It is stored as the last
(fourth) string in the Version 1 Version/ID tuple. */
if (link->prod_id[3]) {
station_addr = link->prod_id[3];
tuple->DesiredTuple = CISTPL_VERS_1;
if (first_tuple(link, tuple, parse) != CS_SUCCESS) {
rc = -1;
goto free_cfg_mem;
}
/* Ugh -- the EM1144 card has two VERS_1 tuples!?! */
if (next_tuple(link, tuple, parse) != CS_SUCCESS)
first_tuple(link, tuple, parse);
if (parse->version_1.ns > 3) {
station_addr = parse->version_1.str + parse->version_1.ofs[3];
if (cvt_ascii_address(dev, station_addr) == 0) {
rc = 0;
goto free_cfg_mem;
Expand Down
Loading

0 comments on commit 07ce198

Please sign in to comment.