<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>74073</bug_id>
          
          <creation_ts>2004-12-11 01:09 0000</creation_ts>
          <short_desc>slmodem 2.9.10-r1 causes kernel usb_endpoint_halted warning and prevents slusb module to load and slmodemd to start</short_desc>
          <delta_ts>2006-03-20 01:05:09 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>kilburna@iservnetworks.com</reporter>
          <assigned_to>net-dialup@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>kilburna@iservnetworks.com</who>
            <bug_when>2004-12-11 01:09:24 0000</bug_when>
            <thetext>I am using 2.6.9r9.  After I USE=&quot;usb&quot; emerge slmodem, I edit /etc/conf.d/slmodem , recompile kernel with USB modem, then I get WARNING:
/lib/modules/2.6.9-gentoo-r9/extra/slusb.ko needs unknown symbol usb_endpoint_halted

I load slusb in auto load modules and I get this usb_endpoint_halted error and the module wont load, causing slmodem not to start.

frog slmodem-2.9.10-r1 # fgrep -r usb_endpoint_halted .
./work/slmodem-2.9.10/drivers/st7554.c:     if (usb_endpoint_halted(s-&gt;usbdev, usb_pipeendpoint(pipe), usb_pipeout(pipe))) {   \
./work/slmodem-2.9.10/drivers/old_st7554.c:     if (usb_endpoint_halted(s-&gt;usbdev, usb_pipeendpoint(pipe), usb_pipeout(pipe))) {   \
Binary file ./work/slmodem-2.9.10/drivers/slusb.o matches
Binary file ./work/slmodem-2.9.10/drivers/st7554.o matches
Binary file ./work/slmodem-2.9.10/drivers/slusb.ko matches
Binary file ./image/lib/modules/2.6.9-gentoo-r9/extra/slusb.ko matches
frog slmodem-2.9.10-r1 # nm ./work/slmodem-2.9.10/drivers/slusb.ko |fgrep  usb_endpoint_halted
         U usb_endpoint_halted
frog slmodem-2.9.10-r1 # nm ./work/slmodem-2.9.10/drivers/st7554.o |fgrep  usb_endpoint_halted
         U usb_endpoint_halted
frog slmodem-2.9.10-r1 # fgrep -r usb_endpoint_halted  /usr/src/linux-2.6.9-gentoo-r9/
frog slmodem-2.9.10-r1 # fgrep -r usb_endpoint_halted  /usr/src/
.keep                    linux-2.4.26-gentoo-r11  linux-2.6.8-gentoo-r3    linux-2.6.9              linux-2.6.9-gentoo-r6
config-2004.0-2.6.1      linux-2.4.26-gentoo-r9   linux-2.6.8-gentoo-r7    linux-2.6.9-gentoo-r1    linux-2.6.9-gentoo-r9
linux                    linux-2.6.8-gentoo-r10   linux-2.6.8.1            linux-2.6.9-gentoo-r4

fgrep -r usb_endpoint_halted  /usr/src/
/usr/src/linux-2.4.26-gentoo-r9/include/linux/usb.h:#define usb_endpoint_halted(dev, ep, out) ((dev)-&gt;halted[out] &amp; (1 &lt;&lt; (ep)))
/usr/src/linux-2.6.8-gentoo-r7/include/linux/usb.h:#define usb_endpoint_halted(dev, ep, out) ((dev)-&gt;halted[out] &amp; (1 &lt;&lt; (ep)))
/usr/src/linux-2.6.8-gentoo-r3/include/linux/usb.h:#define usb_endpoint_halted(dev, ep, out) ((dev)-&gt;halted[out] &amp; (1 &lt;&lt; (ep)))
/usr/src/linux-2.6.8.1/include/linux/usb.h:#define usb_endpoint_halted(dev, ep, out) ((dev)-&gt;halted[out] &amp; (1 &lt;&lt; (ep)))
/usr/src/linux-2.6.8-gentoo-r10/include/linux/usb.h:#define usb_endpoint_halted(dev, ep, out) ((dev)-&gt;halted[out] &amp; (1 &lt;&lt; (ep)))
/usr/src/linux-2.4.26-gentoo-r11/include/linux/usb.h:#define usb_endpoint_halted(dev, ep, out) ((dev)-&gt;halted[out] &amp; (1 &lt;&lt; (ep)))

PS: usb_endpoint_halted no longer exists in 2.6.9 kernels.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>genstef@gentoo.org</who>
            <bug_when>2004-12-11 01:15:33 0000</bug_when>
            <thetext>Created an attachment (id=45723)
slmodem-fix-usb_endpoint_halted-symbol.patch

Can you please test this patch:

emerge -va slmodem
ctrl+z after source unpacked

cd /var/tmp/slmodem-2.6.10-r1/portage/work/slmodem-2.6.10
patch -p1 &lt; /home/usr/slmodem-fix-usb_endpoint_halted-symbol.patch
fg




Then let it compile and tell me if the error is still there, please.
If you have some more interest in this driver, you could also help us to
make/test a hotplug script, which is missing currently because I have only a
pci modem :)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kilburna@iservnetworks.com</who>
            <bug_when>2004-12-11 14:50:36 0000</bug_when>
            <thetext>patched st7554.c file with patch, compiled and it still get the kernel warning.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>genstef@gentoo.org</who>
            <bug_when>2004-12-11 15:12:22 0000</bug_when>
            <thetext>Strange, I am pretty sure that this patch fixes it for me. 
Do you have the same kernel in /usr/src/linux that you are running? 
Did you patch early enough? 
Can someone else please check this? 
Can you please provide your emerge info?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kilburna@iservnetworks.com</who>
            <bug_when>2004-12-11 19:17:43 0000</bug_when>
            <thetext>Sorry, or my previous post. The patch works fine on kernel 2.6.9r9 and slmodem 2.9.10.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>genstef@gentoo.org</who>
            <bug_when>2004-12-12 00:39:02 0000</bug_when>
            <thetext>Can you please provide the lsusb output, when your modem is plugged in?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>genstef@gentoo.org</who>
            <bug_when>2004-12-12 01:16:05 0000</bug_when>
            <thetext>---hotplug script start---
RC_NOCOLOR=&quot;yes&quot;
source /sbin/functions.sh
source /etc/conf.d/slmodem
if [ -z &quot;${USBMOD}&quot; ]
then MODULE=&quot;slusb&quot;
else MODULE=${USBMOD}
fi

source &quot;${svclib}/sh/rc-services.sh&quot;
start &amp;&amp; source &quot;${svclib}/sh/rc-services.sh&quot;
---end---
save this in /etc/hotplug/usb/slusb


---/etc/hotplug/usb/slusb.usermap
slusb 0x0003 0x(first ID) 0x(second ID) 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
---end---


This should start the init script with the right parameters without the need to configure anything. Please note that you should not have started slmodem when you plug in your modem.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>genstef@gentoo.org</who>
            <bug_when>2004-12-12 01:20:56 0000</bug_when>
            <thetext>Created an attachment (id=45808)
slusb

I better attach a working one here :). Please place in /etc/hotplug/usb and
make executable. You still need the usermap with your detected values.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>mrness@gentoo.org</who>
            <bug_when>2004-12-14 10:22:30 0000</bug_when>
            <thetext>merged in 2.9.10-r2</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>45723</attachid>
            <date>2004-12-11 01:15 0000</date>
            <desc>slmodem-fix-usb_endpoint_halted-symbol.patch</desc>
            <filename>slmodem-fix-usb_endpoint_halted-symbol.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">ZGlmZiAtdSBzbG1vZGVtLTIuOS4xMC5vcmlnL2RyaXZlcnMvc3Q3NTU0LmMgc2xtb2RlbS0yLjku
