scsi_debug against lk 2.5.69+mikea
PATCH 1/1 scsi_debug against lk 2.5.69+mikea
Found a small problem with scsi_debug while playing with rescan-scsi-bus.sh . This patch is against Mike Anderson's scsi hosts sysfs patchset (since that version has my most recent scsi_debug changes).
Doug Gilbert
drivers/scsi/scsi_debug.c2569ma_d1 renamed from drivers/scsi/scsi_debug.c +6 -5
@@ -54,7 +54,7 @@ #include "scsi_debug.h" -static const char * scsi_debug_version_str = "Version: 1.70 (20030416)"; +static const char * scsi_debug_version_str = "Version: 1.70 (20030507)"; /* Additional Sense Code (ASC) used */ #define NO_ADDED_SENSE 0x0
@@ -271,9 +271,10 @@ } if(target == sdebug_driver_template.this_id) { - printk(KERN_WARNING - "scsi_debug: initiator's id used as target!\n"); - return schedule_resp(SCpnt, NULL, done, 0, 0); + printk(KERN_INFO "scsi_debug: initiator's id used as " + "target!\n"); + return schedule_resp(SCpnt, NULL, done, + DID_NO_CONNECT << 16, 0); } if (SCpnt->device->lun >= scsi_debug_max_luns)
@@ -866,7 +867,7 @@ static void timer_intr_handler(unsigned long indx) { struct sdebug_queued_cmd * sqcp; - unsigned int iflags; + unsigned long iflags; if (indx >= SCSI_DEBUG_CANQUEUE) { printk(KERN_ERR "scsi_debug:timer_intr_handler: indx too "
Quoted 34 lines · Douglas Gilbert [[email protected]] wrote:
Found a small problem with
scsi_debugwhile playing withrescan-scsi-bus.sh. This patch is against Mike Anderson's scsi hosts sysfs patchset (since that version has my most recentscsi_debugchanges).Doug Gilbert
drivers/scsi/scsi_debug.c2569ma_d1 renamed from drivers/scsi/scsi_debug.c +5
-4@@ -54,7 +54,7 @@ #include "scsi_debug.h" -static const char * scsi_debug_version_str = "Version: 1.70 (20030416)"; +static const char * scsi_debug_version_str = "Version: 1.70 (20030507)"; /* Additional Sense Code (ASC) used */ #define NO_ADDED_SENSE 0x0@@ -271,9 +271,10 @@ } if(target == sdebug_driver_template.this_id) { - printk(KERN_WARNING - "scsi_debug: initiator's id used as target!\n"); - return schedule_resp(SCpnt, NULL, done, 0, 0); + printk(KERN_INFO "scsi_debug: initiator's id used as " + "target!\n"); + return schedule_resp(SCpnt, NULL, done, + DID_NO_CONNECT << 16, 0); } if (SCpnt->device->lun >= scsi_debug_max_luns)
drivers/scsi/scsi_debug.c2569ma_d1 line 873
Quoted 8 lines
drivers/scsi/scsi_debug.c2569ma_d1 renamed from drivers/scsi/scsi_debug.c +1
-1@@ -866,7 +867,7 @@ static void timer_intr_handler(unsigned long indx) { struct sdebug_queued_cmd * sqcp; - unsigned int iflags; + unsigned long iflags; if (indx >= SCSI_DEBUG_CANQUEUE) { printk(KERN_ERR "scsi_debug:timer_intr_handler: indx too "
You may want to resync against James scsi-misc-2.5. The timer_intr_handler is already taken care of, and with the template inclusion in the *.c file the offsets are off by a bit. I need to make a couple of changes at the bottom of the file. I will send the diffs out to the list later on today.
-andmike
--
Michael Anderson
[email protected]