]> Pileus Git - ~andy/linux/log
~andy/linux
15 years agoheaders_check.pl: disallow extern's
Mike Frysinger [Sat, 27 Dec 2008 07:43:36 +0000 (02:43 -0500)]
headers_check.pl: disallow extern's

Since prototypes with "extern" refer to kernel functions, they make no
sense in userspace, so reject them automatically.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
[sam: made it into a warning]
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agokconfig: improve error messages for bad source statements
Sam Ravnborg [Sat, 27 Dec 2008 20:51:59 +0000 (21:51 +0100)]
kconfig: improve error messages for bad source statements

We now say where we detect the second source of a file,
and where we detect a recursively source of the same file.
This makes it easier to fix such errors.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
15 years agokconfig: struct property commented
Sam Ravnborg [Fri, 26 Dec 2008 20:32:31 +0000 (21:32 +0100)]
kconfig: struct property commented

No functional changes

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agokconfig: add comments to symbol flags
Sam Ravnborg [Fri, 26 Dec 2008 20:25:00 +0000 (21:25 +0100)]
kconfig: add comments to symbol flags

No functional changes - only comments.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agokconfig: explain symbol value defaults
Sam Ravnborg [Fri, 26 Dec 2008 20:07:57 +0000 (21:07 +0100)]
kconfig: explain symbol value defaults

Added a few comments - no functional change.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agom68k: fix recursive dependency in Kconfig
Sam Ravnborg [Fri, 26 Dec 2008 21:41:18 +0000 (22:41 +0100)]
m68k: fix recursive dependency in Kconfig

We had a recursive dependency between MMU_MOTOROLA and MMU_SUN3
Fix it by dropping the unused dependencies on MMU_MOTOROLA.

MMU_MOTOROLA is set to y only using select so any dependencies
are anyway ignored.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
15 years agoMerge branch 'kvm-updates/2.6.29' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 2 Jan 2009 19:41:11 +0000 (11:41 -0800)]
Merge branch 'kvm-updates/2.6.29' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm

* 'kvm-updates/2.6.29' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (140 commits)
  KVM: MMU: handle large host sptes on invlpg/resync
  KVM: Add locking to virtual i8259 interrupt controller
  KVM: MMU: Don't treat a global pte as such if cr4.pge is cleared
  MAINTAINERS: Maintainership changes for kvm/ia64
  KVM: ia64: Fix kvm_arch_vcpu_ioctl_[gs]et_regs()
  KVM: x86: Rework user space NMI injection as KVM_CAP_USER_NMI
  KVM: VMX: Fix pending NMI-vs.-IRQ race for user space irqchip
  KVM: fix handling of ACK from shared guest IRQ
  KVM: MMU: check for present pdptr shadow page in walk_shadow
  KVM: Consolidate userspace memory capability reporting into common code
  KVM: Advertise the bug in memory region destruction as fixed
  KVM: use cpumask_var_t for cpus_hardware_enabled
  KVM: use modern cpumask primitives, no cpumask_t on stack
  KVM: Extract core of kvm_flush_remote_tlbs/kvm_reload_remote_mmus
  KVM: set owner of cpu and vm file operations
  anon_inodes: use fops->owner for module refcount
  x86: KVM guest: kvm_get_tsc_khz: return khz, not lpj
  KVM: MMU: prepopulate the shadow on invlpg
  KVM: MMU: skip global pgtables on sync due to cr3 switch
  KVM: MMU: collapse remote TLB flushes on root sync
  ...

15 years agoV4L/DVB (10170): tuner-simple: prevent possible OOPS caused by divide by zero error
Michael Krufky [Fri, 2 Jan 2009 18:55:29 +0000 (15:55 -0300)]
V4L/DVB (10170): tuner-simple: prevent possible OOPS caused by divide by zero error

A user reported the following OOPS with his pcHDTV HD5500 card, which
uses a cx88 PCI bridge with a LG-TDVS-H06xF frontend module, made up
of a TUA6034 tuner, TDA988x IF demod, and LG DT3303 ATSC/QAM demod.

Somehow, tuner-core gets loaded before the digital driver configures
the tuner, and tuner-core somehow incorrectly sets the tuner type to
LG NTSC (TAPE series) instead of LG TDVS-H06xF.  This tuner type does
not have the tuning stepsize defined, so an OOPS occurs during the
digital tune function.

We still dont know how the type gets set incorrectly in the first place.
The user has a tainted kernel with a binary nividia module, which COULD
have something to do with this, but it's hard to say for sure.

Nevertheless, to avoid this division by zero, we should check that
stepsize is defined.  If stepsize is not defined, print an error and
bail out on the tune request.

cx8800 0000:05:01.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
cx88[0]: subsystem: 7063:5500, board: pcHDTV HD5500 HDTV [card=47,autodetected], frontend(s): 1
cx88[0]: TV tuner type 47, Radio tuner type -1
tuner' 2-0043: chip found @ 0x86 (cx88[0])
tda9887 2-0043: creating new instance
tda9887 2-0043: tda988[5/6/7] found
tuner' 2-0061: chip found @ 0xc2 (cx88[0])
tuner-simple 2-0061: creating new instance
tuner-simple 2-0061: type set to 47 (LG NTSC (TAPE series))
cx88[0]/0: found at 0000:05:01.0, rev: 5, irq: 19, latency: 32, mmio: 0xea000000
cx88[0]/0: registered device video1 [v4l2]
cx88[0]/0: registered device vbi1
cx88_audio 0000:05:01.1: PCI INT A -> GSI 19 (level, low) -> IRQ 19
cx88[0]/1: CX88x/0: ALSA support for cx2388x boards
cx88[0]/2: cx2388x 8802 Driver Manager
cx88-mpeg driver manager 0000:05:01.2: PCI INT A -> GSI 19 (level, low) -> IRQ 19
cx88[0]/2: found at 0000:05:01.2, rev: 5, irq: 19, latency: 32, mmio: 0xec000000
cx8802_probe() allocating 1 frontend(s)
cx88/2: cx2388x dvb driver version 0.0.6 loaded
cx88/2: registering cx8802 driver, type: dvb access: shared
cx88[0]/2: subsystem: 7063:5500, board: pcHDTV HD5500 HDTV [card=47]
cx88[0]/2: cx2388x based DVB/ATSC card
tuner-simple 2-0061: attaching existing instance
tuner-simple 2-0061: type set to 64 (LG NTSC (TAPE series))
tda9887 2-0043: attaching existing instance
DVB: registering new adapter (cx88[0])
DVB: registering adapter 0 frontend 0 (LG Electronics LGDT3303 VSB/QAM Frontend)...
[snip]
stepsize=0
divide error: 0000 [1] SMP
CPU 1
Modules linked in: nls_utf8 fuse sco bridge stp bnep l2cap bluetooth sunrpc nf_conntrack_netbios_ns nf_conntrack_ftp ip6t_REJECT nf_conntrack_ipv6 ip6table_filter ip6_tables ipv6 cpufreq_ondemand acpi_cpufreq freq_table xfs lgdt330x dm_multipath cx88_dvb cx88_vp3054_i2c uinput tda9887 tda8290 snd_emu10k1_synth snd_emux_synth snd_seq_virmidi snd_seq_midi_emul tuner_simple tuner_types tuner msp3400 cx8800 cx88_alsa cx8802 snd_emu10k1 cx88xx snd_rawmidi snd_ac97_codec ir_common ac97_bus saa7115 snd_seq_dummy snd_seq_oss snd_seq_midi_event videobuf_dvb snd_seq dvb_core snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_device videobuf_dma_sg ppdev parport_pc snd_timer videobuf_core snd_page_alloc btcx_risc emu10k1_gp ivtv i2c_algo_bit cx2341x snd_util_mem snd_hwdep nvidia(P) gameport v4l2_common i2c_i801 snd soundcore parport videodev v4l1_compat v4l2_compat_ioctl32 tveeprom i2c_core pcspkr iTCO_wdt iTCO_vendor_support sky2 joydev floppy shpchp ata_generic pata_acpi pata_jmicron [last unloaded: microcode]
Pid: 3553, comm: kdvb-ad-0-fe-0 Tainted: P          2.6.27.9-159.fc10.x86_64 #1
RIP: 0010:[<ffffffffa09bc37a>]  [<ffffffffa09bc37a>] simple_dvb_calc_regs+0xab/0x281 [tuner_simple]
RSP: 0018:ffff8800605dfd30  EFLAGS: 00010246
RAX: 000000000365c040 RBX: ffff8800605dfdb0 RCX: ffff88007acb8c10
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000246
RBP: ffff8800605dfda0 R08: ffff8800605dfba0 R09: 0000000000000082
R10: 00000010e73c9df1 R11: 0000000100000000 R12: ffff88007ac29c00
R13: ffff88007ac29c00 R14: ffff88007acbb408 R15: ffffffffa09b6fb0
FS:  0000000000000000(0000) GS:ffff88007f804880(0000) knlGS:0000000000000000
CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 00000000004e8f40 CR3: 000000007114e000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process kdvb-ad-0-fe-0 (pid: 3553, threadinfo ffff8800605de000, task ffff88006fca0000)
Stack:  ffff8800605dfd40 00000000ffffffa1 ffff88007c055860 0000000000000001
 ffff8800605dfda0 ffff8800605dfda0 ffff88007acb8c10 ffffffffa004e48c
 8e01880000000390 ffff88007acb8c10 ffff88007ac29c00 0000000000000000
Call Trace:
 [<ffffffffa004e48c>] ? i2c_transfer+0x80/0x8b [i2c_core]
 [<ffffffffa09bc768>] simple_dvb_set_params+0x3e/0x9b [tuner_simple]
 [<ffffffffa0a0335a>] lgdt330x_set_parameters+0x188/0x1b9 [lgdt330x]
 [<ffffffffa08c9116>] dvb_frontend_swzigzag_autotune+0x18e/0x1b5 [dvb_core]
 [<ffffffffa08c9f6a>] dvb_frontend_swzigzag+0x1bc/0x21e [dvb_core]
 [<ffffffffa08ca4f4>] dvb_frontend_thread+0x528/0x62b [dvb_core]
 [<ffffffff810551e1>] ? autoremove_wake_function+0x0/0x38
 [<ffffffffa08c9fcc>] ? dvb_frontend_thread+0x0/0x62b [dvb_core]
 [<ffffffff81054e9b>] kthread+0x49/0x76
 [<ffffffff810116e9>] child_rip+0xa/0x11
 [<ffffffff81010a07>] ? restore_args+0x0/0x30
 [<ffffffff81054e52>] ? kthread+0x0/0x76
 [<ffffffff810116df>] ? child_rip+0x0/0x11

Code: 48 8b 05 2a 4e 00 00 41 8b 77 1c 31 d2 0f b7 40 0a 89 f1 03 45 d0 d1 e9 03 0d 23 4e 00 00 69 c0 24 f4 00 00 8d 04 01 48 8b 4d c0 <f7> f6 8a 55 d6 88 53 04 41 89 c4 c1 e8 08 88 43 01 8a 45 d7 44
RIP  [<ffffffffa09bc37a>] simple_dvb_calc_regs+0xab/0x281 [tuner_simple]
 RSP <ffff8800605dfd30>

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10168): sms1xxx: fix inverted gpio for lna control on tiger r2
Michael Krufky [Mon, 15 Dec 2008 20:28:41 +0000 (17:28 -0300)]
V4L/DVB (10168): sms1xxx: fix inverted gpio for lna control on tiger r2

The GPIO logic for LNA control on the Tiger r2 devices was inverted.
This patch corrects the problem.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10167): sms1xxx: add support for inverted gpio
Michael Krufky [Fri, 28 Nov 2008 04:02:56 +0000 (01:02 -0300)]
V4L/DVB (10167): sms1xxx: add support for inverted gpio

negative gpio values signify inverted polarity

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10166): dvb frontend: stop using non-C99 compliant comments
Mauro Carvalho Chehab [Wed, 31 Dec 2008 17:26:57 +0000 (14:26 -0300)]
V4L/DVB (10166): dvb frontend: stop using non-C99 compliant comments

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10165): Add FE_CAN_2G_MODULATION flag to frontends that support DVB-S2
Klaus Schmidinger [Wed, 31 Dec 2008 17:13:56 +0000 (14:13 -0300)]
V4L/DVB (10165): Add FE_CAN_2G_MODULATION flag to frontends that support DVB-S2

Report to userspace that cx24116 and stv0899 drivers support DVB-S2.

Signed-off by: Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de>

Acked-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10164): Add missing S2 caps flag to S2API
Klaus Schmidinger [Wed, 31 Dec 2008 17:11:23 +0000 (14:11 -0300)]
V4L/DVB (10164): Add missing S2 caps flag to S2API

The attached patch adds a capability flag that allows an application
to determine whether a particular device can handle "second generation
modulation" transponders. This is necessary in order for applications
to be able to decide which device to use for a given channel in
a multi device environment, where DVB-S and DVB-S2 devices are mixed.

It is assumed that a device capable of handling "second generation
modulation" can implicitly handle "first generation modulation".
The flag is not named anything with DVBS2 in order to allow its
use with future DVBT2 devices as well (should they ever come).

Signed-off by: Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de>

Acked-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10163): em28xx: allocate adev together with struct em28xx dev
Mauro Carvalho Chehab [Wed, 31 Dec 2008 12:37:33 +0000 (09:37 -0300)]
V4L/DVB (10163): em28xx: allocate adev together with struct em28xx dev

Some devices require different setups on struct_audio. Due to that, we
may need to change some fields at dev.adev during device probe. So, this
patch moves the dynamic memory allocation of adev at em28xx-alsa to the
dynamic allocation of struct em28xx dev that happens during device
probe.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10162): tuner-simple: Fix tuner type set message
Mauro Carvalho Chehab [Wed, 31 Dec 2008 12:34:18 +0000 (09:34 -0300)]
V4L/DVB (10162): tuner-simple: Fix tuner type set message

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10161): saa7134: fix autodetection for AVer TV GO 007 FM Plus
Pham Thanh Nam [Wed, 31 Dec 2008 09:57:19 +0000 (06:57 -0300)]
V4L/DVB (10161): saa7134: fix autodetection for AVer TV GO 007 FM Plus

This patch fixes autodetection for Avermedia AVerTV GO 007 FM Plus (M15C)
(PCI ID 1461:f31d).

Signed-off-by: Pham Thanh Nam <phamthanhnam.ptn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10160): em28xx: update chip id for em2710
Mauro Carvalho Chehab [Wed, 31 Dec 2008 09:37:50 +0000 (06:37 -0300)]
V4L/DVB (10160): em28xx: update chip id for em2710

em2710 uses the same chip ID as em2820 (0x12).

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10157): Add USB ID for the Sil4701 radio from DealExtreme
Mark Lord [Wed, 3 Dec 2008 18:26:15 +0000 (15:26 -0300)]
V4L/DVB (10157): Add USB ID for the Sil4701 radio from DealExtreme

Signed-off-by: Mark Lord <mlord@pobox.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
[tobias.lorenz@gmx.net: Code beautifications and documentation added]
Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10156): saa7134: Add support for Avermedia AVer TV GO 007 FM Plus
Pham Thanh Nam [Wed, 31 Dec 2008 02:26:09 +0000 (23:26 -0300)]
V4L/DVB (10156): saa7134: Add support for Avermedia AVer TV GO 007 FM Plus

This patch adds support for Avermedia AVer TV GO 007 FM Plus (M15C) on
saa7134 driver (PCI ID 1461:f31d).

Signed-off-by: Pham Thanh Nam <phamthanhnam.ptn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10155): Add TEA5764 radio driver
Fabio Belavenuto [Tue, 30 Dec 2008 22:27:09 +0000 (19:27 -0300)]
V4L/DVB (10155): Add TEA5764 radio driver

Add support for radio driver TEA5764 from NXP.
This chip is connected in pxa I2C bus in EZX phones
from Motorola, the chip is used in phone model A1200.
This driver is for OpenEZX project (www.openezx.org)
Tested with A1200 phone, openezx kernel and fm-tools

[mchehab@redhat.com: Fixed CodingStyle and solved some merge conflicts]
Signed-off-by: Fabio Belavenuto <belavenuto@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10154): saa7134: fix a merge conflict on Behold H6 board
Mauro Carvalho Chehab [Tue, 30 Dec 2008 22:10:09 +0000 (19:10 -0300)]
V4L/DVB (10154): saa7134: fix a merge conflict on Behold H6 board

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10153): Add the Beholder H6 card to DVB-T part of sources.
Dmitri Belimov [Tue, 23 Dec 2008 06:53:03 +0000 (03:53 -0300)]
V4L/DVB (10153): Add the Beholder H6 card to DVB-T part of sources.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10152): Change configuration of the Beholder H6 card
Dmitri Belimov [Tue, 23 Dec 2008 06:51:38 +0000 (03:51 -0300)]
V4L/DVB (10152): Change configuration of the Beholder H6 card

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10151): Fix I2C bridge error in zl10353
Dmitri Belimov [Tue, 23 Dec 2008 06:50:09 +0000 (03:50 -0300)]
V4L/DVB (10151): Fix I2C bridge error in zl10353

Fix I2C bridge error in zl10353 if no tunner attached to internal I2C
bus of zl10353 chip.

