]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
16 years agoIB/ipath: Convert from .nopage to .fault
Nick Piggin [Thu, 13 Dec 2007 23:58:57 +0000 (15:58 -0800)]
IB/ipath: Convert from .nopage to .fault

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Add the work completion error code to the QP error debug output
Ralph Campbell [Sat, 3 Nov 2007 00:40:36 +0000 (17:40 -0700)]
IB/ipath: Add the work completion error code to the QP error debug output

Add the work completion error code to the QP error debug output.
This makes it easier to determine the cause of the error.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Better comment for rmb() in ipath_intr()
Arthur Jones [Thu, 18 Oct 2007 01:18:29 +0000 (18:18 -0700)]
IB/ipath: Better comment for rmb() in ipath_intr()

An internal code review found the comment here lacking -- update it with
more specifics of how and why the rmb() is there.

Signed-off-by: Arthur Jones <arthur.jones@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Fix comments for ipath_create_srq()
Ralph Campbell [Tue, 27 Nov 2007 07:44:15 +0000 (23:44 -0800)]
IB/ipath: Fix comments for ipath_create_srq()

During a code review, someone noticed the comments didn't match the code.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Fix error returned from ib_resize_cq if new size smaller than # entries
Ralph Campbell [Fri, 9 Nov 2007 03:53:01 +0000 (19:53 -0800)]
IB/ipath: Fix error returned from ib_resize_cq if new size smaller than # entries

The gen2_basic tests check for the errno value when a CQ is resized
smaller than the number of outstanding completions queue on the CQ.
This patch changes ib_ipath to return EINVAL which is what ib_mthca
returns and what gen2_basic expects.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Fix sendctrl locking
John Gregor [Wed, 5 Sep 2007 08:57:14 +0000 (01:57 -0700)]
IB/ipath: Fix sendctrl locking

Code review pointed out that the locking around uses of ipath_sendctrl
and kr_sendctrl were, in several places, incorrect and/or inconsistent.

Signed-off-by: John Gregor <john.gregor@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Remove dead code for user process waiting for send buffer
Ralph Campbell [Sat, 13 Oct 2007 03:48:06 +0000 (20:48 -0700)]
IB/ipath: Remove dead code for user process waiting for send buffer

At one point in time there was code to allow a user process to
wait for a send buffer if none were available. This feature was
never used and most of the code was removed. This removes
some missed unused code.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoRDMA/cxgb3: Support version 5.0 firmware
Steve Wise [Mon, 26 Nov 2007 17:28:46 +0000 (11:28 -0600)]
RDMA/cxgb3: Support version 5.0 firmware

The 5.0 firmware now supports translating sgls in recv work requests,
so remove the host driver logic currently doing the translation.

Note: this change requires 5.0 firmware.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoRDMA/cxgb3: Hold rtnl_lock() around ethtool get_drvinfo call
Steve Wise [Mon, 26 Nov 2007 17:28:44 +0000 (11:28 -0600)]
RDMA/cxgb3: Hold rtnl_lock() around ethtool get_drvinfo call

Currently the call into cxgb3 to get the driver info is not serialized.
The iw_cxgb3 module needs to hold the rtnl_lock around the ethtool ops
call like dev_ioctl() does.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agodrivers/infiniband: Add missing "space"
Joe Perches [Tue, 20 Nov 2007 01:48:11 +0000 (17:48 -0800)]
drivers/infiniband: Add missing "space"

Add missing spaces in the middle of format strings.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Convert ipath_eep_sem semaphore to a mutex
Matthias Kaehlcke [Thu, 15 Nov 2007 23:23:25 +0000 (15:23 -0800)]
IB/ipath: Convert ipath_eep_sem semaphore to a mutex

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Acked-by: Michael Albaugh <Michael.Albaugh@qlogic.com>
Tested-by: Arthur Jones <arthur.jones@qlogic.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/mad: Enable loopback of DR SMP responses from userspace
Steve Welch [Tue, 23 Oct 2007 22:06:10 +0000 (15:06 -0700)]
IB/mad: Enable loopback of DR SMP responses from userspace

The local loopback of an outgoing DR SMP response is limited to those
that originate at the driver specific SMA implementation during the
driver specific process_mad() function.  This patch enables a
returning DR SMP originating in userspace (or elsewhere) to be
delivered to the local managment stack.  In this specific case the
driver process_mad() function does not consume or process the MAD, so
a reponse mad has not be created and the original MAD must manually be
copied to the MAD buffer that is to be handed off to the local agent.

Signed-off-by: Steve Welch <swelch@systemfabricworks.com>
Acked-by: Hal Rosenstock <hal@xsigo.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Enable loopback of DR SMP responses from userspace
Ralph Campbell [Tue, 23 Oct 2007 22:07:41 +0000 (15:07 -0700)]
IB/ipath: Enable loopback of DR SMP responses from userspace

This patch is in response to reviewing a patch to the core MAD
processing which fixes loopback of directed route packets to/from user
level MAD agents.  This change enables the core code to work for
ib_ipath by fixing the return code from the ipath process_mad method.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/mad: Remove redundant NULL pointer check in ib_mad_recv_done_handler()
Ralph Campbell [Tue, 23 Oct 2007 22:04:15 +0000 (15:04 -0700)]
IB/mad: Remove redundant NULL pointer check in ib_mad_recv_done_handler()

In ib_mad_recv_done_handler(), the response pointer is checked for
NULL after allocating it.  It is then checked again in the local
process_mad() path but there is no possibility of it changing in
between.

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Acked-by: Hal Rosenstock <hal@xsigo.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoRDMA/iwcm: Set initiator depth and responder resources to device max values
Steve Wise [Mon, 29 Oct 2007 16:34:05 +0000 (11:34 -0500)]
RDMA/iwcm: Set initiator depth and responder resources to device max values

Set the initiator depth and responder resources to the device max
values for new connect request events in the iWARP connection manager.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Improve interrupt handler cache footprint
Dave Olson [Wed, 10 Oct 2007 12:10:35 +0000 (05:10 -0700)]
IB/ipath: Improve interrupt handler cache footprint

Improve interrupt handler cache footprint by noinline'ing error
functions that are rarely called.

Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIPoIB/cm: Add connected mode support for devices without SRQs
Pradeep Satyanarayana [Fri, 25 Jan 2008 22:15:24 +0000 (14:15 -0800)]
IPoIB/cm: Add connected mode support for devices without SRQs

Some IB adapters (notably IBM's eHCA) do not implement SRQs (shared
receive queues).  The current IPoIB connected mode support only works
on devices that support SRQs.

Fix this by adding support for using the receive queue of each
connected mode receive QP.  The disadvantage of this compared to using
an SRQ is that it means a full queue of receives must be posted for
each remote connected mode peer, which means that total memory usage
is potentially much higher than when using SRQs.  To manage this, add
a new module parameter "max_nonsrq_conn_qp" that limits the number of
connections allowed per interface.

The rest of the changes are fairly straightforward: we use a table of
struct ipoib_cm_rx to hold all the active connections, and put the
table index of the connection in the high bits of receive WR IDs.
This is needed because we cannot rely on the struct ib_wc.qp field for
non-SRQ receive completions.  Most of the rest of the changes just
test whether or not an SRQ is available, and post receives or find
received packets in the right place depending on the answer.

Cleaning up dead connections actually becomes simpler, because we do
not have to do the "last WQE reached" dance that is required to
destroy QPs attached to an SRQ.  We just move the QP to the error
state and wait for all pending receives to be flushed.

Signed-off-by: Pradeep Satyanarayana <pradeeps@linux.vnet.ibm.com>
[ Completely rewritten and split up, based on Pradeep's work.  Several
  bugs fixed and no doubt several bugs introduced.  - Roland ]

Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIPoIB/cm: Factor out ipoib_cm_free_rx_reap_list()
Roland Dreier [Fri, 25 Jan 2008 22:15:24 +0000 (14:15 -0800)]
IPoIB/cm: Factor out ipoib_cm_free_rx_reap_list()

Factor out the code for going through the rx_reap list of struct
ipoib_cm_rx and freeing each one.  This consolidates the code
duplicated between ipoib_cm_dev_stop() and ipoib_cm_rx_reap() and
reduces the risk of error when adding additional accounting.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIPoIB/cm: Factor out ipoib_cm_create_srq()
Roland Dreier [Fri, 25 Jan 2008 22:15:24 +0000 (14:15 -0800)]
IPoIB/cm: Factor out ipoib_cm_create_srq()

Factor out the code to create an SRQ and allocate the receive ring in
ipoib_cm_dev_init() into a new function ipoib_cm_create_srq().  This
will make the code neater when support for devices that don't implement
SRQs is added.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIPoIB/cm: Factor out ipoib_cm_free_rx_ring()
Roland Dreier [Fri, 25 Jan 2008 22:15:24 +0000 (14:15 -0800)]
IPoIB/cm: Factor out ipoib_cm_free_rx_ring()

Factor out the code to unmap/free skbs and free the receive ring in
ipoib_cm_dev_cleanup() into a new function ipoib_cm_free_rx_ring().
This function will be called from a couple of other places when
support for devices that don't implement SRQs is added.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIPoIB: Trivial formatting cleanups
Roland Dreier [Wed, 24 Oct 2007 02:57:54 +0000 (19:57 -0700)]
IPoIB: Trivial formatting cleanups

Fix whitespace blunders, convert "foo* bar" to "foo *bar", etc.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoIB/ipath: Fix crash on unload introduced by sysfs changes
Roland Dreier [Fri, 25 Jan 2008 22:15:21 +0000 (14:15 -0800)]
IB/ipath: Fix crash on unload introduced by sysfs changes

Commit 23b9c1ab ("Infiniband: make ipath driver use default driver
groups.") introduced a bug in the ipath driver where
ipath_device_create_group() fell through into the error path, even on
success, which meant that the sysfs groups it created would always get
removed right away.  This made ipath_device_remove_group() hit the
BUG_ON() in sysfs_remove_group() when it tried to remove those groups a
second time.

Correct the return path so that the groups stick around until they are
supposed to be cleaned up.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
Linus Torvalds [Fri, 25 Jan 2008 21:59:51 +0000 (13:59 -0800)]
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: (509 commits)
  V4L/DVB (7078): radio: fix sf16fmi section mismatch
  V4L/DVB (7077): bt878: remove handcrafted PCI subsystem ID check
  V4L/DVB (7075): Make a local function static
  V4L/DVB (7074): DiB7000P: correct tuning problem for 7MHz channel
  V4L/DVB (7073): DiB7070: Reception quality improved
  V4L/DVB (7072): sets the MT2060 IF1 frequency according to EEPROM
  V4L/DVB (7071): DiB0700: Start streaming the right way
  V4L/DVB (7070): Fix some tuning problems
  V4L/DVB (7069):  Support for myTV.t
  V4L/DVB (7068): Add support for WinTV Nova-T-CE driver
  V4L/DVB (7067): fix autoserach in the Hauppauge NOVA-T 500
  V4L/DVB (7066):  ASUS My Cinema U3000 Mini DVBT Tuner
  V4L/DVB (7065): Artec T14BR patches
  V4L/DVB (7063): xc5000: Fix OOPS caused by missing firmware
  V4L/DVB (7062): radio-si570x: Some fixes and new USB ID addition
  V4L/DVB (7061): radio-si470x: Some cleanups
  V4L/DVB (7060): em28xx: remove has_tuner
  V4L/DVB (7059): cx88: Ensure the tuner is reset correctly
  V4L/DVB (7058): IR corrections for the Pinnacle 800i
  V4L/DVB (7056): tuner: suppress obsolete tuner i2c address warning for XC5000 tuners
  ...

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Fri, 25 Jan 2008 21:57:26 +0000 (13:57 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (67 commits)
  ide: remove redundant DMA blacklist check from __ide_dma_on()
  ide: cleanup ide_set_dma()
  ide: remove redundant ->ide_dma_on call from set_using_dma()
  sc1200: move DMA timings to timing tables
  ide: add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag
  sis5513: factor out UDMA programming code
  pdc202xx_new: move PIO programming code to pdcnew_set_pio_mode()
  ide: make 'extra' field in struct ide_port_info u8
  ide: kill duplicate code in ide_dump_{ata,atapi}_status()
  ide-disk: use ide_get_lba_addr()
  ide: printk fix
  ide: add ide_tf_read() helper
  ide: fix registers loading order in ide_dump_ata_status()
  ide-disk: use do_rw_taskfile() (take 2)
  ide-disk: add ide_tf_set_cmd() helper
  ide-disk: extend timeout for PIO-in commands
  ide: remove 'handler' field from ide_task_t (take 2)
  ide: use ->data_phase to set ->handler in do_rw_taskfile()
  ide: convert do_rw_taskfile() to use ->data_phase
  ide: merge flagged_taskfile() into do_rw_taskfile()
  ...

16 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
Linus Torvalds [Fri, 25 Jan 2008 21:42:32 +0000 (13:42 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched

* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched: (96 commits)
  sched: keep total / count stats in addition to the max for
  sched, futex: detach sched.h and futex.h
  sched: fix: don't take a mutex from interrupt context
  sched: print backtrace of running tasks too
  printk: use ktime_get()
  softlockup: fix signedness
  sched: latencytop support
  sched: fix goto retry in pick_next_task_rt()
  timers: don't #error on higher HZ values
  sched: monitor clock underflows in /proc/sched_debug
  sched: fix rq->clock warps on frequency changes
  sched: fix, always create kernel threads with normal priority
  debug: clean up kernel/profile.c
  sched: remove the !PREEMPT_BKL code
  sched: make PREEMPT_BKL the default
  debug: track and print last unloaded module in the oops trace
  debug: show being-loaded/being-unloaded indicator for modules
  sched: rt-watchdog: fix .rlim_max = RLIM_INFINITY
  sched: rt-group: reduce rescheduling
  hrtimer: unlock hrtimer_wakeup
  ...

16 years agoide: remove redundant DMA blacklist check from __ide_dma_on()
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:19 +0000 (22:17 +0100)]
ide: remove redundant DMA blacklist check from __ide_dma_on()

->ide_dma_on method is called only after successful ide_dma_check() call
(ide_dma_check()->ide_tune_dma() checks DMA blacklist) or if drive->using_dma
has been previously enabled for a given device (->ide_dma_on is the only place
which sets drive->using_dma to '1').

There should be no functionality changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: cleanup ide_set_dma()
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:19 +0000 (22:17 +0100)]
ide: cleanup ide_set_dma()

* ->dma_off_quietly is always called before ide_set_dma()
  so the call can be moved inside ide_set_dma().

* ide_dma_check() doesn't touch hardware so ->dma_off_quietly
  call for 'rc == -1' case is redundant, remove it.

* '0' and '-1' are the only values returned by ide_dma_check()
  so remove dead code for other cases.

There should be no functionality changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove redundant ->ide_dma_on call from set_using_dma()
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:19 +0000 (22:17 +0100)]
ide: remove redundant ->ide_dma_on call from set_using_dma()

ide_set_dma() calls ->ide_dma_on method itself and returns zero
only if ->ide_dma_on call succeeded.

There should be no functionality changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agosc1200: move DMA timings to timing tables
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:18 +0000 (22:17 +0100)]
sc1200: move DMA timings to timing tables

