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: (29 commits)
  tcp: Restore ordering of TCP options for the sake of inter-operability
  net: Fix disjunct computation of netdev features
  sctp: Fix to handle SHUTDOWN in SHUTDOWN_RECEIVED state
  sctp: Fix to handle SHUTDOWN in SHUTDOWN-PENDING state
  sctp: Add check for the TSN field of the SHUTDOWN chunk
  sctp: Drop ICMP packet too big message with MTU larger than current PMTU
  p54: enable 2.4/5GHz spectrum by eeprom bits.
  orinoco: reduce stack usage in firmware download path
  ath5k: fix suspend-related oops on rmmod
  [netdrvr] fec_mpc52xx: Implement polling, to make netconsole work.
  qlge: Fix MSI/legacy single interrupt bug.
  smc911x: Make the driver safer on SMP
  smc911x: Add IRQ polarity configuration
  smc911x: Allow Kconfig dependency on ARM
  sis190: add identifier for Atheros AR8021 PHY
  8139x: reduce message severity on driver overlap
  igb: add IGB_DCA instead of selecting INTEL_IOATDMA
  igb: fix tx data corruption with transition to L0s on 82575
  ehea: Fix memory hotplug support
  netdev: DM9000: remove BLACKFIN hacking in DM9000 netdev driver
  ...
  • Loading branch information
Linus Torvalds committed Oct 24, 2008
2 parents 5579a78 + fd6149d commit 2242d5e
Show file tree
Hide file tree
Showing 35 changed files with 556 additions and 290 deletions.
5 changes: 2 additions & 3 deletions drivers/net/8139cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1836,10 +1836,9 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)

if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pdev->revision < 0x20) {
dev_err(&pdev->dev,
"This (id %04x:%04x rev %02x) is not an 8139C+ compatible chip\n",
dev_info(&pdev->dev,
"This (id %04x:%04x rev %02x) is not an 8139C+ compatible chip, use 8139too\n",
pdev->vendor, pdev->device, pdev->revision);
dev_err(&pdev->dev, "Try the \"8139too\" driver instead.\n");
return -ENODEV;
}

Expand Down
5 changes: 2 additions & 3 deletions drivers/net/8139too.c
Original file line number Diff line number Diff line change
Expand Up @@ -946,10 +946,9 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pdev->revision >= 0x20) {
dev_info(&pdev->dev,
"This (id %04x:%04x rev %02x) is an enhanced 8139C+ chip\n",
"This (id %04x:%04x rev %02x) is an enhanced 8139C+ chip, use 8139cp\n",
pdev->vendor, pdev->device, pdev->revision);
dev_info(&pdev->dev,
"Use the \"8139cp\" driver for improved performance and stability.\n");
return -ENODEV;
}

if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
Expand Down
9 changes: 7 additions & 2 deletions drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ config SMC91X
select CRC32
select MII
depends on ARM || REDWOOD_5 || REDWOOD_6 || M32R || SUPERH || \
SOC_AU1X00 || BLACKFIN || MN10300
MIPS || BLACKFIN || MN10300
help
This is a driver for SMC's 91x series of Ethernet chipsets,
including the SMC91C94 and the SMC91C111. Say Y if you want it
Expand Down Expand Up @@ -966,7 +966,7 @@ config SMC911X
tristate "SMSC LAN911[5678] support"
select CRC32
select MII
depends on ARCH_PXA || SUPERH
depends on ARM || SUPERH
help
This is a driver for SMSC's LAN911x series of Ethernet chipsets
including the new LAN9115, LAN9116, LAN9117, and LAN9118.
Expand Down Expand Up @@ -2009,6 +2009,11 @@ config IGB_LRO

If in doubt, say N.

config IGB_DCA
bool "Enable DCA"
default y
depends on IGB && DCA && !(IGB=y && DCA=m)

source "drivers/net/ixp2000/Kconfig"

config MYRI_SBUS
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/ax88796.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,12 +838,12 @@ static int ax_probe(struct platform_device *pdev)

/* find the platform resources */

