public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: emagick@magic.ms
To: linux-media@vger.kernel.org
Subject: Re: Cinergy T2 stopped working with kernel 2.6.30
Date: Fri, 31 Jul 2009 20:44:59 +0200	[thread overview]
Message-ID: <4A733BAB.6080305@magic.ms> (raw)
In-Reply-To: <4A61FD76.8010409@magic.ms>

I think I've found the problem:

------------------------------------------------------------------------
static int cinergyt2_fe_set_frontend(struct dvb_frontend *fe,
				  struct dvb_frontend_parameters *fep)
{
	struct cinergyt2_fe_state *state = fe->demodulator_priv;
	struct dvbt_set_parameters_msg param;
	char result[2];
	int err;

	param.cmd = CINERGYT2_EP1_SET_TUNER_PARAMETERS;
	param.tps = cpu_to_le16(compute_tps(fep));
	param.freq = cpu_to_le32(fep->frequency / 1000);
	param.bandwidth = 8 - fep->u.ofdm.bandwidth - BANDWIDTH_8_MHZ;

	err = dvb_usb_generic_rw(state->d,
			(char *)&param, sizeof(param),
			result, sizeof(result), 0);
------------------------------------------------------------------------

As dvbt_set_parameters_msg is declared with __attribute__((packed)), its
alignment is 8 bits.  In fact, cinergyt2_fe_set_frontend()'s param variable
is not aligned on a 32-bit boundary. Note that param is passed to usb_bulk_msg().
This seems to cause DMA problems on my hardware (Atom N270 + 945GSE + ICH7M).

I hope that I'm not talking to a black hole.

  parent reply	other threads:[~2009-07-31 18:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-18 16:51 Cinergy T2 stopped working with kernel 2.6.30 emagick
2009-07-23  8:20 ` emagick
2009-07-30  9:49 ` emagick
2009-07-30 17:46 ` emagick
2009-07-31  8:39 ` emagick
2009-07-31  8:43 ` emagick
2009-07-31  8:48   ` emagick
2009-07-31 18:44 ` emagick [this message]
2009-07-31 19:37   ` emagick
2009-07-31 19:47   ` emagick
2009-07-31 19:50     ` Markus Rechberger
2009-07-31 21:31   ` Johannes Stezenbach
2009-08-02  7:43   ` [PATCH] dvb-usb: fix tuning with Cinergy T2 emagick

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=4A733BAB.6080305@magic.ms \
    --to=emagick@magic.ms \
    --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