patch-2.3.24 linux/drivers/i2o/i2o_scsi.c

Next file: linux/drivers/macintosh/macserial.c
Previous file: linux/drivers/i2o/i2o_proc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.23/linux/drivers/i2o/i2o_scsi.c linux/drivers/i2o/i2o_scsi.c
@@ -301,14 +301,12 @@
 {
 	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 @@
 	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 @@
 	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 @@
 			/*
 			 *	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;
 		

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)