MTAvZHJpdmVycy9zdDc1NTQuYwotLS0gc2xtb2RlbS0yLjkuMTAub3JpZy9kcml2ZXJzL3N0NzU1
NC5jCTIwMDQtMTItMTAgMTQ6MjI6MDUuMDE3MDI1NDQ4ICswMTAwCisrKyBzbG1vZGVtLTIuOS4x
MC9kcml2ZXJzL3N0NzU1NC5jCTIwMDQtMTItMTAgMTQ6MjI6NDguNjc5Mzg3NzYwICswMTAwCkBA
IC0xMDgwLDExICsxMDgwLDE0IEBACiAKICNkZWZpbmUgU0VUX1JFRyhzLHJlZyx2YWwpIHsgcmV0
ID0gcy0+c2V0X3JlZyhzLHJlZyx2YWwpOyBpZiAocmV0IDwgMCkgeyBVU0JfRVJSKCJzdDc1NTQ6
IGZhaWxlZCB0byBzZXQgcmVnICV4LlxuIiwgcmVnKTsgOyByZXR1cm4gcmV0O30gfQogCisjaWYg
KExJTlVYX1ZFUlNJT05fQ09ERSA+IEtFUk5FTF9WRVJTSU9OKDIsNiw4KSkKKyNkZWZpbmUgQ0xF
QVJfRU5EUE9JTlQocyxwaXBlKQorI2Vsc2UKICNkZWZpbmUgQ0xFQVJfRU5EUE9JTlQocyxwaXBl
KSB7IFwKICAgICAgaWYgKHVzYl9lbmRwb2ludF9oYWx0ZWQocy0+dXNiZGV2LCB1c2JfcGlwZWVu
ZHBvaW50KHBpcGUpLCB1c2JfcGlwZW91dChwaXBlKSkpIHsgICBcCiAgICAgICAgVVNCX0RCRygi
c3Q3NTU0X2luaXQ6IHBpcGUgJWQgaXMgaGFsdGVkLiBjbGVhci4uLlxuIiwgdXNiX3BpcGVlbmRw
b2ludChwaXBlKSk7ICBcCiAgICAgICAgaWYgKCEocmV0PXVzYl9jbGVhcl9oYWx0KHMtPnVzYmRl
diwgcGlwZSkpKSByZXR1cm4gcmV0O319Ci0KKyNlbmRpZgogCiAKIHN0YXRpYyBpbnQgc3Q3NTU0
X2luaXQgIChzdHJ1Y3Qgc3Q3NTU0X3N0YXRlICpzKQo=
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>45808</attachid>
            <date>2004-12-12 01:20 0000</date>
            <desc>slusb</desc>
            <filename>slusb</filename>
            <type>text/plain</type>
            <data encoding="base64">IyEvYmluL3NoCiMgL2V0Yy9ob3RwbHVnL3VzYi9zbHVzYiA9PT4gc3RhcnQgU21hcnRsaW5rIFVT
QiBNb2RlbSBEYWVtb24KIwojIFBsYWNlIHRoaXMgZmlsZSBpbiAvZXRjL2hvdHBsdWcvdXNiIGFu
ZCBtYWtlIHN1cmUgaXQgaXMgZXhlY3V0YWJsZSwKIyBieSAnY2htb2QgK3ggL2V0Yy9ob3RwbHVn
L3VzYi9zbHVzYicKIwpSQ19OT0NPTE9SPSJ5ZXMiCnNvdXJjZSAvc2Jpbi9mdW5jdGlvbnMuc2gK
c291cmNlIC9ldGMvY29uZi5kL3NsbW9kZW0KaWYgWyAteiAiJHtVU0JNT0R9IiBdCnRoZW4gTU9E
VUxFPSJzbHVzYiIKZWxzZSBNT0RVTEU9JHtVU0JNT0R9CmZpCnNvdXJjZSAvZXRjL2luaXQuZC9z
bG1vZGVtCnNvdXJjZSAiJHtzdmNsaWJ9L3NoL3JjLXNlcnZpY2VzLnNoIgpzdGFydCAmJiBzb3Vy
Y2UgIiR7c3ZjbGlifS9zaC9yYy1zZXJ2aWNlcy5zaCIK
</data>        

          </attachment>
    </bug>

</bugzilla>