Archived
14
0
Fork 0
Commit graph

45518 commits

Author SHA1 Message Date
Alan Stern
8808f00c7a USB: try to salvage lost power sessions
This patch (as1073) adds to khubd a way to recover from power-session
interruption caused by transient connect-change or enable-change
events.  After the debouncing period, khubd attempts to do a
USB-Persist-style reset or reset-resume.  If it works, the connection
will remain unscathed.

The upshot is that we will be more immune to noise caused by EMI.  The
grace period is on the order of 100 ms, so this won't permit recovery
from the "accidentally knocked the USB cable out of its socket" type
of event, but it's a start.

As an added bonus, if a device was suspended when the system goes to
sleep then we no longer need to check for power-session interruptions
when the system wakes up.  Khubd will naturally see the status change
while processing the device's parent hub and will do the right thing.

The remote_wakeup() routine is changed; now it expects the caller to
acquire the device lock rather than acquiring the lock itself.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:51 -07:00
Alan Stern
6ee0b270c7 USB: simplify hub_restart() logic
This patch (as1081) straightens out the logic of the hub_restart()
routine.  Each port of the hub is scanned and the driver makes sure
that ports which are supposed to be disabled really _are_ disabled.
Any ports with a significant change in status are flagged in
hub->change_bits, so that khubd can focus on them without the need to
scan all the ports a second time -- which means the hub->activating
flag is no longer needed.

Also, it is now recognized explicitly that the only reason for
resuming a port which was not suspended is to carry out a reset-resume
operation, which happens only in a non-CONFIG_USB_SUSPEND setting.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:50 -07:00
Greg Kroah-Hartman
9e5eace734 USB: revert "don't use reset-resume if drivers don't support it"
This reverts Linus's previous patch that is in mainline to make it
easier for the USB hub.c patches that follow this to apply cleanly.  The
functionality will be added back in a followon patch in this series.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:48 -07:00
Alan Stern
24618b0cd4 USB: debounce before unregistering
This patch (as1080) makes a significant change to the way khubd
handles port connect-change and enable-change events.  Both types of
event are now debounced, and the debouncing is carried out _before_ an
existing usb_device is unregistered, instead of afterward.

This means that drivers will have to deal with longer runs of errors
when a device is unplugged, but they are supposed to be prepared for
that in any case.

The advantage is that when an enable-change occurs (caused for example
by electromagnetic interference), the debouncing period will provide
time for the cause of the problem to die away.  A simple port reset
(added in a forthcoming patch) will then allow us to recover from the
fault.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:47 -07:00
Alan Stern
b01b03f3ad USB: add new routine for checking port-resume type
This patch (as1070) creates a new subroutine to check whether a device
can be resumed.  This code is needed even when CONFIG_USB_SUSPEND
isn't set, because devices do suspend themselves when the root hub
(and hence the entire bus) is suspended, and power sessions can get
lost during a system sleep even without individual port suspends.

The patch also fixes a loose end in USB-Persist reset-resume handling.
When a low- or full-speed device is attached to an EHCI's companion
controller, the port handoff during resume will cause the companion
port's connect-status-change feature to be set.  If that flag isn't
cleared, the port-reset code will think it indicates that the device
has been unplugged and the reset-resume will fail.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:47 -07:00
Harvey Harrison
bd2c784595 USB: use get_unaligned_* helpers for kl5kusb105 driver
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:47 -07:00
Kay Sievers
0031a06e2f USB: usb dev_set_name() instead of dev->bus_id
The bus_id field is going away, use the dev_set_name() function
to set it properly.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:47 -07:00
Kay Sievers
7071a3ce0c USB: usb dev_name() instead of dev->bus_id
The bus_id field is going away, use the dev_name() function instead.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:46 -07:00
Greg Kroah-Hartman
36aa81172e USB: revert "don't lose disconnections during suspend"
This reverts Alan's previous patch so that the recent Hub changes will
apply cleanly.  The above mentioned patch was needed for 2.6.26 to work
properly.

Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Lukas Hejtmanek <xhejtman@ics.muni.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:46 -07:00
Greg Kroah-Hartman
1b26da1510 USB: handle pci_name() being const
This changes usb_create_hcd() to be able to handle the fact that
pci_name() has changed to a constant string.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:46 -07:00
Andrew Lunn
c5e46007e9 USB: storage: UNUSUAL_DEVS() for PanDigital Picture frame.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:46 -07:00
Linus Torvalds
6d52dcbe56 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] cpufreq: remove CVS keywords
  [CPUFREQ] change cpu freq arrays to per_cpu variables
2008-07-21 15:10:37 -07:00
Linus Torvalds
eb4225b2da Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: (25 commits)
  mmtimer: Push BKL down into the ioctl handler
  [IA64] Remove experimental status of kdump
  [IA64] Update ia64 mmr list for SGI uv
  [IA64] Avoid overflowing ia64_cpu_to_sapicid in acpi_map_lsapic()
  [IA64] adding parameter check to module_free()
  [IA64] improper printk format in acpi-cpufreq
  [IA64] pv_ops: move some functions in ivt.S to avoid lack of space.
  [IA64] pvops: documentation on ia64/pv_ops
  [IA64] pvops: add to hooks, pv_time_ops, for steal time accounting.
  [IA64] pvops: add hooks, pv_irq_ops, to paravirtualized irq related operations.
  [IA64] pvops: add hooks, pv_iosapic_ops, to paravirtualize iosapic.
  [IA64] pvops: define initialization hooks, pv_init_ops, for paravirtualized environment.
  [IA64] pvops: paravirtualize NR_IRQS
  [IA64] pvops: paravirtualize entry.S
  [IA64] pvops: paravirtualize ivt.S
  [IA64] pvops: paravirtualize minstate.h.
  [IA64] pvops: define paravirtualized instructions for native.
  [IA64] pvops: preparation for paravirtulization of hand written assembly code.
  [IA64] pvops: introduce pv_cpu_ops to paravirtualize privileged instructions.
  [IA64] pvops: add an early setup hook for pv_ops.
  ...
2008-07-21 14:55:23 -07:00
Linus Torvalds
e89970aa93 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
  netfilter: nf_conntrack_sctp: fix sparse warnings
  netfilter: nf_nat_sip: c= is optional for session
  netfilter: xt_TCPMSS: collapse tcpmss_reverse_mtu{4,6} into one function
  netfilter: nfnetlink_log: send complete hardware header
  netfilter: xt_time: fix time's time_mt()'s use of do_div()
  netfilter: accounting rework: ct_extend + 64bit counters (v4)
  netlink: add NLA_PUT_BE64 macro
  netfilter: nf_nat_core: eliminate useless find_appropriate_src for IP_NAT_RANGE_PROTO_RANDOM
  hdlcdrv: Fix CRC calculation.
  Revert "pkt_sched: Make default qdisc nonshared-multiqueue safe."
  net: In __netif_schedule() use WARN_ON instead of BUG_ON
  net: Improve simple_tx_hash().
  pkt_sched: Remove unused variable skb in dev_deactivate_queue function.
  sunhme: Remove stop/wake TX queue calls in set-multicast-list handler.
  ucc_geth: do not touch net queue in adjust_link phylib callback
  gianfar: do not touch net queue in adjust_link phylib callback
  atl1: Do not wake queue before queue has been started.
2008-07-21 11:29:52 -07:00
Randy Dunlap
443bd1c4dd pci kernel-doc fatal error
Fix kernel-doc comments so that they don't produce errors.
Also cut some extraneous copy-paste text.

Error(linhead//drivers/pci/pci.c:1133): duplicate section name 'Description'
Error(linhead//drivers/pci/pci.c:1189): duplicate section name 'Description'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-21 10:43:26 -07:00
Linus Torvalds
72a73693aa Merge branch 'x86/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (160 commits)
  x86: remove extra calling to get ext cpuid level
  x86: use setup_clear_cpu_cap() when disabling the lapic
  KVM: fix exception entry / build bug, on 64-bit
  x86: add unknown_nmi_panic kernel parameter
  x86, VisWS: turn into generic arch, eliminate leftover files
  x86: add ->pre_time_init to x86_quirks
  x86: extend and use x86_quirks to clean up NUMAQ code
  x86: introduce x86_quirks
  x86: improve debug printout: add target bootmem range in early_res_to_bootmem()
  Subject: devmem, x86: fix rename of CONFIG_NONPROMISC_DEVMEM
  x86: remove arch_get_ram_range
  x86: Add a debugfs interface to dump PAT memtype
  x86: Add a arch directory for x86 under debugfs
  x86: i386: reduce boot fixmap space
  i386/xen: add proper unwind annotations to xen_sysenter_target
  x86: reduce force_mwait visibility
  x86: reduce forbid_dac's visibility
  x86: fix two modpost warnings
  x86: check function status in EDD boot code
  x86_64: ia32_signal.c: remove signal number conversion
  ...
2008-07-21 10:34:25 -07:00
Linus Torvalds
b7e6f62fe2 Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm
* git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm:
  dm crypt: add merge
  dm table: remove merge_bvec sector restriction
  dm: linear add merge
  dm: introduce merge_bvec_fn
  dm snapshot: use per device mempools
  dm snapshot: fix race during exception creation
  dm snapshot: track snapshot reads
  dm mpath: fix test for reinstate_path
  dm mpath: return parameter error
  dm io: remove struct padding
  dm log: make dm_dirty_log init and exit static
  dm mpath: free path selector on invalid args
2008-07-21 10:30:10 -07:00
Linus Torvalds
8a392625b6 Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md: (52 commits)
  md: Protect access to mddev->disks list using RCU
  md: only count actual openers as access which prevent a 'stop'
  md: linear: Make array_size sector-based and rename it to array_sectors.
  md: Make mddev->array_size sector-based.
  md: Make super_type->rdev_size_change() take sector-based sizes.
  md: Fix check for overlapping devices.
  md: Tidy up rdev_size_store a bit:
  md: Remove some unused macros.
  md: Turn rdev->sb_offset into a sector-based quantity.
  md: Make calc_dev_sboffset() return a sector count.
  md: Replace calc_dev_size() by calc_num_sectors().
  md: Make update_size() take the number of sectors.
  md: Better control of when do_md_stop is allowed to stop the array.
  md: get_disk_info(): Don't convert between signed and unsigned and back.
  md: Simplify restart_array().
  md: alloc_disk_sb(): Return proper error value.
  md: Simplify sb_equal().
  md: Simplify uuid_equal().
  md: sb_equal(): Fix misleading printk.
  md: Fix a typo in the comment to cmd_match().
  ...
2008-07-21 10:29:12 -07:00
Linus Torvalds
519f0141f1 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (48 commits)
  Input: add switch for dock events
  Input: add microphone insert switch definition
  Input: i8042 - add Arima-Rioworks HDAMB board to noloop list
  Input: sgi_btns - add support for SGI Indy volume buttons
  Input: add option to disable HP SDC driver
  Input: serio - trivial documentation fix
  Input: add new serio driver for Xilinx XPS PS2 IP
  Input: add driver for Tabletkiosk Sahara TouchIT-213 touchscreen
  Input: new driver for SGI O2 volume buttons
  Input: yealink - reliably kill urbs
  Input: q40kbd - make q40kbd_lock static
  Input: gtco - eliminate early return
  Input: i8042 - add Dritek quirk for Acer Aspire 5720
  Input: usbtouchscreen - ignore eGalax screens supporting HID protocol
  Input: i8042 - add Medion NAM 2070 to noloop blacklist
  Input: i8042 - add Gericom Bellagio to nomux blacklist
  Input: i8042 - add Acer Aspire 1360 to nomux blacklist
  Input: hp_sdc_mlc.c - make a struct static
  Input: hil_mlc.c - make code static
  Input: wistron - generate normal key event if bluetooth or wifi not present
  ...
2008-07-21 10:27:31 -07:00
Micah Dowty
ae6134bdf3 hdlcdrv: Fix CRC calculation.
This is a trivial patch against the hdlcdrv module that fixes its CRC
calculation. The finished CRC was overwriting the first two bytes of
each packet rather than being appended to the end.

I've tested this with 2.6.8 and 2.6.10-rc1, but hdlcdrv hasn't changed
much recently so it should work with many other kernel versions.

Signed-off-by: Micah Dowty <micah@navi.cx>
Acked-by: Thomas Sailer <t.sailer@alumni.ethz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-21 10:10:56 -07:00
Linus Torvalds
f8b71a3a92 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: (44 commits)
  sparc: Remove Sparc's asm-offsets for sclow.S
  sparc64: Update defconfig.
  sparc64: Add Niagara2 RNG driver.
  sparc64: Add missing hypervisor service group numbers.
  sparc64: Remove 4MB and 512K base page size options.
  sparc64: Convert to generic helpers for IPI function calls.
  sparc: Use new '%pS' infrastructure to print symbols.
  sparc32: fix init.c allnoconfig build error
  sparc64: Config category "Processor type and features" absent
  sparc: arch/sparc/kernel/apc.c to unlocked_ioctl
  sparc: join the remaining header files
  sparc: merge header files with trivial differences
  sparc: when header files are equal use asm-sparc version
  sparc: copy sparc64 specific files to asm-sparc
  sparc: Merge asm-sparc{,64}/asi.h
  sparc: export openprom.h to userspace
  sparc: Merge asm-sparc{,64}/types.h
  sparc: Merge asm-sparc{,64}/termios.h
  sparc: Merge asm-sparc{,64}/termbits.h
  sparc: Merge asm-sparc{,64}/setup.h
  ...
2008-07-21 09:40:26 -07:00
Wang Chen
42a77a1b8f Fix istallion build failure
Commits b02f5ad6a3 ("istallion: use
tty_port") and a352def21a ("tty: Ldisc
revamp") broke the istallion driver.

Fix the compile error and silence a warning.

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-21 09:39:15 -07:00
David S. Miller
fd24c4af6e sunhme: Remove stop/wake TX queue calls in set-multicast-list handler.
Based upon a bug report by Alexander Beregalov and commentary
from Ben Hutchings.

These are totally unnecessary, in particular because this
driver's ->hard_start_xmit() handler takes the same driver
spinlock that the set-multicast-list handler uses.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-21 08:34:49 -07:00
Anton Vorontsov
ebbdbd7c02 ucc_geth: do not touch net queue in adjust_link phylib callback
If the net queue has not been started, we'll get this nice oops
and non-working ethernet:

------------[ cut here ]------------
Kernel BUG at c01f4648 [verbose debug info unavailable]
Oops: Exception in kernel mode, sig: 5 [#1]
MPC836x RDK
Modules linked in:
NIP: c01f4648 LR: c01c0a10 CTR: c01c08e4
REGS: cf839e40 TRAP: 0700   Not tainted  (2.6.26-05254-gc7b9969)
MSR: 00021032 <ME,IR,DR>  CR: 22042044  XER: 00000000
TASK = cf828c30[4] 'events/0' THREAD: cf838000
GPR00: c01c0a10 cf839ef0 cf828c30 c035ceb0 cf8469a0 00000064 00000000 00000000
GPR08: c035ceb0 00000001 00000001 cf99c280 22044044 7ca81020 0fffc000 00000000
GPR16: 0fff2544 0fff63c0 00000000 0fff78e0 0ffa5580 00000004 00000000 00000000
GPR24: 02082000 cf9d0000 d1068000 00009032 cf846800 cf846b80 00000001 00000014
NIP [c01f4648] __netif_schedule+0x28/0x8c
LR [c01c0a10] adjust_link+0x12c/0x1e4
Call Trace:
[cf839ef0] [c0380f50] 0xc0380f50 (unreliable)
[cf839f10] [c01c0a10] adjust_link+0x12c/0x1e4
[cf839f40] [c01c2628] phy_state_machine+0x2e0/0x448
[cf839f60] [c00425e8] run_workqueue+0xc8/0x168
[cf839f90] [c0042c6c] worker_thread+0x70/0xd0
[cf839fd0] [c0046954] kthread+0x48/0x84
[cf839ff0] [c0012488] kernel_thread+0x44/0x60
Instruction dump:
7c0803a6 4e800020 3d20c036 9421ffe0 7c0802a6 7c681b78 3929ceb0 7c694a78
7d290034 90010024 bfa10014 5529d97e <0f090000> 39600002 38030024 7d200028
---[ end trace a57d367843bd2904 ]---

Since the driver is using phylib (which is doing netif_carrier_on/off()),
we should simply remove netif_tx_schedule_all() from adjust_link().

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-21 08:30:36 -07:00
Anton Vorontsov
afc079465e gianfar: do not touch net queue in adjust_link phylib callback
If the net queue has not been started, we'll get this nice oops
and non-working ethernet:

PHY: 0:01 - Link is Up - 1000/Full
------------[ cut here ]------------
kernel BUG at net/core/dev.c:1328!
Oops: Exception in kernel mode, sig: 5 [#1]
MPC837x RDB
Modules linked in:
NIP: c02544a0 LR: c01a17d0 CTR: c01a16ac
REGS: cf837e40 TRAP: 0700   Not tainted  (2.6.26-05253-g14b395e)
MSR: 00021032 <ME,IR,DR>  CR: 22042044  XER: 00000000
TASK = cf819400[5] 'events/0' THREAD: cf836000
GPR00: c01a17d0 cf837ef0 cf819400 c03d8d08 cf8469a0 00000064 00000000 00000000
GPR08: c03d8d08 00000001 00000001 cf899ba0 22044044 00000000 0fffd000 00000000
GPR16: 0fff3028 0fff6cf0 00000000 0fff8390 0ff494a0 00000004 00000000 00000000
GPR24: c0361a00 00001058 cf9f6600 00009032 cf846800 cf846b80 00000001 00000014
NIP [c02544a0] __netif_schedule+0x28/0x8c
LR [c01a17d0] adjust_link+0x124/0x1cc
Call Trace:
[cf837ef0] [c03fb3a0] 0xc03fb3a0 (unreliable)
[cf837f10] [c01a17d0] adjust_link+0x124/0x1cc
[cf837f40] [c01a8e28] phy_state_machine+0x2e0/0x448
[cf837f60] [c0040254] run_workqueue+0xc8/0x168
[cf837f90] [c00408d8] worker_thread+0x70/0xd0
[cf837fd0] [c0044630] kthread+0x48/0x84
[cf837ff0] [c0012610] kernel_thread+0x44/0x60
Instruction dump:
7c0803a6 4e800020 3d20c03e 9421ffe0 7c0802a6 7c681b78 39298d08 7c694a78
7d290034 90010024 bfa10014 5529d97e <0f090000> 39600002 38030024 7d200028
---[ end trace 13dfd73ee42d0c30 ]---

Since the driver is using phylib (which is doing netif_carrier_on/off()),
we should simply remove netif_tx_schedule_all() from adjust_link().

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-21 08:29:54 -07:00
David S. Miller
39d48157ac atl1: Do not wake queue before queue has been started.
Based upon a bug report by Alexey Dobriyan, the patch is
also tested by him and confirmed to fix the problem.

Packet flow during link state events should not be done by
waking and stopping the TX queue anyways, that is handled
transparently by netif_carrier_{on,off}().

So, remove the netif_{wake,stop}_queue() calls in the link
check code, and add the necessary netif_start_queue() call
to atl1_up().

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-07-21 08:28:37 -07:00
Ingo Molnar
2e2dcc7631 Merge branch 'x86/paravirt-spinlocks' into x86/for-linus 2008-07-21 16:45:56 +02:00
Ingo Molnar
acee709cab Merge branches 'x86/urgent', 'x86/amd-iommu', 'x86/apic', 'x86/cleanups', 'x86/core', 'x86/cpu', 'x86/fixmap', 'x86/gart', 'x86/kprobes', 'x86/memtest', 'x86/modules', 'x86/nmi', 'x86/pat', 'x86/reboot', 'x86/setup', 'x86/step', 'x86/unify-pci', 'x86/uv', 'x86/xen' and 'xen-64bit' into x86/for-linus 2008-07-21 16:37:17 +02:00
Ingo Molnar
e66d90fb4a Merge branch 'linus' into xen-64bit 2008-07-21 15:06:09 +02:00
Ingo Molnar
1c29dd9a9e Merge branch 'linus' into x86/paravirt-spinlocks 2008-07-21 15:05:58 +02:00
Milan Broz
d41e26b901 dm crypt: add merge
This patch implements biovec merge function for crypt target.

If the underlying device has merge function defined, call it.
If not, keep precomputed value.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:40 +01:00
Milan Broz
9980c638a6 dm table: remove merge_bvec sector restriction
Remove max_sector restriction - merge function replaced it.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:39 +01:00
Milan Broz
7bc3447b69 dm: linear add merge
This patch implements biovec merge function for linear target.

If the underlying device has merge function defined, call it.
If not, keep precomputed value.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:38 +01:00
Milan Broz
f6fccb1213 dm: introduce merge_bvec_fn
Introduce a bvec merge function for device mapper devices
for dynamic size restrictions.

This code ensures the requested biovec lies within a single
target and then calls a target-specific function to check
against any constraints imposed by underlying devices.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:37 +01:00
Mikulas Patocka
92e868122e dm snapshot: use per device mempools
Change snapshot per-module mempool to per-device mempool.

Per-module mempools could cause a deadlock if multiple
snapshot devices are stacked above each other.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:35 +01:00
Mikulas Patocka
a8d41b59f3 dm snapshot: fix race during exception creation
Fix a race condition that returns incorrect data when a write causes an
exception to be allocated whilst a read is still in flight.

The race condition happens as follows:
* A read to non-reallocated sector in the snapshot is submitted so that the
  read is routed to the original device.
* A write to the original device is submitted. The write causes an exception
  that reallocates the block.  The write proceeds.
* The original read is dequeued and reads the wrong data.

This race can be triggered with CFQ scheduler and one thread writing and
multiple threads reading simultaneously.

(This patch relies upon the earlier dm-kcopyd-per-device.patch to avoid a
deadlock.)

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:34 +01:00
Mikulas Patocka
cd45daffd1 dm snapshot: track snapshot reads
Whenever a snapshot read gets mapped through to the origin, track it in
a per-snapshot hash table indexed by chunk number, using memory allocated
from a new per-snapshot mempool.

We need to track these reads to avoid race conditions which will be fixed
by patches that follow.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:32 +01:00
Alasdair G Kergon
def052d21c dm mpath: fix test for reinstate_path
Fix test for reinstate_path method before attempting to use it.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Cc: Julia Lawall <julia@diku.dk>
2008-07-21 12:00:31 +01:00
Mikulas Patocka
148acff615 dm mpath: return parameter error
Return a specific error message if there are an invalid number of multipath
arguments.

This invalid command returns an "Unknown error" because the ti->error field is
not set

dmsetup create --table '0 2 multipath 0 0 1 1 round-robin 0 1 1 /dev/sdh' mpath0

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:30 +01:00
Richard Kennedy
6ae2fa6718 dm io: remove struct padding
Rearrange struct dm_io.
Shrinks size from 40 -> 32 allowing more objects/slab.

Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:28 +01:00
Adrian Bunk
c8da2f8dd8 dm log: make dm_dirty_log init and exit static
dm_dirty_log_{init,exit}() can now become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:27 +01:00
Mikulas Patocka
371b2e348b dm mpath: free path selector on invalid args
Free path selector if the arguments are invalid.

This command (note that it is invalid) causes reference leak on module
"dm_round_robin" and prevents the module from being removed.

dmsetup create --table '0 2 multipath 0 0 1 1 round-robin /dev/sdh' mpath0

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
2008-07-21 12:00:24 +01:00
Ingo Molnar
e27772b48d Merge branch 'linus' into x86/urgent 2008-07-21 11:02:45 +02:00
NeilBrown
4b80991c6c md: Protect access to mddev->disks list using RCU
All modifications and most access to the mddev->disks list are made
under the reconfig_mutex lock.  However there are three places where
the list is walked without any locking.  If a reconfig happens at this
time, havoc (and oops) can ensue.

So use RCU to protect these accesses:
  - wrap them in rcu_read_{,un}lock()
  - use list_for_each_entry_rcu
  - add to the list with list_add_rcu
  - delete from the list with list_del_rcu
  - delay the 'free' with call_rcu rather than schedule_work

Note that export_rdev did a list_del_init on this list.  In almost all
cases the entry was not in the list anymore so it was a no-op and so
safe.  It is no longer safe as after list_del_rcu we may not touch
the list_head.
An audit shows that export_rdev is called:
  - after unbind_rdev_from_array, in which case the delete has
     already been done,
  - after bind_rdev_to_array fails, in which case the delete isn't needed.
  - before the device has been put on a list at all (e.g. in
      add_new_disk where reading the superblock fails).
  - and in autorun devices after a failure when the device is on a
      different list.

So remove the list_del_init call from export_rdev, and add it back
immediately before the called to export_rdev for that last case.

Note also that ->same_set is sometimes used for lists other than
mddev->list (e.g. candidates).  In these cases rcu is not needed.

Signed-off-by: NeilBrown <neilb@suse.de>
2008-07-21 17:05:25 +10:00
NeilBrown
f2ea68cf42 md: only count actual openers as access which prevent a 'stop'
Open isn't the only thing that increments ->active.  e.g. reading
/proc/mdstat will increment it briefly.  So to avoid false positives
in testing for concurrent access, introduce a new counter that counts
just the number of times the md device it open.

Signed-off-by: NeilBrown <neilb@suse.de>
2008-07-21 17:05:25 +10:00
Andre Noll
d6e2215052 md: linear: Make array_size sector-based and rename it to array_sectors.
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
2008-07-21 17:05:25 +10:00
Andre Noll
f233ea5c9e md: Make mddev->array_size sector-based.
This patch renames the array_size field of struct mddev_s to array_sectors
and converts all instances to use units of 512 byte sectors instead of 1k
blocks.

Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
2008-07-21 17:05:22 +10:00
Dmitry Torokhov
908cf4b925 Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into next 2008-07-21 00:55:14 -04:00
Andre Noll
15f4a5fdf3 md: Make super_type->rdev_size_change() take sector-based sizes.
Also, change the type of the size parameter from unsigned long long to
sector_t and rename it to num_sectors.

Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
2008-07-21 14:42:12 +10:00
Andre Noll
d07bd3bcc4 md: Fix check for overlapping devices.
The checks in overlaps() expect all parameters either in block-based
or sector-based quantities. However, its single caller passes two
rdev->data_offset arguments as well as two rdev->size arguments, the
former being sector counts while the latter are measured in 1K blocks.

This could cause rdev_size_store() to accept an invalid size from user
space. Fix it by passing only sector-based quantities to overlaps().

Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
2008-07-21 14:42:07 +10:00
Neil Brown
d7027458d6 md: Tidy up rdev_size_store a bit:
- used strict_strtoull in place of simple_strtoull
 - use my_mddev in place of rdev->mddev (they have the same value)
and more significantly,
 - don't adjust mddev->size to fit, rather reject changes which make
   rdev->size smaller than mddev->size

Adjusting mddev->size is a hangover from bind_rdev_to_array which
does a similar thing.  But it really is a better design to insist that
mddev->size is set as required, then the rdev->sizes are set to allow
for that.  The previous way invites confusion.

Signed-off-by: NeilBrown <neilb@suse.de>
2008-07-21 14:22:18 +10:00
Linus Torvalds
734b397cd1 Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  gpu: re-order GPU subdirectory vs char for AGP vs DRM startup.
2008-07-20 21:19:17 -07:00
Linus Torvalds
ae0645a451 Merge branch 'for-linus' of git://git.o-hand.com/linux-mfd
* 'for-linus' of git://git.o-hand.com/linux-mfd:
  mfd: let asic3 use mem resource instead of bus_shift
  mfd: remove DS1WM register definitions from asic3.h
  mfd: add ASIC3_CONFIG_GPIO templates
  mfd: fix the asic3 irq demux code
  mfd: asic3 should depend on gpiolib
  mfd: fix asic3 config array initialisation
  mfd: move asic3 probe functions into __init section
  mfd: Use uppercase only for asic3 macros and defines
  mfd: use dev_* macros for asic3 debugging
  mfd: New asic3 gpio configuration code
  mfd: asic3 children platform data removal
  mfd: asic3 gpiolib support
2008-07-20 21:16:27 -07:00
Linus Torvalds
f894d18380 Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (277 commits)
  V4L/DVB (8415): gspca: Infinite loop in i2c_w() of etoms.
  V4L/DVB (8414): videodev/cx18: fix get_index bug and error-handling lock-ups
  V4L/DVB (8411): videobuf-dma-contig.c: fix 64-bit build for pre-2.6.24 kernels
  V4L/DVB (8410): sh_mobile_ceu_camera: fix 64-bit compiler warnings
  V4L/DVB (8397): video: convert select VIDEO_ZORAN_ZR36060 into depends on
  V4L/DVB (8396): video: Fix Kbuild dependency for VIDEO_IR_I2C
  V4L/DVB (8395): saa7134: Fix Kbuild dependency of ir-kbd-i2c
  V4L/DVB (8394): ir-common: CodingStyle fix: move EXPORT_SYMBOL_GPL to their proper places
  V4L/DVB (8393): media/video: Fix depencencies for VIDEOBUF
  V4L/DVB (8392): media/Kconfig: Convert V4L1_COMPAT select into "depends on"
  V4L/DVB (8390): videodev: add comment and remove magic number.
  V4L/DVB (8389): videodev: simplify get_index()
  V4L/DVB (8387): Some cosmetic changes
  V4L/DVB (8381): ov7670: fix compile warnings
  V4L/DVB (8380): saa7115: use saa7115_auto instead of saa711x as the autodetect driver name.
  V4L/DVB (8379): saa7127: Make device detection optional
  V4L/DVB (8378): cx18: move cx18_av_vbi_setup to av-core.c and rename to cx18_av_std_setup
  V4L/DVB (8377): ivtv/cx18: ensure the default control values are correct
  V4L/DVB (8376): cx25840: move cx25840_vbi_setup to core.c and rename to cx25840_std_setup
  V4L/DVB (8374): gspca: No conflict of 0c45:6011 with the sn9c102 driver.
  ...
2008-07-20 21:14:42 -07:00
Linus Torvalds
db6d8c7a40 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (1232 commits)
  iucv: Fix bad merging.
  net_sched: Add size table for qdiscs
  net_sched: Add accessor function for packet length for qdiscs
  net_sched: Add qdisc_enqueue wrapper
  highmem: Export totalhigh_pages.
  ipv6 mcast: Omit redundant address family checks in ip6_mc_source().
  net: Use standard structures for generic socket address structures.
  ipv6 netns: Make several "global" sysctl variables namespace aware.
  netns: Use net_eq() to compare net-namespaces for optimization.
  ipv6: remove unused macros from net/ipv6.h
  ipv6: remove unused parameter from ip6_ra_control
  tcp: fix kernel panic with listening_get_next
  tcp: Remove redundant checks when setting eff_sacks
  tcp: options clean up
  tcp: Fix MD5 signatures for non-linear skbs
  sctp: Update sctp global memory limit allocations.
  sctp: remove unnecessary byteshifting, calculate directly in big-endian
  sctp: Allow only 1 listening socket with SO_REUSEADDR
  sctp: Do not leak memory on multiple listen() calls
  sctp: Support ipv6only AF_INET6 sockets.
  ...
2008-07-20 17:43:29 -07:00
Akinobu Mita
18c993629a dio: use dio_match_device() in dio_bus_match()
dio_bus_match() can use dio_match_device().

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:40 -07:00
Geert Uytterhoeven
3fadd06ebc m68k/Apollo: remove the unused APOLLO_ELPLUS option
Looking at older kernel sources the APOLLO_ELPLUS option was added
somewhere during kernel 2.1, but even kernel 2.2.0 does not contain
any driver that would be enabled through it...

Reported-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:40 -07:00
Adrian Bunk
880e5e212e export c2p
This patch fixes the following build error:

<--  snip  -->

..
  Building modules, stage 2.
  MODPOST 1203 modules
ERROR: "c2p" [drivers/video/amifb.ko] undefined!
..
make[2]: *** [__modpost] Error 1

<--  snip  -->

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:39 -07:00
Adrian Bunk
8b54b6135a drivers/video/c2p.c: add MODULE_LICENSE
This patch adds the missing MODULE_LICENSE("GPL").

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:39 -07:00
Geert Uytterhoeven
da8513c9b8 atafb: Register Atari-specific video modes with sysfs
Register the Atari-specific video modes with sysfs, so you can see them in
/sys/class/graphics/fb0/modes and change the video mode by writing to
/sys/class/graphics/fb0/mode.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:39 -07:00
Geert Uytterhoeven
db3e5289f5 amifb: Register Amiga-specific video modes with sysfs
Register the Amiga-specific video modes with sysfs, so you can see them in
/sys/class/graphics/fb0/modes and change the video mode by writing to
/sys/class/graphics/fb0/mode.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:39 -07:00
akinobu.mita@gmail.com
fa7f289396 zorro: use memory_read_from_buffer
zorro: use memory_read_from_buffer

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:38 -07:00
Robert P. J. Day
a6a26a3e65 ZORRO: Replace deprecated __initcall with equivalent device_initcall.
ZORRO: Replace deprecated __initcall with equivalent device_initcall.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:38 -07:00
Geert Uytterhoeven
e945b568e2 m68k: Return -ENODEV if no device is found
According to the tests in do_initcalls(), the proper error code in case no
device is found is -ENODEV, not -ENXIO or -EIO.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:38 -07:00
Paulius Zaleckas
038eddd9ac ariadne: use netstats in net_device structure
Use net_device_stats from net_device structure instead of local.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:38 -07:00
Adrian Bunk
f30828a674 m68k: remove CVS keywords
This patch removes CVS keywords that weren't updated for a long time
from comments.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:24:38 -07:00
Linus Torvalds
f7df406dce Merge branch 'configfs-fixup-ptr-error' of git://oss.oracle.com/git/jlbec/linux-2.6
* 'configfs-fixup-ptr-error' of git://oss.oracle.com/git/jlbec/linux-2.6:
  configfs: Allow ->make_item() and ->make_group() to return detailed errors.
  Revert "configfs: Allow ->make_item() and ->make_group() to return detailed errors."
2008-07-20 17:17:52 -07:00
Thomas Gleixner
5e248ac9a5 APCI: revert another duplicated patch
commit d185705690 ("ACPI: don't walk
tables if ACPI was disabled") is another superfluous duplicate commit
caused by git -> quilt -> git conversion.

Revert it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:14:57 -07:00
Thomas Gleixner
392798a17b APCI: revert duplicated patch
commit 816c2eda3c ("dock: bay: Don't call
acpi_walk_namespace() when ACPI is disabled.") was merged between
2.6.26-rc8 and -rc9)

Due to rebasing the ACPI tree via quilt the same patch got applied again
via commit cc7e51666d ("dock: bay: Don't
call acpi_walk_namespace() when ACPI is disabled.")

Revert it, as it is obviously bogus.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:14:57 -07:00
Alan Cox
4e4f64da58 Fix strip driver back up for ldisc/tty changes
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:38 -07:00
Alan Cox
44b7d1b37f tty: add more tty_port fields
Move more bits into the tty_port structure

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:38 -07:00
Alan Cox
77451e53e0 cyclades: use tty_port
Switch cyclades to use the new tty_port structure

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:38 -07:00
Alan Cox
ae67751785 tty: Clean up tiocmset
Reverse the order of one test and it gets much more readable

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:37 -07:00
Alan Cox
8fb06c7713 synclink: use tty_port
Switch the synclink ports to use the new tty_port structure

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:37 -07:00
Alan Cox
f8ae476416 stallion: use tty_port
Switch the stallion driver to use the tty_port structure

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:37 -07:00
Haavard Skinnemoen
b1d1619b4a atmel_serial: Fix tty_port breakage
The tty pointer has been moved into a tty_port field, so we need to use
->info->port.tty instead of just ->info->tty. Fixes these build errors:

David Brownell <david-b@pacbell.net> wrote:
> drivers/serial/atmel_serial.c: In function 'atmel_rx_from_ring':
> drivers/serial/atmel_serial.c:665: error: 'struct uart_info' has no member named 'tty'
> drivers/serial/atmel_serial.c: In function 'atmel_rx_from_dma':
> drivers/serial/atmel_serial.c:672: error: 'struct uart_info' has no member named 'tty'
> drivers/serial/atmel_serial.c: In function 'atmel_startup':
> drivers/serial/atmel_serial.c:797: error: 'struct uart_info' has no member named 'tty'
> make[2]: *** [drivers/serial/atmel_serial.o] Error 1

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:37 -07:00
Alan Cox
e60a108448 rocket: use tty_port
Switch the rocketport to use the new tty_port structure

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:37 -07:00
Alan Cox
0ad9e7d1d6 mxser: use tty_port
Switch mxser to use the new tty_port structure

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:37 -07:00
Alan Cox
9de6a51fee moxa: use tty_port
Switch MOXA to use the new tty_port structure

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:37 -07:00
Alan Cox
b02f5ad6a3 istallion: use tty_port
Switch istallion to use the new tty_port structure

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:37 -07:00
Alan Cox
f1d03228ea isicom: use tty_port
Switch isicom to use a tty_port structure for some fields

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:37 -07:00
Alan Cox
d99101fda0 riscom8: remove bogus checks
Chris Malley posted a patch removing a NULL check in the riscom8 driver.
Further analysis shows that even more of the tests are irrelevant so we
can delete lots of stuff

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:36 -07:00
Alan Cox
85f8f81052 riscom8: use tty_port
Switch riscom8 to use the new tty_port structure

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:36 -07:00
Alan Cox
b5391e29f4 gs: use tty_port
Switch drivers using the old "generic serial" driver to use the tty_port
structures

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:36 -07:00
Alan Cox
4982d6b37a esp: use tty_port
Switch esp to use the new tty_port structures

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:36 -07:00
Alan Cox
52d417388d epca: use tty_port
Switch the EPCA driver to include and begin using a tty_port structure

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:36 -07:00
Takashi Iwai
a88487c79b Fix compile errors in SGI console drivers (linux-next tree)
The below is the patch to replace blindly all possible places,
including Jack's fixes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
(Reviewed and checked rather than blindly added)
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:36 -07:00
Jack Steiner
b1ca7e7a0b - Fix compile errors in SGI console drivers (linux-next tree)
Fix compile errors in SGI console drivers caused by changes to the
tty_port structures in the linux-next tree.

Signed-off-by: Jack Steiner <steiner@sgi.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:36 -07:00
Stephen Rothwell
87c25ef0a4 ttydev: fix pamc_zilog for tty pointer move
Today's linux-next build (powerpc allyesconfig) failed like this:

drivers/serial/pmac_zilog.c: In function 'pmz_receive_chars':
drivers/serial/pmac_zilog.c:245: error: 'struct uart_info' has no member named 'tty'
drivers/serial/pmac_zilog.c:250: error: 'struct uart_info' has no member named 'tty'

I applied the patch below (which builds but may, or may not, be correct).
--
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:36 -07:00
Stephen Rothwell
2f7a697a13 ttydev: fix pamc_zilog for tty pointer move
Today's linux-next build (sparc64 defconfig) failed like this:

drivers/serial/sunhv.c: In function `receive_chars':
drivers/serial/sunhv.c:188: error: structure has no member named `tty'
drivers/serial/sunsu.c: In function `receive_chars':
drivers/serial/sunsu.c:314: error: structure has no member named `tty'
drivers/serial/sunsab.c: In function `receive_chars':
drivers/serial/sunsab.c:121: error: structure has no member named `tty'

I applied the following patch (which, again, may not be correct).

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:35 -07:00
Alan Cox
df4f4dd429 serial: use tty_port
Switch the serial_core based drivers to use the new tty_port structure.
We can't quite use all of it yet because of the dynamically allocated
extras in the serial_core layer.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:35 -07:00
Alan Cox
6f67048cd0 tty: Introduce a tty_port common structure
Every tty driver has its own concept of a port structure and because
they all differ we cannot extract commonality.  Begin fixing this by
creating a structure drivers can elect to use so that over time we can
push fields into this and create commonality and then introduce common
methods.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:35 -07:00
Adrian Bunk
d87a6d951c drivers/serial/: remove CVS keywords
This patch removes CVS keywords that weren't updated for a long time in
comments, printk's and MODULE_DESCRIPTION's (no printk's or
MODULE_DESCRIPTION's are completely removed).

While doing this I also found and fixed a missing \n in a printk
in m32r_sio.c

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:35 -07:00
Adrian Bunk
59247ca2fd drivers/char/rio/: remove VCS tags
This patch removes ancient VCS tags (either protected
by #ifdef SCCS_LABELS or commented out).

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:35 -07:00
Alan Cox
a352def21a tty: Ldisc revamp
Move the line disciplines towards a conventional ->ops arrangement.  For
the moment the actual 'tty_ldisc' struct in the tty is kept as part of
the tty struct but this can then be changed if it turns out that when it
all settles down we want to refcount ldiscs separately to the tty.

Pull the ldisc code out of /proc and put it with our ldisc code.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:34 -07:00
Jiri Slaby
e1e5770bb6 tty: isicom, enable/disable pci device
Don't forget to enable and disable PCI devices.  The device might be
unusable without that.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:34 -07:00
Haavard Skinnemoen
9afd561aca Subject: [PATCH 2/2] atmel_serial: Implement flush_buffer() hook
Avoid dumping garbage to the serial port when the tty is flushed. This
tends to happen when rebooting from a serial console.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:34 -07:00
Haavard Skinnemoen
6bb0e3a59a Subject: [PATCH 1/2] serial: Add flush_buffer() operation to uart_ops
Serial drivers using DMA (like the atmel_serial driver) tend to get very
confused when the xmit buffer is flushed and nobody told them.  They
also tend to spew a lot of garbage since the DMA engine keeps running
after the buffer is flushed and possibly refilled with unrelated data.

This patch adds a new flush_buffer operation to the uart_ops struct,
along with a call to it from uart_flush_buffer() right after the xmit
buffer has been cleared. The driver can implement this in order to
syncronize its internal DMA state with the xmit buffer when the buffer
is flushed.

Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-20 17:12:34 -07:00
Dave Airlie
e6b51632b3 gpu: re-order GPU subdirectory vs char for AGP vs DRM startup.
Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-07-21 08:42:49 +10:00
Philipp Zabel
99cdb0c8c5 mfd: let asic3 use mem resource instead of bus_shift
The bus_shift parameter in platform_data is not needed
as we can tell the driver with the IOMEM_RESOURCE whether
the ASIC is located on a 16bit or 32bit memory bus.

The htc-egpio driver uses a more descriptive bus_width parameter,
but for drivers where the register map size fixed, we don't even
need this.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
2008-07-20 19:56:44 +02:00
Philipp Zabel
de0d23c12c mfd: fix the asic3 irq demux code
Wrong irq numbers were given to desc->handle_irq, which on some devices
caused endless loops (asic3_irq_demux calling itself, basically).

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-07-20 19:56:12 +02:00
Samuel Ortiz
30250b457f mfd: asic3 should depend on gpiolib
Now that asic3 implements the gpiolib API, it should depend on it at
build time.

Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-07-20 19:56:01 +02:00
Philipp Zabel
786bef3768 mfd: fix asic3 config array initialisation
Our memset length was incorrect.

Tested-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-07-20 19:55:44 +02:00
Philipp Zabel
065032f61b mfd: move asic3 probe functions into __init section
Potentially free some memory by moving the _probe functions into __init.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-07-20 19:55:30 +02:00
Samuel Ortiz
3b8139f8b1 mfd: Use uppercase only for asic3 macros and defines
Let's be consistent and use uppercase only, for both macro and defines.

Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-07-20 19:55:14 +02:00
Samuel Ortiz
24f4f2eef2 mfd: use dev_* macros for asic3 debugging
We replace the various printks, and use the dev_* macros instead.

Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-07-20 19:55:08 +02:00
Samuel Ortiz
3b26bf1722 mfd: New asic3 gpio configuration code
The ASIC3 GPIO configuration code is a bit obscure and hardly readable.
This patch changes it so that it is now more readable and understandable,
by being more explicit.

Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-07-20 19:55:00 +02:00
Samuel Ortiz
1effe5bc6c mfd: asic3 children platform data removal
Platform devices should be dynamically allocated, and each supported
device should have its own platform data.
For now we just remove this buggy code.

Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-07-20 19:54:51 +02:00
Samuel Ortiz
6f2384c4bd mfd: asic3 gpiolib support
ASIC3 is, among other things, a GPIO extender. We should thus have it
supporting the current gpiolib API.

Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-07-20 19:52:38 +02:00
Jean-Francois Moine
d20b27478d V4L/DVB (8415): gspca: Infinite loop in i2c_w() of etoms.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:29:33 -03:00
Hans Verkuil
fac3639d88 V4L/DVB (8414): videodev/cx18: fix get_index bug and error-handling lock-ups
Fix a bug in get_index that was introduced earlier.
Also fix two error handling lock-ups in videodev and cx18 that
where found thanks to that bug.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:29:27 -03:00
Hans Verkuil
f19ad39014 V4L/DVB (8411): videobuf-dma-contig.c: fix 64-bit build for pre-2.6.24 kernels
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:29:22 -03:00
Hans Verkuil
86751b016f V4L/DVB (8410): sh_mobile_ceu_camera: fix 64-bit compiler warnings
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:29:17 -03:00
Mauro Carvalho Chehab
af8b303e96 V4L/DVB (8397): video: convert select VIDEO_ZORAN_ZR36060 into depends on
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:29:12 -03:00
Mauro Carvalho Chehab
367394ac5c V4L/DVB (8396): video: Fix Kbuild dependency for VIDEO_IR_I2C
Instead of letting VIDEO_IR_I2C to be selected by VIDEO_IR, if I2C, convert it
into a symbol that depends on both VIDEO_IR and I2C.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:29:08 -03:00
Mauro Carvalho Chehab
1c22dad8ab V4L/DVB (8395): saa7134: Fix Kbuild dependency of ir-kbd-i2c
Currently, saa7134 is dependent of ir-kbd-i2c, since it uses a symbol that is
defined there. However, as this symbol is used only on saa7134, there's no
sense on keeping it defined there (or on ir-commons).

So, let's move it to saa7134 and remove one symbol for being exported.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:29:03 -03:00
Mauro Carvalho Chehab
4db16db4f6 V4L/DVB (8394): ir-common: CodingStyle fix: move EXPORT_SYMBOL_GPL to their proper places
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:59 -03:00
Mauro Carvalho Chehab
432aa3b64d V4L/DVB (8393): media/video: Fix depencencies for VIDEOBUF
VIDEOBUF_DVB depends on VIDEOBUF_CORE, not on VIDEOBUF_DMA_SG

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:54 -03:00
Mauro Carvalho Chehab
d4216488c0 V4L/DVB (8392): media/Kconfig: Convert V4L1_COMPAT select into "depends on"
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:49 -03:00
Hans Verkuil
c3fb62bf92 V4L/DVB (8390): videodev: add comment and remove magic number.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:44 -03:00
Brandon Philips
8373a3e512 V4L/DVB (8389): videodev: simplify get_index()
Use Hans Verkuil's suggested method of implementing get_index which doesn't
depend on class_for_each_device and instead uses the video_device array. This
simplifies the code and reduces its memory footprint.

Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:39 -03:00
Hans Verkuil
2bc93aa304 V4L/DVB (8387): Some cosmetic changes
Those changes, together with some proper patches, will allow out-of-tree 
compilation for for kernels < 2.6.19

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:32 -03:00
Hans Verkuil
e3bf20de33 V4L/DVB (8381): ov7670: fix compile warnings
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:27 -03:00
Hans Verkuil
9edd350f51 V4L/DVB (8380): saa7115: use saa7115_auto instead of saa711x as the autodetect driver name.
Having an _auto suffix is less ambiguous than a 'saa711x' identifier.
It's also used like this in the saa7127 driver.

Thanks to Jean Delvare for suggesting this.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:23 -03:00
Jean Delvare
5daed07401 V4L/DVB (8379): saa7127: Make device detection optional
The saa7127 driver supports all of SAA7126, SAA7127, SAA7128 and
SAA1729 devices. Declare all these devices, so that board drivers can
tell which device is present, instead of always relying on
auto-detection (which needs to write to the chip, eek!).

We still need the detection for ivtv, so a special device name
"saa7127_auto" can be used when the caller doesn't know exactly which
device is present.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:17 -03:00
Hans Verkuil
03b52c36a3 V4L/DVB (8378): cx18: move cx18_av_vbi_setup to av-core.c and rename to cx18_av_std_setup
Same issue as for cx25840: this function sets up the standard timings
and has nothing to do with VBI setup.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:12 -03:00
Hans Verkuil
ca130eef2c V4L/DVB (8377): ivtv/cx18: ensure the default control values are correct
For several MPEG controls and the volume control the default as returned
by VIDIOC_QUERYCTRL was incorrect and did not match the actual initial
value.

This is now fixed for cx18 and ivtv.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:07 -03:00
Hans Verkuil
cb5aa1c62d V4L/DVB (8376): cx25840: move cx25840_vbi_setup to core.c and rename to cx25840_std_setup
cx25840_vbi_setup has nothing to do with setting up VBI, but everything
with setting up the standard. Move to cx25840-core.c and rename.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:28:00 -03:00
Hans de Goede
5de39b2b1f V4L/DVB (8374): gspca: No conflict of 0c45:6011 with the sn9c102 driver.
The sn9c102 driver claims to support usb-ID 0x0c45:0x6011, which is
a sn9c102 with ov6650 sensor, but the sn9c102 driver does not support the
ov6650 sensor (tested). Also the sn9c102 driver claims to support usb-ID
0x0c45:0x603f, which is a sn9c102 with CISVF10 sensor, but the sn9c102
driver does not support the CISVF10 sensor (not tested).

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:52 -03:00
Hans de Goede
12ff91264c V4L/DVB (8373): gspca: Hue, saturation and contrast controls added for sn9c10x ovxxxx.
(does not work with ov6650)

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:46 -03:00
Hans de Goede
722103e390 V4L/DVB (8372): gspca: Small ov6650 fixes.
1) Don't change  the red and blue pre-gain's from their defaults
2) Actually make the powerline freq ctrl available to userspace

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:42 -03:00
Jean-Francois Moine
c91256c27b V4L/DVB (8371): gspca: Webcam 08ca:2050 added.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:37 -03:00
Jean-Francois Moine
100f7f2a34 V4L/DVB (8370): gspca: Webcam 0461:0821 added.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:32 -03:00
Jean-Francois Moine
1ff1e48442 V4L/DVB (8369): gspca: Bad initialization of sn9c102 ov7630.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:28 -03:00
Andoni Zubimendi
d87616f5a5 V4L/DVB (8367): gspca: Light frequency filter / exposure / clean-up for sn9c103 ov7630.
Signed-off-by: Andoni Zubimendi <andoni.zubimendi@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:24 -03:00
Hans de Goede
a975a5279e V4L/DVB (8366): gspca: Better code for ov6650 and ov7630.
sonixb:   Common code between ov6650 and ov7630.
          Fix brightness oscillation with ov6650 sensor.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:19 -03:00
Hans de Goede
66f358211d V4L/DVB (8364): gspca: Support of powerline frequency for ov6650.
Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:15 -03:00
Hans de Goede
5c6644f305 V4L/DVB (8363): gspca: Bad image size with spca501.
Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:10 -03:00
Hans de Goede
c36260ee27 V4L/DVB (8362): gspca: Bad offset of the brightness sum in sn9c103 packets.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:05 -03:00
Andoni Zubimendi
b7474cf9f6 V4L/DVB (8361): gspca: Bad check of i2c write to sn9c10x.
Signed-off-by: Andoni Zubimendi <andoni.zubimendi@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:27:01 -03:00
Andoni Zubimendi
794af52a4c V4L/DVB (8360): gspca: Bad initialization of sn9c103 - ov7630.
Signed-off-by: Andoni Zubimendi <andoni.zubimendi@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:26:56 -03:00
Mauro Carvalho Chehab
9a97a2abe4 V4L/DVB (8359): gspca: Adds register aliases for zc03xx registers
Thanks to http://zc0302.sourceforge.net/zc0302.php, we have some hints
about what each zc3xx register means.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
2008-07-20 07:26:49 -03:00
Jean-Francois Moine
568788a771 V4L/DVB (8358): gspca: Better initialization of sn9c120 - ov7660.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:26:43 -03:00
Hans de Goede
f4d520258d V4L/DVB (8357): gspca: Perfect exposure for sn9c10x, sensor ov6650.
Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:26:37 -03:00
Hans de Goede
3647fea840 V4L/DVB (8356): gspca: 352x288 mode fix and source clean-up for Sonix bridges.
sonixb:   Bad initialization of sensor for 352x288 mode.
                (from Hans de Goede)
sonixj:   Clean-up source.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:26:33 -03:00
Hans de Goede
ad5ef80dd7 V4L/DVB (8354): gspca: Better gain for bridge sn9c10x - sensor ov6650.
sonixb:   Better gain for ov6650.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:26:28 -03:00
Andoni Zubimendi
4b972d29bb V4L/DVB (8353): gspca: 640x480 for bridge sn9c103 / sensor ov7630.
sonixb:   640x480 mode for sn9c103 - ov7630.

Signed-off-by: Andoni Zubimendi <andoni.zubimendi@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:26:24 -03:00
Jean-Francois Moine
739570bb21 V4L/DVB (8352): gspca: Buffers for USB exchanges cannot be in the stack.
gspca:    Protect dq_callback() against simultaneous USB exchanges.
          Temporary buffer for USB exchanges added in the device struct.
(all)     Use a temporary buffer for all USB exchanges.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:26:14 -03:00
Jean-Francois Moine
5b77ae7776 V4L/DVB (8350): gspca: Conform to v4l2 spec and mutex unlock fix.
gspca:    Empty the application queues on streamoff ioctl.
          streamon/off and qbuf ioctls may be done by any application.
          Don't handle MJPEG pixel format as JPEG.
                (thanks to Hans de Goede)
          Authorize reqbufs ioctl when streaming.
          Bad mutex unlock in poll() when streaming problem.
                (thanks to Mauro Carvalho Chehab)
          Don't handle 'webcam disconnected' in stream off.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:26:09 -03:00
Andoni Zubimendi
51fc8e3bc0 V4L/DVB (8349): gspca: SN9C103 OV7630 fixes in sonixb.
Signed-off-by: Andoni Zubimendi <andoni.zubimendi@gmail.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:26:04 -03:00
Hans de Goede
dcef3237b6 V4L/DVB (8348): gspca: Add auto gain/exposure to sonixb and tas5110 / ov6650 sensors.
sonixb:   Do auto gain for tas5110 / ov6650 sensors.
pac207:   Move the auto_gain function to gspca.
gspca:    New function gspca_auto_gain_n_exposure().

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:25:59 -03:00
Jean-Francois Moine
d0d0e39bc5 V4L/DVB (8346): gspca: Bad pixel format of bridge VC0321.
vc032x:   Light frequency was not initialized.
          Change the pixel format of bridge VC0321 to V4L2_PIX_FMT_YUV420
              ('YU12').
          Set a bridge to all webcams.

Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:25:54 -03:00
Magnus Damm
326c986207 V4L/DVB (8343): soc_camera_platform: Add SoC Camera Platform driver
This patch adds a simple platform camera device. Useful for testing
cameras with SoC camera host drivers. Only one single pixel format
and resolution combination is supported.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:25:49 -03:00
Magnus Damm
0d3244d643 V4L/DVB (8342): sh_mobile_ceu_camera: Add SuperH Mobile CEU driver V3
This is V3 of the SuperH Mobile CEU soc_camera driver.

The CEU hardware block is configured in a transparent data fetch
mode, frames are captured from the attached camera and written to
physically contiguous memory buffers provided by the newly added
videobuf-dma-contig queue. Tested on sh7722 and sh7723 processors.

 Changes since V2:
 - remove SUPERH Kconfig dependency
 - move sh_mobile_ceu.h to include/media
 - add board callback support with enable_camera()/disable_camera()
 - add support for declare_coherent_memory
 - rework video memory limit
 - more verbose error messages

 Changes since V1:
 - fixed the CEU driver to work with the newly updated patches

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:25:43 -03:00
Magnus Damm
2cc45cf25a V4L/DVB (8341): videobuf: Add physically contiguous queue code V3
This is V3 of the physically contiguous videobuf queues patch.
Useful for hardware such as the SuperH Mobile CEU which doesn't
support scatter gatter bus mastering.

Since it may be difficult to allocate large chunks of physically
contiguous memory after some uptime due to fragmentation, this code
allocates memory using dma_alloc_coherent(). Architectures supporting
dma_declare_coherent_memory() can easily avoid fragmentation issues
by using dma_declare_coherent_memory() to force dma_alloc_coherent()
to allocate from a certain pre-allocated memory area.

 Changes since V2
  - use dma_handle for physical address
  - use "scatter gather" instead of "scatter gatter"

 Changes since V1:
  - use dev_err() instead of pr_err()
  - remember size in struct videobuf_dma_contig_memory
  - keep struct videobuf_dma_contig_memory in .c file
  - let videobuf_to_dma_contig() return dma_addr_t
  - implement __videobuf_sync()
  - return statements, white space and other minor fixes

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:25:37 -03:00
Magnus Damm
5d6aaf50e2 V4L/DVB (8340): videobuf: Fix gather spelling
Use "scatter gather" instead of "scatter gatter".

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:25:32 -03:00
Magnus Damm
a034d1b76b V4L/DVB (8338): soc_camera: Move spinlocks
This patch moves the spinlock handling from soc_camera.c to the actual
camera host driver. The spinlock_alloc/free callbacks are replaced with
code in init_videobuf(). So far all camera host drivers implement their
own spinlock_alloc/free methods anyway, and videobuf_queue_core_init()
BUGs on a NULL spinlock argument, so, new camera host drivers will not
forget to provide a spinlock when initialising their videobuf queues.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:25:21 -03:00
Paulius Zaleckas
092d392119 V4L/DVB (8337): soc_camera: make videobuf independent
Makes SoC camera videobuf independent. Includes all necessary changes for
PXA camera driver (currently the only driver using soc_camera in the mainline).
These changes are important for the future soc_camera based drivers.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:25:17 -03:00
Oliver Endriss
439d0e4250 V4L/DVB (8335): dvb-ttpci: Fix build with CONFIG_INPUT_EVDEV=n (Bug #11042)
Fix build with CONFIG_INPUT_EVDEV=n (Bug #11042).
Thanks to Toralf Frster <toralf.foerster@gmx.de> for reporting.

Thanks-to: Toralf Frster <toralf.foerster@gmx.de>

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:25:12 -03:00
Oliver Endriss
4ee48c4257 V4L/DVB (8334): tda10023: Fix typo in tda10023_attach dummy routine
Fix compiler warning caused by a typo in the tda10023_attach dummy routine.

Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:25:08 -03:00
Andy Walls
02fa272fcb V4L/DVB (8332): cx18: Suport external reset of the Z8F0811 IR controller on HVR-1600 for lirc
cx18: added in cx18_ir_reset_gpio function for lirc_pvr150 like module.  Also
added the ability to reset the IR chip via ioctl like ivtv.  This needs the
mutex to protect gpio_dir and gpio_val in struct cx18 as gpio changes can
come from a few different asynchronous sources now.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:25:03 -03:00
Andy Walls
8abdd00dcc V4L/DVB (8331): cx18: Add locking for struct cx18 GPIO state variables
cx18: Add locking for struct cx18 GPIO state variables in
anticpation of adding IR microcontroller reset support for
use by external IR modules.

Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:24:59 -03:00
Michael Krufky
2c6a37bb07 V4L/DVB (8326): sms1xxx: fix missing #include <linux/types.h>
Fix the build error:

smscoreapi.c:689: error: 'uintptr_t' undeclared

Thanks to Peter Schlaf for reporting this.

Cc: Peter Schlaf <peter.schlaf@web.de>

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:24:53 -03:00
Michael Krufky
f1f74aa2cf V4L/DVB (8322): sms1xxx: fix improper usage of asm/foo.h
Fix the following warnings generated by checkpatch.pl:

WARNING: Use #include <linux/io.h> instead of <asm/io.h>
 251: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:30:
+#include <asm/io.h>

WARNING: Use #include <linux/scatterlist.h> instead of <asm/scatterlist.h>
 1566: FILE: linux/drivers/media/dvb/siano/smscoreapi.h:29:
+#include <asm/scatterlist.h>

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:24:49 -03:00
Hermann Pitton
0b17d0edbc V4L/DVB (8319): saa7134: Add support for analog only ASUSTeK P7131
saa7134: add a separate entry for the ASUSTeK P7131 analog only
         and do some eeprom detection to escape from the TVFM7135
         with the same PCI subsystem on auto detection.

Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:24:45 -03:00
Daniel Drake
cd257a6f4d V4L/DVB (8318): OV7670: don't reject unsupported settings
For VIDIOC_G_FMT/VIDIOC_TRY_FMT, the V4L2 API spec states:
"Drivers should not return an error code unless the input is ambiguous"
"Very simple, inflexible devices may even ignore all input and always
return the default parameters."
"When the requested buffer type is not supported drivers return an
EINVAL error code."
i.e. returning errors for unsupported fields is bad, and it's ok to
unconditionally overwrite user-requested settings

This patch makes ov7670 meet that behaviour, and brings it in line with
other drivers e.g. stk-webcam. It also fixes compatibility with (unpatched)
gstreamer.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:24:41 -03:00
Dean Anderson
3f8d6f73da V4L/DVB (8317): Sensoray 2255 V4l driver checkpatch fixes
This patch fixes some coding style issues.
It also fixes a NULL de-reference on driver unload.
The permissions for the module parameters were changed to 0644.

Signed-off-by: Dean Anderson <dean@sensoray.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:24:32 -03:00
Jean Delvare
91a1d912f6 V4L/DVB (8316): bt819: Fix a debug message
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:24:26 -03:00
Jean Delvare
203c204b39 V4L/DVB (8315): zr36067: Delete dead code
This has been commented out for years, it's about time to get rid of
it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:24:20 -03:00
Michael Krufky
44f71c3fce V4L/DVB (8313): sms1xxx: add support for Hauppauge WinTV-Nova-T-MiniStick
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:24:15 -03:00
Michael Krufky
a745f0a12c V4L/DVB (8312): sms1xxx: add firmware filenames to board properties for stellar and nova
Assign the following firmware filenames:

sms1xxx-stellar-dvbt-01.fw
sms1xxx-nova-a-dvbt-01.fw
sms1xxx-nova-b-dvbt-01.fw

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:24:09 -03:00
Michael Krufky
1fbc3caff4 V4L/DVB (8311): sms1xxx: support device-specific firmware filenames on stellar usb1 sticks
Add the capability to define device-specific firmware filenames for the SMS1010,
with a mechanism to fall back to the generic firmware if the device-specific
firmware is not present.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:24:03 -03:00
Michael Krufky
b1d8f9f5b8 V4L/DVB (8310): sms1xxx: remove kmutex_t typedef
remove typedef struct mutex kmutex_t
fix one line > 80 columns

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:23:58 -03:00
Michael Krufky
4411d29165 V4L/DVB (8309): sms1xxx: fix OOPS on 64 bit kernels due to a bad cast
Fix the following build warning:

smscoreapi.c: In function 'smscore_detect_mode':
smscoreapi.c:689: warning: cast from pointer to integer of different size
smscoreapi.c:689: warning: cast to pointer from integer of different size
smscoreapi.c: In function 'smscore_set_device_mode':
smscoreapi.c:820: warning: cast from pointer to integer of different size
smscoreapi.c:820: warning: cast to pointer from integer of different size

...and fix the following OOPS on 64bit kernels:

[  717.263667] usb 6-4: new high speed USB device using ehci_hcd and address 2
[  717.396386] usb 6-4: configuration #1 chosen from 1 choice
[  717.473650] Unable to handle kernel paging request at 0000000000c02000 RIP:
[  717.473657]  [<ffffffff88db9edc>] :sms1xxx:smscore_set_device_mode+0x22c/0x4a0
[  717.473669] PGD 3c6f7067 PUD 3d484067 PMD 0
[  717.473674] Oops: 0002 [1] SMP
[  717.473678] CPU 0
[Modules linked in snipped]
[  717.473773] Pid: 8380, comm: modprobe Tainted: P        2.6.24-16-generic #1
[  717.473776] RIP: 0010:[<ffffffff88db9edc>]  [<ffffffff88db9edc>] :sms1xxx:smscore_set_device_mode+0x22c/0x4a0
[  717.473784] RSP: 0018:ffff81003d495ba8  EFLAGS: 00010206
[  717.473786] RAX: ffff81003d8cd8d0 RBX: ffff81003d8cd800 RCX: ffff81003d8cd8d0
[  717.473788] RDX: 0000000000000008 RSI: ffff81003f080070 RDI: ffff81003d8cd800
[  717.473791] RBP: 0000000000000004 R08: ffff81003ec0104b R09: ffffffffffffffff
[  717.473793] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000c02000
[  717.473796] R13: 00000000fffffff4 R14: ffff810000c02000 R15: ffff81003d8cd878
[  717.473799] FS:  00007f70a680f6e0(0000) GS:ffffffff805b0000(0000) knlGS:0000000000000000
[  717.473801] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  717.473804] CR2: 0000000000c02000 CR3: 000000003c68b000 CR4: 00000000000006e0
[  717.473806] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  717.473809] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[  717.473812] Process modprobe (pid: 8380, threadinfo ffff81003d494000, task ffff81003d2fc000)
[  717.473814] Stack:  ffff81003d8cd800 ffff81003d8cd800 0000000000000000 ffff81003c6d8000
[  717.473820]  ffff81003dcac800 0000000000000008 ffffc20000787bb0 ffffffff88dba16c
[  717.473825]  ffff81003dcac800 000000000000000a 0000000000000000 ffffffff88dbb2fa
[  717.473829] Call Trace:
[  717.473866]  [<ffffffff88dba16c>] :sms1xxx:smscore_start_device+0x1c/0xb0
[  717.473885]  [<ffffffff88dbb2fa>] :sms1xxx:smsusb_probe+0x29a/0x670
[  717.473929]  [<ffffffff88dbaca0>] :sms1xxx:smsusb_sendrequest+0x0/0x30
[  717.473965]  [<ffffffff804614d9>] mutex_lock+0x9/0x20
[  717.473998]  [<ffffffff8806c42e>] :usbcore:usb_autopm_do_device+0x8e/0x130
[  717.474040]  [<ffffffff8806d33a>] :usbcore:usb_probe_interface+0xda/0x160
[  717.474067]  [<ffffffff803b9f4c>] driver_probe_device+0x9c/0x1b0
[  717.474091]  [<ffffffff803ba219>] __driver_attach+0xc9/0xd0
[  717.474107]  [<ffffffff803ba150>] __driver_attach+0x0/0xd0
[  717.474115]  [<ffffffff803b918d>] bus_for_each_dev+0x4d/0x80
[  717.474156]  [<ffffffff803b959c>] bus_add_driver+0xac/0x220
[  717.474203]  [<ffffffff8806cde9>] :usbcore:usb_register_driver+0xa9/0x120
[  717.474232]  [<ffffffff88dbb00b>] :sms1xxx:smsusb_register+0x1b/0x70
[  717.474243]  [<ffffffff88dba50c>] :sms1xxx:smscore_module_init+0x7c/0xb0
[  717.474253]  [<ffffffff80263b6e>] sys_init_module+0x18e/0x1a90
[  717.474426]  [<ffffffff8020c37e>] system_call+0x7e/0x83
[  717.474490]
[  717.474491]
[  717.474492] Code: 66 41 c7 04 24 9c 02 41 c6 44 24 02 00 4c 89 e6 41 c6 44 24
[  717.474506] RIP  [<ffffffff88db9edc>] :sms1xxx:smscore_set_device_mode+0x22c/0x4a0
[  717.474513]  RSP <ffff81003d495ba8>
[  717.474515] CR2: 0000000000c02000
[  717.474521] ---[ end trace 52d9c6f207be106a ]---

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:23:52 -03:00
Michael Krufky
14a638cd3b V4L/DVB (8308): sms1xxx: Provide option to support Siano default usb ids
Provide an option to enable / disable support for Siano's default usb ids.

This allows the support for Siano's USB IDs to be disabled, so that Siano's
external driver can be used, instead.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:23:47 -03:00
Michael Krufky
eb383bddc5 V4L/DVB (8307): sms1xxx: change smsusb_driver.name to sms1xxx
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:23:43 -03:00
Michael Krufky
5068b7a449 V4L/DVB (8306): sms1xxx: log firmware download process by default
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:23:38 -03:00
Michael Krufky
0f2a1ee112 V4L/DVB (8305): sms1xxx: fix warning: format '%d' expects type 'int', but argument x has type 'size_t'
Fix the following 64bit build warning:

make[2]: Entering directory `/usr/src/linux-headers-2.6.24-16-generic'
  CC [M]  smscoreapi.o
smscoreapi.c: In function 'smscore_load_firmware_from_file':
smscoreapi.c:604: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'
  CC [M]  smsusb.o
smsusb.c: In function 'smsusb1_load_firmware':
smsusb.c:216: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
smsusb.c:223: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:23:34 -03:00
Michael Krufky
8f37356b06 V4L/DVB (8303): sms1xxx: update MODULE_DESCRIPTION
set MODULE_DESCRIPTION to "Driver for the Siano SMS1XXX USB dongle"

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:23:30 -03:00
Michael Krufky
cf1cfe1ba7 V4L/DVB (8302): sms1xxx: fix Siano board names
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:23:25 -03:00
Michael Krufky
02aea4fb64 V4L/DVB (8301): sms1xxx: add capability to define device-specific firmware filenames
Add the capability to define device-specific firmware filenames for the SMS1150,
with a mechanism to fall back to the generic firmware if the device-specific
firmware is not present.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:23:20 -03:00
Michael Krufky
2708e888c5 V4L/DVB (8300): sms1xxx: simplify smsusb_init_device switch..case block
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:23:15 -03:00
Michael Krufky
0c071f374f V4L/DVB (8299): sms1xxx: mark functions static
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:23:10 -03:00
Michael Krufky
c65c7a652f V4L/DVB (8298): sms1xxx: remove redundant __func__ in sms_err macro
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:22:59 -03:00
Michael Krufky
2522dc1324 V4L/DVB (8297): sms1xxx: remove old printk macros
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:22:53 -03:00
Michael Krufky
eb250942fe V4L/DVB (8296): sms1xxx: always show error messages
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:22:48 -03:00
Michael Krufky
f14d56a99b V4L/DVB (8295): sms1xxx: add debug module option, to enable debug messages
All dmesg spam turned off by default, for now.  Values for debug:

(info=1, adv=2 (or-able)

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:22:42 -03:00
Michael Krufky
a0c0abcb1f V4L/DVB (8294): sms1xxx: move message formatting into printk macros
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:22:37 -03:00
Michael Krufky
068d6c0f5d V4L/DVB (8293): sms1xxx: create printk macros
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:22:31 -03:00
Michael Krufky
1c11d546b6 V4L/DVB (8292): sms1xxx: add code to allow device-specific functionality
Set board ID in the usb_device_id table's driver_info field.
Use board name when registering the dvb adapter.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:22:27 -03:00
Michael Krufky
dd5b2a5c2a V4L/DVB (8291): sms1xxx: change default_mode to 4
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:22:22 -03:00
Michael Krufky
d3e72fe75e V4L/DVB (8290): sms1xxx: small cleanup
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:22:17 -03:00
Michael Krufky
df0462e77e V4L/DVB (8289): sms1xxx: remove #if LINUX_VERSION_CODE checks
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:22:12 -03:00
Michael Krufky
fbd05c8213 V4L/DVB (8288): sms1xxx: more cleanups
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:22:07 -03:00
Michael Krufky
e080842c6c V4L/DVB (8287): sms1xxx: fix WARNING: unnecessary cast may hide bugs
fix the following checkpatch.pl warning:

WARNING: unnecessary cast may hide bugs,
see http://c-faq.com/malloc/mallocnocast.html

596: FILE: linux/drivers/media/dvb/siano/smscoreapi.c:540:
+	msg = (struct SmsMsgHdr_ST *) kmalloc(PAGE_SIZE, GFP_KERNEL | GFP_DMA);

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:22:03 -03:00
Michael Krufky
18245e18ee V4L/DVB (8286): sms1xxx: remove typedefs
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:21:59 -03:00
Michael Krufky
ca78373687 V4L/DVB (8285): sms1xxx: more 80-column cleanups
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:21:54 -03:00
Michael Krufky
9f2113975a V4L/DVB (8284): sms1xxx: fix WARNING: printk() should include KERN_ facility level
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:21:44 -03:00
Michael Krufky
59bf6b8e85 V4L/DVB (8283): sms1xxx: 80-column cleanups
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:21:40 -03:00
Michael Krufky
fa830e8a01 V4L/DVB (8282): sms1xxx: more codingstyle cleanups
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:21:35 -03:00