int gdth_eh_bus_reset(Scsi_Cmnd *scp) 
static int gdth_eh_bus_reset(Scsi_Cmnd *scp) 
int gdth_eh_bus_reset(Scsi_Cmnd *scp){    int i, hanum;    gdth_ha_str *ha;    ulong flags;    Scsi_Cmnd *cmnd;    unchar b;    TRACE2(("gdth_eh_bus_reset()\n"));    hanum = NUMDATA(scp->device->host)->hanum;    b = virt_ctr ? NUMDATA(scp->device->host)->busnum : scp->device->channel;    ha    = HADATA(gdth_ctr_tab[hanum]);    /* clear command tab */    spin_lock_irqsave(&ha->smp_lock, flags);    for (i = 0; i < GDTH_MAXCMDS; ++i) {        cmnd = ha->cmd_tab[i].cmnd;        if (!SPECIAL_SCP(cmnd) && cmnd->device->channel == b)            ha->cmd_tab[i].cmnd = UNUSED_CMND;    }    spin_unlock_irqrestore(&ha->smp_lock, flags);    if (b == ha->virt_bus) {        /* host drives */        for (i = 0; i < MAX_HDRIVES; ++i) {            if (ha->hdr[i].present) {                spin_lock_irqsave(&ha->smp_lock, flags);                gdth_polling = TRUE;                while (gdth_test_busy(hanum))                    gdth_delay(0);                if (gdth_internal_cmd(hanum, CACHESERVICE,                                       GDT_CLUST_RESET, i, 0, 0))                    ha->hdr[i].cluster_type &= ~CLUSTER_RESERVED;                gdth_polling = FALSE;                spin_unlock_irqrestore(&ha->smp_lock, flags);            }        }    } else {        /* raw devices */        spin_lock_irqsave(&ha->smp_lock, flags);        for (i = 0; i < MAXID; ++i)            ha->raw[BUS_L2P(ha,b)].io_cnt[i] = 0;        gdth_polling = TRUE;        while (gdth_test_busy(hanum))            gdth_delay(0);        gdth_internal_cmd(hanum, SCSIRAWSERVICE, GDT_RESET_BUS,                          BUS_L2P(ha,b), 0, 0);        gdth_polling = FALSE;	spin_unlock_irqrestore(&ha->smp_lock, flags);    }    return SUCCESS;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/8e8790415e91964096f862a58cacb55d2bc9a817/gdth.c/buggy/drivers/scsi/gdth.c