[PATCH] tms380tr: move to DMA API

This patch makes tms380tr use the new DMA API.  Now that on Alpha, this API
also supports bus master DMA for ISA (platform) devices, i changed the
driver to use this new API.

This also works around a bug in the firmware loader: The example provided
in Documentation/firmware_class no longer works, as the firmware loader now
calls get_kobj_path_length() and the kernel promptly oopses, as the
home-grown device doesn't have a parent.  Of course, this doesn't happen
with a "real" device which has its bus (or pseudo bus in the case of
platform) as parent.

Converted tms380tr to use new DMA API:
  - proteon.c, skisa.c: use platform pseudo bus to create a struct device
  - Space.c: delete init hooks
  - abyss.c, tmspci.c: pass struct device to tms380tr.c
  - tms380tr.c, tms380tr.h: new DMA API, use real device fo firmware loader

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This commit is contained in:
Jochen Friedrich
2005-07-27 01:14:50 -07:00
committed by Jeff Garzik
parent 6b38aefe92
commit 504ff16cec
7 changed files with 122 additions and 143 deletions

View File

@@ -18,7 +18,7 @@ int tms380tr_open(struct net_device *dev);
int tms380tr_close(struct net_device *dev);
irqreturn_t tms380tr_interrupt(int irq, void *dev_id, struct pt_regs *regs);
int tmsdev_init(struct net_device *dev, unsigned long dmalimit,
struct pci_dev *pdev);
struct device *pdev);
void tmsdev_term(struct net_device *dev);
void tms380tr_wait(unsigned long time);
@@ -719,7 +719,7 @@ struct s_TPL { /* Transmit Parameter List (align on even word boundaries) */
struct sk_buff *Skb;
unsigned char TPLIndex;
volatile unsigned char BusyFlag;/* Flag: TPL busy? */
dma_addr_t DMABuff; /* DMA IO bus address from pci_map */
dma_addr_t DMABuff; /* DMA IO bus address from dma_map */
};
/* ---------------------Receive Functions-------------------------------*
@@ -1060,7 +1060,7 @@ struct s_RPL { /* Receive Parameter List */
struct sk_buff *Skb;
SKB_STAT SkbStat;
int RPLIndex;
dma_addr_t DMABuff; /* DMA IO bus address from pci_map */
dma_addr_t DMABuff; /* DMA IO bus address from dma_map */
};
/* Information that need to be kept for each board. */
@@ -1091,7 +1091,7 @@ typedef struct net_local {
RPL *RplTail;
unsigned char LocalRxBuffers[RPL_NUM][DEFAULT_PACKET_SIZE];
struct pci_dev *pdev;
struct device *pdev;
int DataRate;
unsigned char ScbInUse;
unsigned short CMDqueue;