Commit 947ca2e9 authored by Russell King's avatar Russell King Committed by Russell King

Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6

parents 1946d6ef 6b4bfb87
VERSION = 2 VERSION = 2
PATCHLEVEL = 6 PATCHLEVEL = 6
SUBLEVEL = 30 SUBLEVEL = 30
EXTRAVERSION = -rc7 EXTRAVERSION = -rc8
NAME = Man-Eating Seals of Antiquity NAME = Man-Eating Seals of Antiquity
# *DOCUMENTATION* # *DOCUMENTATION*
......
...@@ -890,7 +890,7 @@ static struct clk clko_clk = { ...@@ -890,7 +890,7 @@ static struct clk clko_clk = {
.con_id = n, \ .con_id = n, \
.clk = &c, \ .clk = &c, \
}, },
static struct clk_lookup lookups[] __initdata = { static struct clk_lookup lookups[] = {
/* It's unlikely that any driver wants one of them directly: /* It's unlikely that any driver wants one of them directly:
_REGISTER_CLOCK(NULL, "ckih", ckih_clk) _REGISTER_CLOCK(NULL, "ckih", ckih_clk)
_REGISTER_CLOCK(NULL, "ckil", ckil_clk) _REGISTER_CLOCK(NULL, "ckil", ckil_clk)
......
...@@ -621,7 +621,7 @@ DEFINE_CLOCK1(csi_clk, 0, 0, 0, parent, &csi_clk1, &per4_clk); ...@@ -621,7 +621,7 @@ DEFINE_CLOCK1(csi_clk, 0, 0, 0, parent, &csi_clk1, &per4_clk);
.clk = &c, \ .clk = &c, \
}, },
static struct clk_lookup lookups[] __initdata = { static struct clk_lookup lookups[] = {
_REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk) _REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk)
_REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk) _REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk)
_REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk) _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk)
......
...@@ -404,7 +404,7 @@ DEFINE_CLOCK(gpu2d_clk, 0, CCM_CGR3, 4, NULL, NULL); ...@@ -404,7 +404,7 @@ DEFINE_CLOCK(gpu2d_clk, 0, CCM_CGR3, 4, NULL, NULL);
.clk = &c, \ .clk = &c, \
}, },
static struct clk_lookup lookups[] __initdata = { static struct clk_lookup lookups[] = {
_REGISTER_CLOCK(NULL, "asrc", asrc_clk) _REGISTER_CLOCK(NULL, "asrc", asrc_clk)
_REGISTER_CLOCK(NULL, "ata", ata_clk) _REGISTER_CLOCK(NULL, "ata", ata_clk)
_REGISTER_CLOCK(NULL, "audmux", audmux_clk) _REGISTER_CLOCK(NULL, "audmux", audmux_clk)
......
...@@ -516,7 +516,7 @@ DEFINE_CLOCK(ipg_clk, 0, NULL, 0, ipg_get_rate, NULL, &ahb_clk); ...@@ -516,7 +516,7 @@ DEFINE_CLOCK(ipg_clk, 0, NULL, 0, ipg_get_rate, NULL, &ahb_clk);
.clk = &c, \ .clk = &c, \
}, },
static struct clk_lookup lookups[] __initdata = { static struct clk_lookup lookups[] = {
_REGISTER_CLOCK(NULL, "emi", emi_clk) _REGISTER_CLOCK(NULL, "emi", emi_clk)
_REGISTER_CLOCK(NULL, "cspi", cspi1_clk) _REGISTER_CLOCK(NULL, "cspi", cspi1_clk)
_REGISTER_CLOCK(NULL, "cspi", cspi2_clk) _REGISTER_CLOCK(NULL, "cspi", cspi2_clk)
......
This diff is collapsed.
...@@ -82,10 +82,11 @@ int crypto_hash_walk_done(struct crypto_hash_walk *walk, int err) ...@@ -82,10 +82,11 @@ int crypto_hash_walk_done(struct crypto_hash_walk *walk, int err)
if (err) if (err)
return err; return err;
walk->offset = 0; if (nbytes) {
walk->offset = 0;
if (nbytes) walk->pg++;
return hash_walk_next(walk); return hash_walk_next(walk);
}
if (!walk->total) if (!walk->total)
return 0; return 0;
......
...@@ -20,13 +20,24 @@ ...@@ -20,13 +20,24 @@
/* No PIO or DMA methods needed for this device */ /* No PIO or DMA methods needed for this device */
static unsigned int netcell_read_id(struct ata_device *adev,
struct ata_taskfile *tf, u16 *id)
{
unsigned int err_mask = ata_do_dev_read_id(adev, tf, id);
/* Firmware forgets to mark words 85-87 valid */
if (err_mask == 0)
id[ATA_ID_CSF_DEFAULT] |= 0x0400;
return err_mask;
}
static struct scsi_host_template netcell_sht = { static struct scsi_host_template netcell_sht = {
ATA_BMDMA_SHT(DRV_NAME), ATA_BMDMA_SHT(DRV_NAME),
}; };
static struct ata_port_operations netcell_ops = { static struct ata_port_operations netcell_ops = {
.inherits = &ata_bmdma_port_ops, .inherits = &ata_bmdma_port_ops,
.cable_detect = ata_cable_80wire, .cable_detect = ata_cable_80wire,
.read_id = netcell_read_id,
}; };
......
...@@ -4027,8 +4027,9 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter, ...@@ -4027,8 +4027,9 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter,
PCI_DMA_FROMDEVICE); PCI_DMA_FROMDEVICE);
length = le16_to_cpu(rx_desc->length); length = le16_to_cpu(rx_desc->length);
/* !EOP means multiple descriptors were used to store a single
if (unlikely(!(status & E1000_RXD_STAT_EOP))) { * packet, also make sure the frame isn't just CRC only */
if (unlikely(!(status & E1000_RXD_STAT_EOP) || (length <= 4))) {
/* All receives must fit into a single buffer */ /* All receives must fit into a single buffer */
E1000_DBG("%s: Receive packet consumed multiple" E1000_DBG("%s: Receive packet consumed multiple"
" buffers\n", netdev->name); " buffers\n", netdev->name);
......
...@@ -897,6 +897,12 @@ enum { ...@@ -897,6 +897,12 @@ enum {
}; };
static int phy_cross = NV_CROSSOVER_DETECTION_DISABLED; static int phy_cross = NV_CROSSOVER_DETECTION_DISABLED;
/*
* Power down phy when interface is down (persists through reboot;
* older Linux and other OSes may not power it up again)
*/
static int phy_power_down = 0;
static inline struct fe_priv *get_nvpriv(struct net_device *dev) static inline struct fe_priv *get_nvpriv(struct net_device *dev)
{ {
return netdev_priv(dev); return netdev_priv(dev);
...@@ -1485,7 +1491,10 @@ static int phy_init(struct net_device *dev) ...@@ -1485,7 +1491,10 @@ static int phy_init(struct net_device *dev)
/* restart auto negotiation, power down phy */ /* restart auto negotiation, power down phy */
mii_control = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ); mii_control = mii_rw(dev, np->phyaddr, MII_BMCR, MII_READ);
mii_control |= (BMCR_ANRESTART | BMCR_ANENABLE | BMCR_PDOWN); mii_control |= (BMCR_ANRESTART | BMCR_ANENABLE);
if (phy_power_down) {
mii_control |= BMCR_PDOWN;
}
if (mii_rw(dev, np->phyaddr, MII_BMCR, mii_control)) { if (mii_rw(dev, np->phyaddr, MII_BMCR, mii_control)) {
return PHY_ERROR; return PHY_ERROR;
} }
...@@ -5513,7 +5522,7 @@ static int nv_close(struct net_device *dev) ...@@ -5513,7 +5522,7 @@ static int nv_close(struct net_device *dev)
nv_drain_rxtx(dev); nv_drain_rxtx(dev);
if (np->wolenabled) { if (np->wolenabled || !phy_power_down) {
writel(NVREG_PFF_ALWAYS|NVREG_PFF_MYADDR, base + NvRegPacketFilterFlags); writel(NVREG_PFF_ALWAYS|NVREG_PFF_MYADDR, base + NvRegPacketFilterFlags);
nv_start_rx(dev); nv_start_rx(dev);
} else { } else {
...@@ -6367,6 +6376,8 @@ module_param(dma_64bit, int, 0); ...@@ -6367,6 +6376,8 @@ module_param(dma_64bit, int, 0);
MODULE_PARM_DESC(dma_64bit, "High DMA is enabled by setting to 1 and disabled by setting to 0."); MODULE_PARM_DESC(dma_64bit, "High DMA is enabled by setting to 1 and disabled by setting to 0.");
module_param(phy_cross, int, 0); module_param(phy_cross, int, 0);
MODULE_PARM_DESC(phy_cross, "Phy crossover detection for Realtek 8201 phy is enabled by setting to 1 and disabled by setting to 0."); MODULE_PARM_DESC(phy_cross, "Phy crossover detection for Realtek 8201 phy is enabled by setting to 1 and disabled by setting to 0.");
module_param(phy_power_down, int, 0);
MODULE_PARM_DESC(phy_power_down, "Power down phy and disable link when interface is down (1), or leave phy powered up (0).");
MODULE_AUTHOR("Manfred Spraul <manfred@colorfullife.com>"); MODULE_AUTHOR("Manfred Spraul <manfred@colorfullife.com>");
MODULE_DESCRIPTION("Reverse Engineered nForce ethernet driver"); MODULE_DESCRIPTION("Reverse Engineered nForce ethernet driver");
......
...@@ -614,7 +614,10 @@ parport_register_device(struct parport *port, const char *name, ...@@ -614,7 +614,10 @@ parport_register_device(struct parport *port, const char *name,
* pardevice fields. -arca * pardevice fields. -arca
*/ */
port->ops->init_state(tmp, tmp->state); port->ops->init_state(tmp, tmp->state);
parport_device_proc_register(tmp); if (!test_and_set_bit(PARPORT_DEVPROC_REGISTERED, &port->devflags)) {
port->proc_device = tmp;
parport_device_proc_register(tmp);
}
return tmp; return tmp;
out_free_all: out_free_all:
...@@ -646,10 +649,14 @@ void parport_unregister_device(struct pardevice *dev) ...@@ -646,10 +649,14 @@ void parport_unregister_device(struct pardevice *dev)
} }
#endif #endif
parport_device_proc_unregister(dev);
port = dev->port->physport; port = dev->port->physport;
if (port->proc_device == dev) {
port->proc_device = NULL;
clear_bit(PARPORT_DEVPROC_REGISTERED, &port->devflags);
parport_device_proc_unregister(dev);
}
if (port->cad == dev) { if (port->cad == dev) {
printk(KERN_DEBUG "%s: %s forgot to release port\n", printk(KERN_DEBUG "%s: %s forgot to release port\n",
port->name, dev->name); port->name, dev->name);
......
...@@ -1031,6 +1031,8 @@ imx_console_setup(struct console *co, char *options) ...@@ -1031,6 +1031,8 @@ imx_console_setup(struct console *co, char *options)
if (co->index == -1 || co->index >= ARRAY_SIZE(imx_ports)) if (co->index == -1 || co->index >= ARRAY_SIZE(imx_ports))
co->index = 0; co->index = 0;
sport = imx_ports[co->index]; sport = imx_ports[co->index];
if(sport == NULL)
return -ENODEV;
if (options) if (options)
uart_parse_options(options, &baud, &parity, &bits, &flow); uart_parse_options(options, &baud, &parity, &bits, &flow);
......
...@@ -103,7 +103,7 @@ extern void *kmem_zone_zalloc(kmem_zone_t *, unsigned int __nocast); ...@@ -103,7 +103,7 @@ extern void *kmem_zone_zalloc(kmem_zone_t *, unsigned int __nocast);
static inline int static inline int
kmem_shake_allow(gfp_t gfp_mask) kmem_shake_allow(gfp_t gfp_mask)
{ {
return (gfp_mask & __GFP_WAIT) != 0; return ((gfp_mask & __GFP_WAIT) && (gfp_mask & __GFP_FS));
} }
#endif /* __XFS_SUPPORT_KMEM_H__ */ #endif /* __XFS_SUPPORT_KMEM_H__ */
...@@ -347,13 +347,15 @@ xfs_swap_extents( ...@@ -347,13 +347,15 @@ xfs_swap_extents(
error = xfs_trans_commit(tp, XFS_TRANS_SWAPEXT); error = xfs_trans_commit(tp, XFS_TRANS_SWAPEXT);
out_unlock:
xfs_iunlock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
out: out:
kmem_free(tempifp); kmem_free(tempifp);
return error; return error;
out_unlock:
xfs_iunlock(ip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
xfs_iunlock(tip, XFS_ILOCK_EXCL | XFS_IOLOCK_EXCL);
goto out;
out_trans_cancel: out_trans_cancel:
xfs_trans_cancel(tp, 0); xfs_trans_cancel(tp, 0);
goto out_unlock; goto out_unlock;
......
...@@ -160,7 +160,7 @@ xfs_growfs_data_private( ...@@ -160,7 +160,7 @@ xfs_growfs_data_private(
nagcount = new + (nb_mod != 0); nagcount = new + (nb_mod != 0);
if (nb_mod && nb_mod < XFS_MIN_AG_BLOCKS) { if (nb_mod && nb_mod < XFS_MIN_AG_BLOCKS) {
nagcount--; nagcount--;
nb = nagcount * mp->m_sb.sb_agblocks; nb = (xfs_rfsblock_t)nagcount * mp->m_sb.sb_agblocks;
if (nb < mp->m_sb.sb_dblocks) if (nb < mp->m_sb.sb_dblocks)
return XFS_ERROR(EINVAL); return XFS_ERROR(EINVAL);
} }
......
...@@ -324,6 +324,10 @@ struct parport { ...@@ -324,6 +324,10 @@ struct parport {
int spintime; int spintime;
atomic_t ref_count; atomic_t ref_count;
unsigned long devflags;
#define PARPORT_DEVPROC_REGISTERED 0
struct pardevice *proc_device; /* Currently register proc device */
struct list_head full_list; struct list_head full_list;
struct parport *slaves[3]; struct parport *slaves[3];
}; };
......
...@@ -90,9 +90,6 @@ static void add_conn(struct work_struct *work) ...@@ -90,9 +90,6 @@ static void add_conn(struct work_struct *work)
struct hci_conn *conn = container_of(work, struct hci_conn, work_add); struct hci_conn *conn = container_of(work, struct hci_conn, work_add);
struct hci_dev *hdev = conn->hdev; struct hci_dev *hdev = conn->hdev;
/* ensure previous del is complete */
flush_work(&conn->work_del);
dev_set_name(&conn->dev, "%s:%d", hdev->name, conn->handle); dev_set_name(&conn->dev, "%s:%d", hdev->name, conn->handle);
if (device_add(&conn->dev) < 0) { if (device_add(&conn->dev) < 0) {
...@@ -118,9 +115,6 @@ static void del_conn(struct work_struct *work) ...@@ -118,9 +115,6 @@ static void del_conn(struct work_struct *work)
struct hci_conn *conn = container_of(work, struct hci_conn, work_del); struct hci_conn *conn = container_of(work, struct hci_conn, work_del);
struct hci_dev *hdev = conn->hdev; struct hci_dev *hdev = conn->hdev;
/* ensure previous add is complete */
flush_work(&conn->work_add);
if (!device_is_registered(&conn->dev)) if (!device_is_registered(&conn->dev))
return; return;
......
...@@ -135,6 +135,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg) ...@@ -135,6 +135,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
unsigned long cl; unsigned long cl;
unsigned long fh; unsigned long fh;
int err; int err;
int tp_created = 0;
if (net != &init_net) if (net != &init_net)
return -EINVAL; return -EINVAL;
...@@ -266,10 +267,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg) ...@@ -266,10 +267,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
goto errout; goto errout;
} }
spin_lock_bh(root_lock); tp_created = 1;
tp->next = *back;
*back = tp;
spin_unlock_bh(root_lock);
} else if (tca[TCA_KIND] && nla_strcmp(tca[TCA_KIND], tp->ops->kind)) } else if (tca[TCA_KIND] && nla_strcmp(tca[TCA_KIND], tp->ops->kind))
goto errout; goto errout;
...@@ -296,8 +294,11 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg) ...@@ -296,8 +294,11 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
switch (n->nlmsg_type) { switch (n->nlmsg_type) {
case RTM_NEWTFILTER: case RTM_NEWTFILTER:
err = -EEXIST; err = -EEXIST;
if (n->nlmsg_flags & NLM_F_EXCL) if (n->nlmsg_flags & NLM_F_EXCL) {
if (tp_created)
tcf_destroy(tp);
goto errout; goto errout;
}
break; break;
case RTM_DELTFILTER: case RTM_DELTFILTER:
err = tp->ops->delete(tp, fh); err = tp->ops->delete(tp, fh);
...@@ -314,8 +315,18 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg) ...@@ -314,8 +315,18 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
} }
err = tp->ops->change(tp, cl, t->tcm_handle, tca, &fh); err = tp->ops->change(tp, cl, t->tcm_handle, tca, &fh);
if (err == 0) if (err == 0) {
if (tp_created) {
spin_lock_bh(root_lock);
tp->next = *back;
*back = tp;
spin_unlock_bh(root_lock);
}
tfilter_notify(skb, n, tp, fh, RTM_NEWTFILTER); tfilter_notify(skb, n, tp, fh, RTM_NEWTFILTER);
} else {
if (tp_created)
tcf_destroy(tp);
}
errout: errout:
if (cl) if (cl)
......
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