From: Finn Thain <fthain@telegraphics.com.au>
To: Michael Schmitz <schmitzmic@gmail.com>
Cc: Vainikka Tuomas <tuomas.vainikka@aalto.fi>,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-m68k <linux-m68k@vger.kernel.org>
Subject: Re: m68k v3.16 status update
Date: Fri, 29 Dec 2017 11:02:01 +1100 (AEDT) [thread overview]
Message-ID: <alpine.LNX.2.21.1712290945330.3@nippy.intranet> (raw)
In-Reply-To: <118e7cd3-dd10-2f41-0515-480fff370f4e@gmail.com>
On Thu, 28 Dec 2017, Michael Schmitz wrote:
>
> Oddly enough, this does not quite work. Due to my settings in the
> adapter probe function (I don't set the ESP_FLAG_DISABLE_SYNC flag), the
> ESP core uses 'select with attention and stop' instead of the normal
> select with attention command,
I don't know why the driver would need to use ESP_CMD_SELAS over
ESP_CMD_SA3. It might be interesting to bypass the ESP_FLAG_DOING_SLOWCMD
test entirely.
> which attempts to send just a single byte IDENTIFY message, and defers
> sending tag bytes to a later separate message out phase. The PIO routine
> I lifted from the Mac ESP driver apparently does not sucessfully send
> such a short message (or the select with attention and stop command
> requires special handshake).
>
That routine does not expect esp->ireg & ~ESP_INTR_BSERV when sending. But
with ESP_CMD_SELAS, you'll get ESP_INTR_FDONE | ESP_INTR_BSERV. One
datasheet says,
Select with ATN and Stop
This command should be used in place of [Select with ATN] when
multiple message phase bytes are to be sent. The command will
select a target with ATN asserted, send one message byte, and
generate bus service and function complete interrupts, and stop.
A different datasheet (probably a more appropriate one) says,
The Select with ATN and Stop Steps Command is used by the
Initiator to send messages with lengths other than 1 or 3 bytes.
When this command is issued, the device executes the Selection
process, transfers the first message byte, then STOPS the
sequence. ATN is not deasserted at this time, allowing the
Initiator to send additional message bytes after the ID message.
To send these additional bytes, the Initiator must write the
transfer counter with the number of bytes which will follow, then
issue an information transfer command. (Note: the Target is still
in the message out phase when this command is issued). ATN will
remain asserted until the transfer counter decrements to zero.
This suggests to me that the interrupt needs to be cleared and handled
before the transfer of the extra message bytes.
> Setting the ESP_FLAG_DISABLE_SYNC avoids triggering this behaviour.
>
> You should be able to reproduce this on Mac by omitting the
> ESP_FLAG_DISABLE_SYNC in the PIO case (just for testing - I don't
> advocate letting the driver negotiate sync transfers that PIO can't
> actually handle).
>
My Quadras aren't here with me at the moment. But I have some esp_scsi
debug logs that Stan captured on his Mac (I have a script to decode
these):
scsi host0: cmd[01 = ESP_CMD_FLUSH]
scsi host0: cmd[c3 = ESP_CMD_SELAS ESP_CMD_DMA]
scsi host0: intr sreg[96 = ESP_STAT_TCNT ESP_STAT_INTR ESP_MOP] seqreg[91] sreg2[00 =] ireg[18 = ESP_INTR_FDONE ESP_INTR_BSERV]
scsi host0: cmd[00 = ESP_CMD_NULL]
scsi host0: cmd[01 = ESP_CMD_FLUSH]
scsi host0: event[0d = ESP_EVENT_CHECK_PHASE] phase[06 = ESP_MOP]
scsi host0: event[09 = ESP_EVENT_MSGOUT] phase[06 = ESP_MOP]
scsi host0: cmd[01 = ESP_CMD_FLUSH]
ESP: Sending message [
01
03
01
4c
0f
]
scsi host0: cmd[01 = ESP_CMD_FLUSH]
scsi host0: cmd[90 = ESP_CMD_TI ESP_CMD_DMA]
I can't see why that wouldn't work in the PIO case. The interrupt flags
would have been cleared well before ESP_EVENT_MSGOUT.
Perhaps ESP_FLAG_DOING_SLOWCMD never happens on Quadras.
> I think I'll give up on trying to make PIO transfers work in the general
> case on Amiga, at least for now.
Yes, I agree. AFAICT we can't handle the general case without core driver
concerns leaking into the wrapper driver (which harms modularity), unless
we refactor all of the wrapper drivers (mac_esp, jazz_esp, am53c974 etc).
--
> I'll add comments to the Zorro PIO code warning that this is only meant
> as a workaround for extended message in transfer, and will fail on
> ESP_CMD_SELAS commands.
>
> Cheers,
>
> Michael
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
next prev parent reply other threads:[~2017-12-29 0:01 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-05 19:40 m68k v3.16 status update Geert Uytterhoeven
2014-08-05 19:52 ` Ingo Jürgensmann
2014-08-05 20:29 ` John Paul Adrian Glaubitz
2014-08-06 7:35 ` Geert Uytterhoeven
2014-08-06 9:53 ` John Paul Adrian Glaubitz
2014-08-08 8:58 ` Michael Schmitz
2014-08-08 9:53 ` Tuomas Vainikka
2014-08-08 8:38 ` Michael Schmitz
2014-08-08 9:45 ` Christian T. Steigies
2014-08-08 22:33 ` Michael Schmitz
2014-08-08 14:25 ` Tuomas Vainikka
2014-08-08 22:25 ` Michael Schmitz
2014-08-09 6:45 ` Tuomas Vainikka
2014-08-10 1:44 ` Michael Schmitz
2017-12-14 4:47 ` Michael Schmitz
2017-12-14 12:07 ` Vainikka Tuomas
2017-12-14 13:20 ` John Paul Adrian Glaubitz
2017-12-14 18:40 ` Michael Schmitz
2017-12-14 23:49 ` Finn Thain
2017-12-19 0:40 ` Michael Schmitz
2017-12-19 3:35 ` Finn Thain
2017-12-19 6:11 ` Michael Schmitz
2017-12-19 22:06 ` zorro_esp, was " Finn Thain
2017-12-19 23:01 ` Finn Thain
2017-12-20 1:42 ` Michael Schmitz
2017-12-20 3:34 ` Finn Thain
2017-12-28 8:02 ` Michael Schmitz
2017-12-29 0:02 ` Finn Thain [this message]
2017-12-29 9:09 ` Michael Schmitz
2017-12-19 8:19 ` Geert Uytterhoeven
2017-12-20 7:33 ` zorro_esp, was: " Michael Schmitz
2017-12-20 8:13 ` Geert Uytterhoeven
2017-12-15 8:34 ` Vainikka Tuomas
2017-12-16 0:04 ` TCQ with zorro_esp, was " Finn Thain
2017-12-19 0:44 ` Michael Schmitz
2014-08-09 1:14 ` Michael Schmitz
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=alpine.LNX.2.21.1712290945330.3@nippy.intranet \
--to=fthain@telegraphics.com.au \
--cc=geert@linux-m68k.org \
--cc=linux-m68k@vger.kernel.org \
--cc=schmitzmic@gmail.com \
--cc=tuomas.vainikka@aalto.fi \
/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).