Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 117925
b: refs/heads/master
c: b70a6b2
h: refs/heads/master
i:
  117923: 086b8f6
v: v3
  • Loading branch information
Linus Torvalds committed Oct 27, 2008
1 parent 32f4b41 commit 18ab285
Show file tree
Hide file tree
Showing 33 changed files with 208 additions and 69 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: 3a63913f607832a2629545467e715a40ec930c32
refs/heads/master: b70a6b27ed4cbb9ea7a4e1abc080ed65692ecb9b
2 changes: 1 addition & 1 deletion trunk/drivers/bluetooth/btsdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ static int btsdio_rx_packet(struct btsdio_data *data)

err = sdio_readsb(data->func, skb->data, REG_RDAT, len - 4);
if (err < 0) {
kfree(skb);
kfree_skb(skb);
return err;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/hw_random/amd-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* derived from
*
* Hardware driver for the AMD 768 Random Number Generator (RNG)
* (c) Copyright 2001 Red Hat Inc <alan@redhat.com>
* (c) Copyright 2001 Red Hat Inc
*
* derived from
*
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/hw_random/geode-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* derived from
*
* Hardware driver for the AMD 768 Random Number Generator (RNG)
* (c) Copyright 2001 Red Hat Inc <alan@redhat.com>
* (c) Copyright 2001 Red Hat Inc
*
* derived from
*
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/hw_random/intel-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* derived from
*
* Hardware driver for the AMD 768 Random Number Generator (RNG)
* (c) Copyright 2001 Red Hat Inc <alan@redhat.com>
* (c) Copyright 2001 Red Hat Inc
*
* derived from
*
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/hw_random/via-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* derived from
*
* Hardware driver for the AMD 768 Random Number Generator (RNG)
* (c) Copyright 2001 Red Hat Inc <alan@redhat.com>
* (c) Copyright 2001 Red Hat Inc
*
* derived from
*
Expand Down
50 changes: 41 additions & 9 deletions trunk/drivers/firewire/fw-ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ static int ar_context_add_page(struct ar_context *ctx)
if (ab == NULL)
return -ENOMEM;

ab->next = NULL;
memset(&ab->descriptor, 0, sizeof(ab->descriptor));
ab->descriptor.control = cpu_to_le16(DESCRIPTOR_INPUT_MORE |
DESCRIPTOR_STATUS |
Expand All @@ -496,6 +497,21 @@ static int ar_context_add_page(struct ar_context *ctx)
return 0;
}

static void ar_context_release(struct ar_context *ctx)
{
struct ar_buffer *ab, *ab_next;
size_t offset;
dma_addr_t ab_bus;

for (ab = ctx->current_buffer; ab; ab = ab_next) {
ab_next = ab->next;
offset = offsetof(struct ar_buffer, data);
ab_bus = le32_to_cpu(ab->descriptor.data_address) - offset;
dma_free_coherent(ctx->ohci->card.device, PAGE_SIZE,
ab, ab_bus);
}
}

#if defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32)
#define cond_le32_to_cpu(v) \
(ohci->old_uninorth ? (__force __u32)(v) : le32_to_cpu(v))
Expand Down Expand Up @@ -2349,8 +2365,8 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)

ohci = kzalloc(sizeof(*ohci), GFP_KERNEL);
if (ohci == NULL) {
fw_error("Could not malloc fw_ohci data.\n");
return -ENOMEM;
err = -ENOMEM;
goto fail;
}

fw_card_initialize(&ohci->card, &ohci_driver, &dev->dev);
Expand All @@ -2359,7 +2375,7 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)

err = pci_enable_device(dev);
if (err) {
fw_error("Failed to enable OHCI hardware.\n");
fw_error("Failed to enable OHCI hardware\n");
goto fail_free;
}

Expand Down Expand Up @@ -2427,9 +2443,8 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
ohci->ir_context_list = kzalloc(size, GFP_KERNEL);

if (ohci->it_context_list == NULL || ohci->ir_context_list == NULL) {
fw_error("Out of memory for it/ir contexts.\n");
err = -ENOMEM;
goto fail_registers;
goto fail_contexts;
}

/* self-id dma buffer allocation */
Expand All @@ -2438,9 +2453,8 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
&ohci->self_id_bus,
GFP_KERNEL);
if (ohci->self_id_cpu == NULL) {
fw_error("Out of memory for self ID buffer.\n");
err = -ENOMEM;
goto fail_registers;
goto fail_contexts;
}

bus_options = reg_read(ohci, OHCI1394_BusOptions);
Expand All @@ -2460,9 +2474,13 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
fail_self_id:
dma_free_coherent(ohci->card.device, SELF_ID_BUF_SIZE,
ohci->self_id_cpu, ohci->self_id_bus);
fail_registers:
kfree(ohci->it_context_list);
fail_contexts:
kfree(ohci->ir_context_list);
kfree(ohci->it_context_list);
context_release(&ohci->at_response_ctx);
context_release(&ohci->at_request_ctx);
ar_context_release(&ohci->ar_response_ctx);
ar_context_release(&ohci->ar_request_ctx);
pci_iounmap(dev, ohci->registers);
fail_iomem:
pci_release_region(dev, 0);
Expand All @@ -2471,6 +2489,9 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent)
fail_free:
kfree(&ohci->card);
ohci_pmac_off(dev);
fail:
if (err == -ENOMEM)
fw_error("Out of memory\n");