When set enable bridge from internal I2C bus to the main I2C bus
(saa7134) the main I2C bus stopped very hardly. No any communication. In
our next board we solder additional resistors to internal I2C bus.

Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10150): ttusb-dec: make it depend on PCI
Mike Frysinger [Wed, 12 Nov 2008 15:04:28 +0000 (12:04 -0300)]
V4L/DVB (10150): ttusb-dec: make it depend on PCI

Since ttusb_dec.c relies on pci_alloc_consistent and
pci_free_consistent, make it depend on PCI in Kconfig.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10149): ttusb-budget: make it depend on PCI
Mike Frysinger [Wed, 12 Nov 2008 15:00:18 +0000 (12:00 -0300)]
V4L/DVB (10149): ttusb-budget: make it depend on PCI

Since dvb-ttusb-budget.c relies on pci_alloc_consistent and
pci_free_consistent, make it depend on PCI in Kconfig.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10148): cx23885: unsigned cx23417_mailbox cannot be negative
roel kluin [Thu, 27 Nov 2008 01:03:18 +0000 (22:03 -0300)]
V4L/DVB (10148): cx23885: unsigned cx23417_mailbox cannot be negative

Unsigned cx23417_mailbox cannot be negative

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10144): cx24116: build fix
Cyrill Gorcunov [Tue, 30 Dec 2008 19:40:00 +0000 (16:40 -0300)]
V4L/DVB (10144): cx24116: build fix

Add missed MODULE check to eliminate inapropriate
declaration being choosed which causes a build error.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10141): v4l2: debugging API changed to match against driver name instead...
Hans Verkuil [Tue, 30 Dec 2008 10:14:19 +0000 (07:14 -0300)]
V4L/DVB (10141): v4l2: debugging API changed to match against driver name instead of ID.

Since the i2c driver ID will be removed in the near future we have to
modify the v4l2 debugging API to use the driver name instead of driver ID.

Note that this API is not used in applications other than v4l2-dbg.cpp
as it is for debugging and testing only.

Should anyone use the old VIDIOC_G_CHIP_IDENT, then this will be logged
with a warning that it is deprecated and will be removed in 2.6.30.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10140): gp8psk: fix incorrect return code (EINVAL instead of -EINVAL)
Hans Verkuil [Tue, 30 Dec 2008 10:07:53 +0000 (07:07 -0300)]
V4L/DVB (10140): gp8psk: fix incorrect return code (EINVAL instead of -EINVAL)

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10139): v4l: rename v4l_compat_ioctl32 to v4l2_compat_ioctl32
Hans Verkuil [Tue, 30 Dec 2008 09:42:40 +0000 (06:42 -0300)]
V4L/DVB (10139): v4l: rename v4l_compat_ioctl32 to v4l2_compat_ioctl32

This rename prevents conflicts with the older compat_ioctl32 module.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl.
Hans Verkuil [Tue, 30 Dec 2008 10:04:34 +0000 (07:04 -0300)]
V4L/DVB (10138): v4l2-ioctl: change to long return type to match unlocked_ioctl.

Since internal to v4l2 the ioctl prototype is the same regardless of it
being called through .ioctl or .unlocked_ioctl, we need to convert it all
to the long return type of unlocked_ioctl.

Thanks to Jean-Francois Moine for posting an initial patch for this and
thus bringing it to our attention.

Cc: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10137): v4l2-compat32: only build if needed
Hans Verkuil [Tue, 23 Dec 2008 18:02:16 +0000 (15:02 -0300)]
V4L/DVB (10137): v4l2-compat32: only build if needed

Add CONFIG_COMPAT check in Makefile.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10136): v4l2 doc: update v4l2-framework.txt
Hans Verkuil [Tue, 23 Dec 2008 16:42:25 +0000 (13:42 -0300)]
V4L/DVB (10136): v4l2 doc: update v4l2-framework.txt

Mention the new v4l2_file_operations struct.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10135): v4l2: introduce v4l2_file_operations.
Hans Verkuil [Tue, 30 Dec 2008 09:58:20 +0000 (06:58 -0300)]
V4L/DVB (10135): v4l2: introduce v4l2_file_operations.

Introduce a struct v4l2_file_operations for v4l2 drivers.

Remove the unnecessary inode argument.

Move compat32 handling (and llseek) into the v4l2-dev core: this is now
handled in the v4l2 core and no longer in the drivers themselves.

Note that this changeset reverts an earlier patch that changed the return
type of__video_ioctl2 from int to long. This change will be reinstated
later in a much improved version.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10134): v4l2 doc: set v4l2_dev instead of parent.
Hans Verkuil [Tue, 23 Dec 2008 15:17:23 +0000 (12:17 -0300)]
V4L/DVB (10134): v4l2 doc: set v4l2_dev instead of parent.

Update the documentation now that the v4l2_dev field is in.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10133): v4l2-framework: use correct comment style.
Hans Verkuil [Mon, 22 Dec 2008 12:13:11 +0000 (09:13 -0300)]
V4L/DVB (10133): v4l2-framework: use correct comment style.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoV4L/DVB (10132): v4l2-compat-ioctl32: remove dependency on videodev.
Hans Verkuil [Tue, 23 Dec 2008 17:37:43 +0000 (14:37 -0300)]
V4L/DVB (10132): v4l2-compat-ioctl32: remove dependency on videodev.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Fri, 2 Jan 2009 18:32:18 +0000 (10:32 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (32 commits)
  ide-atapi: start dma in a drive-specific way
  ide-atapi: put the rest of non-ide-cd code into the else-clause of ide_transfer_pc
  ide-atapi: remove timeout arg to ide_issue_pc
  ide-cd: remove handler wrappers
  ide-cd: remove xferlen arg to cdrom_start_packet_command
  ide-atapi: split drive-specific functionality in ide_issue_pc
  ide-atapi: assign expiry and timeout based on device type
  ide-atapi: compute cmd_len based on device type in ide_transfer_pc
  ide: remove the last ide-scsi remnants
  ide-atapi: remove ide-scsi remnants from ide_pc_intr()
  ide-atapi: remove ide-scsi remnants from ide_transfer_pc()
  ide-atapi: remove ide-scsi remnants from ide_issue_pc
  ide-cd: move cdrom_timer_expiry to ide-atapi.c
  ide-atapi: teach ide atapi about drive->waiting_for_dma
  ide-atapi: accomodate transfer length calculation for ide-cd
  ide-atapi: setup dma for ide-cd
  ide-atapi: combine drive-specific assignments
  ide-atapi: add a dev_is_idecd-inline
  remove ide-scsi
  ide-floppy: allocate only toplevel packet commands
  ...

15 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb
Linus Torvalds [Fri, 2 Jan 2009 18:31:04 +0000 (10:31 -0800)]
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb

* 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/dvrabel/uwb: (31 commits)
  uwb: remove beacon cache entry after calling uwb_notify()
  uwb: remove unused include/linux/uwb/debug.h
  uwb: use print_hex_dump()
  uwb: use dev_dbg() for debug messages
  uwb: fix memory leak in uwb_rc_notif()
  wusb: fix oops when terminating a non-existant reservation
  uwb: fix oops when terminating an already terminated reservation
  uwb: improved MAS allocator and reservation conflict handling
  wusb: add debug files for ASL, PZL and DI to the whci-hcd driver
  uwb: fix oops in debug PAL's reservation callback
  uwb: clean up whci_wait_for() timeout error message
  wusb: whci-hcd shouldn't do ASL/PZL updates while channel is inactive
  uwb: remove unused beacon group join/leave events
  wlp: start/stop radio on network interface up/down
  uwb: add basic radio manager
  uwb: add pal parameter to new reservation callback
  uwb: fix races between events and neh timers
  uwb: don't unbind the radio controller driver when resetting
  uwb: per-radio controller event thread and beacon cache
  uwb: add commands to add/remove IEs to the debug interface
  ...

15 years agoUpdate powerpc maintainers
Paul Mackerras [Fri, 2 Jan 2009 04:40:55 +0000 (15:40 +1100)]
Update powerpc maintainers

Ben Herrenschmidt is taking over as the primary powerpc architecture
maintainer.  I'll still be around as his backup/deputy.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'i8k-updates' from Alan
Linus Torvalds [Fri, 2 Jan 2009 18:28:41 +0000 (10:28 -0800)]
Merge branch 'i8k-updates' from Alan

* i8k-updates:
  i8k: Add Dell Vostro systems
  i8k: Enable i8k on Dell Precision Systems

15 years agoi8k: Add Dell Vostro systems
Federico Heinz [Fri, 2 Jan 2009 16:19:23 +0000 (16:19 +0000)]
i8k: Add Dell Vostro systems

This trivial patch adds support for i8k on the new Dell Vostro models.
I tested it on my Vostro 1400, and it works. It does print a warning
when loading the module:

i8k: unable to get SMM BIOS version

But I couldn't figure out how to fix that. The module seems to work fine,
anyway...

Signed-off-by: Federico Heinz <fheinz@vialibre.org.ar>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoi8k: Enable i8k on Dell Precision Systems
Andy Spencer [Fri, 2 Jan 2009 16:19:13 +0000 (16:19 +0000)]
i8k: Enable i8k on Dell Precision Systems

Patch to enable i8k on Dell Precisions.

Signed-off-by: Andy Spencer <spenceal@rose-hulman.edu>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFix compiler warning in arch/x86/mm/init_32.c
Ingo Brueckl [Fri, 2 Jan 2009 13:42:00 +0000 (14:42 +0100)]
Fix compiler warning in arch/x86/mm/init_32.c

Signed-off-by: Ingo Brueckl <ib@wupperonline.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'tty-updates' from Alan
Linus Torvalds [Fri, 2 Jan 2009 18:25:51 +0000 (10:25 -0800)]
Merge branch 'tty-updates' from Alan

* tty-updates: (75 commits)
  serial_8250: support for Sealevel Systems Model 7803 COMM+8
  hso maintainers update patch
  hso modem detect fix patch against Alan Cox'es tty tree
  tty: Fix an ircomm warning and note another bug
  drivers/char/cyclades.c: cy_pci_probe: fix error path
  Serial: UART driver changes for Cavium OCTEON.
  Serial: Allow port type to be specified when calling serial8250_register_port.
  8250: Serial driver changes to support future Cavium OCTEON serial patches.
  8250: Don't clobber spinlocks.
  fix for tty-serial-move-port
  tty: We want the port object to be persistent
  __FUNCTION__ is gcc-specific, use __func__
  serial: RS485 ioctl structure uses __u32 include linux/types.h
  tty: Drop the lock_kernel in the private ioctl hook
  synclink_cs: Convert to tty_port
  tty: use port methods for the rocket driver
  tty: kref the rocket driver
  tty: make rocketport use standard port->flags
  tty: Redo the rocket driver locking
  tty: Make epca use the port helpers
  ...

15 years agox86: mpparse.c fix style problems
Jaswinder Singh Rajput [Fri, 2 Jan 2009 18:13:25 +0000 (23:43 +0530)]
x86: mpparse.c fix style problems

Impact: cleanup, fix style problems, more readable

Fixes style problems:

 WARNING: Use #include <linux/smp.h> instead of <asm/smp.h>
 WARNING: Use #include <linux/acpi.h> instead of <asm/acpi.h>
 WARNING: suspect code indent for conditional statements (8, 17)
 WARNING: space prohibited between function name and open parenthesis '('

total: 0 errors, 5 warnings

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoserial_8250: support for Sealevel Systems Model 7803 COMM+8
Flavio Leitner [Fri, 2 Jan 2009 13:50:43 +0000 (13:50 +0000)]
serial_8250: support for Sealevel Systems Model 7803 COMM+8

Add support for Sealevel Systems Model 7803 COMM+8

Signed-off-by: Flavio Leitner <fleitner@redhat.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agohso maintainers update patch
Denis Joseph Barrow [Fri, 2 Jan 2009 13:50:36 +0000 (13:50 +0000)]
hso maintainers update patch

Added D.J. Barrow as maintainer of hso driver.

Signed-off-by: Denis Joseph Barrow <D.Barow@option.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agohso modem detect fix patch against Alan Cox'es tty tree
Denis Joseph Barrow [Fri, 2 Jan 2009 13:50:29 +0000 (13:50 +0000)]
hso modem detect fix patch against Alan Cox'es tty tree

Fixed incorrect check for the modem port, this prevents
crashes caused by issueing a tiocmget_submit_urb
on endpoints which don't exist for non modem devices.

Signed-off-by: Denis Joseph Barrow <D.Barow@option.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: Fix an ircomm warning and note another bug
Alan Cox [Fri, 2 Jan 2009 13:50:20 +0000 (13:50 +0000)]
tty: Fix an ircomm warning and note another bug

Roel Kluin noted that line is unsigned so one test is unneccessary. Also
add a warning for another flaw I noticed while making this change.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodrivers/char/cyclades.c: cy_pci_probe: fix error path
Andrew Morton [Fri, 2 Jan 2009 13:50:07 +0000 (13:50 +0000)]
drivers/char/cyclades.c: cy_pci_probe: fix error path

We forgot to release resources in one case.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=12137

Reported-by: Florian Lohoff <flo@rfc822.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoSerial: UART driver changes for Cavium OCTEON.
David Daney [Fri, 2 Jan 2009 13:50:00 +0000 (13:50 +0000)]
Serial: UART driver changes for Cavium OCTEON.

Cavium UART implementation is not covered by existing uart_configS.
Define a new uart_config (PORT_OCTEON) which is specified by OCTEON
platform device registration code.

Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoSerial: Allow port type to be specified when calling serial8250_register_port.
David Daney [Fri, 2 Jan 2009 13:49:54 +0000 (13:49 +0000)]
Serial: Allow port type to be specified when calling serial8250_register_port.

Add flag value UPF_FIXED_TYPE which specifies that the UART type is
known and should not be probed.  For this case the UARTs properties
are just copied out of the uart_config entry.

This allows us to keep SOC specific 8250 probe code out of 8250.c.  In
this case we know the serial hardware will not be changing as it is on
the same silicon as the CPU, and we can specify it with certainty in
the board/cpu setup code.

The alternative is to load up 8250.c with a bunch of OCTEON specific
special cases in the probing code.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years ago8250: Serial driver changes to support future Cavium OCTEON serial patches.
David Daney [Fri, 2 Jan 2009 13:49:47 +0000 (13:49 +0000)]
8250: Serial driver changes to support future Cavium OCTEON serial patches.

In order to use Cavium OCTEON specific serial i/o drivers, we first
patch the 8250 driver to use replaceable I/O functions.  Compatible
I/O functions are added for existing iotypeS.

An added benefit of this change is that it makes it easy to factor
some of the existing special cases out to board/SOC specific support
code.

The alternative is to load up 8250.c with a bunch of OCTEON specific
iotype code and bug work-arounds.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years ago8250: Don't clobber spinlocks.
David Daney [Fri, 2 Jan 2009 13:49:41 +0000 (13:49 +0000)]
8250: Don't clobber spinlocks.

In serial8250_isa_init_ports(), the port's lock is initialized.  We
should not overwrite it.  In early_serial_setup(), only copy in the
fields we need.  Since the early console code only uses a subset of
the fields, these are sufficient.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agofix for tty-serial-move-port
Alexander Beregalov [Fri, 2 Jan 2009 13:49:32 +0000 (13:49 +0000)]
fix for tty-serial-move-port

Hi Alan

next-20081204 crashes with the following message:

BUG: unable to handle kernel paging request at ffff88007d320248
IP: [<ffffffff803de934>] uart_remove_one_port+0xef/0x111
                kfree(info);
     393:       49 8d 7d 10             lea    0x10(%r13),%rdi
     397:       e8 00 00 00 00          callq  39c <uart_remove_one_port+0xef>

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: We want the port object to be persistent
Alan Cox [Fri, 2 Jan 2009 13:49:21 +0000 (13:49 +0000)]
tty: We want the port object to be persistent

Move the tty_port and uart_info bits around a little. By embedding the uart_info
into the uart_port we get rid of lots of corner case testing and also get the
ability to go port<->state<->info which is a bit more elegant than the current
data structures.

Downsides - we allocate a tiny bit more memory for unused ports, upside we've
removed as much code as it saved for most users..

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years ago__FUNCTION__ is gcc-specific, use __func__
Harvey Harrison [Fri, 2 Jan 2009 13:49:13 +0000 (13:49 +0000)]
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoserial: RS485 ioctl structure uses __u32 include linux/types.h
Andy Whitcroft [Fri, 2 Jan 2009 13:49:04 +0000 (13:49 +0000)]
serial: RS485 ioctl structure uses __u32 include linux/types.h

In the commit below a new struct serial_rs485 was introduced for a new
ioctl:

    commit c26c56c0f40e200e61d1390629c806f6adaffbcc
    Author: Alan Cox <alan@redhat.com>
    Date:   Mon Oct 13 10:37:48 2008 +0100

tty: Cris has a nice RS485 ioctl so we should steal it

This structure uses the __u32 types for some of its members, which leads
to the following compile error:

    $ cc -I.../include -c X.c
    In file included from X.c:2: .../include/linux/serial.h:185:
error: expected specifier-qualifier-list before ‘__u32’
    $

It seems that these types are appropriate for this structure as it is
to be exposed to userspace.  These types are available via linux/types.h
so move the include of that outside the __KERNEL__ section.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: Drop the lock_kernel in the private ioctl hook
Alan Cox [Fri, 2 Jan 2009 13:48:56 +0000 (13:48 +0000)]
tty: Drop the lock_kernel in the private ioctl hook

We don't need the BKL here any more so it can go. In a couple of spots the
driver requirements are not clear so push the lock down into the driver.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosynclink_cs: Convert to tty_port
Alan Cox [Fri, 2 Jan 2009 13:48:47 +0000 (13:48 +0000)]
synclink_cs: Convert to tty_port

Use the tty port operations, add refcounting, and refactor a bit to make the
refcounting work cleanly.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: use port methods for the rocket driver
Alan Cox [Fri, 2 Jan 2009 13:48:39 +0000 (13:48 +0000)]
tty: use port methods for the rocket driver

Now we have our ducks in order we can begin switching to the port
operations

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: kref the rocket driver
Alan Cox [Fri, 2 Jan 2009 13:48:30 +0000 (13:48 +0000)]
tty: kref the rocket driver

We will need this kref fitted to make full use of the port operations.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: make rocketport use standard port->flags
Alan Cox [Fri, 2 Jan 2009 13:48:23 +0000 (13:48 +0000)]
tty: make rocketport use standard port->flags

We need to this ready for using the standard helpers

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: Redo the rocket driver locking
Alan Cox [Fri, 2 Jan 2009 13:48:17 +0000 (13:48 +0000)]
tty: Redo the rocket driver locking

Bring this driver into the port locking model

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: Make epca use the port helpers
Alan Cox [Fri, 2 Jan 2009 13:48:11 +0000 (13:48 +0000)]
tty: Make epca use the port helpers

Now the locking is straight and the port kref usage is straight we can
replace lots of chunks of code with the standard port helpers

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: refcount the epca driver
Alan Cox [Fri, 2 Jan 2009 13:48:04 +0000 (13:48 +0000)]
tty: refcount the epca driver

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: relock epca
Alan Cox [Fri, 2 Jan 2009 13:47:58 +0000 (13:47 +0000)]
tty: relock epca

Bring epca into line with the port locking.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: Modem functions for the HSO driver
Denis Joseph Barrow [Fri, 2 Jan 2009 13:47:52 +0000 (13:47 +0000)]
tty: Modem functions for the HSO driver

Makes TIOCM ioctls for Data Carrier Detect & related functions
work like /drivers/serial/serial-core.c potentially needed
for pppd & similar user programs.

Signed-off-by: Denis Joseph Barrow <D.Barow@option.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: Fix the HSO termios handling a bit
Alan Cox [Fri, 2 Jan 2009 13:47:45 +0000 (13:47 +0000)]
tty: Fix the HSO termios handling a bit

Init the tty structure once
Don't set ->low_latency twice in a row
Don't force bits we should be leaving to the user
Don't allocate termios arrays as these are in fact allocated by the tty layer
for you and just overwrite the ones allocated in the driver

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agohso: net driver using tty without locking
Alan Cox [Fri, 2 Jan 2009 13:47:39 +0000 (13:47 +0000)]
hso: net driver using tty without locking

Checking tty == NULL doesn't help us unless we have a clear semantic for
the locking of the tty object in the driver. Use the tty kref objects so that
we can take references to the tty in the USB event handling paths.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: kref nozomi
Alan Cox [Fri, 2 Jan 2009 13:47:32 +0000 (13:47 +0000)]
tty: kref nozomi

Update the nozomi driver to use krefs

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: Remove some pointless casts
Alan Cox [Fri, 2 Jan 2009 13:47:26 +0000 (13:47 +0000)]
tty: Remove some pointless casts

disc_data and driver_data are void *

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: PTYs set TTY_DO_WRITE_WAKEUP when they don't need to
Alan Cox [Fri, 2 Jan 2009 13:47:20 +0000 (13:47 +0000)]
tty: PTYs set TTY_DO_WRITE_WAKEUP when they don't need to

The write wakeup is done anyway for the poll while DO_WRITE_WAKUP is
cleared, set and managed by the ldisc layer and is no business of the pty
code.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: N_TTY SIGIO only works for read
Thomas Pfaff [Fri, 2 Jan 2009 13:47:13 +0000 (13:47 +0000)]
tty: N_TTY SIGIO only works for read

The N_TTY ldisc layer does not send SIGIO POLL_OUTs correctly when output is
possible due to flawed handling of the TTY_DO_WRITE_WAKEUP bit. It will
either send no SIGIOs at all or on every tty wakeup.

The fix is to set the bit when the tty driver write would block and test
and clear it on write wakeup.

[Merged with existing N_TTY patches and a small buglet fixed -- Alan]

Signed-off-by: Thomas Pfaff <tpfaff@pcs.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: USB tty devices can block in tcdrain when unplugged
Alan Cox [Fri, 2 Jan 2009 13:47:06 +0000 (13:47 +0000)]
tty: USB tty devices can block in tcdrain when unplugged

The underlying problem is that the device methods don't all correctly
handle disconnected status and some keep reporting bytes pending which
causes tcdrain to stall.

When the cable is unplugged they are definitely gone, and as this is true
for all USB cables we can fix it in the core usb serial code.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoserial: set correct baud_base for Oxford Semiconductor Ltd EXSYS EX-41092 Dual 16950...
Niels de Vos [Fri, 2 Jan 2009 13:46:58 +0000 (13:46 +0000)]
serial: set correct baud_base for Oxford Semiconductor Ltd EXSYS EX-41092 Dual 16950 Serial adapter

The PCI-card identified as "Oxford Semiconductor Ltd EXSYS EX-41092 Dual
16950 Serial adapter" is only usable with other devices (i.e. not the same
card) after doing a "setserial /dev/ttyS<n> baud_base 115200".  This
baud_base should be default for this card.