Based on pata_sc1200.c.

There should be no functionality changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:18 +0000 (22:17 +0100)]
ide: add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag

* Add IDE_HFLAG_ABUSE_SET_DMA_MODE host flag and use it to decide
  what to do with transfer modes < XFER_PIO_0 in ide_set_xfer_rate().

* Set IDE_HFLAG_ABUSE_SET_DMA_MODE in host drivers that need it
  (aec62xx, amd74xx, cs5520, cs5535, hpt34x, hpt366, pdc202xx_old,
  serverworks, tc86c001 and via82cxxx) and cleanup ->set_dma_mode
  methods in host drivers that don't (IDE core code guarantees that
  ->set_dma_mode will be called only for modes which are present
  in SWDMA/MWDMA/UDMA masks).

While at it:

* Add IDE_HFLAGS_HPT34X/HPT3XX/PDC202XX/SVWKS define in
  hpt34x/hpt366/pdc202xx_old/serverworks host driver.

There should be no functionality changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agosis5513: factor out UDMA programming code
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:18 +0000 (22:17 +0100)]
sis5513: factor out UDMA programming code

* Factor out UDMA programming code from sis_set_dma_mode() to per
  chipset family helpers: sis_{ata33,ata133}_program_udma_timings().

* Add sis_program_udma_timings() helper.

* Remove unneeded casts to 'unsigned long'.

* Minor cleanups.

There should be no functionality changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agopdc202xx_new: move PIO programming code to pdcnew_set_pio_mode()
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:18 +0000 (22:17 +0100)]
pdc202xx_new: move PIO programming code to pdcnew_set_pio_mode()

* Move PIO programming code from pdcnew_set_mode() to pdcnew_set_pio_mode().

* Rename pdcnew_set_mode() to pdcnew_set_dma_mode().

There should be no functionality changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: make 'extra' field in struct ide_port_info u8
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:17 +0000 (22:17 +0100)]
ide: make 'extra' field in struct ide_port_info u8

The maximum value used currently for 'extra' field in struct ide_port_info
is 240.

Make 'extra' u8 so it packs nicely together with enablebits[] and 'chipset'
fields (ide_pci_enablebit_t is 3 bytes and hwif_chipset_t is 1 byte).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: kill duplicate code in ide_dump_{ata,atapi}_status()
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:17 +0000 (22:17 +0100)]
ide: kill duplicate code in ide_dump_{ata,atapi}_status()

* Move the common code from ide_dump_{ata,atapi}_status() to
  ide_dump_status().

* ide_dump_{ata,atapi}_status() -> ide_dump_{ata,atapi}_error().

There should be no functionality changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-disk: use ide_get_lba_addr()
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:17 +0000 (22:17 +0100)]
ide-disk: use ide_get_lba_addr()

* Export ide_get_lba_addr().

* Convert idedisk_{read_native,set}_max_address() to use ide_get_lba_addr().

* Remove incorrect comment from idedisk_read_native_max_address()
  (noticed by Sergei).

There should be no functionality changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: printk fix
Andrew Morton [Fri, 25 Jan 2008 21:17:17 +0000 (22:17 +0100)]
ide: printk fix

power4:

drivers/ide/ide-lib.c: In function `ide_dump_sector':
drivers/ide/ide-lib.c:516: warning: long long unsigned int format, u64 arg (arg 2)

We don't know what type is used to implement u64 hence it must always be cast
when printed.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add ide_tf_read() helper
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:17 +0000 (22:17 +0100)]
ide: add ide_tf_read() helper

* Factor out code reading taskfile registers from ide_end_drive_cmd()
  to the new ide_tf_read() helper.

* Add IDE_TFLAG_IN_* taskfile flags to indicate the need to load
  particular IDE taskfile register in ide_tf_read().

* Update ide_end_drive_cmd() to set respective IDE_TFLAG_IN_* taksfile flags.

* Add ide_get_lba_addr() for getting LBA sector address from taskfile struct.

* Factor out code getting sector address from ide_dump_ata_status()
  to the new ide_dump_sector() function.

* Convert ide_dump_sector() to use ide_tf_read() and ide_get_lba_addr().

* Remove no longer needed ide_read_24().

The only change in functionality caused by this patch is that
ide_dump_ata_status() no longer prints "high"/"low" parts of LBA48
sector address (of course LBA48 sector address is still printed).

Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: fix registers loading order in ide_dump_ata_status()
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:17 +0000 (22:17 +0100)]
ide: fix registers loading order in ide_dump_ata_status()

Fix registers loading order in ide_dump_ata_status()/ide_read_24().

Load registers in this order:
* IDE_SECTOR_REG
* IDE_LCYL_REG
* IDE_HCYL_REG
* IDE_SELECT_REG

It shouldn't affect anything (just a usual paranoia to separate changes
which change the way in which hardware is accessed from code cleanups).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-disk: use do_rw_taskfile() (take 2)
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:16 +0000 (22:17 +0100)]
ide-disk: use do_rw_taskfile() (take 2)

* Add IDE_TFLAG_DMA_PIO_FALLBACK taskfile flag to indicate the need
  to skip loading taskfile registers in do_rw_taskfile().

* Export do_rw_taskfile().

* Convert __ide_do_rw_disk() to use do_rw_taskfile().

* Unexport ide_tf_load().

* Unexport {pre_task_out,task_in}_intr() and make it static.

* Remove incorrect comment about do_rw_taskfile() from <linux/ide.h>.

There should be no functionality changes caused by this patch.

v2:
* Add missing blk_fs_request() check to task_dma_ok() (for VDMA).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-disk: add ide_tf_set_cmd() helper
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:16 +0000 (22:17 +0100)]
ide-disk: add ide_tf_set_cmd() helper

* Add ide_tf_set_cmd() helper for selecting/setting command and data phase
  (note: DMA data phases are there for completness, they are not required ATM).

* Set IDE_TFLAG_WRITE taskfile flag for write requests in __ide_do_rw_disk().

* Convert __ide_do_rw_disk() to use the new ide_tf_set_cmd() helper.

There should be no functionality changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-disk: extend timeout for PIO-in commands
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:16 +0000 (22:17 +0100)]
ide-disk: extend timeout for PIO-in commands

s/WAIT_CMD/WAIT_WORSTCASE/ to make the timeout the same as in do_rw_taskfile()

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove 'handler' field from ide_task_t (take 2)
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:16 +0000 (22:17 +0100)]
ide: remove 'handler' field from ide_task_t (take 2)

* Add IDE_TFLAG_CUSTOM_HANDLER taskfile flag and use it for internal requests
  which require custom handlers.  Check the flag in do_rw_taskfile() and set
  handler accordingly.

* Cleanup ide_init_{specify,restore,setmult}_cmd() and rename it to
  ide_tf_set_{specify,restore,setmult}_cmd().

* Make {set_geometry,recal,set_multmode}_intr() static.

* Remove no longer needed 'handler' field from ide_task_t.

v2:
* 'handler' in do_rw_taskfile() must be set to NULL initially.

There should be no functionality changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: use ->data_phase to set ->handler in do_rw_taskfile()
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:16 +0000 (22:17 +0100)]
ide: use ->data_phase to set ->handler in do_rw_taskfile()

* Use ->data_phase to set ->handler in do_rw_taskfile() instead of
  setting ->handler in callers of ide_raw_taskfile()/do_rw_taskfile().

* Unexport task_no_data_intr() and make it static.

There should be no functionality changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: convert do_rw_taskfile() to use ->data_phase
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:16 +0000 (22:17 +0100)]
ide: convert do_rw_taskfile() to use ->data_phase

* Use task->data_phase in do_rw_taskfile() to decide what to do.

* task->prehandler is only used by TASKFILE[_MULTI]_OUT so just
  use pre_task_out_intr() directly and remove no longer needed
  'prehandler' field from ide_task_t.

* Remove no longer needed ide_pre_handler_t type.

There should be no functionality changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: merge flagged_taskfile() into do_rw_taskfile()
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:15 +0000 (22:17 +0100)]
ide: merge flagged_taskfile() into do_rw_taskfile()

Based on the earlier work by Tejun Heo.

task->data_phase == TASKFILE_MULTI_{IN,OUT} vs drive->mult_count == 0
check is needed also for ide_taskfile_ioctl() requests that don't have
IDE_TFLAG_FLAGGED taskfile flag set.

Cc: Tejun Heo <htejun@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-disk: guarantee 400ns delay after writing command register
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:15 +0000 (22:17 +0100)]
ide-disk: guarantee 400ns delay after writing command register

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-disk: fix __ide_do_rw_disk() to use ->OUTBSYNC
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:15 +0000 (22:17 +0100)]
ide-disk: fix __ide_do_rw_disk() to use ->OUTBSYNC

Fix __ide_do_rw_disk() to use ->OUTBSYNC instead of ->OUTB
(needed for pmac and scc_pata host drivers).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agosc1200: remove pointless hwif lookup loop
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:14 +0000 (22:17 +0100)]
sc1200: remove pointless hwif lookup loop

Save PCI regs values for both IDE ports in one buffer, in order to eliminate
a needless and ugly loop across all hwifs, searching for our PCI device.

Partially based on the previous patch by Jeff Garzik.

Cc: Jeff Garzik <jeff@garzik.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove 'tf_in_flags' field from ide_task_t
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:14 +0000 (22:17 +0100)]
ide: remove 'tf_in_flags' field from ide_task_t

* Add IDE_TFLAG_IN_DATA taskfile flag to indicate the need of reading
  IDE_DATA_REG in ide_end_drive_cmd().

  Set the new flag in ide_taskfile_ioctl() if ->in_flags.b.data is set.

* Add IDE_TFLAG_FLAGGED_SET_IN_FLAGS taskfile flag to indicate the
  need of modifying ->in_flags in ide_taskfile_ioctl().

  Set the new flag in flagged_taskfile() and move the code modifying
  ->tf_in_flags to ide_taskfile_ioctl().

  While at it remove the bogus comment: ->tf_in_flags (except .b.data)
  have no effect on selection of registers to read.

* Remove no longer needed 'tf_in_flags' field from ide_task_t.

As the result we finally have the internals of HDIO_DRIVE_TASKFILE ioctl
separated from the core IDE code.

There should be no functionality changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove 'command_type' field from ide_task_t
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:14 +0000 (22:17 +0100)]
ide: remove 'command_type' field from ide_task_t

* Add 'data_buf' and 'nsect' variables in ide_taskfile_ioctl()
  to cache data buffer pointer and number of sectors to transfer
  (this allows us to have only one ide_diag_taskfile() call).

* Add IDE_TFLAG_WRITE taskfile flag and use it to check whether
  the REQ_RW request flag should be set.

* Move ->command_type handling from ide_diag_taskfile() to
  ide_taskfile_ioctl() and use ->req_cmd instead of ->command_type.

* Add 'nsect' parameter to ide_raw_taskfile().

* Merge ide_diag_taskfile() into ide_raw_taskfile().

* Initialize ->data_phase explicitly in idedisk_prepare_flush(),
  ide_start_power_step() and ide_disk_special().

* Remove no longer needed 'command_type' field from ide_task_t.

* Add #ifndef/#endif __KERNEL__ to <linux/hdreg.h> around no
  longer used by kernel IDE_DRIVE_TASK_* and TASKFILE_* defines.

There should be no functionality changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove hwif->intrproc
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:14 +0000 (22:17 +0100)]
ide: remove hwif->intrproc

Given that:

* hpt366.c::hpt3xx_intrproc() is the only user of hwif->intrproc

* hpt366.c::hpt3xx_quirkproc() sets drive->quirk_list to 1 for quirky drives
  which is a value unique to hpt366 host driver

we can remove hwif->intproc and just check for drive->quirk_list == 1
in ide_do_request().

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove SELECT_INTERRUPT()
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:13 +0000 (22:17 +0100)]
ide: remove SELECT_INTERRUPT()

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove QUIRK_LIST()
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:13 +0000 (22:17 +0100)]
ide: remove QUIRK_LIST()

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add ide_pktcmd_tf_load() helper
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:13 +0000 (22:17 +0100)]
ide: add ide_pktcmd_tf_load() helper

Add ide_pktcmd_tf_load() helper and convert ATAPI device drivers to use it.

There should be no functionality changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-{floppy,tape,scsi}: fix register loading order when issuing packet command
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:13 +0000 (22:17 +0100)]
ide-{floppy,tape,scsi}: fix register loading order when issuing packet command

Load IDE_BCOUNTL_REG before IDE_BCOUNTH_REG when issuing packet command.

It shouldn't affect anything (just a usual paranoia to separate changes
which change the way in which hardware is accessed from code cleanups).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-cd: fix register loading order in cdrom_start_packet_command()
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:13 +0000 (22:17 +0100)]
ide-cd: fix register loading order in cdrom_start_packet_command()

Load IDE_CONTROL_REG before other registers in cdrom_start_packet_command().

It shouldn't affect anything (just a usual paranoia to separate changes
which change the way in which hardware is accessed from code cleanups).

While at it move misplaced FIXME comment in the right place.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove atapi_ireason_t (take 3)
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:12 +0000 (22:17 +0100)]
ide: remove atapi_ireason_t (take 3)

Remove atapi_ireason_t.

While at it:
* replace 'HWIF(drive)' by 'drive->hwif' (or just 'hwif' where possible)

v2:
* v1 had CD and IO bits reversed in many places.

* Use CD and IO defines from <linux/hdreg.h>.

v3:
* Fix incorrect "(ireason & IO) == test_bit()". (Noticed by Sergei)

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove ata_nsector_t, ata_data_t and atapi_bcount_t
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:12 +0000 (22:17 +0100)]
ide: remove ata_nsector_t, ata_data_t and atapi_bcount_t

Remove ata_nsector_t, ata_data_t (unused) and atapi_bcount_t.

While at it:
* replace 'HWIF(drive)' by 'hwif'

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove atapi_feature_t
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:12 +0000 (22:17 +0100)]
ide: remove atapi_feature_t

Remove atapi_feature_t.

While at it:
* replace 'HWIF(drive)' by 'hwif'

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove atapi_error_t (take 2)
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:12 +0000 (22:17 +0100)]
ide: remove atapi_error_t (take 2)

Remove atapi_error_t.

While at it:
* replace 'HWIF(drive)' by 'drive->hwif'

v2:
* Add {ILI,EOM,LFS}_ERR defines to <linux/hdreg.h>.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove ata_status_t and atapi_status_t
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:11 +0000 (22:17 +0100)]
ide: remove ata_status_t and atapi_status_t

Remove ata_status_t (unused) and atapi_status_t.

While at it:
* replace 'HWIF(drive)' by 'drive->hwif' (or just 'hwif' where possible)

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: CPU endianness doesn't matter for special_t
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:11 +0000 (22:17 +0100)]
ide: CPU endianness doesn't matter for special_t

special_t is used only internally by the IDE subsystem (it isn't
related to hardware registers and isn't exported to the user-space).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-floppy: remove dead code
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:11 +0000 (22:17 +0100)]
ide-floppy: remove dead code

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove REQ_TYPE_ATA_TASK
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:11 +0000 (22:17 +0100)]
ide: remove REQ_TYPE_ATA_TASK

Based on the earlier work by Tejun Heo.

All users are gone so we can finally remove it.

Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: switch ide_task_ioctl() to use REQ_TYPE_ATA_TASKFILE requests
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:11 +0000 (22:17 +0100)]
ide: switch ide_task_ioctl() to use REQ_TYPE_ATA_TASKFILE requests

Based on the earlier work by Tejun Heo.

There should be no functionality changes caused by this patch.

Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: switch idedisk_prepare_flush() to use REQ_TYPE_ATA_TASKFILE requests
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:10 +0000 (22:17 +0100)]
ide: switch idedisk_prepare_flush() to use REQ_TYPE_ATA_TASKFILE requests

Based on the earlier work by Tejun Heo.

There should be no functionality changes caused by this patch.

Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: extend timeout for REQ_TYPE_ATA_{CMD,TASK} requests
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:10 +0000 (22:17 +0100)]
ide: extend timeout for REQ_TYPE_ATA_{CMD,TASK} requests

Extend timeout for REQ_TYPE_ATA_{CMD,TASK} requests from WAIT_CMD (10sec)
to WAIT_WORSTCASE (30sec, already used for REQ_TYPE_ATA_TASKFILE).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove unnecessary writes to HOB taskfile registers
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:10 +0000 (22:17 +0100)]
ide: remove unnecessary writes to HOB taskfile registers

* Set taskfile flags for REQ_TYPE_ATA_TASKFILE requests before
  adding the request to the queue.

* Cleanup execute_drive_cmd().

* Remove unnecessary writes to HOB taskfile registers when using
  LBA48 disk for the following cases:

  - Power Management requests
    (WIN_FLUSH_CACHE[_EXT], WIN_STANDBYNOW1, WIN_IDLEIMMEDIATE commands)

  - special commands (WIN_SPECIFY, WIN_RESTORE, WIN_SETMULT)

  - Host Protected Area support (WIN_READ_NATIVE_MAX, WIN_SET_MAX)

  - /proc/ide/ SMART support (WIN_SMART with SMART_ENABLE,
    SMART_READ_VALUES and SMART_READ_THRESHOLDS subcommands)

  - write cache enabling/disabling in ide-disk
    (WIN_SETFEATURES with SETFEATURES_{EN,DIS}_WCACHE)

  - write cache flushing in ide-disk (WIN_FLUSH_CACHE[_EXT])

  - acoustic management in ide-disk
    (WIN_SETFEATURES with SETFEATURES_{EN,DIS}_AAM)

  - door (un)locking in ide-disk (WIN_DOORLOCK, WIN_DOORUNLOCK)

  - /proc/ide/hd?/identify support (WIN_IDENTIFY)

  - ACPI _GTF taskfiles

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: use IDE_TFLAG_LBA48 for REQ_TYPE_ATA_TASKFILE requests
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:10 +0000 (22:17 +0100)]
ide: use IDE_TFLAG_LBA48 for REQ_TYPE_ATA_TASKFILE requests

* Use IDE_TFLAG_LBA48 for REQ_TYPE_ATA_TASKFILE requests in ide_end_drive_cmd()
  to decide whether we need to read HOB taskfile registers.

* Update execute_drive_cmd() accordingly.

This is a preparation for the next patch which removes unnecessary writes to
HOB taskfile registers for some ATA commands.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: use ide_tf_load() in execute_drive_cmd()
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:10 +0000 (22:17 +0100)]
ide: use ide_tf_load() in execute_drive_cmd()

* Add IDE_TFLAG_OUT_DEVICE taskfile flag to indicate the need of writing
  the Device register and handle it in ide_tf_load().

  Update ide_tf_load() and {do_rw,flagged}_taskfile() users accordingly.

* Use struct ide_taskfile and ide_tf_load() in execute_drive_cmd().

* Make the debugging code dump all taskfile registers for both
  REQ_ATA_TYPE_{CMD,TASK} requests and move it to ide_tf_load()
  so it also covers REQ_ATA_TYPE_TASKFILE requests.

There should be no functionality changes caused by this patch
(unless DEBUG is defined).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove ide_cmd() helper
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:09 +0000 (22:17 +0100)]
ide: remove ide_cmd() helper

* Remove ide_cmd() helper.

* Clear nIEN and call SELECT_MASK() before writing taskfile registers.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: execute_drive_cmd() cleanup
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:09 +0000 (22:17 +0100)]
ide: execute_drive_cmd() cleanup

* Rename 'args' variable in 'if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE)'
  block to 'task'.

* execute_drive_cmd() is used only for REQ_TYPE_ATA_{CMD,TASK,TASKFILE} so
  we can move the common code out from 'if (rq->cmd_type == REQ_TYPE_ATA_CMD)'
  and 'if (rq->cmd_type == REQ_TYPE_ATA_TASK)' blocks.

There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: fix registers loading order for IDE_NSECTOR_REG in execute_drive_cmd()
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:09 +0000 (22:17 +0100)]
ide: fix registers loading order for IDE_NSECTOR_REG in execute_drive_cmd()

Move loading of IDE_NSECTOR_REG from ide_cmd() to execute_drive_cmd()
(load the IDE_NSECTOR_REG just after IDE_FEATURE_REG).

This also allows us to drop 'nsect' argument from ide_cmd() and simplify
execute_drive_cmd() code for REQ_TYPE_ATA_CMD case a bit.

It shouldn't affect anything (just a usual paranoia to separate changes
which change the way in which hardware is accessed from code cleanups).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: fix registers loading order for WIN_SMART in execute_drive_cmd()
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:09 +0000 (22:17 +0100)]
ide: fix registers loading order for WIN_SMART in execute_drive_cmd()

Fix registers loading order for REQ_TYPE_ATA_CMD request with WIN_SMART
command in execute_drive_cmd() (load IDE_FEATURE_REG and IDE_SECTOR_REG
before loading IDE_LCYL_REG and IDE_HCYL_REG).

It shouldn't affect anything (just a usual paranoia to separate changes
which change the way in which hardware is accessed from code cleanups).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-tape: remove dead USE_IOTRACE code
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:08 +0000 (22:17 +0100)]
ide-tape: remove dead USE_IOTRACE code

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove stale ide.h "configuration options"
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:08 +0000 (22:17 +0100)]
ide: remove stale ide.h "configuration options"

Remove stale ide.h "configuration options":

* INITIAL_MULT_COUNT - always defined to 0

* SUPPORT_SLOW_DATA_PORTS - unused

* OK_TO_RESET_CONTROLLER - always defined to 1

* DISABLE_IRQ_NOSYNC - always defined to 0

Leave SUPPORT_VLB_SYNC (defined to 0 for CRIS and FRV, otherwise to 1)
for now but disallow overriding it by <asm/ide.h>.

There should be no functionality changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove CONFIG_IDEPCI_SHARE_IRQ config option
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:08 +0000 (22:17 +0100)]
ide: remove CONFIG_IDEPCI_SHARE_IRQ config option

We can safely remove CONFIG_IDEPCI_SHARE_IRQ and always support
PCI IRQ sharing.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove IRQF_DISABLED from IRQ flags for IDE IRQ handler
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:08 +0000 (22:17 +0100)]
ide: remove IRQF_DISABLED from IRQ flags for IDE IRQ handler

IRQF_DISABLED is not needed because the first thing that ide_intr()
(IDE IRQ handler) does is calling spin_lock_irqsave() which disables
local IRQs (IRQ unmasking is later handled by drive->unmask).

kernel/irq/handle.c:

irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action)
...
if (!(action->flags & IRQF_DISABLED))
local_irq_enable_in_hardirq();

do {
ret = action->handler(irq, action->dev_id);
if (ret == IRQ_HANDLED)
status |= action->flags;
retval |= ret;
action = action->next;
} while (action);
...

drivers/ide/ide-io.c:

irqreturn_t ide_intr (int irq, void *dev_id)
...
spin_lock_irqsave(&ide_lock, flags);
...
spin_unlock(&ide_lock);
...
if (drive->unmask)
local_irq_enable_in_hardirq();
...

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-pmac: fix pmac_ide_init_hwif_ports()
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:07 +0000 (22:17 +0100)]
ide-pmac: fix pmac_ide_init_hwif_ports()

* pmac_ide_init_hwif_ports() can be called by ide_init_hwif_ports()
  (through ppc_ide_md.ide_init_hwif hook) for non IDE PMAC interfaces.
  If this is the case the hw->io_ports[] should be already setup by
  ide_init_hwif_ports()->ide_std_init_ports() so remove redundant code
  from pmac_ide_init_hwif_ports().

  As side-effect this change fixes ctl_addr == 0 special handling in
  ide_init_hwif_ports().

* Fix misleading comment while at it.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: use do_rw_taskfile() in flagged_taskfile()
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:07 +0000 (22:17 +0100)]
ide: use do_rw_taskfile() in flagged_taskfile()

Based on the earlier work by Tejun Heo.

* Move setting IDE_TFLAG_LBA48 taskfile flag from do_rw_taskfile()
  function to the callers.

* Add IDE_TFLAG_FLAGGED taskfile flag for flagged taskfiles coming
  from ide_taskfile_ioctl().  Check it instead of ->tf_out_flags.all.

* Add IDE_TFLAG_OUT_DATA taskfile flag to indicate the need to load
  IDE data register in ide_tf_load().

* Add IDE_TFLAG_OUT_* taskfile flags to indicate the need to load
  particular IDE taskfile registers in ide_tf_load().

* Update do_rw_taskfile() and ide_tf_load() users to set respective
  IDE_TFLAG_OUT_* taksfile flags.

* Add task_dma_ok() helper.

* Use IDE_TFLAG_FLAGGED taskfile flag to select HIHI mask in ide_tf_load().

* Use do_rw_taskfile() in flagged_taskfile().

* Remove no longer needed 'tf_out_flags' field from ide_task_t.

There should be no functionality changes caused by this patch.

Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add ide_no_data_taskfile() helper
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:07 +0000 (22:17 +0100)]
ide: add ide_no_data_taskfile() helper

* Add ide_no_data_taskfile() helper and convert ide_raw_taskfile() w/ NO DATA
  protocol users to use it instead.

* Set ->data_phase explicitly in ide_no_data_taskfile()
  (TASKFILE_NO_DATA is defined as 0x0000).

* Unexport task_no_data_intr().

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add ide_tf_load() helper
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:07 +0000 (22:17 +0100)]
ide: add ide_tf_load() helper

Based on the earlier work by Tejun Heo.

* Add 'tf_flags' field (for taskfile flags) to ide_task_t.

* Add IDE_TFLAG_LBA48 taskfile flag for LBA48 taskfiles.

* Add IDE_TFLAG_NO_SELECT_MASK taskfile flag for __ide_do_rw_disk()
  which doesn't use SELECT_MASK() (looks like a bug but it requires
  some more investigation).

* Split off ide_tf_load() helper from do_rw_taskfile().

* Convert __ide_do_rw_disk() to use ide_tf_load().

There should be no functionality changes caused by this patch.

Cc: Tejun Heo <htejun@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-disk: use struct ide_taskfile in __ide_do_rw_disk()
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:06 +0000 (22:17 +0100)]
ide-disk: use struct ide_taskfile in __ide_do_rw_disk()

Based on the earlier work by Tejun Heo.

There should be no functionality changes caused by this patch.

Cc: Tejun Heo <htejun@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-disk: fix taskfile registers loading order in __ide_do_rw_disk()
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:06 +0000 (22:17 +0100)]
ide-disk: fix taskfile registers loading order in __ide_do_rw_disk()

Load IDE_SECTOR_REG after IDE_FEATURE_REG and IDE_NSECTOR_REG when using CHS.

This patch is basically a preparation for the next one which converts
__ide_do_rw_disk() to use struct ide_taskfile.

It shouldn't affect anything (just a usual paranoia to separate changes
which change the way in which hardware is accessed from code cleanups).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-disk: merge LBA28 and LBA48 Host Protected Area support code (take 2)
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:06 +0000 (22:17 +0100)]
ide-disk: merge LBA28 and LBA48 Host Protected Area support code (take 2)

* Merge idedisk_{read_native,set}_max_address_ext() into
  idedisk_{read_native,set}_max_address().

v2:
* Remove LBA48 code leftover from idedisk_read_native_max_address()
  ('high' variable initialization).  (Noticed by Sergei).

There should be no functionality changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: add struct ide_taskfile (take 2)
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:06 +0000 (22:17 +0100)]
ide: add struct ide_taskfile (take 2)

* Don't set write-only ide_task_t.hobRegister[6] and ide_task_t.hobRegister[7]
  in idedisk_set_max_address_ext().

* Add struct ide_taskfile and use it in ide_task_t instead of tfRegister[]
  and hobRegister[].

* Remove no longer needed IDE_CONTROL_OFFSET_HOB define.

* Add #ifndef/#endif __KERNEL__ around definitions of {task,hob}_struct_t.

While at it:

* Use ATA_LBA define for LBA bit (0x40) as suggested by Tejun Heo.

v2:
* Add missing newlines. (Noticed by Sergei)

* Use ~ATA_LBA instead of 0xBF. (Noticed by Sergei)

* Use unnamed unions for error/feature and status/command.
  (Suggested by Sergei).

There should be no functionality changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove task_ioreg_t typedef (take 2)
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:06 +0000 (22:17 +0100)]
ide: remove task_ioreg_t typedef (take 2)

Remove task_ioreg_t typedef from the kernel code (but leave it
in <linux/hdreg.h> for #ifndef/#endif __KERNEL__ case).

While at it also move sata_ioreg_t typedef under #ifndef/#endif __KERNEL__.

v2:
Remove name of the second parameter from ide_execute_command() declaration.
(Noticed by Sergei).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide: remove ->dma_master field from ide_hwif_t (take 5)
Bartlomiej Zolnierkiewicz [Fri, 25 Jan 2008 21:17:05 +0000 (22:17 +0100)]
ide: remove ->dma_master field from ide_hwif_t (take 5)

* Convert cmd64x, hpt366 and pdc202xx_old host drivers to use
  pci_resource_start(hwif->pci_dev, 4) instead of hwif->dma_master.

* Remove no longer needed ->dma_master field from ide_hwif_t.

v2:
* Use the more readable 'hwif->dma_base - (hwif->channel * 8)' instead of
  pci_resource_start(hwif->pci_dev, 4).

v3:
* Use hwif->extra_base in hpt366/pdc20xx_old + some cosmetic fixups over v2
  (suggested by Sergei).

v4:
* Correct offsets in hpt3xxn_set_clock().

v5:
* Use hwif->extra_base in hpt366 for _real_ this time. (Noticed by Sergei)

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agohpt366: merge set_dma_mode() methods
Sergei Shtylyov [Fri, 25 Jan 2008 21:17:05 +0000 (22:17 +0100)]
hpt366: merge set_dma_mode() methods

Group the array of pointers to the timing tables with the timing register masks
which allows us to merge HPT36x/HPT37x set_dma_mode() methods into one.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agohpt366: kill set_dma_mode() method wrapper
Sergei Shtylyov [Fri, 25 Jan 2008 21:17:05 +0000 (22:17 +0100)]
hpt366: kill set_dma_mode() method wrapper

There's no reason to keep the set_dma_mode() method wrapper for two different
chip families, so get rid of it...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agohpt366: change timing register masks
Sergei Shtylyov [Fri, 25 Jan 2008 21:17:04 +0000 (22:17 +0100)]
hpt366: change timing register masks

Since PIO autotuning is now done always, there's no need anymore to program
the taskfile timings also on DMA modes, so change the IDE timing register
masks accordingly, "inverting the polarity" of the masks while at it...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoide-io: set REQ_FAILED when drive is dead
Aristeu Rozanski [Fri, 25 Jan 2008 21:17:04 +0000 (22:17 +0100)]
ide-io: set REQ_FAILED when drive is dead

Currently it's possible to ide-cd to set an incorrect blocksize by
reading garbage if the drive is dead:

ide_cd_probe()
 -> cdrom_read_toc()
     -> cdrom_read_capacity()
         -> cdrom_queue_packet_command()
             -> ide_do_drive_cmd()
                 -> ide_do_request()
                     -> start_request()

on start_request():

        /* bail early if we've exceeded max_failures */
        if (drive->max_failures && (drive->failures > drive->max_failures)) {
                goto kill_rq;
        }
(...)
kill_rq:
        ide_kill_rq(drive, rq);
        return ide_stopped;

ide_kill_rq() and the next calls won't set REQ_FAILED on rq->cmd_flags and thus
cdrom_queue_packet_command() won't return an error. then:

        stat = cdrom_queue_packet_command(drive, &req);
        if (stat == 0) {
                *capacity = 1 + be32_to_cpu(capbuf.lba);
                *sectors_per_frame =
                        be32_to_cpu(capbuf.blocklen) >> SECTOR_BITS;
        }

cdrom_read_capacity() ends believing capbuf is valid but in fact it's just
uninitialized data. back to cdrom_read_toc():

        /* Try to get the total cdrom capacity and sector size. */
        stat = cdrom_read_capacity(drive, &toc->capacity, &sectors_per_frame,
                                   sense);
        if (stat)
                toc->capacity = 0x1fffff;

        set_capacity(info->disk, toc->capacity * sectors_per_frame);
        /* Save a private copy of te TOC capacity for error handling */
        drive->probed_capacity = toc->capacity * sectors_per_frame;

        blk_queue_hardsect_size(drive->queue,
                                sectors_per_frame << SECTOR_BITS);

that will set drive->queue->hardsect_size to be the random value.
hardsect_size is used to calculate inode->i_blkbits. later on, on a read
path:

void create_empty_buffers(struct page *page,
                        unsigned long blocksize, unsigned long b_state)
{
        struct buffer_head *bh, *head, *tail;

        head = alloc_page_buffers(page, blocksize, 1);
        bh = head;
        do {
                bh->b_state |= b_state;
                tail = bh;
                bh = bh->b_this_page;
        } while (bh);
        tail->b_this_page = head;

alloc_page_buffers() will return NULL if blocksize > 4096. blocksize is
calculed based on inode->i_blkbits. that will trigger a null
dereference on create_empty_buffers().

Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
Cc: Borislav Petkov <bbpetkov@yahoo.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
16 years agoV4L/DVB (7078): radio: fix sf16fmi section mismatch
Randy Dunlap [Wed, 23 Jan 2008 05:39:39 +0000 (02:39 -0300)]
V4L/DVB (7078): radio: fix sf16fmi section mismatch

isapnp_fmi_probe() is only called by fmi_init(), which is __init,
so isapnp_fmi_probe() can also be __init.

media/radio/radio-sf16fmi.c:
WARNING: vmlinux.o(.text+0x994e19): Section mismatch: reference to .init.data: (between 'isapnp_fmi_probe' and 'vidioc_s_tuner')
WARNING: vmlinux.o(.text+0x994e22): Section mismatch: reference to .init.data: (between 'isapnp_fmi_probe' and 'vidioc_s_tuner')
WARNING: vmlinux.o(.text+0x994e3a): Section mismatch: reference to .init.data:id_table (between 'isapnp_fmi_probe' and 'vidioc_s_tuner')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7077): bt878: remove handcrafted PCI subsystem ID check
Akinobu Mita [Mon, 21 Jan 2008 15:15:19 +0000 (12:15 -0300)]
V4L/DVB (7077): bt878: remove handcrafted PCI subsystem ID check

This patch moves the subsystem ID and subsystem vendor ID check from probing
function to the PCI generic function by describing subsystem IDs in
pci_device_id table. This enables to add new PCI IDs to a device driver pci_ids
table at runtime by new_id file in sysfs pci driver tree.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7075): Make a local function static
Patrick Boettcher [Fri, 25 Jan 2008 10:32:58 +0000 (07:32 -0300)]
V4L/DVB (7075): Make a local function static

Make a local function static

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7074): DiB7000P: correct tuning problem for 7MHz channel
Patrick Boettcher [Fri, 25 Jan 2008 10:31:58 +0000 (07:31 -0300)]
V4L/DVB (7074): DiB7000P: correct tuning problem for 7MHz channel

Tuning problem for 7Mhz channels fixes

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7073): DiB7070: Reception quality improved
Patrick Boettcher [Fri, 25 Jan 2008 10:25:20 +0000 (07:25 -0300)]
V4L/DVB (7073): DiB7070: Reception quality improved

Removing two bugs to improve sensitivity for DiB7070 and Dib7000P with MT2266.

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7072): sets the MT2060 IF1 frequency according to EEPROM
Olivier DANET [Fri, 25 Jan 2008 09:50:07 +0000 (06:50 -0300)]
V4L/DVB (7072): sets the MT2060 IF1 frequency according to EEPROM

Here is a patch for Hauppage Nova-T-Stick and Nova-T-500 users.  It
sets the MT2060 IF1 frequency according to the calibration values
stored in the EEPROM.

It is supposed to enhance the signal quality, but, hey, there is no
guarantee.  Feedbacks would be much appreciated, to know whether it
deserves being applied.

Signed-off-by: Olivier DANET <odanet at caramail.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7071): DiB0700: Start streaming the right way
Patrick Boettcher [Fri, 25 Jan 2008 09:37:57 +0000 (06:37 -0300)]
V4L/DVB (7071): DiB0700: Start streaming the right way

There was a mistake in the way how to start the streaming in the dib0700. This patch fixes that.

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7070): Fix some tuning problems
Soeren Moch [Fri, 25 Jan 2008 09:27:06 +0000 (06:27 -0300)]
V4L/DVB (7070): Fix some tuning problems

The attached patch solves all my vdr tuning problems on a dib7000p
nova-t stick as far as I could check within the last weekend.

It disables streaming while tuning, like that the number of faulty TS
packets is reduced.

Signed-off-by: Soeren Moch <Soeren.Moch@stud.uni-hannover.de>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>