return err;
}
Expand All @@ -2491,8 +2512,19 @@ static void pci_remove(struct pci_dev *dev)

software_reset(ohci);
free_irq(dev->irq, ohci);

if (ohci->next_config_rom && ohci->next_config_rom != ohci->config_rom)
dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,
ohci->next_config_rom, ohci->next_config_rom_bus);
if (ohci->config_rom)
dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,
ohci->config_rom, ohci->config_rom_bus);
dma_free_coherent(ohci->card.device, SELF_ID_BUF_SIZE,
ohci->self_id_cpu, ohci->self_id_bus);
ar_context_release(&ohci->ar_request_ctx);
ar_context_release(&ohci->ar_response_ctx);
context_release(&ohci->at_request_ctx);
context_release(&ohci->at_response_ctx);
kfree(ohci->it_context_list);
kfree(ohci->ir_context_list);
pci_iounmap(dev, ohci->registers);
Expand Down
38 changes: 27 additions & 11 deletions trunk/drivers/firewire/fw-sbp2.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ struct sbp2_target {
int blocked; /* ditto */
};

/* Impossible login_id, to detect logout attempt before successful login */
#define INVALID_LOGIN_ID 0x10000

/*
* Per section 7.4.8 of the SBP-2 spec, a mgt_ORB_timeout value can be
* provided in the config rom. Most devices do provide a value, which
Expand Down Expand Up @@ -788,9 +791,20 @@ static void sbp2_release_target(struct kref *kref)
scsi_remove_device(sdev);
scsi_device_put(sdev);
}
sbp2_send_management_orb(lu, tgt->node_id, lu->generation,
SBP2_LOGOUT_REQUEST, lu->login_id, NULL);

if (lu->login_id != INVALID_LOGIN_ID) {
int generation, node_id;
/*
* tgt->node_id may be obsolete here if we failed
* during initial login or after a bus reset where
* the topology changed.
*/
generation = device->generation;
smp_rmb(); /* node_id vs. generation */
node_id = device->node_id;
sbp2_send_management_orb(lu, node_id, generation,
SBP2_LOGOUT_REQUEST,
lu->login_id, NULL);
}
fw_core_remove_address_handler(&lu->address_handler);
list_del(&lu->link);
kfree(lu);
Expand All @@ -805,19 +819,20 @@ static void sbp2_release_target(struct kref *kref)

static struct workqueue_struct *sbp2_wq;

static void sbp2_target_put(struct sbp2_target *tgt)
{
kref_put(&tgt->kref, sbp2_release_target);
}

/*
* Always get the target's kref when scheduling work on one its units.
* Each workqueue job is responsible to call sbp2_target_put() upon return.
*/
static void sbp2_queue_work(struct sbp2_logical_unit *lu, unsigned long delay)
{
if (queue_delayed_work(sbp2_wq, &lu->work, delay))
kref_get(&lu->tgt->kref);
}

static void sbp2_target_put(struct sbp2_target *tgt)
{
kref_put(&tgt->kref, sbp2_release_target);
kref_get(&lu->tgt->kref);
if (!queue_delayed_work(sbp2_wq, &lu->work, delay))
sbp2_target_put(lu->tgt);
}

/*
Expand Down Expand Up @@ -978,6 +993,7 @@ static int sbp2_add_logical_unit(struct sbp2_target *tgt, int lun_entry)

lu->tgt = tgt;
lu->lun = lun_entry & 0xffff;
lu->login_id = INVALID_LOGIN_ID;
lu->retries = 0;
lu->has_sdev = false;
lu->blocked = false;
Expand Down Expand Up @@ -1147,7 +1163,7 @@ static int sbp2_probe(struct device *dev)

/* Do the login in a workqueue so we can easily reschedule retries. */
list_for_each_entry(lu, &tgt->lu_list, link)
sbp2_queue_work(lu, 0);
sbp2_queue_work(lu, DIV_ROUND_UP(HZ, 5));
return 0;

fail_tgt_put:
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/firewire/fw-topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ static void
update_tree(struct fw_card *card, struct fw_node *root)
{
struct list_head list0, list1;
struct fw_node *node0, *node1;
struct fw_node *node0, *node1, *next1;
int i, event;

INIT_LIST_HEAD(&list0);
Expand Down Expand Up @@ -485,7 +485,9 @@ update_tree(struct fw_card *card, struct fw_node *root)
}

