Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9891
b: refs/heads/master
c: 9e04099
h: refs/heads/master
i:
  9889: 6cf2766
  9887: 5dfa2c0
v: v3
  • Loading branch information
Linus Torvalds committed Oct 15, 2005
1 parent d8ad7e5 commit 62087e4
Show file tree
Hide file tree
Showing 27 changed files with 186 additions and 71 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: 414894938b88c1ad2e9cea6502ceccefb30605c4
refs/heads/master: 9e04099cb90dce6a34b4cbc6b4a0d4e4cc4c5680
44 changes: 44 additions & 0 deletions trunk/Documentation/connector/connector.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,47 @@ Netlink itself is not reliable protocol, that means that messages can
be lost due to memory pressure or process' receiving queue overflowed,
so caller is warned must be prepared. That is why struct cn_msg [main
connector's message header] contains u32 seq and u32 ack fields.

/*****************************************/
Userspace usage.
/*****************************************/
2.6.14 has a new netlink socket implementation, which by default does not
allow to send data to netlink groups other than 1.
So, if to use netlink socket (for example using connector)
with different group number userspace application must subscribe to
that group. It can be achieved by following pseudocode:

s = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR);

l_local.nl_family = AF_NETLINK;
l_local.nl_groups = 12345;
l_local.nl_pid = 0;

if (bind(s, (struct sockaddr *)&l_local, sizeof(struct sockaddr_nl)) == -1) {
perror("bind");
close(s);
return -1;
}

{
int on = l_local.nl_groups;
setsockopt(s, 270, 1, &on, sizeof(on));
}

Where 270 above is SOL_NETLINK, and 1 is a NETLINK_ADD_MEMBERSHIP socket
option. To drop multicast subscription one should call above socket option
with NETLINK_DROP_MEMBERSHIP parameter which is defined as 0.

2.6.14 netlink code only allows to select a group which is less or equal to
the maximum group number, which is used at netlink_kernel_create() time.
In case of connector it is CN_NETLINK_USERS + 0xf, so if you want to use
group number 12345, you must increment CN_NETLINK_USERS to that number.
Additional 0xf numbers are allocated to be used by non-in-kernel users.

Due to this limitation, group 0xffffffff does not work now, so one can
not use add/remove connector's group notifications, but as far as I know,
only cn_test.c test module used it.

Some work in netlink area is still being done, so things can be changed in
2.6.15 timeframe, if it will happen, documentation will be updated for that
kernel.
7 changes: 7 additions & 0 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1618,6 +1618,13 @@ M: vandrove@vc.cvut.cz
L: linux-fbdev-devel@lists.sourceforge.net
S: Maintained

MEGARAID SCSI DRIVERS
P: Neela Syam Kolli
M: Neela.Kolli@engenio.com
S: linux-scsi@vger.kernel.org
W: http://megaraid.lsilogic.com
S: Maintained

MEMORY TECHNOLOGY DEVICES
P: David Woodhouse
M: dwmw2@infradead.org
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/cris/arch-v32/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <linux/kernel.h>
#include <linux/cpumask.h>
#include <linux/interrupt.h>
#include <linux/module.h>

#define IPI_SCHEDULE 1
#define IPI_CALL 2
Expand All @@ -28,6 +29,7 @@ spinlock_t cris_atomic_locks[] = { [0 ... LOCK_COUNT - 1] = SPIN_LOCK_UNLOCKED};
/* CPU masks */
cpumask_t cpu_online_map = CPU_MASK_NONE;
cpumask_t phys_cpu_present_map = CPU_MASK_NONE;
EXPORT_SYMBOL(phys_cpu_present_map);

/* Variables used during SMP boot */
volatile int cpu_now_booting = 0;
Expand Down
12 changes: 8 additions & 4 deletions trunk/arch/m32r/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,14 @@ static void flush_tlb_all_ipi(void *info)
*==========================================================================*/
void smp_flush_tlb_mm(struct mm_struct *mm)
{
int cpu_id = smp_processor_id();
int cpu_id;
cpumask_t cpu_mask;
unsigned long *mmc = &mm->context[cpu_id];
unsigned long *mmc;
unsigned long flags;

preempt_disable();
cpu_id = smp_processor_id();
mmc = &mm->context[cpu_id];
cpu_mask = mm->cpu_vm_mask;
cpu_clear(cpu_id, cpu_mask);

Expand Down Expand Up @@ -343,12 +345,14 @@ void smp_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
void smp_flush_tlb_page(struct vm_area_struct *vma, unsigned long va)
{
struct mm_struct *mm = vma->vm_mm;
int cpu_id = smp_processor_id();
int cpu_id;
cpumask_t cpu_mask;
unsigned long *mmc = &mm->context[cpu_id];
unsigned long *mmc;
unsigned long flags;

preempt_disable();
cpu_id = smp_processor_id();
mmc = &mm->context[cpu_id];
cpu_mask = mm->cpu_vm_mask;
cpu_clear(cpu_id, cpu_mask);

Expand Down
33 changes: 17 additions & 16 deletions trunk/arch/mips/pci/fixup-tb0226.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* fixup-tb0226.c, The TANBAC TB0226 specific PCI fixups.
*
* Copyright (C) 2002-2004 Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
* Copyright (C) 2002-2005 Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -20,6 +20,7 @@
#include <linux/init.h>
#include <linux/pci.h>

#include <asm/vr41xx/giu.h>
#include <asm/vr41xx/tb0226.h>

int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
Expand All @@ -29,42 +30,42 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
switch (slot) {
case 12:
vr41xx_set_irq_trigger(GD82559_1_PIN,
TRIGGER_LEVEL,
SIGNAL_THROUGH);
vr41xx_set_irq_level(GD82559_1_PIN, LEVEL_LOW);
IRQ_TRIGGER_LEVEL,
IRQ_SIGNAL_THROUGH);
vr41xx_set_irq_level(GD82559_1_PIN, IRQ_LEVEL_LOW);
irq = GD82559_1_IRQ;
break;
case 13:
vr41xx_set_irq_trigger(GD82559_2_PIN,
TRIGGER_LEVEL,
SIGNAL_THROUGH);
vr41xx_set_irq_level(GD82559_2_PIN, LEVEL_LOW);
IRQ_TRIGGER_LEVEL,
IRQ_SIGNAL_THROUGH);
vr41xx_set_irq_level(GD82559_2_PIN, IRQ_LEVEL_LOW);
irq = GD82559_2_IRQ;
break;
case 14:
switch (pin) {
case 1:
vr41xx_set_irq_trigger(UPD720100_INTA_PIN,
TRIGGER_LEVEL,
SIGNAL_THROUGH);
IRQ_TRIGGER_LEVEL,
IRQ_SIGNAL_THROUGH);
vr41xx_set_irq_level(UPD720100_INTA_PIN,
LEVEL_LOW);
IRQ_LEVEL_LOW);
irq = UPD720100_INTA_IRQ;
break;
case 2:
vr41xx_set_irq_trigger(UPD720100_INTB_PIN,
TRIGGER_LEVEL,
SIGNAL_THROUGH);
IRQ_TRIGGER_LEVEL,
IRQ_SIGNAL_THROUGH);
vr41xx_set_irq_level(UPD720100_INTB_PIN,
LEVEL_LOW);
IRQ_LEVEL_LOW);
irq = UPD720100_INTB_IRQ;
break;
case 3:
vr41xx_set_irq_trigger(UPD720100_INTC_PIN,
TRIGGER_LEVEL,
SIGNAL_THROUGH);
IRQ_TRIGGER_LEVEL,
IRQ_SIGNAL_THROUGH);
vr41xx_set_irq_level(UPD720100_INTC_PIN,
LEVEL_LOW);
IRQ_LEVEL_LOW);
irq = UPD720100_INTC_IRQ;
break;
default:
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/ppc64/kernel/pmac_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static void __pmac pmac_show_cpuinfo(struct seq_file *m)

/* find motherboard type */
seq_printf(m, "machine\t\t: ");
np = find_devices("device-tree");
np = of_find_node_by_path("/");
if (np != NULL) {
pp = (char *) get_property(np, "model", NULL);
if (pp != NULL)
Expand All @@ -133,6 +133,7 @@ static void __pmac pmac_show_cpuinfo(struct seq_file *m)
}
seq_printf(m, "\n");
}
of_node_put(np);
} else
seq_printf(m, "PowerMac\n");

Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/sh/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/time.h>
#include <linux/timex.h>
#include <linux/sched.h>
#include <linux/module.h>

#include <asm/atomic.h>
#include <asm/processor.h>
Expand All @@ -39,6 +40,8 @@ struct sh_cpuinfo cpu_data[NR_CPUS];
extern void per_cpu_trap_init(void);

cpumask_t cpu_possible_map;
EXPORT_SYMBOL(cpu_possible_map);

cpumask_t cpu_online_map;
static atomic_t cpus_booted = ATOMIC_INIT(0);

Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/char/mbcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,9 @@ static int __init mbcs_init(void)
{
int rv;

if (!ia64_platform_is("sn2"))
return -ENODEV;

// Put driver into chrdevs[]. Get major number.
rv = register_chrdev(mbcs_major, DEVICE_NAME, &mbcs_ops);
if (rv < 0) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/input/keyboard/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ config KEYBOARD_LKKBD

config KEYBOARD_LOCOMO
tristate "LoCoMo Keyboard Support"
depends on SHARP_LOCOMO
depends on SHARP_LOCOMO && INPUT_KEYBOARD
help
Say Y here if you are running Linux on a Sharp Zaurus Collie or Poodle based PDA

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/radio/radio-cadet.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ static int cadet_probe(void)

for(i=0;i<8;i++) {
io=iovals[i];
if(request_region(io,2, "cadet-probe")>=0) {
if (request_region(io, 2, "cadet-probe")) {
cadet_setfreq(1410);
if(cadet_getfreq()==1410) {
release_region(io, 2);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ config IPW_DEBUG

config AIRO
tristate "Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards"
depends on NET_RADIO && ISA && (PCI || BROKEN)
depends on NET_RADIO && ISA_DMA_API && (PCI || BROKEN)
---help---
This is the standard Linux driver to support Cisco/Aironet ISA and
PCI 802.11 wireless cards.
Expand Down
14 changes: 6 additions & 8 deletions trunk/drivers/pcmcia/soc_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void soc_pcmcia_debug(struct soc_pcmcia_socket *skt, const char *func,
if (pc_debug > lvl) {
printk(KERN_DEBUG "skt%u: %s: ", skt->nr, func);
va_start(args, fmt);
printk(fmt, args);
vprintk(fmt, args);
va_end(args);
}
}
Expand Down Expand Up @@ -321,8 +321,6 @@ soc_common_pcmcia_get_socket(struct pcmcia_socket *sock, socket_state_t *state)
* less punt all of this work and let the kernel handle the details
* of power configuration, reset, &c. We also record the value of
* `state' in order to regurgitate it to the PCMCIA core later.
*
* Returns: 0
*/
static int
soc_common_pcmcia_set_socket(struct pcmcia_socket *sock, socket_state_t *state)
Expand Down Expand Up @@ -407,7 +405,7 @@ soc_common_pcmcia_set_io_map(struct pcmcia_socket *sock, struct pccard_io_map *m
* the map speed as requested, but override the address ranges
* supplied by Card Services.
*
* Returns: 0 on success, -1 on error
* Returns: 0 on success, -ERRNO on error
*/
static int
soc_common_pcmcia_set_mem_map(struct pcmcia_socket *sock, struct pccard_mem_map *map)
Expand Down Expand Up @@ -655,8 +653,8 @@ static void soc_pcmcia_cpufreq_unregister(void)
}

#else
#define soc_pcmcia_cpufreq_register()
#define soc_pcmcia_cpufreq_unregister()
static int soc_pcmcia_cpufreq_register(void) { return 0; }
static void soc_pcmcia_cpufreq_unregister(void) {}
#endif

int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, int first, int nr)
Expand Down Expand Up @@ -738,7 +736,7 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops
goto out_err_5;
}

if ( list_empty(&soc_pcmcia_sockets) )
if (list_empty(&soc_pcmcia_sockets))
soc_pcmcia_cpufreq_register();

list_add(&skt->node, &soc_pcmcia_sockets);
Expand Down Expand Up @@ -839,7 +837,7 @@ int soc_common_drv_pcmcia_remove(struct device *dev)
release_resource(&skt->res_io);
release_resource(&skt->res_skt);
}
if ( list_empty(&soc_pcmcia_sockets) )
if (list_empty(&soc_pcmcia_sockets))
soc_pcmcia_cpufreq_unregister();

up(&soc_pcmcia_sockets_lock);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/aacraid/linit.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,9 +453,9 @@ static int aac_eh_reset(struct scsi_cmnd* cmd)
/*
* We can exit If all the commands are complete
*/
spin_unlock_irq(host->host_lock);
if (active == 0)
return SUCCESS;
spin_unlock_irq(host->host_lock);
ssleep(1);
spin_lock_irq(host->host_lock);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/serial/sh-sci.c
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ static int sci_startup(struct uart_port *port)
#endif

sci_request_irq(s);
sci_start_tx(port, 1);
sci_start_tx(port);
sci_start_rx(port, 1);

return 0;
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/video/sa1100fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ sa1100fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
return ret;
}

#ifdef CONFIG_CPU_FREQ
/*
* sa1100fb_display_dma_period()
* Calculate the minimum period (in picoseconds) between two DMA
Expand All @@ -606,6 +607,7 @@ static inline unsigned int sa1100fb_display_dma_period(struct fb_var_screeninfo
*/
return var->pixclock * 8 * 16 / var->bits_per_pixel;
}
#endif

/*
* sa1100fb_check_var():
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/w1/w1.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ static void w1_master_release(struct device *dev)

dev_dbg(dev, "%s: Releasing %s.\n", __func__, md->name);

if (md->nls && md->nls->sk_socket)
sock_release(md->nls->sk_socket);
dev_fini_netlink(md);
memset(md, 0, sizeof(struct w1_master) + sizeof(struct w1_bus_master));
kfree(md);
}
Expand Down
Loading

0 comments on commit 62087e4

Please sign in to comment.