Skip to contentSkip to conversation

missing SCSI device type (2.4.17)

PATCH New Stefan Wieseckel 1 participant 1 message Jan 4, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 missing SCSI device type (2.4.17)

Hi,

the attached patch adds one more SCSI device type to 2.4.17 (according to the
SCSI standard).

Bye...
Stef'

linux-2.4.17/include/scsi/scsi.h renamed from linux-2.4.17/include/scsi/scsi.h.orig +1 -0
@@ -130,6 +130,7 @@
 
 #define TYPE_DISK           0x00
 #define TYPE_TAPE           0x01
+#define TYPE_PRINTER        0x02
 #define TYPE_PROCESSOR      0x03    /* HP scanners use this */
 #define TYPE_WORM           0x04    /* Treated as ROM by our system */
 #define TYPE_ROM            0x05
linux-2.4.17/drivers/scsi/scsi_dma.c renamed from linux-2.4.17/drivers/scsi/scsi_dma.c.orig +1 -0
@@ -259,6 +259,7 @@
 				if (SDpnt->type == TYPE_WORM || SDpnt->type == TYPE_ROM)
 					new_dma_sectors += (2048 >> 9) * SDpnt->queue_depth;
 			} else if (SDpnt->type == TYPE_SCANNER ||
+				   SDpnt->type == TYPE_PRINTER ||
 				   SDpnt->type == TYPE_PROCESSOR ||
 				   SDpnt->type == TYPE_COMM ||
 				   SDpnt->type == TYPE_MEDIUM_CHANGER ||
linux-2.4.17/drivers/scsi/scsi_scan.c renamed from linux-2.4.17/drivers/scsi/scsi_scan.c.orig +1 -0
@@ -634,6 +634,7 @@
 	switch (type = (scsi_result[0] & 0x1f)) {
 	case TYPE_TAPE:
 	case TYPE_DISK:
+	case TYPE_PRINTER:
 	case TYPE_MOD:
 	case TYPE_PROCESSOR:
 	case TYPE_SCANNER: