Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159432
b: refs/heads/master
c: bfe34eb
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Aug 6, 2009
1 parent 5dc8baa commit 2de44ff
Show file tree
Hide file tree
Showing 78 changed files with 427 additions and 328 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: 6b4f645a491ac29c7dced415d034eea7736155a6
refs/heads/master: bfe34ebbaa125f00da309f59cc9d30febe1e3115
2 changes: 2 additions & 0 deletions trunk/arch/alpha/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#define SO_RCVTIMEO 0x1012
#define SO_SNDTIMEO 0x1013
#define SO_ACCEPTCONN 0x1014
#define SO_PROTOCOL 0x1028
#define SO_DOMAIN 0x1029

/* linux-specific, might as well be the same as on i386 */
#define SO_NO_CHECK 11
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/arm/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,7 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38
#define SO_DOMAIN 39

#endif /* _ASM_SOCKET_H */
3 changes: 3 additions & 0 deletions trunk/arch/avr32/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,7 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38
#define SO_DOMAIN 39

#endif /* __ASM_AVR32_SOCKET_H */
3 changes: 3 additions & 0 deletions trunk/arch/cris/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38
#define SO_DOMAIN 39

#endif /* _ASM_SOCKET_H */


3 changes: 3 additions & 0 deletions trunk/arch/frv/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,8 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38
#define SO_DOMAIN 39

#endif /* _ASM_SOCKET_H */

3 changes: 3 additions & 0 deletions trunk/arch/h8300/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,7 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38
#define SO_DOMAIN 39

#endif /* _ASM_SOCKET_H */
3 changes: 3 additions & 0 deletions trunk/arch/ia64/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,7 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38
#define SO_DOMAIN 39

#endif /* _ASM_IA64_SOCKET_H */
3 changes: 3 additions & 0 deletions trunk/arch/m32r/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,7 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38
#define SO_DOMAIN 39

#endif /* _ASM_M32R_SOCKET_H */
3 changes: 3 additions & 0 deletions trunk/arch/m68k/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,7 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38
#define SO_DOMAIN 39

#endif /* _ASM_SOCKET_H */
3 changes: 3 additions & 0 deletions trunk/arch/microblaze/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,7 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38
#define SO_DOMAIN 39

#endif /* _ASM_MICROBLAZE_SOCKET_H */
15 changes: 15 additions & 0 deletions trunk/arch/mips/ar7/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#include <linux/leds.h>
#include <linux/string.h>
#include <linux/etherdevice.h>
#include <linux/phy.h>
#include <linux/phy_fixed.h>

#include <asm/addrspace.h>
#include <asm/mach-ar7/ar7.h>
Expand Down Expand Up @@ -209,6 +211,12 @@ static struct physmap_flash_data physmap_flash_data = {
.width = 2,
};

static struct fixed_phy_status fixed_phy_status __initdata = {
.link = 1,
.speed = 100,
.duplex = 1,
};

static struct plat_cpmac_data cpmac_low_data = {
.reset_bit = 17,
.power_bit = 20,
Expand Down Expand Up @@ -530,6 +538,9 @@ static int __init ar7_register_devices(void)
}

if (ar7_has_high_cpmac()) {
res = fixed_phy_add(PHY_POLL, cpmac_high.id, &fixed_phy_status);
if (res && res != -ENODEV)
return res;
cpmac_get_mac(1, cpmac_high_data.dev_addr);
res = platform_device_register(&cpmac_high);
if (res)
Expand All @@ -538,6 +549,10 @@ static int __init ar7_register_devices(void)
cpmac_low_data.phy_mask = 0xffffffff;
}

res = fixed_phy_add(PHY_POLL, cpmac_low.id, &fixed_phy_status);
if (res && res != -ENODEV)
return res;

cpmac_get_mac(0, cpmac_low_data.dev_addr);
res = platform_device_register(&cpmac_low);
if (res)
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/mips/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */
#define SO_SNDTIMEO 0x1005 /* send timeout */
#define SO_RCVTIMEO 0x1006 /* receive timeout */
#define SO_ACCEPTCONN 0x1009
#define SO_PROTOCOL 0x1028 /* protocol type */
#define SO_DOMAIN 0x1029 /* domain/socket family */

/* linux-specific, might as well be the same as on i386 */
#define SO_NO_CHECK 11
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/mn10300/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,7 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38
#define SO_DOMAIN 39

#endif /* _ASM_SOCKET_H */
2 changes: 2 additions & 0 deletions trunk/arch/parisc/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
#define SO_RCVTIMEO 0x1006
#define SO_ERROR 0x1007
#define SO_TYPE 0x1008
#define SO_PROTOCOL 0x1028
#define SO_DOMAIN 0x1029
#define SO_PEERNAME 0x2000

#define SO_NO_CHECK 0x400b
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/powerpc/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,7 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38
#define SO_DOMAIN 39

#endif /* _ASM_POWERPC_SOCKET_H */
3 changes: 3 additions & 0 deletions trunk/arch/s390/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,7 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38
#define SO_DOMAIN 39

#endif /* _ASM_SOCKET_H */
3 changes: 3 additions & 0 deletions trunk/arch/sparc/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
#define SO_RCVBUFFORCE 0x100b
#define SO_ERROR 0x1007
#define SO_TYPE 0x1008
#define SO_PROTOCOL 0x1028
#define SO_DOMAIN 0x1029


/* Linux specific, keep the same. */
#define SO_NO_CHECK 0x000b
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/x86/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,7 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38
#define SO_DOMAIN 39

#endif /* _ASM_X86_SOCKET_H */
3 changes: 3 additions & 0 deletions trunk/arch/xtensa/include/asm/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,7 @@
#define SO_TIMESTAMPING 37
#define SCM_TIMESTAMPING SO_TIMESTAMPING

#define SO_PROTOCOL 38
#define SO_DOMAIN 39

#endif /* _XTENSA_SOCKET_H */
2 changes: 1 addition & 1 deletion trunk/drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1774,7 +1774,7 @@ config SC92031

config CPMAC
tristate "TI AR7 CPMAC Ethernet support (EXPERIMENTAL)"
depends on NET_ETHERNET && EXPERIMENTAL && AR7 && BROKEN
depends on NET_ETHERNET && EXPERIMENTAL && AR7
select PHYLIB
help
TI AR7 CPMAC Ethernet support
Expand Down
21 changes: 21 additions & 0 deletions trunk/drivers/net/benet/be_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -1019,3 +1019,24 @@ int be_cmd_query_fw_cfg(struct be_adapter *adapter, u32 *port_num)
spin_unlock(&adapter->mbox_lock);
return status;
}

int be_cmd_reset_function(struct be_adapter *adapter)
{
struct be_mcc_wrb *wrb = wrb_from_mbox(&adapter->mbox_mem);
struct be_cmd_req_hdr *req = embedded_payload(wrb);
int status;

spin_lock(&adapter->mbox_lock);

memset(wrb, 0, sizeof(*wrb));

be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0);

be_cmd_hdr_prepare(req, CMD_SUBSYSTEM_COMMON,
OPCODE_COMMON_FUNCTION_RESET, sizeof(*req));

status = be_mbox_notify(adapter);

spin_unlock(&adapter->mbox_lock);
return status;
}
2 changes: 2 additions & 0 deletions trunk/drivers/net/benet/be_cmds.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ struct be_mcc_mailbox {
#define OPCODE_COMMON_QUERY_FIRMWARE_CONFIG 58
#define OPCODE_COMMON_NTWK_PMAC_ADD 59
#define OPCODE_COMMON_NTWK_PMAC_DEL 60
#define OPCODE_COMMON_FUNCTION_RESET 61

#define OPCODE_ETH_ACPI_CONFIG 2
#define OPCODE_ETH_PROMISCUOUS 3
Expand Down Expand Up @@ -744,4 +745,5 @@ extern int be_cmd_set_flow_control(struct be_adapter *adapter,
extern int be_cmd_get_flow_control(struct be_adapter *adapter,
u32 *tx_fc, u32 *rx_fc);
extern int be_cmd_query_fw_cfg(struct be_adapter *adapter, u32 *port_num);
extern int be_cmd_reset_function(struct be_adapter *adapter);
extern void be_process_mcc(struct be_adapter *adapter);
4 changes: 4 additions & 0 deletions trunk/drivers/net/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1873,6 +1873,10 @@ static int __devinit be_probe(struct pci_dev *pdev,
if (status)
goto free_netdev;

status = be_cmd_reset_function(adapter);
if (status)
goto ctrl_clean;

status = be_stats_init(adapter);
if (status)
goto ctrl_clean;
Expand Down
44 changes: 24 additions & 20 deletions trunk/drivers/net/cpmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ module_param(dumb_switch, int, 0444);
MODULE_PARM_DESC(debug_level, "Number of NETIF_MSG bits to enable");
MODULE_PARM_DESC(dumb_switch, "Assume switch is not connected to MDIO bus");

#define CPMAC_VERSION "0.5.0"
#define CPMAC_VERSION "0.5.1"
/* frame size + 802.1q tag */
#define CPMAC_SKB_SIZE (ETH_FRAME_LEN + 4)
#define CPMAC_QUEUES 8
Expand Down Expand Up @@ -1109,30 +1109,31 @@ static int external_switch;
static int __devinit cpmac_probe(struct platform_device *pdev)
{
int rc, phy_id;
char *mdio_bus_id = "0";
char mdio_bus_id[BUS_ID_SIZE];
struct resource *mem;
struct cpmac_priv *priv;
struct net_device *dev;
struct plat_cpmac_data *pdata;

pdata = pdev->dev.platform_data;

for (phy_id = 0; phy_id < PHY_MAX_ADDR; phy_id++) {
if (!(pdata->phy_mask & (1 << phy_id)))
continue;
if (!cpmac_mii->phy_map[phy_id])
continue;
break;
if (external_switch || dumb_switch) {
strncpy(mdio_bus_id, "0", BUS_ID_SIZE); /* fixed phys bus */
phy_id = pdev->id;
} else {
for (phy_id = 0; phy_id < PHY_MAX_ADDR; phy_id++) {
if (!(pdata->phy_mask & (1 << phy_id)))
continue;
if (!cpmac_mii->phy_map[phy_id])
continue;
strncpy(mdio_bus_id, cpmac_mii->id, BUS_ID_SIZE);
break;
}
}

if (phy_id == PHY_MAX_ADDR) {
if (external_switch || dumb_switch) {
mdio_bus_id = 0; /* fixed phys bus */
phy_id = pdev->id;
} else {
dev_err(&pdev->dev, "no PHY present\n");
return -ENODEV;
}
dev_err(&pdev->dev, "no PHY present\n");
return -ENODEV;
}

dev = alloc_etherdev_mq(sizeof(*priv), CPMAC_QUEUES);
Expand Down Expand Up @@ -1166,8 +1167,11 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
priv->msg_enable = netif_msg_init(debug_level, 0xff);
memcpy(dev->dev_addr, pdata->dev_addr, sizeof(dev->dev_addr));

priv->phy = phy_connect(dev, dev_name(&cpmac_mii->phy_map[phy_id]->dev),
&cpmac_adjust_link, 0, PHY_INTERFACE_MODE_MII);
snprintf(priv->phy_name, BUS_ID_SIZE, PHY_ID_FMT, mdio_bus_id, phy_id);

priv->phy = phy_connect(dev, priv->phy_name, &cpmac_adjust_link, 0,
PHY_INTERFACE_MODE_MII);

if (IS_ERR(priv->phy)) {
if (netif_msg_drv(priv))
printk(KERN_ERR "%s: Could not attach to PHY\n",
Expand Down Expand Up @@ -1241,11 +1245,11 @@ int __devinit cpmac_init(void)

cpmac_mii->reset(cpmac_mii);

for (i = 0; i < 300000; i++)
for (i = 0; i < 300; i++)
if ((mask = cpmac_read(cpmac_mii->priv, CPMAC_MDIO_ALIVE)))
break;
else
cpu_relax();
msleep(10);

mask &= 0x7fffffff;
if (mask & (mask - 1)) {
Expand All @@ -1254,7 +1258,7 @@ int __devinit cpmac_init(void)
}

cpmac_mii->phy_mask = ~(mask | 0x80000000);
snprintf(cpmac_mii->id, MII_BUS_ID_SIZE, "0");
snprintf(cpmac_mii->id, MII_BUS_ID_SIZE, "1");

res = mdiobus_register(cpmac_mii);
if (res)
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/net/cxgb3/t3_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -3692,8 +3692,12 @@ static void mc7_prep(struct adapter *adapter, struct mc7 *mc7,

void mac_prep(struct cmac *mac, struct adapter *adapter, int index)
{
u16 devid;

mac->adapter = adapter;
if (!adapter->params.vpd.xauicfg[1])
pci_read_config_word(adapter->pdev, 0x2, &devid);

if (devid == 0x37 && !adapter->params.vpd.xauicfg[1])
index = 0;
mac->offset = (XGMAC0_1_BASE_ADDR - XGMAC0_0_BASE_ADDR) * index;
mac->nucast = 1;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5126,7 +5126,7 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb)
return smp_processor_id();

if (adapter->flags & IXGBE_FLAG_DCB_ENABLED)
return 0; /* All traffic should default to class 0 */
return (skb->vlan_tci & IXGBE_TX_FLAGS_VLAN_PRIO_MASK) >> 13;

return skb_tx_hash(dev, skb);
}
Expand Down
Loading

0 comments on commit 2de44ff

Please sign in to comment.