summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ide: remove BUG() from ide_complete_rq()Bartlomiej Zolnierkiewicz2009-03-272-5/+7
| | | | | | | | It is no longer needed so remove it, also while at it dequeue the request only on blk_end_request() success and make ide_complete_rq() return an error value. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: move rq->errors quirk out from ide_end_request()Bartlomiej Zolnierkiewicz2009-03-277-5/+21
| | | | | | | | Move rq->errors quirk out from ide_end_request() to its call sites. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: pass error value to ide_complete_rq()Bartlomiej Zolnierkiewicz2009-03-277-18/+21
| | | | | | | | | | | | Set rq->errors at ide_complete_rq() call sites and then pass error value to ide_complete_rq(). [ Some rq->errors assignments look really wrong but this patch leaves them alone to not introduce too many changes at once. ] There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: sanitize ide_end_rq()Bartlomiej Zolnierkiewicz2009-03-272-19/+17
| | | | | | | | | | | * Move 'uptodate' quirk from ide_end_rq() to its users. * Move quirks for blk_noretry_request() and !blk_fs_request() requests from ide_end_rq() to ide_end_request(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add ide_end_rq() (v2)Bartlomiej Zolnierkiewicz2009-03-273-38/+13
| | | | | | | | | | | | | | | | | | * Move request dequeuing from __ide_end_request() to ide_end_request(). * Rename __ide_end_request() to ide_end_rq() and export it. * Fix ide_end_rq() to pass original blk_end_request() return value. * ide_end_dequeued_request() is used only in cdrom_end_request() so inline it there and then remove the function. v2: * Remove needless BUG_ON() while at it (start_request()'s one is enough). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: make ide_special_rq() BUG() on unknown requestsBartlomiej Zolnierkiewicz2009-03-271-3/+1
| | | | | | If unknown request reaches this function something is _seriously_ wrong. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: sanitize ide_finish_cmd()Bartlomiej Zolnierkiewicz2009-03-272-16/+13
| | | | | | | | | | * Move ide_end_request() call out from ide_finish_cmd() to its users. * Use ide_finish_cmd() in task_no_data_intr(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: use ide_complete_cmd() for REQ_UNPARK_HEADSBartlomiej Zolnierkiewicz2009-03-272-7/+7
| | | | | | | | | | | | * Fixup ->tf_flags in ide_do_park_unpark() to match their current use. * Use ide_complete_cmd() for REQ_UNPARK_HEADS. While at it: * No need to read Error register for PM requests in task_no_data_intr(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: use ide_complete_cmd() for head unload commandsBartlomiej Zolnierkiewicz2009-03-272-10/+14
| | | | | | | | Move handling of head unload commands from task_no_data_intr() to ide_complete_cmd() and then use ide_complete_cmd() also for head unload commands. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: task_error() -> task_error_cmd()Bartlomiej Zolnierkiewicz2009-03-271-4/+3
| | | | | | | | | | | | | * Move ide_error() call from task_error() to task_pio_intr() (the only user). * Drop no longer used arguments from task_error(). * Rename task_error() to ide_error_cmd(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: unify exit paths in task_pio_intr()Bartlomiej Zolnierkiewicz2009-03-271-20/+17
| | | | | | There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: inline task_in_unexpected() into task_pio_intr()Bartlomiej Zolnierkiewicz2009-03-271-23/+13
| | | | | | | | task_in_unexpected() is only used by task_pio_intr() so inline it there. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: merge task_{in,out}_intr()Bartlomiej Zolnierkiewicz2009-03-271-41/+31
| | | | | | | | | | * Merge task_out_intr() with task_in_intr(). * Rename task_in_intr() to task_pio_intr(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: use ata_tf_protocols enumsBartlomiej Zolnierkiewicz2009-03-278-89/+58
| | | | | | | | | | | | | | | * Add IDE_TFLAG_MULTI_PIO taskfile flag and set it for commands using multi-PIO protocol. * Use ata_tf_protocols enums instead of TASKFILE_* defines to denote command's protocol and then rename ->data_phase field to ->protocol. * Remove no longer needed <linux/hdreg.h> includes. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: set IDE_TFLAG_WRITE basing on data phase used in ide_taskfile_ioctl()Bartlomiej Zolnierkiewicz2009-03-271-4/+9
| | | | | | | | Also take care of fixing up incorrect TASKFILE_IN_DMA[Q] data phase when IDE_DRIVE_TASK_RAW_WRITE is requested (no need to do it for TASKFILE_NO_DATA and TASKFILE_[MULTI]_IN -- it had no chance of working previously). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: move command related fields from ide_hwif_t to struct ide_cmdBartlomiej Zolnierkiewicz2009-03-2712-61/+61
| | | | | | | | | | * Move command related fields from ide_hwif_t to struct ide_cmd. * Make ide_init_sg_cmd() take command and sectors number as arguments. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: pass command instead of request to ide_pio_datablock()Bartlomiej Zolnierkiewicz2009-03-2712-75/+76
| | | | | | | | | | | | | | | * Add IDE_TFLAG_FS taskfile flag and set it for REQ_TYPE_FS requests. * Convert ->{in,out}put_data methods to take command instead of request as an argument. Then convert pre_task_out_intr(), task_end_request(), task_error(), task_in_unexpected(), ide_pio_sector(), ide_pio_multi() and ide_pio_datablock() in similar way. * Rename task_end_request() to ide_finish_cmd(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove ide_task_t typedefBartlomiej Zolnierkiewicz2009-03-2722-497/+511
| | | | | | | | | | | | | | While at it: - rename struct ide_task_s to struct ide_cmd - remove stale comments from idedisk_{read_native,set}_max_address() - drop unused 'cmd' argument from ide_{cmd,task}_ioctl() - drop unused 'task' argument from tx4939ide_tf_load_fixup() - rename ide_complete_task() to ide_complete_cmd() - use consistent naming for struct ide_cmd variables There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: call ide_build_sglist() prior to ->dma_setup (v2)Bartlomiej Zolnierkiewicz2009-03-2710-41/+24
| | | | | | | | | | | | | | | | * Re-map sg table if needed in ide_build_sglist(). * Move ide_build_sglist() call from ->dma_setup to its users. * Un-export ide_build_sglist(). v2: * Build fix for CONFIG_BLK_DEV_IDEDMA=n (noticed by Randy Dunlap). There should be no functional changes caused by this patch. Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: use blk_fs_request() check in ide-taskfile.cBartlomiej Zolnierkiewicz2009-03-271-3/+3
| | | | | | | | | | Use blk_fs_request() in ide-taskfile.c instead of checking for: - rq->bio in ide_pio_datablock() and task_error() - rq->cmd_type == REQ_TYPE_ATA_TASKFILE in task_end_request() There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: return request status from ->pc_callback methodBartlomiej Zolnierkiewicz2009-03-274-18/+18
| | | | | | | | | | Make ->pc_callback method return request status and then move the request completion from ->pc_callback to ide_pc_intr(). There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove ->end_request methodBartlomiej Zolnierkiewicz2009-03-277-54/+7
| | | | | | | | | | | | * Handle completion of private driver requests explicitly for ide_floppy and ide_tape media in ide_kill_rq(). * Remove no longer needed ->end_request method. There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-{floppy,tape}: cleanup ide*_end_request()Bartlomiej Zolnierkiewicz2009-03-272-53/+53
| | | | | | | | | | | | | | | | * ide*_end_request() is only called with uptodate == 0 or uptodate == 1 so cleanup it accordingly. * Inline ide*_end_request() content at call sites so the only user left is ->end_request method. * ->end_request is now used only for private driver requests so remove handling of other requests from ide*_end_request(). There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: use ->end_request only for private device driver requestsBartlomiej Zolnierkiewicz2009-03-275-31/+25
| | | | | | | | | | | | | | * Move IDE{FLOPPY,TAPE}_ERROR_* defines to <linux/ide.h> and rename them to IDE_DRV_ERROR_*. * Handle ->end_request special cases for floppy/tape media in ide_kill_rq(). * Call ->end_request only for private device driver requests. There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: move ->failed_pc to ide_drive_tBartlomiej Zolnierkiewicz2009-03-274-32/+23
| | | | | | | | | Move ->failed_pc from struct ide_{disk,tape}_obj to ide_drive_t. There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-tape: remove superfluous tape->lockBartlomiej Zolnierkiewicz2009-03-271-9/+0
| | | | | | | tape->lock is not needed (->queue_lock protects queue). Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: remove superfluous check from ide_floppy_end_request()Bartlomiej Zolnierkiewicz2009-03-271-3/+1
| | | | | | | There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove no longer needed PC_FLAG_TIMEDOUT packet command flagBartlomiej Zolnierkiewicz2009-03-272-7/+0
| | | | | | | There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* au1xxx-ide: auide_dma_end() cleanupBartlomiej Zolnierkiewicz2009-03-271-6/+1
| | | | | | | | No need to check / clear hwif->sg_nents. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* trm290: trm290_dma_setup() fixBartlomiej Zolnierkiewicz2009-03-271-0/+1
| | | | | | | Re-map sg table if necessary (not that it really matters since DMA support is disabled currently). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* icside: icside_dma_setup() fixesBartlomiej Zolnierkiewicz2009-03-271-0/+4
| | | | | | Check for ide_build_sglist() return value and re-map sg table if necessary. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: move smart_enable() call out from get_smart_data()Bartlomiej Zolnierkiewicz2009-03-271-1/+3
| | | | | | | | | Move smart_enable() call out from get_smart_data() to proc_idedisk_read_smart(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove ->data_phase field from ide_hwif_tBartlomiej Zolnierkiewicz2009-03-275-21/+10
| | | | | | | | | | | | * Always use hwif->task->data_phase and remove ->data_phase field from ide_hwif_t. * Remove superfluous REQ_TYPE_ATA_TASKFILE check from ide_pio_datablock() while at it. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: no need to read Status and Error registers for "empty" taskfile requestsBartlomiej Zolnierkiewicz2009-03-271-3/+1
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: move request type specific code from ide_end_drive_cmd() to callers (v3)Bartlomiej Zolnierkiewicz2009-03-276-41/+43
| | | | | | | | | | | | | | | | | | | * Move request type specific code from ide_end_drive_cmd() to callers. * Remove stale ide_end_drive_cmd() documentation and drop no longer used 'stat' argument. Then rename the function to ide_complete_rq(). v2: * Fix handling of blk_pm_request() requests in task_no_data_intr(). v3: * Some ide_no_data_taskfile() users (HPA code and HDIO_DRIVE_* ioctls handlers) access original command later so we need to update it in ide_complete_task(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: factor out completion of taskfile from ide_end_drive_cmd()Bartlomiej Zolnierkiewicz2009-03-271-11/+16
| | | | | | | | | Factor out completion of taskfile from ide_end_drive_cmd() to ide_complete_task(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: complete power step in ide_complete_pm_request()Bartlomiej Zolnierkiewicz2009-03-273-9/+10
| | | | | | | | | | * Complete power step in ide_complete_pm_request(). * Rename ide_complete_pm_request() to ide_complete_pm_rq(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add "flagged" taskfile flags to struct ide_taskfile (v2)Bartlomiej Zolnierkiewicz2009-03-279-56/+60
| | | | | | | | | | | | | | | | | | | | * Add ->ftf_flags field to struct ide_taskfile and convert flags for TASKFILE ioctl to use it. * Rename "flagged" taskfile flags: - IDE_TFLAG_FLAGGED -> IDE_FTFLAG_FLAGGED - IDE_TFLAG_FLAGGED_SET_IN_FLAGS -> IDE_FTFLAG_SET_IN_FLAGS - IDE_TFLAG_{OUT,IN}_DATA -> IDE_FTFLAG_{OUT,IN}_DATA v2: * Remember to fully update ide-h8300.c, scc_pata.c and tx493{8,9}ide.c (thanks to Stephen Rothwell for noticing). There should be no functional changes caused by this patch. Cc: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add IDE_HFLAG_4DRIVES host flagBartlomiej Zolnierkiewicz2009-03-273-3/+6
| | | | | | | | | Add IDE_HFLAG_4DRIVES host flag and use it instead of ide_4drives chipset type in ide_init_port(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add IDE_HFLAG_DTC2278 host flagBartlomiej Zolnierkiewicz2009-03-273-2/+5
| | | | | | | | | Add IDE_HFLAG_DTC2278 host flag and use it instead of ide_dtc2278 chipset type in ide_init_port(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove now superfluous check from ide_host_register()Bartlomiej Zolnierkiewicz2009-03-271-12/+7
| | | | | | There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: allow host drivers to specify IRQ flagsBartlomiej Zolnierkiewicz2009-03-2713-21/+26
| | | | | | | | | | | | | * Add ->irq_flags field to struct ide_port_info and struct ide_host. * Update host drivers and IDE PCI code to use ->irq_flags field. * Convert init_irq() and ide_intr() to use host->irq_flags. This fixes handling of shared IRQs for non-PCI hosts and removes ugly ifdeffery from core IDE code. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: fix error message in pre_task_out_intr()Bartlomiej Zolnierkiewicz2009-03-271-1/+3
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: fix memleak on failure in probe_for_drive()Bartlomiej Zolnierkiewicz2009-03-272-15/+9
| | | | | | | | | | Always free drive->id in probe_for_drive() if device is not present. While at it: - remove dead IDE_DFLAG_DEAD flag - remove superfluous IDE_DFLAG_PRESENT check Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* scc_pata: remove DECLARE_SCC_DEV() macro (v2)Bartlomiej Zolnierkiewicz2009-03-271-16/+11
| | | | | | | | v2: scc_chipsets[] -> scc_chipset fix (spotted by Daniel K.). Cc: "Daniel K." <daniel@cluded.net> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: include <asm/ide.h> only when neededBartlomiej Zolnierkiewicz2009-03-274-7/+11
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* at91_ide: use readsw()/writesw() directlyBartlomiej Zolnierkiewicz2009-03-271-2/+2
| | | | | | | | Use readsw()/writesw() directly intead of __ide_mm_{in,out}sw() macros. Cc: Stanislaw Gruszka <stf_xl@wp.pl> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: use ide_drive_t's rq in cdrom_queue_request_senseBorislav Petkov2009-03-272-3/+1
| | | | | | | | There should be no functionality change resulting from this patch. Suggested-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* IDE: palm_bk3710: use ioremap instead of arch-specific IO_ADDRESS()Kevin Hilman2009-03-271-4/+9
| | | | | | | Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> [bart: minor CodingStyle fixup per Sergei's suggestion] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: cleanup <asm-m68k/ide.h>Bartlomiej Zolnierkiewicz2009-03-273-38/+4
| | | | | | | | | | | | | | | | * Remove superfluous <asm/macints.h> include. * No need to re-define in/out*() macros as they are no longer used by m68k host drivers. * readl() and writel() are not used by core IDE code. * Use raw_*_swapw() directly in {falcon,q40}ide.c and remove {in,out}sw_swapw() macros. Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Michael Schmitz <schmitz@debian.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>