From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Date: Sun, 21 Jan 2001 05:42:50 +0000 Subject: Re: (Linus, please respond!) Re: Roadmap to restoring working MIME-Version: 1 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0702_01C08329.EFBFDC00" Message-Id: List-Id: References: In-Reply-To: To: linux-hotplug@vger.kernel.org This is a multi-part message in MIME format. ------=_NextPart_000_0702_01C08329.EFBFDC00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit The modutils patch I sent with my bugreport did exactly that. It's attached here, against depmod 2.4.0 ... should give the same "modules.usbmap" output depmod 2.4.1 does. Not expected to work on prerelease/test kernel modules. ----- Original Message ----- From: Miles Lane To: Keith Owens Cc: Linus Torvalds ; Sent: Saturday, January 20, 2001 9:24 PM Subject: Re: (Linus, please respond!) Re: Roadmap to restoring working usbmodule autoloading? > Keith Owens wrote: > > > > > Fine, until the next time any of the table formats have to be changed. > > The version number on the kernel tables that depmod reads are there for > > future changes, not just for the current usb mess. Without a version > > number we will have exactly the same problems on the next ABI change. > > > > Whether we should support the 2.4.0-test format for usb is a separate > > question and has nothing to do with whether depmod needs version > > numbers at all. My patch is to future proof the kernel/depmod interface. > > Is there a way to rework modutils and your patch so that hotplugging > can work without introducing the version numbers that Linus doesn't > want to introduce? Then, you and he could settle the version tracking > resolution later without holding up support for /sbin/hotplug. > > Thanks, > Miles > > _______________________________________________ > Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net > Linux-hotplug-devel@lists.sourceforge.net > http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel ------=_NextPart_000_0702_01C08329.EFBFDC00 Content-Type: application/octet-stream; name="depmod.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="depmod.patch" --- depmod-dist.c Thu Jan 4 19:18:18 2001=0A= +++ depmod.c Thu Jan 4 19:23:04 2001=0A= @@ -101,7 +101,7 @@=0A= } devs[ISAPNP_CARD_DEVS]; /* logical devices */=0A= };=0A= =0A= -/* Extracted from 2.4.0-test10-pre3 + David Brownell usb-device_id = patch 2 */=0A= +/* Extracted from 2.4.0 */=0A= #ifndef __u16=0A= #define __u16 u_int16_t=0A= #endif=0A= @@ -121,6 +121,11 @@=0A= * Init the fields you care about; zeroes are not used in comparisons.=0A= */=0A= struct usb_device_id {=0A= + /* This bitmask is used to determine which of the following fields=0A= + * are to be used for matching.=0A= + */=0A= + __u16 match_flags;=0A= +=0A= /*=0A= * vendor/product codes are checked, if vendor is nonzero=0A= * Range is for device revision (bcdDevice), inclusive;=0A= @@ -1075,7 +1080,7 @@=0A= }=0A= =0A= ptmod =3D modules;=0A= - fprintf(usbmap, "# usb module idVendor idProduct bcdDevice_lo = bcdDevice_hi"=0A= + fprintf(usbmap, "# usb module match_flags idVendor idProduct = bcdDevice_lo bcdDevice_hi"=0A= " bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass = bInterfaceSubClass"=0A= " bInterfaceProtocol driver_info\n");=0A= for (i =3D 0; i < n_modules; i++, ptmod++) {=0A= @@ -1084,10 +1089,11 @@=0A= if (!ptmod->n_usb_device)=0A= continue;=0A= for (j =3D 0; j < ptmod->n_usb_device; j++, usb_device++) {=0A= - fprintf(usbmap, "%-20s 0x%0*x 0x%0*x 0x%0*x 0x%0*x "=0A= + fprintf(usbmap, "%-20s 0x%0*x 0x%0*x 0x%0*x 0x%0*x 0x%0*x = "=0A= "0x%0*x 0x%0*x 0x%0*x 0x%0*x = 0x%0*x "=0A= "0x%0*x 0x%0*" tgt_long_fmt "x\n",=0A= shortname(ptmod->name),=0A= + 2*sizeof(usb_device->match_flags), usb_device->match_flags,=0A= 2*sizeof(usb_device->idVendor), usb_device->idVendor,=0A= 2*sizeof(usb_device->idProduct), usb_device->idProduct,=0A= 2*sizeof(usb_device->bcdDevice_lo), usb_device->bcdDevice_lo,=0A= ------=_NextPart_000_0702_01C08329.EFBFDC00-- _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel