1. 07 Jun, 2009 8 commits
    • Sergei Shtylyov's avatar
      pdc202xx_old: use ide_dma_test_irq() · 72b9304f
      Sergei Shtylyov authored
      The driver's dma_test_irq() method, although tests some chip specific interrupt
      bits, finally always relies on the SFF-8038i standard interrupt bit.  I see no
      point in testing the bits that are not trusted anyway -- the driver should be
      fully able to use the standard method implemetation, ide_dma_test_irq().
      
      With this change 'pdc202xx_dma_ops' finally becomes identical to 'sff_dma_ops',
      and we can get rid of it...
      Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      72b9304f
    • Bartlomiej Zolnierkiewicz's avatar
      6250d3af
    • Bartlomiej Zolnierkiewicz's avatar
      ide: preserve Host Protected Area by default (v2) · 075affcb
      Bartlomiej Zolnierkiewicz authored
      From the perspective of most users of recent systems, disabling Host
      Protected Area (HPA) can break vendor RAID formats, GPT partitions and
      risks corrupting firmware or overwriting vendor system recovery tools.
      
      Unfortunately the original (kernels < 2.6.30) behavior (unconditionally
      disabling HPA and using full disk capacity) was introduced at the time
      when the main use of HPA was to make the drive look small enough for the
      BIOS to allow the system to boot with large capacity drives.
      
      Thus to allow the maximum compatibility with the existing setups (using
      HPA and partitioned with HPA disabled) we automically disable HPA if
      any partitions overlapping HPA are detected.  Additionally HPA can also
      be disabled using the "nohpa" module parameter (i.e. "ide_core.nohpa=0.0"
      to disable HPA on /dev/hda).
      
      v2:
      Fix ->resume HPA support.
      
      While at it:
      - remove stale "idebus=" entry from Documentation/kernel-parameters.txt
      
      Cc: Robert Hancock <hancockrwd@gmail.com>
      Cc: Frans Pop <elendil@planet.nl>
      Cc: "Andries E. Brouwer" <Andries.Brouwer@cwi.nl>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Acked-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      [patch description was based on input from Alan Cox and Frans Pop]
      Emphatically-Acked-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      075affcb
    • Bartlomiej Zolnierkiewicz's avatar
      ide-gd: implement block device ->set_capacity method (v2) · e957b60d
      Bartlomiej Zolnierkiewicz authored
      * Use ->probed_capacity to store native device capacity for ATA disks.
      
      * Add ->set_capacity method to struct ide_disk_ops.
      
      * Implement disk device ->set_capacity method for ATA disks.
      
      * Implement block device ->set_capacity method.
      
      v2:
      * Check if LBA and HPA are supported in ide_disk_set_capacity().
      
      * According to the spec the SET MAX ADDRESS command shall be
        immediately preceded by a READ NATIVE MAX ADDRESS command.
      
      * Add ide_disk_hpa_{get_native,set}_capacity() helpers.
      
      Together with the previous patch adding ->set_capacity block device
      method this allows automatic disabling of Host Protected Area (HPA)
      if any partitions overlapping HPA are detected.
      
      Cc: Robert Hancock <hancockrwd@gmail.com>
      Cc: Frans Pop <elendil@planet.nl>
      Cc: "Andries E. Brouwer" <Andries.Brouwer@cwi.nl>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Emphatically-Acked-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      e957b60d
    • Bartlomiej Zolnierkiewicz's avatar
      partitions: add ->set_capacity block device method · db429e9e
      Bartlomiej Zolnierkiewicz authored
      * Add ->set_capacity block device method and use it in rescan_partitions()
        to attempt enabling native capacity of the device upon detecting the
        partition which exceeds device capacity.
      
      * Add GENHD_FL_NATIVE_CAPACITY flag to try limit attempts of enabling
        native capacity during partition scan.
      
      Together with the consecutive patch implementing ->set_capacity method in
      ide-gd device driver this allows automatic disabling of Host Protected Area
      (HPA) if any partitions overlapping HPA are detected.
      
      Cc: Robert Hancock <hancockrwd@gmail.com>
      Cc: Frans Pop <elendil@planet.nl>
      Cc: "Andries E. Brouwer" <Andries.Brouwer@cwi.nl>
      Acked-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Emphatically-Acked-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      db429e9e
    • Bartlomiej Zolnierkiewicz's avatar
      partitions: warn about the partition exceeding device capacity · 02c33b12
      Bartlomiej Zolnierkiewicz authored
      The current warning message says only about the kernel's action taken
      without mentioning the underlying reason behind it.
      Noticed-by: default avatarRobert Hancock <hancockrwd@gmail.com>
      Cc: Frans Pop <elendil@planet.nl>
      Cc: "Andries E. Brouwer" <Andries.Brouwer@cwi.nl>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Emphatically-Acked-by: default avatarAlan Cox <alan@linux.intel.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      02c33b12
    • Sergei Shtylyov's avatar
      pdc202xx_old: fix resetproc() method · 669165da
      Sergei Shtylyov authored
      pdc202xx_reset() calls pdc202xx_reset_host() twice, for both channels, while
      that function actually twiddles the single, shared software reset bit -- the
      net effect is a duplicated reset and horrendous 4 second delay happening not
      only on a channel reset but also when dma_lost_irq() and dma_clear() methods
      are called.  Fold pdc202xx_reset_host() into pdc202xx_reset(), fix printk(),
      and move it before the actual reset...
      Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      669165da
    • Sergei Shtylyov's avatar
      pdc202xx_old: fix 'pdc20246_dma_ops' · 521a415c
      Sergei Shtylyov authored
      Commit ac95beed (ide: add struct ide_port_ops
      (take 2)) erroneously converted the driver's dma_timeout() and dma_lost_irq()
      methods to call the driver's resetproc() method regardless of whether it was
      defined for this specific controller while it hadn't been defined and hence
      called for PDC20246. So the dma_clear() method, the successor of dma_timeout(),
      shouldn't exist and the dma_lost_irq() method should be standard for PDC20246.
      Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      521a415c
  2. 30 May, 2009 1 commit
  3. 22 May, 2009 7 commits
  4. 17 May, 2009 8 commits
  5. 16 May, 2009 4 commits
  6. 30 Apr, 2009 3 commits
  7. 23 Apr, 2009 4 commits
  8. 22 Apr, 2009 5 commits
    • Bartlomiej Zolnierkiewicz's avatar
      24fc484a
    • Bartlomiej Zolnierkiewicz's avatar
      mediabay: fix build for CONFIG_BLOCK=n · 83cff839
      Bartlomiej Zolnierkiewicz authored
      On Tuesday 14 April 2009 20:31:21 Subrata Modak wrote:
      > Observed the following build error:
      > ---
      > CC      drivers/macintosh/mediabay.o
      > In file included from drivers/macintosh/mediabay.c:21:
      > include/linux/ide.h:605: error: field ‘request_sense_rq’ has incomplete
      > type
      > make[2]: *** [drivers/macintosh/mediabay.o] Error 1
      > make[1]: *** [drivers/macintosh] Error 2
      > make: *** [drivers] Error 2
      > ---
      
      mediabay shouldn't include <linux/ide.h> unconditionally so
      remove the superfluous include from mediabay.c (<asm/mediabay.h>
      will pull <linux/ide.h> in for CONFIG_BLK_DEV_IDE_PMAC=y).
      Reported-by: default avatarSubrata Modak <subrata@linux.vnet.ibm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      83cff839
    • Bruno Prémont's avatar
      ide: Stop disks on reboot for laptop which cuts power · b0aedb04
      Bruno Prémont authored
      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: default avatarBruno Prémont <bonbons@linux-vserver.org>
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      b0aedb04
    • Helge Deller's avatar
      ide-cd: fix kernel crash on hppa regression · a1f9a89c
      Helge Deller authored
      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:
       [<1035c608>] cdrom_newpc_intr+0x178/0x46c
       [<1034c494>] ide_intr+0x1b0/0x214
       [<1016d284>] handle_IRQ_event+0x70/0x150
       [<1016d4b0>] __do_IRQ+0x14c/0x1cc
       [<102f7864>] superio_interrupt+0x88/0xbc
       [<1016d284>] handle_IRQ_event+0x70/0x150
       [<1016d4b0>] __do_IRQ+0x14c/0x1cc
       [<10112efc>] do_cpu_irq_mask+0x9c/0xd0
       [<10116068>] intr_return+0x0/0x4
      
      This 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 function
      
      After 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 <3>{ AbortedCommand LastFailedSense=0x05 }
      ide: failed opcode was: unknown
      done.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Acked-by: default avatarBorislav Petkov <petkovbb@gmail.com>
      Cc: Linus <torvalds@linux-foundation.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      a1f9a89c
    • David Brownell's avatar
      palm_bk3710: UDMA performance fix · db2f38c2
      David Brownell authored
      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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
      Acked-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      db2f38c2