Thread (3 messages) 3 messages, 2 authors, 2004-12-03

Re: [PATCH] libata: Use ATAPI PIO mode for specific request buffer sizes

From: Jeff Garzik <hidden>
Date: 2004-12-02 11:21:23

Albert Lee wrote:
Hi, Jeff:

  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 against libata-dev-2.6 for your review.
Two changes:
1. Use ATAPI PIO mode for ATAPI REQUEST_SENSE
2. Use ATAPI PIO mode for specific SCSI commands issued to ATAPI device that
    buffer_size % 256 != 0.

  Since for most commands, buffer_size % 256 is 0,  this patch
won't introduce big impact to the performance of libata (hopefully).
  
  Tested OK on on my machine with pdc20275 and ASUS CD-RW drive.
hmmmmmmm.

Your change #1 makes perfect sense, and I agree it is the safer (and 
more simple) route.

I must ponder change #2 some more (after some sleep :)).  In particular, 
I am concerned that making change #2 across all controllers will hurt 
performance on the commands whose data length is not purely sector-sized 
chunks.

Would you mind splitting up change #1 and #2 into separate patches?

	Jeff

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help