diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-05 18:25:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-05 18:25:48 -0400 |
commit | 4b4a2700f462102569b407102c60d3b9cf4432a0 (patch) | |
tree | d326b404c99ca477d47aa0e06eb64f0b3e2d8347 /drivers | |
parent | f69fa76482e654f7d94e4aa40ea0ebf04363396a (diff) | |
parent | 22e76c849d505d87c5ecf3d3e6742a65f0ff4860 (diff) |
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: (41 commits)
inet_diag: Make sure we actually run the same bytecode we audited.
netlink: Make nlmsg_find_attr take a const nlmsghdr*.
fib: fib_result_assign() should not change fib refcounts
netfilter: ip6_tables: fix information leak to userspace
cls_cgroup: Fix crash on module unload
memory corruption in X.25 facilities parsing
net dst: fix percpu_counter list corruption and poison overwritten
rds: Remove kfreed tcp conn from list
rds: Lost locking in loop connection freeing
de2104x: fix panic on load
atl1 : fix panic on load
netxen: remove unused firmware exports
caif: Remove noisy printout when disconnecting caif socket
caif: SPI-driver bugfix - incorrect padding.
caif: Bugfix for socket priority, bindtodev and dbg channel.
smsc911x: Set Ethernet EEPROM size to supported device's size
ipv4: netfilter: ip_tables: fix information leak to userland
ipv4: netfilter: arp_tables: fix information leak to userland
cxgb4vf: remove call to stop TX queues at load time.
cxgb4: remove call to stop TX queues at load time.
...
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/isdn/hisax/isar.c | 4 | ||||
-rw-r--r-- | drivers/net/atlx/atl1.c | 1 | ||||
-rw-r--r-- | drivers/net/bnx2x/bnx2x.h | 4 | ||||
-rw-r--r-- | drivers/net/bnx2x/bnx2x_hsi.h | 9 | ||||
-rw-r--r-- | drivers/net/bnx2x/bnx2x_link.c | 57 | ||||
-rw-r--r-- | drivers/net/caif/caif_spi.c | 57 | ||||
-rw-r--r-- | drivers/net/caif/caif_spi_slave.c | 13 | ||||
-rw-r--r-- | drivers/net/cxgb3/cxgb3_main.c | 1 | ||||
-rw-r--r-- | drivers/net/cxgb4/cxgb4_main.c | 1 | ||||
-rw-r--r-- | drivers/net/cxgb4vf/cxgb4vf_main.c | 1 | ||||
-rw-r--r-- | drivers/net/ibm_newemac/core.c | 1 | ||||
-rw-r--r-- | drivers/net/jme.c | 4 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 3 | ||||
-rw-r--r-- | drivers/net/qlcnic/qlcnic_main.c | 1 | ||||
-rw-r--r-- | drivers/net/smsc911x.h | 2 | ||||
-rw-r--r-- | drivers/net/tulip/de2104x.c | 1 | ||||
-rw-r--r-- | drivers/net/usb/usbnet.c | 11 | ||||
-rw-r--r-- | drivers/usb/gadget/u_ether.c | 1 |
18 files changed, 117 insertions, 55 deletions
diff --git a/drivers/isdn/hisax/isar.c b/drivers/isdn/hisax/isar.c index 40b914bded8c..2e72227bd071 100644 --- a/drivers/isdn/hisax/isar.c +++ b/drivers/isdn/hisax/isar.c | |||
@@ -1427,8 +1427,8 @@ modeisar(struct BCState *bcs, int mode, int bc) | |||
1427 | &bcs->hw.isar.reg->Flags)) | 1427 | &bcs->hw.isar.reg->Flags)) |
1428 | bcs->hw.isar.dpath = 1; | 1428 | bcs->hw.isar.dpath = 1; |
1429 | else { | 1429 | else { |
1430 | printk(KERN_WARNING"isar modeisar analog funktions only with DP1\n"); | 1430 | printk(KERN_WARNING"isar modeisar analog functions only with DP1\n"); |
1431 | debugl1(cs, "isar modeisar analog funktions only with DP1"); | 1431 | debugl1(cs, "isar modeisar analog functions only with DP1"); |
1432 | return(1); | 1432 | return(1); |
1433 | } | 1433 | } |
1434 | break; | 1434 | break; |
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c index 43579b3b24ac..53363108994e 100644 --- a/drivers/net/atlx/atl1.c +++ b/drivers/net/atlx/atl1.c | |||
@@ -3043,7 +3043,6 @@ static int __devinit atl1_probe(struct pci_dev *pdev, | |||
3043 | atl1_pcie_patch(adapter); | 3043 | atl1_pcie_patch(adapter); |
3044 | /* assume we have no link for now */ | 3044 | /* assume we have no link for now */ |
3045 | netif_carrier_off(netdev); | 3045 | netif_carrier_off(netdev); |
3046 | netif_stop_queue(netdev); | ||
3047 | 3046 | ||
3048 | setup_timer(&adapter->phy_config_timer, atl1_phy_config, | 3047 | setup_timer(&adapter->phy_config_timer, atl1_phy_config, |
3049 | (unsigned long)adapter); | 3048 | (unsigned long)adapter); |
diff --git a/drivers/net/bnx2x/bnx2x.h b/drivers/net/bnx2x/bnx2x.h index 9eea225decaf..863e73a85fbe 100644 --- a/drivers/net/bnx2x/bnx2x.h +++ b/drivers/net/bnx2x/bnx2x.h | |||
@@ -20,8 +20,8 @@ | |||
20 | * (you will need to reboot afterwards) */ | 20 | * (you will need to reboot afterwards) */ |
21 | /* #define BNX2X_STOP_ON_ERROR */ | 21 | /* #define BNX2X_STOP_ON_ERROR */ |
22 | 22 | ||
23 | #define DRV_MODULE_VERSION "1.60.00-3" | 23 | #define DRV_MODULE_VERSION "1.60.00-4" |
24 | #define DRV_MODULE_RELDATE "2010/10/19" | 24 | #define DRV_MODULE_RELDATE "2010/11/01" |
25 | #define BNX2X_BC_VER 0x040200 | 25 | #define BNX2X_BC_VER 0x040200 |
26 | 26 | ||
27 | #define BNX2X_MULTI_QUEUE | 27 | #define BNX2X_MULTI_QUEUE |
diff --git a/drivers/net/bnx2x/bnx2x_hsi.h b/drivers/net/bnx2x/bnx2x_hsi.h index 18c8e23a0e82..4cfd4e9b5586 100644 --- a/drivers/net/bnx2x/bnx2x_hsi.h +++ b/drivers/net/bnx2x/bnx2x_hsi.h | |||
@@ -244,7 +244,14 @@ struct port_hw_cfg { /* port 0: 0x12c port 1: 0x2bc */ | |||
244 | 244 | ||
245 | u16 xgxs_config_tx[4]; /* 0x1A0 */ | 245 | u16 xgxs_config_tx[4]; /* 0x1A0 */ |
246 | 246 | ||
247 | u32 Reserved1[57]; /* 0x1A8 */ | 247 | u32 Reserved1[56]; /* 0x1A8 */ |
248 | u32 default_cfg; /* 0x288 */ | ||
249 | /* Enable BAM on KR */ | ||
250 | #define PORT_HW_CFG_ENABLE_BAM_ON_KR_MASK 0x00100000 | ||
251 | #define PORT_HW_CFG_ENABLE_BAM_ON_KR_SHIFT 20 | ||
252 | #define PORT_HW_CFG_ENABLE_BAM_ON_KR_DISABLED 0x00000000 | ||
253 | #define PORT_HW_CFG_ENABLE_BAM_ON_KR_ENABLED 0x00100000 | ||
254 | |||
248 | u32 speed_capability_mask2; /* 0x28C */ | 255 | u32 speed_capability_mask2; /* 0x28C */ |
249 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_MASK 0x0000FFFF | 256 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_MASK 0x0000FFFF |
250 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_SHIFT 0 | 257 | #define PORT_HW_CFG_SPEED_CAPABILITY2_D3_SHIFT 0 |
diff --git a/drivers/net/bnx2x/bnx2x_link.c b/drivers/net/bnx2x/bnx2x_link.c index 2326774df843..580919619252 100644 --- a/drivers/net/bnx2x/bnx2x_link.c +++ b/drivers/net/bnx2x/bnx2x_link.c | |||
@@ -610,7 +610,7 @@ static u8 bnx2x_bmac_enable(struct link_params *params, | |||
610 | /* reset and unreset the BigMac */ | 610 | /* reset and unreset the BigMac */ |
611 | REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_CLEAR, | 611 | REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_CLEAR, |
612 | (MISC_REGISTERS_RESET_REG_2_RST_BMAC0 << port)); | 612 | (MISC_REGISTERS_RESET_REG_2_RST_BMAC0 << port)); |
613 | udelay(10); | 613 | msleep(1); |
614 | 614 | ||
615 | REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET, | 615 | REG_WR(bp, GRCBASE_MISC + MISC_REGISTERS_RESET_REG_2_SET, |
616 | (MISC_REGISTERS_RESET_REG_2_RST_BMAC0 << port)); | 616 | (MISC_REGISTERS_RESET_REG_2_RST_BMAC0 << port)); |
@@ -3525,13 +3525,19 @@ static u8 bnx2x_8073_config_init(struct bnx2x_phy *phy, | |||
3525 | DP(NETIF_MSG_LINK, "Before rom RX_ALARM(port1): 0x%x\n", tmp1); | 3525 | DP(NETIF_MSG_LINK, "Before rom RX_ALARM(port1): 0x%x\n", tmp1); |
3526 | 3526 | ||
3527 | /* Enable CL37 BAM */ | 3527 | /* Enable CL37 BAM */ |
3528 | bnx2x_cl45_read(bp, phy, | 3528 | if (REG_RD(bp, params->shmem_base + |
3529 | MDIO_AN_DEVAD, | 3529 | offsetof(struct shmem_region, dev_info. |
3530 | MDIO_AN_REG_8073_BAM, &val); | 3530 | port_hw_config[params->port].default_cfg)) & |
3531 | bnx2x_cl45_write(bp, phy, | 3531 | PORT_HW_CFG_ENABLE_BAM_ON_KR_ENABLED) { |
3532 | MDIO_AN_DEVAD, | ||
3533 | MDIO_AN_REG_8073_BAM, val | 1); | ||
3534 | 3532 | ||
3533 | bnx2x_cl45_read(bp, phy, | ||
3534 | MDIO_AN_DEVAD, | ||
3535 | MDIO_AN_REG_8073_BAM, &val); | ||
3536 | bnx2x_cl45_write(bp, phy, | ||
3537 | MDIO_AN_DEVAD, | ||
3538 | MDIO_AN_REG_8073_BAM, val | 1); | ||
3539 | DP(NETIF_MSG_LINK, "Enable CL37 BAM on KR\n"); | ||
3540 | } | ||
3535 | if (params->loopback_mode == LOOPBACK_EXT) { | 3541 | if (params->loopback_mode == LOOPBACK_EXT) { |
3536 | bnx2x_807x_force_10G(bp, phy); | 3542 | bnx2x_807x_force_10G(bp, phy); |
3537 | DP(NETIF_MSG_LINK, "Forced speed 10G on 807X\n"); | 3543 | DP(NETIF_MSG_LINK, "Forced speed 10G on 807X\n"); |
@@ -5302,7 +5308,7 @@ static u8 bnx2x_848xx_cmn_config_init(struct bnx2x_phy *phy, | |||
5302 | { | 5308 | { |
5303 | struct bnx2x *bp = params->bp; | 5309 | struct bnx2x *bp = params->bp; |
5304 | u16 autoneg_val, an_1000_val, an_10_100_val; | 5310 | u16 autoneg_val, an_1000_val, an_10_100_val; |
5305 | bnx2x_wait_reset_complete(bp, phy); | 5311 | |
5306 | bnx2x_bits_en(bp, NIG_REG_LATCH_BC_0 + params->port*4, | 5312 | bnx2x_bits_en(bp, NIG_REG_LATCH_BC_0 + params->port*4, |
5307 | 1 << NIG_LATCH_BC_ENABLE_MI_INT); | 5313 | 1 << NIG_LATCH_BC_ENABLE_MI_INT); |
5308 | 5314 | ||
@@ -5431,6 +5437,7 @@ static u8 bnx2x_8481_config_init(struct bnx2x_phy *phy, | |||
5431 | 5437 | ||
5432 | /* HW reset */ | 5438 | /* HW reset */ |
5433 | bnx2x_ext_phy_hw_reset(bp, params->port); | 5439 | bnx2x_ext_phy_hw_reset(bp, params->port); |
5440 | bnx2x_wait_reset_complete(bp, phy); | ||
5434 | 5441 | ||
5435 | bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, MDIO_PMA_REG_CTRL, 1<<15); | 5442 | bnx2x_cl45_write(bp, phy, MDIO_PMA_DEVAD, MDIO_PMA_REG_CTRL, 1<<15); |
5436 | return bnx2x_848xx_cmn_config_init(phy, params, vars); | 5443 | return bnx2x_848xx_cmn_config_init(phy, params, vars); |
@@ -5441,7 +5448,7 @@ static u8 bnx2x_848x3_config_init(struct bnx2x_phy *phy, | |||
5441 | struct link_vars *vars) | 5448 | struct link_vars *vars) |
5442 | { | 5449 | { |
5443 | struct bnx2x *bp = params->bp; | 5450 | struct bnx2x *bp = params->bp; |
5444 | u8 port = params->port, initialize = 1; | 5451 | u8 port, initialize = 1; |
5445 | u16 val; | 5452 | u16 val; |
5446 | u16 temp; | 5453 | u16 temp; |
5447 | u32 actual_phy_selection; | 5454 | u32 actual_phy_selection; |
@@ -5450,11 +5457,16 @@ static u8 bnx2x_848x3_config_init(struct bnx2x_phy *phy, | |||
5450 | /* This is just for MDIO_CTL_REG_84823_MEDIA register. */ | 5457 | /* This is just for MDIO_CTL_REG_84823_MEDIA register. */ |
5451 | 5458 | ||
5452 | msleep(1); | 5459 | msleep(1); |
5460 | if (CHIP_IS_E2(bp)) | ||
5461 | port = BP_PATH(bp); | ||
5462 | else | ||
5463 | port = params->port; | ||
5453 | bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_3, | 5464 | bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_3, |
5454 | MISC_REGISTERS_GPIO_OUTPUT_HIGH, | 5465 | MISC_REGISTERS_GPIO_OUTPUT_HIGH, |
5455 | port); | 5466 | port); |
5456 | msleep(200); /* 100 is not enough */ | 5467 | bnx2x_wait_reset_complete(bp, phy); |
5457 | 5468 | /* Wait for GPHY to come out of reset */ | |
5469 | msleep(50); | ||
5458 | /* BCM84823 requires that XGXS links up first @ 10G for normal | 5470 | /* BCM84823 requires that XGXS links up first @ 10G for normal |
5459 | behavior */ | 5471 | behavior */ |
5460 | temp = vars->line_speed; | 5472 | temp = vars->line_speed; |
@@ -5625,7 +5637,11 @@ static void bnx2x_848x3_link_reset(struct bnx2x_phy *phy, | |||
5625 | struct link_params *params) | 5637 | struct link_params *params) |
5626 | { | 5638 | { |
5627 | struct bnx2x *bp = params->bp; | 5639 | struct bnx2x *bp = params->bp; |
5628 | u8 port = params->port; | 5640 | u8 port; |
5641 | if (CHIP_IS_E2(bp)) | ||
5642 | port = BP_PATH(bp); | ||
5643 | else | ||
5644 | port = params->port; | ||
5629 | bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_3, | 5645 | bnx2x_set_gpio(bp, MISC_REGISTERS_GPIO_3, |
5630 | MISC_REGISTERS_GPIO_OUTPUT_LOW, | 5646 | MISC_REGISTERS_GPIO_OUTPUT_LOW, |
5631 | port); | 5647 | port); |
@@ -6928,7 +6944,7 @@ u8 bnx2x_link_reset(struct link_params *params, struct link_vars *vars, | |||
6928 | u8 reset_ext_phy) | 6944 | u8 reset_ext_phy) |
6929 | { | 6945 | { |
6930 | struct bnx2x *bp = params->bp; | 6946 | struct bnx2x *bp = params->bp; |
6931 | u8 phy_index, port = params->port; | 6947 | u8 phy_index, port = params->port, clear_latch_ind = 0; |
6932 | DP(NETIF_MSG_LINK, "Resetting the link of port %d\n", port); | 6948 | DP(NETIF_MSG_LINK, "Resetting the link of port %d\n", port); |
6933 | /* disable attentions */ | 6949 | /* disable attentions */ |
6934 | vars->link_status = 0; | 6950 | vars->link_status = 0; |
@@ -6966,9 +6982,18 @@ u8 bnx2x_link_reset(struct link_params *params, struct link_vars *vars, | |||
6966 | params->phy[phy_index].link_reset( | 6982 | params->phy[phy_index].link_reset( |
6967 | ¶ms->phy[phy_index], | 6983 | ¶ms->phy[phy_index], |
6968 | params); | 6984 | params); |
6985 | if (params->phy[phy_index].flags & | ||
6986 | FLAGS_REARM_LATCH_SIGNAL) | ||
6987 | clear_latch_ind = 1; | ||
6969 | } | 6988 | } |
6970 | } | 6989 | } |
6971 | 6990 | ||
6991 | if (clear_latch_ind) { | ||
6992 | /* Clear latching indication */ | ||
6993 | bnx2x_rearm_latch_signal(bp, port, 0); | ||
6994 | bnx2x_bits_dis(bp, NIG_REG_LATCH_BC_0 + port*4, | ||
6995 | 1 << NIG_LATCH_BC_ENABLE_MI_INT); | ||
6996 | } | ||
6972 | if (params->phy[INT_PHY].link_reset) | 6997 | if (params->phy[INT_PHY].link_reset) |
6973 | params->phy[INT_PHY].link_reset( | 6998 | params->phy[INT_PHY].link_reset( |
6974 | ¶ms->phy[INT_PHY], params); | 6999 | ¶ms->phy[INT_PHY], params); |
@@ -6999,6 +7024,7 @@ static u8 bnx2x_8073_common_init_phy(struct bnx2x *bp, | |||
6999 | s8 port; | 7024 | s8 port; |
7000 | s8 port_of_path = 0; | 7025 | s8 port_of_path = 0; |
7001 | 7026 | ||
7027 | bnx2x_ext_phy_hw_reset(bp, 0); | ||
7002 | /* PART1 - Reset both phys */ | 7028 | /* PART1 - Reset both phys */ |
7003 | for (port = PORT_MAX - 1; port >= PORT_0; port--) { | 7029 | for (port = PORT_MAX - 1; port >= PORT_0; port--) { |
7004 | u32 shmem_base, shmem2_base; | 7030 | u32 shmem_base, shmem2_base; |
@@ -7021,7 +7047,8 @@ static u8 bnx2x_8073_common_init_phy(struct bnx2x *bp, | |||
7021 | return -EINVAL; | 7047 | return -EINVAL; |
7022 | } | 7048 | } |
7023 | /* disable attentions */ | 7049 | /* disable attentions */ |
7024 | bnx2x_bits_dis(bp, NIG_REG_MASK_INTERRUPT_PORT0 + port*4, | 7050 | bnx2x_bits_dis(bp, NIG_REG_MASK_INTERRUPT_PORT0 + |
7051 | port_of_path*4, | ||
7025 | (NIG_MASK_XGXS0_LINK_STATUS | | 7052 | (NIG_MASK_XGXS0_LINK_STATUS | |
7026 | NIG_MASK_XGXS0_LINK10G | | 7053 | NIG_MASK_XGXS0_LINK10G | |
7027 | NIG_MASK_SERDES0_LINK_STATUS | | 7054 | NIG_MASK_SERDES0_LINK_STATUS | |
@@ -7132,7 +7159,7 @@ static u8 bnx2x_8726_common_init_phy(struct bnx2x *bp, | |||
7132 | (1<<(MISC_REGISTERS_GPIO_3 + MISC_REGISTERS_GPIO_PORT_SHIFT))); | 7159 | (1<<(MISC_REGISTERS_GPIO_3 + MISC_REGISTERS_GPIO_PORT_SHIFT))); |
7133 | REG_WR(bp, MISC_REG_GPIO_EVENT_EN, val); | 7160 | REG_WR(bp, MISC_REG_GPIO_EVENT_EN, val); |
7134 | 7161 | ||
7135 | bnx2x_ext_phy_hw_reset(bp, 1); | 7162 | bnx2x_ext_phy_hw_reset(bp, 0); |
7136 | msleep(5); | 7163 | msleep(5); |
7137 | for (port = 0; port < PORT_MAX; port++) { | 7164 | for (port = 0; port < PORT_MAX; port++) { |
7138 | u32 shmem_base, shmem2_base; | 7165 | u32 shmem_base, shmem2_base; |
diff --git a/drivers/net/caif/caif_spi.c b/drivers/net/caif/caif_spi.c index 8427533fe313..8b4cea57a6c5 100644 --- a/drivers/net/caif/caif_spi.c +++ b/drivers/net/caif/caif_spi.c | |||
@@ -33,6 +33,9 @@ MODULE_LICENSE("GPL"); | |||
33 | MODULE_AUTHOR("Daniel Martensson<daniel.martensson@stericsson.com>"); | 33 | MODULE_AUTHOR("Daniel Martensson<daniel.martensson@stericsson.com>"); |
34 | MODULE_DESCRIPTION("CAIF SPI driver"); | 34 | MODULE_DESCRIPTION("CAIF SPI driver"); |
35 | 35 | ||
36 | /* Returns the number of padding bytes for alignment. */ | ||
37 | #define PAD_POW2(x, pow) ((((x)&((pow)-1))==0) ? 0 : (((pow)-((x)&((pow)-1))))) | ||
38 | |||
36 | static int spi_loop; | 39 | static int spi_loop; |
37 | module_param(spi_loop, bool, S_IRUGO); | 40 | module_param(spi_loop, bool, S_IRUGO); |
38 | MODULE_PARM_DESC(spi_loop, "SPI running in loopback mode."); | 41 | MODULE_PARM_DESC(spi_loop, "SPI running in loopback mode."); |
@@ -41,7 +44,10 @@ MODULE_PARM_DESC(spi_loop, "SPI running in loopback mode."); | |||
41 | module_param(spi_frm_align, int, S_IRUGO); | 44 | module_param(spi_frm_align, int, S_IRUGO); |
42 | MODULE_PARM_DESC(spi_frm_align, "SPI frame alignment."); | 45 | MODULE_PARM_DESC(spi_frm_align, "SPI frame alignment."); |
43 | 46 | ||
44 | /* SPI padding options. */ | 47 | /* |
48 | * SPI padding options. | ||
49 | * Warning: must be a base of 2 (& operation used) and can not be zero ! | ||
50 | */ | ||
45 | module_param(spi_up_head_align, int, S_IRUGO); | 51 | module_param(spi_up_head_align, int, S_IRUGO); |
46 | MODULE_PARM_DESC(spi_up_head_align, "SPI uplink head alignment."); | 52 | MODULE_PARM_DESC(spi_up_head_align, "SPI uplink head alignment."); |
47 | 53 | ||
@@ -240,15 +246,13 @@ static ssize_t dbgfs_frame(struct file *file, char __user *user_buf, | |||
240 | static const struct file_operations dbgfs_state_fops = { | 246 | static const struct file_operations dbgfs_state_fops = { |
241 | .open = dbgfs_open, | 247 | .open = dbgfs_open, |
242 | .read = dbgfs_state, | 248 | .read = dbgfs_state, |
243 | .owner = THIS_MODULE, | 249 | .owner = THIS_MODULE |
244 | .llseek = default_llseek, | ||
245 | }; | 250 | }; |
246 | 251 | ||
247 | static const struct file_operations dbgfs_frame_fops = { | 252 | static const struct file_operations dbgfs_frame_fops = { |
248 | .open = dbgfs_open, | 253 | .open = dbgfs_open, |
249 | .read = dbgfs_frame, | 254 | .read = dbgfs_frame, |
250 | .owner = THIS_MODULE, | 255 | .owner = THIS_MODULE |
251 | .llseek = default_llseek, | ||
252 | }; | 256 | }; |
253 | 257 | ||
254 | static inline void dev_debugfs_add(struct cfspi *cfspi) | 258 | static inline void dev_debugfs_add(struct cfspi *cfspi) |
@@ -337,6 +341,9 @@ int cfspi_xmitfrm(struct cfspi *cfspi, u8 *buf, size_t len) | |||
337 | u8 *dst = buf; | 341 | u8 *dst = buf; |
338 | caif_assert(buf); | 342 | caif_assert(buf); |
339 | 343 | ||
344 | if (cfspi->slave && !cfspi->slave_talked) | ||
345 | cfspi->slave_talked = true; | ||
346 | |||
340 | do { | 347 | do { |
341 | struct sk_buff *skb; | 348 | struct sk_buff *skb; |
342 | struct caif_payload_info *info; | 349 | struct caif_payload_info *info; |
@@ -357,8 +364,8 @@ int cfspi_xmitfrm(struct cfspi *cfspi, u8 *buf, size_t len) | |||
357 | * Compute head offset i.e. number of bytes to add to | 364 | * Compute head offset i.e. number of bytes to add to |
358 | * get the start of the payload aligned. | 365 | * get the start of the payload aligned. |
359 | */ | 366 | */ |
360 | if (spi_up_head_align) { | 367 | if (spi_up_head_align > 1) { |
361 | spad = 1 + ((info->hdr_len + 1) & spi_up_head_align); | 368 | spad = 1 + PAD_POW2((info->hdr_len + 1), spi_up_head_align); |
362 | *dst = (u8)(spad - 1); | 369 | *dst = (u8)(spad - 1); |
363 | dst += spad; | 370 | dst += spad; |
364 | } | 371 | } |
@@ -373,7 +380,7 @@ int cfspi_xmitfrm(struct cfspi *cfspi, u8 *buf, size_t len) | |||
373 | * Compute tail offset i.e. number of bytes to add to | 380 | * Compute tail offset i.e. number of bytes to add to |
374 | * get the complete CAIF frame aligned. | 381 | * get the complete CAIF frame aligned. |
375 | */ | 382 | */ |
376 | epad = (skb->len + spad) & spi_up_tail_align; | 383 | epad = PAD_POW2((skb->len + spad), spi_up_tail_align); |
377 | dst += epad; | 384 | dst += epad; |
378 | 385 | ||
379 | dev_kfree_skb(skb); | 386 | dev_kfree_skb(skb); |
@@ -417,14 +424,14 @@ int cfspi_xmitlen(struct cfspi *cfspi) | |||
417 | * Compute head offset i.e. number of bytes to add to | 424 | * Compute head offset i.e. number of bytes to add to |
418 | * get the start of the payload aligned. | 425 | * get the start of the payload aligned. |
419 | */ | 426 | */ |
420 | if (spi_up_head_align) | 427 | if (spi_up_head_align > 1) |
421 | spad = 1 + ((info->hdr_len + 1) & spi_up_head_align); | 428 | spad = 1 + PAD_POW2((info->hdr_len + 1), spi_up_head_align); |
422 | 429 | ||
423 | /* | 430 | /* |
424 | * Compute tail offset i.e. number of bytes to add to | 431 | * Compute tail offset i.e. number of bytes to add to |
425 | * get the complete CAIF frame aligned. | 432 | * get the complete CAIF frame aligned. |
426 | */ | 433 | */ |
427 | epad = (skb->len + spad) & spi_up_tail_align; | 434 | epad = PAD_POW2((skb->len + spad), spi_up_tail_align); |
428 | 435 | ||
429 | if ((skb->len + spad + epad + frm_len) <= CAIF_MAX_SPI_FRAME) { | 436 | if ((skb->len + spad + epad + frm_len) <= CAIF_MAX_SPI_FRAME) { |
430 | skb_queue_tail(&cfspi->chead, skb); | 437 | skb_queue_tail(&cfspi->chead, skb); |
@@ -433,6 +440,7 @@ int cfspi_xmitlen(struct cfspi *cfspi) | |||
433 | } else { | 440 | } else { |
434 | /* Put back packet. */ | 441 | /* Put back packet. */ |
435 | skb_queue_head(&cfspi->qhead, skb); | 442 | skb_queue_head(&cfspi->qhead, skb); |
443 | break; | ||
436 | } | 444 | } |
437 | } while (pkts <= CAIF_MAX_SPI_PKTS); | 445 | } while (pkts <= CAIF_MAX_SPI_PKTS); |
438 | 446 | ||
@@ -453,6 +461,15 @@ static void cfspi_ss_cb(bool assert, struct cfspi_ifc *ifc) | |||
453 | { | 461 | { |
454 | struct cfspi *cfspi = (struct cfspi *)ifc->priv; | 462 | struct cfspi *cfspi = (struct cfspi *)ifc->priv; |
455 | 463 | ||
464 | /* | ||
465 | * The slave device is the master on the link. Interrupts before the | ||
466 | * slave has transmitted are considered spurious. | ||
467 | */ | ||
468 | if (cfspi->slave && !cfspi->slave_talked) { | ||
469 | printk(KERN_WARNING "CFSPI: Spurious SS interrupt.\n"); | ||
470 | return; | ||
471 | } | ||
472 | |||
456 | if (!in_interrupt()) | 473 | if (!in_interrupt()) |
457 | spin_lock(&cfspi->lock); | 474 | spin_lock(&cfspi->lock); |
458 | if (assert) { | 475 | if (assert) { |
@@ -465,7 +482,8 @@ static void cfspi_ss_cb(bool assert, struct cfspi_ifc *ifc) | |||
465 | spin_unlock(&cfspi->lock); | 482 | spin_unlock(&cfspi->lock); |
466 | 483 | ||
467 | /* Wake up the xfer thread. */ | 484 | /* Wake up the xfer thread. */ |
468 | wake_up_interruptible(&cfspi->wait); | 485 | if (assert) |
486 | wake_up_interruptible(&cfspi->wait); | ||
469 | } | 487 | } |
470 | 488 | ||
471 | static void cfspi_xfer_done_cb(struct cfspi_ifc *ifc) | 489 | static void cfspi_xfer_done_cb(struct cfspi_ifc *ifc) |
@@ -523,7 +541,7 @@ int cfspi_rxfrm(struct cfspi *cfspi, u8 *buf, size_t len) | |||
523 | * Compute head offset i.e. number of bytes added to | 541 | * Compute head offset i.e. number of bytes added to |
524 | * get the start of the payload aligned. | 542 | * get the start of the payload aligned. |
525 | */ | 543 | */ |
526 | if (spi_down_head_align) { | 544 | if (spi_down_head_align > 1) { |
527 | spad = 1 + *src; | 545 | spad = 1 + *src; |
528 | src += spad; | 546 | src += spad; |
529 | } | 547 | } |
@@ -564,7 +582,7 @@ int cfspi_rxfrm(struct cfspi *cfspi, u8 *buf, size_t len) | |||
564 | * Compute tail offset i.e. number of bytes added to | 582 | * Compute tail offset i.e. number of bytes added to |
565 | * get the complete CAIF frame aligned. | 583 | * get the complete CAIF frame aligned. |
566 | */ | 584 | */ |
567 | epad = (pkt_len + spad) & spi_down_tail_align; | 585 | epad = PAD_POW2((pkt_len + spad), spi_down_tail_align); |
568 | src += epad; | 586 | src += epad; |
569 | } while ((src - buf) < len); | 587 | } while ((src - buf) < len); |
570 | 588 | ||
@@ -625,11 +643,20 @@ int cfspi_spi_probe(struct platform_device *pdev) | |||
625 | cfspi->ndev = ndev; | 643 | cfspi->ndev = ndev; |
626 | cfspi->pdev = pdev; | 644 | cfspi->pdev = pdev; |
627 | 645 | ||
628 | /* Set flow info */ | 646 | /* Set flow info. */ |
629 | cfspi->flow_off_sent = 0; | 647 | cfspi->flow_off_sent = 0; |
630 | cfspi->qd_low_mark = LOW_WATER_MARK; | 648 | cfspi->qd_low_mark = LOW_WATER_MARK; |
631 | cfspi->qd_high_mark = HIGH_WATER_MARK; | 649 | cfspi->qd_high_mark = HIGH_WATER_MARK; |
632 | 650 | ||
651 | /* Set slave info. */ | ||
652 | if (!strncmp(cfspi_spi_driver.driver.name, "cfspi_sspi", 10)) { | ||
653 | cfspi->slave = true; | ||
654 | cfspi->slave_talked = false; | ||
655 | } else { | ||
656 | cfspi->slave = false; | ||
657 | cfspi->slave_talked = false; | ||
658 | } | ||
659 | |||
633 | /* Assign the SPI device. */ | 660 | /* Assign the SPI device. */ |
634 | cfspi->dev = dev; | 661 | cfspi->dev = dev; |
635 | /* Assign the device ifc to this SPI interface. */ | 662 | /* Assign the device ifc to this SPI interface. */ |
diff --git a/drivers/net/caif/caif_spi_slave.c b/drivers/net/caif/caif_spi_slave.c index 2111dbfea6fe..1b9943a4edab 100644 --- a/drivers/net/caif/caif_spi_slave.c +++ b/drivers/net/caif/caif_spi_slave.c | |||
@@ -36,10 +36,15 @@ static inline int forward_to_spi_cmd(struct cfspi *cfspi) | |||
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | int spi_frm_align = 2; | 38 | int spi_frm_align = 2; |
39 | int spi_up_head_align = 1; | 39 | |
40 | int spi_up_tail_align; | 40 | /* |
41 | int spi_down_head_align = 3; | 41 | * SPI padding options. |
42 | int spi_down_tail_align = 1; | 42 | * Warning: must be a base of 2 (& operation used) and can not be zero ! |
43 | */ | ||
44 | int spi_up_head_align = 1 << 1; | ||
45 | int spi_up_tail_align = 1 << 0; | ||
46 | int spi_down_head_align = 1 << 2; | ||
47 | int spi_down_tail_align = 1 << 1; | ||
43 | 48 | ||
44 | #ifdef CONFIG_DEBUG_FS | 49 | #ifdef CONFIG_DEBUG_FS |
45 | static inline void debugfs_store_prev(struct cfspi *cfspi) | 50 | static inline void debugfs_store_prev(struct cfspi *cfspi) |
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index 407d4e272075..046d846c652d 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c | |||
@@ -3341,7 +3341,6 @@ static int __devinit init_one(struct pci_dev *pdev, | |||
3341 | adapter->name = adapter->port[i]->name; | 3341 | adapter->name = adapter->port[i]->name; |
3342 | 3342 | ||
3343 | __set_bit(i, &adapter->registered_device_map); | 3343 | __set_bit(i, &adapter->registered_device_map); |
3344 | netif_tx_stop_all_queues(adapter->port[i]); | ||
3345 | } | 3344 | } |
3346 | } | 3345 | } |
3347 | if (!adapter->registered_device_map) { | 3346 | if (!adapter->registered_device_map) { |
diff --git a/drivers/net/cxgb4/cxgb4_main.c b/drivers/net/cxgb4/cxgb4_main.c index f17703f410b3..f50bc98310f8 100644 --- a/drivers/net/cxgb4/cxgb4_main.c +++ b/drivers/net/cxgb4/cxgb4_main.c | |||
@@ -3736,7 +3736,6 @@ static int __devinit init_one(struct pci_dev *pdev, | |||
3736 | 3736 | ||
3737 | __set_bit(i, &adapter->registered_device_map); | 3737 | __set_bit(i, &adapter->registered_device_map); |
3738 | adapter->chan_map[adap2pinfo(adapter, i)->tx_chan] = i; | 3738 | adapter->chan_map[adap2pinfo(adapter, i)->tx_chan] = i; |
3739 | netif_tx_stop_all_queues(adapter->port[i]); | ||
3740 | } | 3739 | } |
3741 | } | 3740 | } |
3742 | if (!adapter->registered_device_map) { | 3741 | if (!adapter->registered_device_map) { |
diff --git a/drivers/net/cxgb4vf/cxgb4vf_main.c b/drivers/net/cxgb4vf/cxgb4vf_main.c index 555ecc5a2e93..6de5e2e448a5 100644 --- a/drivers/net/cxgb4vf/cxgb4vf_main.c +++ b/drivers/net/cxgb4vf/cxgb4vf_main.c | |||
@@ -2600,7 +2600,6 @@ static int __devinit cxgb4vf_pci_probe(struct pci_dev *pdev, | |||
2600 | pi->xact_addr_filt = -1; | 2600 | pi->xact_addr_filt = -1; |
2601 | pi->rx_offload = RX_CSO; | 2601 | pi->rx_offload = RX_CSO; |
2602 | netif_carrier_off(netdev); | 2602 | netif_carrier_off(netdev); |
2603 | netif_tx_stop_all_queues(netdev); | ||
2604 | netdev->irq = pdev->irq; | 2603 | netdev->irq = pdev->irq; |
2605 | 2604 | ||
2606 | netdev->features = (NETIF_F_SG | NETIF_F_TSO | NETIF_F_TSO6 | | 2605 | netdev->features = (NETIF_F_SG | NETIF_F_TSO | NETIF_F_TSO6 | |
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index 385dc3204cb7..06bb9b799458 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c | |||
@@ -2871,7 +2871,6 @@ static int __devinit emac_probe(struct platform_device *ofdev, | |||
2871 | SET_ETHTOOL_OPS(ndev, &emac_ethtool_ops); | 2871 | SET_ETHTOOL_OPS(ndev, &emac_ethtool_ops); |
2872 | 2872 | ||
2873 | netif_carrier_off(ndev); | 2873 | netif_carrier_off(ndev); |
2874 | netif_stop_queue(ndev); | ||
2875 | 2874 | ||
2876 | err = register_netdev(ndev); | 2875 | err = register_netdev(ndev); |
2877 | if (err) { | 2876 | if (err) { |
diff --git a/drivers/net/jme.c b/drivers/net/jme.c index d85edf3119c2..c57d9a43ceca 100644 --- a/drivers/net/jme.c +++ b/drivers/net/jme.c | |||
@@ -2955,11 +2955,7 @@ jme_init_one(struct pci_dev *pdev, | |||
2955 | * Tell stack that we are not ready to work until open() | 2955 | * Tell stack that we are not ready to work until open() |
2956 | */ | 2956 | */ |
2957 | netif_carrier_off(netdev); | 2957 | netif_carrier_off(netdev); |
2958 | netif_stop_queue(netdev); | ||
2959 | 2958 | ||
2960 | /* | ||
2961 | * Register netdev | ||
2962 | */ | ||
2963 | rc = register_netdev(netdev); | 2959 | rc = register_netdev(netdev); |
2964 | if (rc) { | 2960 | if (rc) { |
2965 | pr_err("Cannot register net device\n"); | 2961 | pr_err("Cannot register net device\n"); |
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index a75ba9517404..e1d30d7f2071 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -41,9 +41,6 @@ | |||
41 | MODULE_DESCRIPTION("QLogic/NetXen (1/10) GbE Converged Ethernet Driver"); | 41 | MODULE_DESCRIPTION("QLogic/NetXen (1/10) GbE Converged Ethernet Driver"); |
42 | MODULE_LICENSE("GPL"); | 42 | MODULE_LICENSE("GPL"); |
43 | MODULE_VERSION(NETXEN_NIC_LINUX_VERSIONID); | 43 | MODULE_VERSION(NETXEN_NIC_LINUX_VERSIONID); |
44 | MODULE_FIRMWARE(NX_P2_MN_ROMIMAGE_NAME); | ||
45 | MODULE_FIRMWARE(NX_P3_CT_ROMIMAGE_NAME); | ||
46 | MODULE_FIRMWARE(NX_P3_MN_ROMIMAGE_NAME); | ||
47 | MODULE_FIRMWARE(NX_UNIFIED_ROMIMAGE_NAME); | 44 | MODULE_FIRMWARE(NX_UNIFIED_ROMIMAGE_NAME); |
48 | 45 | ||
49 | char netxen_nic_driver_name[] = "netxen_nic"; | 46 | char netxen_nic_driver_name[] = "netxen_nic"; |
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index 7a298cdf9ab3..a3dcd04be22f 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c | |||
@@ -1450,7 +1450,6 @@ qlcnic_setup_netdev(struct qlcnic_adapter *adapter, | |||
1450 | netdev->irq = adapter->msix_entries[0].vector; | 1450 | netdev->irq = adapter->msix_entries[0].vector; |
1451 | 1451 | ||
1452 | netif_carrier_off(netdev); | 1452 | netif_carrier_off(netdev); |
1453 | netif_stop_queue(netdev); | ||
1454 | 1453 | ||
1455 | err = register_netdev(netdev); | 1454 | err = register_netdev(netdev); |
1456 | if (err) { | 1455 | if (err) { |
diff --git a/drivers/net/smsc911x.h b/drivers/net/smsc911x.h index 52f38e12a879..50f712e99e96 100644 --- a/drivers/net/smsc911x.h +++ b/drivers/net/smsc911x.h | |||
@@ -22,7 +22,7 @@ | |||
22 | #define __SMSC911X_H__ | 22 | #define __SMSC911X_H__ |
23 | 23 | ||
24 | #define TX_FIFO_LOW_THRESHOLD ((u32)1600) | 24 | #define TX_FIFO_LOW_THRESHOLD ((u32)1600) |
25 | #define SMSC911X_EEPROM_SIZE ((u32)7) | 25 | #define SMSC911X_EEPROM_SIZE ((u32)128) |
26 | #define USE_DEBUG 0 | 26 | #define USE_DEBUG 0 |
27 | 27 | ||
28 | /* This is the maximum number of packets to be received every | 28 | /* This is the maximum number of packets to be received every |
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index 28e1ffb13db9..c78a50586c1d 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c | |||
@@ -2021,7 +2021,6 @@ static int __devinit de_init_one (struct pci_dev *pdev, | |||
2021 | de->media_timer.data = (unsigned long) de; | 2021 | de->media_timer.data = (unsigned long) de; |
2022 | 2022 | ||
2023 | netif_carrier_off(dev); | 2023 | netif_carrier_off(dev); |
2024 | netif_stop_queue(dev); | ||
2025 | 2024 | ||
2026 | /* wake up device, assign resources */ | 2025 | /* wake up device, assign resources */ |
2027 | rc = pci_enable_device(pdev); | 2026 | rc = pci_enable_device(pdev); |
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index ca7fc9df1ccf..c04d49e31f81 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <linux/usb/usbnet.h> | 45 | #include <linux/usb/usbnet.h> |
46 | #include <linux/slab.h> | 46 | #include <linux/slab.h> |
47 | #include <linux/kernel.h> | 47 | #include <linux/kernel.h> |
48 | #include <linux/pm_runtime.h> | ||
48 | 49 | ||
49 | #define DRIVER_VERSION "22-Aug-2005" | 50 | #define DRIVER_VERSION "22-Aug-2005" |
50 | 51 | ||
@@ -1273,6 +1274,16 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) | |||
1273 | struct usb_device *xdev; | 1274 | struct usb_device *xdev; |
1274 | int status; | 1275 | int status; |
1275 | const char *name; | 1276 | const char *name; |
1277 | struct usb_driver *driver = to_usb_driver(udev->dev.driver); | ||
1278 | |||
1279 | /* usbnet already took usb runtime pm, so have to enable the feature | ||
1280 | * for usb interface, otherwise usb_autopm_get_interface may return | ||
1281 | * failure if USB_SUSPEND(RUNTIME_PM) is enabled. | ||
1282 | */ | ||
1283 | if (!driver->supports_autosuspend) { | ||
1284 | driver->supports_autosuspend = 1; | ||
1285 | pm_runtime_enable(&udev->dev); | ||
1286 | } | ||
1276 | 1287 | ||
1277 | name = udev->dev.driver->name; | 1288 | name = udev->dev.driver->name; |
1278 | info = (struct driver_info *) prod->driver_info; | 1289 | info = (struct driver_info *) prod->driver_info; |
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c index cb23355f52d3..fbe86ca95802 100644 --- a/drivers/usb/gadget/u_ether.c +++ b/drivers/usb/gadget/u_ether.c | |||
@@ -811,7 +811,6 @@ int gether_setup(struct usb_gadget *g, u8 ethaddr[ETH_ALEN]) | |||
811 | INFO(dev, "MAC %pM\n", net->dev_addr); | 811 | INFO(dev, "MAC %pM\n", net->dev_addr); |
812 | INFO(dev, "HOST MAC %pM\n", dev->host_mac); | 812 | INFO(dev, "HOST MAC %pM\n", dev->host_mac); |
813 | 813 | ||
814 | netif_stop_queue(net); | ||
815 | the_dev = dev; | 814 | the_dev = dev; |
816 | } | 815 | } |
817 | 816 | ||