aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/b2c2/flexcop-pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/b2c2/flexcop-pci.c')
-rw-r--r--drivers/media/dvb/b2c2/flexcop-pci.c165
1 files changed, 83 insertions, 82 deletions
diff --git a/drivers/media/dvb/b2c2/flexcop-pci.c b/drivers/media/dvb/b2c2/flexcop-pci.c
index 76e37fd96bb6..227c0200b70a 100644
--- a/drivers/media/dvb/b2c2/flexcop-pci.c
+++ b/drivers/media/dvb/b2c2/flexcop-pci.c
@@ -1,9 +1,7 @@
1/* 1/*
2 * This file is part of linux driver the digital TV devices equipped with B2C2 FlexcopII(b)/III 2 * Linux driver the digital TV devices equipped with B2C2 FlexcopII(b)/III
3 * 3 * flexcop-pci.c - covers the PCI part including DMA transfers
4 * flexcop-pci.c - covers the PCI part including DMA transfers. 4 * see flexcop.c for copyright information
5 *
6 * see flexcop.c for copyright information.
7 */ 5 */
8 6
9#define FC_LOG_PREFIX "flexcop-pci" 7#define FC_LOG_PREFIX "flexcop-pci"
@@ -11,7 +9,8 @@
11 9
12static int enable_pid_filtering = 1; 10static int enable_pid_filtering = 1;
13module_param(enable_pid_filtering, int, 0444); 11module_param(enable_pid_filtering, int, 0444);
14MODULE_PARM_DESC(enable_pid_filtering, "enable hardware pid filtering: supported values: 0 (fullts), 1"); 12MODULE_PARM_DESC(enable_pid_filtering,
13 "enable hardware pid filtering: supported values: 0 (fullts), 1");
15 14
16static int irq_chk_intv = 100; 15static int irq_chk_intv = 100;
17module_param(irq_chk_intv, int, 0644); 16module_param(irq_chk_intv, int, 0644);
@@ -26,17 +25,17 @@ MODULE_PARM_DESC(irq_chk_intv, "set the interval for IRQ streaming watchdog.");
26#define DEBSTATUS " (debugging is not enabled)" 25#define DEBSTATUS " (debugging is not enabled)"
27#endif 26#endif
28 27
29#define deb_info(args...) dprintk(0x01,args) 28#define deb_info(args...) dprintk(0x01, args)
30#define deb_reg(args...) dprintk(0x02,args) 29#define deb_reg(args...) dprintk(0x02, args)
31#define deb_ts(args...) dprintk(0x04,args) 30#define deb_ts(args...) dprintk(0x04, args)
32#define deb_irq(args...) dprintk(0x08,args) 31#define deb_irq(args...) dprintk(0x08, args)
33#define deb_chk(args...) dprintk(0x10,args) 32#define deb_chk(args...) dprintk(0x10, args)
34 33
35static int debug; 34static int debug;
36module_param(debug, int, 0644); 35module_param(debug, int, 0644);
37MODULE_PARM_DESC(debug, 36MODULE_PARM_DESC(debug,
38 "set debug level (1=info,2=regs,4=TS,8=irqdma,16=check (|-able))." 37 "set debug level (1=info,2=regs,4=TS,8=irqdma,16=check (|-able))."
39 DEBSTATUS); 38 DEBSTATUS);
40 39
41#define DRIVER_VERSION "0.1" 40#define DRIVER_VERSION "0.1"
42#define DRIVER_NAME "Technisat/B2C2 FlexCop II/IIb/III Digital TV PCI Driver" 41#define DRIVER_NAME "Technisat/B2C2 FlexCop II/IIb/III Digital TV PCI Driver"
@@ -51,30 +50,30 @@ struct flexcop_pci {
51 50
52 void __iomem *io_mem; 51 void __iomem *io_mem;
53 u32 irq; 52 u32 irq;
54/* buffersize (at least for DMA1, need to be % 188 == 0, 53 /* buffersize (at least for DMA1, need to be % 188 == 0,
55 * this logic is required */ 54 * this logic is required */
56#define FC_DEFAULT_DMA1_BUFSIZE (1280 * 188) 55#define FC_DEFAULT_DMA1_BUFSIZE (1280 * 188)
57#define FC_DEFAULT_DMA2_BUFSIZE (10 * 188) 56#define FC_DEFAULT_DMA2_BUFSIZE (10 * 188)
58 struct flexcop_dma dma[2]; 57 struct flexcop_dma dma[2];
59 58
60 int active_dma1_addr; /* 0 = addr0 of dma1; 1 = addr1 of dma1 */ 59 int active_dma1_addr; /* 0 = addr0 of dma1; 1 = addr1 of dma1 */
61 u32 last_dma1_cur_pos; /* position of the pointer last time the timer/packet irq occured */ 60 u32 last_dma1_cur_pos;
61 /* position of the pointer last time the timer/packet irq occured */
62 int count; 62 int count;
63 int count_prev; 63 int count_prev;
64 int stream_problem; 64 int stream_problem;
65 65
66 spinlock_t irq_lock; 66 spinlock_t irq_lock;
67
68 unsigned long last_irq; 67 unsigned long last_irq;
69 68
70 struct delayed_work irq_check_work; 69 struct delayed_work irq_check_work;
71
72 struct flexcop_device *fc_dev; 70 struct flexcop_device *fc_dev;
73}; 71};
74 72
75static int lastwreg,lastwval,lastrreg,lastrval; 73static int lastwreg, lastwval, lastrreg, lastrval;
76 74
77static flexcop_ibi_value flexcop_pci_read_ibi_reg (struct flexcop_device *fc, flexcop_ibi_register r) 75static flexcop_ibi_value flexcop_pci_read_ibi_reg(struct flexcop_device *fc,
76 flexcop_ibi_register r)
78{ 77{
79 struct flexcop_pci *fc_pci = fc->bus_specific; 78 struct flexcop_pci *fc_pci = fc->bus_specific;
80 flexcop_ibi_value v; 79 flexcop_ibi_value v;
@@ -82,19 +81,20 @@ static flexcop_ibi_value flexcop_pci_read_ibi_reg (struct flexcop_device *fc, fl
82 81
83 if (lastrreg != r || lastrval != v.raw) { 82 if (lastrreg != r || lastrval != v.raw) {
84 lastrreg = r; lastrval = v.raw; 83 lastrreg = r; lastrval = v.raw;
85 deb_reg("new rd: %3x: %08x\n",r,v.raw); 84 deb_reg("new rd: %3x: %08x\n", r, v.raw);
86 } 85 }
87 86
88 return v; 87 return v;
89} 88}
90 89
91static int flexcop_pci_write_ibi_reg(struct flexcop_device *fc, flexcop_ibi_register r, flexcop_ibi_value v) 90static int flexcop_pci_write_ibi_reg(struct flexcop_device *fc,
91 flexcop_ibi_register r, flexcop_ibi_value v)
92{ 92{
93 struct flexcop_pci *fc_pci = fc->bus_specific; 93 struct flexcop_pci *fc_pci = fc->bus_specific;
94 94
95 if (lastwreg != r || lastwval != v.raw) { 95 if (lastwreg != r || lastwval != v.raw) {
96 lastwreg = r; lastwval = v.raw; 96 lastwreg = r; lastwval = v.raw;
97 deb_reg("new wr: %3x: %08x\n",r,v.raw); 97 deb_reg("new wr: %3x: %08x\n", r, v.raw);
98 } 98 }
99 99
100 writel(v.raw, fc_pci->io_mem + r); 100 writel(v.raw, fc_pci->io_mem + r);
@@ -113,15 +113,16 @@ static void flexcop_pci_irq_check_work(struct work_struct *work)
113 deb_chk("no IRQ since the last check\n"); 113 deb_chk("no IRQ since the last check\n");
114 if (fc_pci->stream_problem++ == 3) { 114 if (fc_pci->stream_problem++ == 3) {
115 struct dvb_demux_feed *feed; 115 struct dvb_demux_feed *feed;
116 deb_info("flexcop-pci: stream problem, resetting pid filter\n");
116 117
117 spin_lock_irq(&fc->demux.lock); 118 spin_lock_irq(&fc->demux.lock);
118 list_for_each_entry(feed, &fc->demux.feed_list, 119 list_for_each_entry(feed, &fc->demux.feed_list,
119 list_head) { 120 list_head) {
120 flexcop_pid_feed_control(fc, feed, 0); 121 flexcop_pid_feed_control(fc, feed, 0);
121 } 122 }
122 123
123 list_for_each_entry(feed, &fc->demux.feed_list, 124 list_for_each_entry(feed, &fc->demux.feed_list,
124 list_head) { 125 list_head) {
125 flexcop_pid_feed_control(fc, feed, 1); 126 flexcop_pid_feed_control(fc, feed, 1);
126 } 127 }
127 spin_unlock_irq(&fc->demux.lock); 128 spin_unlock_irq(&fc->demux.lock);
@@ -149,11 +150,10 @@ static irqreturn_t flexcop_pci_isr(int irq, void *dev_id)
149 flexcop_ibi_value v; 150 flexcop_ibi_value v;
150 irqreturn_t ret = IRQ_HANDLED; 151 irqreturn_t ret = IRQ_HANDLED;
151 152
152 spin_lock_irqsave(&fc_pci->irq_lock,flags); 153 spin_lock_irqsave(&fc_pci->irq_lock, flags);
153 154 v = fc->read_ibi_reg(fc, irq_20c);
154 v = fc->read_ibi_reg(fc,irq_20c);
155 155
156 /* errors */ 156 /* errors */
157 if (v.irq_20c.Data_receiver_error) 157 if (v.irq_20c.Data_receiver_error)
158 deb_chk("data receiver error\n"); 158 deb_chk("data receiver error\n");
159 if (v.irq_20c.Continuity_error_flag) 159 if (v.irq_20c.Continuity_error_flag)
@@ -164,24 +164,29 @@ static irqreturn_t flexcop_pci_isr(int irq, void *dev_id)
164 deb_chk("Transport error\n"); 164 deb_chk("Transport error\n");
165 165
166 if ((fc_pci->count % 1000) == 0) 166 if ((fc_pci->count % 1000) == 0)
167 deb_chk("%d valid irq took place so far\n",fc_pci->count); 167 deb_chk("%d valid irq took place so far\n", fc_pci->count);
168 168
169 if (v.irq_20c.DMA1_IRQ_Status == 1) { 169 if (v.irq_20c.DMA1_IRQ_Status == 1) {
170 if (fc_pci->active_dma1_addr == 0) 170 if (fc_pci->active_dma1_addr == 0)
171 flexcop_pass_dmx_packets(fc_pci->fc_dev,fc_pci->dma[0].cpu_addr0,fc_pci->dma[0].size / 188); 171 flexcop_pass_dmx_packets(fc_pci->fc_dev,
172 fc_pci->dma[0].cpu_addr0,
173 fc_pci->dma[0].size / 188);
172 else 174 else
173 flexcop_pass_dmx_packets(fc_pci->fc_dev,fc_pci->dma[0].cpu_addr1,fc_pci->dma[0].size / 188); 175 flexcop_pass_dmx_packets(fc_pci->fc_dev,
176 fc_pci->dma[0].cpu_addr1,
177 fc_pci->dma[0].size / 188);
174 178
175 deb_irq("page change to page: %d\n",!fc_pci->active_dma1_addr); 179 deb_irq("page change to page: %d\n",!fc_pci->active_dma1_addr);
176 fc_pci->active_dma1_addr = !fc_pci->active_dma1_addr; 180 fc_pci->active_dma1_addr = !fc_pci->active_dma1_addr;
177 } else if (v.irq_20c.DMA1_Timer_Status == 1) {
178 /* for the timer IRQ we only can use buffer dmx feeding, because we don't have 181 /* for the timer IRQ we only can use buffer dmx feeding, because we don't have
179 * complete TS packets when reading from the DMA memory */ 182 * complete TS packets when reading from the DMA memory */
183 } else if (v.irq_20c.DMA1_Timer_Status == 1) {
180 dma_addr_t cur_addr = 184 dma_addr_t cur_addr =
181 fc->read_ibi_reg(fc,dma1_008).dma_0x8.dma_cur_addr << 2; 185 fc->read_ibi_reg(fc,dma1_008).dma_0x8.dma_cur_addr << 2;
182 u32 cur_pos = cur_addr - fc_pci->dma[0].dma_addr0; 186 u32 cur_pos = cur_addr - fc_pci->dma[0].dma_addr0;
183 187
184 deb_irq("%u irq: %08x cur_addr: %llx: cur_pos: %08x, last_cur_pos: %08x ", 188 deb_irq("%u irq: %08x cur_addr: %llx: cur_pos: %08x, "
189 "last_cur_pos: %08x ",
185 jiffies_to_usecs(jiffies - fc_pci->last_irq), 190 jiffies_to_usecs(jiffies - fc_pci->last_irq),
186 v.raw, (unsigned long long)cur_addr, cur_pos, 191 v.raw, (unsigned long long)cur_addr, cur_pos,
187 fc_pci->last_dma1_cur_pos); 192 fc_pci->last_dma1_cur_pos);
@@ -191,30 +196,36 @@ static irqreturn_t flexcop_pci_isr(int irq, void *dev_id)
191 * pass the data from last_cur_pos to the buffer end to the demux 196 * pass the data from last_cur_pos to the buffer end to the demux
192 */ 197 */
193 if (cur_pos < fc_pci->last_dma1_cur_pos) { 198 if (cur_pos < fc_pci->last_dma1_cur_pos) {
194 deb_irq(" end was reached: passing %d bytes ",(fc_pci->dma[0].size*2 - 1) - fc_pci->last_dma1_cur_pos); 199 deb_irq(" end was reached: passing %d bytes ",
200 (fc_pci->dma[0].size*2 - 1) -
201 fc_pci->last_dma1_cur_pos);
195 flexcop_pass_dmx_data(fc_pci->fc_dev, 202 flexcop_pass_dmx_data(fc_pci->fc_dev,
196 fc_pci->dma[0].cpu_addr0 + fc_pci->last_dma1_cur_pos, 203 fc_pci->dma[0].cpu_addr0 +
197 (fc_pci->dma[0].size*2) - fc_pci->last_dma1_cur_pos); 204 fc_pci->last_dma1_cur_pos,
205 (fc_pci->dma[0].size*2) -
206 fc_pci->last_dma1_cur_pos);
198 fc_pci->last_dma1_cur_pos = 0; 207 fc_pci->last_dma1_cur_pos = 0;
199 } 208 }
200 209
201 if (cur_pos > fc_pci->last_dma1_cur_pos) { 210 if (cur_pos > fc_pci->last_dma1_cur_pos) {
202 deb_irq(" passing %d bytes ",cur_pos - fc_pci->last_dma1_cur_pos); 211 deb_irq(" passing %d bytes ",
212 cur_pos - fc_pci->last_dma1_cur_pos);
203 flexcop_pass_dmx_data(fc_pci->fc_dev, 213 flexcop_pass_dmx_data(fc_pci->fc_dev,
204 fc_pci->dma[0].cpu_addr0 + fc_pci->last_dma1_cur_pos, 214 fc_pci->dma[0].cpu_addr0 +
205 cur_pos - fc_pci->last_dma1_cur_pos); 215 fc_pci->last_dma1_cur_pos,
216 cur_pos - fc_pci->last_dma1_cur_pos);
206 } 217 }
207 deb_irq("\n"); 218 deb_irq("\n");
208 219
209 fc_pci->last_dma1_cur_pos = cur_pos; 220 fc_pci->last_dma1_cur_pos = cur_pos;
210 fc_pci->count++; 221 fc_pci->count++;
211 } else { 222 } else {
212 deb_irq("isr for flexcop called, apparently without reason (%08x)\n",v.raw); 223 deb_irq("isr for flexcop called, "
224 "apparently without reason (%08x)\n", v.raw);
213 ret = IRQ_NONE; 225 ret = IRQ_NONE;
214 } 226 }
215 227
216 spin_unlock_irqrestore(&fc_pci->irq_lock,flags); 228 spin_unlock_irqrestore(&fc_pci->irq_lock, flags);
217
218 return ret; 229 return ret;
219} 230}
220 231
@@ -222,52 +233,48 @@ static int flexcop_pci_stream_control(struct flexcop_device *fc, int onoff)
222{ 233{
223 struct flexcop_pci *fc_pci = fc->bus_specific; 234 struct flexcop_pci *fc_pci = fc->bus_specific;
224 if (onoff) { 235 if (onoff) {
225 flexcop_dma_config(fc,&fc_pci->dma[0],FC_DMA_1); 236 flexcop_dma_config(fc, &fc_pci->dma[0], FC_DMA_1);
226 flexcop_dma_config(fc,&fc_pci->dma[1],FC_DMA_2); 237 flexcop_dma_config(fc, &fc_pci->dma[1], FC_DMA_2);
227 238 flexcop_dma_config_timer(fc, FC_DMA_1, 0);
228 flexcop_dma_config_timer(fc,FC_DMA_1,0); 239 flexcop_dma_xfer_control(fc, FC_DMA_1,
229 240 FC_DMA_SUBADDR_0 | FC_DMA_SUBADDR_1, 1);
230 flexcop_dma_xfer_control(fc,FC_DMA_1,FC_DMA_SUBADDR_0 | FC_DMA_SUBADDR_1,1);
231 deb_irq("DMA xfer enabled\n"); 241 deb_irq("DMA xfer enabled\n");
232 242
233 fc_pci->last_dma1_cur_pos = 0; 243 fc_pci->last_dma1_cur_pos = 0;
234 flexcop_dma_control_timer_irq(fc,FC_DMA_1,1); 244 flexcop_dma_control_timer_irq(fc, FC_DMA_1, 1);
235 deb_irq("IRQ enabled\n"); 245 deb_irq("IRQ enabled\n");
236
237 fc_pci->count_prev = fc_pci->count; 246 fc_pci->count_prev = fc_pci->count;
238
239// fc_pci->active_dma1_addr = 0;
240// flexcop_dma_control_size_irq(fc,FC_DMA_1,1);
241
242 } else { 247 } else {
243 flexcop_dma_control_timer_irq(fc,FC_DMA_1,0); 248 flexcop_dma_control_timer_irq(fc, FC_DMA_1, 0);
244 deb_irq("IRQ disabled\n"); 249 deb_irq("IRQ disabled\n");
245 250
246// flexcop_dma_control_size_irq(fc,FC_DMA_1,0); 251 flexcop_dma_xfer_control(fc, FC_DMA_1,
247 252 FC_DMA_SUBADDR_0 | FC_DMA_SUBADDR_1, 0);
248 flexcop_dma_xfer_control(fc,FC_DMA_1,FC_DMA_SUBADDR_0 | FC_DMA_SUBADDR_1,0);
249 deb_irq("DMA xfer disabled\n"); 253 deb_irq("DMA xfer disabled\n");
250 } 254 }
251
252 return 0; 255 return 0;
253} 256}
254 257
255static int flexcop_pci_dma_init(struct flexcop_pci *fc_pci) 258static int flexcop_pci_dma_init(struct flexcop_pci *fc_pci)
256{ 259{
257 int ret; 260 int ret;
258 if ((ret = flexcop_dma_allocate(fc_pci->pdev,&fc_pci->dma[0],FC_DEFAULT_DMA1_BUFSIZE)) != 0) 261 ret = flexcop_dma_allocate(fc_pci->pdev, &fc_pci->dma[0],
262 FC_DEFAULT_DMA1_BUFSIZE);
263 if (ret != 0)
259 return ret; 264 return ret;
260 265
261 if ((ret = flexcop_dma_allocate(fc_pci->pdev,&fc_pci->dma[1],FC_DEFAULT_DMA2_BUFSIZE)) != 0) { 266 ret = flexcop_dma_allocate(fc_pci->pdev, &fc_pci->dma[1],
267 FC_DEFAULT_DMA2_BUFSIZE);
268 if (ret != 0) {
262 flexcop_dma_free(&fc_pci->dma[0]); 269 flexcop_dma_free(&fc_pci->dma[0]);
263 return ret; 270 return ret;
264 } 271 }
265 272
266 flexcop_sram_set_dest(fc_pci->fc_dev,FC_SRAM_DEST_MEDIA | FC_SRAM_DEST_NET, FC_SRAM_DEST_TARGET_DMA1); 273 flexcop_sram_set_dest(fc_pci->fc_dev, FC_SRAM_DEST_MEDIA |
267 flexcop_sram_set_dest(fc_pci->fc_dev,FC_SRAM_DEST_CAO | FC_SRAM_DEST_CAI, FC_SRAM_DEST_TARGET_DMA2); 274 FC_SRAM_DEST_NET, FC_SRAM_DEST_TARGET_DMA1);
268 275 flexcop_sram_set_dest(fc_pci->fc_dev, FC_SRAM_DEST_CAO |
276 FC_SRAM_DEST_CAI, FC_SRAM_DEST_TARGET_DMA2);
269 fc_pci->init_state |= FC_PCI_DMA_INIT; 277 fc_pci->init_state |= FC_PCI_DMA_INIT;
270
271 return ret; 278 return ret;
272} 279}
273 280
@@ -290,12 +297,8 @@ static int flexcop_pci_init(struct flexcop_pci *fc_pci)
290 297
291 if ((ret = pci_enable_device(fc_pci->pdev)) != 0) 298 if ((ret = pci_enable_device(fc_pci->pdev)) != 0)
292 return ret; 299 return ret;
293
294 pci_set_master(fc_pci->pdev); 300 pci_set_master(fc_pci->pdev);
295 301
296 /* enable interrupts */
297 // pci_write_config_dword(pdev, 0x6c, 0x8000);
298
299 if ((ret = pci_request_regions(fc_pci->pdev, DRIVER_NAME)) != 0) 302 if ((ret = pci_request_regions(fc_pci->pdev, DRIVER_NAME)) != 0)
300 goto err_pci_disable_device; 303 goto err_pci_disable_device;
301 304
@@ -338,8 +341,8 @@ static void flexcop_pci_exit(struct flexcop_pci *fc_pci)
338 fc_pci->init_state &= ~FC_PCI_INIT; 341 fc_pci->init_state &= ~FC_PCI_INIT;
339} 342}
340 343
341 344static int flexcop_pci_probe(struct pci_dev *pdev,
342static int flexcop_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) 345 const struct pci_device_id *ent)
343{ 346{
344 struct flexcop_device *fc; 347 struct flexcop_device *fc;
345 struct flexcop_pci *fc_pci; 348 struct flexcop_pci *fc_pci;
@@ -350,7 +353,7 @@ static int flexcop_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
350 return -ENOMEM; 353 return -ENOMEM;
351 } 354 }
352 355
353/* general flexcop init */ 356 /* general flexcop init */
354 fc_pci = fc->bus_specific; 357 fc_pci = fc->bus_specific;
355 fc_pci->fc_dev = fc; 358 fc_pci->fc_dev = fc;
356 359
@@ -358,7 +361,6 @@ static int flexcop_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
358 fc->write_ibi_reg = flexcop_pci_write_ibi_reg; 361 fc->write_ibi_reg = flexcop_pci_write_ibi_reg;
359 fc->i2c_request = flexcop_i2c_request; 362 fc->i2c_request = flexcop_i2c_request;
360 fc->get_mac_addr = flexcop_eeprom_check_mac_addr; 363 fc->get_mac_addr = flexcop_eeprom_check_mac_addr;
361
362 fc->stream_control = flexcop_pci_stream_control; 364 fc->stream_control = flexcop_pci_stream_control;
363 365
364 if (enable_pid_filtering) 366 if (enable_pid_filtering)
@@ -368,29 +370,29 @@ static int flexcop_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
368 370
369 fc->pid_filtering = enable_pid_filtering; 371 fc->pid_filtering = enable_pid_filtering;
370 fc->bus_type = FC_PCI; 372 fc->bus_type = FC_PCI;
371
372 fc->dev = &pdev->dev; 373 fc->dev = &pdev->dev;
373 fc->owner = THIS_MODULE; 374 fc->owner = THIS_MODULE;
374 375
375/* bus specific part */ 376 /* bus specific part */
376 fc_pci->pdev = pdev; 377 fc_pci->pdev = pdev;
377 if ((ret = flexcop_pci_init(fc_pci)) != 0) 378 if ((ret = flexcop_pci_init(fc_pci)) != 0)
378 goto err_kfree; 379 goto err_kfree;
379 380
380/* init flexcop */ 381 /* init flexcop */
381 if ((ret = flexcop_device_initialize(fc)) != 0) 382 if ((ret = flexcop_device_initialize(fc)) != 0)
382 goto err_pci_exit; 383 goto err_pci_exit;
383 384
384/* init dma */ 385 /* init dma */
385 if ((ret = flexcop_pci_dma_init(fc_pci)) != 0) 386 if ((ret = flexcop_pci_dma_init(fc_pci)) != 0)
386 goto err_fc_exit; 387 goto err_fc_exit;
387 388
388 INIT_DELAYED_WORK(&fc_pci->irq_check_work, flexcop_pci_irq_check_work); 389 INIT_DELAYED_WORK(&fc_pci->irq_check_work, flexcop_pci_irq_check_work);
389 390
390 if (irq_chk_intv > 0) 391 if (irq_chk_intv > 0)
391 schedule_delayed_work(&fc_pci->irq_check_work, 392 schedule_delayed_work(&fc_pci->irq_check_work,
392 msecs_to_jiffies(irq_chk_intv < 100 ? 100 : irq_chk_intv)); 393 msecs_to_jiffies(irq_chk_intv < 100 ?
393 394 100 :
395 irq_chk_intv));
394 return ret; 396 return ret;
395 397
396err_fc_exit: 398err_fc_exit:
@@ -420,7 +422,6 @@ static void flexcop_pci_remove(struct pci_dev *pdev)
420 422
421static struct pci_device_id flexcop_pci_tbl[] = { 423static struct pci_device_id flexcop_pci_tbl[] = {
422 { PCI_DEVICE(0x13d0, 0x2103) }, 424 { PCI_DEVICE(0x13d0, 0x2103) },
423/* { PCI_DEVICE(0x13d0, 0x2200) }, ? */
424 { }, 425 { },
425}; 426};
426 427