Skip to contentSkip to conversation

ide-scsi on sparc64...

DISCUSSION Peter Jones 2 participants 4 messages Apr 18, 1999

lore
Share & tools
lore
#0 lore raw

Has anybody other than me tried this? I've been atacking it for, well, a day or so now, and I can't seem to make it work. If I turn off ide-cdrom, and turn on ide-scsi, I get an unaligned trap in idescsi_setup, at the line listed below.

static void idescsi_setup (ide_drive_t *drive, idescsi_scsi_t *scsi, int id)

{
        DRIVER(drive)->busy++;
        idescsi_drives[id] = drive;
        drive->driver_data = scsi;
        drive->ready_stat = 0;
        memset (scsi, 0, sizeof (idescsi_scsi_t));
        scsi->drive = drive;
        if (drive->id && (drive->id->config & 0x0060) = 0x20)
                set_bit (IDESCSI_DRQ_INTERRUPT, &scsi->flags);
        set_bit(IDESCSI_TRANSFORM, &scsi->transform);           <-- here
        clear_bit(IDESCSI_SG_TRANSFORM, &scsi->transform);
#if IDESCSI_DEBUG_LOG
        set_bit(IDESCSI_LOG_CMD, &scsi->log);
#endif /* IDESCSI_DEBUG_LOG */
        idescsi_add_settings(drive);
}

It panics claiming unaligned load/store... This is a bit past my expertise. Any ideas?

This is on a virgin CVS checkout.
-- Peter

"Talking much about oneself can also be a means to conceal oneself."
-- Nietzsche

#1 lore raw
scsi/ide-scsi.c renamed from scsi/ide-scsi.c.~1~ +3 -3
@@ -67,7 +67,7 @@
 	int b_count;				/* Bytes transferred from current entry */
 	Scsi_Cmnd *scsi_cmd;			/* SCSI command */
 	void (*done)(Scsi_Cmnd *);		/* Scsi completion routine */
-	unsigned int flags;			/* Status/Action flags */
+	unsigned long flags;			/* Status/Action flags */
 	unsigned long timeout;			/* Command timeout */
 } idescsi_pc_t;
 
@@ -93,8 +93,8 @@
 	ide_drive_t *drive;
 	idescsi_pc_t *pc;			/* Current packet command */
 	unsigned int flags;			/* Status/Action flags */
-	int transform;				/* SCSI cmd translation layer */
-	int log;				/* log flags */
+	unsigned long transform;		/* SCSI cmd translation layer */
+	unsigned long log;			/* log flags */
 } idescsi_scsi_t;
 
 /*
#2 lore raw
In reply to Peter Jones

Oh. Duh. I guess that is pretty obvious. Why not the second "unsigned int flags" as well though?

-- Peter

"Talking much about oneself can also be a means to conceal oneself."
-- Nietzsche

Quoted 24 lines · David Miller
scsi/ide-scsi.c renamed from scsi/ide-scsi.c.~1~ +3 -3
@@ -67,7 +67,7 @@
 	int b_count;				/* Bytes transferred from current entry */
 	Scsi_Cmnd *scsi_cmd;			/* SCSI command */
 	void (*done)(Scsi_Cmnd *);		/* Scsi completion routine */
-	unsigned int flags;			/* Status/Action flags */
+	unsigned long flags;			/* Status/Action flags */
 	unsigned long timeout;			/* Command timeout */
 } idescsi_pc_t;
 
@@ -93,8 +93,8 @@
 	ide_drive_t *drive;
 	idescsi_pc_t *pc;			/* Current packet command */
 	unsigned int flags;			/* Status/Action flags */
-	int transform;				/* SCSI cmd translation layer */
-	int log;				/* log flags */
+	unsigned long transform;		/* SCSI cmd translation layer */
+	unsigned long log;			/* log flags */
 } idescsi_scsi_t;
 
 /*
#3 lore raw
In reply to Peter Jones

Date: Sun, 18 Apr 1999 18:20:47 -0400 (EDT)
From: Peter Jones <[email protected]>

Oh. Duh. I guess that is pretty obvious. Why not the second "unsigned int flags" as well though?

Thanks for catching this, yes that one needs to be fixed up too.

ide-scsi.c renamed from ide-scsi.c.~2~ +1 -1
@@ -92,7 +92,7 @@
 typedef struct {
 	ide_drive_t *drive;
 	idescsi_pc_t *pc;			/* Current packet command */
-	unsigned int flags;			/* Status/Action flags */
+	unsigned long flags;			/* Status/Action flags */
 	unsigned long transform;		/* SCSI cmd translation layer */
 	unsigned long log;			/* log flags */
 } idescsi_scsi_t;