1. 28 Jan, 2010 1 commit
  2. 15 Jan, 2010 1 commit
    • Wolfram Sang's avatar
      ide/ide-cs: fix order of releasing resources · d4ae5415
      Wolfram Sang authored
      ide_detach() called first ide_release() and then release_region(). This
      produced the following warnings:
      
        Trying to free nonexistent resource <000000000000c10e-000000000000c10e>
        Trying to free nonexistent resource <000000000000c100-000000000000c107>
      
      This is true, because the callchain inside ide_release() is:
      
        ide_release -> pcmcia_disable_device -> pcmcia_release_io
      
      So, the whole io-block is already gone for release_region(). To fix
      this, just swap the order of releasing (and remove the now obsolete
      shadowing).
      
      bzolnier:
      - release resources in ide_release() to fix ordering of events
      - remove stale FIXME note while at it
      Signed-off-by: default avatarWolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d4ae5415
  3. 12 Jan, 2010 2 commits
    • Russell King's avatar
      ide: Fix Promise UDMA33 IDE driver (pdc202xx_old) · c3be57b6
      Russell King authored
      On Sun, Jan 03, 2010 at 12:23:14AM +0000, Russell King wrote:
      > - with IDE
      >   - locks the interrupt line, and makes the machine extremely painful -
      >     about an hour to get to the point of being able to unload the
      >     pdc202xx_old module.
      
      Having manually bisected kernel versions, I've narrowed it down to some
      change between 2.6.30 and 2.6.31.  There's not much which has changed
      between the two kernels, but one change stands out like a sore thumb:
      
      +static int pdc202xx_test_irq(ide_hwif_t *hwif)
      +{
      +       struct pci_dev *dev     = to_pci_dev(hwif->dev);
      +       unsigned long high_16   = pci_resource_start(dev, 4);
      +       u8 sc1d                 = inb(high_16 + 0x1d);
      +
      +       if (hwif->channel) {
      +               /*
      +                * bit 7: error, bit 6: interrupting,
      +                * bit 5: FIFO full, bit 4: FIFO empty
      +                */
      +               return ((sc1d & 0x50) == 0x40) ? 1 : 0;
      +       } else  {
      +               /*
      +                * bit 3: error, bit 2: interrupting,
      +                * bit 1: FIFO full, bit 0: FIFO empty
      +                */
      +               return ((sc1d & 0x05) == 0x04) ? 1 : 0;
      +       }
      +}
      
      Reading the (documented as a 32-bit) system control register when the
      interface is idle gives: 0x01da110c
      
      So, the byte at 0x1d is 0x11, which is documented as meaning that the
      primary and secondary FIFOs are empty.
      
      The code above, which is trying to see whether an IRQ is pending, checks
      for the IRQ bit to be one, and the FIFO bit to be zero - or in English,
      to be non-empty.
      
      Since during a BM-DMA read, the FIFOs will naturally be drained to the
      PCI bus, the chance of us getting to the interface before this happens
      are extremely small - and if we don't, it means we decide not to service
      the interrupt.  Hence, the screaming interrupt problem with drivers/ide.
      
      Fix this by only indicating an interrupt is ready if both the interrupt
      and FIFO empty bits are at '1'.
      
      This bug only affects PDC20246/PDC20247 (Promise Ultra33) based cards,
      and has been tested on 2.6.31 and 2.6.33-rc2.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Tested-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c3be57b6
    • Bartlomiej Zolnierkiewicz's avatar
      icside: bring back ->maskproc method · f75d4a23
      Bartlomiej Zolnierkiewicz authored
      Bring back ->maskproc method since it is still needed for proper operation,
      as noticed by Russell King:
      
      > This change is bogus.
      >
      >         writeb(0, base + ICS_ARCIN_V6_INTROFFSET_1);
      >         readb(base + ICS_ARCIN_V6_INTROFFSET_2);
      >
      >         writeb(0, base + ICS_ARCIN_V6_INTROFFSET_2);
      >         readb(base + ICS_ARCIN_V6_INTROFFSET_1);
      >
      > This sequence of code does:
      >
      > 1. enable interrupt 1
      > 2. disable interrupt 2
      > 3. enable interrupt 2
      > 4. disable interrupt 1
      >
      > which results in the interrupt for the second channel being enabled -
      > leaving channel 1 blocked.
      >
      > Firstly, icside shares its two IDE channels with one DMA engine - so it's
      > a simplex interface.  IDE supports those (or did when the code was written)
      > serializing requests between the two interfaces.  libata does not.
      >
      > Secondly, the interrupt lines on icside float when there's no drive connected
      > or when the drive has its NIEN bit set, which means that you get spurious
      > screaming interrupts which can kill off all expansion card interrupts on
      > the machine unless you disable the channel interrupt on the card.
      >
      > Since libata can not serialize the operation of the two channels like IDE
      > can, the libata version of the icside driver does not contain the interrupt
      > stearing logic.  Instead, it looks at the status after reset, and if
      > nothing was found on that channel, it masks the interrupt from that
      > channel.
      
      This patch reverts changes done in commit dff8817b (I became confused due to
      non-standard & undocumented ->maskproc method, anyway sorry about that).
      Noticed-by: default avatarRussell King <rmk@arm.linux.org.uk>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f75d4a23
  4. 08 Jan, 2010 1 commit
  5. 14 Dec, 2009 1 commit
    • Thadeu Lima de Souza Cascardo's avatar
      ide: doc: remove compilation options section from ide-cd documentation · 1c8a3751
      Thadeu Lima de Souza Cascardo authored
      This section pointed out to compilation options which no longer exist.
      
      VERBOSE_IDE_CD_ERRORS has been replace by config option
      CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS.
      
      STANDARD_ATAPI is no longer needed, since the non-standard drivers, which
      required bcd2bin are now detected, and there's a flag for them.
      
      NO_DOOR_LOCKING is now a sysctl parameter for cdrom drivers.
      
      CDROM_NBLOCKS_BUFFER is not used anymore. The READAUDIO is now in cdrom.c and it
      allocates as much as user space has requested to read, backing off if it fails.
      
      TEST is not there anymore or in cdrom either. ide allows to send ATA commands
      through ioctl, although it may be helpful to send MMC packets through the cdrom
      layer directly.
      Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1c8a3751
  6. 12 Dec, 2009 34 commits