1*4882a593Smuzhiyun.. SPDX-License-Identifier: GPL-2.0 2*4882a593Smuzhiyun 3*4882a593Smuzhiyun=================== 4*4882a593SmuzhiyunSB100 device driver 5*4882a593Smuzhiyun=================== 6*4882a593Smuzhiyun 7*4882a593Smuzhiyunsb1000 is a module network device driver for the General Instrument (also known 8*4882a593Smuzhiyunas NextLevel) SURFboard1000 internal cable modem board. This is an ISA card 9*4882a593Smuzhiyunwhich is used by a number of cable TV companies to provide cable modem access. 10*4882a593SmuzhiyunIt's a one-way downstream-only cable modem, meaning that your upstream net link 11*4882a593Smuzhiyunis provided by your regular phone modem. 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunThis driver was written by Franco Venturi <fventuri@mediaone.net>. He deserves 14*4882a593Smuzhiyuna great deal of thanks for this wonderful piece of code! 15*4882a593Smuzhiyun 16*4882a593SmuzhiyunNeeded tools 17*4882a593Smuzhiyun============ 18*4882a593Smuzhiyun 19*4882a593SmuzhiyunSupport for this device is now a part of the standard Linux kernel. The 20*4882a593Smuzhiyundriver source code file is drivers/net/sb1000.c. In addition to this 21*4882a593Smuzhiyunyou will need: 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun1. The "cmconfig" program. This is a utility which supplements "ifconfig" 24*4882a593Smuzhiyun to configure the cable modem and network interface (usually called "cm0"); 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun2. Several PPP scripts which live in /etc/ppp to make connecting via your 27*4882a593Smuzhiyun cable modem easy. 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun These utilities can be obtained from: 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun http://www.jacksonville.net/~fventuri/ 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun in Franco's original source code distribution .tar.gz file. Support for 34*4882a593Smuzhiyun the sb1000 driver can be found at: 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun - http://web.archive.org/web/%2E/http://home.adelphia.net/~siglercm/sb1000.html 37*4882a593Smuzhiyun - http://web.archive.org/web/%2E/http://linuxpower.cx/~cable/ 38*4882a593Smuzhiyun 39*4882a593Smuzhiyun along with these utilities. 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun3. The standard isapnp tools. These are necessary to configure your SB1000 42*4882a593Smuzhiyun card at boot time (or afterwards by hand) since it's a PnP card. 43*4882a593Smuzhiyun 44*4882a593Smuzhiyun If you don't have these installed as a standard part of your Linux 45*4882a593Smuzhiyun distribution, you can find them at: 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun http://www.roestock.demon.co.uk/isapnptools/ 48*4882a593Smuzhiyun 49*4882a593Smuzhiyun or check your Linux distribution binary CD or their web site. For help with 50*4882a593Smuzhiyun isapnp, pnpdump, or /etc/isapnp.conf, go to: 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun http://www.roestock.demon.co.uk/isapnptools/isapnpfaq.html 53*4882a593Smuzhiyun 54*4882a593SmuzhiyunUsing the driver 55*4882a593Smuzhiyun================ 56*4882a593Smuzhiyun 57*4882a593SmuzhiyunTo make the SB1000 card work, follow these steps: 58*4882a593Smuzhiyun 59*4882a593Smuzhiyun1. Run ``make config``, or ``make menuconfig``, or ``make xconfig``, whichever 60*4882a593Smuzhiyun you prefer, in the top kernel tree directory to set up your kernel 61*4882a593Smuzhiyun configuration. Make sure to say "Y" to "Prompt for development drivers" 62*4882a593Smuzhiyun and to say "M" to the sb1000 driver. Also say "Y" or "M" to all the standard 63*4882a593Smuzhiyun networking questions to get TCP/IP and PPP networking support. 64*4882a593Smuzhiyun 65*4882a593Smuzhiyun2. **BEFORE** you build the kernel, edit drivers/net/sb1000.c. Make sure 66*4882a593Smuzhiyun to redefine the value of READ_DATA_PORT to match the I/O address used 67*4882a593Smuzhiyun by isapnp to access your PnP cards. This is the value of READPORT in 68*4882a593Smuzhiyun /etc/isapnp.conf or given by the output of pnpdump. 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun3. Build and install the kernel and modules as usual. 71*4882a593Smuzhiyun 72*4882a593Smuzhiyun4. Boot your new kernel following the usual procedures. 73*4882a593Smuzhiyun 74*4882a593Smuzhiyun5. Set up to configure the new SB1000 PnP card by capturing the output 75*4882a593Smuzhiyun of "pnpdump" to a file and editing this file to set the correct I/O ports, 76*4882a593Smuzhiyun IRQ, and DMA settings for all your PnP cards. Make sure none of the settings 77*4882a593Smuzhiyun conflict with one another. Then test this configuration by running the 78*4882a593Smuzhiyun "isapnp" command with your new config file as the input. Check for 79*4882a593Smuzhiyun errors and fix as necessary. (As an aside, I use I/O ports 0x110 and 80*4882a593Smuzhiyun 0x310 and IRQ 11 for my SB1000 card and these work well for me. YMMV.) 81*4882a593Smuzhiyun Then save the finished config file as /etc/isapnp.conf for proper 82*4882a593Smuzhiyun configuration on subsequent reboots. 83*4882a593Smuzhiyun 84*4882a593Smuzhiyun6. Download the original file sb1000-1.1.2.tar.gz from Franco's site or one of 85*4882a593Smuzhiyun the others referenced above. As root, unpack it into a temporary directory 86*4882a593Smuzhiyun and do a ``make cmconfig`` and then ``install -c cmconfig /usr/local/sbin``. 87*4882a593Smuzhiyun Don't do ``make install`` because it expects to find all the utilities built 88*4882a593Smuzhiyun and ready for installation, not just cmconfig. 89*4882a593Smuzhiyun 90*4882a593Smuzhiyun7. As root, copy all the files under the ppp/ subdirectory in Franco's 91*4882a593Smuzhiyun tar file into /etc/ppp, being careful not to overwrite any files that are 92*4882a593Smuzhiyun already in there. Then modify ppp@gi-on to set the correct login name, 93*4882a593Smuzhiyun phone number, and frequency for the cable modem. Also edit pap-secrets 94*4882a593Smuzhiyun to specify your login name and password and any site-specific information 95*4882a593Smuzhiyun you need. 96*4882a593Smuzhiyun 97*4882a593Smuzhiyun8. Be sure to modify /etc/ppp/firewall to use ipchains instead of 98*4882a593Smuzhiyun the older ipfwadm commands from the 2.0.x kernels. There's a neat utility to 99*4882a593Smuzhiyun convert ipfwadm commands to ipchains commands: 100*4882a593Smuzhiyun 101*4882a593Smuzhiyun http://users.dhp.com/~whisper/ipfwadm2ipchains/ 102*4882a593Smuzhiyun 103*4882a593Smuzhiyun You may also wish to modify the firewall script to implement a different 104*4882a593Smuzhiyun firewalling scheme. 105*4882a593Smuzhiyun 106*4882a593Smuzhiyun9. Start the PPP connection via the script /etc/ppp/ppp@gi-on. You must be 107*4882a593Smuzhiyun root to do this. It's better to use a utility like sudo to execute 108*4882a593Smuzhiyun frequently used commands like this with root permissions if possible. If you 109*4882a593Smuzhiyun connect successfully the cable modem interface will come up and you'll see a 110*4882a593Smuzhiyun driver message like this at the console:: 111*4882a593Smuzhiyun 112*4882a593Smuzhiyun cm0: sb1000 at (0x110,0x310), csn 1, S/N 0x2a0d16d8, IRQ 11. 113*4882a593Smuzhiyun sb1000.c:v1.1.2 6/01/98 (fventuri@mediaone.net) 114*4882a593Smuzhiyun 115*4882a593Smuzhiyun The "ifconfig" command should show two new interfaces, ppp0 and cm0. 116*4882a593Smuzhiyun 117*4882a593Smuzhiyun The command "cmconfig cm0" will give you information about the cable modem 118*4882a593Smuzhiyun interface. 119*4882a593Smuzhiyun 120*4882a593Smuzhiyun10. Try pinging a site via ``ping -c 5 www.yahoo.com``, for example. You should 121*4882a593Smuzhiyun see packets received. 122*4882a593Smuzhiyun 123*4882a593Smuzhiyun11. If you can't get site names (like www.yahoo.com) to resolve into 124*4882a593Smuzhiyun IP addresses (like 204.71.200.67), be sure your /etc/resolv.conf file 125*4882a593Smuzhiyun has no syntax errors and has the right nameserver IP addresses in it. 126*4882a593Smuzhiyun If this doesn't help, try something like ``ping -c 5 204.71.200.67`` to 127*4882a593Smuzhiyun see if the networking is running but the DNS resolution is where the 128*4882a593Smuzhiyun problem lies. 129*4882a593Smuzhiyun 130*4882a593Smuzhiyun12. If you still have problems, go to the support web sites mentioned above 131*4882a593Smuzhiyun and read the information and documentation there. 132*4882a593Smuzhiyun 133*4882a593SmuzhiyunCommon problems 134*4882a593Smuzhiyun=============== 135*4882a593Smuzhiyun 136*4882a593Smuzhiyun1. Packets go out on the ppp0 interface but don't come back on the cm0 137*4882a593Smuzhiyun interface. It looks like I'm connected but I can't even ping any 138*4882a593Smuzhiyun numerical IP addresses. (This happens predominantly on Debian systems due 139*4882a593Smuzhiyun to a default boot-time configuration script.) 140*4882a593Smuzhiyun 141*4882a593SmuzhiyunSolution 142*4882a593Smuzhiyun As root ``echo 0 > /proc/sys/net/ipv4/conf/cm0/rp_filter`` so it 143*4882a593Smuzhiyun can share the same IP address as the ppp0 interface. Note that this 144*4882a593Smuzhiyun command should probably be added to the /etc/ppp/cablemodem script 145*4882a593Smuzhiyun *right*between* the "/sbin/ifconfig" and "/sbin/cmconfig" commands. 146*4882a593Smuzhiyun You may need to do this to /proc/sys/net/ipv4/conf/ppp0/rp_filter as well. 147*4882a593Smuzhiyun If you do this to /proc/sys/net/ipv4/conf/default/rp_filter on each reboot 148*4882a593Smuzhiyun (in rc.local or some such) then any interfaces can share the same IP 149*4882a593Smuzhiyun addresses. 150*4882a593Smuzhiyun 151*4882a593Smuzhiyun2. I get "unresolved symbol" error messages on executing ``insmod sb1000.o``. 152*4882a593Smuzhiyun 153*4882a593SmuzhiyunSolution 154*4882a593Smuzhiyun You probably have a non-matching kernel source tree and 155*4882a593Smuzhiyun /usr/include/linux and /usr/include/asm header files. Make sure you 156*4882a593Smuzhiyun install the correct versions of the header files in these two directories. 157*4882a593Smuzhiyun Then rebuild and reinstall the kernel. 158*4882a593Smuzhiyun 159*4882a593Smuzhiyun3. When isapnp runs it reports an error, and my SB1000 card isn't working. 160*4882a593Smuzhiyun 161*4882a593SmuzhiyunSolution 162*4882a593Smuzhiyun There's a problem with later versions of isapnp using the "(CHECK)" 163*4882a593Smuzhiyun option in the lines that allocate the two I/O addresses for the SB1000 card. 164*4882a593Smuzhiyun This first popped up on RH 6.0. Delete "(CHECK)" for the SB1000 I/O addresses. 165*4882a593Smuzhiyun Make sure they don't conflict with any other pieces of hardware first! Then 166*4882a593Smuzhiyun rerun isapnp and go from there. 167*4882a593Smuzhiyun 168*4882a593Smuzhiyun4. I can't execute the /etc/ppp/ppp@gi-on file. 169*4882a593Smuzhiyun 170*4882a593SmuzhiyunSolution 171*4882a593Smuzhiyun As root do ``chmod ug+x /etc/ppp/ppp@gi-on``. 172*4882a593Smuzhiyun 173*4882a593Smuzhiyun5. The firewall script isn't working (with 2.2.x and higher kernels). 174*4882a593Smuzhiyun 175*4882a593SmuzhiyunSolution 176*4882a593Smuzhiyun Use the ipfwadm2ipchains script referenced above to convert the 177*4882a593Smuzhiyun /etc/ppp/firewall script from the deprecated ipfwadm commands to ipchains. 178*4882a593Smuzhiyun 179*4882a593Smuzhiyun6. I'm getting *tons* of firewall deny messages in the /var/kern.log, 180*4882a593Smuzhiyun /var/messages, and/or /var/syslog files, and they're filling up my /var 181*4882a593Smuzhiyun partition!!! 182*4882a593Smuzhiyun 183*4882a593SmuzhiyunSolution 184*4882a593Smuzhiyun First, tell your ISP that you're receiving DoS (Denial of Service) 185*4882a593Smuzhiyun and/or portscanning (UDP connection attempts) attacks! Look over the deny 186*4882a593Smuzhiyun messages to figure out what the attack is and where it's coming from. Next, 187*4882a593Smuzhiyun edit /etc/ppp/cablemodem and make sure the ",nobroadcast" option is turned on 188*4882a593Smuzhiyun to the "cmconfig" command (uncomment that line). If you're not receiving these 189*4882a593Smuzhiyun denied packets on your broadcast interface (IP address xxx.yyy.zzz.255 190*4882a593Smuzhiyun typically), then someone is attacking your machine in particular. Be careful 191*4882a593Smuzhiyun out there.... 192*4882a593Smuzhiyun 193*4882a593Smuzhiyun7. Everything seems to work fine but my computer locks up after a while 194*4882a593Smuzhiyun (and typically during a lengthy download through the cable modem)! 195*4882a593Smuzhiyun 196*4882a593SmuzhiyunSolution 197*4882a593Smuzhiyun You may need to add a short delay in the driver to 'slow down' the 198*4882a593Smuzhiyun SURFboard because your PC might not be able to keep up with the transfer rate 199*4882a593Smuzhiyun of the SB1000. To do this, it's probably best to download Franco's 200*4882a593Smuzhiyun sb1000-1.1.2.tar.gz archive and build and install sb1000.o manually. You'll 201*4882a593Smuzhiyun want to edit the 'Makefile' and look for the 'SB1000_DELAY' 202*4882a593Smuzhiyun define. Uncomment those 'CFLAGS' lines (and comment out the default ones) 203*4882a593Smuzhiyun and try setting the delay to something like 60 microseconds with: 204*4882a593Smuzhiyun '-DSB1000_DELAY=60'. Then do ``make`` and as root ``make install`` and try 205*4882a593Smuzhiyun it out. If it still doesn't work or you like playing with the driver, you may 206*4882a593Smuzhiyun try other numbers. Remember though that the higher the delay, the slower the 207*4882a593Smuzhiyun driver (which slows down the rest of the PC too when it is actively 208*4882a593Smuzhiyun used). Thanks to Ed Daiga for this tip! 209*4882a593Smuzhiyun 210*4882a593SmuzhiyunCredits 211*4882a593Smuzhiyun======= 212*4882a593Smuzhiyun 213*4882a593SmuzhiyunThis README came from Franco Venturi's original README file which is 214*4882a593Smuzhiyunstill supplied with his driver .tar.gz archive. I and all other sb1000 users 215*4882a593Smuzhiyunowe Franco a tremendous "Thank you!" Additional thanks goes to Carl Patten 216*4882a593Smuzhiyunand Ralph Bonnell who are now managing the Linux SB1000 web site, and to 217*4882a593Smuzhiyunthe SB1000 users who reported and helped debug the common problems listed 218*4882a593Smuzhiyunabove. 219*4882a593Smuzhiyun 220*4882a593Smuzhiyun 221*4882a593Smuzhiyun Clemmitt Sigler 222*4882a593Smuzhiyun csigler@vt.edu 223