1. 16 May, 2004 6 commits
    • Jeff Garzik's avatar
      [libata] replace ATA_QCFLAG_ATAPI with inline helper · 043ea303
      Jeff Garzik authored
      Detection of an ATAPI taskfile is possible using a simple test
      on existing information, so there is no need to cache this value
      in a separate flag (ATA_QCFLAG_ATAPI).  Instead, create and use
      a new helper function is_atapi_taskfile().
      043ea303
    • Jeff Garzik's avatar
      [libata] scsi simulator improvements: MODE SENSE, SEEK(6,10), REZERO_UNIT · ffb17d43
      Jeff Garzik authored
      * SEEK(6), SEEK(10), and REZERO_UNIT are no-ops.  Unconditionally
        complete these commands with success.
      * MODE SENSE caching page work:
      	* correct page length
      	* set bit, if read-ahead is disabled
      	* set bit, if writeback caching is enabled
      	  (previously, this bit was never set, even if
      	   writeback caching was enabled)
      * add MODE SENSE r/w error recovery page
      ffb17d43
    • Jeff Garzik's avatar
      [libata] comments and constants · a163af74
      Jeff Garzik authored
      * note a nasty problem with shared interrupts that must be fixed
        before we turn on certain code paths.
      * add a few comments to the READ CAPACITY scsi simulator
      * remove a FIXME comment from the TEST UNIT READY scsi simulator
      * add constant for ATA command CHECK POWER MODE, and associated
        "mandatory" power management feature set bit.
      a163af74
    • Jeff Garzik's avatar
      [libata] SCSI->ATA simulator hacking: INQUIRY command · 7f594e47
      Jeff Garzik authored
      The SCSI T10 committee is working on a document describing a standard
      method for translating ATA<->SCSI, since it being done quite often
      these days.  Some of the recommendations are reasonable, and we implement
      two here:
      
      * Mirror that ATA 'removeable media' bit into INQUIRY output.
      * Change behavior of INQUIRY output field 'product revision' from
        the libata software version number to the first 4 bytes of the
        ATA device's firmware revision number.
      
      Rather than cache the firmware revision in struct ata_device, as was/is
      done with two other strings, I took the opportunity to eliminate the
      caching of the two other strings, 'vendor' and 'product'.  These strings
      are now retrieved as needed from the IDENTIFY [PACKET] DEVICE info page,
      since we cache its entire contents.
      
      Retrieving a string from the identify-device page is done via the
      helper function ata_dev_id_string(), which is now exported.
      
      This patch winds up making struct ata_device 40 bytes smaller, and
      the libata core gets a bit smaller as well.
      7f594e47
    • Jeff Garzik's avatar
      [libata] remove redundant use of ATA_QCFLAG_SG in ATAPI packet translation · e9c8846e
      Jeff Garzik authored
      ata_scsi_translate() sets this flag for all ATA->SCSI translated
      commands, so it need not be done in atapi_xlat().  The now-removed
      use in atapi_xlat() was also inconsistent WRT PIO versus DMA.
      e9c8846e
    • Jeff Garzik's avatar
      [libata] DMADIR support · d89ee021
      Jeff Garzik authored
      DMADIR bit is necessary for some PATA->SATA bridges.  These
      bridges require the OS driver to specify the data xfer direction,
      for PACKET (a.k.a. scsi) commands.
      
      A reliable DMADIR detection method hasn't yet been developed,
      and ATAPI is still a WIP, so DMADIR is enabled with an ifdef for
      now.
      d89ee021
  2. 15 May, 2004 4 commits
    • Jeff Garzik's avatar
      [libata] handle non-data ATAPI commands via interrupt · 80e00375
      Jeff Garzik authored
      It's easier to do it this way, than polling, at the moment.
      
      Also, fix a test in ata_scsi_translate that was incorrectly
      erroring-out non-data commands.
      80e00375
    • Jeff Garzik's avatar
      [libata] minor stuff · 96b2b4d7
      Jeff Garzik authored
      * now that ATAPI is close to working, making ATAPI DMA interrupts
        in ata_host_intr
      * remove unnecessary space character in printk() output (oh, the horror)
      96b2b4d7
    • Jeff Garzik's avatar
      [libata] internal cleanups · 50112a63
      Jeff Garzik authored
      Remove unused 'done_late' arg to ata_qc_complete(), which was never
      useful in 2.4, and never used at all in 2.6.
      
      This allows us to eliminate the same arg from ata_dma_complete(),
      and also make it more correct by passing the command rather than
      the ATA port structure as arg0.
      50112a63
    • Jeff Garzik's avatar
      Merge redhat.com:/spare/repo/sata-hacks/atapi-hacks-2.6 · 1ad2c4d1
      Jeff Garzik authored
      into redhat.com:/spare/repo/libata-2.6
      1ad2c4d1
  3. 14 May, 2004 30 commits