Commit 3cbaa0f7 authored by Linus Torvalds's avatar Linus Torvalds

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:
  of/phylib: Use device tree properties to initialize Marvell PHYs.
  phylib: Add support for Marvell 88E1149R devices.
  phylib: Use common page register definition for Marvell PHYs.
  qlge: Fix incorrect usage of module parameters and netdev msg level
  ipv6: fix missing in6_ifa_put in addrconf
  SuperH IrDA: correct Baud rate error correction
  atl1c: Fix hardware type check for enabling OTP CLK
  net: allow GFP_HIGHMEM in __vmalloc()
  bonding: change list contact to netdev@vger.kernel.org
  e1000: fix screaming IRQ
parents e9457165 cf41a51d
...@@ -1359,7 +1359,7 @@ F: include/net/bluetooth/ ...@@ -1359,7 +1359,7 @@ F: include/net/bluetooth/
BONDING DRIVER BONDING DRIVER
M: Jay Vosburgh <fubar@us.ibm.com> M: Jay Vosburgh <fubar@us.ibm.com>
L: bonding-devel@lists.sourceforge.net L: netdev@vger.kernel.org
W: http://sourceforge.net/projects/bonding/ W: http://sourceforge.net/projects/bonding/
S: Supported S: Supported
F: drivers/net/bonding/ F: drivers/net/bonding/
......
...@@ -82,7 +82,7 @@ static int atl1c_get_permanent_address(struct atl1c_hw *hw) ...@@ -82,7 +82,7 @@ static int atl1c_get_permanent_address(struct atl1c_hw *hw)
addr[0] = addr[1] = 0; addr[0] = addr[1] = 0;
AT_READ_REG(hw, REG_OTP_CTRL, &otp_ctrl_data); AT_READ_REG(hw, REG_OTP_CTRL, &otp_ctrl_data);
if (atl1c_check_eeprom_exist(hw)) { if (atl1c_check_eeprom_exist(hw)) {
if (hw->nic_type == athr_l1c || hw->nic_type == athr_l2c_b) { if (hw->nic_type == athr_l1c || hw->nic_type == athr_l2c) {
/* Enable OTP CLK */ /* Enable OTP CLK */
if (!(otp_ctrl_data & OTP_CTRL_CLK_EN)) { if (!(otp_ctrl_data & OTP_CTRL_CLK_EN)) {
otp_ctrl_data |= OTP_CTRL_CLK_EN; otp_ctrl_data |= OTP_CTRL_CLK_EN;
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
char e1000_driver_name[] = "e1000"; char e1000_driver_name[] = "e1000";
static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver"; static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver";
#define DRV_VERSION "7.3.21-k6-NAPI" #define DRV_VERSION "7.3.21-k8-NAPI"
const char e1000_driver_version[] = DRV_VERSION; const char e1000_driver_version[] = DRV_VERSION;
static const char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; static const char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation.";
...@@ -485,9 +485,6 @@ void e1000_down(struct e1000_adapter *adapter) ...@@ -485,9 +485,6 @@ void e1000_down(struct e1000_adapter *adapter)
struct net_device *netdev = adapter->netdev; struct net_device *netdev = adapter->netdev;
u32 rctl, tctl; u32 rctl, tctl;
/* signal that we're down so the interrupt handler does not
* reschedule our watchdog timer */
set_bit(__E1000_DOWN, &adapter->flags);
/* disable receives in the hardware */ /* disable receives in the hardware */
rctl = er32(RCTL); rctl = er32(RCTL);
...@@ -508,6 +505,13 @@ void e1000_down(struct e1000_adapter *adapter) ...@@ -508,6 +505,13 @@ void e1000_down(struct e1000_adapter *adapter)
e1000_irq_disable(adapter); e1000_irq_disable(adapter);
/*
* Setting DOWN must be after irq_disable to prevent
* a screaming interrupt. Setting DOWN also prevents
* timers and tasks from rescheduling.
*/
set_bit(__E1000_DOWN, &adapter->flags);
del_timer_sync(&adapter->tx_fifo_stall_timer); del_timer_sync(&adapter->tx_fifo_stall_timer);
del_timer_sync(&adapter->watchdog_timer); del_timer_sync(&adapter->watchdog_timer);
del_timer_sync(&adapter->phy_info_timer); del_timer_sync(&adapter->phy_info_timer);
......
...@@ -258,7 +258,7 @@ static int sh_sir_set_baudrate(struct sh_sir_self *self, u32 baudrate) ...@@ -258,7 +258,7 @@ static int sh_sir_set_baudrate(struct sh_sir_self *self, u32 baudrate)
/* Baud Rate Error Correction x 10000 */ /* Baud Rate Error Correction x 10000 */
u32 rate_err_array[] = { u32 rate_err_array[] = {
0000, 0625, 1250, 1875, 0, 625, 1250, 1875,
2500, 3125, 3750, 4375, 2500, 3125, 3750, 4375,
5000, 5625, 6250, 6875, 5000, 5625, 6250, 6875,
7500, 8125, 8750, 9375, 7500, 8125, 8750, 9375,
......
...@@ -30,11 +30,14 @@ ...@@ -30,11 +30,14 @@
#include <linux/ethtool.h> #include <linux/ethtool.h>
#include <linux/phy.h> #include <linux/phy.h>
#include <linux/marvell_phy.h> #include <linux/marvell_phy.h>
#include <linux/of.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#define MII_MARVELL_PHY_PAGE 22
#define MII_M1011_IEVENT 0x13 #define MII_M1011_IEVENT 0x13
#define MII_M1011_IEVENT_CLEAR 0x0000 #define MII_M1011_IEVENT_CLEAR 0x0000
...@@ -80,7 +83,6 @@ ...@@ -80,7 +83,6 @@
#define MII_88E1121_PHY_LED_CTRL 16 #define MII_88E1121_PHY_LED_CTRL 16
#define MII_88E1121_PHY_LED_PAGE 3 #define MII_88E1121_PHY_LED_PAGE 3
#define MII_88E1121_PHY_LED_DEF 0x0030 #define MII_88E1121_PHY_LED_DEF 0x0030
#define MII_88E1121_PHY_PAGE 22
#define MII_M1011_PHY_STATUS 0x11 #define MII_M1011_PHY_STATUS 0x11
#define MII_M1011_PHY_STATUS_1000 0x8000 #define MII_M1011_PHY_STATUS_1000 0x8000
...@@ -186,13 +188,94 @@ static int marvell_config_aneg(struct phy_device *phydev) ...@@ -186,13 +188,94 @@ static int marvell_config_aneg(struct phy_device *phydev)
return 0; return 0;
} }
#ifdef CONFIG_OF_MDIO
/*
* Set and/or override some configuration registers based on the
* marvell,reg-init property stored in the of_node for the phydev.
*
* marvell,reg-init = <reg-page reg mask value>,...;
*
* There may be one or more sets of <reg-page reg mask value>:
*
* reg-page: which register bank to use.
* reg: the register.
* mask: if non-zero, ANDed with existing register value.
* value: ORed with the masked value and written to the regiser.
*
*/
static int marvell_of_reg_init(struct phy_device *phydev)
{
const __be32 *paddr;
int len, i, saved_page, current_page, page_changed, ret;
if (!phydev->dev.of_node)
return 0;
paddr = of_get_property(phydev->dev.of_node, "marvell,reg-init", &len);
if (!paddr || len < (4 * sizeof(*paddr)))
return 0;
saved_page = phy_read(phydev, MII_MARVELL_PHY_PAGE);
if (saved_page < 0)
return saved_page;
page_changed = 0;
current_page = saved_page;
ret = 0;
len /= sizeof(*paddr);
for (i = 0; i < len - 3; i += 4) {
u16 reg_page = be32_to_cpup(paddr + i);
u16 reg = be32_to_cpup(paddr + i + 1);
u16 mask = be32_to_cpup(paddr + i + 2);
u16 val_bits = be32_to_cpup(paddr + i + 3);
int val;
if (reg_page != current_page) {
current_page = reg_page;
page_changed = 1;
ret = phy_write(phydev, MII_MARVELL_PHY_PAGE, reg_page);
if (ret < 0)
goto err;
}
val = 0;
if (mask) {
val = phy_read(phydev, reg);
if (val < 0) {
ret = val;
goto err;
}
val &= mask;
}
val |= val_bits;
ret = phy_write(phydev, reg, val);
if (ret < 0)
goto err;
}
err:
if (page_changed) {
i = phy_write(phydev, MII_MARVELL_PHY_PAGE, saved_page);
if (ret == 0)
ret = i;
}
return ret;
}
#else
static int marvell_of_reg_init(struct phy_device *phydev)
{
return 0;
}
#endif /* CONFIG_OF_MDIO */
static int m88e1121_config_aneg(struct phy_device *phydev) static int m88e1121_config_aneg(struct phy_device *phydev)
{ {
int err, oldpage, mscr; int err, oldpage, mscr;
oldpage = phy_read(phydev, MII_88E1121_PHY_PAGE); oldpage = phy_read(phydev, MII_MARVELL_PHY_PAGE);
err = phy_write(phydev, MII_88E1121_PHY_PAGE, err = phy_write(phydev, MII_MARVELL_PHY_PAGE,
MII_88E1121_PHY_MSCR_PAGE); MII_88E1121_PHY_MSCR_PAGE);
if (err < 0) if (err < 0)
return err; return err;
...@@ -218,7 +301,7 @@ static int m88e1121_config_aneg(struct phy_device *phydev) ...@@ -218,7 +301,7 @@ static int m88e1121_config_aneg(struct phy_device *phydev)
return err; return err;
} }
phy_write(phydev, MII_88E1121_PHY_PAGE, oldpage); phy_write(phydev, MII_MARVELL_PHY_PAGE, oldpage);
err = phy_write(phydev, MII_BMCR, BMCR_RESET); err = phy_write(phydev, MII_BMCR, BMCR_RESET);
if (err < 0) if (err < 0)
...@@ -229,11 +312,11 @@ static int m88e1121_config_aneg(struct phy_device *phydev) ...@@ -229,11 +312,11 @@ static int m88e1121_config_aneg(struct phy_device *phydev)
if (err < 0) if (err < 0)
return err; return err;
oldpage = phy_read(phydev, MII_88E1121_PHY_PAGE); oldpage = phy_read(phydev, MII_MARVELL_PHY_PAGE);
phy_write(phydev, MII_88E1121_PHY_PAGE, MII_88E1121_PHY_LED_PAGE); phy_write(phydev, MII_MARVELL_PHY_PAGE, MII_88E1121_PHY_LED_PAGE);
phy_write(phydev, MII_88E1121_PHY_LED_CTRL, MII_88E1121_PHY_LED_DEF); phy_write(phydev, MII_88E1121_PHY_LED_CTRL, MII_88E1121_PHY_LED_DEF);
phy_write(phydev, MII_88E1121_PHY_PAGE, oldpage); phy_write(phydev, MII_MARVELL_PHY_PAGE, oldpage);
err = genphy_config_aneg(phydev); err = genphy_config_aneg(phydev);
...@@ -244,9 +327,9 @@ static int m88e1318_config_aneg(struct phy_device *phydev) ...@@ -244,9 +327,9 @@ static int m88e1318_config_aneg(struct phy_device *phydev)
{ {
int err, oldpage, mscr; int err, oldpage, mscr;
oldpage = phy_read(phydev, MII_88E1121_PHY_PAGE); oldpage = phy_read(phydev, MII_MARVELL_PHY_PAGE);
err = phy_write(phydev, MII_88E1121_PHY_PAGE, err = phy_write(phydev, MII_MARVELL_PHY_PAGE,
MII_88E1121_PHY_MSCR_PAGE); MII_88E1121_PHY_MSCR_PAGE);
if (err < 0) if (err < 0)
return err; return err;
...@@ -258,7 +341,7 @@ static int m88e1318_config_aneg(struct phy_device *phydev) ...@@ -258,7 +341,7 @@ static int m88e1318_config_aneg(struct phy_device *phydev)
if (err < 0) if (err < 0)
return err; return err;
err = phy_write(phydev, MII_88E1121_PHY_PAGE, oldpage); err = phy_write(phydev, MII_MARVELL_PHY_PAGE, oldpage);
if (err < 0) if (err < 0)
return err; return err;
...@@ -368,6 +451,9 @@ static int m88e1111_config_init(struct phy_device *phydev) ...@@ -368,6 +451,9 @@ static int m88e1111_config_init(struct phy_device *phydev)
return err; return err;
} }
err = marvell_of_reg_init(phydev);
if (err < 0)
return err;
err = phy_write(phydev, MII_BMCR, BMCR_RESET); err = phy_write(phydev, MII_BMCR, BMCR_RESET);
if (err < 0) if (err < 0)
...@@ -398,7 +484,7 @@ static int m88e1118_config_init(struct phy_device *phydev) ...@@ -398,7 +484,7 @@ static int m88e1118_config_init(struct phy_device *phydev)
int err; int err;
/* Change address */ /* Change address */
err = phy_write(phydev, 0x16, 0x0002); err = phy_write(phydev, MII_MARVELL_PHY_PAGE, 0x0002);
if (err < 0) if (err < 0)
return err; return err;
...@@ -408,7 +494,7 @@ static int m88e1118_config_init(struct phy_device *phydev) ...@@ -408,7 +494,7 @@ static int m88e1118_config_init(struct phy_device *phydev)
return err; return err;
/* Change address */ /* Change address */
err = phy_write(phydev, 0x16, 0x0003); err = phy_write(phydev, MII_MARVELL_PHY_PAGE, 0x0003);
if (err < 0) if (err < 0)
return err; return err;
...@@ -420,8 +506,42 @@ static int m88e1118_config_init(struct phy_device *phydev) ...@@ -420,8 +506,42 @@ static int m88e1118_config_init(struct phy_device *phydev)
if (err < 0) if (err < 0)
return err; return err;
err = marvell_of_reg_init(phydev);
if (err < 0)
return err;
/* Reset address */ /* Reset address */
err = phy_write(phydev, 0x16, 0x0); err = phy_write(phydev, MII_MARVELL_PHY_PAGE, 0x0);
if (err < 0)
return err;
err = phy_write(phydev, MII_BMCR, BMCR_RESET);
if (err < 0)
return err;
return 0;
}
static int m88e1149_config_init(struct phy_device *phydev)
{
int err;
/* Change address */
err = phy_write(phydev, MII_MARVELL_PHY_PAGE, 0x0002);
if (err < 0)
return err;
/* Enable 1000 Mbit */
err = phy_write(phydev, 0x15, 0x1048);
if (err < 0)
return err;
err = marvell_of_reg_init(phydev);
if (err < 0)
return err;
/* Reset address */
err = phy_write(phydev, MII_MARVELL_PHY_PAGE, 0x0);
if (err < 0) if (err < 0)
return err; return err;
...@@ -491,6 +611,10 @@ static int m88e1145_config_init(struct phy_device *phydev) ...@@ -491,6 +611,10 @@ static int m88e1145_config_init(struct phy_device *phydev)
} }
} }
err = marvell_of_reg_init(phydev);
if (err < 0)
return err;
return 0; return 0;
} }
...@@ -684,6 +808,19 @@ static struct phy_driver marvell_drivers[] = { ...@@ -684,6 +808,19 @@ static struct phy_driver marvell_drivers[] = {
.config_intr = &marvell_config_intr, .config_intr = &marvell_config_intr,
.driver = { .owner = THIS_MODULE }, .driver = { .owner = THIS_MODULE },
}, },
{
.phy_id = MARVELL_PHY_ID_88E1149R,
.phy_id_mask = MARVELL_PHY_ID_MASK,
.name = "Marvell 88E1149R",
.features = PHY_GBIT_FEATURES,
.flags = PHY_HAS_INTERRUPT,
.config_init = &m88e1149_config_init,
.config_aneg = &m88e1118_config_aneg,
.read_status = &genphy_read_status,
.ack_interrupt = &marvell_ack_interrupt,
.config_intr = &marvell_config_intr,
.driver = { .owner = THIS_MODULE },
},
{ {
.phy_id = MARVELL_PHY_ID_88E1240, .phy_id = MARVELL_PHY_ID_88E1240,
.phy_id_mask = MARVELL_PHY_ID_MASK, .phy_id_mask = MARVELL_PHY_ID_MASK,
...@@ -735,6 +872,7 @@ static struct mdio_device_id __maybe_unused marvell_tbl[] = { ...@@ -735,6 +872,7 @@ static struct mdio_device_id __maybe_unused marvell_tbl[] = {
{ 0x01410e10, 0xfffffff0 }, { 0x01410e10, 0xfffffff0 },
{ 0x01410cb0, 0xfffffff0 }, { 0x01410cb0, 0xfffffff0 },
{ 0x01410cd0, 0xfffffff0 }, { 0x01410cd0, 0xfffffff0 },
{ 0x01410e50, 0xfffffff0 },
{ 0x01410e30, 0xfffffff0 }, { 0x01410e30, 0xfffffff0 },
{ 0x01410e90, 0xfffffff0 }, { 0x01410e90, 0xfffffff0 },
{ } { }
......
...@@ -62,15 +62,15 @@ static const u32 default_msg = ...@@ -62,15 +62,15 @@ static const u32 default_msg =
/* NETIF_MSG_PKTDATA | */ /* NETIF_MSG_PKTDATA | */
NETIF_MSG_HW | NETIF_MSG_WOL | 0; NETIF_MSG_HW | NETIF_MSG_WOL | 0;
static int debug = 0x00007fff; /* defaults above */ static int debug = -1; /* defaults above */
module_param(debug, int, 0); module_param(debug, int, 0664);
MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)"); MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)");
#define MSIX_IRQ 0 #define MSIX_IRQ 0
#define MSI_IRQ 1 #define MSI_IRQ 1
#define LEG_IRQ 2 #define LEG_IRQ 2
static int qlge_irq_type = MSIX_IRQ; static int qlge_irq_type = MSIX_IRQ;
module_param(qlge_irq_type, int, MSIX_IRQ); module_param(qlge_irq_type, int, 0664);
MODULE_PARM_DESC(qlge_irq_type, "0 = MSI-X, 1 = MSI, 2 = Legacy."); MODULE_PARM_DESC(qlge_irq_type, "0 = MSI-X, 1 = MSI, 2 = Legacy.");
static int qlge_mpi_coredump; static int qlge_mpi_coredump;
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#define MARVELL_PHY_ID_88E1118 0x01410e10 #define MARVELL_PHY_ID_88E1118 0x01410e10
#define MARVELL_PHY_ID_88E1121R 0x01410cb0 #define MARVELL_PHY_ID_88E1121R 0x01410cb0
#define MARVELL_PHY_ID_88E1145 0x01410cd0 #define MARVELL_PHY_ID_88E1145 0x01410cd0
#define MARVELL_PHY_ID_88E1149R 0x01410e50
#define MARVELL_PHY_ID_88E1240 0x01410e30 #define MARVELL_PHY_ID_88E1240 0x01410e30
#define MARVELL_PHY_ID_88E1318S 0x01410e90 #define MARVELL_PHY_ID_88E1318S 0x01410e90
......
...@@ -19,7 +19,7 @@ struct ceph_buffer *ceph_buffer_new(size_t len, gfp_t gfp) ...@@ -19,7 +19,7 @@ struct ceph_buffer *ceph_buffer_new(size_t len, gfp_t gfp)
if (b->vec.iov_base) { if (b->vec.iov_base) {
b->is_vmalloc = false; b->is_vmalloc = false;
} else { } else {
b->vec.iov_base = __vmalloc(len, gfp, PAGE_KERNEL); b->vec.iov_base = __vmalloc(len, gfp | __GFP_HIGHMEM, PAGE_KERNEL);
if (!b->vec.iov_base) { if (!b->vec.iov_base) {
kfree(b); kfree(b);
return NULL; return NULL;
......
...@@ -45,9 +45,7 @@ int reqsk_queue_alloc(struct request_sock_queue *queue, ...@@ -45,9 +45,7 @@ int reqsk_queue_alloc(struct request_sock_queue *queue,
nr_table_entries = roundup_pow_of_two(nr_table_entries + 1); nr_table_entries = roundup_pow_of_two(nr_table_entries + 1);
lopt_size += nr_table_entries * sizeof(struct request_sock *); lopt_size += nr_table_entries * sizeof(struct request_sock *);
if (lopt_size > PAGE_SIZE) if (lopt_size > PAGE_SIZE)
lopt = __vmalloc(lopt_size, lopt = vzalloc(lopt_size);
GFP_KERNEL | __GFP_HIGHMEM | __GFP_ZERO,
PAGE_KERNEL);
else else
lopt = kzalloc(lopt_size, GFP_KERNEL); lopt = kzalloc(lopt_size, GFP_KERNEL);
if (lopt == NULL) if (lopt == NULL)
......
...@@ -365,7 +365,7 @@ static struct tnode *tnode_alloc(size_t size) ...@@ -365,7 +365,7 @@ static struct tnode *tnode_alloc(size_t size)
if (size <= PAGE_SIZE) if (size <= PAGE_SIZE)
return kzalloc(size, GFP_KERNEL); return kzalloc(size, GFP_KERNEL);
else else
return __vmalloc(size, GFP_KERNEL | __GFP_ZERO, PAGE_KERNEL); return vzalloc(size);
} }
static void __tnode_vfree(struct work_struct *arg) static void __tnode_vfree(struct work_struct *arg)
......
...@@ -2758,13 +2758,13 @@ static int addrconf_ifdown(struct net_device *dev, int how) ...@@ -2758,13 +2758,13 @@ static int addrconf_ifdown(struct net_device *dev, int how)
ifa->state = INET6_IFADDR_STATE_DEAD; ifa->state = INET6_IFADDR_STATE_DEAD;
spin_unlock_bh(&ifa->state_lock); spin_unlock_bh(&ifa->state_lock);
if (state == INET6_IFADDR_STATE_DEAD) { if (state != INET6_IFADDR_STATE_DEAD) {
in6_ifa_put(ifa);
} else {
__ipv6_ifa_notify(RTM_DELADDR, ifa); __ipv6_ifa_notify(RTM_DELADDR, ifa);
atomic_notifier_call_chain(&inet6addr_chain, atomic_notifier_call_chain(&inet6addr_chain,
NETDEV_DOWN, ifa); NETDEV_DOWN, ifa);
} }
in6_ifa_put(ifa);
write_lock_bh(&idev->lock); write_lock_bh(&idev->lock);
} }
} }
......
...@@ -19,7 +19,7 @@ struct hlist_head *xfrm_hash_alloc(unsigned int sz) ...@@ -19,7 +19,7 @@ struct hlist_head *xfrm_hash_alloc(unsigned int sz)
if (sz <= PAGE_SIZE) if (sz <= PAGE_SIZE)
n = kzalloc(sz, GFP_KERNEL); n = kzalloc(sz, GFP_KERNEL);
else if (hashdist) else if (hashdist)
n = __vmalloc(sz, GFP_KERNEL | __GFP_ZERO, PAGE_KERNEL); n = vzalloc(sz);
else else
n = (struct hlist_head *) n = (struct hlist_head *)
__get_free_pages(GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO, __get_free_pages(GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment