Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109680
b: refs/heads/master
c: 5b66c82
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Jeff Garzik committed Sep 8, 2008
1 parent 4ace532 commit 1a7443b
Show file tree
Hide file tree
Showing 18 changed files with 87 additions and 124 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: a46add72f79bb8196f07a860adddd312ca398eec
refs/heads/master: 5b66c829bf5c65663b2f68ee6b42f6e834cd39cd
2 changes: 1 addition & 1 deletion trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1593,7 +1593,7 @@ S: Supported
EMBEDDED LINUX
P: Paul Gortmaker
M: paul.gortmaker@windriver.com
P: David Woodhouse
P David Woodhouse
M: dwmw2@infradead.org
L: linux-embedded@vger.kernel.org
S: Maintained
Expand Down
14 changes: 8 additions & 6 deletions trunk/arch/sparc64/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ void smp_bogo(struct seq_file *m)
i, cpu_data(i).clock_tick);
}

static __cacheline_aligned_in_smp DEFINE_SPINLOCK(call_lock);

extern void setup_sparc64_timer(void);

static volatile unsigned long callin_flag = 0;
Expand Down Expand Up @@ -118,9 +120,9 @@ void __cpuinit smp_callin(void)
while (!cpu_isset(cpuid, smp_commenced_mask))
rmb();

ipi_call_lock();
spin_lock(&call_lock);
cpu_set(cpuid, cpu_online_map);
ipi_call_unlock();
spin_unlock(&call_lock);

/* idle thread is expected to have preempt disabled */
preempt_disable();
Expand Down Expand Up @@ -1303,6 +1305,10 @@ int __cpu_disable(void)
c->core_id = 0;
c->proc_id = -1;

spin_lock(&call_lock);
cpu_clear(cpu, cpu_online_map);
spin_unlock(&call_lock);

smp_wmb();

/* Make sure no interrupts point to this cpu. */
Expand All @@ -1312,10 +1318,6 @@ int __cpu_disable(void)
mdelay(1);
local_irq_disable();

ipi_call_lock();
cpu_clear(cpu, cpu_online_map);
ipi_call_unlock();

return 0;
}

Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/ata/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,10 @@ config PATA_MARVELL
tristate "Marvell PATA support via legacy mode"
depends on PCI
help
This option enables limited support for the Marvell 88SE6145 ATA
controller.
This option enables limited support for the Marvell 88SE61xx ATA
controllers. If you wish to use only the SATA ports then select
the AHCI driver alone. If you wish to the use the PATA port or
both SATA and PATA include this driver.

If unsure, say N.

Expand Down
17 changes: 17 additions & 0 deletions trunk/drivers/ata/ahci.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,15 @@ module_param(ahci_em_messages, int, 0444);
MODULE_PARM_DESC(ahci_em_messages,
"Set AHCI Enclosure Management Message type (0 = disabled, 1 = LED");

#if defined(CONFIG_PATA_MARVELL) || defined(CONFIG_PATA_MARVELL_MODULE)
static int marvell_enable;
#else
static int marvell_enable = 1;
#endif
module_param(marvell_enable, int, 0644);
MODULE_PARM_DESC(marvell_enable, "Marvell SATA via AHCI (1 = enabled)");


static inline int ahci_nr_ports(u32 cap)
{
return (cap & 0x1f) + 1;
Expand Down Expand Up @@ -732,6 +741,8 @@ static void ahci_save_initial_config(struct pci_dev *pdev,
"MV_AHCI HACK: port_map %x -> %x\n",
port_map,
port_map & mv);
dev_printk(KERN_ERR, &pdev->dev,
"Disabling your PATA port. Use the boot option 'ahci.marvell_enable=0' to avoid this.\n");

port_map &= mv;
}
Expand Down Expand Up @@ -2533,6 +2544,12 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
if (!printed_version++)
dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n");

/* The AHCI driver can only drive the SATA ports, the PATA driver
can drive them all so if both drivers are selected make sure
AHCI stays out of the way */
if (pdev->vendor == PCI_VENDOR_ID_MARVELL && !marvell_enable)
return -ENODEV;

/* acquire resources */
rc = pcim_enable_device(pdev);
if (rc)
Expand Down
51 changes: 38 additions & 13 deletions trunk/drivers/ata/pata_marvell.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,30 @@
#include <linux/ata.h>

#define DRV_NAME "pata_marvell"
#define DRV_VERSION "0.1.4"
#define DRV_VERSION "0.1.6"

/**
* marvell_pre_reset - check for 40/80 pin
* @link: link
* @deadline: deadline jiffies for the operation
* marvell_pata_active - check if PATA is active
* @pdev: PCI device
*
* Perform the PATA port setup we need.
* Returns 1 if the PATA port may be active. We know how to check this
* for the 6145 but not the other devices
*/

static int marvell_pre_reset(struct ata_link *link, unsigned long deadline)
static int marvell_pata_active(struct pci_dev *pdev)
{
struct ata_port *ap = link->ap;
struct pci_dev *pdev = to_pci_dev(ap->host->dev);
int i;
u32 devices;
void __iomem *barp;
int i;

/* Check if our port is enabled */
/* We don't yet know how to do this for other devices */
if (pdev->device != 0x6145)
return 1;

barp = pci_iomap(pdev, 5, 0x10);
if (barp == NULL)
return -ENOMEM;

printk("BAR5:");
for(i = 0; i <= 0x0F; i++)
printk("%02X:%02X ", i, ioread8(barp + i));
Expand All @@ -51,9 +52,27 @@ static int marvell_pre_reset(struct ata_link *link, unsigned long deadline)
devices = ioread32(barp + 0x0C);
pci_iounmap(pdev, barp);

if ((pdev->device == 0x6145) && (ap->port_no == 0) &&
(!(devices & 0x10))) /* PATA enable ? */
return -ENOENT;
if (devices & 0x10)
return 1;
return 0;
}

/**
* marvell_pre_reset - check for 40/80 pin
* @link: link
* @deadline: deadline jiffies for the operation
*
* Perform the PATA port setup we need.
*/

static int marvell_pre_reset(struct ata_link *link, unsigned long deadline)
{
struct ata_port *ap = link->ap;
struct pci_dev *pdev = to_pci_dev(ap->host->dev);

if (pdev->device == 0x6145 && ap->port_no == 0 &&
!marvell_pata_active(pdev)) /* PATA enable ? */
return -ENOENT;

return ata_sff_prereset(link, deadline);
}
Expand Down Expand Up @@ -128,6 +147,12 @@ static int marvell_init_one (struct pci_dev *pdev, const struct pci_device_id *i
if (pdev->device == 0x6101)
ppi[1] = &ata_dummy_port_info;

#if defined(CONFIG_AHCI) || defined(CONFIG_AHCI_MODULE)
if (!marvell_pata_active(pdev)) {
printk(KERN_INFO DRV_NAME ": PATA port not active, deferring to AHCI driver.\n");
return -ENODEV;
}
#endif
return ata_pci_sff_init_one(pdev, ppi, &marvell_sht, NULL);
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/usb/serial/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static int usb_console_setup(struct console *co, char *options)
if (serial->type->set_termios) {
termios->c_cflag = cflag;
tty_termios_encode_baud_rate(termios, baud, baud);
serial->type->set_termios(tty, port, &dummy);
serial->type->set_termios(NULL, port, &dummy);

port->port.tty = NULL;
kfree(termios);
Expand Down
6 changes: 0 additions & 6 deletions trunk/fs/nfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1279,12 +1279,6 @@ static int nfs_parse_mount_options(char *raw,
}
}

if (errors > 0) {
dfprintk(MOUNT, "NFS: parsing encountered %d error%s\n",
errors, (errors == 1 ? "" : "s"));
if (!sloppy)
return 0;
}
return 1;

out_nomem:
Expand Down
3 changes: 0 additions & 3 deletions trunk/include/net/inet_timewait_sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,6 @@ extern void inet_twsk_schedule(struct inet_timewait_sock *tw,
extern void inet_twsk_deschedule(struct inet_timewait_sock *tw,
struct inet_timewait_death_row *twdr);

extern void inet_twsk_purge(struct net *net, struct inet_hashinfo *hashinfo,
struct inet_timewait_death_row *twdr, int family);

static inline
struct net *twsk_net(const struct inet_timewait_sock *twsk)
{
Expand Down
8 changes: 1 addition & 7 deletions trunk/net/bridge/br_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,21 +188,15 @@ static int old_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
return 0;

case BRCTL_SET_BRIDGE_HELLO_TIME:
{
unsigned long t = clock_t_to_jiffies(args[1]);
if (!capable(CAP_NET_ADMIN))
return -EPERM;

if (t < HZ)
return -EINVAL;

spin_lock_bh(&br->lock);
br->bridge_hello_time = t;
br->bridge_hello_time = clock_t_to_jiffies(args[1]);
if (br_is_root_bridge(br))
br->hello_time = br->bridge_hello_time;
spin_unlock_bh(&br->lock);
return 0;
}

case BRCTL_SET_BRIDGE_MAX_AGE:
if (!capable(CAP_NET_ADMIN))
Expand Down
26 changes: 8 additions & 18 deletions trunk/net/bridge/br_sysfs_br.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@
*/
static ssize_t store_bridge_parm(struct device *d,
const char *buf, size_t len,
int (*set)(struct net_bridge *, unsigned long))
void (*set)(struct net_bridge *, unsigned long))
{
struct net_bridge *br = to_bridge(d);
char *endp;
unsigned long val;
int err;

if (!capable(CAP_NET_ADMIN))
return -EPERM;
Expand All @@ -44,9 +43,9 @@ static ssize_t store_bridge_parm(struct device *d,
return -EINVAL;

spin_lock_bh(&br->lock);
err = (*set)(br, val);
(*set)(br, val);
spin_unlock_bh(&br->lock);
return err ? err : len;
return len;
}


Expand All @@ -57,13 +56,12 @@ static ssize_t show_forward_delay(struct device *d,
return sprintf(buf, "%lu\n", jiffies_to_clock_t(br->forward_delay));
}

static int set_forward_delay(struct net_bridge *br, unsigned long val)
static void set_forward_delay(struct net_bridge *br, unsigned long val)
{
unsigned long delay = clock_t_to_jiffies(val);
br->forward_delay = delay;
if (br_is_root_bridge(br))
br->bridge_forward_delay = delay;
return 0;
}

static ssize_t store_forward_delay(struct device *d,
Expand All @@ -82,17 +80,12 @@ static ssize_t show_hello_time(struct device *d, struct device_attribute *attr,
jiffies_to_clock_t(to_bridge(d)->hello_time));
}

static int set_hello_time(struct net_bridge *br, unsigned long val)
static void set_hello_time(struct net_bridge *br, unsigned long val)
{
unsigned long t = clock_t_to_jiffies(val);

if (t < HZ)
return -EINVAL;

br->hello_time = t;
if (br_is_root_bridge(br))
br->bridge_hello_time = t;
return 0;
}

static ssize_t store_hello_time(struct device *d,
Expand All @@ -111,13 +104,12 @@ static ssize_t show_max_age(struct device *d, struct device_attribute *attr,
jiffies_to_clock_t(to_bridge(d)->max_age));
}

static int set_max_age(struct net_bridge *br, unsigned long val)
static void set_max_age(struct net_bridge *br, unsigned long val)
{
unsigned long t = clock_t_to_jiffies(val);
br->max_age = t;
if (br_is_root_bridge(br))
br->bridge_max_age = t;
return 0;
}

static ssize_t store_max_age(struct device *d, struct device_attribute *attr,
Expand All @@ -134,10 +126,9 @@ static ssize_t show_ageing_time(struct device *d,
return sprintf(buf, "%lu\n", jiffies_to_clock_t(br->ageing_time));
}

static int set_ageing_time(struct net_bridge *br, unsigned long val)
static void set_ageing_time(struct net_bridge *br, unsigned long val)
{
br->ageing_time = clock_t_to_jiffies(val);
return 0;
}

static ssize_t store_ageing_time(struct device *d,
Expand Down Expand Up @@ -189,10 +180,9 @@ static ssize_t show_priority(struct device *d, struct device_attribute *attr,
(br->bridge_id.prio[0] << 8) | br->bridge_id.prio[1]);
}

static int set_priority(struct net_bridge *br, unsigned long val)
static void set_priority(struct net_bridge *br, unsigned long val)
{
br_stp_set_bridge_priority(br, (u16) val);
return 0;
}

static ssize_t store_priority(struct device *d, struct device_attribute *attr,
Expand Down
7 changes: 1 addition & 6 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1991,13 +1991,8 @@ static void net_tx_action(struct softirq_action *h)
spin_unlock(root_lock);
} else {
if (!test_bit(__QDISC_STATE_DEACTIVATED,
&q->state)) {
&q->state))
__netif_reschedule(q);
} else {
smp_mb__before_clear_bit();
clear_bit(__QDISC_STATE_SCHED,
&q->state);
}
}
}
}
Expand Down
35 changes: 0 additions & 35 deletions trunk/net/ipv4/inet_timewait_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -409,38 +409,3 @@ void inet_twdr_twcal_tick(unsigned long data)
}

EXPORT_SYMBOL_GPL(inet_twdr_twcal_tick);

void inet_twsk_purge(struct net *net, struct inet_hashinfo *hashinfo,
struct inet_timewait_death_row *twdr, int family)
{
struct inet_timewait_sock *tw;
struct sock *sk;
struct hlist_node *node;
int h;

local_bh_disable();
for (h = 0; h < (hashinfo->ehash_size); h++) {
struct inet_ehash_bucket *head =
inet_ehash_bucket(hashinfo, h);
rwlock_t *lock = inet_ehash_lockp(hashinfo, h);
restart:
write_lock(lock);
sk_for_each(sk, node, &head->twchain) {

tw = inet_twsk(sk);
if (!net_eq(twsk_net(tw), net) ||
tw->tw_family != family)
continue;

atomic_inc(&tw->tw_refcnt);
write_unlock(lock);
inet_twsk_deschedule(tw, twdr);
inet_twsk_put(tw);

goto restart;
}
write_unlock(lock);
}
local_bh_enable();
}
EXPORT_SYMBOL_GPL(inet_twsk_purge);
Loading

0 comments on commit 1a7443b

Please sign in to comment.