[lkml]   [2002]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    SubjectRe: SCSI-Problem with AM53C974
    In, Kurt Garloff wrote:

    >Can you try the attached patch please? Patch is against 2.4.18.
    >It makes the AM53C974 driver register its IO-space and will make detection
    >fail, if there are no adapters found with available IO-space.
    >The tmscsim driver (which I maintain) does already register its IO space
    >correctly, so this patch should make sure that not both of them try to drive
    >the same piece of hardware.
    >Please report back, whether it works, so I can ask Marcelo to include it.

    OK, I found a littler bug in it, that's why on my first try it didn't
    work. There was a "!" missing in the if statement whether the region is
    free. So the driver failed if the region was free and succeeded if it was

    But now it seems to work well, so including it in the kernel would be

    Marion Steiner

    Here the corrected patch:

    --- linux-2.4.18.ipt_fixes2.ix86/drivers/scsi/AM53C974.c.orig Sun Sep 30 21:26:07 2001
    +++ linux-2.4.18.ipt_fixes2.ix86/drivers/scsi/AM53C974.c Mon Mar 18 11:59:31 2002
    @@ -732,6 +732,12 @@
    hostdata->disconnecting = 0;
    hostdata->dma_busy = 0;

    + if (!request_region (instance->io_port, 128, "AM53C974")) {
    + printk ("AM53C974 (scsi%d): Could not get IO region %04lx. Detaching ...\n",
    + instance->host_no, instance->io_port);
    + scsi_unregister(instance);
    + return 0;
    + }
    /* Set up an interrupt handler if we aren't already sharing an IRQ
    with another board */
    for (search = first_host;
    search && (((the_template != NULL) && (search->hostt !=
    the_template)) ||
    @@ -2441,6 +2447,7 @@
    static int AM53C974_release(struct Scsi_Host *shp)
    free_irq(shp->irq, shp);
    + release_region(shp->io_port, 128);
    return 0;
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:25    [W:0.023 / U:8.056 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site