summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-taskfile.c
Commit message (Collapse)AuthorAgeFilesLines
* ide: add device flagsBartlomiej Zolnierkiewicz2008-10-131-7/+7
| | | | | | | | | | | | | | Add 'unsigned long dev_flags' to ide_drive_t and convert bitfields to IDE_DFLAG_* flags. While at it: - IDE_DFLAG_ADDRESSING -> IDE_DFLAG_LBA48 - fixup some comments - remove needless g->flags zeroing from ide*_probe() There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: move ioctls handling to ide-ioctls.cBartlomiej Zolnierkiewicz2008-10-101-109/+0
| | | | | | | | | * Move ioctls handling to ide-ioctls.c (except HDIO_DRIVE_TASKFILE for now). * Make ide_{cmd,task}() static. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove SECTOR_WORDS defineBartlomiej Zolnierkiewicz2008-10-101-1/+1
| | | | | | Just use SECTOR_SIZE instead. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: use ATA_* defines instead of *_STAT and *_ERR onesBartlomiej Zolnierkiewicz2008-10-101-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ERR_STAT -> ATA_ERR * INDEX_STAT -> ATA_IDX * ECC_STAT -> ATA_CORR * DRQ_STAT -> ATA_DRQ * SEEK_STAT -> ATA_DSC * WRERR_STAT -> ATA_DF * READY_STAT -> ATA_DRDY * BUSY_STAT -> ATA_BUSY * MARK_ERR -> ATA_AMNF * TRK0_ERR -> ATA_TRK0NF * ABRT_ERR -> ATA_ABORTED * MCR_ERR -> ATA_MCR * ID_ERR -> ATA_IDNF * MC_ERR -> ATA_MC * ECC_ERR -> ATA_UNC * ICRC_ERR -> ATA_ICRC * BBD_ERR -> ATA_BBK Also: * ILI_ERR -> ATAPI_ILI * EOM_ERR -> ATAPI_EOM * LFS_ERR -> ATAPI_LFS * CD -> ATAPI_COD * IO -> ATAPI_IO Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: WIN_* -> ATA_CMD_*Bartlomiej Zolnierkiewicz2008-10-101-11/+16
| | | | | | | | | | | | | | | | | | | | | * Use ATA_CMD_* defines instead of WIN_* ones. While at it: * EXABYTE_ENABLE_NEXT -> ATA_EXABYTE_ENABLE_NEST * SETFEATURES_{EN,DIS}_WCACHE -> SETFEATURES_WC_{ON,OFF} * SETFEATURES_{EN,DIS}_AAM -> SETFEATURES_AAM_{ON,OFF} * SMART_* -> ATA_SMART_* * Remove stale comment from ide-proc.c. Partially based on earlier work by Chris Wedgwood. Acked-by: Chris Wedgwood <cw@f00f.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: make drive->id an union (take 2)Bartlomiej Zolnierkiewicz2008-10-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make drive->id an unnamed union so id can be accessed either by using 'u16 *id' or 'struct hd_driveid *driveid'. Then convert all existing drive->id users accordingly (using 'u16 *id' when possible). This is an intermediate step to make ide 'struct hd_driveid'-free. While at it: - Add missing KERN_CONTs in it821x.c. - Use ATA_ID_WORDS and ATA_ID_*_LEN defines. - Remove unnecessary checks for drive->id. - s/drive_table/table/ in ide_in_drive_list(). - Cleanup ide_config_drive_speed() a bit. - s/drive1/dev1/ & s/drive0/dev0/ in ide_undecoded_slave(). v2: Fix typo in drivers/ide/ppc/pmac.c. (From Stephen Rothwell) There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: enable local IRQs in all handlers for TASKFILE_NO_DATA data phaseBartlomiej Zolnierkiewicz2008-07-241-2/+10
| | | | | | | It is already done by task_no_data_intr() and there is no reason not to do it in other TASKFILE_NO_DATA data phase handlers. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add struct ide_tp_ops (take 2)Bartlomiej Zolnierkiewicz2008-07-231-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add struct ide_tp_ops for transport methods. * Add 'const struct ide_tp_ops *tp_ops' to struct ide_port_info and ide_hwif_t. * Set the default hwif->tp_ops in ide_init_port_data(). * Set host driver specific hwif->tp_ops in ide_init_port(). * Export ide_exec_command(), ide_read_status(), ide_read_altstatus(), ide_read_sff_dma_status(), ide_set_irq(), ide_tf_{load,read}() and ata_{in,out}put_data(). * Convert host drivers and core code to use struct ide_tp_ops. * Remove no longer needed default_hwif_transport(). * Cleanup ide_hwif_t from methods that are now in struct ide_tp_ops. While at it: * Use struct ide_port_info in falconide.c and q40ide.c. * Rename ata_{in,out}put_data() to ide_{in,out}put_data(). v2: * Fix missing convertion in ns87415.c. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add ->set_irq methodBartlomiej Zolnierkiewicz2008-07-231-1/+1
| | | | | | | | | | | | | | | Add ->set_irq method for setting nIEN bit of ATA Device Control register and use it instead of ide_set_irq(). While at it: * Use ->set_irq in init_irq() and do_reset1(). * Don't use HWIF() macro in ide_check_pm_state(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add ->read_status methodBartlomiej Zolnierkiewicz2008-07-231-9/+14
| | | | | | | | | | | | | | | * Remove ide_read_status() inline helper. * Add ->read_status method for reading ATA Status register and use it instead of ->INB. While at it: * Don't use HWGROUP() macro. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add ->exec_command methodBartlomiej Zolnierkiewicz2008-07-231-1/+1
| | | | | | | | | Add ->exec_command method for writing ATA Command register and use it instead of ->OUTBSYNC. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove needless includes from ide-taskfile.c (take 2)Bartlomiej Zolnierkiewicz2008-07-161-10/+0
| | | | | | | | | | | | v2: On Sunday 15 June 2008, Geert Uytterhoeven wrote: > As ide-taskfile.c uses scatterlists, it should include <linux/scatterlist.h>. (v1 broke IDE build on m68k, thanks to Geert for finding the bug) Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove superfluous BUG_ON() from set_geometry_intr()Bartlomiej Zolnierkiewicz2008-07-161-1/+0
| | | | | | | | | ide_set_handler() bugs on ->handler == NULL so no need to do it in set_geometry_intr(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: allow any command requesting DMA data phase for HDIO_DRIVE_TASKFILEBartlomiej Zolnierkiewicz2008-07-161-21/+1
| | | | | | | Allow any command requesting DMA data phase for HDIO_DRIVE_TASKFILE ioctl and remove no longer needed task_dma_ok() Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: pass 'hwif *' instead of 'drive *' to ->OUTBSYNC methodBartlomiej Zolnierkiewicz2008-07-151-1/+1
| | | | | | 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-151-0/+2
| | | | | | | | | 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-taskfile: convert ide_do_drive_cmd path to use blk_execute_rqFUJITA Tomonori2008-07-151-14/+20
| | | | | | | | | | 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: increase timeout in wait_drive_not_busy()Bartlomiej Zolnierkiewicz2008-06-201-3/+3
| | | | | | | | | | | | Some ATAPI devices take longer than the current max timeout value to become ready (i.e. TEAC DV-W28ECW takes 6 ms) so increase the timeout value to 10 ms. This fixes kernel.org bugzilla bug #10887: http://bugzilla.kernel.org/show_bug.cgi?id=10887 Reported-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: use blk_rq_init() to initialize the requestFUJITA Tomonori2008-04-291-2/+1
| | | | | | | | | | | | | This converts ide to use blk_rq_init to initialize the request. This is a preparation for large command support, which needs to initialize the request in a proper way (that is, just doing a memset() will not work). Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* ide: add ->tf_load and ->tf_read methodsBartlomiej Zolnierkiewicz2008-04-281-1/+1
| | | | | | | | | | | | | | * Add ->tf_load and ->tf_read methods to ide_hwif_t and set the default methods in default_hwif_transport(). * Use ->tf_{load,read} instead o calling ide_tf_{load,read}() directly. * Make ide_tf_{load,read}() static. 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>
* ide: move ide_tf_{load,read} to ide-iops.cBartlomiej Zolnierkiewicz2008-04-281-45/+0
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: factor out debugging code from ide_tf_load()Bartlomiej Zolnierkiewicz2008-04-281-12/+17
| | | | | | | Factor out debugging code from ide_tf_load() to ide_tf_dump() helper and update ide_tf_load() users accordingly. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: merge ->atapi_*put_bytes and ->ata_*put_data methodsBartlomiej Zolnierkiewicz2008-04-281-2/+2
| | | | | | | | | | | | | | | * Merge ->atapi_{in,out}put_bytes and ->ata_{in,out}put_data methods into new ->{in,out}put_data methods which take number of bytes to transfer as an argument and always do padding. While at it: * Use 'hwif' or 'drive->hwif' instead of 'HWIF(drive)'. There should be no functional changes caused by this patch (all users of ->ata_{in,out}put_data methods were using multiply-of-4 word counts). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* falconide/q40ide: add ->atapi_*put_bytes and ->ata_*put_data methods (take 2)Bartlomiej Zolnierkiewicz2008-04-281-7/+9
| | | | | | | | | | | | | | | | | | | | | | | * Add ->atapi_{in,out}put_bytes and ->ata_{in,out}put_data methods to falconide and q40ide host drivers (->ata_* methods are implemented on top of ->atapi_* methods so they also do byte-swapping now). * Cleanup atapi_{in,out}put_bytes(). v2: * Add 'struct request *rq' argument to ->ata_{in,out}put_data methods and don't byte-swap disk fs requests (we shouldn't un-swap fs requests because fs itself is stored byte-swapped on the disk) - this is how things were done before the patch (ideally device mapper should be used instead but it would break existing setups and would have some performance impact). Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Michael Schmitz <schmitz@debian.org> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: Richard Zidlicky <rz@linux-m68k.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add struct ide_io_ports (take 3)Bartlomiej Zolnierkiewicz2008-04-271-15/+14
| | | | | | | | | | | | | | | | | | | | | * Add struct ide_io_ports and use it instead of `unsigned long io_ports[]` in ide_hwif_t. * Rename io_ports[] in hw_regs_t to io_ports_array[]. * Use un-named union for 'unsigned long io_ports_array[]' and 'struct ide_io_ports io_ports' in hw_regs_t. * Remove IDE_*_OFFSET defines. v2: * scc_pata.c build fix from Stephen Rothwell. v3: * Fix ctl_adrr typo in Sparc-specific part of ns87415.c. (Noticed by Andrew Morton) Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: constify struct ide_dma_opsBartlomiej Zolnierkiewicz2008-04-261-1/+1
| | | | | | | | | | | | | | | | | * 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>
* ide: add struct ide_dma_ops (take 3)Bartlomiej Zolnierkiewicz2008-04-261-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ide: replace remaining __FUNCTION__ occurrencesHarvey Harrison2008-04-261-6/+6
| | | | | | | | | | __FUNCTION__ is gcc-specific, use __func__ [bart: fix checkpatch.pl errors in ide-lib.c and ppc/mpc8xx.c while at it] Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove IDE_*_REG macrosBartlomiej Zolnierkiewicz2008-04-181-13/+16
| | | | | | | | | | | | | * Add IDE_{ALTSTATUS,IREASON,BCOUNTL,BCOUNTH}_OFFSET defines. * Remove IDE_*_REG macros - this results in more readable and slightly smaller code. There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* IDE: Make taskfile interface more robust wrt unexpected end-of-commandLinus Torvalds2008-03-181-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | Now that we handle all the special commands using REQ_TYPE_ATA_TASKFILE rather than using the old REQ_TYPE_ATA_CMD model, we need to also emulate the lack of full taskfile data that comes with the old command model (ie when commands are generated with the HDIO_DRIVE_CMD ioctl rather than using the HDIO_DRIVE_TASK[FILE] ioctls). In particular, this means that we should handle command completion the more relaxed way that the old drive_cmd_intr() code did. It allows commands to finish early even if they don't use up all the data that we thought we had for them. This fixes a regression seen by Anders Eriksson where some SMART commands sent by smartd would cause a boot-time system hang on his machine because the IDE command handling code didn't realize that the command had completed. Tested-by: Anders Eriksson <aeriksson@fastmail.fm> Cc: Jens Axboe <jens.axboe@oracle.com> Cc: Ingo Molnar <mingo@elte.hu> Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ide: add ide_read_error() inline helperBartlomiej Zolnierkiewicz2008-02-061-3/+2
| | | | | Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: add ide_read_[alt]status() inline helpersBartlomiej Zolnierkiewicz2008-02-061-15/+15
| | | | | Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove ide_ata66_check()Bartlomiej Zolnierkiewicz2008-02-021-1/+4
| | | | | Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove set_transfer()Bartlomiej Zolnierkiewicz2008-02-021-1/+5
| | | | | Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: update/add my CopyrightsBartlomiej Zolnierkiewicz2008-02-011-4/+4
| | | | | | The last years stuff and a trip down memory lane... Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: delete filenames/versions from commentsBartlomiej Zolnierkiewicz2008-02-011-2/+0
| | | | | | | | | | | | | | | Delete filenames/versions from comments. I'm leaving decisions about adding DRV_VERSION defines and MODULE_VERSION()-s to maintainers of the respective drivers. While at it: * Remove unused VERSION define from ide.c. * Remove unused/stale DRV_VERSION define from au1xxx-ide.c. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: make wait_drive_not_busy() static againAdrian Bunk2008-02-011-1/+1
| | | | | | | | After commit 7267c3377443322588cddaf457cf106839a60463 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: switch ide_cmd_ioctl() to use REQ_TYPE_ATA_TASKFILE requestsBartlomiej Zolnierkiewicz2008-01-261-32/+31
| | | | | | | | | 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>
* ide: switch set_xfer_rate() to use REQ_TYPE_ATA_TASKFILE requestsBartlomiej Zolnierkiewicz2008-01-261-1/+2
| | | | | | | | | | | | Based on the earlier work by Tejun Heo. Switch set_xfer_rate() to use REQ_TYPE_ATA_TASKFILE requests and make ide_wait_cmd() static. There should be no functionality changes caused by this patch. Cc: Tejun Heo <htejun@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: convert "empty" REQ_TYPE_ATA_CMD requests to use REQ_TYPE_ATA_TASKFILEBartlomiej Zolnierkiewicz2008-01-261-1/+1
| | | | | | | | | Based on the previous 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>
* ide: initialize rq->cmd_type in ide_init_drive_cmd() callersBartlomiej Zolnierkiewicz2008-01-261-0/+4
| | | | | | | | | | * Initialize rq->cmd_type in ide_wait_cmd(), ide_cmd_ioctl() and set_pio_mode() (other callers were aleady over-riding rq->cmd_type). * Remove no longer needed rq->cmd_type setup from ide_init_drive_cmd(). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: use wait_drive_not_busy() in drive_cmd_intr() (take 2)Bartlomiej Zolnierkiewicz2008-01-261-3/+2
| | | | | | | | | | Use wait_drive_not_busy() in drive_cmd_intr(). v2: * Fix wait_drive_not_busy() comment (noticed by Sergei). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: kill DATA_READY defineBartlomiej Zolnierkiewicz2008-01-261-2/+2
| | | | | Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: task_end_request() fixTejun Heo2008-01-261-7/+4
| | | | | | | | | | | | | | | | task_end_request() modified to always call ide_end_drive_cmd() for taskfile requests. Previously, ide_end_drive_cmd() was called only when IDE_TFLAG_FLAGGED was set. Also, ide_dma_intr() is modified to use task_end_request(). Enables TASKFILE ioctls to get valid register outputs on successful completion. Bart: - ported it over recent IDE changes Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: use rq->nr_sectors in task_end_request()Bartlomiej Zolnierkiewicz2008-01-261-2/+2
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove needless ->cursg clearing from task_end_request()Bartlomiej Zolnierkiewicz2008-01-261-2/+0
| | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: set IDE_TFLAG_IN_* flags before queuing/executing commandBartlomiej Zolnierkiewicz2008-01-261-4/+5
| | | | | | | | | | | | * Add IDE_TFLAG_{HOB,TF,DEVICE} defines. * Set IDE_TFLAG_IN_* flags in {do_rw,ide_no_data,ide_raw}_taskfile() users. * Remove no longer needed ->tf_flags setup from ide_end_drive_cmd(). There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: fix final status check in task_in_intr()Bartlomiej Zolnierkiewicz2008-01-261-1/+1
| | | | | | | Check for DRQ bit being cleared on the final status check. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: fix ->io_32bit race in ide_taskfile_ioctl()Tejun Heo2008-01-261-5/+12
| | | | | | | | | | | | | | | | | | | In ide_taskfile_ioctl(), there was a race condition involving drive->io_32bit. It was cleared and restored during ioctl requests but there was no synchronization with other requests. So, other requests could execute with the altered ->io_32bit setting or updated drive->io_32bit could be overwritten by ide_taskfile_ioctl(). This patch adds IDE_TFLAG_IO_16BIT flag to indicate to ide_pio_datablock() that 16-bit I/O is needed regardless of drive->io_32bit settting. Bart: - ported it over recent IDE changes Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove broken disk byte-swapping supportBartlomiej Zolnierkiewicz2008-01-261-30/+2
| | | | | | | | | | | | | | | | | | | | | | | Remove broken disk byte-swapping support: - it can cause a data corruption on SMP (or if using PREEMPT on UP) - all data coming from disk are byte-swapped by taskfile_*_data() which results in incorrect identify data being reported by /proc/ide/ and IOCTLs - "hdx=bswap/byteswap" kernel parameter has been broken on m68k host drivers (including Atari/Q40 ones) since 2.5.x days (because of 'hwif' zero-ing) - byte-swapping is limited to PIO transfers (for working with TiVo disks on x86 machines using user-space solutions or dm-byteswap should result in much better performance because DMA can be used) For previous discussions please see: http://www.ussg.iu.edu/hypermail/linux/kernel/0201.0/0768.html http://lkml.org/lkml/2004/2/28/111 [ I have dm-byteswap device mapper target if somebody is interested (patch is for 2.6.4 though but I'll dust it off if needed). ] Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
OpenPOWER on IntegriCloud