Hi, list, hi Alan,
I'm learning now much more about drivers as I intended to...

Am Donnerstag, 10. August 2006 17:34 schrieb Alan Stern:

> > Hmmm. As far I can see, this ALLOW_MEDIUM_REMOVAL is issued despite of
> > the blacklist entry. So:
> > # cat /proc/scsi/device_info | grep OPTAC
> > 'SRE     ' 'OPTAC Tool      ' 0x80000
> > Maybe OPTAC Tool does not match because of the spaces?
>
> The spaces shouldn't cause a problem; they are supposed to be there.
>
> This should have worked.  I don't understand why the command was issued.
> If you feel up to a little kernel debugging, you can try to figure out
> the reason.  Here are the things you need to know.  Most of the files
> mentioned below are in the drivers/scsi/ directory of the kernel source.
>
[... lots of hints where to place printk statements ...]
Ok. I patched scsi_scan.c and scsi_ioctl.c, recompiled the modules and 
replaced scsi_mod.ko; modprobe scsi_mod; cat "bla" > /proc/scsi/device_info; 
plugged in.
----------------------------------
[...]
klaus scsi_get_device_flags: Vendor: >SRE<, Model: >OPTAC Tool      1.00<
klaus scsi_get_device_flags: devinfo->vendor: >SRE     OPTAC Tool      < (8), 
devinfo->model: >OPTAC Tool      < (16)
klaus scsi_probe_lun: bflags = 0
  Vendor: SRE       Model: OPTAC Tool        Rev: 1.00
  Type:   Direct-Access                      ANSI SCSI revision: 00
usb-storage: queuecommand called
[...]
---------------------------------
This is disappointing. I modified the else part of scsi_get_device_flags:
        else {
                        printk("klaus %s: Vendor: >%s<, Model: >%s<\n", 
__FUNCTION__, vendor, model);
                        printk("klaus %s: devinfo->vendor: >%s< (%u), 
devinfo->model: >%s< (%u)\n", __FUNCTION__, devinfo->vendor, 
sizeof(devinfo->vendor), devinfo->model, sizeof(devinfo->model));
                        if (!memcmp(devinfo->vendor, vendor,
                                     sizeof(devinfo->vendor)) &&
                             !memcmp(devinfo->model, model,
                                      sizeof(devinfo->model))) {
                                printk("klaus %s: devinfo->bflags=%x", 
__FUNCTION__, devinfo->flags);
                                return devinfo->flags;
                        }
                }

So it looks like the entries in /proc/scsi/devinfo are bad. GRRR. I'll patch
in the Vendor and Model into the static table and retry.

Hrmpf
-- 
Klaus Muth
HAGOS eG                      Industriestr. 62      fon: (+49) 711 78805-86
EDV-Programmierung            70565  Stuttgart      fax: (+49) 711 78805-35
http://www.hagos.de               Germany              mailto:[EMAIL PROTECTED]

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to