dev->irq = platform_get_irq(pdev, 0);
if (dev->irq < 0) {
ret = platform_get_irq(pdev, 0);
if (ret < 0) {
dev_err(&pdev->dev, "no IRQ specified\n");
ret = -ENXIO;
goto exit_mem;
}
dev->irq = ret;

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (res == NULL) {
Expand Down
16 changes: 11 additions & 5 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1341,18 +1341,24 @@ static int bond_compute_features(struct bonding *bond)
int i;

features &= ~(NETIF_F_ALL_CSUM | BOND_VLAN_FEATURES);
features |= NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA |
NETIF_F_GSO_MASK | NETIF_F_NO_CSUM;
features |= NETIF_F_GSO_MASK | NETIF_F_NO_CSUM;

if (!bond->first_slave)
goto done;

features &= ~NETIF_F_ONE_FOR_ALL;

bond_for_each_slave(bond, slave, i) {
features = netdev_compute_features(features,
slave->dev->features);
features = netdev_increment_features(features,
slave->dev->features,
NETIF_F_ONE_FOR_ALL);
if (slave->dev->hard_header_len > max_hard_header_len)
max_hard_header_len = slave->dev->hard_header_len;
}

done:
features |= (bond_dev->features & BOND_VLAN_FEATURES);
bond_dev->features = features;
bond_dev->features = netdev_fix_features(features, NULL);
bond_dev->hard_header_len = max_hard_header_len;

return 0;
Expand Down
1 change: 1 addition & 0 deletions drivers/net/cxgb3/l2t.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ struct l2t_data *t3_init_l2t(unsigned int l2t_capacity)
for (i = 0; i < l2t_capacity; ++i) {
d->l2tab[i].idx = i;
d->l2tab[i].state = L2T_STATE_UNUSED;
__skb_queue_head_init(&d->l2tab[i].arpq);
spin_lock_init(&d->l2tab[i].lock);
atomic_set(&d->l2tab[i].refcnt, 0);
}
Expand Down
9 changes: 0 additions & 9 deletions drivers/net/dm9000.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,6 @@
#define CARDNAME "dm9000"
#define DRV_VERSION "1.31"

#ifdef CONFIG_BLACKFIN
#define readsb insb
#define readsw insw
#define readsl insl
#define writesb outsb
#define writesw outsw
#define writesl outsl
#endif

/*
* Transmit timeout, default 5 seconds.
*/
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ehea/ehea.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include <asm/io.h>

#define DRV_NAME "ehea"
#define DRV_VERSION "EHEA_0093"
#define DRV_VERSION "EHEA_0094"

/* eHEA capability flags */
#define DLPAR_PORT_ADD_REM 1
Expand Down
25 changes: 15 additions & 10 deletions drivers/net/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2863,7 +2863,7 @@ static void ehea_rereg_mrs(struct work_struct *work)
struct ehea_adapter *adapter;

mutex_lock(&dlpar_mem_lock);
ehea_info("LPAR memory enlarged - re-initializing driver");
ehea_info("LPAR memory changed - re-initializing driver");

list_for_each_entry(adapter, &adapter_list, list)
if (adapter->active_ports) {
Expand Down Expand Up @@ -2900,13 +2900,6 @@ static void ehea_rereg_mrs(struct work_struct *work)
}
}

ehea_destroy_busmap();
ret = ehea_create_busmap();
if (ret) {
ehea_error("creating ehea busmap failed");
goto out;
}

clear_bit(__EHEA_STOP_XFER, &ehea_driver_flags);

list_for_each_entry(adapter, &adapter_list, list)
Expand Down Expand Up @@ -3519,9 +3512,21 @@ void ehea_crash_handler(void)
static int ehea_mem_notifier(struct notifier_block *nb,
unsigned long action, void *data)
{
struct memory_notify *arg = data;
switch (action) {
case MEM_OFFLINE:
ehea_info("memory has been removed");
case MEM_CANCEL_OFFLINE:
ehea_info("memory offlining canceled");
/* Readd canceled memory block */
case MEM_ONLINE:
ehea_info("memory is going online");
if (ehea_add_sect_bmap(arg->start_pfn, arg->nr_pages))
return NOTIFY_BAD;
ehea_rereg_mrs(NULL);
break;
case MEM_GOING_OFFLINE:
ehea_info("memory is going offline");
if (ehea_rem_sect_bmap(arg->start_pfn, arg->nr_pages))
return NOTIFY_BAD;
ehea_rereg_mrs(NULL);
break;
default:
Expand Down
131 changes: 101 additions & 30 deletions drivers/net/ehea/ehea_qmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ static inline int ehea_calc_index(unsigned long i, unsigned long s)
static inline int ehea_init_top_bmap(struct ehea_top_bmap *ehea_top_bmap,
int dir)
{
if(!ehea_top_bmap->dir[dir]) {
if (!ehea_top_bmap->dir[dir]) {
ehea_top_bmap->dir[dir] =
kzalloc(sizeof(struct ehea_dir_bmap), GFP_KERNEL);
if (!ehea_top_bmap->dir[dir])
Expand All @@ -578,7 +578,7 @@ static inline int ehea_init_top_bmap(struct ehea_top_bmap *ehea_top_bmap,

static inline int ehea_init_bmap(struct ehea_bmap *ehea_bmap, int top, int dir)
{
if(!ehea_bmap->top[top]) {
if (!ehea_bmap->top[top]) {
ehea_bmap->top[top] =
kzalloc(sizeof(struct ehea_top_bmap), GFP_KERNEL);
if (!ehea_bmap->top[top])
Expand All @@ -587,53 +587,124 @@ static inline int ehea_init_bmap(struct ehea_bmap *ehea_bmap, int top, int dir)
return ehea_init_top_bmap(ehea_bmap->top[top], dir);
}

static int ehea_create_busmap_callback(unsigned long pfn,
unsigned long nr_pages, void *arg)
{
unsigned long i, mr_len, start_section, end_section;
start_section = (pfn * PAGE_SIZE) / EHEA_SECTSIZE;
end_section = start_section + ((nr_pages * PAGE_SIZE) / EHEA_SECTSIZE);
mr_len = *(unsigned long *)arg;
static DEFINE_MUTEX(ehea_busmap_mutex);
static unsigned long ehea_mr_len;

if (!ehea_bmap)
ehea_bmap = kzalloc(sizeof(struct ehea_bmap), GFP_KERNEL);
if (!ehea_bmap)
return -ENOMEM;
#define EHEA_BUSMAP_ADD_SECT 1
#define EHEA_BUSMAP_REM_SECT 0

for (i = start_section; i < end_section; i++) {
int ret;
int top, dir, idx;
u64 vaddr;
static void ehea_rebuild_busmap(void)
{
u64 vaddr = EHEA_BUSMAP_START;
int top, dir, idx;

for (top = 0; top < EHEA_MAP_ENTRIES; top++) {
struct ehea_top_bmap *ehea_top;
int valid_dir_entries = 0;

top = ehea_calc_index(i, EHEA_TOP_INDEX_SHIFT);
dir = ehea_calc_index(i, EHEA_DIR_INDEX_SHIFT);
if (!ehea_bmap->top[top])
continue;
ehea_top = ehea_bmap->top[top];
for (dir = 0; dir < EHEA_MAP_ENTRIES; dir++) {
struct ehea_dir_bmap *ehea_dir;
int valid_entries = 0;

ret = ehea_init_bmap(ehea_bmap, top, dir);
if(ret)
return ret;
if (!ehea_top->dir[dir])
continue;
valid_dir_entries++;
ehea_dir = ehea_top->dir[dir];
for (idx = 0; idx < EHEA_MAP_ENTRIES; idx++) {
if (!ehea_dir->ent[idx])
continue;
valid_entries++;
ehea_dir->ent[idx] = vaddr;
vaddr += EHEA_SECTSIZE;
}
if (!valid_entries) {
ehea_top->dir[dir] = NULL;
kfree(ehea_dir);
}
}
if (!valid_dir_entries) {
ehea_bmap->top[top] = NULL;
kfree(ehea_top);
}
}
}

idx = i & EHEA_INDEX_MASK;
vaddr = EHEA_BUSMAP_START + mr_len + i * EHEA_SECTSIZE;
static int ehea_update_busmap(unsigned long pfn, unsigned long pgnum, int add)
{
unsigned long i, start_section, end_section;

ehea_bmap->top[top]->dir[dir]->ent[idx] = vaddr;
if (!ehea_bmap) {
ehea_bmap = kzalloc(sizeof(struct ehea_bmap), GFP_KERNEL);
if (!ehea_bmap)
return -ENOMEM;
}

mr_len += nr_pages * PAGE_SIZE;
*(unsigned long *)arg = mr_len;
start_section = (pfn * PAGE_SIZE) / EHEA_SECTSIZE;
end_section = start_section + ((pgnum * PAGE_SIZE) / EHEA_SECTSIZE);
/* Mark entries as valid or invalid only; address is assigned later */
for (i = start_section; i < end_section; i++) {
u64 flag;
int top = ehea_calc_index(i, EHEA_TOP_INDEX_SHIFT);
int dir = ehea_calc_index(i, EHEA_DIR_INDEX_SHIFT);
int idx = i & EHEA_INDEX_MASK;

if (add) {
int ret = ehea_init_bmap(ehea_bmap, top, dir);
if (ret)
return ret;
flag = 1; /* valid */
ehea_mr_len += EHEA_SECTSIZE;
} else {
if (!ehea_bmap->top[top])
continue;
if (!ehea_bmap->top[top]->dir[dir])
continue;
flag = 0; /* invalid */
ehea_mr_len -= EHEA_SECTSIZE;
}

ehea_bmap->top[top]->dir[dir]->ent[idx] = flag;
}
ehea_rebuild_busmap(); /* Assign contiguous addresses for mr */
return 0;
}

static unsigned long ehea_mr_len;
int ehea_add_sect_bmap(unsigned long pfn, unsigned long nr_pages)
{
int ret;

static DEFINE_MUTEX(ehea_busmap_mutex);
mutex_lock(&ehea_busmap_mutex);
ret = ehea_update_busmap(pfn, nr_pages, EHEA_BUSMAP_ADD_SECT);
mutex_unlock(&ehea_busmap_mutex);
return ret;
}

int ehea_rem_sect_bmap(unsigned long pfn, unsigned long nr_pages)
{
int ret;

mutex_lock(&ehea_busmap_mutex);
ret = ehea_update_busmap(pfn, nr_pages, EHEA_BUSMAP_REM_SECT);
mutex_unlock(&ehea_busmap_mutex);
return ret;
}

static int ehea_create_busmap_callback(unsigned long pfn,
unsigned long nr_pages, void *arg)
{
return ehea_update_busmap(pfn, nr_pages, EHEA_BUSMAP_ADD_SECT);
}

int ehea_create_busmap(void)
{
int ret;

mutex_lock(&ehea_busmap_mutex);
ehea_mr_len = 0;
ret = walk_memory_resource(0, 1ULL << MAX_PHYSMEM_BITS, &ehea_mr_len,
ret = walk_memory_resource(0, 1ULL << MAX_PHYSMEM_BITS, NULL,
ehea_create_busmap_callback);
mutex_unlock(&ehea_busmap_mutex);
return ret;
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/ehea/ehea_qmr.h
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,8 @@ int ehea_rem_mr(struct ehea_mr *mr);

void ehea_error_data(struct ehea_adapter *adapter, u64 res_handle);

int ehea_add_sect_bmap(unsigned long pfn, unsigned long nr_pages);
int ehea_rem_sect_bmap(unsigned long pfn, unsigned long nr_pages);
int ehea_create_busmap(void);
void ehea_destroy_busmap(void);
u64 ehea_map_vaddr(void *caddr);
Expand Down
18 changes: 18 additions & 0 deletions drivers/net/fec_mpc52xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,21 @@ static int mpc52xx_fec_hard_start_xmit(struct sk_buff *skb, struct net_device *d
return 0;
}

#ifdef CONFIG_NET_POLL_CONTROLLER
static void mpc52xx_fec_poll_controller(struct net_device *dev)
{
struct mpc52xx_fec_priv *priv = netdev_priv(dev);

disable_irq(priv->t_irq);
mpc52xx_fec_tx_interrupt(priv->t_irq, dev);
enable_irq(priv->t_irq);
disable_irq(priv->r_irq);
mpc52xx_fec_rx_interrupt(priv->r_irq, dev);
enable_irq(priv->r_irq);
}
#endif


/* This handles BestComm transmit task interrupts
*/
static irqreturn_t mpc52xx_fec_tx_interrupt(int irq, void *dev_id)
Expand Down Expand Up @@ -926,6 +941,9 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match)
ndev->tx_timeout = mpc52xx_fec_tx_timeout;
ndev->watchdog_timeo = FEC_WATCHDOG_TIMEOUT;
ndev->base_addr = mem.start;
#ifdef CONFIG_NET_POLL_CONTROLLER
ndev->poll_controller = mpc52xx_fec_poll_controller;
#endif

priv->t_irq = priv->r_irq = ndev->irq = NO_IRQ; /* IRQ are free for now */

Expand Down
Loading

0 comments on commit 2242d5e

Please sign in to comment.