Commit 6d23b118 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] drag ATM into the 21st century , part 1

parent 6321043b
...@@ -40,7 +40,7 @@ ifeq ($(CONFIG_ATM_FORE200E_PCA),y) ...@@ -40,7 +40,7 @@ ifeq ($(CONFIG_ATM_FORE200E_PCA),y)
fore_200e-objs += fore200e_pca_fw.o fore_200e-objs += fore200e_pca_fw.o
# guess the target endianess to choose the right PCA-200E firmware image # guess the target endianess to choose the right PCA-200E firmware image
ifeq ($(CONFIG_ATM_FORE200E_PCA_DEFAULT_FW),y) ifeq ($(CONFIG_ATM_FORE200E_PCA_DEFAULT_FW),y)
CONFIG_ATM_FORE200E_PCA_FW = $(shell if test -n "`$(CC) -E -dM $(src)/../../include/asm/byteorder.h | grep ' __LITTLE_ENDIAN '`"; then echo pca200e.bin; else echo pca200e_ecd.bin2; fi) CONFIG_ATM_FORE200E_PCA_FW = $(shell if test -n "`$(CC) -E -dM $(src)/../../include/asm/byteorder.h | grep ' __LITTLE_ENDIAN '`"; then echo $(obj)/pca200e.bin; else echo $(obj)/pca200e_ecd.bin2; fi)
endif endif
endif endif
......
This diff is collapsed.
...@@ -200,7 +200,13 @@ struct cpcs_trailer ...@@ -200,7 +200,13 @@ struct cpcs_trailer
u_short length; u_short length;
u_int crc32; u_int crc32;
}; };
struct cpcs_trailer_desc
{
struct cpcs_trailer *cpcs;
dma_addr_t dma_addr;
};
struct ia_vcc struct ia_vcc
{ {
int rxing; int rxing;
...@@ -272,6 +278,7 @@ struct ext_vc ...@@ -272,6 +278,7 @@ struct ext_vc
#define DLE_ENTRIES 256 #define DLE_ENTRIES 256
#define DMA_INT_ENABLE 0x0002 /* use for both Tx and Rx */ #define DMA_INT_ENABLE 0x0002 /* use for both Tx and Rx */
#define TX_DLE_PSI 0x0001 #define TX_DLE_PSI 0x0001
#define DLE_TOTAL_SIZE (sizeof(struct dle)*DLE_ENTRIES)
/* Descriptor List Entries (DLE) */ /* Descriptor List Entries (DLE) */
struct dle struct dle
...@@ -1017,7 +1024,7 @@ typedef struct iadev_t { ...@@ -1017,7 +1024,7 @@ typedef struct iadev_t {
struct wait_queue *close_wait; struct wait_queue *close_wait;
struct wait_queue *timeout_wait; struct wait_queue *timeout_wait;
#endif #endif
caddr_t *tx_buf; struct cpcs_trailer_desc *tx_buf;
u16 num_tx_desc, tx_buf_sz, rate_limit; u16 num_tx_desc, tx_buf_sz, rate_limit;
u32 tx_cell_cnt, tx_pkt_cnt; u32 tx_cell_cnt, tx_pkt_cnt;
u32 MAIN_VC_TABLE_ADDR, EXT_VC_TABLE_ADDR, ABR_SCHED_TABLE_ADDR; u32 MAIN_VC_TABLE_ADDR, EXT_VC_TABLE_ADDR, ABR_SCHED_TABLE_ADDR;
...@@ -1063,7 +1070,9 @@ typedef struct iadev_t { ...@@ -1063,7 +1070,9 @@ typedef struct iadev_t {
struct desc_tbl_t *desc_tbl; struct desc_tbl_t *desc_tbl;
u_short host_tcq_wr; u_short host_tcq_wr;
struct testTable_t **testTable; struct testTable_t **testTable;
} IADEV; dma_addr_t tx_dle_dma;
dma_addr_t rx_dle_dma;
} IADEV;
#define INPH_IA_DEV(d) ((IADEV *) (d)->dev_data) #define INPH_IA_DEV(d) ((IADEV *) (d)->dev_data)
......
...@@ -2108,8 +2108,7 @@ static inline int __init lanai_pci_start(struct lanai_dev *lanai) ...@@ -2108,8 +2108,7 @@ static inline int __init lanai_pci_start(struct lanai_dev *lanai)
} }
result = pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &w); result = pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &w);
if (result != PCIBIOS_SUCCESSFUL) { if (result != PCIBIOS_SUCCESSFUL) {
printk(KERN_ERR DEV_LABEL "(itf %d): can't read "" printk(KERN_ERR DEV_LABEL "(itf %d): can't read PCI_SUBSYSTEM_ID: %d\n", lanai->number, result);
PCI_SUBSYSTEM_ID: %d\n", lanai->number, result);
return -EINVAL; return -EINVAL;
} }
if ((result = check_board_id_and_rev("PCI", w, NULL)) != 0) if ((result = check_board_id_and_rev("PCI", w, NULL)) != 0)
......
...@@ -1260,13 +1260,13 @@ static void zatm_int(int irq,void *dev_id,struct pt_regs *regs) ...@@ -1260,13 +1260,13 @@ static void zatm_int(int irq,void *dev_id,struct pt_regs *regs)
/* don't handle RD */ /* don't handle RD */
if (reason & uPD98401_INT_SPE) if (reason & uPD98401_INT_SPE)
printk(KERN_ALERT DEV_LABEL "(itf %d): system parity " printk(KERN_ALERT DEV_LABEL "(itf %d): system parity "
"error at 0x%08x\n",dev->number,zin(ADDR)); "error at 0x%08lx\n",dev->number,zin(ADDR));
if (reason & uPD98401_INT_CPE) if (reason & uPD98401_INT_CPE)
printk(KERN_ALERT DEV_LABEL "(itf %d): control memory " printk(KERN_ALERT DEV_LABEL "(itf %d): control memory "
"parity error at 0x%08x\n",dev->number,zin(ADDR)); "parity error at 0x%08lx\n",dev->number,zin(ADDR));
if (reason & uPD98401_INT_SBE) { if (reason & uPD98401_INT_SBE) {
printk(KERN_ALERT DEV_LABEL "(itf %d): system bus " printk(KERN_ALERT DEV_LABEL "(itf %d): system bus "
"error at 0x%08x\n",dev->number,zin(ADDR)); "error at 0x%08lx\n",dev->number,zin(ADDR));
event_dump(); event_dump();
} }
/* don't handle IND */ /* don't handle IND */
...@@ -1448,7 +1448,7 @@ static int __init zatm_init(struct atm_dev *dev) ...@@ -1448,7 +1448,7 @@ static int __init zatm_init(struct atm_dev *dev)
} }
while (t0 > t1 || t1 > t2); /* loop if wrapping ... */ while (t0 > t1 || t1 > t2); /* loop if wrapping ... */
zatm_dev->khz = t2-2*t1+t0; zatm_dev->khz = t2-2*t1+t0;
printk(KERN_NOTICE DEV_LABEL "(itf %d): uPD98401 %d.%d at %d.%03d " printk(KERN_NOTICE DEV_LABEL "(itf %d): uPD98401 %ld.%ld at %d.%03d "
"MHz\n",dev->number, "MHz\n",dev->number,
(zin(VER) & uPD98401_MAJOR) >> uPD98401_MAJOR_SHIFT, (zin(VER) & uPD98401_MAJOR) >> uPD98401_MAJOR_SHIFT,
zin(VER) & uPD98401_MINOR,zatm_dev->khz/1000,zatm_dev->khz % 1000); zin(VER) & uPD98401_MINOR,zatm_dev->khz/1000,zatm_dev->khz % 1000);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment