public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
From: Michael Schmitz <schmitzmic@gmail.com>
To: Finn Thain <fthain@telegraphics.com.au>
Cc: Christoph Hellwig <hch@infradead.org>,
	Michael Schmitz <schmitz@debian.org>,
	Sam Creasey <sammy@sammy.net>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Linux/m68k <linux-m68k@vger.kernel.org>
Subject: Re: converting the NCR5380 drivers away from scsi_register
Date: Sat, 02 Aug 2014 20:51:58 +1200	[thread overview]
Message-ID: <53DCA6AE.5060801@gmail.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1408021106030.28603@nippy.intranet>

Hi Finn,
>>
>> If you rather want to do this - either use the ATARIHW_PRESENT() macros 
>> to test for ST_SCSI (Falcon, interrupt no. IRQ_MFP_FSCSI) or TT_SCSI 
>> (TT, interrupt no. IRQ_TT_MFP_SCSI). Or else, replicate the logic from 
>> config_atari()
>>     
>
> Yes, that was my plan. A patch that replicates that logic is easier to 
> review and less likely to cause regressions (of course, I'd follow the 
> existing conventions in arch/m68k/atari/config.c).
>   

Sounds good to me.

> Converting three drivers at once is a win because the first conversion is 
> always the more difficult one. Therefore I'm planning to use the same 
> logic three times over and therefore I'm not intending to address the 
> peculiarities of different ports (that would be better done by you, me and 
> Sam separately).
>   

OK, I'll think some more about what could be done to merge the quirks 
into a shared core.

> However, I'll will need you and Sam to test some patches (if they meet 
> with approval once you and Sam get to review them, of course).
>
>   
>> - the SCSI chip directly mapped only in the TT integration, the Falcon 
>> needs to access SCSI registers through the ST-DMA chip, and needs the 
>> weird ST-DMA locking scheme plus a few other quirks.
>>
>> Looking at atari_scsi.c - the code is full of IS_A_TT() macros and other 
>> Atari specfic macros that could be replaced by testing bits in a feature 
>> map. One bit (TT or Falcon style SCSI integration) rather - that still 
>> leaves the register access functions for TT and Falcon to sort out.  Do 
>> you plan to do all that in one go?
>>     
>
> No, not in one go. That would be a separate patch, so that each patch has 
> a single well defined purpose.
>
> I'm not particularly concerned about atari_scsi.c. I am concerned about 
> the three forks of the core driver (not least because of the shared 
> header) that's why I've sent patches for sun3_NCR5380 and atari_NCR5380 in 
> the past.
>   

OK, forget about atari_scsi.c for now. From memory, the major difference 
between atari_NCR5380.c and the others is handling of the ST-DMA/shared 
interrupt locking. We need to preserve that pretty much as is, or risk 
serious regressions. I mean, more serious trouble than I already have 
with the current driver because of the tendency of my Falcon to muck up 
the SCSI chip's clock signal under heavy load. Also note that there is 
still one of my patches unmerged (under review since early this year) 
that is necessary to avoid 'scheduling in interrupt' style panic.

The rest of the differences were tweaks added by the Atari SCSI author 
to make the driver behave with borderline standards compliant hardware 
(long reset delay for some CD drives, tweaks to bus settle delays). 
Probably not that critical in the first instance.

>> Might need another platform device for the ST-DMA as well ...
>>     
>
> I don't think that relates to scsi_register() deprecation.
>   

Not at all - just to the platform device conversion. Not sure I fully 
understand what you have in mind, though.

Cheers,

    Michael

  reply	other threads:[~2014-08-02  8:52 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-16 14:18 converting the NCR5380 drivers away from scsi_register Christoph Hellwig
2014-06-17  8:20 ` Finn Thain
2014-06-17  8:38   ` Geert Uytterhoeven
2014-07-30  8:32     ` Finn Thain
2014-07-31  5:31       ` Michael Schmitz
2014-08-01  3:13         ` Finn Thain
2014-08-01  8:15           ` Michael Schmitz
2014-08-02  1:27             ` Finn Thain
2014-08-02  8:51               ` Michael Schmitz [this message]
2014-08-03  3:43                 ` Finn Thain
2014-08-03  9:07                   ` Michael Schmitz
2014-08-04  3:28                     ` Finn Thain
2014-08-05  9:06                       ` Michael Schmitz
2014-08-06  1:25                         ` Sun3 SCSI DMA, was " Finn Thain
2014-08-06 14:42                           ` Sam Creasey
2014-08-08  8:46                             ` Michael Schmitz
2014-08-11 15:10                               ` Sam Creasey
2014-08-13  5:29                                 ` Finn Thain
2014-08-13  9:14                                   ` Michael Schmitz
2014-08-14  1:43                                     ` Finn Thain
2014-08-14  8:57                                       ` Michael Schmitz
2014-08-15  1:46                                         ` Finn Thain
2014-08-15  1:51                                           ` Michael Schmitz
2014-08-15  2:09                                         ` Finn Thain
2014-08-15  3:03                                           ` 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=53DCA6AE.5060801@gmail.com \
    --to=schmitzmic@gmail.com \
    --cc=fthain@telegraphics.com.au \
    --cc=geert@linux-m68k.org \
    --cc=hch@infradead.org \
    --cc=linux-m68k@vger.kernel.org \
    --cc=sammy@sammy.net \
    --cc=schmitz@debian.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