linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Albert Lee <albertcc@tw.ibm.com>
To: Mark Lord <liml@rtr.ca>, Jeff Garzik <jgarzik@pobox.com>
Cc: IDE Linux <linux-ide@vger.kernel.org>,
	Tejun Heo <htejun@gmail.com>, Doug Maxey <dwm@maxeymade.com>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH 1/1] libata-dev: ata_check_atapi_dma() fix for ATA_FLAG_PIO_POLLING LLDDs
Date: Sat, 01 Apr 2006 21:24:38 +0800	[thread overview]
Message-ID: <442E7F16.8060007@tw.ibm.com> (raw)
In-Reply-To: <441845B6.2070200@rtr.ca>

Mark Lord wrote:
> 
>>
>> Yup, I have two such drives here.
>>
>> One of them has a grease-pencil "NFG" marking on it,
>> and other other one doesn't.  They both powered up and
>> worked just now, and their identify blobs are attached
>> (you can interpret them with "hdparm --Istdin <blob").
> 
> ..
> 
> Oh, another note:  neither of these two drives works
> with DMA enabled, at least not in 2.6.12 using the IDE driver.
> 
> PIO mode appears to be functioning fine on both of them.
> 

Thanks for Mark's info, I have finally found two of such CD-ROM drives:
one is a 1998 AOpen CD-936E/AKW (36x), the other is a LITEON LTN-403 (40x), removed
from a 1999 IBM Aptiva PC.

Both of them generates CDB interrupts. The AOpen drive supports PIO4/MWDMA2 and
the LITEON drive supports UDMA/33. (So, CDB intr + UDMA drives do exist.)

I've tested the drives for about a week. The test result of the irq-pio code
looks good. DRQ is always set when CDB interrupt is generated. 
Both drives follow the behavior defined by the sff-8020i spec.
I did not hit the DRQ=0 during CDB interrupt problem mentioned by Mark.
(If we encounter such problem in the future, maybe we can add some 
waiting loops to the HSM_ST_FIRST state, waiting for DRQ to be set, something 
like what ata_wait_idle() does.)

Interrupt-driven PIO, polling PIO and (interrupt driven) DMA protocols are tested
with both drives. Results look good. (Sample logs attached below.)
Hard drives are also tested, result looks good, too.

Current upstream is also tested. Since CDB intr is not supported yet, the CDB intr
caused irq to be disabled.

Summary: 
The current known problem of the irq-pio branch is the DRQ=1 ERR=1 handling.
A revised patch has been sent per Jeff's IDE try_to_flush_leftover_data() pointer.
Otherwise the irq-pio branch looks ready for upstream (need your comments)
and integration with Tejun's EH and Alan's PATA works.

Thanks,

Albert

Sample transation logs of the LTN-403 drive (irq-pio and dma).
(Interrupt driven PIO)
Mar 23 19:30:26 p4ht-s kernel: ata_scsi_dump_cdb: CDB (1:0,0,0) 28 00 00 00 2c 30 00 00 32
Mar 23 19:30:26 p4ht-s kernel: ata_scsi_translate: ENTER
Mar 23 19:30:26 p4ht-s kernel: ata_dev_select: ENTER, ata1: device 0, wait 1
Mar 23 19:30:26 p4ht-s kernel: ata_tf_load_mmio: feat 0x0 nsect 0x0 lba 0x0 0x0 0x20
Mar 23 19:30:26 p4ht-s kernel: ata_tf_load_mmio: device 0xA0
Mar 23 19:30:26 p4ht-s kernel: ata_exec_command_mmio: ata1: cmd 0xA0
Mar 23 19:30:26 p4ht-s kernel: ata_scsi_translate: EXIT
Mar 23 19:30:26 p4ht-s kernel: ata_host_intr: ata1: protocol 5 task_state 5  <== CDB intr
Mar 23 19:30:26 p4ht-s kernel: ata_hsm_move: ata1: protocol 5 task_state 5 (dev_stat 0x58) <== DRQ=1, good.
Mar 23 19:30:26 p4ht-s kernel: atapi_send_cdb: send cdb
Mar 23 19:30:26 p4ht-s kernel: ata_host_intr: ata1: protocol 5 task_state 2
Mar 23 19:30:26 p4ht-s kernel: ata_hsm_move: ata1: protocol 5 task_state 2 (dev_stat 0x58)
Mar 23 19:30:26 p4ht-s kernel: atapi_pio_bytes: ata1: xfering 8192 bytes
Mar 23 19:30:26 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:26 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: ata_host_intr: ata1: protocol 5 task_state 2
Mar 23 19:30:27 p4ht-s kernel: ata_hsm_move: ata1: protocol 5 task_state 2 (dev_stat 0x58)
Mar 23 19:30:27 p4ht-s kernel: atapi_pio_bytes: ata1: xfering 8192 bytes
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: ata_host_intr: ata1: protocol 5 task_state 2
Mar 23 19:30:27 p4ht-s kernel: ata_hsm_move: ata1: protocol 5 task_state 2 (dev_stat 0x58)
Mar 23 19:30:27 p4ht-s kernel: atapi_pio_bytes: ata1: xfering 8192 bytes
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: ata_host_intr: ata1: protocol 5 task_state 2
Mar 23 19:30:27 p4ht-s kernel: ata_hsm_move: ata1: protocol 5 task_state 2 (dev_stat 0x58)
Mar 23 19:30:27 p4ht-s kernel: atapi_pio_bytes: ata1: xfering 8192 bytes
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: ata_host_intr: ata1: protocol 5 task_state 2
Mar 23 19:30:27 p4ht-s kernel: ata_hsm_move: ata1: protocol 5 task_state 2 (dev_stat 0x58)
Mar 23 19:30:27 p4ht-s kernel: atapi_pio_bytes: ata1: xfering 8192 bytes
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: ata_host_intr: ata1: protocol 5 task_state 2
Mar 23 19:30:27 p4ht-s kernel: ata_hsm_move: ata1: protocol 5 task_state 2 (dev_stat 0x58)
Mar 23 19:30:27 p4ht-s kernel: atapi_pio_bytes: ata1: xfering 8192 bytes
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: ata_host_intr: ata1: protocol 5 task_state 2
Mar 23 19:30:27 p4ht-s kernel: ata_hsm_move: ata1: protocol 5 task_state 2 (dev_stat 0x58)
Mar 23 19:30:27 p4ht-s kernel: atapi_pio_bytes: ata1: xfering 8192 bytes
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: ata_host_intr: ata1: protocol 5 task_state 2
Mar 23 19:30:27 p4ht-s kernel: ata_hsm_move: ata1: protocol 5 task_state 2 (dev_stat 0x58)
Mar 23 19:30:27 p4ht-s kernel: atapi_pio_bytes: ata1: xfering 8192 bytes
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: ata_host_intr: ata1: protocol 5 task_state 2
Mar 23 19:30:27 p4ht-s kernel: ata_hsm_move: ata1: protocol 5 task_state 2 (dev_stat 0x58)
Mar 23 19:30:27 p4ht-s kernel: atapi_pio_bytes: ata1: xfering 8192 bytes
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: ata_host_intr: ata1: protocol 5 task_state 2
Mar 23 19:30:27 p4ht-s kernel: ata_hsm_move: ata1: protocol 5 task_state 2 (dev_stat 0x58)
Mar 23 19:30:27 p4ht-s kernel: atapi_pio_bytes: ata1: xfering 8192 bytes
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: ata_host_intr: ata1: protocol 5 task_state 2
Mar 23 19:30:27 p4ht-s kernel: ata_hsm_move: ata1: protocol 5 task_state 2 (dev_stat 0x58)
Mar 23 19:30:27 p4ht-s kernel: atapi_pio_bytes: ata1: xfering 8192 bytes
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: ata_host_intr: ata1: protocol 5 task_state 2
Mar 23 19:30:27 p4ht-s kernel: ata_hsm_move: ata1: protocol 5 task_state 2 (dev_stat 0x58)
Mar 23 19:30:27 p4ht-s kernel: atapi_pio_bytes: ata1: xfering 8192 bytes
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: ata_host_intr: ata1: protocol 5 task_state 2
Mar 23 19:30:27 p4ht-s kernel: ata_hsm_move: ata1: protocol 5 task_state 2 (dev_stat 0x58)
Mar 23 19:30:27 p4ht-s kernel: atapi_pio_bytes: ata1: xfering 4096 bytes
Mar 23 19:30:27 p4ht-s kernel: __atapi_pio_bytes: data read
Mar 23 19:30:27 p4ht-s kernel: ata_host_intr: ata1: protocol 5 task_state 3
Mar 23 19:30:27 p4ht-s kernel: ata_hsm_move: ata1: protocol 5 task_state 3 (dev_stat 0x50)
Mar 23 19:30:27 p4ht-s kernel: ata_hsm_move: ata1: command complete, drv_stat 0x50
Mar 23 19:30:27 p4ht-s kernel: atapi_qc_complete: ENTER, err_mask 0x0

================

(DMA)

Mar 23 19:38:13 p4ht-s kernel: ata_scsi_dump_cdb: CDB (1:0,0,0) 28 00 00 00 0c 30 00 00 32
Mar 23 19:38:13 p4ht-s kernel: ata_scsi_translate: ENTER
Mar 23 19:38:13 p4ht-s kernel: ata_sg_setup: ENTER, ata1
Mar 23 19:38:13 p4ht-s kernel: ata_sg_setup: 25 sg elements mapped
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[0] = (0x486F000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[1] = (0x10A7C000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[2] = (0x12BD6000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[3] = (0xF3DF000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[4] = (0xF242000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[5] = (0x9A25000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[6] = (0x4E9E000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[7] = (0x1E32B000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[8] = (0x7DC7000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[9] = (0xB4F3000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[10] = (0xDD63000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[11] = (0x115EB000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[12] = (0xDB6D000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[13] = (0x4CEC000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[14] = (0x100E1000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[15] = (0x776E000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[16] = (0xA947000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[17] = (0xAD8A000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[18] = (0x7036000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[19] = (0x13FA9000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[20] = (0xA5D5000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[21] = (0xBE62000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[22] = (0x2E8F000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[23] = (0x10DF3000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_fill_sg: PRD[24] = (0xA5D2000, 0x1000)
Mar 23 19:38:13 p4ht-s kernel: ata_dev_select: ENTER, ata1: device 0, wait 1
Mar 23 19:38:13 p4ht-s kernel: ata_tf_load_mmio: feat 0x1 nsect 0x0 lba 0x0 0x0 0x0
Mar 23 19:38:13 p4ht-s kernel: ata_tf_load_mmio: device 0xA0
Mar 23 19:38:13 p4ht-s kernel: ata_exec_command_mmio: ata1: cmd 0xA0
Mar 23 19:38:13 p4ht-s kernel: ata_scsi_translate: EXIT
Mar 23 19:38:13 p4ht-s kernel: ata_host_intr: ata1: protocol 7 task_state 5  <== CDB intr
Mar 23 19:38:13 p4ht-s kernel: ata_hsm_move: ata1: protocol 7 task_state 5 (dev_stat 0x58) <== DRQ=1, good.
Mar 23 19:38:13 p4ht-s kernel: atapi_send_cdb: send cdb
Mar 23 19:38:13 p4ht-s kernel: ata_host_intr: ata1: protocol 7 task_state 3
Mar 23 19:38:13 p4ht-s kernel: ata_host_intr: ata1: host_stat 0x4
Mar 23 19:38:13 p4ht-s kernel: ata_hsm_move: ata1: protocol 7 task_state 3 (dev_stat 0x50)
Mar 23 19:38:13 p4ht-s kernel: ata_hsm_move: ata1: command complete, drv_stat 0x50
Mar 23 19:38:13 p4ht-s kernel: ata_sg_clean: unmapping 25 sg elements
Mar 23 19:38:13 p4ht-s kernel: atapi_qc_complete: ENTER, err_mask 0x0


      reply	other threads:[~2006-04-01 13:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-13  7:57 [PATCH 1/1] libata-dev: ata_check_atapi_dma() fix for ATA_FLAG_PIO_POLLING LLDDs Albert Lee
2006-03-13  8:09 ` Jeff Garzik
2006-03-14  4:52   ` Albert Lee
2006-03-15 15:54     ` Mark Lord
2006-03-15 16:12       ` Mark Lord
2006-03-15 16:24         ` Mark Lord
2006-03-16  7:22           ` Albert Lee
2006-03-17  5:51             ` Mark Lord
2006-03-15 16:49         ` Mark Lord
2006-04-01 13:24           ` Albert Lee [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=442E7F16.8060007@tw.ibm.com \
    --to=albertcc@tw.ibm.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=albertl@mail.com \
    --cc=dwm@maxeymade.com \
    --cc=htejun@gmail.com \
    --cc=jgarzik@pobox.com \
    --cc=liml@rtr.ca \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).