[PATCH 2.5.8] farsync.c driver updates

Kevin Curtis (kevin.curtis@farsite.co.uk)
Mon, 15 Apr 2002 11:10:34 +0100


Andrew,
please incorporate the following patch into the next release of the
2.5 Kernel. It removes the references to the rmem_start and rmem_end fields
no longer supported in the net device structure, and moves the call to the
pci_enable_device (thanks Morten).

Kevin

--- farsync.c.orig Mon Apr 15 10:38:41 2002
+++ farsync.c Mon Apr 15 10:42:03 2002
@@ -1469,10 +1469,6 @@
+ BUF_OFFSET ( txBuffer[i][0][0]);
dev->mem_end = card->phys_mem
+ BUF_OFFSET (
txBuffer[i][NUM_TX_BUFFER][0]);
- dev->rmem_start = card->phys_mem
- + BUF_OFFSET ( rxBuffer[i][0][0]);
- dev->rmem_end = card->phys_mem
- + BUF_OFFSET (
rxBuffer[i][NUM_RX_BUFFER][0]);
dev->base_addr = card->pci_conf;
dev->irq = card->irq;

@@ -1531,6 +1527,13 @@
}
memset ( card, 0, sizeof ( struct fst_card_info ));

+ /* Try to enable the device */
+ if (( err = pci_enable_device ( pdev )) != 0 )
+ {
+ printk_err ("Failed to enable card. Err %d\n", -err );
+ goto error_free_card;
+ }
+
/* Record info we need*/
card->irq = pdev->irq;
card->pci_conf = pci_resource_start ( pdev, 1 );
@@ -1570,12 +1573,6 @@
goto error_release_mem;
}

- /* Try to enable the device */
- if (( err = pci_enable_device ( pdev )) != 0 )
- {
- printk_err ("Failed to enable card. Err %d\n", -err );
- goto error_release_ctlmem;
- }

/* Get virtual addresses of memory regions */
if (( card->mem = ioremap ( card->phys_mem, FST_MEMSIZE )) == NULL
)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/