lkml.org 
[lkml]   [1999]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectWhy only half support for the Panasonic LF-D101 DVD-RAM in 2.2.12?
Some kind soul included explicit support for the Panasonic DVD-RAM in
the main scsi.c driver in release 2.2.11. However, the drive is no
longer recognised as a CD-ROM.

I've been manually patching scsi.c for a while now with the following
patch, which allows the drive to function as both DVD-RAM and a CD-ROM.
I've noticed no problems with it.

I may be making a rod for my for my own back, since the programmer
appears to have referred to this patch, and may have found something
wrong with the original.

I'm quoting it here. This was from 2.2.1 so it won't work automatically.

Obviously, I'm hoping to see full support in an official release,
eventually.

Thank you.

*** scsi.c.org Sat Jan 30 23:33:14 1999
--- scsi.c Sat Jan 30 23:33:26 1999
***************
*** 628,633 ****
--- 628,635 ----
struct Scsi_Device_Template *sdtpnt;
Scsi_Device * SDtail, *SDpnt=*SDpnt2;
int bflags, type=-1;
+ static int PANA_DVD_RAM[2] = {-1,-1};
+ int org_lun = lun;

SDpnt->host = shpnt;
SDpnt->id = dev;
***************
*** 635,640 ****
--- 637,652 ----
SDpnt->channel = channel;
SDpnt->online = TRUE;

+ /* MATSUSHITA DVD-RAM LF-D100 */
+ if (PANA_DVD_RAM[0] == channel && PANA_DVD_RAM[1] == dev && lun ==
1) {
+ /* get CD-ROM type */
+ SDpnt->lun = lun = 0;
+ } else {
+ /* clear status */
+ PANA_DVD_RAM[0] = -1;
+ PANA_DVD_RAM[1] = -1;
+ }

/* Some low level driver could use device->type (DB) */
SDpnt->type = -1;

***************
*** 736,741 ****
--- 748,768 ----
scsi_result[1] |= 0x80; /* removable */
}
+ if (!strncmp (scsi_result + 8, "MATSHITA", 8) &&
+ !strncmp (scsi_result + 16, "PD-2 LF-D100", 12) &&
+ scsi_result[0] == TYPE_ROM) {
+ if (PANA_DVD_RAM[0] == channel && PANA_DVD_RAM[1] == dev &&
org_lun == 1)
+ /* MATSUSHITA DVD-RAM LF-D100 treats as ROM */
+ lun = 1;
+ } else {
+ /* MATSUSHITA DVD-RAM LF-D100 treats as MOD */
+ scsi_result[0] = TYPE_MOD;
+ scsi_result[1] |= 0x80; /* removable */
+ PANA_DVD_RAM[0] = channel;
+ PANA_DVD_RAM[1] = dev;
+ }
+ }

memcpy (SDpnt->vendor, scsi_result + 8, 8);
memcpy (SDpnt->model, scsi_result + 16, 16);
memcpy (SDpnt->rev, scsi_result + 32, 4);
***************
*** 927,932 ****
--- 954,966 ----
*max_dev_lun = 8;
return 1;
}

+ /* MATSUSHITA DVD-RAM LF-D100 */
+ if (PANA_DVD_RAM[0] == channel && PANA_DVD_RAM[1] == dev && org_lun
== 1) {
+ *max_dev_lun = 2;
+ return 1;
+ }

/*
* We assume the device can't handle lun!=0 if: - it reports scsi-0
(ANSI
* SCSI Revision 0) (old drives like MAXTOR XT-3280) or - it reports
scsi-1

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.047 / U:0.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site