Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 340448
b: refs/heads/master
c: a048b40
h: refs/heads/master
v: v3
  • Loading branch information
Alexander Duyck authored and Jeff Kirsher committed Oct 23, 2012
1 parent 4ca7ef5 commit e0f95f9
Show file tree
Hide file tree
Showing 19 changed files with 349 additions and 1,074 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9f651cace30c42e27e726a92f35e4edc55f1ec08
refs/heads/master: a048b40e0f9502bc75d7f9904c5399a0a87fa479
4 changes: 4 additions & 0 deletions trunk/arch/arm/mach-at91/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ config SOC_AT91RM9200
config SOC_AT91SAM9260
bool "AT91SAM9260, AT91SAM9XE or AT91SAM9G20"
select HAVE_AT91_DBGU0
select HAVE_NET_MACB
select SOC_AT91SAM9
help
Select this if you are using one of Atmel's AT91SAM9260, AT91SAM9XE
Expand All @@ -62,6 +63,7 @@ config SOC_AT91SAM9263
bool "AT91SAM9263"
select HAVE_AT91_DBGU1
select HAVE_FB_ATMEL
select HAVE_NET_MACB
select SOC_AT91SAM9

config SOC_AT91SAM9RL
Expand All @@ -74,6 +76,7 @@ config SOC_AT91SAM9G45
bool "AT91SAM9G45 or AT91SAM9M10 families"
select HAVE_AT91_DBGU1
select HAVE_FB_ATMEL
select HAVE_NET_MACB
select SOC_AT91SAM9
help
Select this if you are using one of Atmel's AT91SAM9G45 family SoC.
Expand All @@ -83,6 +86,7 @@ config SOC_AT91SAM9X5
bool "AT91SAM9x5 family"
select HAVE_AT91_DBGU0
select HAVE_FB_ATMEL
select HAVE_NET_MACB
select SOC_AT91SAM9
help
Select this if you are using one of Atmel's AT91SAM9x5 family SoC.
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/arm/mach-at91/board-csb337.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ static void __init csb337_init_early(void)
static struct macb_platform_data __initdata csb337_eth_data = {
.phy_irq_pin = AT91_PIN_PC2,
.is_rmii = 0,
/* The CSB337 bootloader stores the MAC the wrong-way around */
.rev_eth_addr = 1,
};

static struct at91_usbh_data __initdata csb337_usbh_data = {
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/avr32/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ config PLATFORM_AT32AP
select ARCH_REQUIRE_GPIOLIB
select GENERIC_ALLOCATOR
select HAVE_FB_ATMEL
select HAVE_NET_MACB

#
# CPU types
Expand Down
8 changes: 7 additions & 1 deletion trunk/drivers/net/ethernet/cadence/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
# Atmel device configuration
#

config HAVE_NET_MACB
bool

config NET_CADENCE
bool "Cadence devices"
default y
depends on HAVE_NET_MACB || (ARM && ARCH_AT91RM9200)
---help---
If you have a network (Ethernet) card belonging to this class, say Y.
Make sure you know the name of your card. Read the Ethernet-HOWTO,
Expand All @@ -21,14 +25,16 @@ if NET_CADENCE

config ARM_AT91_ETHER
tristate "AT91RM9200 Ethernet support"
depends on ARM && ARCH_AT91RM9200
select NET_CORE
select MACB
select PHYLIB
---help---
If you wish to compile a kernel for the AT91RM9200 and enable
ethernet support, then you should always answer Y to this.

config MACB
tristate "Cadence MACB/GEM support"
depends on HAVE_NET_MACB
select PHYLIB
---help---
The Cadence MACB ethernet interface is found on many Atmel AT32 and
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ethernet/cadence/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# Makefile for the Atmel network device drivers.
#

obj-$(CONFIG_ARM_AT91_ETHER) += at91_ether.o
obj-$(CONFIG_ARM_AT91_ETHER) += at91_ether.o macb.o
obj-$(CONFIG_MACB) += macb.o
5 changes: 3 additions & 2 deletions trunk/drivers/net/ethernet/cadence/at91_ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#include <linux/phy.h>
#include <linux/io.h>

#include <asm/mach-types.h>

#include "macb.h"

#define DRV_NAME "at91_ether"
Expand Down Expand Up @@ -59,10 +61,9 @@

static short __init unpack_mac_address(struct net_device *dev, unsigned int hi, unsigned int lo)
{
struct macb *lp = netdev_priv(dev);
char addr[6];

if (lp->board_data.rev_eth_addr) {
if (machine_is_csb337()) {
addr[5] = (lo & 0xff); /* The CSB337 bootloader stores the MAC the wrong-way around */
addr[4] = (lo & 0xff00) >> 8;
addr[3] = (lo & 0xff0000) >> 16;
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/net/ethernet/cadence/macb.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id)
while (status) {
/* close possible race with dev_close */
if (unlikely(!netif_running(dev))) {
macb_writel(bp, IDR, -1);
macb_writel(bp, IDR, ~0UL);
break;
}

Expand Down Expand Up @@ -789,11 +789,11 @@ static void macb_reset_hw(struct macb *bp)
macb_writel(bp, NCR, MACB_BIT(CLRSTAT));

/* Clear all status flags */
macb_writel(bp, TSR, -1);
macb_writel(bp, RSR, -1);
macb_writel(bp, TSR, ~0UL);
macb_writel(bp, RSR, ~0UL);

/* Disable all interrupts */
macb_writel(bp, IDR, -1);
macb_writel(bp, IDR, ~0UL);
macb_readl(bp, ISR);
}

Expand Down
15 changes: 14 additions & 1 deletion trunk/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,7 @@ static unsigned int ixgbe_get_headlen(unsigned char *data,
struct vlan_hdr *vlan;
/* l3 headers */
struct iphdr *ipv4;
struct ipv6hdr *ipv6;
} hdr;
__be16 protocol;
u8 nexthdr = 0; /* default to not TCP */
Expand Down Expand Up @@ -1284,6 +1285,13 @@ static unsigned int ixgbe_get_headlen(unsigned char *data,
/* record next protocol */
nexthdr = hdr.ipv4->protocol;
hdr.network += hlen;
} else if (protocol == __constant_htons(ETH_P_IPV6)) {
if ((hdr.network - data) > (max_len - sizeof(struct ipv6hdr)))
return max_len;

/* record next protocol */
nexthdr = hdr.ipv6->nexthdr;
hdr.network += sizeof(struct ipv6hdr);
#ifdef IXGBE_FCOE
} else if (protocol == __constant_htons(ETH_P_FCOE)) {
if ((hdr.network - data) > (max_len - FCOE_HEADER_LEN))
Expand All @@ -1294,7 +1302,7 @@ static unsigned int ixgbe_get_headlen(unsigned char *data,
return hdr.network - data;
}

/* finally sort out TCP */
/* finally sort out TCP/UDP */
if (nexthdr == IPPROTO_TCP) {
if ((hdr.network - data) > (max_len - sizeof(struct tcphdr)))
return max_len;
Expand All @@ -1307,6 +1315,11 @@ static unsigned int ixgbe_get_headlen(unsigned char *data,
return hdr.network - data;

hdr.network += hlen;
} else if (nexthdr == IPPROTO_UDP) {
if ((hdr.network - data) > (max_len - sizeof(struct udphdr)))
return max_len;

hdr.network += sizeof(struct udphdr);
}

/*
Expand Down
18 changes: 0 additions & 18 deletions trunk/drivers/net/usb/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -219,24 +219,6 @@ config USB_NET_CDC_NCM
* ST-Ericsson M343 HSPA Mobile Broadband Modem (reference design)
* Ericsson F5521gw Mobile Broadband Module

config USB_NET_CDC_MBIM
tristate "CDC MBIM support"
depends on USB_USBNET
select USB_WDM
select USB_NET_CDC_NCM
help
This driver provides support for CDC MBIM (Mobile Broadband
Interface Model) devices. The CDC MBIM specification is
available from <http://www.usb.org/>.

MBIM devices require configuration using the management
protocol defined by the MBIM specification. This driver
provides unfiltered access to the MBIM control channel
through the associated /dev/cdc-wdmx character device.

To compile this driver as a module, choose M here: the
module will be called cdc_mbim.

config USB_NET_DM9601
tristate "Davicom DM9601 based USB 1.1 10/100 ethernet devices"
depends on USB_USBNET
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/usb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@ obj-$(CONFIG_USB_NET_CX82310_ETH) += cx82310_eth.o
obj-$(CONFIG_USB_NET_CDC_NCM) += cdc_ncm.o
obj-$(CONFIG_USB_VL600) += lg-vl600.o
obj-$(CONFIG_USB_NET_QMI_WWAN) += qmi_wwan.o
obj-$(CONFIG_USB_NET_CDC_MBIM) += cdc_mbim.o

Loading

0 comments on commit e0f95f9

Please sign in to comment.