pci: rename device->linux_dev
authorBarret Rhoden <brho@cs.berkeley.edu>
Thu, 29 Aug 2019 15:07:03 +0000 (11:07 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 8 Oct 2019 21:11:10 +0000 (17:11 -0400)
We have dev_id, which is Linux's device.  We had device, which was
Linux's dev.  We also have 'dev', which is encoded in Linux's devfn.
This was a mess, especially since when we spatched dev to device, that
collided with other uses of device (meaning dev_id) in Linux.

Anyway, we aren't even using linux_dev nee device, it was just a source
of confusion for me.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
22 files changed:
kern/arch/x86/pci.h
kern/drivers/net/bnx2x/bnx2x.h
kern/drivers/net/bnx2x/bnx2x_cmn.h
kern/drivers/net/bnx2x/bnx2x_main.c
kern/drivers/net/mlx4/alloc.c
kern/drivers/net/mlx4/cmd.c
kern/drivers/net/mlx4/en_clock.c
kern/drivers/net/mlx4/en_cq.c
kern/drivers/net/mlx4/en_main.c
kern/drivers/net/mlx4/en_netdev.c
kern/drivers/net/mlx4/en_rx.c
kern/drivers/net/mlx4/en_tx.c
kern/drivers/net/mlx4/eq.c
kern/drivers/net/mlx4/icm.c
kern/drivers/net/mlx4/main.c
kern/drivers/net/mlx4/mlx4.h
kern/drivers/net/mlx4/mlx4_en.h
kern/drivers/net/mlx4/mr.c
kern/drivers/net/mlx4u/mr.c
kern/drivers/net/r8169.c
kern/include/linux/compat_todo.h
scripts/spatch/linux/scalar.cocci

index 42a64f8..2de8b49 100644 (file)
@@ -174,7 +174,7 @@ struct pci_device {
        uintptr_t                       mmio_cfg;
        void                            *dev_data; /* device private pointer */
        struct iommu                    *iommu; /* ptr to controlling iommu */
-       struct device                   device;
+       struct device                   linux_dev;
        bool                            in_use; /* prevent double discovery */
        int                             domain; /* legacy size was 16-bits */
        uint8_t                         bus;
index 1690b1a..dbf9c17 100644 (file)
@@ -2201,12 +2201,12 @@ void bnx2x_igu_clear_sb_gen(struct bnx2x *bp, uint8_t func,
                            bool is_pf);
 
 #define BNX2X_ILT_ZALLOC(x, y, size)                                   \
-       x = dma_zalloc_coherent(&bp->pdev->dev, size, y, MEM_WAIT)
+       x = dma_zalloc_coherent(&bp->pdev->linux_dev, size, y, MEM_WAIT)
 
 #define BNX2X_ILT_FREE(x, y, size) \
        do { \
                if (x) { \
-                       dma_free_coherent(&bp->pdev->dev, size, x, y); \
+                       dma_free_coherent(&bp->pdev->linux_dev, size, x, y); \
                        x = NULL; \
                        y = 0; \
                } \
index 4d68fd9..88e1c6d 100644 (file)
@@ -29,7 +29,7 @@ extern int bnx2x_num_queues;
 #define BNX2X_PCI_FREE(x, y, size) \
        do { \
                if (x) { \
-                       dma_free_coherent(&bp->pdev->dev, size, (void *)x, y); \
+                       dma_free_coherent(&bp->pdev->linux_dev, size, (void *)x, y); \
                        x = NULL; \
                        y = 0; \
                } \
@@ -45,7 +45,7 @@ extern int bnx2x_num_queues;
 
 #define BNX2X_PCI_ALLOC(y, size)                                       \
 ({                                                                     \
-       void *x = dma_zalloc_coherent(&bp->pdev->dev, size, y, MEM_WAIT); \
+       void *x = dma_zalloc_coherent(&bp->pdev->linux_dev, size, y, MEM_WAIT); \
        if (x)                                                          \
                DP(NETIF_MSG_HW,                                        \
                   "BNX2X_PCI_ALLOC: Physical %p Virtual %p\n", \
@@ -54,7 +54,7 @@ extern int bnx2x_num_queues;
 })
 #define BNX2X_PCI_FALLOC(y, size)                                      \
 ({                                                                     \
-       void *x = dma_alloc_coherent(&bp->pdev->dev, size, y, MEM_WAIT); \
+       void *x = dma_alloc_coherent(&bp->pdev->linux_dev, size, y, MEM_WAIT); \
        if (x) {                                                        \
                memset(x, 0xff, size);                                  \
                DP(NETIF_MSG_HW,                                        \
index f48b53b..c277901 100644 (file)
@@ -6519,7 +6519,7 @@ void bnx2x_post_irq_nic_init(struct bnx2x *bp, uint32_t load_code)
 /* gzip service functions */
 static int bnx2x_gunzip_init(struct bnx2x *bp)
 {
-       bp->gunzip_buf = dma_alloc_coherent(&bp->pdev->dev, FW_BUF_SIZE,
+       bp->gunzip_buf = dma_alloc_coherent(&bp->pdev->linux_dev, FW_BUF_SIZE,
                                            &bp->gunzip_mapping, MEM_WAIT);
        if (bp->gunzip_buf  == NULL)
                goto gunzip_nomem1;
@@ -6539,7 +6539,7 @@ gunzip_nomem3:
        bp->strm = NULL;
 
 gunzip_nomem2:
-       dma_free_coherent(&bp->pdev->dev, FW_BUF_SIZE, bp->gunzip_buf,
+       dma_free_coherent(&bp->pdev->linux_dev, FW_BUF_SIZE, bp->gunzip_buf,
                          bp->gunzip_mapping);
        bp->gunzip_buf = NULL;
 
@@ -6557,8 +6557,8 @@ static void bnx2x_gunzip_end(struct bnx2x *bp)
        }
 
        if (bp->gunzip_buf) {
-               dma_free_coherent(&bp->pdev->dev, FW_BUF_SIZE, bp->gunzip_buf,
-                                 bp->gunzip_mapping);
+               dma_free_coherent(&bp->pdev->linux_dev, FW_BUF_SIZE,
+                                 bp->gunzip_buf, bp->gunzip_mapping);
                bp->gunzip_buf = NULL;
        }
 }
@@ -12736,7 +12736,7 @@ static int bnx2x_set_coherency_mask(struct bnx2x *bp)
 {
        return 0;
 #if 0 // AKAROS_PORT
-       struct device *dev = &bp->pdev->dev;
+       struct device *dev = &bp->pdev->linux_dev;
 
        if (dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64)) != 0 &&
            dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32)) != 0) {
@@ -12768,7 +12768,7 @@ static int bnx2x_init_dev(struct bnx2x *bp, struct pci_device *pdev,
                            board_type == BCM57711 ||
                            board_type == BCM57711E);
 
-       SET_NETDEV_DEV(dev, &pdev->dev);
+       SET_NETDEV_DEV(dev, &pdev->linux_dev);
 
        bp->dev = dev;
        bp->pdev = pdev;
@@ -13120,7 +13120,8 @@ static int bnx2x_init_firmware(struct bnx2x *bp)
        }
        BNX2X_DEV_INFO("Loading %s\n", fw_file_name);
 
-       rc = request_firmware(&bp->firmware, fw_file_name, &bp->pdev->device);
+       rc = request_firmware(&bp->firmware, fw_file_name,
+                             &bp->pdev->linux_dev);
        if (rc) {
                BNX2X_ERR("Can't load firmware file %s\n",
                          fw_file_name);
@@ -13252,7 +13253,7 @@ static int bnx2x_get_num_non_def_sbs(struct pci_device *pdev, int cnic_cnt)
         * one fast path queue: one FP queue + SB for CNIC
         */
        if (pci_find_cap(pdev, PCI_CAP_ID_MSIX, &msix_cap)) {
-               dev_info(&pdev->dev, "no msix capability found\n");
+               dev_info(&pdev->linux_dev, "no msix capability found\n");
                return 1 + cnic_cnt;
        }
 
@@ -13492,7 +13493,7 @@ int bnx2x_init_one(struct ether *dev, struct bnx2x *bp,
         */
        rc = bnx2x_set_int_mode(bp);
        if (rc) {
-               dev_err(&pdev->dev, "Cannot set interrupts\n");
+               dev_err(&pdev->linux_dev, "Cannot set interrupts\n");
                goto init_one_exit;
        }
        BNX2X_DEV_INFO("set interrupts successfully\n");
index e5fdc74..dd8053b 100644 (file)
@@ -601,8 +601,9 @@ int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct,
                buf->nbufs        = 1;
                buf->npages       = 1;
                buf->page_shift   = get_order(size) + PAGE_SHIFT;
-               buf->direct.buf   = dma_alloc_coherent(&dev->persist->pdev->dev,
-                                                      size, &t, gfp);
+               buf->direct.buf   =
+                       dma_alloc_coherent(&dev->persist->pdev->linux_dev, size,
+                                          &t, gfp);
                if (!buf->direct.buf)
                        return -ENOMEM;
 
@@ -630,7 +631,7 @@ int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct,
 
                for (i = 0; i < buf->nbufs; ++i) {
                        buf->page_list[i].buf =
-                               dma_alloc_coherent(&dev->persist->pdev->dev,
+                               dma_alloc_coherent(&dev->persist->pdev->linux_dev,
                                                   PAGE_SIZE,
                                                   &t, gfp);
                        if (!buf->page_list[i].buf)
@@ -670,7 +671,7 @@ void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf)
        int i;
 
        if (buf->nbufs == 1)
-               dma_free_coherent(&dev->persist->pdev->dev, size,
+               dma_free_coherent(&dev->persist->pdev->linux_dev, size,
                                  buf->direct.buf,
                                  buf->direct.map);
        else {
@@ -681,7 +682,7 @@ void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf)
 
                for (i = 0; i < buf->nbufs; ++i)
                        if (buf->page_list[i].buf)
-                               dma_free_coherent(&dev->persist->pdev->dev,
+                               dma_free_coherent(&dev->persist->pdev->linux_dev,
                                                  PAGE_SIZE,
                                                  buf->page_list[i].buf,
                                                  buf->page_list[i].map);
@@ -797,7 +798,7 @@ void mlx4_db_free(struct mlx4_dev *dev, struct mlx4_db *db)
        set_bit(i, db->u.pgdir->bits[o]);
 
        if (bitmap_full(db->u.pgdir->order1, MLX4_DB_PER_PAGE / 2)) {
-               dma_free_coherent(&dev->persist->pdev->dev, PAGE_SIZE,
+               dma_free_coherent(&dev->persist->pdev->linux_dev, PAGE_SIZE,
                                  db->u.pgdir->db_page, db->u.pgdir->db_dma);
                list_del(&db->u.pgdir->list);
                kfree(db->u.pgdir);
index 7f406e7..309f019 100644 (file)
@@ -2469,7 +2469,7 @@ err_comm_admin:
 err_comm:
        iounmap(priv->mfunc.comm);
 err_vhcr:
-       dma_free_coherent(&dev->persist->pdev->dev, PAGE_SIZE,
+       dma_free_coherent(&dev->persist->pdev->linux_dev, PAGE_SIZE,
                          priv->mfunc.vhcr,
                          priv->mfunc.vhcr_dma);
        priv->mfunc.vhcr = NULL;
@@ -2501,10 +2501,10 @@ int mlx4_cmd_init(struct mlx4_dev *dev)
        }
 
        if (mlx4_is_mfunc(dev) && !priv->mfunc.vhcr) {
-               priv->mfunc.vhcr = dma_alloc_coherent(&dev->persist->pdev->dev,
-                                                     PAGE_SIZE,
-                                                     &priv->mfunc.vhcr_dma,
-                                                     MEM_WAIT);
+               priv->mfunc.vhcr =
+                       dma_alloc_coherent(&dev->persist->pdev->linux_dev,
+                                          PAGE_SIZE, &priv->mfunc.vhcr_dma,
+                                          MEM_WAIT);
                if (!priv->mfunc.vhcr)
                        goto err;
 
@@ -2587,7 +2587,7 @@ void mlx4_cmd_cleanup(struct mlx4_dev *dev, int cleanup_mask)
        }
        if (mlx4_is_mfunc(dev) && priv->mfunc.vhcr &&
            (cleanup_mask & MLX4_CMD_CLEANUP_VHCR)) {
-               dma_free_coherent(&dev->persist->pdev->dev, PAGE_SIZE,
+               dma_free_coherent(&dev->persist->pdev->linux_dev, PAGE_SIZE,
                                  priv->mfunc.vhcr, priv->mfunc.vhcr_dma);
                priv->mfunc.vhcr = NULL;
        }
index 12872bc..923b23b 100644 (file)
@@ -291,7 +291,7 @@ void mlx4_en_init_timestamp(struct mlx4_en_dev *mdev)
        snprintf(mdev->ptp_clock_info.name, 16, "mlx4 ptp");
 
        mdev->ptp_clock = ptp_clock_register(&mdev->ptp_clock_info,
-                                            &mdev->pdev->dev);
+                                            &mdev->pdev->linux_dev);
        if (IS_ERR(mdev->ptp_clock)) {
                mdev->ptp_clock = NULL;
                mlx4_err(mdev, "ptp_clock_register failed\n");
index b63375e..2a3b533 100644 (file)
@@ -70,10 +70,10 @@ int mlx4_en_create_cq(struct mlx4_en_priv *priv,
        /* Allocate HW buffers on provided NUMA node.
         * dev->numa_node is used in mtt range allocation flow.
         */
-       set_dev_node(&mdev->dev->persist->pdev->dev, node);
+       set_dev_node(&mdev->dev->persist->pdev->linux_dev, node);
        err = mlx4_alloc_hwq_res(mdev->dev, &cq->wqres,
                                cq->buf_size, 2 * PAGE_SIZE);
-       set_dev_node(&mdev->dev->persist->pdev->dev, mdev->dev->numa_node);
+       set_dev_node(&mdev->dev->persist->pdev->linux_dev, mdev->dev->numa_node);
        if (err)
                goto err_cq;
 
index f8667c0..0e1cab0 100644 (file)
@@ -89,7 +89,7 @@ void en_print(const char *level, const struct mlx4_en_priv *priv,
                       level, DRV_NAME, priv->dev->name, &vaf);
        else
                printk("%s%s: %s: Port %d: %pV",
-                      level, DRV_NAME, dev_name(&priv->mdev->pdev->dev),
+                      level, DRV_NAME, dev_name(&priv->mdev->pdev->linux_dev),
                       priv->port, &vaf);
        va_end(args);
 #else
@@ -101,7 +101,7 @@ void en_print(const char *level, const struct mlx4_en_priv *priv,
                printk("%s%s: %s: ", level, DRV_NAME, priv->dev->name);
        else
                printk("%s%s: %s: Port %d: ", level, DRV_NAME,
-                      dev_name(&priv->mdev->pdev->dev), priv->port);
+                      dev_name(&priv->mdev->pdev->linux_dev), priv->port);
        vcprintf(format, args);
        va_end(args);
        print_unlock();
index c4e3e36..d9f0968 100644 (file)
@@ -2845,7 +2845,7 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
        netif_set_real_num_tx_queues(dev, prof->tx_ring_num);
        netif_set_real_num_rx_queues(dev, prof->rx_ring_num);
 
-       SET_NETDEV_DEV(dev, &mdev->dev->persist->pdev->dev);
+       SET_NETDEV_DEV(dev, &mdev->dev->persist->pdev->linux_dev);
 #else
        dev->ctlr = kzmalloc(sizeof(struct mlx4_en_priv), MEM_WAIT);
 #endif
index 2ee592a..bb3649d 100644 (file)
@@ -384,10 +384,10 @@ int mlx4_en_create_rx_ring(struct mlx4_en_priv *priv,
                 ring->rx_info, tmp);
 
        /* Allocate HW buffers on provided NUMA node */
-       set_dev_node(&mdev->dev->persist->pdev->dev, node);
+       set_dev_node(&mdev->dev->persist->pdev->linux_dev, node);
        err = mlx4_alloc_hwq_res(mdev->dev, &ring->wqres,
                                 ring->buf_size, 2 * PAGE_SIZE);
-       set_dev_node(&mdev->dev->persist->pdev->dev, mdev->dev->numa_node);
+       set_dev_node(&mdev->dev->persist->pdev->linux_dev, mdev->dev->numa_node);
        if (err)
                goto err_info;
 
index 148fb6d..95731da 100644 (file)
@@ -82,10 +82,10 @@ int mlx4_en_create_tx_ring(struct mlx4_en_priv *priv,
        ring->buf_size = ALIGN(size * ring->stride, MLX4_EN_PAGE_SIZE);
 
        /* Allocate HW buffers on provided NUMA node */
-       set_dev_node(&mdev->dev->persist->pdev->dev, node);
+       set_dev_node(&mdev->dev->persist->pdev->linux_dev, node);
        err = mlx4_alloc_hwq_res(mdev->dev, &ring->wqres, ring->buf_size,
                                 2 * PAGE_SIZE);
-       set_dev_node(&mdev->dev->persist->pdev->dev, mdev->dev->numa_node);
+       set_dev_node(&mdev->dev->persist->pdev->linux_dev, mdev->dev->numa_node);
        if (err) {
                en_err(priv, "Failed allocating hwq resources\n");
                goto err_bounce;
index e478afd..4589b08 100644 (file)
@@ -972,10 +972,9 @@ static int mlx4_create_eq(struct mlx4_dev *dev, int nent,
        eq_context = mailbox->buf;
 
        for (i = 0; i < npages; ++i) {
-               eq->page_list[i].buf = dma_alloc_coherent(&dev->persist->
-                                                         pdev->dev,
-                                                         PAGE_SIZE, &t,
-                                                         MEM_WAIT);
+               eq->page_list[i].buf =
+                       dma_alloc_coherent(&dev->persist->pdev->linux_dev,
+                                          PAGE_SIZE, &t, MEM_WAIT);
                if (!eq->page_list[i].buf)
                        goto err_out_free_pages;
 
@@ -1041,8 +1040,8 @@ err_out_free_eq:
 err_out_free_pages:
        for (i = 0; i < npages; ++i)
                if (eq->page_list[i].buf)
-                       dma_free_coherent(&dev->persist->pdev->dev, PAGE_SIZE,
-                                         eq->page_list[i].buf,
+                       dma_free_coherent(&dev->persist->pdev->linux_dev,
+                                         PAGE_SIZE, eq->page_list[i].buf,
                                          eq->page_list[i].map);
 
        mlx4_free_cmd_mailbox(dev, mailbox);
@@ -1075,7 +1074,7 @@ static void mlx4_free_eq(struct mlx4_dev *dev,
 
        mlx4_mtt_cleanup(dev, &eq->mtt);
        for (i = 0; i < npages; ++i)
-               dma_free_coherent(&dev->persist->pdev->dev, PAGE_SIZE,
+               dma_free_coherent(&dev->persist->pdev->linux_dev, PAGE_SIZE,
                                  eq->page_list[i].buf,
                                  eq->page_list[i].map);
 
index 25dcbcd..d3446d4 100644 (file)
@@ -65,7 +65,7 @@ static void mlx4_free_icm_coherent(struct mlx4_dev *dev, struct mlx4_icm_chunk *
        int i;
 
        for (i = 0; i < chunk->npages; ++i)
-               dma_free_coherent(&dev->persist->pdev->dev,
+               dma_free_coherent(&dev->persist->pdev->linux_dev,
                                  chunk->mem[i].length,
                                  lowmem_page_address(sg_page(&chunk->mem[i])),
                                  sg_dma_address(&chunk->mem[i]));
index 2309a21..1c83d18 100644 (file)
@@ -2586,7 +2586,8 @@ static int mlx4_init_port_info(struct mlx4_dev *dev, int port)
        info->port_attr.show      = show_port_type;
        sysfs_attr_init(&info->port_attr.attr);
 
-       err = device_create_file(&dev->persist->pdev->dev, &info->port_attr);
+       err = device_create_file(&dev->persist->pdev->linux_dev,
+                                &info->port_attr);
        if (err) {
                mlx4_err(dev, "Failed to create file for port %d\n", port);
                info->port = -1;
@@ -2605,11 +2606,11 @@ static int mlx4_init_port_info(struct mlx4_dev *dev, int port)
        info->port_mtu_attr.show      = show_port_ib_mtu;
        sysfs_attr_init(&info->port_mtu_attr.attr);
 
-       err = device_create_file(&dev->persist->pdev->dev,
+       err = device_create_file(&dev->persist->pdev->linux_dev,
                                 &info->port_mtu_attr);
        if (err) {
                mlx4_err(dev, "Failed to create mtu file for port %d\n", port);
-               device_remove_file(&info->dev->persist->pdev->dev,
+               device_remove_file(&info->dev->persist->pdev->linux_dev,
                                   &info->port_attr);
                info->port = -1;
        }
@@ -2625,8 +2626,9 @@ static void mlx4_cleanup_port_info(struct mlx4_port_info *info)
        if (info->port < 0)
                return;
 
-       device_remove_file(&info->dev->persist->pdev->dev, &info->port_attr);
-       device_remove_file(&info->dev->persist->pdev->dev,
+       device_remove_file(&info->dev->persist->pdev->linux_dev,
+                          &info->port_attr);
+       device_remove_file(&info->dev->persist->pdev->linux_dev,
                           &info->port_mtu_attr);
 #endif
 }
@@ -2843,7 +2845,7 @@ static int mlx4_load_one(struct pci_device *pdev, int pci_dev_data,
 #if 0 // AKAROS_PORT
        dev->rev_id = pdev->revision;
 #endif
-       dev->numa_node = dev_to_node(&pdev->dev);
+       dev->numa_node = dev_to_node(&pdev->linux_dev);
 
        /* Detect if this device is a virtual function */
        if (pci_dev_data & MLX4_PCI_DEV_IS_VF) {
@@ -3249,7 +3251,8 @@ static int __mlx4_init_one(struct pci_device *pdev, int pci_dev_data,
 
        err = pci_enable_device(pdev);
        if (err) {
-               dev_err(&pdev->dev, "Cannot enable PCI device, aborting\n");
+               dev_err(&pdev->linux_dev,
+                       "Cannot enable PCI device, aborting\n");
                return err;
        }
 
@@ -3261,7 +3264,8 @@ static int __mlx4_init_one(struct pci_device *pdev, int pci_dev_data,
             total_vfs += nvfs[param_map[num_vfs_argc - 1][i]], i++) {
                nvfs[param_map[num_vfs_argc - 1][i]] = num_vfs[i];
                if (nvfs[i] < 0) {
-                       dev_err(&pdev->dev, "num_vfs module parameter cannot be negative\n");
+                       dev_err(&pdev->linux_dev,
+                               "num_vfs module parameter cannot be negative\n");
                        err = -EINVAL;
                        goto err_disable_pdev;
                }
@@ -3270,13 +3274,14 @@ static int __mlx4_init_one(struct pci_device *pdev, int pci_dev_data,
             i++) {
                prb_vf[param_map[probe_vfs_argc - 1][i]] = probe_vf[i];
                if (prb_vf[i] < 0 || prb_vf[i] > nvfs[i]) {
-                       dev_err(&pdev->dev, "probe_vf module parameter cannot be negative or greater than num_vfs\n");
+                       dev_err(&pdev->linux_dev,
+                               "probe_vf module parameter cannot be negative or greater than num_vfs\n");
                        err = -EINVAL;
                        goto err_disable_pdev;
                }
        }
        if (total_vfs >= MLX4_MAX_NUM_VF) {
-               dev_err(&pdev->dev,
+               dev_err(&pdev->linux_dev,
                        "Requested more VF's (%d) than allowed (%d)\n",
                        total_vfs, MLX4_MAX_NUM_VF - 1);
                err = -EINVAL;
@@ -3285,7 +3290,7 @@ static int __mlx4_init_one(struct pci_device *pdev, int pci_dev_data,
 
        for (i = 0; i < MLX4_MAX_PORTS; i++) {
                if (nvfs[i] + nvfs[2] >= MLX4_MAX_NUM_VF_P_PORT) {
-                       dev_err(&pdev->dev,
+                       dev_err(&pdev->linux_dev,
                                "Requested more VF's (%d) for port (%d) than allowed (%d)\n",
                                nvfs[i] + nvfs[2], i + 1,
                                MLX4_MAX_NUM_VF_P_PORT - 1);
@@ -3301,7 +3306,7 @@ static int __mlx4_init_one(struct pci_device *pdev, int pci_dev_data,
 #else
            !pci_get_membar(pdev, 0)) {
 #endif
-               dev_err(&pdev->dev, "Missing DCS, aborting (driver_data: 0x%x, pci_resource_flags(pdev, 0):0x%lx)\n",
+               dev_err(&pdev->linux_dev, "Missing DCS, aborting (driver_data: 0x%x, pci_resource_flags(pdev, 0):0x%lx)\n",
 #if 0 // AKAROS_PORT
                        pci_dev_data, pci_resource_flags(pdev, 0));
 #else
@@ -3315,14 +3320,15 @@ static int __mlx4_init_one(struct pci_device *pdev, int pci_dev_data,
 #else
        if (!pci_get_membar(pdev, 2)) {
 #endif
-               dev_err(&pdev->dev, "Missing UAR, aborting\n");
+               dev_err(&pdev->linux_dev, "Missing UAR, aborting\n");
                err = -ENODEV;
                goto err_disable_pdev;
        }
 
        err = pci_request_regions(pdev, DRV_NAME);
        if (err) {
-               dev_err(&pdev->dev, "Couldn't get PCI resources, aborting\n");
+               dev_err(&pdev->linux_dev,
+                       "Couldn't get PCI resources, aborting\n");
                goto err_disable_pdev;
        }
 
@@ -3330,25 +3336,29 @@ static int __mlx4_init_one(struct pci_device *pdev, int pci_dev_data,
 
        err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
        if (err) {
-               dev_warn(&pdev->dev, "Warning: couldn't set 64-bit PCI DMA mask\n");
+               dev_warn(&pdev->linux_dev,
+                        "Warning: couldn't set 64-bit PCI DMA mask\n");
                err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
                if (err) {
-                       dev_err(&pdev->dev, "Can't set PCI DMA mask, aborting\n");
+                       dev_err(&pdev->linux_dev,
+                               "Can't set PCI DMA mask, aborting\n");
                        goto err_release_regions;
                }
        }
        err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
        if (err) {
-               dev_warn(&pdev->dev, "Warning: couldn't set 64-bit consistent PCI DMA mask\n");
+               dev_warn(&pdev->linux_dev,
+                        "Warning: couldn't set 64-bit consistent PCI DMA mask\n");
                err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
                if (err) {
-                       dev_err(&pdev->dev, "Can't set consistent PCI DMA mask, aborting\n");
+                       dev_err(&pdev->linux_dev,
+                               "Can't set consistent PCI DMA mask, aborting\n");
                        goto err_release_regions;
                }
        }
 
        /* Allow large DMA segments, up to the firmware limit of 1 GB */
-       dma_set_max_seg_size(&pdev->dev, 1024 * 1024 * 1024);
+       dma_set_max_seg_size(&pdev->linux_dev, 1024 * 1024 * 1024);
 #if 0 // AKAROS_PORT
        /* Detect if this device is a virtual function */
        if (pci_dev_data & MLX4_PCI_DEV_IS_VF) {
@@ -3368,7 +3378,7 @@ static int __mlx4_init_one(struct pci_device *pdev, int pci_dev_data,
                        }
                        if ((extended_func_num(pdev) - vfs_offset)
                            > prb_vf[i]) {
-                               dev_warn(&pdev->dev, "Skipping virtual function:%d\n",
+                               dev_warn(&pdev->linux_dev, "Skipping virtual function:%d\n",
                                         extended_func_num(pdev));
                                err = -ENODEV;
                                goto err_release_regions;
index 624b1ca..c8985d7 100644 (file)
@@ -209,16 +209,16 @@ extern int mlx4_debug_level;
 do {                                                                   \
        if (mlx4_debug_level)                                           \
                dev_printk(KERN_DEBUG,                                  \
-                          &(mdev)->persist->pdev->dev, format,         \
+                          &(mdev)->persist->pdev->linux_dev, format,   \
                           ##__VA_ARGS__);                              \
 } while (0)
 
 #define mlx4_err(mdev, format, ...)                                    \
-       dev_err(&(mdev)->persist->pdev->dev, format, ##__VA_ARGS__)
+       dev_err(&(mdev)->persist->pdev->linux_dev, format, ##__VA_ARGS__)
 #define mlx4_info(mdev, format, ...)                                   \
-       dev_info(&(mdev)->persist->pdev->dev, format, ##__VA_ARGS__)
+       dev_info(&(mdev)->persist->pdev->linux_dev, format, ##__VA_ARGS__)
 #define mlx4_warn(mdev, format, ...)                                   \
-       dev_warn(&(mdev)->persist->pdev->dev, format, ##__VA_ARGS__)
+       dev_warn(&(mdev)->persist->pdev->linux_dev, format, ##__VA_ARGS__)
 
 extern int mlx4_log_num_mgm_entry_size;
 extern int log_mtts_per_seg;
index 2d279b1..7ab2e81 100644 (file)
@@ -899,10 +899,10 @@ do {                                                                      \
 
 #define mlx4_err(mdev, format, ...)                                    \
        pr_err(DRV_NAME " %s: " format,                                 \
-              dev_name(&(mdev)->pdev->dev), ##__VA_ARGS__)
+              dev_name(&(mdev)->pdev->linux_dev), ##__VA_ARGS__)
 #define mlx4_info(mdev, format, ...)                                   \
        pr_info(DRV_NAME " %s: " format,                                \
-               dev_name(&(mdev)->pdev->dev), ##__VA_ARGS__)
+               dev_name(&(mdev)->pdev->linux_dev), ##__VA_ARGS__)
 #define mlx4_warn(mdev, format, ...)                                   \
        pr_warn(DRV_NAME " %s: " format,                                \
-               dev_name(&(mdev)->pdev->dev), ##__VA_ARGS__)
+               dev_name(&(mdev)->pdev->linux_dev), ##__VA_ARGS__)
index f197114..e0b6548 100644 (file)
@@ -718,13 +718,13 @@ static int mlx4_write_mtt_chunk(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
        if (!mtts)
                return -ENOMEM;
 
-       dma_sync_single_for_cpu(&dev->persist->pdev->dev, dma_handle,
+       dma_sync_single_for_cpu(&dev->persist->pdev->linux_dev, dma_handle,
                                npages * sizeof (uint64_t), DMA_TO_DEVICE);
 
        for (i = 0; i < npages; ++i)
                mtts[i] = cpu_to_be64(page_list[i] | MLX4_MTT_FLAG_PRESENT);
 
-       dma_sync_single_for_device(&dev->persist->pdev->dev, dma_handle,
+       dma_sync_single_for_device(&dev->persist->pdev->linux_dev, dma_handle,
                                   npages * sizeof (uint64_t), DMA_TO_DEVICE);
 
        return 0;
@@ -1032,13 +1032,14 @@ int mlx4_map_phys_fmr(struct mlx4_dev *dev, struct mlx4_fmr *fmr,
        /* Make sure MPT status is visible before writing MTT entries */
        wmb();
 
-       dma_sync_single_for_cpu(&dev->persist->pdev->dev, fmr->dma_handle,
+       dma_sync_single_for_cpu(&dev->persist->pdev->linux_dev, fmr->dma_handle,
                                npages * sizeof(uint64_t), DMA_TO_DEVICE);
 
        for (i = 0; i < npages; ++i)
                fmr->mtts[i] = cpu_to_be64(page_list[i] | MLX4_MTT_FLAG_PRESENT);
 
-       dma_sync_single_for_device(&dev->persist->pdev->dev, fmr->dma_handle,
+       dma_sync_single_for_device(&dev->persist->pdev->linux_dev,
+                                  fmr->dma_handle,
                                   npages * sizeof(uint64_t), DMA_TO_DEVICE);
 
        fmr->mpt->key    = cpu_to_be32(key);
index 4f2114e..142e2e1 100644 (file)
@@ -401,10 +401,9 @@ struct ib_fast_reg_page_list *mlx4_ib_alloc_fast_reg_page_list(struct ib_device
        if (!mfrpl->ibfrpl.page_list)
                goto err_free;
 
-       mfrpl->mapped_page_list = dma_alloc_coherent(&dev->dev->persist->
-                                                    pdev->dev,
-                                                    size, &mfrpl->map,
-                                                    GFP_KERNEL);
+       mfrpl->mapped_page_list =
+               dma_alloc_coherent(&dev->dev->persist->pdev->linux_dev, size,
+                                  &mfrpl->map, GFP_KERNEL);
        if (!mfrpl->mapped_page_list)
                goto err_free;
 
@@ -424,7 +423,7 @@ void mlx4_ib_free_fast_reg_page_list(struct ib_fast_reg_page_list *page_list)
        struct mlx4_ib_fast_reg_page_list *mfrpl = to_mfrpl(page_list);
        int size = page_list->max_page_list_len * sizeof (u64);
 
-       dma_free_coherent(&dev->dev->persist->pdev->dev, size,
+       dma_free_coherent(&dev->dev->persist->pdev->linux_dev, size,
                          mfrpl->mapped_page_list,
                          mfrpl->map);
        kfree(mfrpl->ibfrpl.page_list);
index 4f57342..e2372b8 100644 (file)
@@ -1677,7 +1677,7 @@ static void __rtl8169_check_link_status(struct ether *dev,
                rtl_link_chg_patch(tp);
                /* This is to cancel a scheduled suspend if there's one. */
                if (pm)
-                       pm_request_resume(&tp->pci_dev->device);
+                       pm_request_resume(&tp->pci_dev->linux_dev);
                netif_carrier_on(dev);
                if (net_ratelimit())
                        netif_info(tp, ifup, dev, "link up\n");
@@ -1685,7 +1685,7 @@ static void __rtl8169_check_link_status(struct ether *dev,
                netif_carrier_off(dev);
                netif_info(tp, ifdown, dev, "link down\n");
                if (pm)
-                       pm_schedule_suspend(&tp->pci_dev->device, 5000);
+                       pm_schedule_suspend(&tp->pci_dev->linux_dev, 5000);
        }
 }
 
@@ -1753,7 +1753,7 @@ static uint32_t __rtl8169_get_wol(struct rtl8169_private *tp)
 static void rtl8169_get_wol(struct ether *dev, struct ethtool_wolinfo *wol)
 {
        struct rtl8169_private *tp = netdev_priv(dev);
-       struct device *d = &tp->pci_dev->device;
+       struct device *d = &tp->pci_dev->linux_dev;
 
        pm_runtime_get_noresume(d);
 
@@ -1859,7 +1859,7 @@ static void __rtl8169_set_wol(struct rtl8169_private *tp, uint32_t wolopts)
 static int rtl8169_set_wol(struct ether *dev, struct ethtool_wolinfo *wol)
 {
        struct rtl8169_private *tp = netdev_priv(dev);
-       struct device *d = &tp->pci_dev->device;
+       struct device *d = &tp->pci_dev->linux_dev;
 
        pm_runtime_get_noresume(d);
 
@@ -1876,7 +1876,7 @@ static int rtl8169_set_wol(struct ether *dev, struct ethtool_wolinfo *wol)
 
        rtl_unlock_work(tp);
 
-       device_set_wakeup_enable(&tp->pci_dev->device, wol->wolopts);
+       device_set_wakeup_enable(&tp->pci_dev->linux_dev, wol->wolopts);
 
        pm_runtime_put_noidle(d);
 
@@ -2345,7 +2345,7 @@ static void rtl8169_get_ethtool_stats(struct ether *dev,
                                      uint64_t *data)
 {
        struct rtl8169_private *tp = netdev_priv(dev);
-       struct device *d = &tp->pci_dev->device;
+       struct device *d = &tp->pci_dev->linux_dev;
        struct rtl8169_counters *counters = tp->counters;
 
        ASSERT_RTNL();
@@ -4530,7 +4530,7 @@ static void rtl_rar_set(struct rtl8169_private *tp, uint8_t *addr)
 static int rtl_set_mac_address(struct ether *dev, void *p)
 {
        struct rtl8169_private *tp = netdev_priv(dev);
-       struct device *d = &tp->pci_dev->device;
+       struct device *d = &tp->pci_dev->linux_dev;
        struct sockaddr *addr = p;
 
        if (!is_valid_ether_addr(addr->sa_data))
@@ -5234,7 +5234,7 @@ static void rtl_request_uncached_firmware(struct rtl8169_private *tp)
        if (!rtl_fw)
                goto err_warn;
 
-       rc = request_firmware(&rtl_fw->fw, name, &tp->pci_dev->device);
+       rc = request_firmware(&rtl_fw->fw, name, &tp->pci_dev->linux_dev);
        if (rc < 0)
                goto err_free;
 
@@ -6756,8 +6756,8 @@ static inline void rtl8169_make_unusable_by_asic(struct RxDesc *desc)
 static void rtl8169_free_rx_databuff(struct rtl8169_private *tp,
                                     void **data_buff, struct RxDesc *desc)
 {
-       dma_unmap_single(&tp->pci_dev->device, le64_to_cpu(desc->addr), rx_buf_sz,
-                        DMA_FROM_DEVICE);
+       dma_unmap_single(&tp->pci_dev->linux_dev, le64_to_cpu(desc->addr),
+                        rx_buf_sz, DMA_FROM_DEVICE);
 
        kfree(*data_buff);
        *data_buff = NULL;
@@ -6793,7 +6793,7 @@ static void *rtl8169_alloc_rx_data(struct rtl8169_private *tp,
 {
        void *data;
        dma_addr_t mapping;
-       struct device *d = &tp->pci_dev->device;
+       struct device *d = &tp->pci_dev->linux_dev;
        struct ether *dev = tp->dev;
 #if 0 // AKAROS_PORT
        int node = dev->dev.parent ? dev_to_node(dev->dev.parent) : -1;
@@ -6909,7 +6909,7 @@ static void rtl8169_tx_clear_range(struct rtl8169_private *tp, uint32_t start,
                if (len) {
                        struct block *bp = tx_skb->block;
 
-                       rtl8169_unmap_tx_skb(&tp->pci_dev->device, tx_skb,
+                       rtl8169_unmap_tx_skb(&tp->pci_dev->linux_dev, tx_skb,
                                             tp->TxDescArray + entry);
                        if (bp) {
                                freeb(bp);
@@ -6962,7 +6962,7 @@ static int rtl8169_xmit_frags(struct rtl8169_private *tp, struct block *bp,
 {
        unsigned int cur_frag, entry;
        struct TxDesc *uninitialized_var(txd);
-       struct device *d = &tp->pci_dev->device;
+       struct device *d = &tp->pci_dev->linux_dev;
 
        entry = tp->cur_tx;
        /* Don't use cur_frag for the loop.  ebd may have holes, but we only
@@ -7217,7 +7217,7 @@ static netdev_tx_t rtl8169_start_xmit(struct block *bp, struct ether *dev)
        unsigned int entry = tp->cur_tx % NUM_TX_DESC;
        struct TxDesc *txd = tp->TxDescArray + entry;
        void __iomem *ioaddr = tp->mmio_addr;
-       struct device *d = &tp->pci_dev->device;
+       struct device *d = &tp->pci_dev->linux_dev;
        dma_addr_t mapping;
        uint32_t status, len;
        uint32_t opts[2];
@@ -7379,7 +7379,7 @@ static void rtl_tx(struct ether *dev, struct rtl8169_private *tp)
                 */
                bus_rmb();
 
-               rtl8169_unmap_tx_skb(&tp->pci_dev->device, tx_skb,
+               rtl8169_unmap_tx_skb(&tp->pci_dev->linux_dev, tx_skb,
                                     tp->TxDescArray + entry);
                if (status & LastFrag) {
                        u64_stats_update_begin(&tp->tx_stats.syncp);
@@ -7444,7 +7444,7 @@ static struct block *rtl8169_try_rx_copy(void *data, struct rtl8169_private *tp,
                                          int pkt_size, dma_addr_t addr)
 {
        struct block *bp;
-       struct device *d = &tp->pci_dev->device;
+       struct device *d = &tp->pci_dev->linux_dev;
 
        data = rtl8169_align(data);
        dma_sync_single_for_cpu(d, addr, pkt_size, DMA_FROM_DEVICE);
@@ -7742,7 +7742,7 @@ static int rtl8169_close(struct ether *dev)
        struct rtl8169_private *tp = netdev_priv(dev);
        struct pci_device *pdev = tp->pci_dev;
 
-       pm_runtime_get_sync(&pdev->device);
+       pm_runtime_get_sync(&pdev->linux_dev);
 
        /* Update counters before going down */
        rtl8169_update_counters(dev);
@@ -7757,14 +7757,14 @@ static int rtl8169_close(struct ether *dev)
 
        free_irq(pdev->irqline, dev);
 
-       dma_free_coherent(&pdev->device, R8169_RX_RING_BYTES, tp->RxDescArray,
+       dma_free_coherent(&pdev->linux_dev, R8169_RX_RING_BYTES, tp->RxDescArray,
                          tp->RxPhyAddr);
-       dma_free_coherent(&pdev->device, R8169_TX_RING_BYTES, tp->TxDescArray,
+       dma_free_coherent(&pdev->linux_dev, R8169_TX_RING_BYTES, tp->TxDescArray,
                          tp->TxPhyAddr);
        tp->TxDescArray = NULL;
        tp->RxDescArray = NULL;
 
-       pm_runtime_put_sync(&pdev->device);
+       pm_runtime_put_sync(&pdev->linux_dev);
 
        return 0;
 }
@@ -7785,19 +7785,19 @@ static int rtl_open(struct ether *dev)
        struct pci_device *pdev = tp->pci_dev;
        int retval = -ENOMEM;
 
-       pm_runtime_get_sync(&pdev->device);
+       pm_runtime_get_sync(&pdev->linux_dev);
 
        /*
         * Rx and Tx descriptors needs 256 bytes alignment.
         * dma_alloc_coherent provides more.
         */
-       tp->TxDescArray = dma_zalloc_coherent(&pdev->device,
+       tp->TxDescArray = dma_zalloc_coherent(&pdev->linux_dev,
                                              R8169_TX_RING_BYTES,
                                              &tp->TxPhyAddr, MEM_WAIT);
        if (!tp->TxDescArray)
                goto err_pm_runtime_put;
 
-       tp->RxDescArray = dma_zalloc_coherent(&pdev->device,
+       tp->RxDescArray = dma_zalloc_coherent(&pdev->linux_dev,
                                              R8169_RX_RING_BYTES,
                                              &tp->RxPhyAddr, MEM_WAIT);
        if (!tp->RxDescArray)
@@ -7841,7 +7841,7 @@ static int rtl_open(struct ether *dev)
        rtl_unlock_work(tp);
 
        tp->saved_wolopts = 0;
-       pm_runtime_put_noidle(&pdev->device);
+       pm_runtime_put_noidle(&pdev->linux_dev);
 
        rtl8169_check_link_status(dev, tp, ioaddr);
 out:
@@ -7851,15 +7851,15 @@ err_release_fw_2:
        rtl_release_firmware(tp);
        rtl8169_rx_clear(tp);
 err_free_rx_1:
-       dma_free_coherent(&pdev->device, R8169_RX_RING_BYTES, tp->RxDescArray,
+       dma_free_coherent(&pdev->linux_dev, R8169_RX_RING_BYTES, tp->RxDescArray,
                          tp->RxPhyAddr);
        tp->RxDescArray = NULL;
 err_free_tx_0:
-       dma_free_coherent(&pdev->device, R8169_TX_RING_BYTES, tp->TxDescArray,
+       dma_free_coherent(&pdev->linux_dev, R8169_TX_RING_BYTES, tp->TxDescArray,
                          tp->TxPhyAddr);
        tp->TxDescArray = NULL;
 err_pm_runtime_put:
-       pm_runtime_put_noidle(&pdev->device);
+       pm_runtime_put_noidle(&pdev->linux_dev);
        goto out;
 }
 
@@ -7872,9 +7872,9 @@ rtl8169_get_stats64(struct ether *dev, struct netif_stats *stats)
        struct rtl8169_counters *counters = tp->counters;
        unsigned int start;
 
-       pm_runtime_get_noresume(&pdev->device);
+       pm_runtime_get_noresume(&pdev->linux_dev);
 
-       if (netif_running(dev) && pm_runtime_active(&pdev->device))
+       if (netif_running(dev) && pm_runtime_active(&pdev->linux_dev))
                rtl8169_rx_missed(dev, ioaddr);
 
        do {
@@ -7902,7 +7902,7 @@ rtl8169_get_stats64(struct ether *dev, struct netif_stats *stats)
         * Fetch additonal counter values missing in stats collected by driver
         * from tally counters.
         */
-       if (pm_runtime_active(&pdev->device))
+       if (pm_runtime_active(&pdev->linux_dev))
                rtl8169_update_counters(dev);
 
        /*
@@ -7916,7 +7916,7 @@ rtl8169_get_stats64(struct ether *dev, struct netif_stats *stats)
        stats->tx_aborted_errors = le16_to_cpu(counters->tx_aborted) -
                le16_to_cpu(tp->tc_offset.tx_aborted);
 
-       pm_runtime_put_noidle(&pdev->device);
+       pm_runtime_put_noidle(&pdev->linux_dev);
 }
 
 static void rtl8169_net_suspend(struct ether *dev)
@@ -8077,7 +8077,7 @@ static void rtl_shutdown(struct pci_device *pdev)
 {
        struct ether *dev = pci_get_drvdata(pdev);
        struct rtl8169_private *tp = netdev_priv(dev);
-       struct device *d = &pdev->device;
+       struct device *d = &pdev->linux_dev;
 
        pm_runtime_get_sync(d);
 
@@ -8124,13 +8124,13 @@ static void rtl_remove_one(struct pci_device *pdev)
 
        unregister_netdev(dev);
 
-       dma_free_coherent(&tp->pci_dev->device, sizeof(*tp->counters),
+       dma_free_coherent(&tp->pci_dev->linux_dev, sizeof(*tp->counters),
                          tp->counters, tp->counters_phys_addr);
 
        rtl_release_firmware(tp);
 
        if (pci_dev_run_wake(pdev))
-               pm_runtime_get_noresume(&pdev->device);
+               pm_runtime_get_noresume(&pdev->linux_dev);
 
 #if 0 // AKAROS_PORT
        /* restore original MAC address */
@@ -8321,7 +8321,7 @@ static int rtl_init_one(struct ether *dev, struct pci_device *pdev,
                       MODULENAME, RTL8169_VERSION);
        }
 
-       SET_NETDEV_DEV(dev, &pdev->device);
+       SET_NETDEV_DEV(dev, &pdev->linux_dev);
        tp = netdev_priv(dev);
        tp->dev = dev;
        tp->pci_dev = pdev;
@@ -8580,7 +8580,7 @@ static int rtl_init_one(struct ether *dev, struct pci_device *pdev,
 
        tp->rtl_fw = RTL_FIRMWARE_UNKNOWN;
 
-       tp->counters = dma_zalloc_coherent(&pdev->device, sizeof(*tp->counters),
+       tp->counters = dma_zalloc_coherent(&pdev->linux_dev, sizeof(*tp->counters),
                                           &tp->counters_phys_addr, MEM_WAIT);
        if (!tp->counters) {
                rc = -ENOMEM;
@@ -8613,11 +8613,11 @@ static int rtl_init_one(struct ether *dev, struct pci_device *pdev,
                rtl8168_driver_start(tp);
        }
 
-       device_set_wakeup_enable(&pdev->device,
+       device_set_wakeup_enable(&pdev->linux_dev,
                                 tp->features & RTL_FEATURE_WOL);
 
        if (pci_dev_run_wake(pdev))
-               pm_runtime_put_noidle(&pdev->device);
+               pm_runtime_put_noidle(&pdev->linux_dev);
 
        netif_carrier_off(dev);
 
@@ -8625,7 +8625,7 @@ out:
        return rc;
 
 err_out_cnt_6:
-       dma_free_coherent(&pdev->device, sizeof(*tp->counters), tp->counters,
+       dma_free_coherent(&pdev->linux_dev, sizeof(*tp->counters), tp->counters,
                          tp->counters_phys_addr);
 err_out_msi_5:
        netif_napi_del(&tp->napi);
index a1eed08..c69e070 100644 (file)
@@ -680,7 +680,7 @@ void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t addr);
 
 #define pci_pool dma_pool
 #define pci_pool_create(name, pdev, size, align, allocation) \
-               dma_pool_create(name, pdev, size, align, allocation)
+       dma_pool_create(name, &pdev->linux_dev, size, align, allocation)
 #define pci_pool_destroy(pool) dma_pool_destroy(pool)
 #define pci_pool_alloc(pool, flags, handle) dma_pool_alloc(pool, flags, handle)
 #define pci_pool_free(pool, vaddr, addr) dma_pool_free(pool, vaddr, addr)
index 58def3d..d8dd3cb 100644 (file)
@@ -147,7 +147,7 @@ struct pci_device *p;
 struct pci_device *p;
 @@
 -p->dev
-+p->device
++p->linux_dev
 
 @@
 struct ether *p;