platform/kernel/linux-rpi.git
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./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./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./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>
16 years agoV4L/DVB (7069): Support for myTV.t
Darren Salt [Fri, 25 Jan 2008 09:20:02 +0000 (06:20 -0300)]
V4L/DVB (7069):  Support for myTV.t

Here's a roll-up which provides support for both this and the myTV.t.

Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7068): Add support for WinTV Nova-T-CE driver
Tim Taubert [Fri, 25 Jan 2008 09:16:36 +0000 (06:16 -0300)]
V4L/DVB (7068): Add support for WinTV Nova-T-CE driver

Add support for WinTV Nova-T-CE driver

Signed-off-by: Tim Taubert <ttmails@gmx.de>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7067): fix autoserach in the Hauppauge NOVA-T 500
Jose Alberto Reguero [Fri, 25 Jan 2008 09:05:16 +0000 (06:05 -0300)]
V4L/DVB (7067): fix autoserach in the Hauppauge NOVA-T 500

This patch fix autoserach in the Hauppauge NOVA-T 500.

Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7066): ASUS My Cinema U3000 Mini DVBT Tuner
Daniel Gimpelevich [Fri, 25 Jan 2008 09:02:42 +0000 (06:02 -0300)]
V4L/DVB (7066):  ASUS My Cinema U3000 Mini DVBT Tuner

Adding support for ASUS My Cinema U3000 Mini DVBT Tuner

Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7065): Artec T14BR patches
Yousef Lamlum [Fri, 25 Jan 2008 08:51:48 +0000 (05:51 -0300)]
V4L/DVB (7065): Artec T14BR patches

Added Artec T14BR support

Signed-off-by: Yousef Lamlum <yousef@youseflamlum.com>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7063): xc5000: Fix OOPS caused by missing firmware
Steven Toth [Fri, 25 Jan 2008 01:29:46 +0000 (22:29 -0300)]
V4L/DVB (7063): xc5000: Fix OOPS caused by missing firmware

xc5000: Fix OOPS caused by missing firmware.

Signed-off-by: Chaogui Zhang <czhang1974@gmail.com>
Acked-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7062): radio-si570x: Some fixes and new USB ID addition
Tobias Lorenz [Fri, 25 Jan 2008 08:14:57 +0000 (05:14 -0300)]
V4L/DVB (7062): radio-si570x: Some fixes and new USB ID addition

- avoid poss. locking when doing copy_to_user which may sleep
- RDS is automatically activated on read now
- code cleaned of unnecessary rds_commands
- USB Vendor/Product ID for ADS/Tech FM Radio Receiver verified
  (thanks to Guillaume RAMOUSSE)

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7061): radio-si470x: Some cleanups
Tobias Lorenz [Fri, 25 Jan 2008 07:19:48 +0000 (04:19 -0300)]
V4L/DVB (7061): radio-si470x: Some cleanups

- code reordered to avoid function prototypes
- switch/case defaults are now more user-friendly
- unified comment style
- applied all checkpatch.pl v1.12 suggestions
  except the warning about the too long lines with bit comments
- renamed FMRADIO to RADIO to cut line length (checkpatch.pl)

Signed-off-by: Tobias Lorenz <tobias.lorenz@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7060): em28xx: remove has_tuner
Mauro Carvalho Chehab [Thu, 24 Jan 2008 09:59:20 +0000 (06:59 -0300)]
V4L/DVB (7060): em28xx: remove has_tuner

has_tuner flag doesn't make much sense, since tuner_type=TUNER_ABSENT
means the same thing.

Having two ways to say that a tuner is not present is
not nice, since it may lead to bad setups. In fact, with the previous
code, if a device were using has_tuner=0, but the user forces a tuner,
with modprobe option tuner=type, the modprobe option won't work.

Also, tveeprom returns TUNER_ABSENT, when tuner is unknown or absent.
So, with the previous logic, in this case, the driver should set
has_tuner=0, or has_tuner=1 otherwise.

Instead of adding several additional tests and setups, better just to
remove .has_tuner.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7059): cx88: Ensure the tuner is reset correctly
Steven Toth [Tue, 22 Jan 2008 04:03:10 +0000 (01:03 -0300)]
V4L/DVB (7059): cx88: Ensure the tuner is reset correctly

Previous patches assume the tuner was on a different gpio. This patch
corrects this.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Chaogui Zhang <czhang1974@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7058): IR corrections for the Pinnacle 800i
Steven Toth [Tue, 22 Jan 2008 04:00:33 +0000 (01:00 -0300)]
V4L/DVB (7058): IR corrections for the Pinnacle 800i

IR corrections for the Pinnacle 800i

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Chaogui Zhang <czhang1974@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7056): tuner: suppress obsolete tuner i2c address warning for XC5000 tuners
Michael Krufky [Mon, 21 Jan 2008 15:01:34 +0000 (12:01 -0300)]
V4L/DVB (7056): tuner: suppress obsolete tuner i2c address warning for XC5000 tuners

We already know that the XC5000 tuner can only be located at
i2c address 0x61, 0x62, 0x63 or 0x64

We shouldn't display this warning if the XC5000 tuner is present.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7055): make tuner names consistent with standard cases
Michael Krufky [Mon, 21 Jan 2008 13:55:37 +0000 (10:55 -0300)]
V4L/DVB (7055): make tuner names consistent with standard cases

Change TDA9887 to tda9887.

TDA8290 shall reflect the actual hardware present in its name,
  ie:

tda8295+18271
tda8290+8275a

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7054): ansonic branded dvb-t usb stick support in the af9005 driver
Luca Olivetti [Sun, 20 Jan 2008 20:56:43 +0000 (17:56 -0300)]
V4L/DVB (7054): ansonic branded dvb-t usb stick support in the af9005 driver

Marcos Melero (marcosmelero at gmail.com) reported he could make
his dvb-t usb stick work with the af9005 driver by changing the device
ids (10b9:6000).

The stick is branded "Ansonic" (one of the brands of a spanish chain of
supermarkets) with no other identification of the model.
Since neither Marcos nor me know the OEM for the stick, in the attached
patch I used Ansonic for the ids/description.

Signed-off-by: Luca Olivetti <luca@ventoso.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7052): tda18271: when tuning digital, the analog demod must be tri-stated
Michael Krufky [Sat, 19 Jan 2008 20:41:04 +0000 (17:41 -0300)]
V4L/DVB (7052): tda18271: when tuning digital, the analog demod must be tri-stated

Call analog_ops.standby during tda18271_set_params, to put the tda8295
in tri-state when tuning digital channels.  Otherwise the tda8295 will
interfere with the signal coming from the tda18271 into the digital
demodulator.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7051): Cleans up error handling on or51xxx_attach
Mauro Carvalho Chehab [Mon, 7 Jan 2008 13:45:47 +0000 (10:45 -0300)]
V4L/DVB (7051): Cleans up error handling on or51xxx_attach

state is already NULL.

Reviewed-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7047): fix broken build when CONFIG_USB_SI470X is set
Michael Krufky [Thu, 17 Jan 2008 17:54:53 +0000 (14:54 -0300)]
V4L/DVB (7047): fix broken build when CONFIG_USB_SI470X is set

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7046): Finalise support for the Pinnacle HD 8000i
Steven Toth [Wed, 16 Jan 2008 00:57:14 +0000 (21:57 -0300)]
V4L/DVB (7046): Finalise support for the Pinnacle HD 8000i

Correctly set the atatch structures, enable IR, configure the
xc5000 tuner includes.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7045): xc5000: Small amount of cleanup and commenting
Steven Toth [Sat, 5 Jan 2008 20:08:05 +0000 (17:08 -0300)]
V4L/DVB (7045): xc5000: Small amount of cleanup and commenting

xc5000: Small amount of cleanup and commenting, just for clarification.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7044): XC5000: Fix support for HVR1500Q broken by patch 1
Steven Toth [Sat, 5 Jan 2008 19:55:45 +0000 (16:55 -0300)]
V4L/DVB (7044): XC5000: Fix support for HVR1500Q broken by patch 1

From Zhang: This patch fixes support for the HVR1500Q which was broken
when the xc5000 analog patch was added.

Patch committed as-is, cleanups to follows .... Steve

Signed-off-by: Chaogui Zhang <czhang1974@gmail.com>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7043): New card supported(partially): Pinnacle 800i
Steven Toth [Sat, 5 Jan 2008 19:53:01 +0000 (16:53 -0300)]
V4L/DVB (7043): New card supported(partially): Pinnacle 800i

From Zhang: This patch continues the support for the Pinnacle HD 800i.

Patch committed as-is, cleanups to follow ... Steve

Signed-off-by: Chaogui Zhang <czhang1974@gmail.com>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
16 years agoV4L/DVB (7042): xc5000: Tuner analog support
Steven Toth [Sat, 5 Jan 2008 19:50:14 +0000 (16:50 -0300)]
V4L/DVB (7042): xc5000: Tuner analog support

From Zhang: This an updated patch that adds analog support for
the xc5000 tuner driver. it was tested on a Pinnacle PCTV HD 800i
card (patches to follow).

Patch commited as-is, cleanup to follow ... Steve.

Signed-off-by: Chaogui Zhang <czhang1974@gmail.com>
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>