1. 07 Jun, 2009 10 commits
    • Sergei Shtylyov's avatar
      pdc202xx_old: kill resetproc() method · ffddf171
      Sergei Shtylyov authored
      The driver's resetproc() method resets both channels at once -- most probably
      by driving RESET- on them.  Not only such reset can severely disturb concurrent
      operations on another channel, it also ensues 2-second delay, while there's no
      apparent reason why SRST reset being performed prior to resetproc() call needs
      to be followed up by another reset.
      Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      ffddf171
    • Sergei Shtylyov's avatar
      pdc202xx_old: don't call pdc202xx_reset() on IRQ timeout · 1221e241
      Sergei Shtylyov authored
      The driver's dma_lost_irq() and dma_clear() methods call pdc202xx_reset()
      which resets both channels at once -- most probably by driving RESET- on them.
      Not only such reset can severely disturb concurrent operations on another
      channel, it is also a clear overkill (especially in the first case) and is
      completely unexpected and thus not properly handled by the IDE core in this
      context (in the second case the usual SRST reset would most probably ensue
      anyway though); it also causes quite arbitrary 2-second delay. Hence, use the
      standard ide_dma_lost_irq() method and don't install the optional dma_clear()
      method at all -- the driver should do well without this age-old cruft...
      Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      1221e241
    • 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 3 commits