1. 27 Dec, 2004 3 commits
    • Albert Lee's avatar
      [libata] verify ATAPI DMA for a given request is OK · a56bb4da
      Albert Lee authored
      After some testing, it seems that some PATA host adapter (ex. pdc20275) cannot 
      work reliably with specific request buffer sizes under ATAPI DMA mode.
      
      Detailed test result:
      4096, 2048, 1024, 512, 256: OK
      384, 257, 255, 128, 96, 64, 32:  failed (irq lost)
       
      It seems multiple of 256 bytes are the safe ATAPI DMA buffer sizes to use.
      
      Attached please find the patch to fix the pdc2027x ATAPI DMA problem.
      
      Changes:
      1. Add a callback function "check_atapi_dma()" to ata_port_operations such that libata core
      can ask the driver: "Can this command be processed in ATAPI DMA mode safely? " 
      when the the command is received.
      2. ATAPI DMA is off by default if the callback function is not provided by the driver
      
      If the callback function is not provided by the driver, the ATAPI DMA should be as is.
      The ATAPI DMA is already controlled by dev->flags.
      
      BTW, the patch isolates the ATAPI DMA workaround to the pdc20275 driver itself,
      not impacting libata core .
      Signed-off-by: default avatarAlbert Lee <albertcc@tw.ibm.com>
      a56bb4da
    • Albert Lee's avatar
      [libata] PIO error handling improvement · 623b57b3
      Albert Lee authored
      Tested burning CD-RW with libata-dev-2.6 and cdrecord:
      1. ATAPI DMA mode - tested OK
      2. ATAPI PIO mode - test failed when cdrecord finishes burning and issues MODE_SELECT to the device.
      
       After checking the log, it showed that MODE_SELECT caused ata_pio_complete() to return error.
      However, the error is not handled by ata_pio_task().
      
      Attached please find the patch for ata_pio_task() error handling for your review.
      (The patch is against the libata-dev-2.6 tree. )
      
      Changes in the patch:
      1. End the PIO task when PIO_ST_IDLE state is entered
      2. End the PIO task after PIO_ST_TMOUT and PIO_ST_ERR state handled by ata_pio_error()
      3. Remove the first "if" statement to handle the error condition returned from 
         ata_pio_block(), ata_pio_complete() and ata_pio_poll().
      
      Change #2 is not so necessary since ata_pio_error() will put the cmd to  PIO_ST_IDLE state
      after the error condition is handled. The change just saves a function call to queue_work().
      
      Tested OK on on my machine with pdc20275 and ASUS CD-RW drive.
      Signed-off-by: default avatarAlbert Lee <albertcc@tw.ibm.com>
      623b57b3
    • Albert Lee's avatar
      [libata] use PIO mode for request sense · 652f8d65
      Albert Lee authored
      Signed-off-by: default avatarAlbert Lee <albertcc@tw.ibm.com>
      652f8d65
  2. 26 Dec, 2004 10 commits
  3. 25 Dec, 2004 1 commit
  4. 24 Dec, 2004 6 commits
  5. 23 Dec, 2004 3 commits
  6. 22 Dec, 2004 8 commits
  7. 21 Dec, 2004 9 commits