Changeset 3686

Show
Ignore:
Timestamp:
02/06/08 22:32:59 (10 months ago)
Author:
sumsum
Message:

Kernel 2.6.24 added from Openwrt. Two patches have things to do (marked with TODO,
i don't know how to update the kernel patches from modified source files),
everything else compiles. module ipkgs are not yet correctly created. if the
resulting kernel works is unknown currently.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/freewrt/package/base-files/files/etc/hotplug.d/usb/01-mount

    r3235 r3686  
    1313                                        path=/mnt/${dev}_${part##*part} 
    1414                                        mkdir -p ${path} 
     15                                        [ -x /usr/sbin/fsck ] && /usr/sbin/fsck -a -V /dev/discs/${dev}/${part} >> /var/log/fsck.log 2>&1 
    1516                                        mount ${part} ${path} 
    1617                                done 
  • trunk/freewrt/package/e2fsprogs/Makefile

    r2678 r3686  
    99PKG_NAME:=              e2fsprogs 
    1010PKG_VERSION:=           1.39 
    11 PKG_RELEASE:=           2 
     11PKG_RELEASE:=           3 
    1212PKG_MD5SUM:=            06f7806782e357797fad1d34b7ced0c6 
    1313MASTER_SITES:=          ${MASTER_SITE_SOURCEFORGE:=e2fsprogs/} 
     
    3434        ${INSTALL_DIR} ${IDIR_E2FSPROGS}/usr/lib 
    3535        ${INSTALL_DIR} ${IDIR_E2FSPROGS}/usr/sbin 
    36         ${INSTALL_BIN} ${WRKINST}/usr/sbin/e2fsck ${IDIR_E2FSPROGS}/usr/sbin/ 
    37         ${INSTALL_BIN} ${WRKINST}/usr/sbin/mke2fs ${IDIR_E2FSPROGS}/usr/sbin/ 
     36        ${INSTALL_BIN} ${WRKINST}/usr/sbin/fsck ${IDIR_E2FSPROGS}/usr/sbin/ 
     37        ${INSTALL_BIN} ${WRKINST}/usr/sbin/fsck.ext2 ${IDIR_E2FSPROGS}/usr/sbin/ 
     38        ln -s fsck.ext2 ${IDIR_E2FSPROGS}/usr/sbin/fsck.ext3 
     39        ln -s fsck.ext2 ${IDIR_E2FSPROGS}/usr/sbin/e2fsck 
    3840        ${INSTALL_BIN} ${WRKINST}/usr/sbin/tune2fs ${IDIR_E2FSPROGS}/usr/sbin/ 
    3941        ${CP} ${WRKINST}/usr/lib/lib{blkid,com_err,e2p,ext2fs,uuid}.so.* \ 
  • trunk/freewrt/rules.mk

    r3638 r3686  
    8686UNAME_R:=               2.6.21.1 
    8787else ifeq ($(strip ${FWRT_LINUX_2_6_BRCM_ASUS_WL500G_PREMIUM}),y) 
    88 UNAME_R:=               2.6.22.1 
     88UNAME_R:=               2.6.24 
    8989else ifeq ($(strip ${FWRT_LINUX_2_4}),y) 
    9090UNAME_R:=               2.4.34 
  • trunk/freewrt/target/linux/brcm-2.6/Makefile

    r3420 r3686  
    1 include ${TOPDIR}/target/linux/generic-2.6.22.1/Makefile 
     1include ${TOPDIR}/target/linux/generic-2.6.24/Makefile 
  • trunk/freewrt/target/linux/brcm-2.6/extra/arch/mips/bcm947xx/prom.c

    r3420 r3686  
    4242        unsigned long mem; 
    4343 
    44         mips_machgroup = MACH_GROUP_BRCM; 
     44//        mips_machgroup = MACH_GROUP_BRCM; 
    4545        mips_machtype = MACH_BCM47XX; 
    4646 
  • trunk/freewrt/target/linux/brcm-2.6/extra/arch/mips/bcm947xx/setup.c

    r3420 r3686  
    158158        pm_power_off = bcm47xx_machine_halt; 
    159159 
    160         board_time_init = bcm47xx_time_init;//FIXME move into ssb 
    161160} 
    162161 
  • trunk/freewrt/target/linux/brcm-2.6/extra/arch/mips/bcm947xx/time.c

    r3420 r3686  
    3636 
    3737void __init 
    38 bcm47xx_time_init(void) 
     38plat_time_init(void) 
    3939{ 
    4040        unsigned long hz; 
     
    6161        setup_irq(7, irq); 
    6262} 
     63 
     64//TODO: remove this function 
  • trunk/freewrt/target/linux/brcm-2.6/patches/2100-board_support.patch

    r3420 r3686  
    1 Index: linux-2.6.22-rc4/arch/mips/Kconfig 
     1Index: linux-2.6.23/arch/mips/Kconfig 
    22=================================================================== 
    3 --- linux-2.6.22-rc4.orig/arch/mips/Kconfig    2007-06-10 21:32:36.000000000 +0100 
    4 +++ linux-2.6.22-rc4/arch/mips/Kconfig 2007-06-10 21:33:12.000000000 +0100 
     3--- linux-2.6.23.orig/arch/mips/Kconfig        2007-10-13 02:23:06.662507926 +0200 
     4+++ linux-2.6.23/arch/mips/Kconfig     2007-10-13 02:23:41.484492317 +0200 
    55@@ -4,6 +4,10 @@ 
    66        # Horrible source of confusion.  Die, die, die ... 
     
    1414  
    1515 menu "Machine selection" 
    16 @@ -126,6 +130,23 @@ 
    17          Members include the Acer PICA, MIPS Magnum 4000, MIPS Millenium and 
    18          Olivetti M700-10 workstations. 
     16@@ -44,6 +48,23 @@ 
     17          note that a kernel built with this option selected will not be 
     18          able to run on normal units. 
    1919  
    2020+config BCM947XX 
     
    3535+        Support for BCM947xx based boards 
    3636+ 
    37  config LASA
    38         bool "LASAT Networks platforms
     37 config MIPS_COBAL
     38        bool "Cobalt Server
    3939        select DMA_NONCOHERENT 
    40 Index: linux-2.6.22-rc4/arch/mips/kernel/cpu-probe.c 
     40Index: linux-2.6.23/arch/mips/Makefile 
    4141=================================================================== 
    42 --- linux-2.6.22-rc4.orig/arch/mips/kernel/cpu-probe.c  2007-06-10 21:32:13.000000000 +0100 
    43 +++ linux-2.6.22-rc4/arch/mips/kernel/cpu-probe.c       2007-06-10 21:33:12.000000000 +0100 
    44 @@ -711,6 +711,28 @@ 
    45  } 
    46   
    47   
    48 +static inline void cpu_probe_broadcom(struct cpuinfo_mips *c) 
    49 +{ 
    50 +       decode_config1(c); 
    51 +       switch (c->processor_id & 0xff00) { 
    52 +               case PRID_IMP_BCM3302: 
    53 +                       c->cputype = CPU_BCM3302; 
    54 +                       c->isa_level = MIPS_CPU_ISA_M32R1; 
    55 +                       c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | 
    56 +                                       MIPS_CPU_4K_CACHE | MIPS_CPU_COUNTER; 
    57 +               break; 
    58 +               case PRID_IMP_BCM4710: 
    59 +                       c->cputype = CPU_BCM4710; 
    60 +                       c->isa_level = MIPS_CPU_ISA_M32R1; 
    61 +                       c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | 
    62 +                                       MIPS_CPU_4K_CACHE | MIPS_CPU_COUNTER; 
    63 +               break; 
    64 +       default: 
    65 +               c->cputype = CPU_UNKNOWN; 
    66 +               break; 
    67 +       } 
    68 +} 
    69 
    70  __init void cpu_probe(void) 
    71  { 
    72         struct cpuinfo_mips *c = &current_cpu_data; 
    73 @@ -733,6 +755,9 @@ 
    74         case PRID_COMP_SIBYTE: 
    75                 cpu_probe_sibyte(c); 
    76                 break; 
    77 +       case PRID_COMP_BROADCOM: 
    78 +               cpu_probe_broadcom(c); 
    79 +               break; 
    80         case PRID_COMP_SANDCRAFT: 
    81                 cpu_probe_sandcraft(c); 
    82                 break; 
    83 Index: linux-2.6.22-rc4/arch/mips/kernel/proc.c 
    84 =================================================================== 
    85 --- linux-2.6.22-rc4.orig/arch/mips/kernel/proc.c       2007-06-10 21:32:13.000000000 +0100 
    86 +++ linux-2.6.22-rc4/arch/mips/kernel/proc.c    2007-06-10 21:33:12.000000000 +0100 
    87 @@ -83,6 +83,8 @@ 
    88         [CPU_VR4181]    = "NEC VR4181", 
    89         [CPU_VR4181A]   = "NEC VR4181A", 
    90         [CPU_SR71000]   = "Sandcraft SR71000", 
    91 +       [CPU_BCM3302]   = "Broadcom BCM3302", 
    92 +       [CPU_BCM4710]   = "Broadcom BCM4710", 
    93         [CPU_PR4450]    = "Philips PR4450", 
    94  }; 
    95   
    96 Index: linux-2.6.22-rc4/arch/mips/Makefile 
    97 =================================================================== 
    98 --- linux-2.6.22-rc4.orig/arch/mips/Makefile    2007-06-10 21:32:56.000000000 +0100 
    99 +++ linux-2.6.22-rc4/arch/mips/Makefile 2007-06-10 21:33:12.000000000 +0100 
    100 @@ -560,6 +560,18 @@ 
     42--- linux-2.6.23.orig/arch/mips/Makefile        2007-10-13 02:23:06.682509066 +0200 
     43+++ linux-2.6.23/arch/mips/Makefile     2007-10-13 02:23:11.210767122 +0200 
     44@@ -533,6 +533,18 @@ 
    10145 load-$(CONFIG_SIBYTE_BIGSUR)   := 0xffffffff80100000 
    10246  
     
    11761 # 
    11862 core-$(CONFIG_SNI_RM)          += arch/mips/sni/ 
    119 Index: linux-2.6.22-rc4/arch/mips/mm/tlbex.c 
     63Index: linux-2.6.23.1/drivers/Makefile 
    12064=================================================================== 
    121 --- linux-2.6.22-rc4.orig/arch/mips/mm/tlbex.c  2007-06-10 21:32:35.000000000 +0100 
    122 +++ linux-2.6.22-rc4/arch/mips/mm/tlbex.c       2007-06-10 21:33:12.000000000 +0100 
    123 @@ -892,6 +892,8 @@ 
    124         case CPU_4KSC: 
    125         case CPU_20KC: 
    126         case CPU_25KF: 
    127 +       case CPU_BCM3302: 
    128 +       case CPU_BCM4710: 
    129                 tlbw(p); 
    130                 break; 
    131   
    132 Index: linux-2.6.22-rc4/drivers/Kconfig 
     65--- linux-2.6.23.1.orig/drivers/Makefile        2008-01-27 04:34:31.000000000 +0100 
     66+++ linux-2.6.23.1/drivers/Makefile             2008-01-27 04:39:57.000000000 +0100 
     67@@ -89,3 +89,4 @@ 
     68 obj-$(CONFIG_PPC_PS3)          += ps3/ 
     69 obj-$(CONFIG_OF)               += of/ 
     70 obj-$(CONFIG_GPIO_DEVICE)      += gpio/ 
     71+obj-$(CONFIG_SSB)              += ssb/ 
     72Index: linux-2.6.23.1/include/linux/pci_ids.h 
    13373=================================================================== 
    134 --- linux-2.6.22-rc4.orig/drivers/Kconfig       2007-06-10 21:32:13.000000000 +0100 
    135 +++ linux-2.6.22-rc4/drivers/Kconfig    2007-06-10 21:33:12.000000000 +0100 
    136 @@ -56,6 +56,8 @@ 
    137   
    138  source "drivers/hwmon/Kconfig" 
    139   
    140 +source "drivers/ssb/Kconfig" 
    141 
    142  source "drivers/mfd/Kconfig" 
    143   
    144  source "drivers/media/Kconfig" 
    145 Index: linux-2.6.22-rc4/drivers/Makefile 
    146 =================================================================== 
    147 --- linux-2.6.22-rc4.orig/drivers/Makefile      2007-06-10 21:32:14.000000000 +0100 
    148 +++ linux-2.6.22-rc4/drivers/Makefile   2007-06-10 21:33:12.000000000 +0100 
    149 @@ -81,3 +81,4 @@ 
    150  obj-$(CONFIG_DMA_ENGINE)       += dma/ 
    151  obj-$(CONFIG_HID)              += hid/ 
    152  obj-$(CONFIG_PPC_PS3)          += ps3/ 
    153 +obj-$(CONFIG_SSB)              += ssb/ 
    154 Index: linux-2.6.22-rc4/include/asm-mips/bootinfo.h 
    155 =================================================================== 
    156 --- linux-2.6.22-rc4.orig/include/asm-mips/bootinfo.h   2007-06-10 21:32:14.000000000 +0100 
    157 +++ linux-2.6.22-rc4/include/asm-mips/bootinfo.h        2007-06-10 21:33:12.000000000 +0100 
    158 @@ -213,6 +213,12 @@ 
    159  #define MACH_GROUP_NEC_EMMA2RH 25      /* NEC EMMA2RH (was 23)         */ 
    160  #define  MACH_NEC_MARKEINS     0       /* NEC EMMA2RH Mark-eins        */ 
    161   
    162 +/* 
    163 + * Valid machtype for group Broadcom 
    164 + */ 
    165 +#define MACH_GROUP_BRCM                23      /* Broadcom                     */ 
    166 +#define MACH_BCM47XX           1       /* Broadcom BCM47xx             */ 
    167 
    168  #define CL_SIZE                        COMMAND_LINE_SIZE 
    169   
    170  const char *get_system_type(void); 
    171 Index: linux-2.6.22-rc4/include/asm-mips/cpu.h 
    172 =================================================================== 
    173 --- linux-2.6.22-rc4.orig/include/asm-mips/cpu.h        2007-06-10 21:32:14.000000000 +0100 
    174 +++ linux-2.6.22-rc4/include/asm-mips/cpu.h     2007-06-10 21:33:12.000000000 +0100 
    175 @@ -104,6 +104,13 @@ 
    176  #define PRID_IMP_SR71000        0x0400 
    177   
    178  /* 
    179 + * These are the PRID's for when 23:16 == PRID_COMP_BROADCOM 
    180 + */ 
    181 
    182 +#define PRID_IMP_BCM4710       0x4000 
    183 +#define PRID_IMP_BCM3302       0x9000 
    184 
    185 +/* 
    186   * Definitions for 7:0 on legacy processors 
    187   */ 
    188   
    189 @@ -200,7 +207,9 @@ 
    190  #define CPU_SB1A               62 
    191  #define CPU_74K                        63 
    192  #define CPU_R14000             64 
    193 -#define CPU_LAST               64 
    194 +#define CPU_BCM3302            65 
    195 +#define CPU_BCM4710            66 
    196 +#define CPU_LAST               66 
    197   
    198  /* 
    199   * ISA Level encodings 
    200 Index: linux-2.6.22-rc4/include/linux/pci_ids.h 
    201 =================================================================== 
    202 --- linux-2.6.22-rc4.orig/include/linux/pci_ids.h       2007-06-10 21:32:14.000000000 +0100 
    203 +++ linux-2.6.22-rc4/include/linux/pci_ids.h    2007-06-10 21:33:12.000000000 +0100 
    204 @@ -1991,6 +1991,7 @@ 
     74--- linux-2.6.23.1.orig/include/linux/pci_ids.h 2008-01-27 04:55:18.000000000 +0100 
     75+++ linux-2.6.23.1/include/linux/pci_ids.h      2008-01-27 04:55:22.000000000 +0100 
     76@@ -1972,6 +1972,7 @@ 
    20577 #define PCI_DEVICE_ID_TIGON3_5906M     0x1713 
    20678 #define PCI_DEVICE_ID_BCM4401          0x4401 
  • trunk/freewrt/target/linux/brcm-2.6/patches/2110-flash_map.patch

    r3420 r3686  
    1 Index: linux-2.6.22-rc4/drivers/mtd/maps/Kconfig 
     1Index: linux-2.6.23/drivers/mtd/maps/Kconfig 
    22=================================================================== 
    3 --- linux-2.6.22-rc4.orig/drivers/mtd/maps/Kconfig     2007-06-10 21:32:13.000000000 +0100 
    4 +++ linux-2.6.22-rc4/drivers/mtd/maps/Kconfig  2007-06-10 21:33:14.000000000 +0100 
    5 @@ -358,6 +358,12 @@ 
     3--- linux-2.6.23.orig/drivers/mtd/maps/Kconfig 2007-10-09 22:31:38.000000000 +0200 
     4+++ linux-2.6.23/drivers/mtd/maps/Kconfig      2007-10-13 02:28:13.644001805 +0200 
     5@@ -352,6 +352,12 @@ 
    66          Mapping for the Flaga digital module. If you don't have one, ignore 
    77          this setting. 
     
    1212+       help 
    1313+         Support for the flash chips on the BCM947xx board. 
    14 +         
     14+ 
    1515 config MTD_WALNUT 
    1616        tristate "Flash device mapped on IBM 405GP Walnut" 
    1717        depends on MTD_JEDECPROBE && WALNUT 
    18 Index: linux-2.6.22-rc4/drivers/mtd/maps/Makefile 
     18Index: linux-2.6.23/drivers/mtd/maps/Makefile 
    1919=================================================================== 
    20 --- linux-2.6.22-rc4.orig/drivers/mtd/maps/Makefile    2007-06-10 21:32:13.000000000 +0100 
    21 +++ linux-2.6.22-rc4/drivers/mtd/maps/Makefile 2007-06-10 21:33:14.000000000 +0100 
     20--- linux-2.6.23.orig/drivers/mtd/maps/Makefile        2007-10-09 22:31:38.000000000 +0200 
     21+++ linux-2.6.23/drivers/mtd/maps/Makefile     2007-10-13 02:27:56.727037761 +0200 
    2222@@ -33,6 +33,7 @@ 
    2323 obj-$(CONFIG_MTD_PCMCIA)       += pcmciamtd.o 
  • trunk/freewrt/target/linux/brcm-2.6/patches/2120-b44_ssb_support.patch

    r3420 r3686  
    1 Index: linux-2.6.22-rc4/drivers/net/b44.c 
     1Index: linux-2.6.23/drivers/net/b44.c 
    22=================================================================== 
    3 --- linux-2.6.22-rc4.orig/drivers/net/b44.c    2007-06-10 21:32:13.000000000 +0100 
    4 +++ linux-2.6.22-rc4/drivers/net/b44.c 2007-06-10 21:33:15.000000000 +0100 
     3--- linux-2.6.23.orig/drivers/net/b44.c        2007-10-13 10:58:27.872607266 +0200 
     4+++ linux-2.6.23/drivers/net/b44.c     2007-10-13 11:00:46.916530927 +0200 
    55@@ -1,7 +1,9 @@ 
    66-/* b44.c: Broadcom 4400 device driver. 
     
    1515  * 
    1616  * Distribute under GPL. 
    17 @@ -20,11 +22,13 @@ 
     17@@ -21,11 +23,13 @@ 
    1818 #include <linux/delay.h> 
    1919 #include <linux/init.h> 
     
    2929  
    3030 #define DRV_MODULE_NAME                "b44" 
    31 @@ -86,8 +90,8 @@ 
     31@@ -87,8 +91,8 @@ 
    3232 static char version[] __devinitdata = 
    3333        DRV_MODULE_NAME ".c:v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; 
     
    4040 MODULE_VERSION(DRV_MODULE_VERSION); 
    4141  
    42 @@ -95,18 +99,11 @@ 
     42@@ -96,18 +100,11 @@ 
    4343 module_param(b44_debug, int, 0); 
    4444 MODULE_PARM_DESC(b44_debug, "B44 bitmapped debugging message enable value"); 
     
    6262 static void b44_init_rings(struct b44 *); 
    6363  
    64 @@ -118,6 +115,7 @@ 
     64@@ -119,6 +116,7 @@ 
    6565  
    6666 static int dma_desc_align_mask; 
     
    7070 static const char b44_gstrings[][ETH_GSTRING_LEN] = { 
    7171 #define _B44(x...)     # x, 
    72 @@ -125,35 +123,24 @@ 
     72@@ -126,35 +124,24 @@ 
    7373 #undef _B44 
    7474 }; 
     
    108108+                                              enum dma_data_direction dir) 
    109109+{ 
    110 +       dma_sync_single_range_for_device(&sdev->dev, dma_base, 
     110+       dma_sync_single_range_for_device(sdev->dev, dma_base, 
    111111+                                       offset & dma_desc_align_mask, 
    112112+                                       dma_desc_sync_size, dir); 
     
    118118+                                           enum dma_data_direction dir) 
    119119+{ 
    120 +       dma_sync_single_range_for_cpu(&sdev->dev, dma_base, 
     120+       dma_sync_single_range_for_cpu(sdev->dev, dma_base, 
    121121+                                    offset & dma_desc_align_mask, 
    122122+                                    dma_desc_sync_size, dir); 
     
    124124  
    125125 static int b44_wait_bit(struct b44 *bp, unsigned long reg, 
    126 @@ -181,117 +168,29 @@ 
     126@@ -182,117 +169,29 @@ 
    127127        return 0; 
    128128 } 
     
    240240-#endif 
    241241-       return 0; 
    242 -} 
    243 
     242+       data[0] = (val >> 8) & 0xFF; 
     243+       data[1] = (val >> 0) & 0xFF; 
     244 } 
     245  
    244246-static int ssb_is_core_up(struct b44 *bp) 
    245247-{ 
    246248-       return ((br32(bp, B44_SBTMSLOW) & (SBTMSLOW_RESET | SBTMSLOW_REJECT | SBTMSLOW_CLOCK)) 
    247249-               == SBTMSLOW_CLOCK); 
    248 +       data[0] = (val >> 8) & 0xFF; 
    249 +       data[1] = (val >> 0) & 0xFF; 
    250  } 
    251   
     250-} 
     251
    252252-static void __b44_cam_write(struct b44 *bp, unsigned char *data, int index) 
    253253+static inline void __b44_cam_write(struct b44 *bp, unsigned char *data, int index) 
     
    255255        u32 val; 
    256256  
    257 @@ -327,14 +226,14 @@ 
     257@@ -328,14 +227,14 @@ 
    258258        bw32(bp, B44_IMASK, bp->imask); 
    259259 } 
     
    272272                             (MDIO_TA_VALID << MDIO_DATA_TA_SHIFT))); 
    273273        err = b44_wait_bit(bp, B44_EMAC_ISTAT, EMAC_INT_MII, 100, 0); 
    274 @@ -343,18 +242,34 @@ 
     274@@ -344,18 +243,34 @@ 
    275275        return err; 
    276276 } 
     
    302302+       if (bp->phy_addr == B44_PHY_ADDR_NO_PHY) 
    303303+               return 0; 
    304 +               
     304+ 
    305305+       return __b44_writephy(bp, bp->phy_addr, reg, val); 
    306306+} 
     
    309309 /* FIXME FIXME: phy_id is ignored, bp->phy_addr use is unconditional 
    310310  * due to code existing before miilib use was added to this driver. 
    311 @@ -383,6 +298,8 @@ 
     311@@ -384,6 +299,8 @@ 
    312312        u32 val; 
    313313        int err; 
     
    318318        if (err) 
    319319                return err; 
    320 @@ -441,11 +358,27 @@ 
     320@@ -442,11 +359,27 @@ 
    321321        __b44_set_flow_ctrl(bp, pause_enab); 
    322322 } 
     
    335335+        */ 
    336336+       if ((atoi(nvram_get("boardnum")) == 2) && 
    337 +                       (__b44_readphy(bp, 0, MII_BMCR, &val) == 0) &&  
     337+                       (__b44_readphy(bp, 0, MII_BMCR, &val) == 0) && 
    338338+                       (val & BMCR_ISOLATE) && 
    339339+                       (__b44_writephy(bp, 0, MII_BMCR, val & ~BMCR_ISOLATE) != 0)) { 
     
    346346                goto out; 
    347347        if ((err = b44_writephy(bp, B44_MII_ALEDCTRL, 
    348 @@ -541,6 +474,19 @@ 
     348@@ -542,6 +475,19 @@ 
    349349 { 
    350350        u32 bmsr, aux; 
     
    371371  
    372372-               pci_unmap_single(bp->pdev, 
    373 +               dma_unmap_single(&bp->sdev->dev, 
     373+               dma_unmap_single(bp->sdev->dev, 
    374374                                 pci_unmap_addr(rp, mapping), 
    375375                                 skb->len, 
     
    379379                dev_kfree_skb_irq(skb); 
    380380        } 
    381 @@ -656,10 +602,10 @@ 
    382         skb = dev_alloc_skb(RX_PKT_BUF_SZ); 
     381@@ -657,9 +603,9 @@ 
    383382        if (skb == NULL) 
    384383                return -ENOMEM; 
    385 
     384  
    386385-       mapping = pci_map_single(bp->pdev, skb->data, 
    387 +        
    388 +       mapping = dma_map_single(&bp->sdev->dev, skb->data, 
     386+       mapping = dma_map_single(bp->sdev->dev, skb->data, 
    389387                                 RX_PKT_BUF_SZ, 
    390388-                                PCI_DMA_FROMDEVICE); 
     
    398396                if (!dma_mapping_error(mapping)) 
    399397-                       pci_unmap_single(bp->pdev, mapping, RX_PKT_BUF_SZ,PCI_DMA_FROMDEVICE); 
    400 +                       dma_unmap_single(&bp->sdev->dev, mapping, RX_PKT_BUF_SZ,DMA_FROM_DEVICE); 
     398+                       dma_unmap_single(bp->sdev->dev, mapping, RX_PKT_BUF_SZ,DMA_FROM_DEVICE); 
    401399                dev_kfree_skb_any(skb); 
    402                 skb = __dev_alloc_skb(RX_PKT_BUF_SZ,GFP_DMA); 
     400                skb = __netdev_alloc_skb(bp->dev, RX_PKT_BUF_SZ, GFP_ATOMIC|GFP_DMA); 
    403401                if (skb == NULL) 
    404402                        return -ENOMEM; 
    405403-               mapping = pci_map_single(bp->pdev, skb->data, 
    406 +               mapping = dma_map_single(&bp->sdev->dev, skb->data, 
     404+               mapping = dma_map_single(bp->sdev->dev, skb->data, 
    407405                                         RX_PKT_BUF_SZ, 
    408406-                                        PCI_DMA_FROMDEVICE); 
     
    412410                        if (!dma_mapping_error(mapping)) 
    413411-                               pci_unmap_single(bp->pdev, mapping, RX_PKT_BUF_SZ,PCI_DMA_FROMDEVICE); 
    414 +                               dma_unmap_single(&bp->sdev->dev, mapping, RX_PKT_BUF_SZ,DMA_FROM_DEVICE); 
     412+                               dma_unmap_single(bp->sdev->dev, mapping, RX_PKT_BUF_SZ,DMA_FROM_DEVICE); 
    415413                        dev_kfree_skb_any(skb); 
    416414                        return -ENOMEM; 
    417415                } 
    418 @@ -707,9 +653,9 @@ 
    419         dp->addr = cpu_to_le32((u32) mapping + bp->rx_offset + bp->dma_offset); 
     416@@ -705,9 +651,9 @@ 
     417        dp->addr = cpu_to_le32((u32) mapping + RX_PKT_OFFSET + bp->dma_offset); 
    420418  
    421419        if (bp->flags & B44_FLAG_RX_RING_HACK) 
     
    429427        return RX_PKT_BUF_SZ; 
    430428 } 
    431 @@ -736,9 +682,9 @@ 
     429@@ -734,9 +680,9 @@ 
    432430                           pci_unmap_addr(src_map, mapping)); 
    433431  
     
    442440        ctrl = src_desc->ctrl; 
    443441        if (dest_idx == (B44_RX_RING_SIZE - 1)) 
    444 @@ -752,13 +698,13 @@ 
     442@@ -750,13 +696,13 @@ 
    445443        src_map->skb = NULL; 
    446444  
     
    454452  
    455453-       pci_dma_sync_single_for_device(bp->pdev, le32_to_cpu(src_desc->addr), 
    456 +       dma_sync_single_for_device(&bp->sdev->dev, le32_to_cpu(src_desc->addr), 
     454+       dma_sync_single_for_device(bp->sdev->dev, le32_to_cpu(src_desc->addr), 
    457455                                       RX_PKT_BUF_SZ, 
    458456-                                      PCI_DMA_FROMDEVICE); 
     
    461459  
    462460 static int b44_rx(struct b44 *bp, int budget) 
    463 @@ -778,9 +724,9 @@ 
     461@@ -776,9 +722,9 @@ 
    464462                struct rx_header *rh; 
    465463                u16 len; 
    466464  
    467465-               pci_dma_sync_single_for_cpu(bp->pdev, map, 
    468 +               dma_sync_single_for_cpu(&bp->sdev->dev, map, 
     466+               dma_sync_single_for_cpu(bp->sdev->dev, map, 
    469467                                            RX_PKT_BUF_SZ, 
    470468-                                           PCI_DMA_FROMDEVICE); 
     
    472470                rh = (struct rx_header *) skb->data; 
    473471                len = le16_to_cpu(rh->len); 
    474                 if ((len > (RX_PKT_BUF_SZ - bp->rx_offset)) || 
    475 @@ -812,11 +758,11 @@ 
     472                if ((len > (RX_PKT_BUF_SZ - RX_PKT_OFFSET)) || 
     473@@ -810,8 +756,8 @@ 
    476474                        skb_size = b44_alloc_rx_skb(bp, cons, bp->rx_prod); 
    477475                        if (skb_size < 0) 
     
    479477-                       pci_unmap_single(bp->pdev, map, 
    480478-                                        skb_size, PCI_DMA_FROMDEVICE); 
    481 +                       dma_unmap_single(&bp->sdev->dev, map, 
     479+                       dma_unmap_single(bp->sdev->dev, map, 
    482480+                                        skb_size, DMA_FROM_DEVICE); 
    483481                        /* Leave out rx_header */ 
    484 -                       skb_put(skb, len+bp->rx_offset); 
    485 -                       skb_pull(skb,bp->rx_offset); 
    486 +               skb_put(skb, len+bp->rx_offset); 
    487 +                       skb_pull(skb,bp->rx_offset); 
    488                 } else { 
    489                         struct sk_buff *copy_skb; 
    490   
    491 @@ -985,23 +931,23 @@ 
     482                        skb_put(skb, len + RX_PKT_OFFSET); 
     483                        skb_pull(skb, RX_PKT_OFFSET); 
     484@@ -982,24 +928,24 @@ 
    492485                goto err_out; 
    493486        } 
    494487  
    495488-       mapping = pci_map_single(bp->pdev, skb->data, len, PCI_DMA_TODEVICE); 
    496 +       mapping = dma_map_single(&bp->sdev->dev, skb->data, len, DMA_TO_DEVICE); 
     489+       mapping = dma_map_single(bp->sdev->dev, skb->data, len, DMA_TO_DEVICE); 
    497490        if (dma_mapping_error(mapping) || mapping + len > DMA_30BIT_MASK) { 
     491                struct sk_buff *bounce_skb; 
     492  
    498493                /* Chip can't handle DMA to/from >1GB, use bounce buffer */ 
    499494                if (!dma_mapping_error(mapping)) 
    500495-                       pci_unmap_single(bp->pdev, mapping, len, PCI_DMA_TODEVICE); 
    501 +                       dma_unmap_single(&bp->sdev->dev, mapping, len, DMA_TO_DEVICE); 
    502   
    503                 bounce_skb = __dev_alloc_skb(TX_PKT_BUF_SZ, 
    504                                              GFP_ATOMIC|GFP_DMA); 
     496+                       dma_unmap_single(bp->sdev->dev, mapping, len, DMA_TO_DEVICE); 
     497  
     498                bounce_skb = __dev_alloc_skb(len, GFP_ATOMIC | GFP_DMA); 
    505499                if (!bounce_skb) 
    506500                        goto err_out; 
     
    508502-               mapping = pci_map_single(bp->pdev, bounce_skb->data, 
    509503-                                        len, PCI_DMA_TODEVICE); 
    510 +               mapping = dma_map_single(&bp->sdev->dev, bounce_skb->data, 
     504+               mapping = dma_map_single(bp->sdev->dev, bounce_skb->data, 
    511505+                                        len, DMA_TO_DEVICE); 
    512506                if (dma_mapping_error(mapping) || mapping + len > DMA_30BIT_MASK) { 
    513507                        if (!dma_mapping_error(mapping)) 
    514508-                               pci_unmap_single(bp->pdev, mapping, 
    515 -                                        len, PCI_DMA_TODEVICE); 
    516 +                               dma_unmap_single(&bp->sdev->dev, mapping, 
    517 +                                        len, DMA_TO_DEVICE); 
     509-                                               len, PCI_DMA_TODEVICE); 
     510+                               dma_unmap_single(bp->sdev->dev, mapping, 
     511+                                               len, DMA_TO_DEVICE); 
    518512                        dev_kfree_skb_any(bounce_skb);