aboutsummaryrefslogtreecommitdiff
path: root/drivers/ide
AgeCommit message (Collapse)Author
2009-01-06ide: remove HWIF() macroBartlomiej Zolnierkiewicz
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06ide: move ide_init_port_data() and friends to ide-probe.cBartlomiej Zolnierkiewicz
* Move IDE_DEFAULT_MAX_FAILURES to <linux/ide.h>. * Move ide_cfg_mtx, ide_hwif_to_major[], ide_port_init_devices_data(), ide_init_port_data(), ide_init_port_hw() and ide_unregister() to ide-probe.c from ide.c. * Make ide_unregister(), ide_init_port_data(), ide_init_port_hw() and ide_cfg_mtx static. While at it: * Remove stale ide_init_port_data() documentation and ide_lock extern. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06ide: update ide_unregister() documentationBartlomiej Zolnierkiewicz
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06ide: merge ide_hwgroup_t with ide_hwif_t (v2)Bartlomiej Zolnierkiewicz
* 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>
2009-01-06ide: use lock bitops for ports serialization (v2)Bartlomiej Zolnierkiewicz
* Add ->host_busy field to struct ide_host and use it's first bit together with lock bitops to provide new ports serialization method. * Convert core IDE code to use new ide_[un]lock_host() helpers. This removes the need for taking hwgroup->lock if host is already busy on serialized hosts and makes it possible to merge ide_hwgroup_t into ide_hwif_t (done in the later patch). * Remove no longer needed ide_hwgroup_t.busy and ide_[un]lock_hwgroup(). * Update do_ide_request() documentation. v2: * ide_release_lock() should be called inside IDE_HFLAG_SERIALIZE check. * Add ide_hwif_t.busy flag and ide_[un]lock_port() for serializing devices on a port. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06ide: remove hwgroup->hwif and {drive,hwif}->nextBartlomiej Zolnierkiewicz
* Add 'int port_count' field to ide_hwgroup_t to keep the track of the number of ports in the hwgroup. Then update init_irq() and ide_remove_port_from_hwgroup() to use it. * Remove no longer needed hwgroup->hwif, {drive,hwif}->next, ide_add_drive_to_hwgroup() and ide_remove_drive_from_hwgroup() (hwgroup->drive now only denotes the currently active device in the hwgroup). * Update locking documentation in <linux/ide.h>. While at it: * Rename ->drive field in ide_hwgroup_t to ->cur_dev. * Use __func__ in ide_timer_expiry(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06ide: use per-port IRQ handlersBartlomiej Zolnierkiewicz
Use hwif instead of hwgroup as {request,free}_irq()'s cookie, teach ide_intr() to return early for non-active serialized ports, modify unexpected_intr() accordingly and then use per-port IRQ handlers instead of per-hwgroup ones. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06ide: add ->cur_port to struct ide_host and use it for serialized hostsBartlomiej Zolnierkiewicz
* Pass 'ide_hwif_t *' instead of 'ide_hwgroup_t *' to unexpected_intr(). * Cache pointer to the port currently being serviced in ->cur_port and use it instead of hwif->hwgroup on serialized hosts. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06ide: fix setting nIEN on idle devicesBartlomiej Zolnierkiewicz
Fix do_ide_request() to operate on previous device / port instead of the current one. The original code was wrong since at least Feb 2002 (2.4.0 timeframe). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-06ide: fix LOCKDEP warningBartlomiej Zolnierkiewicz
commit 295f00042aaf6b553b5f37348f89bab463d4a469 ("ide: don't execute the next queued command from the hard-IRQ context") overlooked that ide_do_drive_cmd() (used for REQUEST SENSE command handling) may still invoke do_ide_request() (->request_fn) in the hard-IRQ context through blk_start_queueing(). This resulted in a LOCKDEP warning after commit b599bc7a1199419e122cb2e9ec6b0fa2cfbbc17b ("ide: use per-device request queue locks (v2)"). Since calling blk_start_queuing() in ide_do_drive_cmd() doesn't make much sense as the port is already marked as busy (so the execution of the new command will be deferred anyway) then just remove it fixing LOCKDEP warning and saving some CPU cycles at the same time. Reported-and-tested-by: Larry Finger <Larry.Finger@lwfinger.net> Reported-by: Grissiom <chaos.proton@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide-atapi: start dma in a drive-specific wayBorislav Petkov
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>
2009-01-02ide-atapi: put the rest of non-ide-cd code into the else-clause of ↵Borislav Petkov
ide_transfer_pc 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>
2009-01-02ide-atapi: remove timeout arg to ide_issue_pcBorislav Petkov
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>
2009-01-02ide-cd: remove handler wrappersBorislav Petkov
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>
2009-01-02ide-cd: remove xferlen arg to cdrom_start_packet_commandBorislav Petkov
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>
2009-01-02ide-atapi: split drive-specific functionality in ide_issue_pcBorislav Petkov
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>
2009-01-02ide-atapi: assign expiry and timeout based on device typeBorislav Petkov
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>
2009-01-02ide-atapi: compute cmd_len based on device type in ide_transfer_pcBorislav Petkov
There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> [bart: move cmd_len check closer to ->output_data() call] Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide: remove the last ide-scsi remnantsBorislav Petkov
Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide-atapi: remove ide-scsi remnants from ide_pc_intr()Borislav Petkov
As a result, remove now unused ide_scsi_get_timeout and ide_scsi_expiry. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide-atapi: remove ide-scsi remnants from ide_transfer_pc()Borislav Petkov
Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide-atapi: remove ide-scsi remnants from ide_issue_pcBorislav Petkov
Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide-cd: move cdrom_timer_expiry to ide-atapi.cBorislav Petkov
- 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>
2009-01-02ide-atapi: teach ide atapi about drive->waiting_for_dmaBorislav Petkov
In addition, we wait for DRQ to be asserted by repeatedly polling device status no matter what DRQ type each device implements. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide-atapi: accomodate transfer length calculation for ide-cdBorislav Petkov
... 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>
2009-01-02ide-atapi: setup dma for ide-cdBorislav Petkov
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>
2009-01-02ide-atapi: combine drive-specific assignmentsBorislav Petkov
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>
2009-01-02ide-atapi: add a dev_is_idecd-inlineBorislav Petkov
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>
2009-01-02remove ide-scsiFUJITA Tomonori
As planed, this removes ide-scsi. The 2.6 kernel supports direct writing to ide CD drives, which eliminates the need for ide-scsi. ide-scsi has been unmaintained and marked as deprecated. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: James.Bottomley@HansenPartnership.com Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide-floppy: allocate only toplevel packet commandsLinus Torvalds
This makes the top-level function just allocate a single pc entry, and then pass it down as a pointer to all the helper functions that also need one of those "struct ide_atapi_pc" things. As far as I can tell, the use of these things never overlaps each other, BUT I DID NOT CHECK VERY CLOSELY! So I'm not guaranteeing this is correct, and I don't have the hardware. It would be good for somebody who knows the code more, and has the hardware, could please test this? With this, ide-floppy still has fairly big stack usage, but instead of idefloppy_ioctl [vmlinux]: 1208 ide_floppy_get_capacity [vmlinux]: 872 idefloppy_release [vmlinux]: 408 idefloppy_open [vmlinux]: 408 where those two first ones are at the very top of the list of stack users for me, it's now ide_floppy_get_capacity [vmlinux]: 404 ide_floppy_ioctl [vmlinux]: 364 ie they are still high, but they are no longer at the top. Borislav: Since ide_floppy_get_capacity is passed as a function pointer to other parts of the kernel (e.g., block layer) we need that ide_atapi_pc to be created on stack. Also, redid stack users numbers above. The two functions missing from Linus' original 'make stackusage' output are due to ide being rewritten/reorganized atm. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide-cd: move debug defines into headerBorislav Petkov
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>
2009-01-02ide: use per-device request queue locks (v2)Bartlomiej Zolnierkiewicz
* Move hack for flush requests from choose_drive() to do_ide_request(). * Add ide_plug_device() helper and convert core IDE code from using per-hwgroup lock as a request lock to use the ->queue_lock instead. * Remove no longer needed: - choose_drive() function - WAKEUP() macro - 'sleeping' flag from ide_hwif_t - 'service_{start,time}' fields from ide_drive_t This patch results in much simpler and more maintainable code (besides being a scalability improvement). v2: * Fixes/improvements based on review from Elias: - take as many requests off the queue as possible - remove now redundant BUG_ON() Cc: Elias Oltmanns <eo@nebensachen.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide: add ide_[un]lock_hwgroup() helpersBartlomiej Zolnierkiewicz
Add ide_[un]lock_hwgroup() inline helpers for obtaining exclusive access to the given hwgroup and update the core code accordingly. [ This change besides making code saner results in more efficient use of ide_{get,release}_lock(). ] Cc: Michael Schmitz <schmitz@biophys.uni-duesseldorf.de> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Elias Oltmanns <eo@nebensachen.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide: remove "paranoia" checks for hwgroup->busyBartlomiej Zolnierkiewicz
Remove "paranoia" checks for hwgroup->busy from ide_timer_expiry() and ide_intr(). This is a preparation for future changes. Cc: Michael Schmitz <schmitz@biophys.uni-duesseldorf.de> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Elias Oltmanns <eo@nebensachen.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide: remove IDE PM hack from do_ide_request()Bartlomiej Zolnierkiewicz
We now tell block layer that there is still work to do using blk_plug_device() so hack for IDE Power Management can be removed (it was buggy for hwgroups having more than 4 devices anyway). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide: don't execute the next queued command from the hard-IRQ context (v2)Bartlomiej Zolnierkiewicz
* Tell the block layer that we are not done handling requests by using blk_plug_device() in ide_do_request() (request handling function) and ide_timer_expiry() (timeout handler) if the queue is not empty. * Remove optimization which directly calls ide_do_request() for the next queued command from the ide_intr() (IRQ handler) and ide_timer_expiry(). * Remove no longer needed IRQ masking from ide_do_request() - in case of IDE ports needing serialization disable_irq_nosync()/enable_irq() was used for the (possibly shared) IRQ of the other IDE port. * Put the misplaced comment in the right place in ide_do_request(). * Drop no longer needed 'int masked_irq' argument from ide_do_request(). * Merge ide_do_request() into do_ide_request(). * Remove no longer needed IDE_NO_IRQ define. While at it: * Don't use HWGROUP() macro in do_ide_request(). * Use __func__ in ide_intr(). This patch reduces IRQ hadling latency for IDE and improves the system-wide handling of shared IRQs (which should result in more timeout resistant and stable IDE systems). It also makes it possible to do some further changes later (i.e. replace some busy-waiting delays with sleeping equivalents). v2: Changes per review from Elias Oltmanns: - fix wrong goto statement in 'if (startstop == ide_stopped)' block - use spin_unlock_irq() - don't use obsolete HWIF() macro Cc: Elias Oltmanns <eo@nebensachen.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide: move sysfs support to ide-sysfs.cBartlomiej Zolnierkiewicz
While at it: - media_string() -> ide_media_string() There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide: factor out device type classifying from do_identify()Bartlomiej Zolnierkiewicz
Factor out device type classifying from do_identify() to ide_classify_ata_dev() and ide_classify_atapi_dev(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide: small ide_register_port() cleanupBartlomiej Zolnierkiewicz
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02ide: remove chipset type fixup from ide_host_register()Bartlomiej Zolnierkiewicz
* Set chipset type explicitly in tx4938ide and tx4939ide host drivers (all other host drivers were updated already). * Remove no longer used chipset type fixup from ide_host_register(). Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2009-01-02tx493x: fix indentationBartlomiej Zolnierkiewicz
Trivial CodingStyle fixup for tx4938ide and tx4939ide drivers. Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Acked-by: Sergei Shtyltov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-31ACPI: remove private acpica headers from driver filesLin Ming
External driver files should not include any private acpica headers. Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2008-12-30Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (407 commits) [ARM] pxafb: add support for overlay1 and overlay2 as framebuffer devices [ARM] pxafb: cleanup of the timing checking code [ARM] pxafb: cleanup of the color format manipulation code [ARM] pxafb: add palette format support for LCCR4_PAL_FOR_3 [ARM] pxafb: add support for FBIOPAN_DISPLAY by dma braching [ARM] pxafb: allow pxafb_set_par() to start from arbitrary yoffset [ARM] pxafb: allow video memory size to be configurable [ARM] pxa: add document on the MFP design and how to use it [ARM] sa1100_wdt: don't assume CLOCK_TICK_RATE to be a constant [ARM] rtc-sa1100: don't assume CLOCK_TICK_RATE to be a constant [ARM] pxa/tavorevb: update board support (smartpanel LCD + keypad) [ARM] pxa: Update eseries defconfig [ARM] 5352/1: add w90p910-plat config file [ARM] s3c: S3C options should depend on PLAT_S3C [ARM] mv78xx0: implement GPIO and GPIO interrupt support [ARM] Kirkwood: implement GPIO and GPIO interrupt support [ARM] Orion: share GPIO IRQ handling code [ARM] Orion: share GPIO handling code [ARM] s3c: define __io using the typesafe version [ARM] S3C64XX: Ensure CPU_V6 is selected ...
2008-12-30Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6Linus Torvalds
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (33 commits) ide-cd: remove dead dsc_overlap setting ide: push local_irq_{save,restore}() to do_identify() ide: remove superfluous local_irq_{save,restore}() from ide_dump_status() ide: move legacy ISA/VLB ports handling to ide-legacy.c (v2) ide: move Power Management support to ide-pm.c ide: use ATA_DMA_* defines in ide-dma-sff.c ide: checkpatch.pl fixes for ide-lib.c ide: remove inline tags from ide-probe.c ide: remove redundant code from ide_end_drive_cmd() ide: struct device - replace bus_id with dev_name(), dev_set_name() ide: rework handling of serialized ports (v2) cy82c693: remove superfluous ide_cy82c693 chipset type trm290: add IDE_HFLAG_TRM290 host flag ide: add ->max_sectors field to struct ide_port_info rz1000: apply chipset quirks early (v2) ide: always set nIEN on idle devices ide: fix ->quirk_list checking in ide_do_request() gayle: set IDE_HFLAG_SERIALIZE explictly cmd64x: set IDE_HFLAG_SERIALIZE explictly for CMD646 ali14xx: doesn't use shared IRQs ...
2008-12-29ide-cd: remove dead dsc_overlap settingBartlomiej Zolnierkiewicz
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>
2008-12-29ide: push local_irq_{save,restore}() to do_identify()Bartlomiej Zolnierkiewicz
Push local_irq_{save,restore}() from actual_try_to_identify() to do_identify() and remove no longer needed local_irq_enable(). Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29ide: remove superfluous local_irq_{save,restore}() from ide_dump_status()Bartlomiej Zolnierkiewicz
No reason to run this function with local IRQs off. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29ide: move legacy ISA/VLB ports handling to ide-legacy.c (v2)Bartlomiej Zolnierkiewicz
* Move legacy ISA/VLB ports handling from ide-probe.c to ide-legacy.c. * Add CONFIG_IDE_LEGACY config option to be selected by host drivers needing ide-legacy.c. v2: Fix CONFIG_IDE_LEGACY not being defined in Kconfig. (from Takashi Iwai <tiwai@suse.de>) There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29ide: move Power Management support to ide-pm.cBartlomiej Zolnierkiewicz
There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
2008-12-29ide: use ATA_DMA_* defines in ide-dma-sff.cBartlomiej Zolnierkiewicz
In few places open-coded values were still being used. Fix it. Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>