提交 2133ffbf 编写于 作者: M Manu Abraham 提交者: Mauro Carvalho Chehab

V4L/DVB (13745): [Mantis CA] Add some debug statements

Signed-off-by: NManu Abraham <manu@linuxtv.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 4e9fbeee
...@@ -25,6 +25,9 @@ ...@@ -25,6 +25,9 @@
static int mantis_ca_read_attr_mem(struct dvb_ca_en50221 *en50221, int slot, int addr) static int mantis_ca_read_attr_mem(struct dvb_ca_en50221 *en50221, int slot, int addr)
{ {
struct mantis_ca *ca = en50221->data; struct mantis_ca *ca = en50221->data;
struct mantis_pci *mantis = ca->ca_priv;
dprintk(verbose, MANTIS_DEBUG, 1, "Slot(%d): Request Attribute Mem Read", slot);
if (slot != 0) if (slot != 0)
return -EINVAL; return -EINVAL;
...@@ -35,6 +38,9 @@ static int mantis_ca_read_attr_mem(struct dvb_ca_en50221 *en50221, int slot, int ...@@ -35,6 +38,9 @@ static int mantis_ca_read_attr_mem(struct dvb_ca_en50221 *en50221, int slot, int
static int mantis_ca_write_attr_mem(struct dvb_ca_en50221 *en50221, int slot, int addr, u8 data) static int mantis_ca_write_attr_mem(struct dvb_ca_en50221 *en50221, int slot, int addr, u8 data)
{ {
struct mantis_ca *ca = en50221->data; struct mantis_ca *ca = en50221->data;
struct mantis_pci *mantis = ca->ca_priv;
dprintk(verbose, MANTIS_DEBUG, 1, "Slot(%d): Request Attribute Mem Write", slot);
if (slot != 0) if (slot != 0)
return -EINVAL; return -EINVAL;
...@@ -45,6 +51,9 @@ static int mantis_ca_write_attr_mem(struct dvb_ca_en50221 *en50221, int slot, in ...@@ -45,6 +51,9 @@ static int mantis_ca_write_attr_mem(struct dvb_ca_en50221 *en50221, int slot, in
static int mantis_ca_read_cam_ctl(struct dvb_ca_en50221 *en50221, int slot, u8 addr) static int mantis_ca_read_cam_ctl(struct dvb_ca_en50221 *en50221, int slot, u8 addr)
{ {
struct mantis_ca *ca = en50221->data; struct mantis_ca *ca = en50221->data;
struct mantis_pci *mantis = ca->ca_priv;
dprintk(verbose, MANTIS_DEBUG, 1, "Slot(%d): Request CAM control Read", slot);
if (slot != 0) if (slot != 0)
return -EINVAL; return -EINVAL;
...@@ -55,6 +64,9 @@ static int mantis_ca_read_cam_ctl(struct dvb_ca_en50221 *en50221, int slot, u8 a ...@@ -55,6 +64,9 @@ static int mantis_ca_read_cam_ctl(struct dvb_ca_en50221 *en50221, int slot, u8 a
static int mantis_ca_write_cam_ctl(struct dvb_ca_en50221 *en50221, int slot, u8 addr, u8 data) static int mantis_ca_write_cam_ctl(struct dvb_ca_en50221 *en50221, int slot, u8 addr, u8 data)
{ {
struct mantis_ca *ca = en50221->data; struct mantis_ca *ca = en50221->data;
struct mantis_pci *mantis = ca->ca_priv;
dprintk(verbose, MANTIS_DEBUG, 1, "Slot(%d): Request CAM control Write", slot);
if (slot != 0) if (slot != 0)
return -EINVAL; return -EINVAL;
...@@ -64,22 +76,40 @@ static int mantis_ca_write_cam_ctl(struct dvb_ca_en50221 *en50221, int slot, u8 ...@@ -64,22 +76,40 @@ static int mantis_ca_write_cam_ctl(struct dvb_ca_en50221 *en50221, int slot, u8
static int mantis_ca_slot_reset(struct dvb_ca_en50221 *en50221, int slot) static int mantis_ca_slot_reset(struct dvb_ca_en50221 *en50221, int slot)
{ {
struct mantis_ca *ca = en50221->data;
struct mantis_pci *mantis = ca->ca_priv;
dprintk(verbose, MANTIS_DEBUG, 1, "Slot(%d): Slot RESET", slot);
return 0; return 0;
} }
static int mantis_ca_slot_shutdown(struct dvb_ca_en50221 *en50221, int slot) static int mantis_ca_slot_shutdown(struct dvb_ca_en50221 *en50221, int slot)
{ {
struct mantis_ca *ca = en50221->data;
struct mantis_pci *mantis = ca->ca_priv;
dprintk(verbose, MANTIS_DEBUG, 1, "Slot(%d): Slot shutdown", slot);
return 0; return 0;
} }
static int mantis_ts_control(struct dvb_ca_en50221 *en50221, int slot) static int mantis_ts_control(struct dvb_ca_en50221 *en50221, int slot)
{ {
struct mantis_ca *ca = en50221->data;
struct mantis_pci *mantis = ca->ca_priv;
dprintk(verbose, MANTIS_DEBUG, 1, "Slot(%d): TS control", slot);
return 0; return 0;
} }
static int mantis_slot_status(struct dvb_ca_en50221 *en50221, int slot, int open) static int mantis_slot_status(struct dvb_ca_en50221 *en50221, int slot, int open)
{ {
struct mantis_ca *ca = en50221->data; struct mantis_ca *ca = en50221->data;
struct mantis_pci *mantis = ca->ca_priv;
dprintk(verbose, MANTIS_DEBUG, 1, "Slot(%d): Poll Slot status", slot);
if (ca->slot_state == MODULE_INSERTED) if (ca->slot_state == MODULE_INSERTED)
return DVB_CA_EN50221_POLL_CAM_PRESENT | DVB_CA_EN50221_POLL_CAM_READY; return DVB_CA_EN50221_POLL_CAM_PRESENT | DVB_CA_EN50221_POLL_CAM_READY;
...@@ -93,6 +123,7 @@ int mantis_ca_init(struct mantis_pci *mantis) ...@@ -93,6 +123,7 @@ int mantis_ca_init(struct mantis_pci *mantis)
struct mantis_ca *ca; struct mantis_ca *ca;
int ca_flags = 0, result; int ca_flags = 0, result;
dprintk(verbose, MANTIS_DEBUG, 1, "Initializing Mantis CA");
if (!(ca = kzalloc(sizeof (struct mantis_ca), GFP_KERNEL))) { if (!(ca = kzalloc(sizeof (struct mantis_ca), GFP_KERNEL))) {
dprintk(verbose, MANTIS_ERROR, 1, "Out of memory!, exiting .."); dprintk(verbose, MANTIS_ERROR, 1, "Out of memory!, exiting ..");
result = -ENOMEM; result = -ENOMEM;
...@@ -130,6 +161,9 @@ int mantis_ca_init(struct mantis_pci *mantis) ...@@ -130,6 +161,9 @@ int mantis_ca_init(struct mantis_pci *mantis)
void mantis_ca_exit(struct mantis_pci *mantis) void mantis_ca_exit(struct mantis_pci *mantis)
{ {
struct mantis_ca *ca = mantis->mantis_ca; struct mantis_ca *ca = mantis->mantis_ca;
struct mantis_pci *mantis = ca->ca_priv;
dprintk(verbose, MANTIS_DEBUG, 1, "Mantis CA exit");
mantis_evmgr_exit(ca); mantis_evmgr_exit(ca);
dprintk(verbose, MANTIS_ERROR, 1, "Unregistering EN50221 device"); dprintk(verbose, MANTIS_ERROR, 1, "Unregistering EN50221 device");
......
...@@ -61,6 +61,7 @@ int mantis_hif_read_mem(struct mantis_ca *ca, u32 addr) ...@@ -61,6 +61,7 @@ int mantis_hif_read_mem(struct mantis_ca *ca, u32 addr)
struct mantis_pci *mantis = ca->ca_priv; struct mantis_pci *mantis = ca->ca_priv;
u32 hif_addr = 0, data, count = 4; u32 hif_addr = 0, data, count = 4;
dprintk(verbose, MANTIS_DEBUG, 1, "Adapter(%d) Slot(0): Request HIF Mem Read", mantis->num);
hif_addr |= MANTIS_GPIF_HIFRDWRN; hif_addr |= MANTIS_GPIF_HIFRDWRN;
hif_addr &= ~MANTIS_GPIF_PCMCIAREG; hif_addr &= ~MANTIS_GPIF_PCMCIAREG;
hif_addr &= ~MANTIS_GPIF_PCMCIAIOM; hif_addr &= ~MANTIS_GPIF_PCMCIAIOM;
...@@ -91,6 +92,7 @@ int mantis_hif_write_mem(struct mantis_ca *ca, u32 addr, u8 data) ...@@ -91,6 +92,7 @@ int mantis_hif_write_mem(struct mantis_ca *ca, u32 addr, u8 data)
struct mantis_pci *mantis = ca->ca_priv; struct mantis_pci *mantis = ca->ca_priv;
u32 hif_addr = 0; u32 hif_addr = 0;
dprintk(verbose, MANTIS_DEBUG, 1, "Adapter(%d) Slot(0): Request HIF Mem Write", mantis->num);
hif_addr &= ~MANTIS_GPIF_HIFRDWRN; hif_addr &= ~MANTIS_GPIF_HIFRDWRN;
hif_addr &= ~MANTIS_GPIF_PCMCIAREG; hif_addr &= ~MANTIS_GPIF_PCMCIAREG;
hif_addr &= ~MANTIS_GPIF_PCMCIAIOM; hif_addr &= ~MANTIS_GPIF_PCMCIAIOM;
...@@ -116,6 +118,7 @@ int mantis_hif_read_iom(struct mantis_ca *ca, u32 addr) ...@@ -116,6 +118,7 @@ int mantis_hif_read_iom(struct mantis_ca *ca, u32 addr)
struct mantis_pci *mantis = ca->ca_priv; struct mantis_pci *mantis = ca->ca_priv;
u32 data, hif_addr = 0; u32 data, hif_addr = 0;
dprintk(verbose, MANTIS_DEBUG, 1, "Adapter(%d) Slot(0): Request HIF I/O Read", mantis->num);
hif_addr &= ~MANTIS_GPIF_PCMCIAREG; hif_addr &= ~MANTIS_GPIF_PCMCIAREG;
hif_addr |= MANTIS_GPIF_HIFRDWRN; hif_addr |= MANTIS_GPIF_HIFRDWRN;
hif_addr |= MANTIS_GPIF_PCMCIAIOM; hif_addr |= MANTIS_GPIF_PCMCIAIOM;
...@@ -143,6 +146,7 @@ int mantis_hif_write_iom(struct mantis_ca *ca, u32 addr, u8 data) ...@@ -143,6 +146,7 @@ int mantis_hif_write_iom(struct mantis_ca *ca, u32 addr, u8 data)
struct mantis_pci *mantis = ca->ca_priv; struct mantis_pci *mantis = ca->ca_priv;
u32 hif_addr = 0; u32 hif_addr = 0;
dprintk(verbose, MANTIS_DEBUG, 1, "Adapter(%d) Slot(0): Request HIF I/O Write", mantis->num);
hif_addr &= ~MANTIS_GPIF_PCMCIAREG; hif_addr &= ~MANTIS_GPIF_PCMCIAREG;
hif_addr &= ~MANTIS_GPIF_HIFRDWRN; hif_addr &= ~MANTIS_GPIF_HIFRDWRN;
hif_addr |= MANTIS_GPIF_PCMCIAIOM; hif_addr |= MANTIS_GPIF_PCMCIAIOM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册