diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-01-27 23:45:22 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-01-27 23:45:22 +0000 |
commit | 5b35aa5cd29bb111d847b2a2ed18110acbfb1f44 (patch) | |
tree | c7bbaa1137528330d3c74d14056ef7016a52be72 /drivers/i2o/i2o_scsi.c | |
parent | 511bcd7c5924ce9e98ad1cb851988f7448dfef0f (diff) |
Merge with Linux 2.3.24.
Diffstat (limited to 'drivers/i2o/i2o_scsi.c')
-rw-r--r-- | drivers/i2o/i2o_scsi.c | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/drivers/i2o/i2o_scsi.c b/drivers/i2o/i2o_scsi.c index 7b309411b..46f7fbfb0 100644 --- a/drivers/i2o/i2o_scsi.c +++ b/drivers/i2o/i2o_scsi.c @@ -301,14 +301,12 @@ static int i2o_find_lun(struct i2o_controller *c, struct i2o_device *d, int *tar { u8 reply[8]; - if(i2o_query_scalar(c, d->id, scsi_context|0x40000000, - 0, 3, reply, 4, &lun_done)<0) + if(i2o_query_scalar(c, d->lct_data->tid, 0, 3, reply, 4)) return -1; *target=reply[0]; - if(i2o_query_scalar(c, d->id, scsi_context|0x40000000, - 0, 4, reply, 8, &lun_done)<0) + if(i2o_query_scalar(c, d->lct_data->tid, 0, 4, reply, 8)) return -1; *lun=reply[1]; @@ -325,7 +323,7 @@ void i2o_scsi_init(struct i2o_controller *c, struct i2o_device *d, struct Scsi_H int target; h->controller=c; - h->bus_task=d->id; + h->bus_task=d->lct_data->tid; for(target=0;target<16;target++) for(lun=0;lun<8;lun++) @@ -334,34 +332,33 @@ void i2o_scsi_init(struct i2o_controller *c, struct i2o_device *d, struct Scsi_H for(unit=c->devices;unit!=NULL;unit=unit->next) { dprintk(("Class %03X, parent %d, want %d.\n", - unit->class, unit->parent, d->id)); + unit->lct_data->class_id, unit->lct_data->parent, d->lct_data->tid)); /* Only look at scsi and fc devices */ - if ( (unit->class != I2O_CLASS_SCSI_PERIPHERAL) - && (unit->class != I2O_CLASS_FIBRE_CHANNEL_PERIPHERAL) + if ( (unit->lct_data->class_id != I2O_CLASS_SCSI_PERIPHERAL) + && (unit->lct_data->class_id != I2O_CLASS_FIBRE_CHANNEL_PERIPHERAL) ) continue; /* On our bus ? */ dprintk(("Found a disk.\n")); - if ( (unit->parent == d->id) - || (unit->parent == d->parent) + if ((unit->lct_data->parent_tid == d->lct_data->tid) + || (unit->lct_data->parent_tid == d->lct_data->parent_tid) ) { u16 limit; dprintk(("Its ours.\n")); if(i2o_find_lun(c, unit, &target, &lun)==-1) { - printk(KERN_ERR "i2o_scsi: Unable to get lun for tid %d.\n", d->id); + printk(KERN_ERR "i2o_scsi: Unable to get lun for tid %d.\n", d->lct_data->tid); continue; } dprintk(("Found disk %d %d.\n", target, lun)); - h->task[target][lun]=unit->id; + h->task[target][lun]=unit->lct_data->tid; h->tagclock[target][lun]=jiffies; /* Get the max fragments/request */ - i2o_query_scalar(c, d->id, scsi_context|0x40000000, - 0xF103, 3, &limit, 2, &lun_done); + i2o_query_scalar(c, d->lct_data->tid, 0xF103, 3, &limit, 2); /* sanity */ if ( limit == 0 ) @@ -435,8 +432,8 @@ int i2o_scsi_detect(Scsi_Host_Template * tpnt) /* * bus_adapter, SCSI (obsolete), or FibreChannel busses only */ - if( (d->class!=I2O_CLASS_BUS_ADAPTER_PORT) // bus_adapter - && (d->class!=I2O_CLASS_FIBRE_CHANNEL_PORT) // FC_PORT + if( (d->lct_data->class_id!=I2O_CLASS_BUS_ADAPTER_PORT) // bus_adapter + && (d->lct_data->class_id!=I2O_CLASS_FIBRE_CHANNEL_PORT) // FC_PORT ) continue; |