Skip to content

Commit 4162cf6

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: (67 commits) cxgb4vf: recover from failure in cxgb4vf_open() netfilter: ebtables: make broute table work again netfilter: fix race in conntrack between dump_table and destroy ah: reload pointers to skb data after calling skb_cow_data() ah: update maximum truncated ICV length xfrm: check trunc_len in XFRMA_ALG_AUTH_TRUNC ehea: Increase the skb array usage net/fec: remove config FEC2 as it's used nowhere pcnet_cs: add new_id tcp: disallow bind() to reuse addr/port net/r8169: Update the function of parsing firmware net: ppp: use {get,put}_unaligned_be{16,32} CAIF: Fix IPv6 support in receive path for GPRS/3G arp: allow to invalidate specific ARP entries net_sched: factorize qdisc stats handling mlx4: Call alloc_etherdev to allocate RX and TX queues net: Add alloc_netdev_mqs function caif: don't set connection request param size before copying data cxgb4vf: fix mailbox data/control coherency domain race qlcnic: change module parameter permissions ...
2 parents fb7b5a9 + 343a8d1 commit 4162cf6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+2901
-1867
lines changed

Documentation/networking/dccp.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ rx_ccid = 2
167167
seq_window = 100
168168
The initial sequence window (sec. 7.5.2) of the sender. This influences
169169
the local ackno validity and the remote seqno validity windows (7.5.1).
170+
Values in the range Wmin = 32 (RFC 4340, 7.5.2) up to 2^32-1 can be set.
170171

171172
tx_qlen = 5
172173
The size of the transmit buffer in packets. A value of 0 corresponds

drivers/atm/ambassador.c

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1926,8 +1926,9 @@ static int __devinit ucode_init (loader_block * lb, amb_dev * dev) {
19261926
const struct firmware *fw;
19271927
unsigned long start_address;
19281928
const struct ihex_binrec *rec;
1929+
const char *errmsg = 0;
19291930
int res;
1930-
1931+
19311932
res = request_ihex_firmware(&fw, "atmsar11.fw", &dev->pci_dev->dev);
19321933
if (res) {
19331934
PRINTK (KERN_ERR, "Cannot load microcode data");
@@ -1937,8 +1938,8 @@ static int __devinit ucode_init (loader_block * lb, amb_dev * dev) {
19371938
/* First record contains just the start address */
19381939
rec = (const struct ihex_binrec *)fw->data;
19391940
if (be16_to_cpu(rec->len) != sizeof(__be32) || be32_to_cpu(rec->addr)) {
1940-
PRINTK (KERN_ERR, "Bad microcode data (no start record)");
1941-
return -EINVAL;
1941+
errmsg = "no start record";
1942+
goto fail;
19421943
}
19431944
start_address = be32_to_cpup((__be32 *)rec->data);
19441945

@@ -1950,12 +1951,12 @@ static int __devinit ucode_init (loader_block * lb, amb_dev * dev) {
19501951
PRINTD (DBG_LOAD, "starting region (%x, %u)", be32_to_cpu(rec->addr),
19511952
be16_to_cpu(rec->len));
19521953
if (be16_to_cpu(rec->len) > 4 * MAX_TRANSFER_DATA) {
1953-
PRINTK (KERN_ERR, "Bad microcode data (record too long)");
1954-
return -EINVAL;
1954+
errmsg = "record too long";
1955+
goto fail;
19551956
}
19561957
if (be16_to_cpu(rec->len) & 3) {
1957-
PRINTK (KERN_ERR, "Bad microcode data (odd number of bytes)");
1958-
return -EINVAL;
1958+
errmsg = "odd number of bytes";
1959+
goto fail;
19591960
}
19601961
res = loader_write(lb, dev, rec);
19611962
if (res)
@@ -1970,6 +1971,10 @@ static int __devinit ucode_init (loader_block * lb, amb_dev * dev) {
19701971
res = loader_start(lb, dev, start_address);
19711972

19721973
return res;
1974+
fail:
1975+
release_firmware(fw);
1976+
PRINTK(KERN_ERR, "Bad microcode data (%s)", errmsg);
1977+
return -EINVAL;
19731978
}
19741979

19751980
/********** give adapter parameters **********/

drivers/net/Kconfig

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,19 +1944,12 @@ config 68360_ENET
19441944
config FEC
19451945
bool "FEC ethernet controller (of ColdFire and some i.MX CPUs)"
19461946
depends on M523x || M527x || M5272 || M528x || M520x || M532x || \
1947-
MACH_MX27 || ARCH_MX35 || ARCH_MX25 || ARCH_MX5
1947+
MACH_MX27 || ARCH_MX35 || ARCH_MX25 || ARCH_MX5 || SOC_IMX28
19481948
select PHYLIB
19491949
help
19501950
Say Y here if you want to use the built-in 10/100 Fast ethernet
19511951
controller on some Motorola ColdFire and Freescale i.MX processors.
19521952

1953-
config FEC2
1954-
bool "Second FEC ethernet controller (on some ColdFire CPUs)"
1955-
depends on FEC
1956-
help
1957-
Say Y here if you want to use the second built-in 10/100 Fast
1958-
ethernet controller on some Motorola ColdFire processors.
1959-
19601953
config FEC_MPC52xx
19611954
tristate "MPC52xx FEC driver"
19621955
depends on PPC_MPC52xx && PPC_BESTCOMM

drivers/net/bfin_mac.c

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
* Licensed under the GPL-2 or later.
99
*/
1010

11+
#define DRV_VERSION "1.1"
12+
#define DRV_DESC "Blackfin on-chip Ethernet MAC driver"
13+
14+
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
15+
1116
#include <linux/init.h>
1217
#include <linux/module.h>
1318
#include <linux/kernel.h>
@@ -41,12 +46,7 @@
4146

4247
#include "bfin_mac.h"
4348

44-
#define DRV_NAME "bfin_mac"
45-
#define DRV_VERSION "1.1"
46-
#define DRV_AUTHOR "Bryan Wu, Luke Yang"
47-
#define DRV_DESC "Blackfin on-chip Ethernet MAC driver"
48-
49-
MODULE_AUTHOR(DRV_AUTHOR);
49+
MODULE_AUTHOR("Bryan Wu, Luke Yang");
5050
MODULE_LICENSE("GPL");
5151
MODULE_DESCRIPTION(DRV_DESC);
5252
MODULE_ALIAS("platform:bfin_mac");
@@ -189,8 +189,7 @@ static int desc_list_init(void)
189189
/* allocate a new skb for next time receive */
190190
new_skb = dev_alloc_skb(PKT_BUF_SZ + NET_IP_ALIGN);
191191
if (!new_skb) {
192-
printk(KERN_NOTICE DRV_NAME
193-
": init: low on mem - packet dropped\n");
192+
pr_notice("init: low on mem - packet dropped\n");
194193
goto init_error;
195194
}
196195
skb_reserve(new_skb, NET_IP_ALIGN);
@@ -240,7 +239,7 @@ static int desc_list_init(void)
240239

241240
init_error:
242241
desc_list_free();
243-
printk(KERN_ERR DRV_NAME ": kmalloc failed\n");
242+
pr_err("kmalloc failed\n");
244243
return -ENOMEM;
245244
}
246245

@@ -259,8 +258,7 @@ static int bfin_mdio_poll(void)
259258
while ((bfin_read_EMAC_STAADD()) & STABUSY) {
260259
udelay(1);
261260
if (timeout_cnt-- < 0) {
262-
printk(KERN_ERR DRV_NAME
263-
": wait MDC/MDIO transaction to complete timeout\n");
261+
pr_err("wait MDC/MDIO transaction to complete timeout\n");
264262
return -ETIMEDOUT;
265263
}
266264
}
@@ -350,9 +348,9 @@ static void bfin_mac_adjust_link(struct net_device *dev)
350348
opmode &= ~RMII_10;
351349
break;
352350
default:
353-
printk(KERN_WARNING
354-
"%s: Ack! Speed (%d) is not 10/100!\n",
355-
DRV_NAME, phydev->speed);
351+
netdev_warn(dev,
352+
"Ack! Speed (%d) is not 10/100!\n",
353+
phydev->speed);
356354
break;
357355
}
358356
bfin_write_EMAC_OPMODE(opmode);
@@ -417,22 +415,21 @@ static int mii_probe(struct net_device *dev, int phy_mode)
417415

418416
/* now we are supposed to have a proper phydev, to attach to... */
419417
if (!phydev) {
420-
printk(KERN_INFO "%s: Don't found any phy device at all\n",
421-
dev->name);
418+
netdev_err(dev, "no phy device found\n");
422419
return -ENODEV;
423420
}
424421

425422
if (phy_mode != PHY_INTERFACE_MODE_RMII &&
426423
phy_mode != PHY_INTERFACE_MODE_MII) {
427-
printk(KERN_INFO "%s: Invalid phy interface mode\n", dev->name);
424+
netdev_err(dev, "invalid phy interface mode\n");
428425
return -EINVAL;
429426
}
430427

431428
phydev = phy_connect(dev, dev_name(&phydev->dev), &bfin_mac_adjust_link,
432429
0, phy_mode);
433430

434431
if (IS_ERR(phydev)) {
435-
printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name);
432+
netdev_err(dev, "could not attach PHY\n");
436433
return PTR_ERR(phydev);
437434
}
438435

@@ -453,11 +450,10 @@ static int mii_probe(struct net_device *dev, int phy_mode)
453450
lp->old_duplex = -1;
454451
lp->phydev = phydev;
455452

456-
printk(KERN_INFO "%s: attached PHY driver [%s] "
457-
"(mii_bus:phy_addr=%s, irq=%d, mdc_clk=%dHz(mdc_div=%d)"
458-
"@sclk=%dMHz)\n",
459-
DRV_NAME, phydev->drv->name, dev_name(&phydev->dev), phydev->irq,
460-
MDC_CLK, mdc_div, sclk/1000000);
453+
pr_info("attached PHY driver [%s] "
454+
"(mii_bus:phy_addr=%s, irq=%d, mdc_clk=%dHz(mdc_div=%d)@sclk=%dMHz)\n",
455+
phydev->drv->name, dev_name(&phydev->dev), phydev->irq,
456+
MDC_CLK, mdc_div, sclk/1000000);
461457

462458
return 0;
463459
}
@@ -502,7 +498,7 @@ bfin_mac_ethtool_setsettings(struct net_device *dev, struct ethtool_cmd *cmd)
502498
static void bfin_mac_ethtool_getdrvinfo(struct net_device *dev,
503499
struct ethtool_drvinfo *info)
504500
{
505-
strcpy(info->driver, DRV_NAME);
501+
strcpy(info->driver, KBUILD_MODNAME);
506502
strcpy(info->version, DRV_VERSION);
507503
strcpy(info->fw_version, "N/A");
508504
strcpy(info->bus_info, dev_name(&dev->dev));
@@ -562,7 +558,7 @@ static const struct ethtool_ops bfin_mac_ethtool_ops = {
562558
};
563559

564560
/**************************************************************************/
565-
void setup_system_regs(struct net_device *dev)
561+
static void setup_system_regs(struct net_device *dev)
566562
{
567563
struct bfin_mac_local *lp = netdev_priv(dev);
568564
int i;
@@ -592,6 +588,10 @@ void setup_system_regs(struct net_device *dev)
592588

593589
bfin_write_EMAC_MMC_CTL(RSTC | CROLL);
594590

591+
/* Set vlan regs to let 1522 bytes long packets pass through */
592+
bfin_write_EMAC_VLAN1(lp->vlan1_mask);
593+
bfin_write_EMAC_VLAN2(lp->vlan2_mask);
594+
595595
/* Initialize the TX DMA channel registers */
596596
bfin_write_DMA2_X_COUNT(0);
597597
bfin_write_DMA2_X_MODIFY(4);
@@ -827,8 +827,7 @@ static void bfin_tx_hwtstamp(struct net_device *netdev, struct sk_buff *skb)
827827
while ((!(bfin_read_EMAC_PTP_ISTAT() & TXTL)) && (--timeout_cnt))
828828
udelay(1);
829829
if (timeout_cnt == 0)
830-
printk(KERN_ERR DRV_NAME
831-
": fails to timestamp the TX packet\n");
830+
netdev_err(netdev, "timestamp the TX packet failed\n");
832831
else {
833832
struct skb_shared_hwtstamps shhwtstamps;
834833
u64 ns;
@@ -1083,8 +1082,7 @@ static void bfin_mac_rx(struct net_device *dev)
10831082
* we which case we simply drop the packet
10841083
*/
10851084
if (current_rx_ptr->status.status_word & RX_ERROR_MASK) {
1086-
printk(KERN_NOTICE DRV_NAME
1087-
": rx: receive error - packet dropped\n");
1085+
netdev_notice(dev, "rx: receive error - packet dropped\n");
10881086
dev->stats.rx_dropped++;
10891087
goto out;
10901088
}
@@ -1094,8 +1092,7 @@ static void bfin_mac_rx(struct net_device *dev)
10941092

10951093
new_skb = dev_alloc_skb(PKT_BUF_SZ + NET_IP_ALIGN);
10961094
if (!new_skb) {
1097-
printk(KERN_NOTICE DRV_NAME
1098-
": rx: low on mem - packet dropped\n");
1095+
netdev_notice(dev, "rx: low on mem - packet dropped\n");
10991096
dev->stats.rx_dropped++;
11001097
goto out;
11011098
}
@@ -1213,7 +1210,7 @@ static int bfin_mac_enable(struct phy_device *phydev)
12131210
int ret;
12141211
u32 opmode;
12151212

1216-
pr_debug("%s: %s\n", DRV_NAME, __func__);
1213+
pr_debug("%s\n", __func__);
12171214

12181215
/* Set RX DMA */
12191216
bfin_write_DMA1_NEXT_DESC_PTR(&(rx_list_head->desc_a));
@@ -1323,7 +1320,7 @@ static void bfin_mac_set_multicast_list(struct net_device *dev)
13231320
u32 sysctl;
13241321

13251322
if (dev->flags & IFF_PROMISC) {
1326-
printk(KERN_INFO "%s: set to promisc mode\n", dev->name);
1323+
netdev_info(dev, "set promisc mode\n");
13271324
sysctl = bfin_read_EMAC_OPMODE();
13281325
sysctl |= PR;
13291326
bfin_write_EMAC_OPMODE(sysctl);
@@ -1393,7 +1390,7 @@ static int bfin_mac_open(struct net_device *dev)
13931390
* address using ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx
13941391
*/
13951392
if (!is_valid_ether_addr(dev->dev_addr)) {
1396-
printk(KERN_WARNING DRV_NAME ": no valid ethernet hw addr\n");
1393+
netdev_warn(dev, "no valid ethernet hw addr\n");
13971394
return -EINVAL;
13981395
}
13991396

@@ -1527,6 +1524,9 @@ static int __devinit bfin_mac_probe(struct platform_device *pdev)
15271524
goto out_err_mii_probe;
15281525
}
15291526

1527+
lp->vlan1_mask = ETH_P_8021Q | mii_bus_data->vlan1_mask;
1528+
lp->vlan2_mask = ETH_P_8021Q | mii_bus_data->vlan2_mask;
1529+
15301530
/* Fill in the fields of the device structure with ethernet values. */
15311531
ether_setup(ndev);
15321532

@@ -1558,7 +1558,7 @@ static int __devinit bfin_mac_probe(struct platform_device *pdev)
15581558
bfin_mac_hwtstamp_init(ndev);
15591559

15601560
/* now, print out the card info, in a short format.. */
1561-
dev_info(&pdev->dev, "%s, Version %s\n", DRV_DESC, DRV_VERSION);
1561+
netdev_info(ndev, "%s, Version %s\n", DRV_DESC, DRV_VERSION);
15621562

15631563
return 0;
15641564

@@ -1650,7 +1650,7 @@ static int __devinit bfin_mii_bus_probe(struct platform_device *pdev)
16501650
* so set the GPIO pins to Ethernet mode
16511651
*/
16521652
pin_req = mii_bus_pd->mac_peripherals;
1653-
rc = peripheral_request_list(pin_req, DRV_NAME);
1653+
rc = peripheral_request_list(pin_req, KBUILD_MODNAME);
16541654
if (rc) {
16551655
dev_err(&pdev->dev, "Requesting peripherals failed!\n");
16561656
return rc;
@@ -1739,7 +1739,7 @@ static struct platform_driver bfin_mac_driver = {
17391739
.resume = bfin_mac_resume,
17401740
.suspend = bfin_mac_suspend,
17411741
.driver = {
1742-
.name = DRV_NAME,
1742+
.name = KBUILD_MODNAME,
17431743
.owner = THIS_MODULE,
17441744
},
17451745
};

drivers/net/bfin_mac.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@
1717
#include <linux/etherdevice.h>
1818
#include <linux/bfin_mac.h>
1919

20+
/*
21+
* Disable hardware checksum for bug #5600 if writeback cache is
22+
* enabled. Otherwize, corrupted RX packet will be sent up stack
23+
* without error mark.
24+
*/
25+
#ifndef CONFIG_BFIN_EXTMEM_WRITEBACK
2026
#define BFIN_MAC_CSUM_OFFLOAD
27+
#endif
2128

2229
#define TX_RECLAIM_JIFFIES (HZ / 5)
2330

@@ -68,14 +75,16 @@ struct bfin_mac_local {
6875
*/
6976
struct net_device_stats stats;
7077

71-
unsigned char Mac[6]; /* MAC address of the board */
7278
spinlock_t lock;
7379

7480
int wol; /* Wake On Lan */
7581
int irq_wake_requested;
7682
struct timer_list tx_reclaim_timer;
7783
struct net_device *ndev;
7884

85+
/* Data for EMAC_VLAN1 regs */
86+
u16 vlan1_mask, vlan2_mask;
87+
7988
/* MII and PHY stuffs */
8089
int old_link; /* used by bf537_adjust_link */
8190
int old_speed;

drivers/net/bnx2x/bnx2x.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,7 @@ struct bnx2x_common {
636636

637637
#define CHIP_METAL(bp) (bp->common.chip_id & 0x00000ff0)
638638
#define CHIP_BOND_ID(bp) (bp->common.chip_id & 0x0000000f)
639+
#define CHIP_PARITY_ENABLED(bp) (CHIP_IS_E1(bp) || CHIP_IS_E1H(bp))
639640

640641
int flash_size;
641642
#define NVRAM_1MB_SIZE 0x20000 /* 1M bit in bytes */

0 commit comments

Comments
 (0)