01 May, 2009
1 commit
-
Original patch (dfa4411cc3a690011cab90e9a536938795366cf9) was buggy.
This is a more proper fix which introduces blk_rq_quiet() macro
alleviating the need for dumb, too short caching variables.Thanks to Helge Deller and Bart for debugging this.
Signed-off-by: Borislav Petkov
Cc: Jens Axboe
Cc: Sergei Shtylyov
Reported-and-tested-by: Helge Deller
Signed-off-by: Bartlomiej Zolnierkiewicz
24 Apr, 2009
2 commits
-
Remove superfluous commas and add missing whitespaces.
Noticed-by: Joe Perches
Cc: David Brownell
Signed-off-by: Bartlomiej Zolnierkiewicz -
Bugfixes noted by checking the code against the controller
documentation (TI document number SPRUE21):- Remove declarations for eight non-existent registers (!);
and remove accesses to two of them.- Remove access to various non-existent bitfields in some of
the registers which *do* exist (those fields must-be-zero).- Provide comment to replace bogus reset logic (removed above,
it relied on non-existent bitfields). Resets require GPIO
help; this driver doesn't currently know about that.With some minor cleanup: relocate a comment, avoid an extra
lookup of the PIO timings.Signed-off-by: David Brownell
Cc: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz
23 Apr, 2009
3 commits
-
My laptop (Acer Travelmate 660) always cuts the power when rebooting
which causes the disk to emergency-park it's head.Add a dmi check to stop disk as for shutdown on this laptop.
Signed-off-by: Bruno Prémont
Cc: Jeff Garzik
Signed-off-by: Bartlomiej Zolnierkiewicz -
With 2.6.30-rc2 I face a kernel crash on the 32bit hppa architecture
due to ide-cd when udev creates the device nodes at startup:Kernel Fault: Code=26 regs=8ed34c40 (Addr=00000024)
IASQ: 00000000 00000000 IAOQ: 1034b5ac 1034b5b0
IIR: 4ab30048 ISR: 00000000 IOR: 00000024
CPU: 0 CR30: 8ed34000 CR31: ffff55ff
ORIG_R28: 00000000
IAOQ[0]: ide_complete_rq+0x2c/0x70
IAOQ[1]: ide_complete_rq+0x30/0x70
RP(r2): cdrom_newpc_intr+0x178/0x46c
Backtrace:
[] cdrom_newpc_intr+0x178/0x46c
[] ide_intr+0x1b0/0x214
[] handle_IRQ_event+0x70/0x150
[] __do_IRQ+0x14c/0x1cc
[] superio_interrupt+0x88/0xbc
[] handle_IRQ_event+0x70/0x150
[] __do_IRQ+0x14c/0x1cc
[] do_cpu_irq_mask+0x9c/0xd0
[] intr_return+0x0/0x4This crash seems to happen due to an uninitialized variable "rc".
The compiler even warns about that:
CC drivers/ide/ide-cd.o
/mnt/sda4/home/cvs/parisc/git-kernel/linus-linux-2.6/drivers/ide/ide-cd.c: In function `cdrom_newpc_intr':
/mnt/sda4/home/cvs/parisc/git-kernel/linus-linux-2.6/drivers/ide/ide-cd.c:612: warning: `rc' might be used uninitialized in this functionAfter applying the trivial patch below, which just initializes
the variable to zero, the kernel doesn't crash any longer:Starting the hotplug events dispatcher: udevd.
Synthesizing the initial hotplug events...
hda: command error: status=0x51 { DriveReady SeekComplete Error }
hda: command error: error=0x54 { AbortedCommand LastFailedSense=0x05 }
ide: failed opcode was: unknown
done.Signed-off-by: Helge Deller
Acked-by: Borislav Petkov
Cc: Linus
Cc: Kyle McMartin
Cc: "Rafael J. Wysocki"
Signed-off-by: Bartlomiej Zolnierkiewicz -
Fix UDMA throughput bug: tCYC averages t2CYCTYP/2, but the code
previously assumed it was the same as t2CYCTYP. (That is, it was
using just one clock edge, not both.) Move the table's type
declaration so it's adjacent to the table, making it more clear
what those numbers mean.On one system this change increased throughput by almost 4x: UDMA/66
sometimes topped 23 MB/sec (on a drive known to do much better). On
another system it was around a 10% win (UDMA/66 up to 7+ MB/sec).The difference might be caused by the ratio between memory and IDE
clocks. In the system with large speedup, this was exactly 2 (as a
workaround for a rev 1.1 silicon bug). The other system used a more
standard ratio of 1.63 (and rev 2.1 silicon) ... clock domain synch
might have some issues, they're not unheard-of.Signed-off-by: David Brownell
Acked-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz
18 Apr, 2009
5 commits
-
The driver somehow got merged with the initializer for the dma_sff_read_status()
method missing which caused kernel panic on bootup.This should fix the kernel.org bug #13026...
Signed-off-by: Sergei Shtylyov
Reported-by: Arnd Hannemann
Signed-off-by: Bartlomiej Zolnierkiewicz -
Freeing non-slab objects is bad and results in an oops. Fix it.
Reported-and-tested-by: Andrew Price
Cc: Theodore Tso
Cc: "Rafael J. Wysocki"
Signed-off-by: Bartlomiej Zolnierkiewicz -
Remove uneeded void casts
Signed-off-by: Jack Stone
Cc: jeff@garzik.org
Cc: kernel-janitors@vger.kernel.org
Cc: Jack Stone
Signed-off-by: Bartlomiej Zolnierkiewicz -
Use ATA_DMA_* constants instead of the bare numbers for the BMIDE register bits.
Signed-off-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
The big driver change in 2.4.19-rc1 introduced a regression for many HPT370[A]
chips -- DMA stopped to work completely, only causing endless timeouts...The culprit has been identified (at last!): it turned to be the code resetting
the DMA state machine before each transfer. Stop doing it now as this counter-
measure has clearly caused more harm than good.This should fix the kernel.org bug #7703.
Signed-off-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz
08 Apr, 2009
26 commits
-
As we have already PIO 6 transfer mode supported in IDE layer, we can turn
it on in the driver.Signed-off-by: Stanislaw Gruszka
Tested-by: "Steve Wootton"
Cc: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
Cc: Sergei Shtylyov
Signed-off-by: Stanislaw Gruszka -
Make the case of flushing the drive's cache explicit.
There should be no functional change resulting from this patch.
Signed-off-by: Borislav Petkov
Signed-off-by: Bartlomiej Zolnierkiewicz -
Simplify tf_read() method, making it deal only with 'struct ide_taskfile' and
the validity flags that the upper layer passes, and factoring out the code that
deals with the high order bytes into ide_tf_readback() to be called from the
only two functions interested, ide_complete_cmd() and ide_dump_sector().This should stop the needless code duplication in this method and so make
it about twice smaller than it was; along with simplifying the setup for
the method call, this should save both time and space...Signed-off-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
Simplify tf_load() method, making it deal only with 'struct ide_taskfile' and
the validity flags that the upper layer passes, and moving the code that deals
with the high order bytes into the only function interested, do_rw_taskfile().This should stop the needless code duplication in this method and so make
it about twice smaller than it was; along with simplifying the setup for the
method call, this should save both time and space...Signed-off-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
Use write_devctl() method to clear/set the HOB bit in tf_read() method.
Signed-off-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
Move device register masking (and setting drive->select) out of tf_load() method
and into the only function that needs to use this code, do_rw_taskfile()...Signed-off-by: Sergei Shtylyov
[bart: fix whitespace error]
Signed-off-by: Bartlomiej Zolnierkiewicz -
Make 'struct ide_taskfile' cover only 8 register values and thus put two such
fields ('tf' and 'hob') into 'struct ide_cmd', dropping unnecessary 'tf_array'
field from it.This required changing the prototype of ide_get_lba_addr() and ide_tf_dump().
Signed-off-by: Sergei Shtylyov
[bart: fix setting of ATA_LBA bit for LBA48 commands in __ide_do_rw_disk()]
Signed-off-by: Bartlomiej Zolnierkiewicz -
Replace IDE_TFLAG_{IN|OUT}_* flags meaning to the taskfile register validity on
input/output by the IDE_VALID_* flags and introduce 4 symmetric 8-bit register
validity indicator subfields, 'valid.{input/output}.{tf|hob}', into the 'struct
ide_cmd' instead of using the 'tf_flags' field for that purpose (this field can
then be turned from 32-bit into 8-bit one).Signed-off-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
Based on earlier work by Borislav Petkov.
Fix intendation in cdrom_decode_status(), no real code changes.
While at it:
- beautify commentsThere should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Borislav Petkov
Signed-off-by: Bartlomiej Zolnierkiewicz -
Based on earlier work by Borislav Petkov.
Unify handling of fs and pc requests in cdrom_decode_status().
While at it:
- remove unreachable codeThe only change in functionality is that for pc requests more
detailed error message will be printed for following sense keys:
* ILLEGAL_REQUEST
* DATA_PROTECT
* MEDIUM_ERROR
* BLANK_CHECKSigned-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Borislav Petkov
Signed-off-by: Bartlomiej Zolnierkiewicz -
Based on earlier work by Borislav Petkov.
Convert cdrom_decode_status() to use switch statements in
preparation to unify handling of fs and pc requests.While at it:
- remove superfluous comments and do minor CodingStyle fixupsThere should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Borislav Petkov
Signed-off-by: Bartlomiej Zolnierkiewicz -
Signed-off-by: Borislav Petkov
[bart: extracted from "ide-cd: cleanup cdrom_decode_status" patch]
Signed-off-by: Bartlomiej Zolnierkiewicz -
There should be no functional change resulting from this patch.
Suggested-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Borislav Petkov
Signed-off-by: Bartlomiej Zolnierkiewicz -
Remove unused #include in drivers/ide/at91_ide.c.
Signed-off-by: Huang Weiyi
Signed-off-by: Bartlomiej Zolnierkiewicz -
The commit adb1af9 ("ide: pass command instead of request to
ide_pio_datablock()") missed tx4939ide driver.Signed-off-by: Atsushi Nemoto
Cc: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
Now tx493[89]ide_tf_{load,read} do not contain word I/O operations.
They are endian-free now.Signed-off-by: Atsushi Nemoto
Cc: Sergei Shtylyov ,
Signed-off-by: Bartlomiej Zolnierkiewicz -
There should be no functional change resulting from this patch.
Signed-off-by: Borislav Petkov
Signed-off-by: Bartlomiej Zolnierkiewicz -
There should be no functional change resulting from this patch.
Signed-off-by: Borislav Petkov
Signed-off-by: Bartlomiej Zolnierkiewicz -
Since tf_{read|load}() methods of this driver have now become identical to their
standard counterparts using I/O port accesses, there's no need to override those
anymore...Signed-off-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
Since tf_{read|load}() methods of this driver have now become identical to their
standard counterparts using MMIO accesses, there's no need to override those
anymore...Signed-off-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
Remove two no longer used functions that I've overlooked...
Signed-off-by: Sergei Shtylyov
Signed-off-by: Bartlomiej Zolnierkiewicz -
* define CHECK_DMA_MASK
* remove use of wmb()Reported-by: Grant Grundler
Reviewed-by: Grant Grundler
Signed-off-by: Atsushi Nemoto -
This patch:
o replaces "mask" variable in ide_dma_end() with #define.
o removes use of wmb() in ide-dma-sff.c and scc_pata.c.
o is not tested - I don't have (or want) the HW.Signed-off-by: Grant Grundler
Cc: KOBAYASHI Yoshitake
Signed-off-by: Bartlomiej Zolnierkiewicz -
Both of commits f94116aeec7a299640dd692128e1d22178affa8d ("ide: cleanup
") and 15a453a955f89f6545118770c669b52e925368bd ("ide: include
only when needed") break falconide:| Uniform Multi-Platform E-IDE driver
| ide: Falcon IDE controller
| Probing IDE interface ide0...
| hda: Sarge m68k, ATA DISK drive
| ide0 at 0xfff00000 on irq 15 (serialized)
| ide-gd driver 1.18
| hda: max request size: 128KiB
| hda: 2118816 sectors (1084 MB) w/256KiB Cache, CHS=2102/16/63
| hda:hda: lost interruptThis happens because falconide relies on {in,out}sw() being redefined in
, as included by , which is no longer the case.
Use __ide_mm_{in,out}sw() from instead, just like
ide_{in,out}put_data() do.The same problem seems to exist in q40ide.
Signed-off-by: Geert Uytterhoeven
Signed-off-by: Bartlomiej Zolnierkiewicz -
commit 255115fb35f80735c21a1cbe9809e9795a3af26e ("ide: allow host drivers to
specify IRQ flags") added irq_flags fields to struct ide_port_info and struct
ide_host. Drivers can now set ide_port_info.irq_flags = IRQF_SHARED, while
init_irq() passes ide_host.irq_flags to request_irq().Unfortunately ide_host.irq_flags is never set, causing (on ARAnyM):
| Uniform Multi-Platform E-IDE driver
| ide: Falcon IDE controller
| Probing IDE interface ide0...
| hda: Sarge m68k, ATA DISK drive
| init_irq: sa = 0
| ide0: disabled, unable to get IRQ 15
| ide0: failed to initialize IDE interface
| ide0: disabling portSolve this by copying ide_port_info.irq_flags to ide_host.irq_flags in
ide_host_alloc().This bug probably affects the following IDE host drivers:
- buddha
- delkin_cb
- falconide
- gayle
- ide-cs
- macide
- q40ide
- scc_pata
- sgiioc4Signed-off-by: Geert Uytterhoeven
Signed-off-by: Bartlomiej Zolnierkiewicz
07 Apr, 2009
1 commit
-
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)
Signed-off-by: Yang Hongyang
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
01 Apr, 2009
2 commits
-
... and access them afterwards. Simplify rq completing code while at it.
Spotted-by: Tejun Heo
Signed-off-by: Borislav Petkov
Signed-off-by: Bartlomiej Zolnierkiewicz -
No reason to need IDE built-in to be able to compile pmac driver.
Tested to work on 2.6.29-rc8 and 2.6.28.8 with ide and pmac as modules
inside an initramfs.Signed-off-by: Gilles Espinasse
Cc: sam@ravnborg.org
Cc: benh@kernel.crashing.org
[bart: remove now superfluous IDE check]
Signed-off-by: Bartlomiej Zolnierkiewicz