public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Stezenbach <js@linuxtv.org>
To: emagick@magic.ms
Cc: linux-media@vger.kernel.org
Subject: Re: Cinergy T2 stopped working with kernel 2.6.30
Date: Fri, 31 Jul 2009 23:31:09 +0200	[thread overview]
Message-ID: <20090731213109.GA27893@linuxtv.org> (raw)
In-Reply-To: <4A733BAB.6080305@magic.ms>

On Fri, Jul 31, 2009 at 08:44:59PM +0200, emagick@magic.ms wrote:
> ------------------------------------------------------------------------
> 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 doubt that.  AFAIK EHCI has no alignment requirements on data, and the
x86 architecture has DMA consistent caches.  The code in question is
broken on ARM. MIPS etc. but it should work (and according to you has
worked up to 2.6.29) on x86.  (I'm not at all against fixing the
code for MIPS/ARM but I don't think that would fix the problem for you.)

  parent reply	other threads:[~2009-07-31 21:31 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
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 [this message]
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=20090731213109.GA27893@linuxtv.org \
    --to=js@linuxtv.org \
    --cc=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