Re: [PATCH 2/2] m68k/amiga - Zorro ESP: new zorro_esp.c

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

 



Hi Finn,

>> +/* zorro_esp.c: ESP front-end for Amiga ZORRO SCSI systems.
>> + *
>> + * Copyright (C) 1996 Jesper Skov (jskov@xxxxxxxxxxxx)
>> + *
>> + * Copyright (C) 2011,2018 Michael Schmitz (schmitz@xxxxxxxxxx) for
>> + *               migration to ESP SCSI core
>
> You can blame me for some of this ;-)

I'll add a line here pointing out the source for the PIO code, so
others will have a chance to keep these in sync if needs be.


>> +fail_unmap_dma_regs:
>> +     if (ioaddr > 0xffffff)
>> +             iounmap(esp->dma_regs);
>
> I think you need to test for ZORRO_PROD_PHASE5_BLIZZARD_1230_IV_1260 here?

On second thought - no, I don't. the ID check above only determines
what Zorro-3 address is ioremapped, but in each case where ioaddr >
0xffffff, something will have been mapped at this point.

>> +}
>> +
>> +static void zorro_esp_remove_one(struct zorro_dev *z)
>> +{
>> +     struct Scsi_Host *host = zorro_get_drvdata(z);
>> +     struct esp *esp = shost_priv(host);
>> +
>> +     scsi_esp_unregister(esp);
>> +
>> +     /* Disable interrupts. Perhaps use disable_irq instead ... */
>> +
>> +     free_irq(host->irq, esp);
>> +     dma_free_coherent(esp->dev, 16,
>> +                       esp->command_block,
>> +                       esp->command_block_dma);
>> +
>> +     if (host->base > 0xffffff) {
>> +             iounmap(esp->dma_regs);
>
> Do you need to test for ZORRO_PROD_PHASE5_BLIZZARD_1230_IV_1260 first?

I can't - ent->id is not available here. But again, if host->base is
outside the Zorro-2 space, the DMA register mapping has been done
through ioremap() and needs to be undone here.

Cheers,

  Michael



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux