aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-04-27ide-tape: remove misc references to pipelined operation in the commentsBorislav Petkov
Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-27ide-tape: remove pipelined mode parametersBorislav Petkov
Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-27ide-tape: remove pipeline-specific members from struct ide_tape_objBorislav Petkov
Bart: - merge "ide-tape: remove pipeline-specific code from idetape_setup" patch - cleanup __idetape_discard_read_pipeline() - cleanup idetape_empty_write_pipeline() - fix 't' assignment in idetape_setup() - fix idetape_blkdev_ioctl() w.r.t. 'nr_stages' Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-27ide-tape: remove pipelined mode tape control flagsBorislav Petkov
[bart: sync patch with current code and fix idetape_init_read()] Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-27ide-tape: remove remaining pipeline functionalityBorislav Petkov
The driver is using now solely its own request queue. - tape->next_stage is always NULL so it is safe to remove all code depending on tape->next_stage != NULL - this patch removes the last place which sets IDETAPE_FLAG_PIPELINE_ACTIVE in tape->flags [bart: add above explanations] Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-27ide-tape: unwrap idetape_queue_pc_tail()Borislav Petkov
idetape_queue_pc_tail() is a wrapper for its __idetape_queue_pc_tail() counterpart and has no other functionality. Remove it and call the "wrapped" function directly. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-27ide-tape: remove pipeline-specific code from idetape_end_request()Borislav Petkov
As a side effect, remove unused idetape_kfree_stage() and idetape_abort_pipeline() [bart: resurrect taking tape->lock + clearing IDETAPE_FLAG_PIPELINE_ACTIVE] Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-27ide-tape: remove idetape_remove_stage_head()Borislav Petkov
Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-27ide-tape: remove idetape_pipeline_size()Borislav Petkov
The computation of the block offset of the the tape position (MTIOCPOS, MTIOCGET) is not influenced by the stages queued in the pipeline anymore but by the size of the current buffer which is going to be sent to the drive. [bart: resurrect deleted idetape_wait_for_pipeline() call] Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-27ide-tape: remove pipeline-specific code in idetape_space_over_filemarks()Borislav Petkov
Since we don't do pipeline read-ahead anymore, we don't have to look for filemarks we have crossed. Therefore, remove the code chunk that does that and pass on the command to the tape. As a side effect, remove unused idetape_wait_first_stage(). Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-27ide-tape: remove unused parameter from idetape_copy_stage_from_userBorislav Petkov
Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-27ide-tape: remove unused parameter from idetape_copy_stage_to_userBorislav Petkov
Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-27ide-tape: remove pipeline-specific code from idetape_add_chrdev_read_request()Borislav Petkov
In order to do away with queueing read requests on the pipeline, several things have to be done: 1. Do not allocate additional pipeline stages in idetape_init_read() until (tape->nr_stages < max_stages) and do only read operation preparations. As a collateral result, idetape_add_stage_tail() becomes unused so remove it. 2. Queue the read request's buffer directly thru idetape_queue_rw_tail(). 3. Remove now unused idetape_kmalloc_stage() and idetape_switch_buffers(). [bart: simplify the original patch] Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-27ide-tape remove pipeline speed/control calculationsBorislav Petkov
Pipeline handling calculations in idetape_calculate_speeds() can go since they do not have any effect on other functionality besides: 1. info is only being exported through /proc as a read-only item (controlled_pipeline_head_speed, uncontrolled_pipeline_head_speed) 2. used in idetape_restart_speed_control() which, in turn, is unrelated to other code 3. used only for pipeline frames number accounting (tape->pipeline_head), also unused elsewhere. 4.some variables are: only written to: tape->buffer_head; unused: tape->tape_head, tape->last_tape_head Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-27ide-tape: remove pipeline-specific code from idetape_add_chrdev_write_requestBorislav Petkov
Refrain from adding more write requests to the pipeline and queue them directly on the device's request queue instead. [bart: re-do for minimal behavior changes] Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-27ide-tape: remove tape->cache_stageBorislav Petkov
Prior to allocating a new pipeline stage, the code checked for the existence of a cached pipeline stage to use. Do away with and stick to normal pipeline stages only. [bart: keep idetape_kmalloc_stage() for now] Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-27ide: remove obsoleted "hdx=noautotune" kernel parameterBartlomiej Zolnierkiewicz
Remove obsoleted "hdx=noautotune" kernel parameter (it has been obsoleted since 1 Nov 2004). Then make ide_hwif_t.autotune a single bit flag and remove no longer needed IDE_TUNE_* defines. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-27ide: remove obsoleted "idex=" kernel parametersBartlomiej Zolnierkiewicz
* Remove obsoleted "idex=" kernel parameters. * Make probe_* and cmd640_vlb variables static. Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-27ide: remove obsoleted "idex=reset" kernel parameterBartlomiej Zolnierkiewicz
Remove obsoleted "idex=reset" kernel parameter (it has been obsoleted since 1 Nov 2004). Then remove corresponding code from ide_probe_port() and no longer used ->reset field from ide_hwif_t. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-27ide: remove obsoleted "idex=serialize" kernel parameterBartlomiej Zolnierkiewicz
Remove obsoleted "idex=serialize" kernel parameter (it has been obsoleted since 1 Nov 2004). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-27ide: add "ignore_cable" parameter (take 2)Bartlomiej Zolnierkiewicz
Add "ignore_cable" parameter: * "ide_core.ignore_cable=[interface_number]" boot option if IDE is built-in (i.e. "ide_core.ignore_cable=1" to force ignoring cable for "ide1") * "ignore_cable=[interface_number]" module parameter (for ide_core module) if IDE is compiled as module v2: * Add ide_port_apply_params() helper - use it in ide_device_add_all() and ide_scan_port(). * Make it possible to later disable ignoring cable detection by passing "[interface_number]:0" to /sys/module/ide_core/parameters/ignore_cable (however sysfs interface is not enabled yet since it needs some other IDE changes to make it work reliable). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-27ide: fix icside breakageAl Viro
Fallout from commit ac95beedf8bc97b24f9540d4da9952f07221c023 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-bigbox-bootmem-v3 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-bigbox-bootmem-v3: x86_64/mm: check and print vmemmap allocation continuous x86_64: fix setup_node_bootmem to support big mem excluding with memmap x86_64: make reserve_bootmem_generic() use new reserve_bootmem() mm: allow reserve_bootmem() cross nodes mm: offset align in alloc_bootmem() mm: fix alloc_bootmem_core to use fast searching for all nodes mm: make mem_map allocation continuous
2008-04-26Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuildLinus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: kbuild: scripts/Makefile.modpost typo fix kbuild: soften MODULE_LICENSE check
2008-04-26x86_64/mm: check and print vmemmap allocation continuousYinghai Lu
On big systems with lots of memory, don't print out too much during bootup, and make it easy to find if it is continuous. on 256G 8 sockets system will get [ffffe20000000000-ffffe20002bfffff] PMD -> [ffff810001400000-ffff810003ffffff] on node 0 [ffffe2001c700000-ffffe2001c7fffff] potential offnode page_structs [ffffe20002c00000-ffffe2001c7fffff] PMD -> [ffff81000c000000-ffff8100255fffff] on node 0 [ffffe20038700000-ffffe200387fffff] potential offnode page_structs [ffffe2001c800000-ffffe200387fffff] PMD -> [ffff810820200000-ffff81083c1fffff] on node 1 [ffffe20040000000-ffffe2007fffffff] PUD ->ffff811027a00000 on node 2 [ffffe20038800000-ffffe2003fffffff] PMD -> [ffff811020200000-ffff8110279fffff] on node 2 [ffffe20054700000-ffffe200547fffff] potential offnode page_structs [ffffe20040000000-ffffe200547fffff] PMD -> [ffff811027c00000-ffff81103c3fffff] on node 2 [ffffe20070700000-ffffe200707fffff] potential offnode page_structs [ffffe20054800000-ffffe200707fffff] PMD -> [ffff811820200000-ffff81183c1fffff] on node 3 [ffffe20080000000-ffffe200bfffffff] PUD ->ffff81202fa00000 on node 4 [ffffe20070800000-ffffe2007fffffff] PMD -> [ffff812020200000-ffff81202f9fffff] on node 4 [ffffe2008c700000-ffffe2008c7fffff] potential offnode page_structs [ffffe20080000000-ffffe2008c7fffff] PMD -> [ffff81202fc00000-ffff81203c3fffff] on node 4 [ffffe200a8700000-ffffe200a87fffff] potential offnode page_structs [ffffe2008c800000-ffffe200a87fffff] PMD -> [ffff812820200000-ffff81283c1fffff] on node 5 [ffffe200c0000000-ffffe200ffffffff] PUD ->ffff813037a00000 on node 6 [ffffe200a8800000-ffffe200bfffffff] PMD -> [ffff813020200000-ffff8130379fffff] on node 6 [ffffe200c4700000-ffffe200c47fffff] potential offnode page_structs [ffffe200c0000000-ffffe200c47fffff] PMD -> [ffff813037c00000-ffff81303c3fffff] on node 6 [ffffe200c4800000-ffffe200e07fffff] PMD -> [ffff813820200000-ffff81383c1fffff] on node 7 instead of a very long print out... Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-26x86_64: fix setup_node_bootmem to support big mem excluding with memmapYinghai Lu
typical case: four sockets system, every node has 4g ram, and we are using: memmap=10g$4g to mask out memory on node1 and node2 when numa is enabled, early_node_mem is used to get node_data and node_bootmap. if it can not get memory from the same node with find_e820_area(), it will use alloc_bootmem to get buff from previous nodes. so check it and print out some info about it. need to move early_res_to_bootmem into every setup_node_bootmem. and it takes range that node has. otherwise alloc_bootmem could return addr that reserved early. depends on "mm: make reserve_bootmem can crossed the nodes". Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-26x86_64: make reserve_bootmem_generic() use new reserve_bootmem()Yinghai Lu
"mm: make reserve_bootmem can crossed the nodes" provides new reserve_bootmem(), let reserve_bootmem_generic() use that. reserve_bootmem_generic() is used to reserve initramdisk, so this way we can make sure even when bootloader or kexec load ranges cross the node memory boundaries, reserve_bootmem still works. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-26mm: allow reserve_bootmem() cross nodesYinghai Lu
split reserve_bootmem_core() into two functions, one which checks conflicts, and one which sets the bits. and make reserve_bootmem to loop bdata_list to cross the nodes. user could be crashkernel and ramdisk..., in case the range provided by those externalities crosses the nodes. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-26mm: offset align in alloc_bootmem()Yinghai Lu
need offset alignment when node_boot_start's alignment is less than the alignment required. use local node_boot_start to match alignment - so don't add extra operation in search loop. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-26mm: fix alloc_bootmem_core to use fast searching for all nodesYinghai Lu
Make the nodes other than node 0 use bdata->last_success for fast search too. We need to use __alloc_bootmem_core() for vmemmap allocation for other nodes when numa and sparsemem/vmemmap are enabled. Also, make fail_block path increase i with incr only after ALIGN to avoid extra increase when size is larger than align. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-26mm: make mem_map allocation continuousYinghai Lu
vmemmap allocation currently has this layout: [ffffe20000000000-ffffe200001fffff] PMD ->ffff810001400000 on node 0 [ffffe20000200000-ffffe200003fffff] PMD ->ffff810001800000 on node 0 [ffffe20000400000-ffffe200005fffff] PMD ->ffff810001c00000 on node 0 [ffffe20000600000-ffffe200007fffff] PMD ->ffff810002000000 on node 0 [ffffe20000800000-ffffe200009fffff] PMD ->ffff810002400000 on node 0 ... note that there is a 2M hole between them - not optimal. the root cause is that usemap (24 bytes) will be allocated after every 2M mem_map, and it will push next vmemmap (2M) to the next (2M) alignment. solution: try to allocate the mem_map continously. after the patch, we get: [ffffe20000000000-ffffe200001fffff] PMD ->ffff810001400000 on node 0 [ffffe20000200000-ffffe200003fffff] PMD ->ffff810001600000 on node 0 [ffffe20000400000-ffffe200005fffff] PMD ->ffff810001800000 on node 0 [ffffe20000600000-ffffe200007fffff] PMD ->ffff810001a00000 on node 0 [ffffe20000800000-ffffe200009fffff] PMD ->ffff810001c00000 on node 0 ... which is the ideal layout. and usemap will share a page because of they are allocated continuously too: sparse_early_usemap_alloc: usemap = ffff810024e00000 size = 24 sparse_early_usemap_alloc: usemap = ffff810024e00080 size = 24 sparse_early_usemap_alloc: usemap = ffff810024e00100 size = 24 sparse_early_usemap_alloc: usemap = ffff810024e00180 size = 24 ... so we make the bootmem allocation more compact and use less memory for usemap => mission accomplished ;-) Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-04-26Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-generic-bitops-v3 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-generic-bitops-v3: x86, bitops: select the generic bitmap search functions x86: include/asm-x86/pgalloc.h/bitops.h: checkpatch cleanups - formatting only x86: finalize bitops unification x86, UML: remove x86-specific implementations of find_first_bit x86: optimize find_first_bit for small bitmaps x86: switch 64-bit to generic find_first_bit x86: generic versions of find_first_(zero_)bit, convert i386 bitops: use __fls for fls64 on 64-bit archs generic: implement __fls on all 64-bit archs generic: introduce a generic __fls implementation x86: merge the simple bitops and move them to bitops.h x86, generic: optimize find_next_(zero_)bit for small constant-size bitmaps x86, uml: fix uml with generic find_next_bit for x86 x86: change x86 to use generic find_next_bit uml: Kconfig cleanup uml: fix build error
2008-04-26Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (46 commits) ide: constify struct ide_dma_ops ide: add struct ide_dma_ops (take 3) ide: add IDE_HFLAG_SERIALIZE_DMA host flag sl82c105: check bridge revision in sl82c105_init_one() au1xxx-ide: use ->init_dma method palm_bk3710: use ->init_dma method sgiioc4: use ->init_dma method icside: use ->init_dma method ide-pmac: use ->init_dma method ide: do complete DMA setup in ->init_dma method (take 2) au1xxx-ide: fix MWDMA support ide: cleanup ide_setup_dma() ide: factor out setting PCI bus-mastering from ide_hwif_setup_dma() ide: export ide_allocate_dma_engine() ide: move ide_setup_dma() call out from ->init_dma method alim15x3: skip DMA initialization completely on revs < 0x20 pdc202xx_old: remove init_dma_pdc202xx() ide: don't display "BIOS" settings in ide_setup_dma() ide: remove ->cds field from ide_hwif_t (take 2) ide: remove ide_dma_iobase() ...
2008-04-26Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-bigbox-bootparam * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86-bigbox-bootparam: x86, boot: Document for linked list of struct setup_data x86, boot: export linked list of struct setup_data via debugfs x86, boot: add linked list of struct setup_data x86, boot: add free_early to early reservation machanism
2008-04-26ide: constify struct ide_dma_opsBartlomiej Zolnierkiewicz
* Export ide_dma_exec_cmd() and __ide_dma_test_irq(). * Constify struct ide_dma_ops. * Always set hwif->dma_ops to &sff_dma_ops in ide_setup_dma() (it is later overriden by ide_init_port() if needed) and drop 'const struct ide_port_info *d' argument. While at it: * Rename __ide_dma_test_irq() to ide_dma_test_irq(). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide: add struct ide_dma_ops (take 3)Bartlomiej Zolnierkiewicz
Add struct ide_dma_ops and convert core code + drivers to use it. While at it: * Drop "ide_" prefix from ->ide_dma_end and ->ide_dma_test_irq methods. * Drop "ide_" "infixes" from DMA methods. * au1xxx-ide.c: - use auide_dma_{test_irq,end}() directly in auide_dma_timeout() * pdc202xx_old.c: - drop "old_" "infixes" from DMA methods * siimage.c: - add siimage_dma_test_irq() helper - print SATA warning in siimage_init_one() * Remove no longer needed ->init_hwif implementations. v2: * Changes based on review from Sergei: - s/siimage_ide_dma_test_irq/siimage_dma_test_irq/ - s/drive->hwif/hwif/ in idefloppy_pc_intr(). - fix patch description w.r.t. au1xxx-ide changes - fix au1xxx-ide build - fix naming for cmd64*_dma_ops - drop "ide_" and "old_" infixes - s/hpt3xxx_dma_ops/hpt37x_dma_ops/ - s/hpt370x_dma_ops/hpt370_dma_ops/ - use correct DMA ops for HPT302/N, HPT371/N and HPT374 - s/it821x_smart_dma_ops/it821x_pass_through_dma_ops/ v3: * Two bugs slipped in v2 (noticed by Sergei): - use correct DMA ops for HPT374 (for real this time) - handle HPT370/HPT370A properly Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide: add IDE_HFLAG_SERIALIZE_DMA host flagBartlomiej Zolnierkiewicz
* Add IDE_HFLAG_SERIALIZE_DMA host flag to serialize ports if DMA is available and handle it in ide_init_port(). * Convert sl82c105 host driver to use this new flag. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26sl82c105: check bridge revision in sl82c105_init_one()Bartlomiej Zolnierkiewicz
* Make sl82c105_bridge_revision() return 'u8' instead of 'unsigned long'. * Check bridge revision in sl82c105_init_one(). While at: * Use proper KERN_ level for printk(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26au1xxx-ide: use ->init_dma methodBartlomiej Zolnierkiewicz
* Pass 'ide_hwif_t *hwif' instead of '_auide_hwif *auide' to auide_ddma_init(). * Add 'const struct ide_port_info *d' argument to auide_ddma_init(). * Convert the driver to use ->init_dma method. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26palm_bk3710: use ->init_dma methodBartlomiej Zolnierkiewicz
* Move DMA setup to palm_bk3710_init_dma(). * Convert the driver to use ->init_dma method. Cc: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26sgiioc4: use ->init_dma methodBartlomiej Zolnierkiewicz
* Move dma_base check from sgiioc4_ide_setup_pci_device() to ide_dma_sgiioc4(). * Replace ide_dma_sgiioc4() 'unsigned long dma_base' argument by 'const struct ide_port_info *d'. * Move hwif->INB setup from ide_init_sgiioc4() to sgiioc4_ide_setup_pci_device(). * Move ide_init_sgiioc4() call from sgiioc4_ide_setup_pci_device() to ide_dma_sgiioc4(). * Convert the driver to use ->init_dma method. Cc: Jeremy Higdon <jeremy@sgi.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26icside: use ->init_dma methodBartlomiej Zolnierkiewicz
* Add 'const struct ide_port_info *d' argument to icside_dma_init(). * Make icside_dma_init() return an error value and add icside_dma_off_init() (->init_dma implementation for case when DMA cannot be enabled). * Convert the driver to use ->init_dma method. Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide-pmac: use ->init_dma methodBartlomiej Zolnierkiewicz
* Move pmif->dma_regs check from pmac_ide_setup_device() to pmac_ide_init_dma(). * Get 'pmif' from 'hwif->hwif_data' in pmac_ide_init_dma() and replace 'pmac_ide_hwif_t *pmif' argument by 'const struct ide_port_info *d'. * Add pmac_ide_init_dma() implementation for CONFIG_BLK_DEV_IDEDMA_PMAC=n case and convert the driver to use ->init_dma method. Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide: do complete DMA setup in ->init_dma method (take 2)Bartlomiej Zolnierkiewicz
* Make ide_hwif_setup_dma() return an error value. * Pass 'const struct ide_port_info *d' instead of 'unsigned long dmabase' to ->init_dma method and make it return an error value. * Rename ide_get_or_set_dma_base() to ide_pci_dma_base(), change ordering of its arguments and then export it. * Export ide_pci_set_master(). * Do complete DMA setup inside ->init_dma method and update ->init_dma users accordingly. * Sanitize code for DMA setup in ide_init_port(). v2: * Fix for CONFIG_BLK_DEV_IDEDMA_PCI=n configs (from Jiri Slaby <jirislaby@gmail.com>): Fix following compiler warning by returning EINVAL: In file included from ANYTHING-INCLUDING-IDE.H:45: include/linux/ide.h: In function ‘ide_hwif_setup_dma’: include/linux/ide.h:1022: warning: no return statement in function returning non-void Cc: Jiri Slaby <jirislaby@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26au1xxx-ide: fix MWDMA supportBartlomiej Zolnierkiewicz
Always use "fast" MWDMA support and remove dma_{black,white}_list (they were based on completely bogus ->ide_dma_check implementation which didn't set neither the host controller timings nor the device for the desired transfer mode). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide: cleanup ide_setup_dma()Bartlomiej Zolnierkiewicz
* There is no need to call ide_release_dma_engine(). * Move the code up to (and including) ide_allocate_dma_engine() call to the callers of ide_setup_dma(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide: factor out setting PCI bus-mastering from ide_hwif_setup_dma()Bartlomiej Zolnierkiewicz
Factor out setting PCI bus-mastering from ide_hwif_setup_dma() to ide_pci_set_master() helper. While at it: * don't read PCI Command register if not necessary * use PCI device name instead of hwif->name * cleanup ide_hwif_setup_dma() a bit Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide: export ide_allocate_dma_engine()Bartlomiej Zolnierkiewicz
Export ide_allocate_dma_engine() and use it in trm290 host driver. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26ide: move ide_setup_dma() call out from ->init_dma methodBartlomiej Zolnierkiewicz
There should be no functional changes caused by this patch. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-04-26alim15x3: skip DMA initialization completely on revs < 0x20Bartlomiej Zolnierkiewicz
Skip DMA initialization completely on revs < 0x20 by setting IDE_HFLAG_NO_DMA host flag and resetting DMA host masks in alim15x3_init_one() (currently ide_hwif_setup_dma() will try to obtain DMA base and setup PCI bus-mastering but init_dma_ali15x3() will fail). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>