public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
From: Tuomas Vainikka <tuomas.vainikka@aalto.fi>
To: David Miller <davem@davemloft.net>, schmitzmic@gmail.com
Cc: jongk@linux-m68k.org, geert@linux-m68k.org,
	linux-m68k@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: esp_scsi QTAG in FAS216
Date: Mon, 14 Apr 2014 08:05:34 +0300	[thread overview]
Message-ID: <534B6C9E.3070307@aalto.fi> (raw)
In-Reply-To: <20140413.221414.853080853067673824.davem@davemloft.net>

On 14.04.2014 05:14, David Miller wrote:
> From: Michael Schmitz <schmitzmic@gmail.com>
> Date: Mon, 14 Apr 2014 10:38:09 +1200
>
>> That appears to be our problem if I recall correctly Tuomas' debugging
>> report. (reselection, not selection as initiator). As
>> esp_slave_configure() enables queue tags regardless of chip config,
>> we'd best make certain the chip is configured correctly.
>>
>> The SCSI2 bit is used to test for presence of config register 2 in
>> esp_get_revision but later cleared in the same function. It appears
>> we'd need to set it after the call to scsi_esp_register() - can you
>> test whether that obsoletes the zorro_esp_slave_configure hack,
>> Tuomas?
>   ...
>>> Group 2 Commands
>>> (seems to only be relevant for target mode).
>>>
>>> And about the QTE bit:
>>>
>>> Bit 6 Queue Tag Enable
>>>
>>> When this bit is set, the 53CF94/96 can receive 3-byte messages during
>>> bus-initiated Select With ATN. This feature is also enabled by setting
>>> bit 3 in the Configuration 2 register.
>> My preference would be to set this one (named ESP_CONFIG3_TBMS). Your
>> opinion, Dave?
> As seems to be agreed upon here, the SCSI2 bit in the CONFIG2 register
> (ESP_CONFIG2_SCSI2ENAB) is only for when the chip is used in target
> mode.  So it is not relevant for our discussion because this driver is
> for initiator mode operation only.
>
> But some pieces of documentation seem like they might not agree on
> this point.
>
> With respect to bit 3 in the config3 register, it can take on one of
> two meaning depending upon chip revision.  As per ESP_CONFIG3_{TMS,FCLK}
> it either controls fast SCSI clocking, or it enabled 3 byte message
> recognition.
>
> But oddly in the NCR53CX docs:
>
> 	http://www.ibiblio.org/pub/historic-linux/early-ports/Sparc/NCR/NCR53C9X.txt
>
> it speaks as if ESP_CONFIG3_TMS and ESP_CONFIG3_TENB are merely finer
> grained versions of config2 register setting ESP_CONFIG2_SCSI2ENAB,
> which enables both features.
>
> Again I looked at the FreeBSD driver and for all chips after plain
> esp100, they set ESP_CONFIG2_SCSI2ENAB.
>
> Can we try testing the following patch?
>
> ====================
> esp_scsi: Set SCSI2 bit in config2 register.
>
> This should allow proper recognition of 3 byte reselection
> on all esp100a and later chips.
>
> Reported-by: Kars de Jong <jongk@linux-m68k.org>
> Reported-by: Michael Schmitz <schmitzmic@gmail.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
>
> diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c
> index 55548dc..16f69e0 100644
> --- a/drivers/scsi/esp_scsi.c
> +++ b/drivers/scsi/esp_scsi.c
> @@ -2160,7 +2160,7 @@ static void esp_get_revision(struct esp *esp)
>   		 */
>   		esp->rev = ESP100;
>   	} else {
> -		esp->config2 = 0;
> +		esp->config2 = ESP_CONFIG2_SCSI2ENAB;
>   		esp_set_all_config3(esp, 5);
>   		esp->prev_cfg3 = 5;
>   		esp_write8(esp->config2, ESP_CFG2);
> @@ -2187,8 +2187,6 @@ static void esp_get_revision(struct esp *esp)
>   			} else {
>   				esp->rev = ESP236;
>   			}
> -			esp->config2 = 0;
> -			esp_write8(esp->config2, ESP_CFG2);
>   		}
>   	}
>   }

I'll test these out soon.

Michael, where can I pull the latest version of zorro_esp?

-Tuomas

  reply	other threads:[~2014-04-14  5:11 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-06 20:56 [PATCH 0/2] Experimental Amiga Zorro ESP driver Michael Schmitz
2013-06-06 20:56 ` [PATCH 1/2] m68k/amiga - Zorro ESP SCSI Makefile/Kconfig support Michael Schmitz
2013-06-06 20:56 ` [PATCH 2/2] m68k/amiga - Zorro ESP: convert old driver to ESP core Michael Schmitz
2013-08-15 21:40 ` [PATCH 0/2] Experimental Amiga Zorro ESP driver Tuomas Vainikka
2013-08-16 19:01   ` Tuomas Vainikka
2013-08-17  1:49     ` Michael Schmitz
2013-08-17 11:33       ` Tuomas Vainikka
2013-08-18  2:05         ` Michael Schmitz
2013-08-18  8:23           ` Geert Uytterhoeven
2013-08-18  8:58             ` Michael Schmitz
2013-08-18  9:10               ` Geert Uytterhoeven
2013-08-19  8:48                 ` Michael Schmitz
2013-08-19 11:47                   ` Tuomas Vainikka
2013-08-19 12:01                     ` Geert Uytterhoeven
2013-08-19 20:46                   ` Tuomas Vainikka
2013-08-20  9:36                     ` Michael Schmitz
2013-08-20 10:00                       ` Tuomas Vainikka
2013-08-22 20:34                         ` Michael Schmitz
2013-08-31 10:37                           ` Tuomas Vainikka
2013-09-10 21:13                           ` Tuomas Vainikka
2013-09-11 10:12                             ` Michael Schmitz
2013-09-11 13:08                               ` Tuomas Vainikka
2013-09-11 20:14                                 ` Tuomas Vainikka
2013-09-26 13:44                                 ` Michael Schmitz
2013-09-26 14:04                                   ` Tuomas Vainikka
2013-09-27  9:17                                     ` Michael Schmitz
2013-09-11 14:48                               ` Geert Uytterhoeven
2013-09-12 15:36                                 ` esp_scsi QTAG in FAS216 (was Re: [PATCH 0/2] Experimental Amiga Zorro ESP driver) Tuomas Vainikka
2013-09-26 13:50                                   ` Michael Schmitz
2014-04-04 20:28                                   ` esp_scsi QTAG in FAS216 David Miller
2014-04-06 20:33                                     ` Michael Schmitz
2014-04-07  3:39                                       ` David Miller
2014-04-10 14:31                                       ` Kars de Jong
2014-04-11  1:47                                         ` Michael Schmitz
2014-04-13 14:47                                           ` Kars de Jong
2014-04-13 22:38                                             ` Michael Schmitz
2014-04-14  2:14                                               ` David Miller
2014-04-14  5:05                                                 ` Tuomas Vainikka [this message]
2014-04-14  8:51                                                   ` Michael Schmitz
2014-05-25  8:56                                                     ` Geert Uytterhoeven
2014-05-26  1:15                                                       ` Michael Schmitz
2014-04-14  9:01                                                 ` Michael Schmitz
2014-05-04 11:41                                                   ` Tuomas Vainikka
2016-10-28 21:54                                                 ` Finn Thain
2016-10-30  2:33                                                   ` Finn Thain
2016-10-31  8:03                                                     ` Michael Schmitz
2016-10-31 18:54                                                       ` Michael Schmitz
2016-10-31 23:47                                                         ` Finn Thain
2016-11-01  7:09                                                           ` Michael Schmitz
2016-11-01  7:23                                                             ` Finn Thain
2013-08-18  9:14               ` [PATCH 0/2] Experimental Amiga Zorro ESP driver Tuomas Vainikka
2013-08-18  9:42                 ` Geert Uytterhoeven
2013-08-18 12:25                   ` Tuomas Vainikka

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=534B6C9E.3070307@aalto.fi \
    --to=tuomas.vainikka@aalto.fi \
    --cc=davem@davemloft.net \
    --cc=geert@linux-m68k.org \
    --cc=jongk@linux-m68k.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=schmitzmic@gmail.com \
    /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