Archived
14
0
Fork 0
Commit graph

92974 commits

Author SHA1 Message Date
Mark Lord
352fab701c sata_mv more cosmetics
More cosmetic cleanups prior to the interrupt/error handling logic changes.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-25 01:11:40 -04:00
Dan McGee
01ce2601e4 ata_piix: add Asus Eee 701 controller to short cable list
The drive is directly soldered to the controller, so there is no cable at
all. Remove the 40-wire assumption so the drive can operate at max speed.

Before patch:
$ dd if=/dev/sda of=/dev/null bs=2M count=64 iflag=direct
134217728 bytes (134 MB) copied, 5.29612 s, 25.3 MB/s

After patch:
$ dd if=/dev/sda of=/dev/null bs=2M count=64 iflag=direct
134217728 bytes (134 MB) copied, 3.94955 s, 34.0 MB/s

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-25 01:11:39 -04:00
Mark Lord
a6116c9e60 libata-eh set tf flags in NCQ EH result_tf
Fix mis-reporting of NCQ errors by ensuring that result_tf->flags
is properly initialized in libata-eh.  This allows ata_gen_ata_sense()
to report the failed block number correctly to SCSI after a media error
during NCQ.

This patch may also be a candidate for backporting to earlier kernels.
Without this fix, SCSI will fail I/O on the entire request rather
than just the bad sector.  That can be bad for a request that was
merged from many independent read reads from different tasks.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-25 01:11:37 -04:00
Adrian Bunk
1dc55e8761 make sata_set_spd_needed() static
sata_set_spd_needed() can now become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-25 00:46:11 -04:00
Adrian Bunk
6bdb4fc9f9 make sata_print_link_status() static
sata_print_link_status() can now become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-25 00:46:09 -04:00
Adrian Bunk
66a9099e02 libata-acpi.c: remove unneeded #if's
These #if's are unneeded since they:
- did anyway not handle the CONFIG_ACPI_DOCK_MODULE case correctly and
- this is already handled in include/acpi/acpi_drivers.h and
- it's now correctly handled in kconfig.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-25 00:45:52 -04:00
Tejun Heo
a0b9f4bc1e sata_nv: make hardreset return -EAGAIN on success
sata_nv hardreset can't classify but was left out while unifying
follow-up SRST request mechanism[1].  This caused detection failures
on those controllers.  Fix it.

Reported and bisected by Roland Dreier, Petr Vandrovec and Marc
Dionne.  Thanks guys.

[1] 305d2a1ab1

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Roland Dreier <rdreier@cisco.com>
Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
Cc: Marc Dionne <marc.c.dionne@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-25 00:45:48 -04:00
Tejun Heo
15fe982e42 ahci: retry enabling AHCI a few times before spitting out WARN_ON()
Some chips need AHCI_EN set more than once to actually set it.  Try a
few times before giving up and spitting out WARN_ON().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Peer Chen <pchen@nvidia.com>
Cc: Volker Armin Hemmann <volker.armin.hemmann@tu-clausthal.de>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-25 00:45:13 -04:00
Tejun Heo
411cb3869a libata: make WARN_ON conditions in ata_sff_hsm_move() more strict
WARN_ON()'s in ata_hsm_move() was too liberal and got triggerred when
it shouldn't (e.g. hotplug events at the right moment).  As the HSM
only deals with device errors and state machine violations, make it
check only against them.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Mark Lord <liml@rtr.ca>
Cc: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-25 00:45:09 -04:00
Kay Sievers
458622fcdc ATA/IDE: fix platform driver hotplug/coldplug
Since 43cc71eed1, the platform modalias
is prefixed with "platform:".  Add MODULE_ALIAS() to the hotpluggable
ATA and IDE platform drivers, to re-enable auto loading.

NOTE: both ata/pata_platform.c and ide/legacy/ide_platform.c claim
to provide "the" platform_pata driver, and there's no build-time
mutual exclusion mechanism.  This means that configs which enable
both drivers will make some trouble when hotplugging...

[dbrownell@users.sourceforge.net: more drivers, registration fixes]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Tejun Heo <htejun@gmail.com>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-25 00:45:04 -04:00
Tejun Heo
8e5443a098 sata_sis: SCR accessors return -EINVAL when requested SCR isn't available
sis_scr_cfg_read() can't access SError and was incorrectly returning
-1 instead of -EINVAL.  This went unnoticed because SError used to be
cleared in @postreset() and it didn't care about how scr_read() failed
but commit ac371987 moved SError clearing into sata_link_resume() and
SCR access failure other than -EINVAL is considered an error condition
and exposes the incorrect return value bug as detection failure.  Fix
it.

Also, scsi_scr_cfg_write() was incorrectly returning 0 after it
ignored the request to write to SError.  Make it also return -EINVAL.

This was bisected and reported by Patrick McHardy.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-24 23:42:47 -04:00
Harvey Harrison
2b4221bb54 libata: functions with definition should not be extern
Noticed by sparse
drivers/ata/libata-core.c:3380:12: warning: function 'ata_wait_after_reset' with external linkage has definition

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-24 23:42:26 -04:00
Linus Torvalds
b69d3987f4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-fixes
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-fixes:
  "make namespacecheck" fixes
  x86: fix compilation error in VisWS
  x86: voyager fix
  x86: Drop duplicate from setup.c
  intel-iommu.c: dma ops fix
2008-04-24 14:41:20 -07:00
Ingo Molnar
a4928cffe6 "make namespacecheck" fixes
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-24 23:15:44 +02:00
Alexey Starikovskiy
f8dc5a186c x86: fix compilation error in VisWS
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-24 23:15:44 +02:00
Ingo Molnar
fcbc04c0ab x86: voyager fix
Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-24 23:15:43 +02:00
Alexey Starikovskiy
4d33bdb768 x86: Drop duplicate from setup.c
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-24 23:15:43 +02:00
Ingo Molnar
6865f0d193 intel-iommu.c: dma ops fix
Stephen Rothwell noticed that:

Commit 2be621498d ("x86: dma-ops on highmem
fix") in Linus' tree introduced a new warning (noticed in the x86_64
allmodconfig build of linux-next):

drivers/pci/intel-iommu.c:2240: warning: initialization from incompatible pointer type

Which points at an instance of map_single that needs updating.

Fix it to the new prototype.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-24 23:15:43 +02:00
Linus Torvalds
57675e6e75 Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
  [CIFS] Fix typo in previous commit
  [CIFS] Fix define for new proxy cap to match documentation
  [CIFS] Fix UNC path prefix on QueryUnixPathInfo to have correct slash
  [CIFS] Reserve new proxy cap for WAFS
  [CIFS] Add various missing flags and defintions
  [CIFS] make cifs_dfs_automount_list_static
  [CIFS] Fix oops when slow oplock process races with unmount
  [CIFS] Fix acl length when very short ACL being modified by chmod
  [CIFS] Fix looping on reconnect to Samba when unexpected tree connect fail on reconnect
  [CIFS] minor update to change log
2008-04-24 13:47:31 -07:00
David Howells
02f3705068 RxRPC: Fix a regression in the RXKAD security module
Fix a regression in the RXKAD security module introduced in:

	commit 91e916cffe
	Author: Al Viro <viro@ftp.linux.org.uk>
	Date:   Sat Mar 29 03:08:38 2008 +0000

	net/rxrpc trivial annotations

A variable was declared as a 16-bit type rather than a 32-bit type.

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-with-apologies-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-of-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-24 13:46:53 -07:00
Sebastian Siewior
f764e51421 Remove -numa from EXTRAVERSION
This snuck in through 919ee677b6
("[SPARC64]: Add NUMA support")

Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-24 12:38:04 -07:00
Linus Torvalds
563307b2fa Merge git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (80 commits)
  SUNRPC: Invalidate the RPCSEC_GSS session if the server dropped the request
  make nfs_automount_list static
  NFS: remove duplicate flags assignment from nfs_validate_mount_data
  NFS - fix potential NULL pointer dereference v2
  SUNRPC: Don't change the RPCSEC_GSS context on a credential that is in use
  SUNRPC: Fix a race in gss_refresh_upcall()
  SUNRPC: Don't disconnect more than once if retransmitting NFSv4 requests
  SUNRPC: Remove the unused export of xprt_force_disconnect
  SUNRPC: remove XS_SENDMSG_RETRY
  SUNRPC: Protect creds against early garbage collection
  NFSv4: Attempt to use machine credentials in SETCLIENTID calls
  NFSv4: Reintroduce machine creds
  NFSv4: Don't use cred->cr_ops->cr_name in nfs4_proc_setclientid()
  nfs: fix printout of multiword bitfields
  nfs: return negative error value from nfs{,4}_stat_to_errno
  NLM/lockd: Ensure client locking calls use correct credentials
  NFS: Remove the buggy lock-if-signalled case from do_setlk()
  NLM/lockd: Fix a race when cancelling a blocking lock
  NLM/lockd: Ensure that nlmclnt_cancel() returns results of the CANCEL call
  NLM: Remove the signal masking in nlmclnt_proc/nlmclnt_cancel
  ...
2008-04-24 11:46:16 -07:00
Linus Torvalds
10c993a6b5 Merge branch 'for-linus' of git://linux-nfs.org/~bfields/linux
* 'for-linus' of git://linux-nfs.org/~bfields/linux: (52 commits)
  knfsd: clear both setuid and setgid whenever a chown is done
  knfsd: get rid of imode variable in nfsd_setattr
  SUNRPC: Use unsigned loop and array index in svc_init_buffer()
  SUNRPC: Use unsigned index when looping over arrays
  SUNRPC: Update RPC server's TCP record marker decoder
  SUNRPC: RPC server still uses 2.4 method for disabling TCP Nagle
  NLM: don't let lockd exit on unexpected svc_recv errors (try #2)
  NFS: don't let nfs_callback_svc exit on unexpected svc_recv errors (try #2)
  Use a zero sized array for raw field in struct fid
  nfsd: use static memory for callback program and stats
  SUNRPC: remove svc_create_thread()
  nfsd: fix comment
  lockd: Fix stale nlmsvc_unlink_block comment
  NFSD: Strip __KERNEL__ testing from unexported header files.
  sunrpc: make token header values less confusing
  gss_krb5: consistently use unsigned for seqnum
  NFSD: Remove NFSv4 dependency on NFSv3
  SUNRPC: Remove PROC_FS dependency
  NFSD: Use "depends on" for PROC_FS dependency
  nfsd: move most of fh_verify to separate function
  ...
2008-04-24 11:45:00 -07:00
Linus Torvalds
c328d54cd4 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: (452 commits)
  V4L/DVB (7731): tuner-xc2028: fix signal strength calculus
  V4L/DVB (7730): tuner-xc2028: Fix SCODE load for MTS firmwares
  V4L/DVB (7729): Fix VIDIOCGAP corruption in ivtv
  V4L/DVB (7728): tea5761: bugzilla #10462: tea5761 autodetection code were broken
  V4L/DVB (7726): cx23885: Enable cx23417 support on the HVR1800
  V4L/DVB (7725): cx23885: Add generic cx23417 hardware encoder support
  V4L/DVB (7723): pvrusb2: Clean up input selection list generation in V4L interface
  V4L/DVB (7722): pvrusb2: Implement FM radio support for Gotview USB2.0 DVD 2
  V4L/DVB (7721): pvrusb2: Restructure cx23416 firmware loading to have a common exit point
  V4L/DVB (7720): pvrusb2: Fix bad error code on cx23416 firmware load failure
  V4L/DVB (7719): pvrusb2: Implement input selection enforcement
  V4L/DVB (7718): pvrusb2-dvb: update Kbuild selections
  V4L/DVB (7717): pvrusb2-dvb: add DVB-T support for Hauppauge pvrusb2 model 73xxx
  V4L/DVB (7716): pvrusb2: clean up global functions
  V4L/DVB (7715): pvrusb2: Clean out all use of __FUNCTION__
  V4L/DVB (7714): pvrusb2: Fix hang on module removal
  V4L/DVB (7713): pvrusb2: Implement cleaner DVB kernel thread shutdown
  V4L/DVB (7712): pvrusb2: Close connect/disconnect race
  V4L/DVB (7711): pvrusb2: Fix race on module unload
  V4L/DVB (7710): pvrusb2: Implement critical digital streaming quirk for onair devices
  ...
