| Age | Commit message (Collapse) | Author |
|
patch 1/2 (revised):
- Fix drive->waiting_for_dma to work with CDB-intr devices.
- Do the dma status clearing in ide_intr() and add a new
hwif->ide_dma_clear_irq for Intel ICHx controllers.
Revised per Alan, Sergei and Bart's advice.
Patch against 2.6.20-rc6. Tested ok on my ICH4 and pdc20275 adapters.
Please review/apply, thanks.
Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
|
|
Since there's no longer any external user, we can make __ide_end_request()
static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
This patch stops CompactFlash devices being marked as removable. They are
not removable (as defined by Linux) as the media and device are
inseparable. When a card is removed, the whole device is removed from the
system and never sits in a media-less state.
This stops some nasty udev device creation/destruction loops.
Further, once this change is made, there is no need for ide to can be
removed from ide_drive_t.
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
There's a problem with the REQ_BLOCK_PC handling as well (bad ->data_len
handling) where it could actually complete a request ahead of time. I
suggest we just back this out for now, I will resubmit it later when I'm
fully confident in it.
This reverts commit 8672d57138b34447719cd7749f3d21070e1175a1
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
The patch changes semaphores that are initialized as
locked to complete().
Source: MontaVista Software, Inc.
Modified-by: Steven Rostedt <rostedt@goodmis.org>
The following patch is from Montavista. I modified it slightly.
Semaphores are currently being used where it makes more sense for
completions. This patch corrects that.
Signed-off-by: Aleksey Makarov <amakarov@ru.mvista.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
|
|
This patch makes IDE use the new blk_complete_request() interface.
There's still room for improvement, as __ide_end_request() really
could drop the lock after getting HWGROUP->rq (why does it need to
hold it in the first place? If ->rq access isn't serialized, we are
screwed anyways).
Signed-off-by: Jens Axboe <axboe@suse.de>
|
|
macros
____cacheline_maxaligned_in_smp is currently used to align critical structures
and avoid false sharing. It uses per-arch L1_CACHE_SHIFT_MAX and people find
L1_CACHE_SHIFT_MAX useless.
However, we have been using ____cacheline_maxaligned_in_smp to align
structures on the internode cacheline size. As per Andi's suggestion,
following patch kills ____cacheline_maxaligned_in_smp and introduces
INTERNODE_CACHE_SHIFT, which defaults to L1_CACHE_SHIFT for all arches.
Arches needing L3/Internode cacheline alignment can define
INTERNODE_CACHE_SHIFT in the arch asm/cache.h. Patch replaces
____cacheline_maxaligned_in_smp with ____cacheline_internodealigned_in_smp
With this patch, L1_CACHE_SHIFT_MAX can be killed
Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: Shai Fultheim <shai@scalex86.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Remove unused fields: ioctl, ata[pi]_prebuilder.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
Remove:
* stale comment
* unused HOST() macro
* unused ata_{error,control}_t types
* unused atapi_select_t type
* ide_init_subdrivers() prototype
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
bart: slightly modified by me
Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
Remove duplicate documentation for ide_do_drive_cmd() from
<linux/ide.h>, this function is already documented in ide-io.c.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
The structure ide_driver_t have a .owner field which is a duplicate
of .gendriver.owner field (.gen_driver is a struct device_driver).
This patch removes ide_driver_t's owner field.
Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
A nice feature of sysfs is that it can create the symlink from the
driver to the module that is contained in it.
It requires that the device_driver.owner is set, what is not the
case for many PCI drivers.
This patch allows pci_register_driver to set automatically the
device_driver.owner for any PCI driver.
Credits to Al Viro who suggested the method.
Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--
drivers/ide/setup-pci.c | 12 +++++++-----
drivers/pci/pci-driver.c | 9 +++++----
include/linux/ide.h | 3 ++-
include/linux/pci.h | 10 ++++++++--
4 files changed, 22 insertions(+), 12 deletions(-)
|
|
CONFIG_IDE_MAX_HWIFS is a generic thing, no need to have it duplicated
by every arch that uses it.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
Devices driven by ide-cs will appear under /sys/devices instead of the
appropriate PCMCIA device. To fix this I had to extend the hw_regs_t
structure with a 'struct device' field, which allows us to set the
parent link for the appropriate hwif.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@suse.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
- converted to platform bus
- removed pci dependencies
- removed virt_to_phys/phys_to_virt calls
System now can root off of a disk.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
diff --git a/Documentation/mips/AU1xxx_IDE.README b/Documentation/mips/AU1xxx_IDE.README
new file mode 100644
|
|
1. Move hwif_to_node to ide.h
2. Use hwif_to_node in ide-disk.c
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Patch to allocate the control structures for for ide devices on the node of
the device itself (for NUMA systems). The patch depends on the Slab API
change patch by Manfred and me (in mm) and the pcidev_to_node patch that I
posted today.
Does some realignment too.
Signed-off-by: Justin M. Forbes <jmforbes@linuxtx.org>
Signed-off-by: Christoph Lameter <christoph@lameter.com>
Signed-off-by: Pravin Shelar <pravin@calsoftinc.com>
Signed-off-by: Shobhit Dayal <shobhit@calsoftinc.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
* add ide_bus_match() and export ide_bus_type
* split ide_remove_driver_from_hwgroup() out of ide_unregister()
* move device cleanup from ide_unregister() to drive_release_dev()
* convert ide_driver_t->name to driver->name
* convert ide_driver_t->{attach,cleanup} to driver->{probe,remove}
* remove ide_driver_t->busy as ide_bus_type->subsys.rwsem
protects against concurrent ->{probe,remove} calls
* make ide_{un}register_driver() void as it cannot fail now
* use driver_{un}register() directly, remove ide_{un}register_driver()
* use device_register() instead of ata_attach(), remove ata_attach()
* add proc_print_driver() and ide_drivers_show(), remove ide_drivers_op
* fix ide_replace_subdriver() and move it to ide-proc.c
* remove ide_driver_t->drives, ide_drives and drives_lock
* remove ide_driver_t->drivers, drivers and drivers_lock
* remove ide_drive_t->driver and DRIVER() macro
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@elka.pw.edu.pl>
|
|
* move ->disk from ide_drive_t to driver specific objects
* make drivers allocate struct gendisk and setup rq->rq_disk
(there is no need to do this for REQ_DRIVE_TASKFILE requests)
* add ide_init_disk() helper and kill alloc_disks() in ide-probe.c
* kill no longer needed ide_open() and ide_fops[] in ide.c
ide_init_disk() fixed by Andrew Morton <akpm@osdl.org>.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
Add ide_{un}register_region() and fix ide-{tape,scsi}.c to register
block device number ranges. In ata_probe() only probe for modules.
Behavior is unchanged because:
* if driver is already loaded and attached to drive ata_probe()
is not called et all
* if driver is loaded by ata_probe() it will register new number range
for a drive and this range will be found by kobj_lookup()
If this is not clear please read http://lwn.net/Articles/25711/
and see drivers/base/map.c.
This patch makes it possible to move drive->disk allocation from
ide-probe.c to device drivers.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
As a result disk->private_data can be used by device drivers now.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
* add private /proc/ide/hd?/capacity handlers to ide-{cd,disk,floppy}.c
* use generic proc_ide_read_capacity() for ide-{scsi,tape}.c
* kill ->capacity, default_capacity() and generic_subdriver_entries[]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
Add ide_drive_t->post_reset flag and use it to signal post reset
condition to the ide-tape driver (the only user of ->pre_reset).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
Some rare races between ide-default and ide-disk are possible, i.e.:
* ide-default is used, I/O request is triggered (ie. /proc/ide/hd?/identify),
drive->special is cleared silently (so CHS is not initialized properly),
ide-disk is loaded and fails if drive uses CHS
* ide-disk is used, drive is resetted, ide-disk is unloaded, ide-default
takes control over drive and on the first I/O request silently clears
drive->special without restoring settings
Fix them by moving idedisk_{special,pre_reset}() and company to IDE core.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
Move PM code from ide-cd.c and ide-disk.c to IDE core so:
* PM is supported for other ATAPI devices (floppy, tape)
* PM is supported even if specific driver is not loaded
Also s/HWIF(drive)/drive->hwif/ while at it.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
This reworks the core barrier support to be a lot nicer, so that all the
nasty code resides outside of drivers/ide. It requires minimal changes to
support in a driver, I've added SCSI support as an example. The ide code
is adapted to the new code.
With this patch, we support full barriers on sata now. Bart has acked the
addition to -mm, I would like for this to be submitted as soon as 2.6.12
opens.
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
* always call __ide_do_rw_disk() in ide_do_rw_disk()
* modify ide_hwif_t->rw_disk hook accordingly
* update and cleanup hpt372n_rw_disk()
(the only user of ide_hwif_t->rw_disk hook)
* make __ide_do_rw_disk() static + fix comment
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
It's a bit difficult to have a value and a sign bit in a
1-bit field.
Fix (90) boolean/bitfield sparse warnings:
include/linux/ide.h:937:18: warning: dubious one-bit signed bitfield
include/linux/ide.h:939:17: warning: dubious one-bit signed bitfield
Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
Signed-off-by: Tejun Heo <tj@home-tj.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
ide_hwgroup_t.polling field added. 0 in poll_timeout field
used to indicate inactive polling but because 0 is a valid
jiffy value, though slim, there's a chance that something
weird can happen.
Signed-off-by: Tejun Heo <tj@home-tj.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
ide_drive_t.sleeping field added. 0 in sleep field used to
indicate inactive sleeping but because 0 is a valid jiffy
value, though slim, there's a chance that something can go
weird. And while at it, explicit jiffy comparisons are
converted to use time_before() macros.
Signed-off-by: Tejun Heo <tj@home-tj.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
This patch contains the following possible cleanups:
- make some needlessly global code static
- ide-dma.c: remove the unneeded EXPORT_SYMBOL(__ide_dma_test_irq)
slightly changed by me (bart)
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
From: Arjan van de Ven <arjan@infradead.org>
* make atapi_{input,output}_bytes() static, fix users to use drive->hwif
* remove ide_read_24() export; it's unused since the ide-io.c reorganization
* add a FIXME comment to the ide_fix_driveid() export
slightly changed by me (bart)
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
On the one hand APM isn't enabled on all laptops.
On the other hand, this also affects regular PCs with APM support (or
using a distribution kernel with APM support).
The time for the !APM case was already increased from 30msec in 2.4 .
Isn't there a timeout that is suitable for all cases?
Alan Cox answered:
> The five seconds should be just fine for all cases. The smaller value
> with no
> power manglement should help speed up recovery however. It probably
> doesn't belong CONFIG_APM now ACPI and friends are involved either.
Until someone has a real good solution (consider e.g. that most PC users
might have ACPI support enabled), this patch unconditionally sets
WAIT_READY to 5 seconds.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
Make ide_dma_intr() always available if CONFIG_BLK_DEV_IDEDMA=y
and use it instead of icside_dmaintr(). Acked by Russell.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
This cruft pre-dates benh's PowerManagement code.
Moreover ->suspend_reset is always equal to zero.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
Hi,
now that you cleaned up the ide-io.c code to be all in the right file,
try_to_flush_leftover_data can become static since all users are in this
file now.
bart: also remove declaration from <linux/ide.h>
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
* add drive->media != ide_disk check to ide_abort()
* kill ide_cdrom_abort() and idedisk_abort()
* split __ide_abort() out of ide_abort()
* call driver->abort() inside ide_abort()
* convert the only user of driver->abort()
* fix default_abort() and idescsi_atapi_abort()
* make idescsi_atapi_abort() static
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
* split __ide_error() out of ide_error()
* call driver->error() inside ide_error()
* convert all users of driver->error()
* fix default_cleanup() and idescsi_atapi_error()
* make idescsi_atapi_error() static
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
* move idedisk_dump_status() and ide_dump_status() to ide-lib.c
* rename idedisk_dump_status() to ide_dump_ata_status()
* use ide_dump_{ata,atapi}_status() in ide_dump_status()
* use ide_dump_status() in ide-cd.c, ide-disk.c and ide-scsi.c
* make ide_dump_opcode() and ide_dump_atapi_status)() static
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
* add it to ide-lib.c and cleanup ide{disk}_dump_status()
* as a bonus it fixes unknown opcode reporting in ide_dump_status()
* use ide_dump_opcode() in ide_dump_atapi_status()
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
also kill default_sense() in ide.c
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
- nothing clever here: the most noticeable change is the change of
returned value for (*init_setup) in struct ide_pci_device_s which
goes from void to int. Anything else is editing and checking for
errors in the output of the compiler;
- pci_disable_device() added for the error path in pci_init_sgiioc4();
- BUG() removed in amd74xx_probe(): good old printk() is enough.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
- Change the return value and the prototype of do_ide_setup_pci_device
Due to lack of appropriate return status code, the current clients of
do_ide_setup_pci_device() can not distinguish a failing invocation
from a successfull one. The patch modify do_ide_setup_pci_device() so
that it can propagate some of the errors from the lower layers.
- Make ide_setup_pci_device() aware of the change and propagate the news
itself. I only gave a quick sight to create_proc_ide_interfaces() (and
ide_remove_proc_entries()) but they do seem sane and it should not matter
if it fails or not.
- ide_setup_pci_devices(): mostly the same thing than ide_setup_pci_device().
do not look trivially suspect.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
(some changes by me - bart)
The current driver looks at fields before it is safe to, we move the
mod15rm bug handler to be a fixup and this ensures the probe has been
completed before we use the ident data.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|
|
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
(some changes by me - bart)
We add probe_hwif_init_with_fixup (seperate naming as requested by
Bartlomiej). This runs a fixup on present interfaces before attaching
the drives. In order to be useful we need also an _with_fixup version
of ide_register_hw function.
The sometimes troublesome undecoded slave detector is moved to its own
function and exported so that ide-cs and the upcoming delkin_cb can both
use it (along with any arch specific cf/pcmcia drivers I don't know
about). The non-relevant checks for this scenario are removed.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
|