Skip to content

Commit 2242d5e

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* 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 ...
2 parents 5579a78 + fd6149d commit 2242d5e

35 files changed

+556
-290
lines changed

drivers/net/8139cp.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1836,10 +1836,9 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
18361836

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

drivers/net/8139too.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -946,10 +946,9 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
946946
if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&
947947
pdev->device == PCI_DEVICE_ID_REALTEK_8139 && pdev->revision >= 0x20) {
948948
dev_info(&pdev->dev,
949-
"This (id %04x:%04x rev %02x) is an enhanced 8139C+ chip\n",
949+
"This (id %04x:%04x rev %02x) is an enhanced 8139C+ chip, use 8139cp\n",
950950
pdev->vendor, pdev->device, pdev->revision);
951-
dev_info(&pdev->dev,
952-
"Use the \"8139cp\" driver for improved performance and stability.\n");
951+
return -ENODEV;
953952
}
954953

955954
if (pdev->vendor == PCI_VENDOR_ID_REALTEK &&

drivers/net/Kconfig

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ config SMC91X
894894
select CRC32
895895
select MII
896896
depends on ARM || REDWOOD_5 || REDWOOD_6 || M32R || SUPERH || \
897-
SOC_AU1X00 || BLACKFIN || MN10300
897+
MIPS || BLACKFIN || MN10300
898898
help
899899
This is a driver for SMC's 91x series of Ethernet chipsets,
900900
including the SMC91C94 and the SMC91C111. Say Y if you want it
@@ -966,7 +966,7 @@ config SMC911X
966966
tristate "SMSC LAN911[5678] support"
967967
select CRC32
968968
select MII
969-
depends on ARCH_PXA || SUPERH
969+
depends on ARM || SUPERH
970970
help
971971
This is a driver for SMSC's LAN911x series of Ethernet chipsets
972972
including the new LAN9115, LAN9116, LAN9117, and LAN9118.
@@ -2009,6 +2009,11 @@ config IGB_LRO
20092009

20102010
If in doubt, say N.
20112011

2012+
config IGB_DCA
2013+
bool "Enable DCA"
2014+
default y
2015+
depends on IGB && DCA && !(IGB=y && DCA=m)
2016+
20122017
source "drivers/net/ixp2000/Kconfig"
20132018

20142019
config MYRI_SBUS

drivers/net/ax88796.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -838,12 +838,12 @@ static int ax_probe(struct platform_device *pdev)
838838

839839
/* find the platform resources */
840840

841-
dev->irq = platform_get_irq(pdev, 0);
842-
if (dev->irq < 0) {
841+
ret = platform_get_irq(pdev, 0);
842+
if (ret < 0) {
843843
dev_err(&pdev->dev, "no IRQ specified\n");
844-
ret = -ENXIO;
845844
goto exit_mem;
846845
}
846+
dev->irq = ret;
847847

848848
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
849849
if (res == NULL) {

drivers/net/bonding/bond_main.c

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,18 +1341,24 @@ static int bond_compute_features(struct bonding *bond)
13411341
int i;
13421342

13431343
features &= ~(NETIF_F_ALL_CSUM | BOND_VLAN_FEATURES);
1344-
features |= NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA |
1345-
NETIF_F_GSO_MASK | NETIF_F_NO_CSUM;
1344+
features |= NETIF_F_GSO_MASK | NETIF_F_NO_CSUM;
1345+
1346+
if (!bond->first_slave)
1347+
goto done;
1348+
1349+
features &= ~NETIF_F_ONE_FOR_ALL;
13461350

13471351
bond_for_each_slave(bond, slave, i) {
1348-
features = netdev_compute_features(features,
1349-
slave->dev->features);
1352+
features = netdev_increment_features(features,
1353+
slave->dev->features,
1354+
NETIF_F_ONE_FOR_ALL);
13501355
if (slave->dev->hard_header_len > max_hard_header_len)
13511356
max_hard_header_len = slave->dev->hard_header_len;
13521357
}
13531358

1359+
done:
13541360
features |= (bond_dev->features & BOND_VLAN_FEATURES);
1355-
bond_dev->features = features;
1361+
bond_dev->features = netdev_fix_features(features, NULL);
13561362
bond_dev->hard_header_len = max_hard_header_len;
13571363

13581364
return 0;

drivers/net/cxgb3/l2t.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,7 @@ struct l2t_data *t3_init_l2t(unsigned int l2t_capacity)
431431
for (i = 0; i < l2t_capacity; ++i) {
432432
d->l2tab[i].idx = i;
433433
d->l2tab[i].state = L2T_STATE_UNUSED;
434+
__skb_queue_head_init(&d->l2tab[i].arpq);
434435
spin_lock_init(&d->l2tab[i].lock);
435436
atomic_set(&d->l2tab[i].refcnt, 0);
436437
}

drivers/net/dm9000.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,6 @@
4747
#define CARDNAME "dm9000"
4848
#define DRV_VERSION "1.31"
4949

50-
#ifdef CONFIG_BLACKFIN
51-
#define readsb insb
52-
#define readsw insw
53-
#define readsl insl
54-
#define writesb outsb
55-
#define writesw outsw
56-
#define writesl outsl
57-
#endif
58-
5950
/*
6051
* Transmit timeout, default 5 seconds.
6152
*/

drivers/net/ehea/ehea.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#include <asm/io.h>
4141

4242
#define DRV_NAME "ehea"
43-
#define DRV_VERSION "EHEA_0093"
43+
#define DRV_VERSION "EHEA_0094"
4444

4545
/* eHEA capability flags */
4646
#define DLPAR_PORT_ADD_REM 1

drivers/net/ehea/ehea_main.c

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2863,7 +2863,7 @@ static void ehea_rereg_mrs(struct work_struct *work)
28632863
struct ehea_adapter *adapter;
28642864

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

28682868
list_for_each_entry(adapter, &adapter_list, list)
28692869
if (adapter->active_ports) {
@@ -2900,13 +2900,6 @@ static void ehea_rereg_mrs(struct work_struct *work)
29002900
}
29012901
}
29022902

2903-
ehea_destroy_busmap();
2904-
ret = ehea_create_busmap();
2905-
if (ret) {
2906-
ehea_error("creating ehea busmap failed");
2907-
goto out;
2908-
}
2909-
29102903
clear_bit(__EHEA_STOP_XFER, &ehea_driver_flags);
29112904

29122905
list_for_each_entry(adapter, &adapter_list, list)
@@ -3519,9 +3512,21 @@ void ehea_crash_handler(void)
35193512
static int ehea_mem_notifier(struct notifier_block *nb,
35203513
unsigned long action, void *data)
35213514
{
3515+
struct memory_notify *arg = data;
35223516
switch (action) {
3523-
case MEM_OFFLINE:
3524-
ehea_info("memory has been removed");
3517+
case MEM_CANCEL_OFFLINE:
3518+
ehea_info("memory offlining canceled");
3519+
/* Readd canceled memory block */
3520+
case MEM_ONLINE:
3521+
ehea_info("memory is going online");
3522+
if (ehea_add_sect_bmap(arg->start_pfn, arg->nr_pages))
3523+
return NOTIFY_BAD;
3524+
ehea_rereg_mrs(NULL);
3525+
break;
3526+
case MEM_GOING_OFFLINE:
3527+
ehea_info("memory is going offline");
3528+
if (ehea_rem_sect_bmap(arg->start_pfn, arg->nr_pages))
3529+
return NOTIFY_BAD;
35253530
ehea_rereg_mrs(NULL);
35263531
break;
35273532
default:

drivers/net/ehea/ehea_qmr.c

Lines changed: 101 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ static inline int ehea_calc_index(unsigned long i, unsigned long s)
567567
static inline int ehea_init_top_bmap(struct ehea_top_bmap *ehea_top_bmap,
568568
int dir)
569569
{
570-
if(!ehea_top_bmap->dir[dir]) {
570+
if (!ehea_top_bmap->dir[dir]) {
571571
ehea_top_bmap->dir[dir] =
572572
kzalloc(sizeof(struct ehea_dir_bmap), GFP_KERNEL);
573573
if (!ehea_top_bmap->dir[dir])
@@ -578,7 +578,7 @@ static inline int ehea_init_top_bmap(struct ehea_top_bmap *ehea_top_bmap,
578578

579579
static inline int ehea_init_bmap(struct ehea_bmap *ehea_bmap, int top, int dir)
580580
{
581-
if(!ehea_bmap->top[top]) {
581+
if (!ehea_bmap->top[top]) {
582582
ehea_bmap->top[top] =
583583
kzalloc(sizeof(struct ehea_top_bmap), GFP_KERNEL);
584584
if (!ehea_bmap->top[top])
@@ -587,53 +587,124 @@ static inline int ehea_init_bmap(struct ehea_bmap *ehea_bmap, int top, int dir)
587587
return ehea_init_top_bmap(ehea_bmap->top[top], dir);
588588
}
589589

590-
static int ehea_create_busmap_callback(unsigned long pfn,
591-
unsigned long nr_pages, void *arg)
592-
{
593-
unsigned long i, mr_len, start_section, end_section;
594-
start_section = (pfn * PAGE_SIZE) / EHEA_SECTSIZE;
595-
end_section = start_section + ((nr_pages * PAGE_SIZE) / EHEA_SECTSIZE);
596-
mr_len = *(unsigned long *)arg;
590+
static DEFINE_MUTEX(ehea_busmap_mutex);
591+
static unsigned long ehea_mr_len;
597592

598-
if (!ehea_bmap)
599-
ehea_bmap = kzalloc(sizeof(struct ehea_bmap), GFP_KERNEL);
600-
if (!ehea_bmap)
601-
return -ENOMEM;
593+
#define EHEA_BUSMAP_ADD_SECT 1
594+
#define EHEA_BUSMAP_REM_SECT 0
602595

603-
for (i = start_section; i < end_section; i++) {
604-
int ret;
605-
int top, dir, idx;
606-
u64 vaddr;
596+
static void ehea_rebuild_busmap(void)
597+
{
598+
u64 vaddr = EHEA_BUSMAP_START;
599+
int top, dir, idx;
600+
601+
for (top = 0; top < EHEA_MAP_ENTRIES; top++) {
602+
struct ehea_top_bmap *ehea_top;
603+
int valid_dir_entries = 0;
607604

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

611-
ret = ehea_init_bmap(ehea_bmap, top, dir);
612-
if(ret)
613-
return ret;
612+
if (!ehea_top->dir[dir])
613+
continue;
614+
valid_dir_entries++;
615+
ehea_dir = ehea_top->dir[dir];
616+
for (idx = 0; idx < EHEA_MAP_ENTRIES; idx++) {
617+
if (!ehea_dir->ent[idx])
618+
continue;
619+
valid_entries++;
620+
ehea_dir->ent[idx] = vaddr;
621+
vaddr += EHEA_SECTSIZE;
622+
}
623+
if (!valid_entries) {
624+
ehea_top->dir[dir] = NULL;
625+
kfree(ehea_dir);
626+
}
627+
}
628+
if (!valid_dir_entries) {
629+
ehea_bmap->top[top] = NULL;
630+
kfree(ehea_top);
631+
}
632+
}
633+
}
614634

615-
idx = i & EHEA_INDEX_MASK;
616-
vaddr = EHEA_BUSMAP_START + mr_len + i * EHEA_SECTSIZE;
635+
static int ehea_update_busmap(unsigned long pfn, unsigned long pgnum, int add)
636+
{
637+
unsigned long i, start_section, end_section;
617638

618-
ehea_bmap->top[top]->dir[dir]->ent[idx] = vaddr;
639+
if (!ehea_bmap) {
640+
ehea_bmap = kzalloc(sizeof(struct ehea_bmap), GFP_KERNEL);
641+
if (!ehea_bmap)
642+
return -ENOMEM;
619643
}
620644

621-
mr_len += nr_pages * PAGE_SIZE;
622-
*(unsigned long *)arg = mr_len;
645+
start_section = (pfn * PAGE_SIZE) / EHEA_SECTSIZE;
646+
end_section = start_section + ((pgnum * PAGE_SIZE) / EHEA_SECTSIZE);
647+
/* Mark entries as valid or invalid only; address is assigned later */
648+
for (i = start_section; i < end_section; i++) {
649+
u64 flag;
650+
int top = ehea_calc_index(i, EHEA_TOP_INDEX_SHIFT);
651+
int dir = ehea_calc_index(i, EHEA_DIR_INDEX_SHIFT);
652+
int idx = i & EHEA_INDEX_MASK;
653+
654+
if (add) {
655+
int ret = ehea_init_bmap(ehea_bmap, top, dir);
656+
if (ret)
657+
return ret;
658+
flag = 1; /* valid */
659+
ehea_mr_len += EHEA_SECTSIZE;
660+
} else {
661+
if (!ehea_bmap->top[top])
662+
continue;
663+
if (!ehea_bmap->top[top]->dir[dir])
664+
continue;
665+
flag = 0; /* invalid */
666+
ehea_mr_len -= EHEA_SECTSIZE;
667+
}
623668

669+
ehea_bmap->top[top]->dir[dir]->ent[idx] = flag;
670+
}
671+
ehea_rebuild_busmap(); /* Assign contiguous addresses for mr */
624672
return 0;
625673
}
626674

627-
static unsigned long ehea_mr_len;
675+
int ehea_add_sect_bmap(unsigned long pfn, unsigned long nr_pages)
676+
{
677+
int ret;
628678

629-
static DEFINE_MUTEX(ehea_busmap_mutex);
679+
mutex_lock(&ehea_busmap_mutex);
680+
ret = ehea_update_busmap(pfn, nr_pages, EHEA_BUSMAP_ADD_SECT);
681+
mutex_unlock(&ehea_busmap_mutex);
682+
return ret;
683+
}
684+
685+
int ehea_rem_sect_bmap(unsigned long pfn, unsigned long nr_pages)
686+
{
687+
int ret;
688+
689+
mutex_lock(&ehea_busmap_mutex);
690+
ret = ehea_update_busmap(pfn, nr_pages, EHEA_BUSMAP_REM_SECT);
691+
mutex_unlock(&ehea_busmap_mutex);
692+
return ret;
693+
}
694+
695+
static int ehea_create_busmap_callback(unsigned long pfn,
696+
unsigned long nr_pages, void *arg)
697+
{
698+
return ehea_update_busmap(pfn, nr_pages, EHEA_BUSMAP_ADD_SECT);
699+
}
630700

631701
int ehea_create_busmap(void)
632702
{
633703
int ret;
704+
634705
mutex_lock(&ehea_busmap_mutex);
635706
ehea_mr_len = 0;
636-
ret = walk_memory_resource(0, 1ULL << MAX_PHYSMEM_BITS, &ehea_mr_len,
707+
ret = walk_memory_resource(0, 1ULL << MAX_PHYSMEM_BITS, NULL,
637708
ehea_create_busmap_callback);
638709
mutex_unlock(&ehea_busmap_mutex);
639710
return ret;

drivers/net/ehea/ehea_qmr.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,8 @@ int ehea_rem_mr(struct ehea_mr *mr);
378378

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

381+
int ehea_add_sect_bmap(unsigned long pfn, unsigned long nr_pages);
382+
int ehea_rem_sect_bmap(unsigned long pfn, unsigned long nr_pages);
381383
int ehea_create_busmap(void);
382384
void ehea_destroy_busmap(void);
383385
u64 ehea_map_vaddr(void *caddr);

drivers/net/fec_mpc52xx.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,21 @@ static int mpc52xx_fec_hard_start_xmit(struct sk_buff *skb, struct net_device *d
401401
return 0;
402402
}
403403

404+
#ifdef CONFIG_NET_POLL_CONTROLLER
405+
static void mpc52xx_fec_poll_controller(struct net_device *dev)
406+
{
407+
struct mpc52xx_fec_priv *priv = netdev_priv(dev);
408+
409+
disable_irq(priv->t_irq);
410+
mpc52xx_fec_tx_interrupt(priv->t_irq, dev);
411+
enable_irq(priv->t_irq);
412+
disable_irq(priv->r_irq);
413+
mpc52xx_fec_rx_interrupt(priv->r_irq, dev);
414+
enable_irq(priv->r_irq);
415+
}
416+
#endif
417+
418+
404419
/* This handles BestComm transmit task interrupts
405420
*/
406421
static irqreturn_t mpc52xx_fec_tx_interrupt(int irq, void *dev_id)
@@ -926,6 +941,9 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match)
926941
ndev->tx_timeout = mpc52xx_fec_tx_timeout;
927942
ndev->watchdog_timeo = FEC_WATCHDOG_TIMEOUT;
928943
ndev->base_addr = mem.start;
944+
#ifdef CONFIG_NET_POLL_CONTROLLER
945+
ndev->poll_controller = mpc52xx_fec_poll_controller;
946+
#endif
929947

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

0 commit comments

Comments
 (0)