2008-04-24 11:21:08 -07:00
Trond Myklebust
233607dbbc Merge branch 'devel' 2008-04-24 14:01:02 -04:00
Trond Myklebust
b48633bd08 SUNRPC: Invalidate the RPCSEC_GSS session if the server dropped the request
RFC 2203 requires the server to drop the request if it believes the
RPCSEC_GSS context is out of sequence. The problem is that we have no way
on the client to know why the server dropped the request. In order to avoid
spinning forever trying to resend the request, the safe approach is
therefore to always invalidate the RPCSEC_GSS context on every major
timeout.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2008-04-24 13:53:46 -04:00
Mauro Carvalho Chehab
b0166ab3a6 V4L/DVB (7731): tuner-xc2028: fix signal strength calculus
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:50 -03:00
Mauro Carvalho Chehab
c21f1e2e39 V4L/DVB (7730): tuner-xc2028: Fix SCODE load for MTS firmwares
There are different tables for MTS firmwares. This should be taken into
account while selecting the proper firmware.

While at tuner-xc2028.h, improve some comments.

Thanks to Edward J. Sheldrake <ejs1920@yahoo.co.uk> for helping to
diagnose such troubles with PAL/I standard.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:50 -03:00
Alan Cox
d2b213f7b7 V4L/DVB (7729): Fix VIDIOCGAP corruption in ivtv
Frank Bennett reported that ivtv was causing skype to crash. With help
from one of their developers he showed it was a kernel problem.
VIDIOCGCAP copies a name into a fixed length buffer - ivtv uses names
that are too long and does not truncate them so corrupts a few bytes of
the app data area.

Possibly the names also want trimming but for now this should fix the
corruption case.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:50 -03:00
Mauro Carvalho Chehab
867e835f4d V4L/DVB (7728): tea5761: bugzilla #10462: tea5761 autodetection code were broken
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:50 -03:00
Steven Toth
a589b66546 V4L/DVB (7726): cx23885: Enable cx23417 support on the HVR1800
cx23885: Enable cx23417 support on the HVR1800

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:50 -03:00
Steven Toth
b1b81f1db7 V4L/DVB (7725): cx23885: Add generic cx23417 hardware encoder support
cx23885: Add generic cx23417 hardware encoder support.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:50 -03:00
Mike Isely
e57b1c8006 V4L/DVB (7723): pvrusb2: Clean up input selection list generation in V4L interface
Change how list of possible pvrusb2 inputs is generated to include
only those interfaces that make sense for the interface instance.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:49 -03:00
Mike Isely
1df59f0b90 V4L/DVB (7722): pvrusb2: Implement FM radio support for Gotview USB2.0 DVD 2
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:49 -03:00
Mike Isely
21684ba921 V4L/DVB (7721): pvrusb2: Restructure cx23416 firmware loading to have a common exit point
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:49 -03:00
Mike Isely
17a7b6642d V4L/DVB (7720): pvrusb2: Fix bad error code on cx23416 firmware load failure
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:49 -03:00
Mike Isely
1cb03b76d0 V4L/DVB (7719): pvrusb2: Implement input selection enforcement
In the pvrusb2 driver, different interfaces (e.g. V4L, DVB) have

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:49 -03:00
Michael Krufky
d3f8d8fb30 V4L/DVB (7718): pvrusb2-dvb: update Kbuild selections
These changes are required with the addition of digital television support
for the Hauppauge HVR1900 & HVR1950, the OnAir Creator and Sasem USB HDTV

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:49 -03:00
Michael Krufky
95814bc2b7 V4L/DVB (7717): pvrusb2-dvb: add DVB-T support for Hauppauge pvrusb2 model 73xxx
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:49 -03:00
Adrian Bunk
f55a871241 V4L/DVB (7716): pvrusb2: clean up global functions
This patch contains the following cleanups:
- make the following needlessly global function static:
  - pvr2_hdw_set_cur_freq()
- #if 0 the following unused global functions:
  - pvr2_hdw_get_state_name()
  - pvr2_hdw_get_debug_info_unlocked()
  - pvr2_hdw_get_debug_info_locked()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:49 -03:00
Mike Isely
49844c291a V4L/DVB (7715): pvrusb2: Clean out all use of __FUNCTION__
Apparently the kernel developers no longer consider it proper
etiquette to use __FUNCTION__; everyone must instead use __func__
(even though it breaks with older compilers).  And worse still, actual
effort is being expended to sweep this change throughout the kernel
source tree.  Don't these people have better things to do?  So...
Completely clean out all use of __FUNCTION__ from the pvrusb2 driver
(it was just in the sysfs interface).  I'm not going to use __func__
either.  So there.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:49 -03:00
Mike Isely
18ecbb4771 V4L/DVB (7714): pvrusb2: Fix hang on module removal
The pvrusb2 driver was getting had by this scenario:

1. Task A calls kthread_stop() for task B.
2. Before exiting, then Task B calls kthread_stop() for task C.

The problem is, kthread_stop() wants to allocate an internal resource
to itself (i.e. acquire a lock), which won't be released until
kthread_stop() returns.  But kthread_stop() won't return until task B
is dead.  But task B won't die until it finishes its call to
kthread_stop() for task C, and that will block waiting on the resource
already allocated inside task A.  Deadlock.

With the pvrusb2 driver, task A is the caller to pvr_exit(), task B is
the control thread run inside of pvrusb2-context.c, and task C is any
worker thread run inside of pvrusb2-hdw.c.

This problem got introduced by the previous threading setup change,
which was itself an attempt to fix a module tear-down race (which it
actually did fix).  The lesson here is that a task being waited on as
part of a kthread_stop() simply cannot be allow to also issue a
kthread_stop() - or we make sure not to issue the enclosing
kthread_stop() until we know that the inner kthread_stop() has
completed first.  The solution for the pvrusb2 driver is some hackish
code which changes the main control thread tear down into a two step
process.  This then makes it possible to delay issuing the
kthread_stop() on the control thread until after we know that
everything has been torn down first.  (And yes, we really need that
kthread_stop() because it's the only way to safely guarantee that a
module-referencing kernel thread has safely returned back out of the
module before we finally remove the module.)

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:49 -03:00
Mike Isely
13e027a8bf V4L/DVB (7713): pvrusb2: Implement cleaner DVB kernel thread shutdown
Earlier fix to handle DVB feed thread aborts was overly-aggressive.
We can take better advantage of what kthread_stop() can do.  This
change simplifies things.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:49 -03:00
Mike Isely
97f26ff604 V4L/DVB (7712): pvrusb2: Close connect/disconnect race
If a disconnect happens before initialization is completed, the
pvrusb2 driver can accidentally touch dangling pointers.  The whole
initialization function must be protected by the big_lock, and once
inside that lock, the initialization function should abort if it is
discovered that a disconnect has already taken place.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:48 -03:00
Mike Isely
e5be15c638 V4L/DVB (7711): pvrusb2: Fix race on module unload
The pvrusb2 driver - for basically forever - was not enforcing a
proper module tear-down.  Kernel threads are used inside the driver
and all must be gone before the module can be safely removed.  This
changeset reimplements a chunk of pvrusb2-context.c to enforce this
correctly.  Unfortunately this is not a simple fix.  The new
implementation also cuts back on kernel thread usage; instead of there
being 1 control thread per instance now it's just 1 control thread
shared by all instances.  (By dropping to a single thread then the
module exit function can block on its shutdown and the thread itself
can monitor and cleanly shut down all of the other instances first.)

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:48 -03:00
Mike Isely
d913d63030 V4L/DVB (7710): pvrusb2: Implement critical digital streaming quirk for onair devices
Implement timed measurement of encoder operation for the first time it
is run.  This allows the driver to note when the encoder has been run
successfully for at least 1/4 second.  On top of that implement
various bits to ensure that the encoder has been run once before
digital streaming for OnAir devices.  This is done via several core
state machine tweaks.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:48 -03:00
Mike Isely
72998b7109 V4L/DVB (7709): pvrusb2: New device attribute for encoder usage in digital mode
Some tuners seem to not work in digital mode unless the encoder is
healthy.  Implement a device attribute to represent this flag and
modify the core state machines to enforce this requirement.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:48 -03:00
Mike Isely
07b80264c3 V4L/DVB (7708): pvrusb2-dvb: Fix stuck thread on streaming abort
If the device fails to stream, the feed thread will block forever
waiting for buffers.  But while in this state it was not looking for
an exit condition from the driver DVB interface.  This caused the
thread to jam.  Implement a new stop flag (which will be set
appropriately) to tell the thread to stop.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:48 -03:00
Michael Krufky
087886eb11 V4L/DVB (7707): pvrusb2-dvb: add atsc/qam support for Hauppauge pvrusb2 model 750xx
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:48 -03:00
Michael Krufky
c881284151 V4L/DVB (7706): pvrusb2: create a separate pvr2_device_desc structure for 751xx models
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:09:48 -03:00