Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 74586 - patch for ipw2200 version 0.18 for amd64
Summary: patch for ipw2200 version 0.18 for amd64
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
: 75848 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-12-15 20:20 UTC by Jason Sievert
Modified: 2005-01-17 09:30 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ipw2200 amd64 patch (patch,1.84 KB, patch)
2004-12-15 21:18 UTC, Jason Sievert
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Sievert 2004-12-15 20:20:57 UTC
Be gentel this is my first.

I have taken a patch that I have found for getting version 0.6 to work on amd64 and have modified it to work with the latest version 0.18.  I have been using this patch starting 0.12 and it works great.  0.18 does require the new firmware that was introduced in 0.17.

diff -u ipw2200-0.18/ipw2200.c ipw2200-0.18-amd64/ipw2200.c
--- ipw2200-0.18/ipw2200.c      2004-12-14 11:40:41.000000000 -0600
+++ ipw2200-0.18-amd64/ipw2200.c        2004-12-15 22:09:13.401939832 -0600
@@ -210,7 +210,7 @@
 #define ipw_read16(ipw, ofs) __ipw_read16(__FILE__, __LINE__, ipw, ofs)

 #define _ipw_read32(ipw, ofs) readl((void*)(ipw)->hw_base + (ofs))
-static inline u32 __ipw_read32(char *f, u32 l, struct ipw_priv *ipw, u32 ofs) {
+static u32 __ipw_read32(char *f, u32 l, struct ipw_priv *ipw, u32 ofs) {
        IPW_DEBUG_IO("%s %d: read_direct32(0x%08X)\n", f, l, (u32)(ofs));
        return _ipw_read32(ipw, ofs);
 }
@@ -1827,8 +1827,8 @@
        cb->status = control ^src_address ^dest_address;

        /* Copy the Source and Destination addresses */
-       cb->dest_addr = (void *)dest_address;
-       cb->source_addr = (void *)src_address;
+       cb->dest_addr = dest_address;
+       cb->source_addr = src_address;

        /* Copy the Control Word last */
        cb->control = control;
@@ -6817,6 +6817,15 @@
        }

        pci_set_master(pdev);
+#define PCI_DMA_32BIT 0x00000000ffffffffULL
+       err = pci_set_dma_mask(pdev, PCI_DMA_32BIT);
+       if (!err) {
+               pci_set_consistent_dma_mask(pdev, PCI_DMA_32BIT);
+       } else {
+               printk(KERN_WARNING DRV_NAME ": No suitable DMA available.\n");
+               goto out_pci_disable_device;
+       }
+
        pci_set_drvdata(pdev, priv);

        err = pci_request_regions(pdev, DRV_NAME);
diff -u ipw2200-0.18/ipw2200.h ipw2200-0.18-amd64/ipw2200.h
--- ipw2200-0.18/ipw2200.h      2004-12-14 11:40:41.000000000 -0600
+++ ipw2200-0.18-amd64/ipw2200.h        2004-12-15 22:06:17.442689704 -0600
@@ -661,8 +661,8 @@
 struct command_block
 {
        unsigned int control;
-       void *source_addr;
-       void *dest_addr;
+       u32 source_addr;
+       u32 dest_addr;
        unsigned int status;
 } __attribute__ ((packed));


Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Portage 2.0.51-r8 (default-linux/amd64/2004.3, gcc-3.4.3,
glibc-2.3.4.20041102-r0, 2.6.10-rc3 x86_64)
=================================================================
System uname: 2.6.10-rc3 x86_64 AMD Athlon(tm) 64 Processor 3400+
Gentoo Base System version 1.6.7
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Oct 17 2004, 09:55:06)]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.9.3, 1.5, 1.7.9, 1.6.3, 1.8.5-r2, 1.4_p6
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.10-r1
virtual/os-headers:  2.6.8.1-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CFLAGS="-march=athlon64 -O3 -ffast-math -funroll-all-loops -funit-at-a-time
-fpeel-loops -ftracer -funswitch-loops"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown
/usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon64 -O3 -ffast-math -funroll-all-loops -funit-at-a-time
-fpeel-loops -ftracer -funswitch-loops"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X aalib acpi alsa apache2 audiofile avi berkdb bitmap-fonts
bootsplash cdparanoia cdr crypt cups directfb divx4linux dvd dvdr eds esd
ethereal evo exif f77 fam flac flash fortran gif gnome gpg gphoto gphoto2 gpm
gstreamer gtk gtk2 hal imagemagick imlib ipv6 java jp2 jpeg kde libwww lzw
lzw-tiff mad mozilla mpeg msn multilib mysql ncurses nls nptl offensive
oggvorbis opengl oscar oss pam pcmcia pda perl php png python qt quicktime
readline samba sdl sndfile spell ssl svg tcltk tcpd tiff truetype usb
userlocales wifi xine xml xml2 xmms xpm xrandr xv zlib"
Comment 1 Joe McCann (RETIRED) gentoo-dev 2004-12-15 21:08:13 UTC
please create an attachment for patches
Comment 2 Jason Sievert 2004-12-15 21:18:45 UTC
Created attachment 46101 [details, diff]
ipw2200 amd64 patch
Comment 3 Henrik Brix Andersen 2004-12-16 00:33:00 UTC
Has this patch been submitted upstream at http://www.bughost.org?
Comment 4 Jason Sievert 2004-12-16 05:16:03 UTC
No i have not yet.  Going to do that right now.  Just learing the ropes as I go.
Comment 5 Jason Sievert 2004-12-16 05:20:53 UTC
Bug submitted upstream
http://www.bughost.org/bugzilla/show_bug.cgi?id=502
Comment 6 Henrik Brix Andersen 2004-12-16 07:03:11 UTC
Thanks. I'll keep an eye on it.
Comment 7 Jeremy Maitin-Shepard 2004-12-22 20:26:20 UTC
I do not have an amd64 machine on which to test this patch.  It seems it would indeed be better to just get this patch applied upstream; the ipw2200 developers seem quite willing to apply user-submitted patches.  If they are not, then I would see no problem in applying it in the ebuild.  (Re-open the bug if the patch is not applied upstream.)
Comment 8 Jason Sievert 2005-01-17 09:21:23 UTC
http://www.bughost.org/bugzilla/show_bug.cgi?id=502

Looks like support will be added in .20!
Comment 9 Henrik Brix Andersen 2005-01-17 09:30:06 UTC
*** Bug 75848 has been marked as a duplicate of this bug. ***