Signed-off-by: Niels de Vos <niels.devos@wincor-nixdorf.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: Introduce some close helpers for ports
Alan Cox [Fri, 2 Jan 2009 13:46:50 +0000 (13:46 +0000)]
tty: Introduce some close helpers for ports

Again this is a lot of common code we can unify

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: tty port zero baud open
Alan Cox [Fri, 2 Jan 2009 13:46:43 +0000 (13:46 +0000)]
tty: tty port zero baud open

If we have no speed set at some point then we should not raise DTR/RTS at
that point when opening as the tty is not ready

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: ESP has been broken for locking etc forver
Alan Cox [Fri, 2 Jan 2009 13:46:34 +0000 (13:46 +0000)]
tty: ESP has been broken for locking etc forver

Mark it broken

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: rework stallion to use the tty_port bits
Alan Cox [Fri, 2 Jan 2009 13:46:24 +0000 (13:46 +0000)]
tty: rework stallion to use the tty_port bits

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: Rework istallion to use the tty port changes
Alan Cox [Fri, 2 Jan 2009 13:46:18 +0000 (13:46 +0000)]
tty: Rework istallion to use the tty port changes

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: Introduce a tty_port generic block_til_ready
Alan Cox [Fri, 2 Jan 2009 13:46:10 +0000 (13:46 +0000)]
tty: Introduce a tty_port generic block_til_ready

Start sucking more commonality out of the drivers into a single piece of
core code.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: relock the mxser driver
Alan Cox [Fri, 2 Jan 2009 13:45:58 +0000 (13:45 +0000)]
tty: relock the mxser driver

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: relock riscom8 using port locks
Alan Cox [Fri, 2 Jan 2009 13:45:50 +0000 (13:45 +0000)]
tty: relock riscom8 using port locks

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: rocketport uses different port flags to everyone else
Alan Cox [Fri, 2 Jan 2009 13:45:44 +0000 (13:45 +0000)]
tty: rocketport uses different port flags to everyone else

Normalise them so we can use the common helpers later on

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: relock generic_serial
Alan Cox [Fri, 2 Jan 2009 13:45:36 +0000 (13:45 +0000)]
tty: relock generic_serial

Switch generic_serial to do port count locking via the tty_port structure
ready for moving to a common port wait routine. Keep the old driver lock for
internal calling so we don't risk messing up the drivers below until we
are ready.

Still needs kref conversions

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoisicom: redo locking to use tty port locks
Alan Cox [Fri, 2 Jan 2009 13:45:26 +0000 (13:45 +0000)]
isicom: redo locking to use tty port locks

This helps set the basis for moving block_til_ready into common code. We also
introduce a tty_port_hangup helper as this will also be generally needed.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: Pull the dtr raise into tty port
Alan Cox [Fri, 2 Jan 2009 13:45:19 +0000 (13:45 +0000)]
tty: Pull the dtr raise into tty port

This moves another per device special out of what should be shared open
wait paths into private methods

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agorio: Kill off ckmalloc
Alan Cox [Fri, 2 Jan 2009 13:45:12 +0000 (13:45 +0000)]
rio: Kill off ckmalloc

This was an alloc/clear wrapper but makes even less sense now it uses
kzalloc. Kill it off.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty_port: Add a port level carrier detect operation
Alan Cox [Fri, 2 Jan 2009 13:45:05 +0000 (13:45 +0000)]
tty_port: Add a port level carrier detect operation

This is the first step to generalising the various pieces of waiting logic
duplicated in all sorts of serial drivers.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: Fix PPP hang under load
Alan Cox [Fri, 2 Jan 2009 13:44:56 +0000 (13:44 +0000)]
tty: Fix PPP hang under load

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoCRED: Wrap task credential accesses in the devpts filesystem
David Howells [Fri, 2 Jan 2009 13:44:49 +0000 (13:44 +0000)]
CRED: Wrap task credential accesses in the devpts filesystem

Wrap access to task credentials so that they can be separated more easily from
the task_struct during the introduction of COW creds.

Change most current->(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id().

Change some task->e?[ug]id to task_e?[ug]id().  In some places it makes more
sense to use RCU directly rather than a convenient wrapper; these will be
addressed by later patches.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoAdd device function for USB serial console
Kevin Hao [Fri, 2 Jan 2009 13:44:34 +0000 (13:44 +0000)]
Add device function for USB serial console

Add device funtion for usb serial console, so we can open /dev/console
when we use a usb serial device as console.

(Typecast removed as noted by Sergei Shtylyov)

Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoAnd here's a patch (to be applied on top of the last) which prevents
Russell King [Fri, 2 Jan 2009 13:44:27 +0000 (13:44 +0000)]
And here's a patch (to be applied on top of the last) which prevents

this happening again by making use of 'const'.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoConvert the oxsemi tornado special cases to use the quirk interface and not
Russell King [Fri, 2 Jan 2009 13:44:20 +0000 (13:44 +0000)]
Convert the oxsemi tornado special cases to use the quirk interface and not

scribble on its own reference structures.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodevpts: fix unused function warning
Andrew Morton [Fri, 2 Jan 2009 13:44:12 +0000 (13:44 +0000)]
devpts: fix unused function warning

fs/devpts/inode.c:324: warning: 'compare_init_pts_sb' defined but not used

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: Fix close races in USB serial
Alan Cox [Fri, 2 Jan 2009 13:44:04 +0000 (13:44 +0000)]
tty: Fix close races in USB serial

USB serial has always had races where the tty port usage count can hit zero
during a receive event. The internal locking is a mutex so we can't use
that in the IRQ handlers.

With krefs we can tackle this differently but we still need to be careful.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agon_tty: Output bells immediately on a full buffer
Joe Peterson [Fri, 2 Jan 2009 13:43:40 +0000 (13:43 +0000)]
n_tty: Output bells immediately on a full buffer

This patch causes "bell" (^G) characters (invoked when the input buffer
is full) to be immediately output rather than filling the echo buffer.

This is especially a problem when the tty is stopped and buffers fill, since
the bells do not serve their purpose of immediate notification that the
buffer cannot take further input, and they will flush all at once when the
tty is restarted.

Signed-off-by: Joe Peterson <joe@skyrush.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>