aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
Commit message (Collapse)AuthorAge
* ide-floppy: add more debugging to idefloppy_pc_intr()Bartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | | | | | | | | Add more debugging to idefloppy_pc_intr() to match ide-tape's idetape_pc_intr(). While at it: * Correct the first debug message. * Log device name with "DMA finished" message. This is a preparation for adding generic ide_pc_intr() helper. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-tape: always log debug info in idetape_pc_intr() if debugging is enabledBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | | | | | | | | Add DBG_PC_INTR debug level and use it to always log debug info in idetape_pc_intr() if debugging is enabled. While at it: * Use drive->name instead of tape->name. * Log device name with "DMA finished" message. This is a preparation for adding generic ide_pc_intr() helper. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-tape: add ide_tape_io_buffers() helperBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | | | | | * Add ide_tape_io_buffers() helper which is a wrapper for idetape_{in,out}put_buffers() and convert idetape_pc_intr() to use it. * Remove no longer used idetape_io_buf typedef. There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>---
* ide-tape: factor out DSC handling from idetape_pc_intr()Bartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | | Factor out DSC handling from idetape_pc_intr() to ide_tape_handle_dsc() helper as a preparation for adding generic ide_pc_intr() helper. There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-{floppy,tape}: move checking of ->failed_pc to ->callbackBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | | Move checking/resetting of ->failed_pc from ide*_pc_intr() to ->callback as a preparation for adding generic ide_pc_intr() helper. There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>---
* ide: add ide_issue_pc() helperBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | | Add generic ide_issue_pc() helper to ide-atapi.c and then convert ide-{floppy,tape,scsi} device drivers to use it. There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add PC_FLAG_DRQ_INTERRUPT pc flagBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | | | | Add PC_FLAG_DRQ_INTERRUPT pc flag, set it in ide*_do_request() and check for it (instead of checking for IDE*_FLAG_DRQ_INTERRUPT) in ide*_issue_pc(). This is a preparation for adding generic ide_issue_pc() helper. There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add ide_transfer_pc() helperBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | | | | | * Add ide-atapi.c file for generic ATAPI support together with CONFIG_IDE_ATAPI config option. * Add generic ide_transfer_pc() helper to ide-atapi.c and then convert ide-{floppy,tape,scsi} device drivers to use it. There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-{cd,floppy,tape}: remove checking for drive->scsiBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | Remove checking for drive->scsi which is no longer set by IDE core code (leave the flag since it will be re-used for generic ATAPI support). Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add PC_FLAG_ZIP_DRIVE pc flagBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | | | | Add PC_FLAG_ZIP_DRIVE pc flag, set it in idefloppy_do_request() and check for it (instead of checking for IDEFLOPPY_FLAG_ZIP_DRIVE) in idefloppy_transfer_pc(). This is a preparation for adding generic ide_transfer_pc() helper. There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-tape: factor out waiting for good ireason from idetape_transfer_pc()Bartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | | | Factor out waiting for good ireason from idetape_transfer_pc() to ide_tape_wait_ireason() as a preparation for adding generic ide_transfer_pc() helper. There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-tape: set PC_FLAG_DMA_IN_PROGRESS flag in idetape_transfer_pc()Bartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | Set PC_FLAG_DMA_IN_PROGRESS flag in idetape_transfer_pc() instead of idetape_issue_pc() to match the other ATAPI device drivers. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: start DMA engine in idefloppy_transfer_pc1()Bartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | | Start DMA engine and set PC_FLAG_DMA_IN_PROGRESS flag in idefloppy_transfer_pc1() instead of idefloppy_issue_pc() so the Status Register and the Interrupt Reason Register are checked first. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-{floppy,tape}: PC_FLAG_DMA_RECOMMENDED -> PC_FLAG_DMA_OKBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | | | * Use PC_FLAG_DMA_OK flag instead of PC_FLAG_DMA_RECOMMENDED one. * Remove no longer used PC_FLAG_DMA_RECOMMENDED flag. There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-{floppy,tape}: merge pc->idefloppy_callback and pc->idetape_callbackBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | Merge pc->idefloppy_callback and pc->idetape_callback into pc->callback. There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: merge callbacksBorislav Petkov2008-07-15
| | | | | | | | | | | | | | | | The appropriate functionality of the callback is established through querying the ATAPI packet command in pc->c[0]. While at it, simplify if (floppy->failed_pc)-branch to be found in the original idefloppy_request_sense_callback(). Bart: - keep handling for blk_pc_request() requests unchanged + add FIXME - add uptodate variable + leave just one idefloppy_end_request() call - add newline to the debug message Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-tape: make pc->idetape_callback voidBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-tape: merge callbacksBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | | | | The appropriate functionality of the callback is established through querying the ATAPI packet command in pc->c[0]. While at it: - add uptodate variable + leave just one idetape_end_request() call - don't use HWGROUP() macro Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-tape: make idetape_retry_pc() voidBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | idetape_retry_pc() always returns ide_stopped so make it void. There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-{floppy,tape,scsi}: log device name instead of driver nameBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | | | | | Log device name instead of driver name in *_pc_intr() and *_transfer_pc*(). While at it: * Merge two consecutive printk()-s in *_pc_intr() together. * Replace "floppy"/"tape"/"scsi" references in printk()-s by "device". Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: merge idefloppy_transfer_pc() and idefloppy_transfer_pc1()Bartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | | | | | * Check IDEFLOPPY_FLAG_ZIP_DRIVE flag in idefloppy_transfer_pc1() and skip idefloppy_transfer_pc2()-phase if the flag is not set. * Always use idefloppy_transfer_pc1() in idefloppy_issue_pc() and remove no longer needed idefloppy_transfer_pc(). There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-tape: remove SIMULATE_ERRORS debug codeBartlomiej Zolnierkiewicz2008-07-15
| | | | | Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-tape: remove stale comments from idetape_pc_intr()Bartlomiej Zolnierkiewicz2008-07-15
| | | | | Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-tape: remove unneeded CONFIG_BLK_DEV_IDEDMA ifdefBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | PC_FLAG_DMA_IN_PROGRESS flag is never set if DMA support is disabled. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-tape: remove superfluous warning message from idetape_issue_pc()Bartlomiej Zolnierkiewicz2008-07-15
| | | | | | | ide_dma_off() prints info about DMA being disabled. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-tape: remove superfluous error message from idetape_pc_intr()Bartlomiej Zolnierkiewicz2008-07-15
| | | | | | | ide_dma_off() prints info about DMA being disabled. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-tape: idetape_pc_intr() should use local_irq_enable_in_hardirq()Bartlomiej Zolnierkiewicz2008-07-15
| | | | | Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove action argument in ide_do_drive_cmdFUJITA Tomonori2008-07-15
| | | | | | | | | | | | | | | ide_do_drive_cmd is called only with ide_preempt action argument. So we can remove the action argument in ide_do_drive_cmd and ide_action_t typedef. This patch also includes two minor cleanups: 1) ide_do_drive_cmd always succeeds so we don't need the return value; 2) the callers use blk_rq_init before ide_do_drive_cmd so there is no need to initialize rq->errors. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove drive->ctlBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | | | | Remove drive->ctl (it is always equal to 0x08 after init time). While at it: * Use ATA_DEVCTL_OBS define. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: use ->OUTBSYNC in init_irq()Bartlomiej Zolnierkiewicz2008-07-15
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: pass 'hwif *' instead of 'drive *' to ->OUTBSYNC methodBartlomiej Zolnierkiewicz2008-07-15
| | | | | | There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove ->mmio flag from ide_hwif_tBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | | Since scc_pata host driver no longer uses IDE PCI layer / ide_dma_setup() and all other ->mmio users set also IDE_HFLAG_MMIO host flag we can safely remove ->mmio flag. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: move IRQ unmasking out from ->tf_load methodBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | Move IRQ unmasking out from ->tf_load method to its users. There should be no functional changes caused by this patch (SELECT_MASK() is NOP except for hpt366, icside and sgiioc4). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove IDE_TFLAG_NO_SELECT_MASK taskfile flagBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | | | | | Always call SELECT_MASK(..., 0) in ide_tf_load() (needs to be done to match ide_set_irq(..., 1)) and then remove IDE_TFLAG_NO_SELECT_MASK taskfile flag. This change should only affect hpt366 and icside host drivers since ->maskproc(..., 0) for sgiioc4 is equivalent to ide_set_irq(..., 1). Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: fix do_probe() to use SELECT_DRIVE()Bartlomiej Zolnierkiewicz2008-07-15
| | | | | | | Fix one place in do_probe() which used ->OUTB directly instead of calling SELECT_DRIVE() (so ->selectproc method is also used). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove commented out code from ide_config_drive_speed()Bartlomiej Zolnierkiewicz2008-07-15
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* sgiioc4: use ->extra_base instead of ->dma_status for dma_handleBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | This is a preparation for removal of ->dma_status field from ide_hwif_t. There should be no functional changes caused by this patch. Acked-by: Jeremy Higdon <jeremy@sgi.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove try_to_flush_leftover_data()Bartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | Just use the new & shiny ide_pad_transfer() helper instead. Also remove the superfluous check for 'drive->media == ide_disk' while at it (ide_ata_error() is used only for ide_disk devices). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove obsoleted "ide=" kernel parametersBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | | | | | | | | * Remove obsoleted "ide=" kernel parameters. * Remove no longer needed: - ide_setup() - parse_options() - __setup("", ...) - module_param(options, ...) * Use module_{init,exit}() for MODULE=y case and remove MODULE ifdef. * Make ide_*acpi* and ide_doubler variables static. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: cleanup init_ide_data()Bartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | * Remove no longer need init_ide_data() call from ide_setup(). * Cleanup init_ide_data(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove obsoleted "hdx=" kernel parametersBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | * Remove obsoleted "hdx=" kernel parameters. * Remove no longer used stridx() and match_parm(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove obsoleted "idebus=" kernel parameterBartlomiej Zolnierkiewicz2008-07-15
| | | | | | | | | * Remove obsoleted "idebus=" kernel parameter. * Remove no longer needed ide_system_bus_speed() and system_bus_clock() (together with idebus_parameter and system_bus_speed variables). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: remove ide_cd_init_rqFUJITA Tomonori2008-07-15
| | | | | | | | | | | | ide_cd_init_rq is not used by ide-cd_ioctl any more. Only cdrom_queue_request_sense use it. This converts cdrom_queue_request_sense to use blk_rq_init directly and removes ide_cd_init_rq. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Borislav Petkov <petkovbb@gmail.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove ide_init_drive_cmdFUJITA Tomonori2008-07-15
| | | | | | | | | | | ide_init_drive_cmd just calls blk_rq_init. This converts the users of ide_init_drive_cmd to use blk_rq_init directly and removes ide_init_drive_cmd. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Borislav Petkov <petkovbb@gmail.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove ide_wait/head_wait path in ide_do_drive_cmdFUJITA Tomonori2008-07-15
| | | | | | | | | | | Now all the users of ide_do_drive_cmd using ide_wait/head_wait are converted to use blk_execute_rq this removes the ide_wait/head_wait path in ide_do_drive_cmd. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Borislav Petkov <petkovbb@gmail.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: convert ide_do_drive_cmd path to use blk_execute_rqFUJITA Tomonori2008-07-15
| | | | | | | | | | This converts the ide_do_drive_cmd path using ide_[head_]wait to use blk_execute_rq. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Borislav Petkov <petkovbb@gmail.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-tape: convert ide_do_drive_cmd path to use blk_execute_rqFUJITA Tomonori2008-07-15
| | | | | | | | | | This converts the ide_do_drive_cmd path using ide_wait to use blk_execute_rq. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Borislav Petkov <petkovbb@gmail.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-taskfile: convert ide_do_drive_cmd path to use blk_execute_rqFUJITA Tomonori2008-07-15
| | | | | | | | | | This converts the ide_do_drive_cmd path using ide_wait to use blk_execute_rq. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Borislav Petkov <petkovbb@gmail.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-floppy: convert ide_do_drive_cmd path to use blk_execute_rqFUJITA Tomonori2008-07-15
| | | | | | | | | | This converts the ide_do_drive_cmd path using ide_wait to use blk_execute_rq. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Borislav Petkov <petkovbb@gmail.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-disk: convert ide_do_drive_cmd path to use blk_execute_rqFUJITA Tomonori2008-07-15
| | | | | | | | | | This converts the ide_do_drive_cmd path using ide_wait to use blk_execute_rq. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Borislav Petkov <petkovbb@gmail.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>