Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145477
b: refs/heads/master
c: 6823cfe
h: refs/heads/master
i:
  145475: a264719
v: v3
  • Loading branch information
Linus Torvalds committed Jun 3, 2009
1 parent ce8a28e commit ec1fb84
Show file tree
Hide file tree
Showing 12 changed files with 71 additions and 29 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: 60e59f68824102c87e64c5f51c4e57c0b8a61e46
refs/heads/master: 6823cfe5531f7507cca5699cda4abd0f65a78bcf
7 changes: 4 additions & 3 deletions trunk/crypto/ahash.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,11 @@ int crypto_hash_walk_done(struct crypto_hash_walk *walk, int err)
if (err)
return err;

walk->offset = 0;

if (nbytes)
if (nbytes) {
walk->offset = 0;
walk->pg++;
return hash_walk_next(walk);
}

if (!walk->total)
return 0;
Expand Down
13 changes: 12 additions & 1 deletion trunk/drivers/ata/pata_netcell.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,24 @@

/* 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 = {
ATA_BMDMA_SHT(DRV_NAME),
};

static struct ata_port_operations netcell_ops = {
.inherits = &ata_bmdma_port_ops,
.cable_detect = ata_cable_80wire,
.cable_detect = ata_cable_80wire,
.read_id = netcell_read_id,
};


Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4027,8 +4027,9 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter,
PCI_DMA_FROMDEVICE);

length = le16_to_cpu(rx_desc->length);

if (unlikely(!(status & E1000_RXD_STAT_EOP))) {
/* !EOP means multiple descriptors were used to store a single
* 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 */
E1000_DBG("%s: Receive packet consumed multiple"
" buffers\n", netdev->name);
Expand Down
15 changes: 13 additions & 2 deletions trunk/drivers/net/forcedeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,12 @@ enum {
};
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)
{
return netdev_priv(dev);
Expand Down Expand Up @@ -1485,7 +1491,10 @@ static int phy_init(struct net_device *dev)

/* restart auto negotiation, power down phy */
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)) {
return PHY_ERROR;
}
Expand Down Expand Up @@ -5513,7 +5522,7 @@ static int nv_close(struct net_device *dev)

nv_drain_rxtx(dev);

if (np->wolenabled) {
if (np->wolenabled || !phy_power_down) {
writel(NVREG_PFF_ALWAYS|NVREG_PFF_MYADDR, base + NvRegPacketFilterFlags);
nv_start_rx(dev);
} else {
Expand Down Expand Up @@ -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_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_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_DESCRIPTION("Reverse Engineered nForce ethernet driver");
Expand Down
13 changes: 10 additions & 3 deletions trunk/drivers/parport/share.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,10 @@ parport_register_device(struct parport *port, const char *name,
* pardevice fields. -arca
*/
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;

out_free_all:
Expand Down Expand Up @@ -646,10 +649,14 @@ void parport_unregister_device(struct pardevice *dev)
}
#endif

parport_device_proc_unregister(dev);

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) {
printk(KERN_DEBUG "%s: %s forgot to release port\n",
port->name, dev->name);
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/xfs/linux-2.6/kmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ extern void *kmem_zone_zalloc(kmem_zone_t *, unsigned int __nocast);
static inline int
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__ */
8 changes: 5 additions & 3 deletions trunk/fs/xfs/xfs_dfrag.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,13 +347,15 @@ xfs_swap_extents(

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:
kmem_free(tempifp);
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:
xfs_trans_cancel(tp, 0);
goto out_unlock;
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/xfs/xfs_fsops.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ xfs_growfs_data_private(
nagcount = new + (nb_mod != 0);
if (nb_mod && nb_mod < XFS_MIN_AG_BLOCKS) {
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)
return XFS_ERROR(EINVAL);
}
Expand Down
4 changes: 4 additions & 0 deletions trunk/include/linux/parport.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,10 @@ struct parport {
int spintime;
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 parport *slaves[3];
};
Expand Down
6 changes: 0 additions & 6 deletions trunk/net/bluetooth/hci_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_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);

if (device_add(&conn->dev) < 0) {
Expand All @@ -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_dev *hdev = conn->hdev;

/* ensure previous add is complete */
flush_work(&conn->work_add);

if (!device_is_registered(&conn->dev))
return;

Expand Down
23 changes: 17 additions & 6 deletions trunk/net/sched/cls_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
unsigned long cl;
unsigned long fh;
int err;
int tp_created = 0;

if (net != &init_net)
return -EINVAL;
Expand Down Expand Up @@ -266,10 +267,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
goto errout;
}

spin_lock_bh(root_lock);
tp->next = *back;
*back = tp;
spin_unlock_bh(root_lock);
tp_created = 1;

} else if (tca[TCA_KIND] && nla_strcmp(tca[TCA_KIND], tp->ops->kind))
goto errout;
Expand All @@ -296,8 +294,11 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
switch (n->nlmsg_type) {
case RTM_NEWTFILTER:
err = -EEXIST;
if (n->nlmsg_flags & NLM_F_EXCL)
if (n->nlmsg_flags & NLM_F_EXCL) {
if (tp_created)
tcf_destroy(tp);
goto errout;
}
break;
case RTM_DELTFILTER:
err = tp->ops->delete(tp, fh);
Expand All @@ -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);
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);
} else {
if (tp_created)
tcf_destroy(tp);
}

errout:
if (cl)
Expand Down

0 comments on commit ec1fb84

Please sign in to comment.