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

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

 



On Mon, 5 Mar 2018, Michael Schmitz wrote:

> >> +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.
> 

I think you are talking about esp->regs? For esp->dma_regs, the ioremap is 
conditional on ent->id, but the unmap is not.

> >> +}
> >> +
> >> +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...

Maybe store ent->id in the private struct to get around that?

-- 



[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