Skip to contentSkip to conversation

aic79xx build and lun detect problem fix

PATCH In review ISHIKAWA Mutsumi 4 participants 5 messages Feb 11, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 aic79xx build and lun detect problem fix

This patch will fix two problems.

fix build problem related scsi_cmnd changes

http://linux.bkbits.net:8080/linux-2.5/diffs/drivers/scsi/aic7xxx/[email protected]?nav=index.html|src/|src/drivers|src/drivers/scsi|src/drivers/scsi/aic7xxx|hist/drivers/scsi/aic7xxx/aic79xx_osm.c

This change(latest aic79xx driver and scsi_cmnd changes merging) is dropped `hscb->lun = cmd->device->lun;' (in aic79xx_osm.c line 4272). This change cause lun detect problem. I believe it is still needed.

drivers/scsi/aic7xxx/aic79xx_osm.c renamed from drivers/scsi/aic7xxx/aic79xx_osm.c.orig +2 -1
@@ -1560,7 +1560,7 @@
 	hscb = scb->hscb;
 	hscb->control = 0;
 	hscb->scsiid = BUILD_SCSIID(ahd, cmd);
-	hscb->lun = cmd->lun;
+	hscb->lun = cmd->device->lun;
 	hscb->cdb_len = 0;
 	hscb->task_management = SIU_TASKMGMT_LUN_RESET;
 	scb->flags |= SCB_DEVICE_RESET|SCB_RECOVERY_SCB|SCB_ACTIVE;
@@ -4269,6 +4269,7 @@
 		 */
 		hscb->control = 0;
 		hscb->scsiid = BUILD_SCSIID(ahd, cmd);
+		hscb->lun = cmd->device->lun;
 		scb->hscb->task_management = 0;
 		mask = SCB_GET_TARGET_MASK(ahd, scb);
 
Signature · 2 lines
ISHIKAWA Mutsumi
 <[email protected]>, <[email protected]>, <[email protected]>
#1 lore raw
Quoted 3 lines

This patch will fix two problems.

fix build problem related scsi_cmnd changes

The aic7xxx driver has one place that missed the conversion too. Since the cmd->lun field is no longer filled in, why hasn't the field been removed from the cmd structure? That would make it easy to catch these kinds of bugs.

Thanks for the report. We're close to doing another aic79xx driver drop and I'll incorporate the change then.

--
Justin

Quoted 32 lines

http://linux.bkbits.net:8080/linux-2.5/diffs/drivers/scsi/aic7xxx/[email protected]?nav=index.html|src/|src/drivers|src/drivers/scsi|src/drivers/scsi/aic7xxx|hist/drivers/scsi/aic7xxx/aic79xx_osm.c

This change(latest aic79xx driver and scsi_cmnd changes merging) is dropped `hscb->lun = cmd->device->lun;' (in aic79xx_osm.c line 4272). This change cause lun detect problem. I believe it is still needed.

drivers/scsi/aic7xxx/aic79xx_osm.c renamed from drivers/scsi/aic7xxx/aic79xx_osm.c.orig +2 -1
@@ -1560,7 +1560,7 @@
 	hscb = scb->hscb;
 	hscb->control = 0;
 	hscb->scsiid = BUILD_SCSIID(ahd, cmd);
-	hscb->lun = cmd->lun;
+	hscb->lun = cmd->device->lun;
 	hscb->cdb_len = 0;
 	hscb->task_management = SIU_TASKMGMT_LUN_RESET;
 	scb->flags |= SCB_DEVICE_RESET|SCB_RECOVERY_SCB|SCB_ACTIVE;
@@ -4269,6 +4269,7 @@
 		 */
 		hscb->control = 0;
 		hscb->scsiid = BUILD_SCSIID(ahd, cmd);
+		hscb->lun = cmd->device->lun;
 		scb->hscb->task_management = 0;
 		mask = SCB_GET_TARGET_MASK(ahd, scb);
 
Signature · 3 lines
-- 
ISHIKAWA Mutsumi
 <[email protected]>, <[email protected]>, <[email protected]>
#2 lore raw
Quoted 8 lines · Justin T. Gibbs
Quoted 3 lines

This patch will fix two problems.

fix build problem related scsi_cmnd changes

The aic7xxx driver has one place that missed the conversion too. Since the cmd->lun field is no longer filled in, why hasn't the field been removed from the cmd structure? That would make it easy to catch these kinds of bugs.

I don't think that was intentional. I'll submit a patch to remove it ASAP.

#3 lore raw
Quoted 11 lines · Christoph Hellwig
Quoted 8 lines · Justin T. Gibbs
Quoted 3 lines

This patch will fix two problems.

fix build problem related scsi_cmnd changes

The aic7xxx driver has one place that missed the conversion too. Since the cmd->lun field is no longer filled in, why hasn't the field been removed from the cmd structure? That would make it easy to catch these kinds of bugs.

I don't think that was intentional. I'll submit a patch to remove it ASAP.

Actually it is already gone.