aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
Commit message (Collapse)AuthorAge
...
| * ide-floppy: remove idefloppy_floppy_t typedefBartlomiej Zolnierkiewicz2008-10-17
| | | | | | | | | | | | | | | | There should be no functional changes caused by this patch. Acked-by: Borislav Petkov <petkovbb@gmail.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * sgiioc4: remove maskproc() methodSergei Shtylyov2008-10-17
| | | | | | | | | | | | | | | | | | | | | | | | Since the maskproc() method calls either mirror the interrupt en/disable via the nIEN bit of the device control register done by the IDE core before issuing a command or unmask the interrupt after a command executed in polled mode (when interrupt is already not expected), it is pointless to implement this method by manipulating the nIEN bit... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: jeremy@sgi.com Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * hpt366: cleanup maskproc() methodSergei Shtylyov2008-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the maskproc() method calls either mirror the interrupt en/disable via the nIEN bit of the device control register done by the IDE core before issuing a command or unmask the interrupt after a command executed in polled mode (when interrupt is already not expected), it is pointless to manipulate the nIEN bit in this method; therefore, just do nothing for the drives not on the quirk list. Move the code to the left by using an early return and the 'else if' construct, while at it.... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> [bart: fix checkpatch.pl warning] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: mask interrupt in ide_config_drive_speed()Sergei Shtylyov2008-10-17
| | | | | | | | | | | | | | | | | | | | Apparently, there is no sense in unmasking IRQ on the controller when you call disable_irq_nosync() before doing this, set the nIEN bit afterwards, and then unmask IRQ again after the command completion, hence 0 passed to SELECT_MASK() before issuing the command in ide_config_drive_speed() is probably just a typo. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * hpt366: fix compile warningBartlomiej Zolnierkiewicz2008-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | Fixup for commit 1785192b5310ee25165768f5bb80f13146788e3e ("hpt366: add hpt3xx_disable_fast_irq() helper"):    CC      drivers/ide/pci/hpt366.o drivers/ide/pci/hpt366.c: In function `init_hwif_hpt366': drivers/ide/pci/hpt366.c:1290: warning: unused variable `dev' Reported-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide-cd: remove stale commentBorislav Petkov2008-10-17
| | | | | | | | | | | | 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-17
| | | | | | | | | | Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide-cd: debug log enhancementsBorislav Petkov2008-10-17
| | | | | | | | | | | | | | | | 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: add generic ATA/ATAPI disk driverBartlomiej Zolnierkiewicz2008-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add struct ide_disk_ops containing protocol specific methods. * Add 'struct ide_disk_ops *' to ide_drive_t. * Convert ide-{disk,floppy} drivers to use struct ide_disk_ops. * Merge ide-{disk,floppy} drivers into generic ide-gd driver. While at it: - ide_disk_init_capacity() -> ide_disk_get_capacity() Acked-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-17
| | | | | | | | | | | | | | | | | | | | | | 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: prepare for merging ide-gd-floppy.c with ide-gd.cBartlomiej Zolnierkiewicz2008-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - idefloppy_ref_mutex -> ide_disk_ref_mutex - idefloppy_cleanup_obj() -> ide_disk_release() - ide_floppy_get() -> ide_disk_get() - ide_floppy_put() -> ide_disk_put() - ide_floppy_capacity() -> ide_gd_capacity() - ide_floppy_remove() -> ide_gd_remove() - ide_floppy_probe() -> ide_gd_probe() - idefloppy_driver -> ide_gd_driver - idefloppy_open() -> ide_gd_open() - idefloppy_release() -> ide_gd_release() - idefloppy_getgeo() -> ide_gd_getgeo() - idefloppy_media_changed() -> ide_gd_media_changed() - idefloppy_revalidate_disk() -> ide_gd_revalidate_disk() - idefloppy_ops -> ide_gd_ops - idefloppy_init() -> ide_gd_init() - idefloppy_exit() -> ide_gd_exit() - 'floppy' -> 'idkp' in ide_disk_*() and ide_gd_*() - idefloppy_floppy_t -> struct ide_floppy_obj 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: factor out generic disk handling code to ide-gd-floppy.cBartlomiej Zolnierkiewicz2008-10-17
| | | | | | | | | | | | | | | | | | | | | | | | While at it: - idefloppy_do_request() -> ide_floppy_do_request() - idefloppy_end_request() -> ide_floppy_end_request() - idefloppy_setup() -> ide_floppy_setup() 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-disk: use IDE_DFLAG_MEDIA_CHANGEDBartlomiej Zolnierkiewicz2008-10-17
| | | | | | | | | | | | | | | | | | | | | | Set IDE_DFLAG_MEDIA_CHANGED in ide_gd_open() to signalize ide_gd_media_changed() that that media has changed (instead of relying on IDE_DFLAG_REMOVABLE). 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-disk: factor out generic disk handling code to ide-gd.cBartlomiej Zolnierkiewicz2008-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While at it: - IDEDISK_VERSION -> IDE_GD_VERSION - ide_cacheflush_p() -> ide_disk_flush() - init_idedisk_capacity() -> ide_disk_init_capacity() - idedisk_set_doorlock() -> ide_disk_set_doorlock() - idedisk_setup() -> ide_disk_setup() - ide_disk_capacity() -> ide_gd_capacity() - ide_disk_remove() -> ide_gd_remove() - ide_disk_probe() -> ide_gd_probe() - ide_disk_resume() -> ide_gd_resume() - ide_device_shutdown() -> ide_gd_shutdown() - idedisk_driver -> ide_gd_driver - idedisk_open() -> ide_gd_open() - idedisk_release() -> ide_gd_release() - idedisk_getgeo() -> ide_gd_getgeo() - idedisk_media_changed() -> ide_gd_media_changed() - idedisk_revalidate_disk() -> ide_gd_revalidate_disk() - idedisk_ops -> ide_gd_ops - idedisk_init() -> ide_gd_init() - idedisk_exit() -> ide_gd_exit() 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-17
| | | | | | | | | | | | | | | | | | 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_FORMAT_IN_PROGRESS -> IDE_DFLAG_FORMAT_IN_PROGRESSBartlomiej Zolnierkiewicz2008-10-17
| | | | | | | | | | | | | | 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_WP -> IDE_DFLAG_WPBartlomiej Zolnierkiewicz2008-10-17
| | | | | | | | | | | | | | 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-17
| | | | | | | | | | | | | | 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: use drive->capacity64 for caching current capacityBartlomiej Zolnierkiewicz2008-10-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use drive->capacity64 for caching current capacity. * Switch ide_floppy_capacity() to use drive->capacity64. * Call set_capacity() in idefloppy_open() and ide_floppy_probe() instead of ide_floppy_get_capacity(). 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: drop 'floppy' argument from idefloppy_setup()Bartlomiej Zolnierkiewicz2008-10-17
| | | | | | | | | | Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide-{disk,floppy}: set IDE_DFLAG_ATTACH in *_setup()Bartlomiej Zolnierkiewicz2008-10-17
| | | | | | | | | | | | | | 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-disk: move IDE_DFLAG_DOORLOCKING flag handling to idedisk_set_doorlock()Bartlomiej Zolnierkiewicz2008-10-17
| | | | | | | | | | | | | | 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-disk: use to_ide_drv() and ide_drv_g()Bartlomiej Zolnierkiewicz2008-10-17
| | | | | | | | | | | | | | 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: use alloc_disk_node()Bartlomiej Zolnierkiewicz2008-10-17
| | | | | | | | | | Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide-disk: lock media before checking for media changeBartlomiej Zolnierkiewicz2008-10-17
| | | | | | | | | | Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide-disk: fix IDE_DFLAG_LBA48 handling on resumeBartlomiej Zolnierkiewicz2008-10-17
| | | | | | | | | | | | | | Some code in idedisk_setup() should be in idedisk_capacity() instead. Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | block: remove __generic_unplug_device() from exportsJens Axboe2008-10-17
|/ | | | | | | The only out-of-core user is IDE, and that should be using blk_start_queueing() instead. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6Linus Torvalds2008-10-16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (46 commits) UIO: Fix mapping of logical and virtual memory UIO: add automata sercos3 pci card support UIO: Change driver name of uio_pdrv UIO: Add alignment warnings for uio-mem Driver core: add bus_sort_breadthfirst() function NET: convert the phy_device file to use bus_find_device_by_name kobject: Cleanup kobject_rename and !CONFIG_SYSFS kobject: Fix kobject_rename and !CONFIG_SYSFS sysfs: Make dir and name args to sysfs_notify() const platform: add new device registration helper sysfs: use ilookup5() instead of ilookup5_nowait() PNP: create device attributes via default device attributes Driver core: make bus_find_device_by_name() more robust usb: turn dev_warn+WARN_ON combos into dev_WARN debug: use dev_WARN() rather than WARN_ON() in device_pm_add() debug: Introduce a dev_WARN() function sysfs: fix deadlock device model: Do a quickcheck for driver binding before doing an expensive check Driver core: Fix cleanup in device_create_vargs(). Driver core: Clarify device cleanup. ...
| * device create: ide: convert device_create_drvdata to device_createGreg Kroah-Hartman2008-10-16
| | | | | | | | | | | | | | | | | | Now that device_create() has been audited, rename things back to the original call to be sane. Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | Kconfig: eliminate "def_bool n" constructsJan Beulich2008-10-16
|/ | | | | | | | | | | | | | | | | Using "def_bool n" is pointless, simply using bool here appears more appropriate. Further, retaining such options that don't have a prompt and aren't selected by anything seems also at least questionable. Signed-off-by: Jan Beulich <jbeulich@novell.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Tony Luck <tony.luck@intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6Linus Torvalds2008-10-13
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (66 commits) ata: Add documentation for hard disk shock protection interface (v3) ide: Implement disk shock protection support (v4) ide-cd: fix printk format warning piix: add Hercules EC-900 mini-notebook to ich_laptop short cable list ide-atapi: assign taskfile flags per device type ide-cd: move cdrom_info.dma to ide_drive_t.dma ide: add ide_drive_t.dma flag ide-cd: add a debug_mask module parameter ide-cd: convert driver to new ide debugging macro (v3) ide: move SFF DMA code to ide-dma-sff.c ide: cleanup ide-dma.c ide: cleanup ide_build_dmatable() ide: remove needless includes from ide-dma.c ide: switch to DMA-mapping API part #2 ide: make ide_dma_timeout() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n ide: make ide_dma_lost_irq() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n ide: __ide_dma_end() -> ide_dma_end() pmac: remove needless pmac_ide_destroy_dmatable() wrapper pmac: remove superfluous pmif == NULL checks ide: Two fixes regarding memory allocation ...
| * ide: Implement disk shock protection support (v4)Elias Oltmanns2008-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On user request (through sysfs), the IDLE IMMEDIATE command with UNLOAD FEATURE as specified in ATA-7 is issued to the device and processing of the request queue is stopped thereafter until the specified timeout expires or user space asks to resume normal operation. This is supposed to prevent the heads of a hard drive from accidentally crashing onto the platter when a heavy shock is anticipated (like a falling laptop expected to hit the floor). Port resets are deferred whenever a device on that port is in the parked state. v3: Elias Oltmanns <eo@nebensachen.de> wrote: [...] > >> 1. Make sure that no negative value is being passed to > >> jiffies_to_msecs() in ide_park_show(). > >> 2. Drop the superfluous variable hwif in ide_special_rq(). > >> 3. Skip initialisation of task and tf in ide_special_rq() if we are not > >> handling a (un)park request. > > > > Well, #3 should have been done differently because we donn't want to > > check for REQ_(UN)?PARK_HEADS more often than is necessary. > > While preparing the backport to 2.6.27, it has just occurred to me that > we need to clear the IDE_DFLAG_PARKED flag in ide_disk_pre_reset() > because this flag must not be set after *any* sort of access to the > device. v4: Fix a memory leak due to a missing blk_put_request() in issue_park_cmd(). Additionally, we should plug the queue when enqueueing the unpark request because there is no guarantee that the park timeout has not expired by then. Even though the chance for that to happen is very slim, the request might end up hanging in the queue until the next I/O operation is queued up. While at it, clean up the code a little: - make issue_park_cmd() a function of type void since nobody cares for the return value anyway; - use blk_start_queueing() instead of __blk_run_queue() since we don't have to worry about recursion; - remove a superfluous pointer deference in task_no_data_intr(). Signed-off-by: Elias Oltmanns <eo@nebensachen.de> Cc: Jeff Garzik <jeff@garzik.org>, Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: Tejun Heo <htejun@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide-cd: fix printk format warningAlexander Beregalov2008-10-13
| | | | | | | | | | | | Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Cc: Borislav Petkov <petkovbb@googlemail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * piix: add Hercules EC-900 mini-notebook to ich_laptop short cable listHerton Ronaldo Krzesinski2008-10-13
| | | | | | | | | | Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide-atapi: assign taskfile flags per device typeBorislav Petkov2008-10-13
| | | | | | | | | | | | | | There should be no functional 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_info.dma to ide_drive_t.dmaBorislav Petkov2008-10-13
| | | | | | | | | | | | | | 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: add ide_drive_t.dma flagBorislav Petkov2008-10-13
| | | | | | | | | | | | | | | | | | This flag is to accomodate ide-cd functionality into ide atapi. 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-13
| | | | | | | | | | | | 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-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * ide: move SFF DMA code to ide-dma-sff.cBartlomiej Zolnierkiewicz2008-10-13
| | | | | | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: cleanup ide-dma.cBartlomiej Zolnierkiewicz2008-10-13
| | | | | | | | | | | | | | | | | | - s/HWIF(drive)/drive->hwif/ - s/HWGROUP(drive)/[drive->]hwif->hwgroup/ - fixup error messages in ide_dma_intr() & dma_timer_expiry() - fix checkpatch.pl errors/warnings Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: cleanup ide_build_dmatable()Bartlomiej Zolnierkiewicz2008-10-13
| | | | | | | | | | | | | | | | | | | | | | - use for_each_sg() - move printing 'DMA table too small' message below use_pio_instead label - merge '64KB bug' comment with function documentation - fix intendation There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: remove needless includes from ide-dma.cBartlomiej Zolnierkiewicz2008-10-13
| | | | | | | | Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: switch to DMA-mapping API part #2Bartlomiej Zolnierkiewicz2008-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up to commit 5c05ff68b9a9b40a9be949497e0aa980185565cf ("ide: switch to DMA-mapping API"): * pci_{alloc,free}_consistent() -> dma_{alloc,free}_coherent() in ide_{allocate,release}_dma_engine(). * Add ->prd_max_nents and ->prd_ent_size fields to ide_hwif_t (+ set default values in ide_allocate_dma_engine()). * Make ide_{allocate,release}_dma_engine() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n. Then convert au1xxx-ide.c, scc_pata.c and sgiioc4.c to use them. * Add missing ->init_dma method to scc_pata. This patch also fixes: - ->dmatable_cpu leak for au1xxx-ide - too early realease of ->dmatable_cpu for scc_pata - wrong amount of ->dmatable_cpu memory being freed for sgiioc4 While at it: - remove superfluous ->dma_base check from ide_unregister() - return -ENOMEM on error in ide_release_dma_engine() - beautify error message in ide_release_dma_engine() Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: make ide_dma_timeout() available also for CONFIG_BLK_DEV_IDEDMA_SFF=nBartlomiej Zolnierkiewicz2008-10-13
| | | | | | | | | | | | | | | | | | | | | | | | Make ide_dma_timeout() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n and convert {ics,au1xxx-}ide.c to use it. While at it: - dump ATA Status register content on error - use EXPORT_SYMBOL_GPL() to match the rest of SFF DMA functions Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: make ide_dma_lost_irq() available also for CONFIG_BLK_DEV_IDEDMA_SFF=nBartlomiej Zolnierkiewicz2008-10-13
| | | | | | | | | | | | | | | | | | | | | | Make ide_dma_lost_irq() available also for CONFIG_BLK_DEV_IDEDMA_SFF=n and convert {ics,au1xxx-}ide.c to use it. While at it: - use EXPORT_SYMBOL_GPL() to match the rest of SFF DMA functions Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: __ide_dma_end() -> ide_dma_end()Bartlomiej Zolnierkiewicz2008-10-13
| | | | | | | | | | | | | | | | While at it: - use EXPORT_SYMBOL_GPL() to match the rest of SFF DMA functions Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * pmac: remove needless pmac_ide_destroy_dmatable() wrapperBartlomiej Zolnierkiewicz2008-10-13
| | | | | | | | | | | | | | | | hwif->sg_nents is always != 0 when this function is called and there is also no need to explicitely zero hwif->sg_nents. Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * pmac: remove superfluous pmif == NULL checksBartlomiej Zolnierkiewicz2008-10-13
| | | | | | | | | | Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * ide: Two fixes regarding memory allocationElias Oltmanns2008-10-13
| | | | | | | | | | | | | | | | | | | | | | | | In function ide_devset_execute() we should use __GFP_WAIT rather than GFP_KERNEL. Also, the allocation cannot possibly fail at that point. More importantly, there is a potential memory leak in the device probing code. The infrastructure seems rather complex and I hope I haven't messed anything up by trying to fix this. Signed-off-by: Elias Oltmanns <eo@nebensachen.de> [bart: remove superfluous ide_lock taking] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>