quirks in umass - cf continued

From: Marc Santhoff <M.Santhoff(at)t-online.de>
Date: 08 Mar 2003 00:13:27 +0100

Tag mal wieder!

Immer noch auf der Suche nach einer Lösung für meinen CF-Stöpsel habe
ich gegugelt und im Debian-Code gergraben und etwas gefunden:

> This patch also works for my SIIG USB CF US2256 (GenesysLogic GL641 >
> USB/CF Bridge),

Das ist genau das Teil, daß hier neben mir liegt ... sagt Knoppix.

>--- unusual_devs.h.distWed Jan 16 09:36:09 2002
>+++ unusual_devs.hThu Jan 17 11:11:30 2002
>@@ -251,6 +251,12 @@
> US_FL_MODE_XLATE | US_FL_START_STOP ),
> #endif
>
>+UNUSUAL_DEV( 0x05e3, 0x0700, 0x0000, 0x9999,
>+ \"Genesys Logic, Inc.\",
>+ \"USB TO IDE\",
>+ US_SC_SCSI, US_PR_BULK, NULL,
>+ US_FL_FIX_INQUIRY | US_FL_MODE_XLATE),
>+
> UNUSUAL_DEV( 0x0644, 0x0000, 0x0100, 0x0100,
> \"TEAC\",
> \"Floppy Drive\",

wobei nach ein wenig weiterem Graben US_FL_MODE_XLATE als Äquivalent zum
DA_Q_NO_6_BYTE quirk identifiziert werden konnte.

Das andere macht mich nachdenklich und bildet den Anlaß für dise Mail,
ich wüßte gern ob das unter FreeBSD auch eine Rolle spielt bzw. dies tun
solte:

< schnips >
/* Driver for USB Mass Storage compliant devices
 *
 * $Id: protocol.c,v 1.11 2002/01/13 06:40:25 mdharm Exp $
 *

...

/* Fix-up the return data from an INQUIRY command to show
 * ANSI SCSI rev 2 so we don't confuse the SCSI layers above us
  */
void fix_inquiry_data(Scsi_Cmnd *srb)
{
         unsigned char *data_ptr;
 
         /* verify that it's an INQUIRY command */
         if (srb->cmnd[0] != INQUIRY)
                 return;
         US_DEBUGP("Fixing INQUIRY data to show SCSI rev 2\n");
         /* find the location of the data */
         if (srb->use_sg) {
                struct scatterlist *sg;
                sg = (struct scatterlist *) srb->request_buffer;
                data_ptr = (unsigned char *) sg[0].address;
        } else
                data_ptr = (unsigned char *)srb->request_buffer;
        /* Change the SCSI revision number */
        data_ptr[2] = (data_ptr[2] & ~7) | 2;
}

...
< schnaps >

Aufgerufen wird dies aus vier Protokollfunktionen:

void usb_stor_transparent_scsi_command(Scsi_Cmnd *srb, struct us_data
*us)

Die anderen heißen:

usb_stor_ufi_command
usb_stor_ATAPI_command
usb_stor_qic157_command

Der Aufruf erfolgt jeweils als letztes in der gleichen Datei

Lohnt es sich, damit weitere Versuche anzustellen?
Wenn ja, wo (genau im source)?

Gruß,
Marc

To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Sat 08 Mar 2003 - 00:19:49 CET

search this site