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

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

On Tue, 2 Aug 2016, Mac User wrote:

> > Please send pictures. You can use the kernel parameter 
> > "fbcon=font:ProFont6x11" to get more text on the screen if it scrolls 
> > too fast.
> > 
> Please see attached.  Thanks..
> [...]
> scsi host0: esp
> scsi 0:0:0:0: Direct-Access SEAGATE ST318417N 0105 PQ: 0 ANSI: 3
> scsi target0:0:0: Beginning Domain Validation
> scsi host0: Reconnect IRQ2 timeout

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

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.


Reply to: