Bug 502 - ipw2200 under amd64 patch
: ipw2200 under amd64 patch
Status: VERIFIED FIXED
: IPW2200
__UNSPECIFIED__
: 0.18
: All All
: P2 normal
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2004-12-16 05:19 by
Modified: 2005-10-05 13:35 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2004-12-16 05:19:07
Here is a patch that was on the mailing list for amd64 for 0.6.  I have changed
it to work with the current version.  It works great, have been using since 0.12.

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));
------- Comment #1 From 2004-12-16 07:02:43 -------
Please attach the patch instead of pasting it :)
------- Comment #2 From 2004-12-16 09:40:06 -------
FYI: This was first reported at http://bugs.gentoo.org/show_bug.cgi?id=74586
------- Comment #3 From 2004-12-16 09:52:28 -------
OK, as this in not really a bug, it should be Closed.

Keep the record bug #502 is for 64-Bit.

Will ask Patch Mantainer, if he as a site from where users can download it.
------- Comment #4 From 2004-12-16 09:58:45 -------
Why should this not be considered a bug?
------- Comment #5 From 2004-12-16 17:35:45 -------
To comment on #2, that was me that posted it.  I wanted to see if this could be
mearged some how into the main tree.  I have not done much development work but
is their a way for it to detect the arch when building and apply the patch?
------- Comment #6 From 2004-12-18 20:23:48 -------
  Why has it been that difficult to add amd64 (support).  Not having it has let
to confusion and frustration for many (mybug 431)).   I would guess a good
number of laptops are amd64... 
------- Comment #7 From 2005-01-13 11:58:45 -------
Assigning to James, per scrub.

Incase you're looking for the other 64-bit bug it is bug #431.
------- Comment #8 From 2005-01-15 13:06:17 -------
Fixed in 0.20 (known 64-bit patches applied to correct type casting errors, etc.
-- inline change not made based on feedback from the ML that it isn't needed)
------- Comment #9 From 2005-02-02 13:25:52 -------
Per feedback from the mailing list, this is working. Please re-open if this is 
not the case.