38 #include <linux/errno.h>
39 #include <linux/kernel.h>
40 #include <linux/module.h>
42 #include <linux/string.h>
45 #define PREFIX "HP SDC MLC: "
53 static struct hp_sdc_mlc_priv_s {
61 static void hp_sdc_mlc_isr (
int irq,
void *
dev_id,
77 if (hp_sdc_mlc_priv.got5x || !idx)
92 hp_sdc_mlc_priv.got5x = 1;
96 hp_sdc_mlc_priv.got5x = 0;
134 tasklet_schedule(mlc->
tasklet);
145 struct hp_sdc_mlc_priv_s *
priv;
153 if (priv->emtestmode) {
182 static int hp_sdc_mlc_cts(
hil_mlc *mlc)
184 struct hp_sdc_mlc_priv_s *
priv;
196 if (priv->trans.act.semaphore != &mlc->
csem)
206 priv->trans.act.semaphore = &mlc->
csem;
207 priv->trans.actidx = 0;
209 priv->trans.endidx = 5;
220 priv->trans.act.semaphore = &mlc->
osem;
225 static void hp_sdc_mlc_out(
hil_mlc *mlc)
227 struct hp_sdc_mlc_priv_s *
priv;
238 if (priv->emtestmode) {
246 priv->trans.actidx = 0;
248 priv->trans.act.semaphore = &mlc->
osem;
249 priv->trans.endidx = 6;
287 priv->trans.actidx = 0;
289 priv->trans.act.semaphore = &mlc->
osem;
290 priv->trans.endidx = 4;
305 static int __init hp_sdc_mlc_init(
void)
317 hp_sdc_mlc_priv.emtestmode = 0;
318 hp_sdc_mlc_priv.trans.seq = hp_sdc_mlc_priv.tseq;
319 hp_sdc_mlc_priv.trans.act.semaphore = &mlc->
osem;
320 hp_sdc_mlc_priv.got5x = 0;
322 mlc->
cts = &hp_sdc_mlc_cts;
323 mlc->
in = &hp_sdc_mlc_in;
324 mlc->
out = &hp_sdc_mlc_out;
325 mlc->
priv = &hp_sdc_mlc_priv;
337 "This is bad. Could cause an oops.\n");
344 static void __exit hp_sdc_mlc_exit(
void)
350 "This is bad. Could cause an oops.\n");
354 "This is bad. Could cause an oops.\n");