1. 20 7月, 2007 3 次提交
  2. 12 7月, 2007 1 次提交
    • A
      PCI: Change all drivers to use pci_device->revision · 44c10138
      Auke Kok 提交于
      Instead of all drivers reading pci config space to get the revision
      ID, they can now use the pci_device->revision member.
      
      This exposes some issues where drivers where reading a word or a dword
      for the revision number, and adding useless error-handling around the
      read. Some drivers even just read it for no purpose of all.
      
      In devices where the revision ID is being copied over and used in what
      appears to be the equivalent of hotpath, I have left the copy code
      and the cached copy as not to influence the driver's performance.
      
      Compile tested with make all{yes,mod}config on x86_64 and i386.
      Signed-off-by: NAuke Kok <auke-jan.h.kok@intel.com>
      Acked-by: NDave Jones <davej@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      44c10138
  3. 10 7月, 2007 2 次提交
  4. 10 5月, 2007 3 次提交
    • B
      ide: add ide_tune_dma() helper · 29e744d0
      Bartlomiej Zolnierkiewicz 提交于
      After reworking the code responsible for selecting the best DMA
      transfer mode it is now possible to add generic ide_tune_dma() helper.
      
      Convert some IDE PCI host drivers to use it (the ones left need more work).
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      29e744d0
    • B
      ide: rework the code for selecting the best DMA transfer mode (v3) · 2d5eaa6d
      Bartlomiej Zolnierkiewicz 提交于
      Depends on the "ide: fix UDMA/MWDMA/SWDMA masks" patch.
      
      * add ide_hwif_t.udma_filter hook for filtering UDMA mask
        (use it in alim15x3, hpt366, siimage and serverworks drivers)
      * add ide_max_dma_mode() for finding best DMA mode for the device
        (loosely based on some older libata-core.c code)
      * convert ide_dma_speed() users to use ide_max_dma_mode()
      * make ide_rate_filter() take "ide_drive_t *drive" as an argument instead
        of "u8 mode" and teach it to how to use UDMA mask to do filtering
      * use ide_rate_filter() in hpt366 driver
      * remove no longer needed ide_dma_speed() and *_ratemask()
      * unexport eighty_ninty_three()
      
      v2:
      * rename ->filter_udma_mask to ->udma_filter
        [ Suggested by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
      
      v3:
      * updated for scc_pata driver (fixes XFER_UDMA_6 filtering for user-space
        originated transfer mode change requests when 100MHz clock is used)
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      2d5eaa6d
    • B
      ide: fix UDMA/MWDMA/SWDMA masks (v3) · 18137207
      Bartlomiej Zolnierkiewicz 提交于
      * use 0x00 instead of 0x80 to disable ->{ultra,mwdma,swdma}_mask
      * add udma_mask field to ide_pci_device_t and use it to initialize
        ->ultra_mask in aec62xx, cmd64x, pdc202xx_{new,old} and piix drivers
      * fix UDMA masks to match with chipset specific *_ratemask()
        (alim15x3, hpt366, serverworks and siimage drivers need UDMA mask
         filtering method - done in the next patch)
      
      v2:
      * piix: fix cable detection for 82801AA_1 and 82372FB_1
        [ Noticed by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
      * cmd64x: use hwif->cds->udma_mask
        [ Suggested by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
      * aec62xx: fix newly introduced bug - check DMA status not command register
        [ Noticed by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
      
      v3:
      * piix: use hwif->cds->udma_mask
        [ Suggested by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      18137207
  5. 04 3月, 2007 1 次提交
  6. 17 2月, 2007 6 次提交
  7. 08 2月, 2007 2 次提交
    • S
      piix: tuneproc() fixes/cleanups · 30dfd12f
      Sergei Shtylyov 提交于
      Fix/cleanup the driver's tuneproc() and ratemask() methods:
      
      - PPE, IE, and TIME bits need to be cleared beforehand for the slave drive as
        well as master (Alan probably just forgot about it);
      
      - this driver only supports PIO modes up to 4, so must pass the correct limit
        to ide_get_best_pio_mode();
      
      - use min_t() macro instead of min();
      
      - simplify slave vs master drive evaluation;
      
      - do come coding and formatting cleanups...
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      30dfd12f
    • S
      piix: fix 82371MX enablebits · d2872239
      Sergei Shtylyov 提交于
      According to the datasheet, Intel 82371MX (MPIIX) actually has only a
      single IDE channel mapped to the primary or secondary ports depending on
      the value of the bit 14 of the IDETIM register at PCI config.  offset 0x6C
      (the register at 0x6F which the driver refers to.  doesn't exist).  So,
      disguise the controller as dual channel and set enablebits masks/values
      such that only either primary or secondary channel is detected enabled. 
      Also, preclude the IDE probing code from reading PCI BARs, this controller
      just doesn't have them (it's not the separate PCI function like the other
      PCI controllers), it only decodes the legacy addresses.
      
      [ Alan sayeth " MPIIX does not work with or without the change.  It needs its
        own different driver and not to use setup-pci.  Huge job and since it works
        well with libata who cares.  Ditto the early PIIX chip." ]
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      d2872239
  8. 31 12月, 2006 2 次提交
  9. 11 12月, 2006 1 次提交
  10. 03 10月, 2006 1 次提交
    • A
      [PATCH] ide: backport piix fixes from libata into the legacy driver · 5ac24697
      Alan Cox 提交于
      There are three flags being set by default by the PIIX driver for speeds >
      PIO 1, and one not being cleared properly on fallback to PIO0.  The most
      important one is the prefetch/post write control which only works for ATA
      and can do bad things with ATAPI.
      
      The patch does its best to set the flags correctly for drivers/ide.  Its
      not 100% perfect but its closer than the original.  100% perfect requires
      proper IORDY handling but this isn't critical (and its not right in libata
      either ..  yet)
      
      Sergei Shtylyov <sshtylyov@ru.mvista.com> said:
      
      > +					{ 0, 0 },
      > +					{ 0, 0 },
      > +					{ 1, 0 },
      > +					{ 2, 1 },
      > +					{ 2, 3 }, };
      >
      >  	pio = ide_get_best_pio_mode(drive, pio, 5, NULL);
      
          BTW, there's quite obvious error here which leads to access outside of
      timings[] if somebody passes PIO mode 5 (or autotuning code finds out that
      drive supports PIO mode 5). Could have been fixed while at it... Those drives
      should be rare, though...
      
      > +		}
      >  		master_data = master_data | (timings[pio][0] << 12) | (timings[pio][1] << 8);
      >  	}
      >  	pci_write_config_word(dev, master_port, master_data);
      
          Actually, there's one more serious issue with piix_tune_drive() -- it
      doesn't actually set the drive's own transfer mode.
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5ac24697
  11. 01 10月, 2006 1 次提交
  12. 01 7月, 2006 1 次提交
  13. 27 6月, 2006 1 次提交
  14. 04 2月, 2006 1 次提交
  15. 17 4月, 2005 2 次提交