Umm... I've been working with Eric Youngdale of the linux-scsi list on
this issue. Unfortunately, it's a bit more complicated than this patch
alone -- I've actually tested something like this and had it explode on me
when doing various things. The problem is that the scsi layer doesn't
check to see if the module pointer is NULL before trying to adjust the
reference count.
Eric has been working on a patch to make this work. Last I heard, he was
still working on it along with some other cleanups. Eric -- can you give
us an update on the status of that work?
Matt Dharm
On Thu, 23 Mar 2000, Pavel Machek wrote:
> Hi!
>
> > (o) Fixes an over-agressive sanity check that affects ORB drives and
> > someone's CD-ROM drive.
> > (o) Frees _most_ resources when driver is rmmod'ed. About 16 bytes/device
> > still remain. This is being worked on.
> > (o) Allows the driver to be insmod'ed and rmmod'ed repeatedly. This works
> > with OHCI, and Georg Acher has a patch for usb-uhci to fix this bug. A
> > patch for uhci.o is also needed. Georg should be submitting his patch
> > soon. I do not know when a patch from JE is coming.
> > (o) Adds my name to the maintainers file
>
> This patch is relative to ^^^^.
>
> It adds ability to compile usg-storage into kernel. If it looks
> reasonable, apply it!
> Pavel
> --- clean/drivers/usb/Config.in Thu Mar 23 22:33:35 2000
> +++ linux/drivers/usb/Config.in Thu Mar 23 21:30:04 2000
> @@ -43,7 +43,7 @@
> dep_tristate ' USB OV511 Camera support' CONFIG_USB_OV511 $CONFIG_USB
> dep_tristate ' USB Kodak DC-2xx Camera support' CONFIG_USB_DC2XX $CONFIG_USB
> if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
> - dep_tristate ' USB Mass Storage support (EXPERIMENTAL)' CONFIG_USB_STORAGE
>$CONFIG_USB m
> + dep_tristate ' USB Mass Storage support (EXPERIMENTAL)' CONFIG_USB_STORAGE
>$CONFIG_USB
> if [ "$CONFIG_USB_STORAGE" != "n" ]; then
> bool ' USB Mass Storage verbose debug' CONFIG_USB_STORAGE_DEBUG
> fi
> --- clean/drivers/scsi/scsi.c Sat Mar 18 22:28:05 2000
> +++ linux/drivers/scsi/scsi.c Thu Mar 23 22:28:36 2000
> @@ -1893,7 +1893,8 @@
> }
> #endif
>
> -#ifdef CONFIG_MODULES /* a big #ifdef block... */
> +#if defined(CONFIG_MODULES) || defined(CONFIG_USB_STORAGE) /* a big #ifdef
>block... */
> +/* FIXME: We should probably kill hosts.c and move everything to dynamic allocation
>*/
>
> /*
> * This entry point should be called by a loadable module if it is trying
> --- linux/drivers/usb/usb-storage.c.ofic Thu Mar 23 21:37:22 2000
> +++ linux/drivers/usb/usb-storage.c Thu Mar 23 22:32:10 2000
> @@ -1795,7 +1795,12 @@
> down(&(ss->notify));
>
> /* now register - our detect function will be called */
> - ss->htmplt.module = &__this_module;
> + ss->htmplt.module =
> +#ifdef MODULE
> + &__this_module;
> +#else
> + NULL;
> +#endif
> scsi_register_module(MODULE_SCSI_HA, &(ss->htmplt));
>
> /* put us in the list */
>
>
>
--
Matthew Dharm Home: [EMAIL PROTECTED]
Engineer, Qualcomm, Inc. Work: [EMAIL PROTECTED]
S: Another stupid question?
G: There's no such thing as a stupid question, only stupid people.
-- Stef and Greg
User Friendly, 7/15/1998
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]