* Add IDE_HFLAG_TRM290 host flag and use it in ide_build_dmatable().
* Remove no longer needed ide_trm290 chipset type.
Acked-by: Sergei Shtylyov <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
* Add ->max_sectors field to struct ide_port_info to allow host drivers
to specify value used for hwif->rqsize (if smaller than the default).
* Convert pdc202xx_old to use ->max_sectors and remove no longer needed
IDE_HFLAG_RQSIZE_256 flag.
There should be no functional changes caused by this patch.
Acked-by: Sergei Shtyltov <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
* Use pci_name(dev) instead of hwif->name in init_hwif_rz1000().
* init_hwif_rz1000() -> rz1000_init_chipset(). Update rz1000_init_one()
to use rz1000_init_chipset() and add now required rz1000_remove().
* Remove superfluous ide_rz1000 chipset type.
v2:
* unsigned int rz1000_init_chipset() -> int rz1000_disable_readahead()
per Sergei's suggestion.
Cc: Sergei Shtylyov <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
* Set nIEN for previous port/device in ide_do_request()
also if port uses a non-shared IRQ.
* Remove no longer needed ide_hwif_t.sharing_irq.
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
Fix nIEN quirk check to also omit quirky devices using pdc202xx_{new,old}
host drivers for which ->quirk_list == 2.
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
If IDE doubler is used ports need to be serialized. Currently
init_irq() handles it fine but lets also set IDE_HFLAG_SERIALIZE
host flag explicitly in preparation for future changes.
Also convert the driver to use struct ide_port_info while at it.
Cc: Geert Uytterhoeven <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
* Set IDE_HFLAG_SERIALIZE explictly for CMD646.
* Remove no longer needed ide_cmd646 chipset type (which has
a nice side-effect of fixing handling of unexpected IRQs).
Cc: Sergei Shtylyov <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
It doesn't make much sense nowadays and is problematic on some drives.
Cc: Borislav Petkov <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
Both choose_drive() and PM handling code make sure that the queue
is unplugged so no need to check it again.
Cc: Elias Oltmanns <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
Now that (almost) all host drivers have been fixed not to abuse ide_lock
and core code usage of ide_lock has been sanitized we may safely replace
ide_lock by per-hwgroup locks.
This patch is partially based on earlier patch from Ravikiran G Thirumalai.
While at it:
- don't use deprecated HWIF() and HWGROUP() macros
- update locking documentation in ide.h
v2:
Add missing spin_lock_init(&hwgroup->lock). (Noticed by Elias Oltmanns)
Cc: Vaibhav V. Nivargi <[email protected]>
Cc: Alok N. Kataria <[email protected]>
Cc: Shai Fultheim <[email protected]>
Signed-off-by: Ravikiran Thirumalai <[email protected]>
Cc: Elias Oltmanns <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
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 <[email protected]>
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 <[email protected]>
IDE settings are protected by ide_setting_mtx mutex so there is
no need to hold ide_lock in ide_setting_ioctl(), ide_read_setting()
and ide_proc_unregister_driver().
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
Just a preparation for future changes.
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
Commit 4dde4492d8 ("ide: make drive->id
an union (take 2)") accidentally introduced an IDE ACPI regression which
at least on some machines confuses ACPI and breaks suspend. Fix it.
Fixes kernel.org bug #12279:
http://bugzilla.kernel.org/show_bug.cgi?id=12279
[ Sorry about the bug (IDE ACPI is not used by default so it managed
to slip in). Still it is kind of surprising that the bug breaks
suspend as it shouldn't impact anything except IDE ACPI (it seems
that it uncovered either some ACPI/PM deficiency or a BIOS bug). ]
Reported-and-bisected-by: David Roka <[email protected]>
Tested-by: David Roka <[email protected]>
Cc: Rafael J. Wysocki <[email protected]>
Cc: Len Brown <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
Remove some more cruft from machw.h and drop the #include where it isn't
needed.
Signed-off-by: Finn Thain <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
In each case, if the NULL test is necessary, then the dereference should be
moved below the NULL test.
The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@@
type T;
expression E;
identifier i,fld;
statement S;
@@
- T i = E->fld;
+ T i;
... when != E
when != i
if (E == NULL) S
+ i = E->fld;
// </smpl>
Signed-off-by: Julia Lawall <[email protected]>
Acked-by: Sergei Shtylyov <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
The generic_defconfig has three section mismatches. This clears up
ioc4_ide_attach_one().
Signed-off-by: Robin Holt <[email protected]>
Signed-off-by: Mike Reid <[email protected]>
Signed-off-by: Tony Luck <[email protected]>
IDE pmac host driver build fails with CONFIG_BLK_DEV_IDEDMA_PMAC=n
as reported by Kamalesh:
> drivers/ide/pmac.c: In function 'pmac_ide_set_pio_mode':
> drivers/ide/pmac.c:527: error: implicit declaration of function 'kauai_lookup_timing'
> drivers/ide/pmac.c:527: error: 'shasta_pio_timings' undeclared (first use in this function)
> drivers/ide/pmac.c:527: error: (Each undeclared identifier is reported only once
> drivers/ide/pmac.c:527: error: for each function it appears in.)
> drivers/ide/pmac.c:534: error: 'kauai_pio_timings' undeclared (first use in this function)
> drivers/ide/pmac.c: In function 'pmac_ide_do_resume':
> drivers/ide/pmac.c:914: error: 'IDE_WAKEUP_DELAY' undeclared (first use in this function)
> drivers/ide/pmac.c: At top level:
> drivers/ide/pmac.c:1007: error: 'pmac_ide_init_dma' undeclared here (not in a function)
> drivers/ide/pmac.c: In function 'pmac_ide_setup_device':
> drivers/ide/pmac.c:1107: error: 'IDE_WAKEUP_DELAY' undeclared (first use in this function)
> drivers/ide/pmac.c: In function 'pmac_ide_macio_attach':
> drivers/ide/pmac.c:1209: error: 'pmac_ide_hwif_t' has no member named 'dma_regs'
> drivers/ide/pmac.c:1210: error: 'pmac_ide_hwif_t' has no member named 'dma_regs'
> make[2]: *** [drivers/ide/pmac.o] Error 1
Fix it by removing the superfluous config option.
Reported-and-tested-by: Kamalesh Babulal <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Sergei Shtylyov <[email protected]>
Cc: Stephen Rothwell <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
This reverts commit e9eb838830 since
it could break resume (thanks to Paul Collins for the report).
I'll look into sorting this out properly for 2.6.29
but for 2.6.28 it is the best to just revert my patch.
Reported-by: Paul Collins <[email protected]>
Cc: [email protected]
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
We guarantee 400ns delay at the time of issuing the command.
Acked-by: Sergei Shtylyov <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
Also while at it:
* Drop unused arguments from ide_complete_power_step().
* Move DEBUG_PM printk() from ide_end_drive_cmd() to
ide_complete_power_step().
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
Respect current DMA setting during resume, otherwise PIO timings
may get destroyed if host uses shared PIO/MWDMA timings.
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
It seems that on some nVidia controllers using AltStatus register
can be unreliable so default to Status register if the PCI device
is in Compatibility Mode. In order to achieve this:
* Add ide_pci_is_in_compatibility_mode() inline helper to <linux/ide.h>.
* Add IDE_HFLAG_BROKEN_ALTSTATUS host flag and set it in amd74xx host
driver for nVidia controllers in Compatibility Mode.
* Teach actual_try_to_identify() and drive_is_ready() about the new flag.
This fixes the regression caused by removal of CONFIG_IDEPCI_SHARE_IRQ
config option in 2.6.25 and using AltStatus register unconditionally when
available (kernel.org bugs #11659 and #10216).
[ Moreover for CONFIG_IDEPCI_SHARE_IRQ=y (which is what most people
and distributions use) it never worked correctly. ]
Thanks to Remy LABENE and Lars Winterfeld for help with debugging the problem.
More info at:
http://bugzilla.kernel.org/show_bug.cgi?id=11659http://bugzilla.kernel.org/show_bug.cgi?id=10216
Reported-by: Remy LABENE <[email protected]>
Tested-by: Remy LABENE <[email protected]>
Tested-by: Lars Winterfeld <[email protected]>
Acked-by: Borislav Petkov <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
icside_register_v[56] is called from (__devinit) icside_probe
Signed-off-by: Al Viro <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
The CLPS7500 platform has not built since 2.6.22-git7 and there
seems to be no interest in fixing it. So, remove the platform
support.
Signed-off-by: Russell King <[email protected]>
We need to re-get a removable media's capacity when revalidating the
disk so that its partitions get rescanned by the block layer.
Signed-off-by: Borislav Petkov <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: [email protected]
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
SHWT value is used as address valid to -CSx assertion and -CSx to -DIOx
assertion setup time, and contrarywise, -DIOx to -CSx release and -CSx
release to address invalid hold time, so it actualy applies 4 times and
so constitutes -DIOx recovery time. Check requirement of the recovery
time and cycle time. Also check SHWT maximum value.
Suggested-by: Sergei Shtylyov <[email protected]>
Signed-off-by: Atsushi Nemoto <[email protected]>
Cc: [email protected]
Acked-by: Sergei Shtylyov <[email protected]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
e5318b531b ("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 <[email protected]>
Cc: FUJITA Tomonori <[email protected]>
Tested-by: Valerio Passini <[email protected]>
[bart: fixup patch description per comments from Sergei Shtylyov]
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
a) semicolon before the function body is a bad idea
b) it's const struct foo, not struct const foo
c) incidentally, it's ecard_remove_driver(), not ecard_unregister_driver()
d) compiling is occasionally useful.
Signed-off-by: Al Viro <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
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 <[email protected]>
Acked-by: Borislav Petkov <[email protected]>
[bart: minor fixups to patch description]
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
This is the driver for the Toshiba TX4938 SoC EBUS controller ATA mode.
It has custom set_pio_mode and some hacks for big endian.
Signed-off-by: Atsushi Nemoto <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>