From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: unlisted-recipients:; (no To-header on input)@casper.infradead.org
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: [PATCH 01/21] [media] drxk: add drxk prefix to the errors
Date: Sun, 10 Jul 2011 22:58:48 -0300 [thread overview]
Message-ID: <20110710225848.3135c47f@pedra> (raw)
In-Reply-To: <cover.1310347962.git.mchehab@redhat.com>
It is hard to identify the origin for those errors without a
prefix to indicate which driver produced them:
[ 1390.220984] i2c_write error
[ 1390.224133] I2C Write error
[ 1391.284202] i2c_read error
[ 1392.288685] i2c_read error
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c
index 24f9897..f550332 100644
--- a/drivers/media/dvb/frontends/drxk_hard.c
+++ b/drivers/media/dvb/frontends/drxk_hard.c
@@ -317,7 +317,7 @@ static int i2c_write(struct i2c_adapter *adap, u8 adr, u8 *data, int len)
.addr = adr, .flags = 0, .buf = data, .len = len };
if (i2c_transfer(adap, &msg, 1) != 1) {
- printk(KERN_ERR "i2c_write error\n");
+ printk(KERN_ERR "drxk: i2c write error at addr 0x%02x\n", adr);
return -1;
}
return 0;
@@ -332,7 +332,7 @@ static int i2c_read(struct i2c_adapter *adap,
.buf = answ, .len = alen}
};
if (i2c_transfer(adap, msgs, 2) != 2) {
- printk(KERN_ERR "i2c_read error\n");
+ printk(KERN_ERR "drxk: i2c read error at addr 0x%02x\n", adr);
return -1;
}
return 0;
@@ -479,7 +479,8 @@ static int WriteBlock(struct drxk_state *state, u32 Address,
status = i2c_write(state->i2c, state->demod_address,
&state->Chunk[0], Chunk + AdrLength);
if (status < 0) {
- printk(KERN_ERR "I2C Write error\n");
+ printk(KERN_ERR "drxk: %s: i2c write error at addr 0x%02x\n",
+ __func__, Address);
break;
}
pBlock += Chunk;
@@ -505,7 +506,7 @@ int PowerUpDevice(struct drxk_state *state)
data = 0;
if (i2c_write(state->i2c,
state->demod_address, &data, 1) < 0)
- printk(KERN_ERR "powerup failed\n");
+ printk(KERN_ERR "drxk: powerup failed\n");
msleep(10);
retryCount++;
} while (i2c_read1(state->i2c,
@@ -989,7 +990,7 @@ static int GetDeviceCapabilities(struct drxk_state *state)
state->m_hasIRQN = false;
break;
default:
- printk(KERN_ERR "DeviceID not supported = %02x\n",
+ printk(KERN_ERR "drxk: DeviceID not supported = %02x\n",
((sioTopJtagidLo >> 12) & 0xFF));
status = -1;
break;
@@ -1256,7 +1257,7 @@ static int BLChainCmd(struct drxk_state *state,
} while ((blStatus == 0x1) &&
((time_is_after_jiffies(end))));
if (blStatus == 0x1) {
- printk(KERN_ERR "SIO not ready\n");
+ printk(KERN_ERR "drxk: SIO not ready\n");
mutex_unlock(&state->mutex);
return -1;
}
@@ -1344,7 +1345,7 @@ static int DVBTEnableOFDMTokenRing(struct drxk_state *state, bool enable)
break;
} while ((data != desiredStatus) && ((time_is_after_jiffies(end))));
if (data != desiredStatus) {
- printk(KERN_ERR "SIO not ready\n");
+ printk(KERN_ERR "drxk: SIO not ready\n");
return -1;
}
return status;
@@ -1419,7 +1420,7 @@ static int scu_command(struct drxk_state *state,
} while (!(curCmd == DRX_SCU_READY)
&& (time_is_after_jiffies(end)));
if (curCmd != DRX_SCU_READY) {
- printk(KERN_ERR "SCU not ready\n");
+ printk(KERN_ERR "drxk: SCU not ready\n");
mutex_unlock(&state->mutex);
return -1;
}
@@ -1439,18 +1440,18 @@ static int scu_command(struct drxk_state *state,
/* check a few fixed error codes */
if (err == SCU_RESULT_UNKSTD) {
- printk(KERN_ERR "SCU_RESULT_UNKSTD\n");
+ printk(KERN_ERR "drxk: SCU_RESULT_UNKSTD\n");
mutex_unlock(&state->mutex);
return -1;
} else if (err == SCU_RESULT_UNKCMD) {
- printk(KERN_ERR "SCU_RESULT_UNKCMD\n");
+ printk(KERN_ERR "drxk: SCU_RESULT_UNKCMD\n");
mutex_unlock(&state->mutex);
return -1;
}
/* here it is assumed that negative means error,
and positive no error */
else if (err < 0) {
- printk(KERN_ERR "%s ERROR\n", __func__);
+ printk(KERN_ERR "drxk: %s ERROR\n", __func__);
mutex_unlock(&state->mutex);
return -1;
}
@@ -1458,7 +1459,7 @@ static int scu_command(struct drxk_state *state,
} while (0);
mutex_unlock(&state->mutex);
if (status < 0)
- printk(KERN_ERR "%s: status = %d\n", __func__, status);
+ printk(KERN_ERR "drxk: %s: status = %d\n", __func__, status);
return status;
}
@@ -2720,7 +2721,7 @@ static int BLDirectCmd(struct drxk_state *state, u32 targetAddr,
break;
} while ((blStatus == 0x1) && time_is_after_jiffies(end));
if (blStatus == 0x1) {
- printk(KERN_ERR "SIO not ready\n");
+ printk(KERN_ERR "drxk: SIO not ready\n");
mutex_unlock(&state->mutex);
return -1;
}
@@ -3534,7 +3535,7 @@ static int SetDVBTStandard(struct drxk_state *state,
} while (0);
if (status < 0)
- printk(KERN_ERR "%s status - %08x\n", __func__, status);
+ printk(KERN_ERR "drxk: %s status - %08x\n", __func__, status);
return status;
}
@@ -3589,7 +3590,7 @@ static int SetDVBT(struct drxk_state *state, u16 IntermediateFreqkHz,
u16 param1;
int status;
- /* printk(KERN_DEBUG "%s IF =%d, TFO = %d\n", __func__, IntermediateFreqkHz, tunerFreqOffset); */
+ /* printk(KERN_DEBUG "drxk: %s IF =%d, TFO = %d\n", __func__, IntermediateFreqkHz, tunerFreqOffset); */
do {
status = scu_command(state, SCU_RAM_COMMAND_STANDARD_OFDM | SCU_RAM_COMMAND_CMD_DEMOD_STOP, 0, NULL, 1, &cmdResult);
if (status < 0)
@@ -4089,7 +4090,7 @@ static int SetQAMMeasurement(struct drxk_state *state,
} while (0);
if (status < 0)
- printk(KERN_ERR "%s: status - %08x\n", __func__, status);
+ printk(KERN_ERR "drxk: %s: status - %08x\n", __func__, status);
return status;
}
@@ -5107,7 +5108,7 @@ static int QAMSetSymbolrate(struct drxk_state *state)
/* Select & calculate correct IQM rate */
adcFrequency = (state->m_sysClockFreq * 1000) / 3;
ratesel = 0;
- /* printk(KERN_DEBUG "SR %d\n", state->param.u.qam.symbol_rate); */
+ /* printk(KERN_DEBUG "drxk: SR %d\n", state->param.u.qam.symbol_rate); */
if (state->param.u.qam.symbol_rate <= 1188750)
ratesel = 3;
else if (state->param.u.qam.symbol_rate <= 2377500)
@@ -5174,7 +5175,7 @@ static int GetQAMLockStatus(struct drxk_state *state, u32 *pLockStatus)
SCU_RAM_COMMAND_CMD_DEMOD_GET_LOCK, 0, NULL, 2,
Result);
if (status < 0)
- printk(KERN_ERR "%s status = %08x\n", __func__, status);
+ printk(KERN_ERR "drxk: %s status = %08x\n", __func__, status);
if (Result[1] < SCU_RAM_QAM_LOCKED_LOCKED_DEMOD_LOCKED) {
/* 0x0000 NOT LOCKED */
@@ -5444,7 +5445,7 @@ static int SetQAM(struct drxk_state *state, u16 IntermediateFreqkHz,
} while (0);
if (status < 0)
- printk(KERN_ERR "%s %d\n", __func__, status);
+ printk(KERN_ERR "drxk: %s %d\n", __func__, status);
return status;
}
@@ -5734,9 +5735,9 @@ static int load_microcode(struct drxk_state *state, char *mc_name)
err = request_firmware(&fw, mc_name, state->i2c->dev.parent);
if (err < 0) {
printk(KERN_ERR
- "Could not load firmware file %s.\n", mc_name);
+ "drxk: Could not load firmware file %s.\n", mc_name);
printk(KERN_INFO
- "Copy %s to your hotplug directory!\n", mc_name);
+ "drxk: Copy %s to your hotplug directory!\n", mc_name);
return err;
}
err = DownloadMicrocode(state, fw->data, fw->size);
@@ -5970,7 +5971,7 @@ static int drxk_gate_ctrl(struct dvb_frontend *fe, int enable)
{
struct drxk_state *state = fe->demodulator_priv;
- /* printk(KERN_DEBUG "drxk_gate %d\n", enable); */
+ /* printk(KERN_DEBUG "drxk: drxk_gate %d\n", enable); */
return ConfigureI2CBridge(state, enable ? true : false);
}
@@ -5990,7 +5991,7 @@ static int drxk_set_parameters(struct dvb_frontend *fe,
fe->ops.tuner_ops.get_frequency(fe, &IF);
Start(state, 0, IF);
- /* printk(KERN_DEBUG "%s IF=%d done\n", __func__, IF); */
+ /* printk(KERN_DEBUG "drxk: %s IF=%d done\n", __func__, IF); */
return 0;
}
@@ -6068,7 +6069,7 @@ static void drxk_t_release(struct dvb_frontend *fe)
#if 0
struct drxk_state *state = fe->demodulator_priv;
- printk(KERN_DEBUG "%s\n", __func__);
+ printk(KERN_DEBUG "drxk: %s\n", __func__);
kfree(state);
#endif
}
--
1.7.1
next prev parent reply other threads:[~2011-07-11 1:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1310347962.git.mchehab@redhat.com>
2011-07-11 1:58 ` [PATCH 09/21] [media] Add initial support for Terratec H5 Mauro Carvalho Chehab
2011-07-11 1:58 ` Mauro Carvalho Chehab [this message]
2011-07-11 1:58 ` [PATCH 02/21] [media] tda18271c2dd: add tda18271c2dd prefix to the errors Mauro Carvalho Chehab
2011-07-11 1:58 ` [PATCH 03/21] [media] drxk: Add debug printk's Mauro Carvalho Chehab
2011-07-11 1:58 ` [PATCH 04/21] [media] drxk: remove _0 from read/write routines Mauro Carvalho Chehab
2011-07-11 1:58 ` [PATCH 05/21] [media] drxk: Move I2C address into a config structure Mauro Carvalho Chehab
2011-07-11 1:58 ` [PATCH 06/21] [media] drxk: Convert an #ifdef logic as a new config parameter Mauro Carvalho Chehab
2011-07-11 1:58 ` [PATCH 10/21] [media] drxk: Add a parameter for the microcode name Mauro Carvalho Chehab
2011-07-11 1:58 ` [PATCH 07/21] [media] drxk: Avoid OOPSes if firmware is corrupted Mauro Carvalho Chehab
2011-07-11 1:58 ` [PATCH 08/21] [media] drxk: Print an error if firmware is not loaded Mauro Carvalho Chehab
2011-07-11 1:58 ` [PATCH 11/21] [media] em28xx-i2c: Add a read after I2C write Mauro Carvalho Chehab
2011-07-11 1:58 ` [PATCH 12/21] [media] drxk: Allow to disable I2C Bridge control switch Mauro Carvalho Chehab
2011-07-11 1:59 ` [PATCH 13/21] [media] drxk: Proper handle/propagate the error codes Mauro Carvalho Chehab
2011-07-11 1:59 ` [PATCH 15/21] [media] drxk: Fix the antenna switch logic Mauro Carvalho Chehab
2011-07-11 1:59 ` [PATCH 16/21] [media] drxk: Print detected configuration Mauro Carvalho Chehab
2011-07-11 1:59 ` [PATCH 17/21] [media] drxk: Improves the UIO handling Mauro Carvalho Chehab
2011-07-11 1:59 ` [PATCH 18/21] [media] drxk: Fix driver removal Mauro Carvalho Chehab
2011-07-11 1:59 ` [PATCH 14/21] [media] drxk: change mode before calling the set mode routines Mauro Carvalho Chehab
2011-07-11 1:59 ` [PATCH 19/21] [media] drxk: Simplify the DVB-C set mode logic Mauro Carvalho Chehab
2011-07-11 1:59 ` [PATCH 20/21] [media] drxk: Improve the scu_command error message Mauro Carvalho Chehab
2011-07-11 1:59 ` [PATCH 21/21] [media] drxk: Add a fallback method for QAM parameter setting Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110710225848.3135c47f@pedra \
--to=mchehab@redhat.com \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox