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

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



Hi Finn,

>>
>> the problem with trying to read two tag bytes does sound familiar - I 
>> believe we ran into that one (or a similar one) while trying to revive 
>> the Amiga ESP drivers.
>>
> 
> That's intriguing. I hadn't realised that those zorro_esp discussions on 
> the mailing lists (linked below) covered the same bug I saw in mac_esp in 
> 2009.
> 
> http://linux-m68k.vger.kernel.narkive.com/pMVlraRz/patch-0-2-experimental-amiga-zorro-esp-driver
> http://markmail.org/message/whgfl2d5jhk3y75t
> http://markmail.org/message/qxrwcdpc625mczml

I hadn't realized either that you had seen this bug before - I did't
follow Mac issues at all at that time.

>> Tuomas used scsi_deactivate_tcq() in a driver specific
>> esp_slave_configure() hook but that interface later disappeared. In the
>> last version I tested, I added the following code after domain
>> validation in the driver specific esp_slave_configure()
>>
>> +       /*
>> +        * Hardwire TQC capability of target _off_ after
>> +        * domain validation (which might have probed and
>> +        * negotiated TQC available)
>> +        */
>> +       dev->tagged_supported = 0;
>> +       dev->simple_tags = 0;
>> +
>>
>> I tried all sorts of things with the chip config registers, to no avail.
> 
> Nonetheless this issue should probably be addressed in the core esp_scsi 
> driver to avoid duplicating fixes in the board-specific code.

I agree, and that was David Miller's opinion also. But I've never got
any traction with attempts to explicitly enable extended messages (IIRC)
in the driver via ESP config registers. Ran out of ideas and remotely
debugging the module (with the Amiga sitting in Adrian's lab at that
time) was a bit cumbersome.

> 
> If we can fix this issue in esp_scsi.c, it would be a good idea to get 
> some reviews for a complete series of patches for the new zorro_esp.c as 
> well as changes to esp_scsi.c and probably mac_esp.c too.
> 
>> Your report that this only happens with some disks exonerates the driver 
> 
> The fact that zorro_esp is also affected gives me confidence in mac_esp.

True - but what makes the driver work with most disks but fail with
some? Different SCSI command set supported by the disks?

> 
> Maybe this is an erratum relating to the particular device found in the 
> Quadra 660av, and has nothing to do with PIO/DMA/PDMA.
> 
> Stan, can you check the markings on the SCSI chip in your 660av? It's most 
> probably the largest device near the two SCSI connectors, possibly 
> Am53C94?

Similar - can Zorro ESP users (probably Adrian only at this stage; not
sure whether I'd ever sent a kernel or patches to Christian) check what
ESP chip version and revision level these cards use?

> I wonder why this problem didn't affect the old ESP driver? (Stan pointed 
> out earlier in this thread that "Debian 3.1 (with a Linux 2.2.25 kernel) 
> works on the Quadra 660av".)

Yep, I wonder about the same thing. Changes to SCSI domain validation,
perhaps even not at the driver but mid level?

I vaguely recall that the old Mac ESP driver explicitly disabled
features like sync negotiation and perhaps others, and the interface to
do that had changed or disappeared after the 2.6 series? (No idea really
when that happened - my last interaction with the ESP driver would have
been almost 18 years ago. Totally different code.)

IIRC the current ESP driver sets the config3 register according to
target capabilities. Can we log that register setting (once, after
initial DV) to see whether it differs between working and non-working
targets?

Cheers,

	Michael


Reply to: