* [PATCH] 2.4.22 precedes 0.9.9 in module-init-tools of course
@ 2003-09-04 19:05 Pat LaVarre
0 siblings, 0 replies; 2+ messages in thread
From: Pat LaVarre @ 2003-09-04 19:05 UTC (permalink / raw)
To: linux-kernel
> From: linux-2.6.0-test4/Documentation/Changes
> o module-init-tools 0.9.9 # depmod -V
Newbie me, I was slow to imagine that depmod -V could be helpfully
reporting two independent series of version numbers, the older prefaced
with "depmod version ", the newer prefaced with "module-init-tools ".
I wrongly thought that 2.4.22 was 0.9.9 or better, even when I saw the
modprobe complaint:
QM_MODULES: Function not implemented
Therefore I propose the following patch.
Pat LaVarre
--- linux-2.6.0-test4/Documentation/Changes 2003-08-22 18:00:12.000000000 -0600
+++ linux/Documentation/Changes 2003-09-03 15:18:30.691529216 -0600
@@ -65,6 +65,9 @@
o procps 2.0.9 # ps --version
o oprofile 0.5.3 # oprofiled --version
+Also upgrade your module-init-tools if your depmod -V gives you a
+"depmod version" rather than a "module-init-tools" version.
+
Kernel compilation
==================
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [linux-usb-devel] [2.6-test] Bug in usb-storage or scsi?
@ 2003-09-11 20:05 Alan Stern
2003-09-11 20:42 ` Pat LaVarre
0 siblings, 1 reply; 2+ messages in thread
From: Alan Stern @ 2003-09-11 20:05 UTC (permalink / raw)
To: Patrick Mansfield; +Cc: Matthew Dharm, USB Storage List, SCSI development list
On Wed, 10 Sep 2003, Patrick Mansfield wrote:
> On Wed, Sep 10, 2003 at 12:23:43PM -0400, Alan Stern wrote:
>
> > Is there any feeling about how to handle these ongoing problems with the
> > mode-sense cache page? There doesn't seem to be any general solution that
> > can work with all USB storage devices. Some hang when asked to read the
> > entire page; some hang when asked to read just part of the page; some hang
> > when asked to read just the page header.
> >
> > What do the SCSI folk have to say about it?
> I don't like per-host (or transport) flags or filters that cannot be
> modified. They make some sense for hosts that process the scsi commands
> (like a RAID card). If you moved a device from one transport to another,
> the commands sent to the device should not change: for example, you move
> an iSCSI attached device onto your local system via SPI.
>
> IMO we ought to go with two new BFLAGS, one to block the MODE SENSE page 8
> (for the cache), and one to block the MODE SENSE page 0x3f (to check the
> write protect).
>
> A per host bflags could be added, and overwritten by per device (devinfo)
> settings. I'd rather we black list the broken ones but that does not
> appear to be practical. usb-storage could then set the per-host bflag to
> include the two new flags.
What do people think of just having per-device flags that the host driver
could set during the slave_configure() callback? The point of these flags
is not to prevent bad commands from being sent to the device --
user-generated commands sent via sg should always be allowed. Rather, the
point is to prevent sd.c from generating these commands in the first
place. (Apparently the commands don't present a problem for sr.c.)
So for example, usb-storage could set the BFLAG to block MODE-SENSE page 8
for any disk-type device. This isn't a perfect solution; consider an
iSCSI-attached device that is actually a usb-storage disk on some server.
Nevertheless, this might take care of the majority of the problems we see.
(I haven't seen any MODE-SENSE page 0x3f problems, but others have.)
Alan Stern
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [linux-usb-devel] [2.6-test] Bug in usb-storage or scsi?
2003-09-11 20:05 [linux-usb-devel] [2.6-test] Bug in usb-storage or scsi? Alan Stern
@ 2003-09-11 20:42 ` Pat LaVarre
2003-09-11 23:18 ` [PATCH] 2.4.22 precedes 0.9.9 in module-init-tools of course Pat LaVarre
0 siblings, 1 reply; 2+ messages in thread
From: Pat LaVarre @ 2003-09-11 20:42 UTC (permalink / raw)
To: stern; +Cc: patmans, mdharm-usb, usb-storage, linux-scsi
> From: Matthew Dharm <mdharm-scsi () one-eyed-alien ! net>
>
> I think allowing write to read-only media is
> the only way to go. I don't see another way
> to get write-protect status.
Does write-protect work for dvd-ram?
How?
> From: Alan Stern <stern@rowland.harvard.edu>
> ...
> (Apparently the commands don't present a
> problem for sr.c.)
sr.c shows this problem by getting the wrong answer.
sr.c is getting cd->device->writeable wrong for all the seven-or-so mmc
writable profiles except dvd-ram.
Some background from me and patches from Andy Polyakov and Jens Axboe
appear in:
Subject: Re: [PATCH] mount -w of dvd+rw etc. in vanilla 2.6
http://marc.theaimsgroup.com/?t=106123318400007
> From: Matthew Dharm <mdharm-scsi () one-eyed-alien ! net>
> ... I'm going to have some code that will not
> apply the filters (any filters) if the request
> comes from sg,
More old good sense!
Following are relevant posts from me that some archives before now have
not included in this thread.
Pat LaVarre
---
Subject: Re: PATCH: exclude certain commands from emulated SCSI hosts
Date: 2003-04-23 14:45:31 PST
From: Pat LaVarre (ppaatt@aol.com)
> http://groups.google.com/groups?group=mlist.linux.scsi
> Subject: Re: PATCH: exclude certain commands from emulated SCSI hosts
>
> > From: Patrick Mansfield (patmans@us.ibm.com)
> > Date: 2003-04-07 15:42:13 PST
> >
> > Would a user ever want to send a MODE SENSE
> > to USB storage device?)
>
> From: Matthew Dharm (mdharm-scsi@one-eyed-alien.net)
> Date: 2003-04-21 17:04:05 PST
>
> a very large number of USB devices of TYPE DISK do
> not support MODE SENSE in any form. Apparently,
> the 'popular' OSes don't use it.
I have some reason to believe Windows often passes thru something like:
-x "1A 00 08 00 18 00" -i x18
i.e. a ModeSense6 of Cacheing page x08 for the whole 4 byte header plus
one whole 8 byte block descriptor plus the whole xC byte standard page.
But I haven't studied this closely enough to know if that's precisely
correct, nor do I know when it gets translated to op x5A ModeSense10,
nor do I know when it is faked out in the host entirely, never reaching
the bus.
> From: Alan Stern (stern@rowland.harvard.edu)
> Date: 2003-04-22 11:21:36 PST ...
>
> a comment in drivers/storage/usb/protocol.c
> indicating that 8 is the minimum size for a
> MODE-SENSE (line 257).
Perhaps we mean:
http://lxr.linux.no/source/drivers/usb/storage/protocol.c?v=2.5.56#L274
/* again, for MODE_SENSE_10, we get the minimum (8) */
I don't know of any merely public standard that admits 8 (i.e. the whole
standard header) is a minimum.
I do know Win 2K kernel dies if a root-privileged app is so rude as to
express an x5A ModeSense10 ModeSense for less than 8 as op x1A
ModeSense6:
http://support.microsoft.com/?kbid=813908
SCSI Pass-Through Mode Sense Command May Crash the Computer
> > From: Matthew Dharm (mdharm-scsi@one-eyed-alien.net)
> > Date: 2003-04-05 11:40:24 PST
> >
> > (1) can't filter TEST UNIT READY (opcode 0).
> > Not a big deal, but a theoretical problem.
> >
> From: James Bottomley (James.Bottomley@steeleye.com)
> Date: 2003-04-05 12:00:18 PST
>
> TUR has been mandatory since SCSI-1, ...
A zeroed six byte CDB has been mandatory. Other forms of TUR are less
widely supported.
...
-----Forwarded Message-----
From: p.lavarre@ieee.org
To: patmans@us.ibm.com
Cc: stern@rowland.harvard.edu, mdharm-usb@one-eyed-alien.net,
usb-storage@one-eyed-alien.net, linux-scsi@vger.kernel.org
Subject: Re: [usb-storage] Re: [linux-usb-devel] [2.6-test] Bug in
usb-storage or scsi?
Date: 11 Sep 2003 14:04:54 -0600
> http://marc.theaimsgroup.com/?t=104839042700001&r=1&w=2
Thanks, there I find 44 posts dated since 2003-03 with Subject's like:
"PATCH: exclude certain commands from emulated SCSI hosts".
By the way, Google yields [an interestingly] different set of 44 posts:
http://groups.google.com/groups?threadm=linux.scsi.20030322193705.C17056%40one-eyed-alien.net
In both archives I think I see much sense:
> > From: Matthew Dharm <mdharm-usb () one-eyed-alien ! net> ...
> >
> > (a) don't ask for EVPD data, ...
> > (b) assume ... only 36-bytes of INQUIRY data, ...
> > (c) ... assume write-enabled for all disk-like media.
>
> From: Linus Torvalds <torvalds () transmeta ! com>
>
> suggest ... make the Linux SCSI layer
> ... use the sequences of commands that "that other OS" uses ...
> "don't use commands that haven't gotten much testing" ...
...
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] 2.4.22 precedes 0.9.9 in module-init-tools of course
2003-09-11 20:42 ` Pat LaVarre
@ 2003-09-11 23:18 ` Pat LaVarre
0 siblings, 0 replies; 2+ messages in thread
From: Pat LaVarre @ 2003-09-11 23:18 UTC (permalink / raw)
To: linux-kernel
I think newbies still need a more emphatic hint, such as:
--- linux-2.6.0-test5/Documentation/Changes 2003-09-08 13:50:28.000000000 -0600
+++ linux/Documentation/Changes 2003-09-11 16:09:12.155352016 -0600
@@ -42,6 +42,9 @@
encountered a bug! If you're unsure what version you're currently
running, the suggested command should tell you.
+Except also upgrade your module-init-tools if your depmod -V gives
+you a "depmod version" rather than a "module-init-tools" version.
+
Again, keep in mind that this list assumes you are already
functionally running a Linux 2.4 kernel. Also, not all tools are
necessary on all systems; obviously, if you don't have any PCMCIA (PC
Sure, 2.6.0-test5 helps some with:
$ cp /etc/redhat-release /dev/null
$ time sudo make install modules_install
...
Warning: you may need to install module-init-tools
See http://www.codemonkey.org.uk/post-halloween-2.5.txt
...
But I believe that hint is insufficient, because I know back when I was
mystified, that url was unreachable.
I admit Google did eventually direct me to the seemingly more available
alternate:
http://www.kernel.org/pub/linux/kernel/people/davej/misc/post-halloween-2.5.txt
Pat LaVarre
P.S. A fresh, but more complete, quote of what once mystified me is:
$ uname -r
2.4.20-6smp
$ /sbin/depmod -V
depmod version 2.4.22
depmod: Can't open /lib/modules/2.4.20-6smp/modules.dep for writing
$ sudo /sbin/depmod -V
depmod version 2.4.22
$
...
$ uname -r
2.6.0-test5
$ sudo /sbin/modprobe sr_mod
modprobe: QM_MODULES: Function not implemented
modprobe: QM_MODULES: Function not implemented
modprobe: Can't locate module sr_mod
$
Since being demystified, I've adopted a procedure I discovered only by
combining in order from module-init-tools all of man depmod, May
./README, Feb ./FAQ, Nov ./INSTALL:
cp /sbin/lsmod /dev/null
./configure --prefix=/
make
./depmod -V
sudo make moveold
sudo make install
sudo ./generate-modprobe.conf /etc/modprobe.conf
sudo vi /etc/rc.d/rc.sysinit +/USEMODULES=
I see I should also submit a patch elsewhere for the module-init-tools
README and FAQ. I believe the INSTALL is incorrect by design (by being
generic).
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-09-11 23:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-04 19:05 [PATCH] 2.4.22 precedes 0.9.9 in module-init-tools of course Pat LaVarre
-- strict thread matches above, loose matches on Subject: below --
2003-09-11 20:05 [linux-usb-devel] [2.6-test] Bug in usb-storage or scsi? Alan Stern
2003-09-11 20:42 ` Pat LaVarre
2003-09-11 23:18 ` [PATCH] 2.4.22 precedes 0.9.9 in module-init-tools of course Pat LaVarre
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.