* Coding style fixes for VERBOSE_IDE_CD_ERRORS code.
* Add KERN_{ERR,CONT} printk() levels where needed.
This is a preparation for moving this code out of ide-cd.[c,h].
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Re-organize handling of quirky devices:
* Add struct cd_list_entry, ide_cd_quirks_list[] and ide_cd_flags() helper.
* Set flags returned by ide_cd_flags() in ide_cdrom_setup().
* Add IDE_CD_FLAG_VERTOS_{300_SDD,600_ESD} and IDE_CD_FLAG_SANYO_3CD flags.
* Move device quirks from ide_cdrom_setup() to ide_cd_quirks_list[].
* Rename IDE_CD_FLAG_NEC260 to IDE_CD_FLAG_PRE_ATAPI12 and handle
quirky Stingray 8X CD-ROM using ide_cd_quirks_list[].
* Add IDE_CD_FLAG_FULL_CAPS_PAGE flag and handle quirky ACER 50X CD-ROM
/ WPI 32X CD-ROM using ide_cd_quirk_list[].
* Add IDE_CD_FLAG_PLAY_AUDIO_OK flag and handle quirky MATSHITA DVD-ROMs
using ide_cd_quirks_list[].
* Add IDE_CD_FLAG_LE_SPEED_FIELDS flag and handle quirky ACER/AOpen 24X
CD-ROM using ide_cd_quirk_list[].
* Fix some comments about quirky devices while at it.
There should be no functionality changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Use BCD2BIN()/BIN2BCD() macros from <linux/bcd.h>
and remove the local bcd2bin()/bin2bcd() inlines.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Remove unused ->{writing,reserved} fields from struct ide_cd_config_flags.
* Move ->max_speed from struct ide_cd_config_flags to struct cdrom_info.
* Move ->current_speed from struct ide_cd_state_flags to struct cdrom_info.
* Add defines for config and state flags.
* Add 'unsigned int cd_flags' to struct cdrom_info and use ->cd_flags
instead of ->{config,state}_flags.
* Remove no longer needed struct ide_cd_{config,state}_flags.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
While at it rename 'info' variable to 'cd' in
ide_cdrom_probe_capabilities() and ide_cdrom_setup().
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* Use CDC_* flags directly and remove redundant flags from ->config_flags.
While at it:
* Add KERN_CONT to printk()-s in ide_cdrom_probe_capabilities().
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
ide_cd_probe() zeroes 'info' prior to calling ide_cdrom_setup() so there
is no need to explicitly zero 'info' fields in the latter function.
Ditto for fields of CDROM_STATE_FLAGS(), CDROM_CONFIG_FLAGS() and 'cdi'
(all are embedded in 'info').
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Make cdrom_newpc_intr() match cdrom_{read,write}_intr() w.r.t.
handling DMA errors:
* disable DMA before cdrom_decode_status() call
* log the device name and the type of the request (read/write)
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
If drive still wants to transfer the data we need to pad the transfer
instead of just finishing the request.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Add ide_cd_pad_transfer() helper and use it in cdrom_[new]pc_intr()
and cdrom_{read,write}_check_ireason().
There should be no functionality changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Unify writing and reading handling in cdrom_pc_intr() using xfer_func_t.
There should be no functionality changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This patch fixes the following section mismatch:
<-- snip -->
...
WARNING: vmlinux.o(.text+0x3b641c): Section mismatch in reference from the function .pmac_ide_setup_device() to the function .init.text:.pmac_ide_setup_dma()
...
<-- snip -->
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
After commit 7267c33774
wait_drive_not_busy() can become static again.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
- ide_scan_pcibus() can become static
- instead of ide_scan_pci() we can use ide_scan_pcibus() directly
in module_init()
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
ide_dma_on can be unexported.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To avoid confusion between 'built-in' drivers and 'on-board'
controllers, consistently use the term 'on-board' for controllers.
Minor line-wrapping improvements in descriptions for config options.
[ Bart: thanks to Jan for 'built-in'->'on-board' suggestion ]
Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Commit cbb010c180
ide: drop 'initializing' argument from ide_register_hw()
* Rename init_hwif_data() to ide_init_port_data() and export it.
* For all users of ide_register_hw() with 'initializing' argument set
hwif->present and hwif->hold are always zero so convert these host
drivers to use ide_find_port()+ide_init_port_data()+ide_init_port_hw()
instead (also no need for init_hwif_default() call since the setup
done by it gets over-ridden by ide_init_port_hw() call).
* Drop 'initializing' argument from ide_register_hw().
introduced the usage of a hwif variable, but forgot to declare the actual
variable.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
block: kill swap_io_context()
as-iosched: fix inconsistent ioc->lock context
ide-cd: fix leftover data BUG
block: make elevator lib checkpatch compliant
cfq-iosched: make checkpatch compliant
block: make core bits checkpatch compliant
block: new end request handling interface should take unsigned byte counts
unexport add_disk_randomness
block/sunvdc.c:print_version() must be __devinit
splice: always updated atime in direct splice
It blindly copies everything in the io_context, including the lock.
That doesn't work so well for either lock ordering or lockdep.
There seems zero point in swapping io contexts on a request to request
merge, so the best point of action is to just remove it.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Fix docbook fatal error (files were renamed):
docproc: linux-2.6.24-git9/arch/ppc/kernel/rio.c: No such file or directory
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Doing a make randconfig I came across this error in the Makefile.
This patch makes a directory out of arch/x86/mach-default for
CONFIG_X86_RDC321X
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[POWERPC] pasemi: Fix thinko in dma_direct_ops setup
The first patch will just fall through and still set dma_data to a bad
value, make it return directly instead.
Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Remove all the dead timer interrupt checking functions for the ColdFire
CPU "timers" hardware that are not used after switching to GENERIC_TIME.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Switching to GENERIC_TIME means we no longer need the empty timer offset
function for the 68360 CPU.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Remove unused local gettimeofday functions, now that we are using
GENERIC_TIME.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Switch the 68328 CPU timer code to using GENERIC_TIME.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Fix problems with the 528x ColdFire CPU cache setup.
Do not cache the flash region (if present), and make the runtime
settings consistent with the init setting.
Problems pointed out by Bernd Buttner <b.buettner@mkc-gmbh.de>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Use container_of() instead of assuming local uart struct is first member
of uart_port struct.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>