node0 = fw_node(node0->link.next);
node1 = fw_node(node1->link.next);
next1 = fw_node(node1->link.next);
fw_node_put(node1);
node1 = next1;
}
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/firewire/fw-transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ struct fw_card {
struct fw_node *local_node;
struct fw_node *root_node;
struct fw_node *irm_node;
int color;
u8 color; /* must be u8 to match the definition in struct fw_node */
int gap_count;
bool beta_repeaters_present;

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/leds/leds-da903x.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/leds.h>
#include <linux/workqueue.h>
#include <linux/mfd/da903x.h>

#define DA9030_LED1_CONTROL 0x20
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/libertas/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ static int process_rxed_802_11_packet(struct lbs_private *priv,
lbs_deb_rx("rx err: frame received with bad length\n");
priv->stats.rx_length_errors++;
ret = -EINVAL;
kfree(skb);
kfree_skb(skb);
goto done;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/coda/psdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* An implementation of a loadable kernel mode driver providing
* multiple kernel/user space bidirectional communications links.
*
* Author: Alan Cox <alan@redhat.com>
* Author: Alan Cox <alan@lxorguk.ukuu.org.uk>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* nfs inode and superblock handling functions
*
* Modularised by Alan Cox <Alan.Cox@linux.org>, while hacking some
* Modularised by Alan Cox <alan@lxorguk.ukuu.org.uk>, while hacking some
* experimental NFS changes. Modularisation taken straight from SYS5 fs.
*
* Change to nfs_read_super() to permit NFS mounts to multi-homed hosts.
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* nfs superblock handling functions
*
* Modularised by Alan Cox <Alan.Cox@linux.org>, while hacking some
* Modularised by Alan Cox <alan@lxorguk.ukuu.org.uk>, while hacking some
* experimental NFS changes. Modularisation taken straight from SYS5 fs.
*
* Change to nfs_read_super() to permit NFS mounts to multi-homed hosts.
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/proc/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
*
*
* Alan Cox : security fixes.
* <Alan.Cox@linux.org>
* <alan@lxorguk.ukuu.org.uk>
*
* Al Viro : safe handling of mm_struct
*
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/phonet.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ struct phonetmsg {
} pn_msg_u;
};
#define PN_COMMON_MESSAGE 0xF0
#define PN_COMMGR 0x10
#define PN_PREFIX 0xE0 /* resource for extended messages */
#define pn_submsg_id pn_msg_u.base.pn_submsg_id
#define pn_e_submsg_id pn_msg_u.ext.pn_e_submsg_id
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/net/phonet/phonet.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* The lower layers may not require more space, ever. Make sure it's
* enough.
*/
#define MAX_PHONET_HEADER 8
#define MAX_PHONET_HEADER (8 + MAX_HEADER)

/*
* Every Phonet* socket has this structure first in its
Expand Down
10 changes: 5 additions & 5 deletions trunk/net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -2279,6 +2279,11 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,
}

memset(&opts, 0, sizeof(opts));
#ifdef CONFIG_SYN_COOKIES
if (unlikely(req->cookie_ts))
TCP_SKB_CB(skb)->when = cookie_init_timestamp(req);
else
#endif
TCP_SKB_CB(skb)->when = tcp_time_stamp;
tcp_header_size = tcp_synack_options(sk, req, mss,
skb, &opts, &md5) +
Expand All @@ -2304,11 +2309,6 @@ struct sk_buff *tcp_make_synack(struct sock *sk, struct dst_entry *dst,

/* RFC1323: The window in SYN & SYN/ACK segments is never scaled. */
th->window = htons(min(req->rcv_wnd, 65535U));
#ifdef CONFIG_SYN_COOKIES
if (unlikely(req->cookie_ts))
TCP_SKB_CB(skb)->when = cookie_init_timestamp(req);
else
#endif
tcp_options_write((__be32 *)(th + 1), tp, &opts, &md5_hash_location);
th->doff = (tcp_header_size >> 2);
TCP_INC_STATS(sock_net(sk), TCP_MIB_OUTSEGS);
Expand Down
5 changes: 4 additions & 1 deletion trunk/net/phonet/af_phonet.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ static inline int can_respond(struct sk_buff *skb)
return 0; /* we are not the destination */
if (ph->pn_res == PN_PREFIX && !pskb_may_pull(skb, 5))
return 0;
if (ph->pn_res == PN_COMMGR) /* indications */
return 0;

ph = pn_hdr(skb); /* re-acquires the pointer */
pm = pn_msg(skb);
Expand Down Expand Up @@ -309,7 +311,8 @@ static int send_reset_indications(struct sk_buff *rskb)

return pn_raw_send(data, sizeof(data), rskb->dev,
pn_object(oph->pn_sdev, 0x00),
pn_object(oph->pn_rdev, oph->pn_robj), 0x10);
pn_object(oph->pn_rdev, oph->pn_robj),
PN_COMMGR);
}


Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/oss/kahlua.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* Initialisation code for Cyrix/NatSemi VSA1 softaudio
*
* (C) Copyright 2003 Red Hat Inc <alan@redhat.com>
* (C) Copyright 2003 Red Hat Inc <alan@lxorguk.ukuu.org.uk>
*
* XpressAudio(tm) is used on the Cyrix MediaGX (now NatSemi Geode) systems.
* The older version (VSA1) provides fairly good soundblaster emulation
Expand Down
Loading

0 comments on commit 18ab285

Please sign in to comment.