summaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.c
Commit message (Collapse)AuthorAgeFilesLines
...
* ide-cd: remove no longer needed 'ignore' module parameterBartlomiej Zolnierkiewicz2009-03-311-12/+0
| | | | | | | ide-scsi is gone... Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: remove needless ide_dump_status_no_sense() wrapperBartlomiej Zolnierkiewicz2009-03-311-13/+4
| | | | | | | | | | It makes no sense to check for BSY bit being set as earlier OK_STAT() check in cdrom_end_request() makes sure that BSY bit is cleared. 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: remove dead code from cdrom_decode_status()Bartlomiej Zolnierkiewicz2009-03-311-6/+0
| | | | | | | 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: use ide_end_rq() also for failed non-fs requestsBartlomiej Zolnierkiewicz2009-03-311-12/+4
| | | | | | | | Use ide_end_rq() also for failed non-fs requests on completion of REQUEST SENSE requests + use blk_rq_bytes() while at it. Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: remove dead URLsBartlomiej Zolnierkiewicz2009-03-311-6/+3
| | | | | Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: set hwif->expiry prior to calling [__]ide_set_handler()Bartlomiej Zolnierkiewicz2009-03-271-1/+2
| | | | | | | | | | | | | * Set hwif->expiry prior to calling [__]ide_set_handler() and drop 'expiry' argument. * Set hwif->expiry to NULL in ide_{timer_expiry,intr}() and remove 'hwif->expiry = NULL' assignments. 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: use do_rw_taskfile() for ATA_CMD_PACKET commandsBartlomiej Zolnierkiewicz2009-03-271-1/+10
| | | | | | | | | | | | | | | | | | * Pass command to ide_issue_pc() and update ->do_request methods in ide-{cd,floppy,tape}.c accordingly. * Convert ide_pktcmd_tf_load() to ide_init_packet_cmd() which just initializes command structure and use do_rw_taskfile() to load ATA_CMD_PACKET commands. While at it: * Rename ide{floppy,tape}_issue_pc() to ide_{floppy,tape}_issue_pc(). 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 ide_end_request()Bartlomiej Zolnierkiewicz2009-03-271-3/+4
| | | | | | | | | | | | | | | | | | * Add ide_rq_bytes() helper. * Add blk_noretry_request() quirk to ide_complete_rq() (currently only fs requests can be marked as "noretry" so there is no change in behavior). * Switch current ide_end_request() users to use ide_complete_rq(). [ No need to check for rq->nr_sectors == 0 in {ide_dma,task_pio}_intr(), nsectors == 0 in cdrom_end_request() and err == 0 in ide_do_devset(). ] * Remove no longer needed ide_end_request(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: move rq->errors quirk out from ide_end_request()Bartlomiej Zolnierkiewicz2009-03-271-0/+3
| | | | | | | | 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: sanitize ide_end_rq()Bartlomiej Zolnierkiewicz2009-03-271-1/+1
| | | | | | | | | | | * 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-271-2/+2
| | | | | | | | | | | | | | | | | | * 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: remove ->end_request methodBartlomiej Zolnierkiewicz2009-03-271-1/+0
| | | | | | | | | | | | * 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-cd: use ide_drive_t's rq in cdrom_queue_request_senseBorislav Petkov2009-03-271-1/+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: improve debugging schemeBorislav Petkov2009-03-271-65/+59
| | | | | | | and more specifically, push __func__ into debug macro thus making ide_debug_log() calls shorter and more readable. Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
* ide: remove ide_do_drive_cmd()Bartlomiej Zolnierkiewicz2009-03-241-1/+3
| | | | | | | | | | | * Use elv_add_request() instead of __elv_add_request() in ide_do_drive_cmd(). * ide_do_drive_cmd() is used only in ide-{atapi,cd}.c so inline it there. 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: fix refcounting in device driversBartlomiej Zolnierkiewicz2009-02-251-9/+18
| | | | | | | | | | | | | | | | During host driver module removal del_gendisk() results in a final put on drive->gendev and freeing the drive by drive_release_dev(). Convert device drivers from using struct kref to use struct device so device driver's object holds reference on ->gendev and prevents drive from prematurely going away. Also fix ->remove methods to not erroneously drop reference on a host driver by using only put_device() instead of ide*_put(). Reported-by: Stanislaw Gruszka <stf_xl@wp.pl> Tested-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: document capacity hackBartlomiej Zolnierkiewicz2009-02-251-0/+8
| | | | | | | | | Just copy the comment from drivers/scsi/sr.c::sr_done() (from which the capacity hack has been originated). Cc: Borislav Petkov <petkovbb@gmail.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: fix DMA for non bio-backed requestsBorislav Petkov2009-02-021-0/+3
| | | | | | | This one fixes http://bugzilla.kernel.org/show_bug.cgi?id=12320. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: convert to ide-atapi facilitiesBorislav Petkov2009-01-061-94/+2
| | | | | | | | | | ... and remove no longer needed cdrom_start_packet_command and cdrom_transfer_packet_command. Tested lightly with ide-cd and ide-floppy. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: start DMA before sending the actual packet commandBorislav Petkov2009-01-061-3/+3
| | | | | | | | | as it is done for all other IDE ATAPI devices. There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: wait for DRQ to get set per defaultBorislav Petkov2009-01-061-14/+7
| | | | | | | ... instead of assuming it is set for accelerated DRQ type devices. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove ->error method from struct ide_driverBartlomiej Zolnierkiewicz2009-01-061-1/+0
| | | | | | | | * Remove (now superfluous) ->error method from struct ide_driver. * Unexport __ide_error() and make it static. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: remove ide_driver_t typedefBartlomiej Zolnierkiewicz2009-01-061-1/+1
| | | | | | | | While at it: - s/struct ide_driver_s/struct ide_driver/ - use to_ide_driver() macro in ide-proc.c Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: merge ide_hwgroup_t with ide_hwif_t (v2)Bartlomiej Zolnierkiewicz2009-01-061-9/+7
| | | | | | | | | | | | | | | | | | | * Merge ide_hwgroup_t with ide_hwif_t. * Cleanup init_irq() accordingly, then remove no longer needed ide_remove_port_from_hwgroup() and ide_ports[]. * Remove now unused HWGROUP() macro. While at it: * ide_dump_ata_error() fixups v2: * Fix ->quirk_list check in do_ide_request() (s/hwif->cur_dev/prev_port->cur_dev). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: remove handler wrappersBorislav Petkov2009-01-021-38/+11
| | | | | | | | | | | Remove cdrom_do_newpc_cont and cdrom_start_rw_cont wrappers and pass cdrom_transfer_packet_command to ide_execute_command directly. There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> [bart: don't move cdrom_start_packet_command() around, remove newlines] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: remove xferlen arg to cdrom_start_packet_commandBorislav Petkov2009-01-021-5/+5
| | | | | | | There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: move cdrom_timer_expiry to ide-atapi.cBorislav Petkov2009-01-021-35/+3
| | | | | | | | | - cdrom_timer_expiry -> ide_cd_expiry - remove expiry-arg to ide_issue_pc as it is redundant now - ide_debug_log -> debug_log Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-atapi: accomodate transfer length calculation for ide-cdBorislav Petkov2009-01-021-2/+2
| | | | | | | | | | | ... by factoring it out of ide_cd_do_request() into a helper, as suggested by Bart. There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> [bart: BLK_DEV_IDECD needs to select IDE_ATAPI now] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: move debug defines into headerBorislav Petkov2009-01-021-8/+0
| | | | | | | | | While at it: - disable compiling-in debug support by default Signed-off-by: Borislav Petkov <petkovbb@gmail.com> [bart: fixup patch description] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: remove dead dsc_overlap settingBartlomiej Zolnierkiewicz2008-12-291-14/+1
| | | | | | | | | dsc_overlap setting is not useful anymore for ide-cd so remove "dsc_overlap" /proc setting, disallow changing the setting through HDIO_SET_NICE ioctl and cleanup ide_cd{rom_setup,_release}(). Cc: Borislav Petkov <petkovbb@googlemail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: remove obsolete seek optimizationBartlomiej Zolnierkiewicz2008-12-291-83/+6
| | | | | | | It doesn't make much sense nowadays and is problematic on some drives. Cc: Borislav Petkov <petkovbb@googlemail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: use queue lock instead of ide_lock when possibleBartlomiej Zolnierkiewicz2008-12-291-6/+8
| | | | | | | | This is just a preparation for future changes and there should be no functional changes caused by this patch since ide_lock is currently also used as queue lock. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: ide_lock + __blk_end_request() -> blk_end_request()Bartlomiej Zolnierkiewicz2008-12-291-9/+3
| | | | | | | | | | Use blk_end_request() instead of ide_lock + __blk_end_request() in cdrom_end_request(), cdrom_newpc_intr(), __ide_end_request(), ide_complete_pm_request() and ide_end_drive_cmd(). [ ide_lock is currently also used as queue lock ] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: ide_hwgroup_t.rq doesn't need an ide_lock heldBartlomiej Zolnierkiewicz2008-12-291-4/+8
| | | | | | | While at it: - no need to check for hwgroup presence in ide_dump_opcode() Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: fix DMA alignment regressionBorislav Petkov2008-11-021-1/+2
| | | | | | | | | | | | | | | | e5318b531b008c79d2a0c0df06a7b8628da38e2f ("ide: use the dma safe check for REQ_TYPE_ATA_PC") introduced a regression which caused some ATAPI drives to turn off DMA for REQ_TYPE_BLOCK_PC commands while burning and thus degrading performance and ultimately causing an excessive amount of underruns. The issue is documented also in: http://bugzilla.kernel.org/show_bug.cgi?id=11742. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Tested-by: Valerio Passini <valerio.passini@unicam.it> [bart: fixup patch description per comments from Sergei Shtylyov] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: add TEAC CD-224E to the NO_AUTOCLOSE listMárton Németh2008-10-231-0/+1
| | | | | | | | | | The "TEAC CD-ROM CD-224E" cannot close its tray, so add it to the NO_AUTOCLOSE list. This will correct the "Can close tray" field of /proc/sys/dev/cdrom/info. Signed-off-by: Márton Németh <nm127@freemail.hu> Acked-by: Borislav Petkov <petkovbb@gmail.com> [bart: minor fixups to patch description] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* [PATCH] switch ide-cdAl Viro2008-10-211-15/+10
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* [PATCH] beginning of methods conversionAl Viro2008-10-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | To keep the size of changesets sane we split the switch by drivers; to keep the damn thing bisectable we do the following: 1) rename the affected methods, add ones with correct prototypes, make (few) callers handle both. That's this changeset. 2) for each driver convert to new methods. *ALL* drivers are converted in this series. 3) kill the old (renamed) methods. Note that it _is_ a flagday; all in-tree drivers are converted and by the end of this series no trace of old methods remain. The only reason why we do that this way is to keep the damn thing bisectable and allow per-driver debugging if anything goes wrong. New methods: open(bdev, mode) release(disk, mode) ioctl(bdev, mode, cmd, arg) /* Called without BKL */ compat_ioctl(bdev, mode, cmd, arg) locked_ioctl(bdev, mode, cmd, arg) /* Called with BKL, legacy */ Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* [PATCH] switch cdrom_{open,release,ioctl} to sane APIsAl Viro2008-10-211-3/+4
| | | | | | ... convert to it in callers Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* [PATCH] lose the unused file argument in generic_ide_ioctl()Al Viro2008-10-211-1/+1
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ide-cd: remove stale commentBorislav Petkov2008-10-171-4/+0
| | | | | | Signed-off-by: Borislav Petkov <petkovbb@gmail.com> [bart: split-up this change from a bigger patch] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: small drive type print fixBorislav Petkov2008-10-171-1/+1
| | | | | Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: debug log enhancementsBorislav Petkov2008-10-171-12/+21
| | | | | | | | Add some more verbosity to key function calls in ide-cd debug code. While at it, delete a superfluous comment. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide: allow device drivers to specify per-device type /proc settingsBartlomiej Zolnierkiewicz2008-10-171-2/+12
| | | | | | | | | | | Turn ide_driver_t's 'proc' field into ->proc_entries method (and also 'settings' field into ->proc_devsets method). Then update all device drivers accordingly. 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 IDE_AFLAG_NO_DOORLOCKINGBartlomiej Zolnierkiewicz2008-10-171-1/+1
| | | | | | | | | Just use IDE_DFLAG_DOORLOCKING instead. 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: IDE_AFLAG_MEDIA_CHANGED -> IDE_DFLAG_MEDIA_CHANGEDBartlomiej Zolnierkiewicz2008-10-171-3/+3
| | | | | | | 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-cd: fix printk format warningAlexander Beregalov2008-10-131-1/+1
| | | | | | Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Cc: Borislav Petkov <petkovbb@googlemail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: move cdrom_info.dma to ide_drive_t.dmaBorislav Petkov2008-10-131-18/+14
| | | | | | | There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: add a debug_mask module parameterBorislav Petkov2008-10-131-1/+7
| | | | | | Signed-off-by: Borislav Petkov <petkovbb@gmail.com> [bart: no need to zero debug_mask + move it next to module_param()] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* ide-cd: convert driver to new ide debugging macro (v3)Borislav Petkov2008-10-131-37/+150
| | | | | | | | | | | | | | | | | | | | | | Also, - leave in the possibility for optimizing away all debugging macros - add a PFX macro and prepend all printk calls with it for consistency - add debug macro calls in important driver paths - remove #if 0-ed code - mv restore_request -> ide_cd_restore_request - add a driver registration printk v2: failed_command can be NULL so check it before accessing it v3: fix another NULL ptr in debug statement There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
OpenPOWER on IntegriCloud