[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Modified Linux 4.1.20 (mac+scsi) on Quadra 660av

On 8/2/16 10:16 PM, Finn Thain wrote:
> ...
> A bit of Googling tells me that I've been here before (I had forgotten):
> commit 02507a80b35edd720480540d917e9f92cc371009
> Author: Finn Thain <fthain@telegraphics.com.au>
> Date:   Sat Dec 5 12:30:42 2009 +1100
>     [SCSI] mac_esp: fix PIO mode, take 2
>     The mac_esp PIO algorithm no longer works in 2.6.31 and crashes my Centris
>     660av. So here's a better one.
>     Also, force async with esp_set_offset() rather than esp_slave_configure().
>     One of the SCSI drives I tested still doesn't like the PIO mode and fails
>     with "esp: esp0: Reconnect IRQ2 timeout" (the same drive works fine in
>     PDMA mode).
>     This failure happens when esp_reconnect_with_tag() tries to read in two
>     tag bytes but the chip only provides one (0x20). I don't know what causes
>     this. I decided not to waste any more time trying to fix it because the
>     best solution is to rip out the PIO mode altogether and use the DMA
>     engine.
> So it appears that this bug is not a regression. I guess you have 3 
> options: find a compatible drive, implement DMA with the PSC chip, or 
> debug the esp_reconnect_with_tag() implementation for PIO use.
> Apple never provided public documentation for the PSC chip, which is why 
> there's no DMA support for SCSI on AV Quadras, and also why we have code 
> like this in macmace.c:
>         /* Not sure what this does */
>         while ((baka = psc_read_long(PSC_MYSTERY)) != psc_read_long(PSC_MYSTERY));
>         if (!(baka & 0x60000000)) return IRQ_NONE;
> You could tackle the esp_reconnect_with_tag() bug by increasing the 
> ESP_RESELECT_TAG_LIMIT timeout and setting some kernel parameters:
>   scsi_mod.scan=sync  esp_scsi.esp_debug=0x241
> In my experience, the only practical way to debug mac scsi drivers is to 
> make the driver modular, boot over ethernet and then use insmod and rmmod 
> to test changes to the module.

Thanks for checking, Finn.

As a non-developer, but one who is willing to become more involved, I
have some newbie questions...

Would it make more sense to adapt the last working version of the ESP
SCSI code (apparently from kernel 2.6.30) or try to fix what is there
now (with the goal of having it work with Linux 4.x kernels)?  Is anyone
working on this already?

This also affects the Centris 650, perhaps all of the Quadra machines?

Is there a final Debian-approved version of a working ESP SCSI module
(from Linux 2.6.30 or later) that can be used as a starting point?

You said Apple didn't document their PSC chip very well; is there any
documentation at all that Debian can share?



Reply to: