Skip to contentSkip to conversation

libata atapi work #5

PATCH Pat LaVarre 3 participants 11 messages May 14, 2004 – May 15, 2004 libata

lore
Share & tools
lore
#0 lore raw

Review

Quoted 4 lines
(quoted diff) +1 -2
-				if (qc && ((qc->flags & ATA_QCFLAG_POLL) == 0))
+				if (qc && (!(qc->tf.ctl & ATA_NIEN)))
...
-	ATA_QCFLAG_POLL		= (1 << 5), /* polling, no interrupts */

Back in PATA, when I set x02 ATA_NIEN, I mis/remember I saw INTRQ float, rather than becoming reliably deasserted.

Is life better in SATA?

Pat LaVarre

#1 lore raw
Quoted 10 lines · Pat LaVarre

Review

Quoted 4 lines
(quoted diff) +1 -2
-				if (qc && ((qc->flags & ATA_QCFLAG_POLL) == 0))
+				if (qc && (!(qc->tf.ctl & ATA_NIEN)))
...
-	ATA_QCFLAG_POLL		= (1 << 5), /* polling, no interrupts */

Back in PATA, when I set x02 ATA_NIEN, I mis/remember I saw INTRQ float, rather than becoming reliably deasserted.

Is life better in SATA?

On pure SATA, you just have a bit in a FIS, as I mentioned in one of the other emails (in this current email flurry :)).

On bridged SATA, where either the host controller or the device, or both, have an on-device SATA<->PATA bridge, the bridge must deal with INTRQ. On the whole it is _much_ more clean.

Read up in the SATA docs on the difference between a "command FIS" and a "control FIS". Here's a quick intro...

Both are Host-to-Device Register FIS's. The former is sent to the device when the Command shadow register is written. The latter is sent to the device when the Device Control register is written. Both types of H2D Register FIS, command and control, send a complete copy of the taskfile shadow registers to the device at that time.

Reading your emails, you sound like a "hardware guy" to me :) SATA is _very_ different from PATA at the hardware level. What used to be chip selects and signals are now bits in a data structure that is sent -- much like an ethernet frame -- over a serial link.

Jeff

#2 lore raw
Quoted 1 line

Read up in the SATA docs ...

Will do at t13.org ...

Quoted 1 line

Reading your emails, you sound like a "hardware guy" to me :)

Yes.

Kind of you to celebrate my sanity. :-)

Specifically, I was salaried in 1994..1999 mostly to write device
firmware: SCSI/ PPT/ ATAPI/ USB/ FireWire/ etc. But often for test & once to ship I wrote the host-side of the cable too, most recently x86 PATA UDMA.

Also I helped write the usb.org USB/ATAPI bridge spec, so I find serial/ parallel conversion familiar. And always my employer mass-produced one basic drive and then added bridges to support other kinds of cabling, so bridging to PATA ATAPI was my whole world in 1997..1999.

Pat LaVarre
http://sourceforge.net/projects/iomrrdtools/
http://members.aol.com/plscsi/tools/pldd/
http://members.aol.com/plscsi/

#5 lore raw

Hello,

Quoted 2 lines

Does the web now offer PCI chip designs in open source?

Yes. Most notably: http://www.opencores.org/

Quoted 3 lines

1987..1990 or so I did register-transfer-level chip design (a la Verilog). I naturally prefer concurrent designs over sequential.

Don't we all? :-)

BTW, your discussion makes good reading. Learning from it. (I used to write SCSI drivers/applications mostly for rare devices and for the SCSI vendor-unique command sets. I wish I had the time to engineer along with you guys on SATA).

Regards,

Leon Woestenberg.

#6 lore raw
In reply to Pat LaVarre
Quoted 8 lines · Pat LaVarre

Jeff G:

Quoted 2 lines

an open IP core compliant to the AHCI specification:
http://www.intel.com/technology/serialata/pdf/rev1_0.pdf

Does the web now offer PCI chip designs in open source?

Yes. http://www.opencores.org/projects.cgi/web/pci

The above IP core bridges from the PCI bus to the internal wishbone [IP core interconnect] bus.

In theory, you connect your AHCI IP core to the PCI IP core via wishbone. opencores.org also has a wishbone-compliant DMA engine.

Quoted 2 lines

1987..1990 or so I did register-transfer-level chip design (a la Verilog). I naturally prefer concurrent designs over sequential.

All good EE designs are concurrent rather than sequential ;-)

But I'm a computer scientist, what do I know...

Jeff

#7 lore raw

Hello Jeff,

Quoted 4 lines · Jeff Garzik

All good EE designs are concurrent rather than sequential ;-)

But I'm a computer scientist, what do I know...

A rough guess: POSIX Threads :-)

And yes, that's IE*EE* POSIX Threads ;-)

Leon.

#8 lore raw
Quoted 4 lines · Leon Woestenberg

Hello Jeff,

Jeff Garzik wrote:

Quoted 8 lines
Quoted 5 lines

All good EE designs are concurrent rather than sequential ;-)

But I'm a computer scientist, what do I know...

A rough guess: POSIX Threads :-)

And yes, that's IE*EE* POSIX Threads ;-)

hehe.

Well, I actually don't like threads... but down at the hardware level, circuits are inherently parallel.

Jeff

#9 lore raw
In reply to Jeff Garzik

If I may continue our explosive growth in off-topic digressions here ...

1)

Thank you I blogged those open source PCI chip links to:

Subject: PCI chip designs in open source, now available
http://plavarre.blog-city.com/read/610412.htm

2)

I personally reviewed IEEE pthreads in late draft, for example on my own time I flew to the New Orleans working group. I argued to specify pthreads so that they could efficiently do cooperative fibers, not just indeterminately preemptive SMP, but I left town before that project ended. My least irrelevant blog might be:

fibers in C across platforms, if abused without asm
http://plavarre.blog-city.com/read/433074.htm

3)

I haven't seen anyone in software outside of chip simulation support massively parallel threading with reasonable efficiency.

My least irrelevant blog for that might be:

http://groups.google.com/groups?threadm=2695edf1.0403121101.1d77a037%40posting.google.com
Newsgroups: comp.lang.forth
Subject: almost every if is a mistake goes mainstream
Date: 2004-03-12 11:01:09 PST

which mentions the recent gcc adoption of the "indirect goto extension" as in Maurer'shttp://cs.ecs.baylor.edu/~maurer/Metamorphic/ IEEE Computer March 2004, p.31, "Metamorphic Programming: Unconventional High Performance".

Pat LaVarre