rpms/kernel/devel linux-2.6-revert-dvb-net-kabi-change.patch, NONE, 1.1 kernel.spec, 1.1478, 1.1479 linux-2.6-v4l-dvb-experimental.patch, 1.5, 1.6 linux-2.6-v4l-dvb-fixes.patch, 1.9, 1.10 linux-2.6-v4l-dvb-update.patch, 1.13, 1.14

Mauro Carvalho Chehab mchehab at fedoraproject.org
Sat Mar 28 12:53:08 UTC 2009


Author: mchehab

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27332

Modified Files:
	kernel.spec linux-2.6-v4l-dvb-experimental.patch 
	linux-2.6-v4l-dvb-fixes.patch linux-2.6-v4l-dvb-update.patch 
Added Files:
	linux-2.6-revert-dvb-net-kabi-change.patch 
Log Message:
An upstream patch not tested by v4l/dvb community is likely causing the bug #490268.
Revert the patch on linux-2.6-revert-dvb-net-kabi-change.patch

Also updates drivers/media to reflect the latest status. Except for the siano patches
that will be kept for a while (until the other siano patches got analised and merged),
all the other new -git changesets are ready for upstream. The complete list of
git patches is:

V4L/DVB (11218): gspca - sq905: Update the frame pointer after adding the last packet.
V4L/DVB (11219): gspca - sq905: Optimize the resolution setting.
V4L/DVB (11220): gspca - finepix: Use a workqueue for streaming.
V4L/DVB (11221): gspca - sonixj: Prefer sonixj instead of sn9c102 for 0471:0327.
V4L/DVB (11222): gspca - zc3xx: The webcam DLink DSB - C320 has the sensor pas106.
V4L/DVB (11223): gspca - doc: Add the 15b8:6001 webcam to the Documentation.
V4L/DVB (11225): v4lgrab: fix compilation warnings
V4L/DVB (11226): avoid warnings for request_ihex_firmware on dabusb and vicam
V4L/DVB (11227): ce6230: avoid using unitialized var
V4L/DVB (11228): hdpvr: use debugging macro for buffer status
V4L/DVB (11229): hdpvr: set usb interface dev as parent in struct video_device
V4L/DVB (11230): hdpvr: return immediately from hdpvr_poll if data is available
V4L/DVB (11231): hdpvr: locking fixes
V4L/DVB (11233): mxl5005s: Switch in mxl5005s_set_params should operate on correct values
V4L/DVB (11235): changed ioctls to unlocked
V4L/DVB (11236): tda827x: fix locking issues with DVB-C
V4L/DVB (11237): media/zoran: fix printk format
V4L/DVB (11239): sdio: add cards ids for sms (Siano Mobile Silicon) MDTV receivers
V4L/DVB (11240): siano: add high level SDIO interface driver for SMS based cards
V4L/DVB (11241): Siano: SDIO interface driver - remove two redundant lines
V4L/DVB (11242): allow v4l2 drivers to provide a get_unmapped_area handler
V4L/DVB (11243): cx88: Missing failure checks
V4L/DVB (11244): pluto2: silence spew of card hung up messages
V4L/DVB (11245): hdpvr: add struct v4l2_device
V4L/DVB (11246): hdpvr: convert printing macros to v4l2_* with struct v4l2_device
V4L/DVB (11247): hdpvr: empty internal device buffer after stopping streaming



linux-2.6-revert-dvb-net-kabi-change.patch:

--- NEW FILE linux-2.6-revert-dvb-net-kabi-change.patch ---
diff --git a/drivers/media/dvb/dvb-core/dvb_net.c b/drivers/media/dvb/dvb-core/dvb_net.c
index f6ba846..03fd9dd 100644
--- a/drivers/media/dvb/dvb-core/dvb_net.c
+++ b/drivers/media/dvb/dvb-core/dvb_net.c
@@ -125,6 +125,7 @@ static void hexdump( const unsigned char *buf, unsigned short len )
 
 struct dvb_net_priv {
 	int in_use;
+	struct net_device_stats stats;
 	u16 pid;
 	struct net_device *net;
 	struct dvb_net *host;
@@ -383,8 +384,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len )
 				if (priv->ule_skb) {
 					dev_kfree_skb( priv->ule_skb );
 					/* Prepare for next SNDU. */
-					dev->stats.rx_errors++;
-					dev->stats.rx_frame_errors++;
+					priv->stats.rx_errors++;
+					priv->stats.rx_frame_errors++;
 				}
 				reset_ule(priv);
 				priv->need_pusi = 1;
@@ -437,8 +438,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len )
 					dev_kfree_skb( priv->ule_skb );
 					/* Prepare for next SNDU. */
 					// reset_ule(priv);  moved to below.
-					dev->stats.rx_errors++;
-					dev->stats.rx_frame_errors++;
+					priv->stats.rx_errors++;
+					priv->stats.rx_frame_errors++;
 				}
 				reset_ule(priv);
 				/* skip to next PUSI. */
@@ -459,8 +460,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len )
 						/* Drop partly decoded SNDU, reset state, resync on PUSI. */
 						if (priv->ule_skb) {
 							dev_kfree_skb( priv->ule_skb );
-							dev->stats.rx_errors++;
-							dev->stats.rx_frame_errors++;
+							priv->stats.rx_errors++;
+							priv->stats.rx_frame_errors++;
 						}
 						reset_ule(priv);
 						priv->need_pusi = 1;
@@ -476,8 +477,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len )
 				if (priv->ule_sndu_remain > 183) {
 					/* Current SNDU lacks more data than there could be available in the
 					 * current TS cell. */
-					dev->stats.rx_errors++;
-					dev->stats.rx_length_errors++;
+					priv->stats.rx_errors++;
+					priv->stats.rx_length_errors++;
 					printk(KERN_WARNING "%lu: Expected %d more SNDU bytes, but "
 					       "got PUSI (pf %d, ts_remain %d).  Flushing incomplete payload.\n",
 					       priv->ts_count, priv->ule_sndu_remain, ts[4], ts_remain);
@@ -519,8 +520,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len )
 				if (priv->ule_sndu_len < 5) {
 					printk(KERN_WARNING "%lu: Invalid ULE SNDU length %u. "
 					       "Resyncing.\n", priv->ts_count, priv->ule_sndu_len);
-					dev->stats.rx_errors++;
-					dev->stats.rx_length_errors++;
+					priv->stats.rx_errors++;
+					priv->stats.rx_length_errors++;
 					priv->ule_sndu_len = 0;
 					priv->need_pusi = 1;
 					new_ts = 1;
@@ -572,7 +573,7 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len )
 			if (priv->ule_skb == NULL) {
 				printk(KERN_NOTICE "%s: Memory squeeze, dropping packet.\n",
 				       dev->name);
-				dev->stats.rx_dropped++;
+				priv->stats.rx_dropped++;
 				return;
 			}
 
@@ -636,8 +637,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len )
 				ule_dump = 1;
 #endif
 
-				dev->stats.rx_errors++;
-				dev->stats.rx_crc_errors++;
+				priv->stats.rx_errors++;
+				priv->stats.rx_crc_errors++;
 				dev_kfree_skb(priv->ule_skb);
 			} else {
 				/* CRC32 verified OK. */
@@ -743,8 +744,8 @@ static void dvb_net_ule( struct net_device *dev, const u8 *buf, size_t buf_len )
 				 * receive the packet anyhow. */
 				/* if (priv->ule_dbit && skb->pkt_type == PACKET_OTHERHOST)
 					priv->ule_skb->pkt_type = PACKET_HOST; */
-				dev->stats.rx_packets++;
-				dev->stats.rx_bytes += priv->ule_skb->len;
+				priv->stats.rx_packets++;
+				priv->stats.rx_bytes += priv->ule_skb->len;
 				netif_rx(priv->ule_skb);
 			}
 			sndu_done:
@@ -799,7 +800,8 @@ static void dvb_net_sec(struct net_device *dev,
 {
 	u8 *eth;
 	struct sk_buff *skb;
-	struct net_device_stats *stats = &dev->stats;
+	struct net_device_stats *stats =
+		&((struct dvb_net_priv *) netdev_priv(dev))->stats;
 	int snap = 0;
 
 	/* note: pkt_len includes a 32bit checksum */
@@ -1214,29 +1216,28 @@ static int dvb_net_stop(struct net_device *dev)
 	return dvb_net_feed_stop(dev);
 }
 
+static struct net_device_stats * dvb_net_get_stats(struct net_device *dev)
+{
+	return &((struct dvb_net_priv *) netdev_priv(dev))->stats;
+}
+
 static const struct header_ops dvb_header_ops = {
 	.create		= eth_header,
 	.parse		= eth_header_parse,
 	.rebuild	= eth_rebuild_header,
 };
 
-
-static const struct net_device_ops dvb_netdev_ops = {
-	.ndo_open		= dvb_net_open,
-	.ndo_stop		= dvb_net_stop,
-	.ndo_start_xmit		= dvb_net_tx,
-	.ndo_set_multicast_list = dvb_net_set_multicast_list,
-	.ndo_set_mac_address    = dvb_net_set_mac,
-	.ndo_change_mtu		= eth_change_mtu,
-	.ndo_validate_addr	= eth_validate_addr,
-};
-
 static void dvb_net_setup(struct net_device *dev)
 {
 	ether_setup(dev);
 
 	dev->header_ops		= &dvb_header_ops;
-	dev->netdev_ops		= &dvb_netdev_ops;
+	dev->open		= dvb_net_open;
+	dev->stop		= dvb_net_stop;
+	dev->hard_start_xmit	= dvb_net_tx;
+	dev->get_stats		= dvb_net_get_stats;
+	dev->set_multicast_list = dvb_net_set_multicast_list;
+	dev->set_mac_address    = dvb_net_set_mac;
 	dev->mtu		= 4096;
 	dev->mc_count           = 0;
 


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1478
retrieving revision 1.1479
diff -u -r1.1478 -r1.1479
--- kernel.spec	28 Mar 2009 00:58:23 -0000	1.1478
+++ kernel.spec	28 Mar 2009 12:52:32 -0000	1.1479
@@ -677,7 +677,7 @@
 Patch2899: linux-2.6-v4l-dvb-fixes.patch
 Patch2900: linux-2.6-v4l-dvb-update.patch
 Patch2901: linux-2.6-v4l-dvb-experimental.patch
-Patch2902: linux-2.6-v4l-pvrusb2-fixes.patch
+Patch2903: linux-2.6-revert-dvb-net-kabi-change.patch
 
 # fs fixes
 Patch2920: linux-2.6-ext4-flush-on-close.patch
@@ -1237,7 +1237,7 @@
 ApplyPatch linux-2.6-v4l-dvb-fixes.patch
 ApplyPatch linux-2.6-v4l-dvb-update.patch
 ApplyPatch linux-2.6-v4l-dvb-experimental.patch
-ApplyPatch linux-2.6-v4l-pvrusb2-fixes.patch
+ApplyPatch linux-2.6-revert-dvb-net-kabi-change.patch
 
 # revert 8b249b6856f16f09b0e5b79ce5f4d435e439b9d6
 ApplyPatch revert-fix-modules_install-via-nfs.patch
@@ -1832,6 +1832,11 @@
 # and build.
 
 %changelog
+* Sat Mar 28 2009 Mauro Carvalho Chehab <mchehab at redhat.com>
+- linux-2.6-revert-dvb-net-kabi-change.patch: attempt to fix dvb net breakage
+- update v4l fixes patch to reflect what's ready for 2.6.30
+- update v4l devel patch to reflect what will be kept on linux-next for a while
+
 * Fri Mar 27 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.29-16
 - Fix 2.6.29 networking lockups.
 - Fix locking in net/xfrm/xfrm_state.c (#489764)

linux-2.6-v4l-dvb-experimental.patch:

Index: linux-2.6-v4l-dvb-experimental.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-v4l-dvb-experimental.patch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- linux-2.6-v4l-dvb-experimental.patch	26 Mar 2009 08:25:58 -0000	1.5
+++ linux-2.6-v4l-dvb-experimental.patch	28 Mar 2009 12:52:32 -0000	1.6
@@ -24,6 +24,372 @@
       V4L/DVB (11128): cx231xx: convert the calls to subdev format
       V4L/DVB (11129): cx231xx: Use generic names for each device block
 
+Uri Shkolnik (2):
+      V4L/DVB (11239): sdio: add cards ids for sms (Siano Mobile Silicon) MDTV receivers
+      V4L/DVB (11240): siano: add high level SDIO interface driver for SMS based cards
+
+diff --git a/drivers/media/dvb/siano/smssdio.c b/drivers/media/dvb/siano/smssdio.c
+new file mode 100644
+index 0000000..31ba8c5
+--- /dev/null
++++ b/drivers/media/dvb/siano/smssdio.c
+@@ -0,0 +1,356 @@
++/*
++ *  smssdio.c - Siano 1xxx SDIO interface driver
++ *
++ *  Copyright 2008 Pierre Ossman
++ *
++ * Based on code by Siano Mobile Silicon, Inc.,
++ * Copyright (C) 2006-2008, Uri Shkolnik
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or (at
++ * your option) any later version.
++ *
++ *
++ * This hardware is a bit odd in that all transfers should be done
++ * to/from the SMSSDIO_DATA register, yet the "increase address" bit
++ * always needs to be set.
++ *
++ * Also, buffers from the card are always aligned to 128 byte
++ * boundaries.
++ */
++
++/*
++ * General cleanup notes:
++ *
++ * - only typedefs should be name *_t
++ *
++ * - use ERR_PTR and friends for smscore_register_device()
++ *
++ * - smscore_getbuffer should zero fields
++ *
++ * Fix stop command
++ */
++
++#include <linux/moduleparam.h>
++#include <linux/firmware.h>
++#include <linux/delay.h>
++#include <linux/mmc/card.h>
++#include <linux/mmc/sdio_func.h>
++#include <linux/mmc/sdio_ids.h>
++
++#include "smscoreapi.h"
++#include "sms-cards.h"
++
++/* Registers */
++
++#define SMSSDIO_DATA		0x00
++#define SMSSDIO_INT		0x04
++
++static const struct sdio_device_id smssdio_ids[] = {
++	{SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_STELLAR),
++	 .driver_data = SMS1XXX_BOARD_SIANO_STELLAR},
++	{SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_NOVA_A0),
++	 .driver_data = SMS1XXX_BOARD_SIANO_NOVA_A},
++	{SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_NOVA_B0),
++	 .driver_data = SMS1XXX_BOARD_SIANO_NOVA_B},
++	{SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_VEGA_A0),
++	 .driver_data = SMS1XXX_BOARD_SIANO_VEGA},
++	{SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_VENICE),
++	 .driver_data = SMS1XXX_BOARD_SIANO_VEGA},
++	{ /* end: all zeroes */ },
++};
++
++MODULE_DEVICE_TABLE(sdio, smssdio_ids);
++
++struct smssdio_device {
++	struct sdio_func *func;
++
++	struct smscore_device_t *coredev;
++
++	struct smscore_buffer_t *split_cb;
++};
++
++/*******************************************************************/
++/* Siano core callbacks                                            */
++/*******************************************************************/
++
++static int smssdio_sendrequest(void *context, void *buffer, size_t size)
++{
++	int ret;
++	struct smssdio_device *smsdev;
++
++	smsdev = context;
++
++	sdio_claim_host(smsdev->func);
++
++	while (size >= smsdev->func->cur_blksize) {
++		ret = sdio_write_blocks(smsdev->func, SMSSDIO_DATA, buffer, 1);
++		if (ret)
++			goto out;
++
++		buffer += smsdev->func->cur_blksize;
++		size -= smsdev->func->cur_blksize;
++	}
++
++	if (size) {
++		ret = sdio_write_bytes(smsdev->func, SMSSDIO_DATA,
++				       buffer, size);
++		if (ret)
++			goto out;
++	}
++
++out:
++	sdio_release_host(smsdev->func);
++
++	return ret;
++}
++
++/*******************************************************************/
++/* SDIO callbacks                                                  */
++/*******************************************************************/
++
++static void smssdio_interrupt(struct sdio_func *func)
++{
++	int ret, isr;
++
++	struct smssdio_device *smsdev;
++	struct smscore_buffer_t *cb;
++	struct SmsMsgHdr_ST *hdr;
++	size_t size;
++
++	smsdev = sdio_get_drvdata(func);
++
++	/*
++	 * The interrupt register has no defined meaning. It is just
++	 * a way of turning of the level triggered interrupt.
++	 */
++	isr = sdio_readb(func, SMSSDIO_INT, &ret);
++	if (ret) {
++		dev_err(&smsdev->func->dev,
++			"Unable to read interrupt register!\n");
++		return;
++	}
++
++	if (smsdev->split_cb == NULL) {
++		cb = smscore_getbuffer(smsdev->coredev);
++		if (!cb) {
++			dev_err(&smsdev->func->dev,
++				"Unable to allocate data buffer!\n");
++			return;
++		}
++
++		ret = sdio_read_blocks(smsdev->func, cb->p, SMSSDIO_DATA, 1);
++		if (ret) {
++			dev_err(&smsdev->func->dev,
++				"Error %d reading initial block!\n", ret);
++			return;
++		}
++
++		hdr = cb->p;
++
++		if (hdr->msgFlags & MSG_HDR_FLAG_SPLIT_MSG) {
++			smsdev->split_cb = cb;
++			return;
++		}
++
++		size = hdr->msgLength - smsdev->func->cur_blksize;
++	} else {
++		cb = smsdev->split_cb;
++		hdr = cb->p;
++
++		size = hdr->msgLength - sizeof(struct SmsMsgHdr_ST);
++
++		smsdev->split_cb = NULL;
++	}
++
++	if (hdr->msgLength > smsdev->func->cur_blksize) {
++		void *buffer;
++
++		size = ALIGN(size, 128);
++		buffer = cb->p + hdr->msgLength;
++
++		BUG_ON(smsdev->func->cur_blksize != 128);
++
++		/*
++		 * First attempt to transfer all of it in one go...
++		 */
++		ret = sdio_read_blocks(smsdev->func, buffer,
++				       SMSSDIO_DATA, size / 128);
++		if (ret && ret != -EINVAL) {
++			smscore_putbuffer(smsdev->coredev, cb);
++			dev_err(&smsdev->func->dev,
++				"Error %d reading data from card!\n", ret);
++			return;
++		}
++
++		/*
++		 * ..then fall back to one block at a time if that is
++		 * not possible...
++		 *
++		 * (we have to do this manually because of the
++		 * problem with the "increase address" bit)
++		 */
++		if (ret == -EINVAL) {
++			while (size) {
++				ret = sdio_read_blocks(smsdev->func,
++						       buffer, SMSSDIO_DATA, 1);
++				if (ret) {
++					smscore_putbuffer(smsdev->coredev, cb);
++					dev_err(&smsdev->func->dev,
++						"Error %d reading "
++						"data from card!\n", ret);
++					return;
++				}
++
++				buffer += smsdev->func->cur_blksize;
++				if (size > smsdev->func->cur_blksize)
++					size -= smsdev->func->cur_blksize;
++				else
++					size = 0;
++			}
++		}
++	}
++
++	cb->size = hdr->msgLength;
++	cb->offset = 0;
++
++	smscore_onresponse(smsdev->coredev, cb);
++}
++
++static int smssdio_probe(struct sdio_func *func,
++			 const struct sdio_device_id *id)
++{
++	int ret;
++
++	int board_id;
++	struct smssdio_device *smsdev;
++	struct smsdevice_params_t params;
++
++	board_id = id->driver_data;
++
++	smsdev = kzalloc(sizeof(struct smssdio_device), GFP_KERNEL);
++	if (!smsdev)
++		return -ENOMEM;
++
++	smsdev->func = func;
++
++	memset(&params, 0, sizeof(struct smsdevice_params_t));
++
++	params.device = &func->dev;
++	params.buffer_size = 0x5000;	/* ?? */
++	params.num_buffers = 22;	/* ?? */
++	params.context = smsdev;
++
++	snprintf(params.devpath, sizeof(params.devpath),
++		 "sdio\\%s", sdio_func_id(func));
++
++	params.sendrequest_handler = smssdio_sendrequest;
++
++	params.device_type = sms_get_board(board_id)->type;
++
++	if (params.device_type != SMS_STELLAR)
++		params.flags |= SMS_DEVICE_FAMILY2;
++	else {
++		/*
++		 * FIXME: Stellar needs special handling...
++		 */
++		ret = -ENODEV;
++		goto free;
++	}
++
++	ret = smscore_register_device(&params, &smsdev->coredev);
++	if (ret < 0)
++		goto free;
++
++	smscore_set_board_id(smsdev->coredev, board_id);
++
++	sdio_claim_host(func);
++
++	ret = sdio_enable_func(func);
++	if (ret)
++		goto release;
++
++	ret = sdio_set_block_size(func, 128);
++	if (ret)
++		goto disable;
++
++	ret = sdio_claim_irq(func, smssdio_interrupt);
++	if (ret)
++		goto disable;
++
++	sdio_set_drvdata(func, smsdev);
++
++	sdio_release_host(func);
++
++	ret = smscore_start_device(smsdev->coredev);
++	if (ret < 0)
++		goto reclaim;
++
++	return 0;
++
++reclaim:
++	sdio_claim_host(func);
++	sdio_release_irq(func);
++disable:
++	sdio_disable_func(func);
++release:
++	sdio_release_host(func);
++	smscore_unregister_device(smsdev->coredev);
++free:
++	kfree(smsdev);
++
++	return ret;
++}
++
++static void smssdio_remove(struct sdio_func *func)
++{
++	struct smssdio_device *smsdev;
++
++	smsdev = sdio_get_drvdata(func);
++
++	/* FIXME: racy! */
++	if (smsdev->split_cb)
++		smscore_putbuffer(smsdev->coredev, smsdev->split_cb);
++
++	smscore_unregister_device(smsdev->coredev);
++
++	sdio_claim_host(func);
++	sdio_release_irq(func);
++	sdio_disable_func(func);
++	sdio_release_host(func);
++
++	kfree(smsdev);
++}
++
++static struct sdio_driver smssdio_driver = {
++	.name = "smssdio",
++	.id_table = smssdio_ids,
++	.probe = smssdio_probe,
++	.remove = smssdio_remove,
++};
++
++/*******************************************************************/
++/* Module functions                                                */
++/*******************************************************************/
++
++int smssdio_register(void)
++{
++	int ret = 0;
++
++	printk(KERN_INFO "smssdio: Siano SMS1xxx SDIO driver\n");
++	printk(KERN_INFO "smssdio: Copyright Pierre Ossman\n");
++
++	ret = sdio_register_driver(&smssdio_driver);
++
++	return ret;
++}
++
++void smssdio_unregister(void)
++{
++	sdio_unregister_driver(&smssdio_driver);
++}
++
++MODULE_DESCRIPTION("Siano SMS1xxx SDIO driver");
++MODULE_AUTHOR("Pierre Ossman");
++MODULE_LICENSE("GPL");
 diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig
 index 3f85b9e..114bf04 100644
 --- a/drivers/media/video/Kconfig
@@ -14362,3 +14728,22 @@
  #define I2C_HW_B_HDPVR		0x010025 /* Hauppauge HD PVR */
  
  /* --- SGI adapters							*/
+diff --git a/include/linux/mmc/sdio_ids.h b/include/linux/mmc/sdio_ids.h
+index ea1bf5b..3d7533d 100644
+--- a/include/linux/mmc/sdio_ids.h
++++ b/include/linux/mmc/sdio_ids.h
+@@ -24,6 +24,14 @@
+  */
+ 
+ #define SDIO_VENDOR_ID_MARVELL			0x02df
++#define SDIO_VENDOR_ID_SIANO			0x039a
++
+ #define SDIO_DEVICE_ID_MARVELL_LIBERTAS		0x9103
++#define SDIO_DEVICE_ID_SIANO_STELLAR 		0x5347
++#define SDIO_DEVICE_ID_SIANO_NOVA_A0		0x1100
++#define SDIO_DEVICE_ID_SIANO_NOVA_B0		0x0201
++#define SDIO_DEVICE_ID_SIANO_NICE		0x0202
++#define SDIO_DEVICE_ID_SIANO_VEGA_A0		0x0300
++#define SDIO_DEVICE_ID_SIANO_VENICE		0x0301
+ 
+ #endif

linux-2.6-v4l-dvb-fixes.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.9 -r 1.10 linux-2.6-v4l-dvb-fixes.patch
Index: linux-2.6-v4l-dvb-fixes.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-v4l-dvb-fixes.patch,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- linux-2.6-v4l-dvb-fixes.patch	26 Mar 2009 08:25:59 -0000	1.9
+++ linux-2.6-v4l-dvb-fixes.patch	28 Mar 2009 12:52:33 -0000	1.10
@@ -9,6 +9,10 @@
       V4L/DVB (10639): gspca - sq905: New subdriver.
       V4L/DVB (10829): Support alternate resolutions for sq905
 
+Alan Cox (2):
+      V4L/DVB (11243): cx88: Missing failure checks
+      V4L/DVB (11244): pluto2: silence spew of card hung up messages
+
 Alan McIvor (1):
       V4L/DVB (11124): Add support for ProVideo PV-183 to bttv
 
@@ -32,7 +36,7 @@
       V4L/DVB (10946): radio-rtrack2: fix double mutex_unlock
       V4L/DVB (10961): radio-terratec: remove linux/delay.h which hadn't been used.
 
-Andy Walls (43):
+Andy Walls (44):
       V4L/DVB (10274): cx18: Fix a PLL divisor update for the I2S master clock
       V4L/DVB (10275): cx18: Additional debug to display outgoing mailbox parameters
       V4L/DVB (10276): cx18, cx2341x, ivtv: Add AC-3 audio encoding control to cx18
@@ -76,6 +80,7 @@
       V4L/DVB (11042): v4l2-api: Add definitions for V4L2_MPEG_STREAM_VBI_FMT_IVTV payloads
       V4L/DVB (11091): cx18, ivtv: Ensure endianess for linemasks in VBI embedded in MPEG stream
       V4L/DVB (11092): cx18: Optimize processing of VBI buffers from the capture unit
+      V4L/DVB (11233): mxl5005s: Switch in mxl5005s_set_params should operate on correct values
 
 Antoine Jacquet (1):
       V4L/DVB (10263): zr364xx: add support for Aiptek DV T300
@@ -96,6 +101,9 @@
 Bruno Christo (1):
       V4L/DVB (10827): Add support for GeoVision GV-800(S)
 
+Daniel Glöckner (1):
+      V4L/DVB (11242): allow v4l2 drivers to provide a get_unmapped_area handler
+
 Devin Heitmueller (36):
       V4L/DVB (10320): dib0700: fix i2c error message to make data type clear
       V4L/DVB (10321): dib0700: Report dib0700_i2c_enumeration failures
@@ -137,7 +145,7 @@
 Douglas Kosovic (1):
       V4L/DVB (10299): bttv: Add support for IVCE-8784 support for V4L2 bttv driver
 
-Douglas Schilling Landgraf (12):
+Douglas Schilling Landgraf (13):
       V4L/DVB (10323): em28xx: Add entry for GADMEI TVR200
       V4L/DVB (10326): em28xx: Cleanup: fix bad whitespacing
       V4L/DVB (10327): em28xx: Add check before call em28xx_isoc_audio_deinit()
@@ -150,6 +158,7 @@
       V4L/DVB (10739): em28xx-cards: remove incorrect entry
       V4L/DVB (10740): em28xx-cards: Add SIIG AVTuner-PVR board
       V4L/DVB (10741): em28xx: Add Kaiser Baas Video to DVD maker support
+      V4L/DVB (11222): gspca - zc3xx: The webcam DLink DSB - C320 has the sensor pas106.
 
 Erik Andren (3):
       V4L/DVB (10334): gspca - stv06xx: Rework control description.
@@ -317,6 +326,9 @@
 Hans Werner (1):
       V4L/DVB (10392): lnbp21: documentation about the system register
 
+Hans de Goede (1):
+      V4L/DVB (11221): gspca - sonixj: Prefer sonixj instead of sn9c102 for 0471:0327.
+
 Igor M. Liplianin (18):
       V4L/DVB (10266): Add support for TurboSight TBS6920 DVB-S2 PCI-e card.
       V4L/DVB (10267): Add support for TeVii S470 DVB-S2 PCI-e card.
@@ -343,12 +355,19 @@
 Jan Engelhardt (1):
       V4L/DVB (10391): dvb: constify VFTs
 
-Janne Grunau (5):
+Janne Grunau (12):
       V4L/DVB (11095): adds V4L2_CID_SHARPNESS to v4l2_ctrl_query_fill()
       V4L/DVB (11096): V4L2 Driver for the Hauppauge HD PVR usb capture device
       V4L/DVB (11097): use video_ioctl2 as ioctl handler directly
       V4L/DVB (11125): fix mispelled Hauppauge in HD PVR and PVR USB2 driver comments
       V4L/DVB (11152): hdpvr: Fix build with Config_I2C not set
+      V4L/DVB (11228): hdpvr: use debugging macro for buffer status
+      V4L/DVB (11229): hdpvr: set usb interface dev as parent in struct video_device
+      V4L/DVB (11230): hdpvr: return immediately from hdpvr_poll if data is available
+      V4L/DVB (11231): hdpvr: locking fixes
+      V4L/DVB (11245): hdpvr: add struct v4l2_device
+      V4L/DVB (11246): hdpvr: convert printing macros to v4l2_* with struct v4l2_device
+      V4L/DVB (11247): hdpvr: empty internal device buffer after stopping streaming
 
 Jean Delvare (8):
       V4L/DVB (10867): vino: fold i2c-algo-sgi code into vino.
@@ -360,7 +379,7 @@
       V4L/DVB (10943): cx88: Prevent general protection fault on rmmod
       V4L/DVB (11111a): MAINTAINERS: Drop references to deprecated video4linux list
 
-Jean-Francois Moine (71):
+Jean-Francois Moine (75):
       V4L/DVB (10332): gspca - main: Version change.
       V4L/DVB (10333): gspca - main and many subdrivers: Remove the epaddr variable.
       V4L/DVB (10337): gspca - common: Simplify the debug macros.
@@ -432,6 +451,10 @@
       V4L/DVB (11209): gspca - vc032x: New sensor mi1320_soc and webcam 15b8:6001 added.
       V4L/DVB (11211): gspca - vc032x: Simplify the i2c write function.
       V4L/DVB (11212): gspca - vc032x: Use YVYU format for sensor mi1320_soc.
+      V4L/DVB (11218): gspca - sq905: Update the frame pointer after adding the last packet.
+      V4L/DVB (11219): gspca - sq905: Optimize the resolution setting.
+      V4L/DVB (11220): gspca - finepix: Use a workqueue for streaming.
+      V4L/DVB (11223): gspca - doc: Add the 15b8:6001 webcam to the Documentation.
 
 Jochen Friedrich (2):
       V4L/DVB (10452): Add Freescale MC44S803 tuner driver
@@ -483,7 +506,7 @@
       V4L/DVB (10823): saa7134: add DVB support for Avermedia A700 cards
       V4L/DVB (10948): flexcop-pci: Print a message in case the new stream watchdog detects a problem
 
-Mauro Carvalho Chehab (45):
+Mauro Carvalho Chehab (48):
       V4L/DVB (10211): vivi: Implements 4 inputs on vivi
       V4L/DVB (10298): remove err macro from few usb devices
       V4L/DVB (10305): videobuf-vmalloc: Fix: videobuf memory were never freed
@@ -529,6 +552,9 @@
       V4L/DVB (11136): get_dvb_firmware: Add download code for cx18 firmwares
       V4L/DVB (11137): get_dvb_firmware: add cx23885 firmwares
       V4L/DVB (11138): get_dvb_firmware: add support for downloading the cx2584x firmware for pvrusb2
+      V4L/DVB (11225): v4lgrab: fix compilation warnings
+      V4L/DVB (11226): avoid warnings for request_ihex_firmware on dabusb and vicam
+      V4L/DVB (11227): ce6230: avoid using unitialized var
 
 Michael Krufky (35):
       V4L/DVB (10415): dib0700: add data debug to dib0700_i2c_xfer_new
@@ -653,10 +679,11 @@
 Philippe Rétornaz (1):
       V4L/DVB (11035): mt9t031 bugfix
 
-Randy Dunlap (3):
+Randy Dunlap (4):
       V4L/DVB (10631): zoran: fix printk format
       V4L/DVB (10830): dm1105: uses ir_* functions, select VIDEO_IR
       V4L/DVB (10846): dvb/frontends: fix duplicate 'debug' symbol
+      V4L/DVB (11237): media/zoran: fix printk format
 
 Robert Krakora (3):
       V4L/DVB (10255): em28xx: Clock (XCLK) Cleanup
@@ -693,6 +720,9 @@
 Stephan Wienczny (1):
       V4L/DVB (10949): Add support for Terratec Cinergy HT PCI MKII
 
+Stoyan Gaydarov (1):
+      V4L/DVB (11235): changed ioctls to unlocked
+
 Theodore Kilgore (2):
       V4L/DVB (10986): mr97310a: don't discard frame headers on stream output
       V4L/DVB (11213): gspca - sq905c: New subdriver.
@@ -752,6 +782,9 @@
 Vitaly Wool (1):
       V4L/DVB (10833): em28xx: enable Compro VideoMate ForYou sound
 
+klaas de waal (1):
+      V4L/DVB (11236): tda827x: fix locking issues with DVB-C
+
 sebastian.blanes at gmail.com (1):
       V4L/DVB (10824): Add "Sony PlayTV" to dibcom driver
 
@@ -1052,7 +1085,7 @@
  
  #include <stdio.h>
 diff --git a/Documentation/video4linux/gspca.txt b/Documentation/video4linux/gspca.txt
-index 1c58a76..12c8ff7 100644
+index 1c58a76..98529e0 100644
 --- a/Documentation/video4linux/gspca.txt
 +++ b/Documentation/video4linux/gspca.txt
 @@ -32,6 +32,7 @@ spca561		041e:403b	Creative Webcam Vista (VF0010)
@@ -1079,6 +1112,14 @@
  pac207		093a:2476	Genius e-Messenger 112
  pac7311		093a:2600	PAC7311 Typhoon
  pac7311		093a:2601	Philips SPC 610 NC
+@@ -279,6 +282,7 @@ spca561		10fd:7e50	FlyCam Usb 100
+ zc3xx		10fd:8050	Typhoon Webshot II USB 300k
+ ov534		1415:2000	Sony HD Eye for PS3 (SLEH 00201)
+ pac207		145f:013a	Trust WB-1300N
++vc032x		15b8:6001	HP 2.0 Megapixel
+ vc032x		15b8:6002	HP 2.0 Megapixel rz406aa
+ spca501		1776:501c	Arowana 300K CMOS Camera
+ t613		17a1:0128	TASCORP JPEG Webcam, NGS Cyclops
 diff --git a/Documentation/video4linux/si470x.txt b/Documentation/video4linux/si470x.txt
 index 49679e6..3a7823e 100644
 --- a/Documentation/video4linux/si470x.txt
@@ -1440,6 +1481,21 @@
 +of the main reasons for vivi is to be a videobuf usage example. the
 +vivi_thread_tick() does the task that the IRQ callback would do on PCI
 +drivers (or the irq callback on USB).
+diff --git a/Documentation/video4linux/v4lgrab.c b/Documentation/video4linux/v4lgrab.c
+index d6e70be..05769cf 100644
+--- a/Documentation/video4linux/v4lgrab.c
++++ b/Documentation/video4linux/v4lgrab.c
+@@ -105,8 +105,8 @@ int main(int argc, char ** argv)
+   struct video_picture vpic;
[...1896 lines suppressed...]
 +	size_t			bulk_in_size;
@@ -68697,7 +69564,8 @@
 +
 +/*========================================================================*/
 +/* v4l2 registration */
-+int hdpvr_register_videodev(struct hdpvr_device *dev, int devnumber);
++int hdpvr_register_videodev(struct hdpvr_device *dev, struct device *parent,
++			    int devnumber);
 +
 +int hdpvr_cancel_queue(struct hdpvr_device *dev);
 +
@@ -77062,10 +77930,10 @@
  
  	  This option enables a DVB interface for the pvrusb2 driver.
 diff --git a/drivers/media/video/pvrusb2/Makefile b/drivers/media/video/pvrusb2/Makefile
-index 4fda2de..a447861 100644
+index 4fda2de..de2fc14 100644
 --- a/drivers/media/video/pvrusb2/Makefile
 +++ b/drivers/media/video/pvrusb2/Makefile
-@@ -2,10 +2,10 @@ obj-pvrusb2-sysfs-$(CONFIG_VIDEO_PVRUSB2_SYSFS) := pvrusb2-sysfs.o
+@@ -2,14 +2,15 @@ obj-pvrusb2-sysfs-$(CONFIG_VIDEO_PVRUSB2_SYSFS) := pvrusb2-sysfs.o
  obj-pvrusb2-debugifc-$(CONFIG_VIDEO_PVRUSB2_DEBUGIFC) := pvrusb2-debugifc.o
  obj-pvrusb2-dvb-$(CONFIG_VIDEO_PVRUSB2_DVB) := pvrusb2-dvb.o
  
@@ -77079,6 +77947,11 @@
  		   pvrusb2-main.o pvrusb2-hdw.o pvrusb2-v4l2.o \
  		   pvrusb2-ctrl.o pvrusb2-std.o pvrusb2-devattr.o \
  		   pvrusb2-context.o pvrusb2-io.o pvrusb2-ioread.o \
+ 		   pvrusb2-cx2584x-v4l.o pvrusb2-wm8775.o \
++		   pvrusb2-cs53l32a.o \
+ 		   $(obj-pvrusb2-dvb-y) \
+ 		   $(obj-pvrusb2-sysfs-y) $(obj-pvrusb2-debugifc-y)
+ 
 diff --git a/drivers/media/video/pvrusb2/pvrusb2-audio.c b/drivers/media/video/pvrusb2/pvrusb2-audio.c
 index cdedaa5..ccf2a3c 100644
 --- a/drivers/media/video/pvrusb2/pvrusb2-audio.c
@@ -88057,10 +88930,20 @@
  	.try_fmt	= sh_mobile_ceu_try_fmt,
  	.reqbufs	= sh_mobile_ceu_reqbufs,
 diff --git a/drivers/media/video/sn9c102/sn9c102_devtable.h b/drivers/media/video/sn9c102/sn9c102_devtable.h
-index 8cb3457..41dfb60 100644
+index 8cb3457..38a7160 100644
 --- a/drivers/media/video/sn9c102/sn9c102_devtable.h
 +++ b/drivers/media/video/sn9c102/sn9c102_devtable.h
-@@ -123,7 +123,9 @@ static const struct usb_device_id sn9c102_id_table[] = {
+@@ -96,9 +96,7 @@ static const struct usb_device_id sn9c102_id_table[] = {
+ #if !defined CONFIG_USB_GSPCA && !defined CONFIG_USB_GSPCA_MODULE
+ 	{ SN9C102_USB_DEVICE(0x045e, 0x00f5, BRIDGE_SN9C105), },
+ 	{ SN9C102_USB_DEVICE(0x045e, 0x00f7, BRIDGE_SN9C105), },
+-#endif
+ 	{ SN9C102_USB_DEVICE(0x0471, 0x0327, BRIDGE_SN9C105), },
+-#if !defined CONFIG_USB_GSPCA && !defined CONFIG_USB_GSPCA_MODULE
+ 	{ SN9C102_USB_DEVICE(0x0471, 0x0328, BRIDGE_SN9C105), },
+ #endif
+ 	{ SN9C102_USB_DEVICE(0x0c45, 0x60c0, BRIDGE_SN9C105), },
+@@ -123,7 +121,9 @@ static const struct usb_device_id sn9c102_id_table[] = {
  	{ SN9C102_USB_DEVICE(0x0c45, 0x613a, BRIDGE_SN9C120), },
  #endif
  	{ SN9C102_USB_DEVICE(0x0c45, 0x613b, BRIDGE_SN9C120), },
@@ -89532,6 +90415,19 @@
  	.command = upd64083_command,
  	.probe = upd64083_probe,
  	.remove = upd64083_remove,
+diff --git a/drivers/media/video/usbvideo/vicam.c b/drivers/media/video/usbvideo/vicam.c
+index 2f11063..8d73979 100644
+--- a/drivers/media/video/usbvideo/vicam.c
++++ b/drivers/media/video/usbvideo/vicam.c
+@@ -191,7 +191,7 @@ initialize_camera(struct vicam_camera *cam)
+ {
+ 	int err;
+ 	const struct ihex_binrec *rec;
+-	const struct firmware *fw;
++	const struct firmware *uninitialized_var(fw);
+ 
+ 	err = request_ihex_firmware(&fw, "vicam/firmware.fw", &cam->udev->dev);
+ 	if (err) {
 diff --git a/drivers/media/video/usbvision/usbvision-core.c b/drivers/media/video/usbvision/usbvision-core.c
 index 9e4f506..a0feb1c 100644
 --- a/drivers/media/video/usbvision/usbvision-core.c
@@ -91257,10 +92153,50 @@
  		ret = do_video_ioctl(file, cmd, arg);
  		break;
 diff --git a/drivers/media/video/v4l2-dev.c b/drivers/media/video/v4l2-dev.c
-index 13f87c2..cdc8ce3 100644
+index 13f87c2..91228b3 100644
 --- a/drivers/media/video/v4l2-dev.c
 +++ b/drivers/media/video/v4l2-dev.c
-@@ -288,37 +288,38 @@ static const struct file_operations v4l2_fops = {
+@@ -198,6 +198,23 @@ static long v4l2_unlocked_ioctl(struct file *filp,
+ 	return vdev->fops->unlocked_ioctl(filp, cmd, arg);
+ }
+ 
++#ifdef CONFIG_MMU
++#define v4l2_get_unmapped_area NULL
++#else
++static unsigned long v4l2_get_unmapped_area(struct file *filp,
++		unsigned long addr, unsigned long len, unsigned long pgoff,
++		unsigned long flags)
++{
++	struct video_device *vdev = video_devdata(filp);
++
++	if (!vdev->fops->get_unmapped_area)
++		return -ENOSYS;
++	if (video_is_unregistered(vdev))
++		return -ENODEV;
++	return vdev->fops->get_unmapped_area(filp, addr, len, pgoff, flags);
++}
++#endif
++
+ static int v4l2_mmap(struct file *filp, struct vm_area_struct *vm)
+ {
+ 	struct video_device *vdev = video_devdata(filp);
+@@ -250,6 +267,7 @@ static const struct file_operations v4l2_unlocked_fops = {
+ 	.read = v4l2_read,
+ 	.write = v4l2_write,
+ 	.open = v4l2_open,
++	.get_unmapped_area = v4l2_get_unmapped_area,
+ 	.mmap = v4l2_mmap,
+ 	.unlocked_ioctl = v4l2_unlocked_ioctl,
+ #ifdef CONFIG_COMPAT
+@@ -265,6 +283,7 @@ static const struct file_operations v4l2_fops = {
+ 	.read = v4l2_read,
+ 	.write = v4l2_write,
+ 	.open = v4l2_open,
++	.get_unmapped_area = v4l2_get_unmapped_area,
+ 	.mmap = v4l2_mmap,
+ 	.ioctl = v4l2_ioctl,
+ #ifdef CONFIG_COMPAT
+@@ -288,37 +307,38 @@ static const struct file_operations v4l2_fops = {
   */
  static int get_index(struct video_device *vdev, int num)
  {
@@ -91311,7 +92247,7 @@
  }
  
  int video_register_device(struct video_device *vdev, int type, int nr)
-@@ -365,12 +366,11 @@ int video_register_device_index(struct video_device *vdev, int type, int nr,
+@@ -365,12 +385,11 @@ int video_register_device_index(struct video_device *vdev, int type, int nr,
  
  	/* A minor value of -1 marks this video device as never
  	   having been registered */
@@ -91327,7 +92263,7 @@
  		return -EINVAL;
  
  	/* Part 1: check device type */
-@@ -395,7 +395,7 @@ int video_register_device_index(struct video_device *vdev, int type, int nr,
+@@ -395,7 +414,7 @@ int video_register_device_index(struct video_device *vdev, int type, int nr,
  
  	vdev->vfl_type = type;
  	vdev->cdev = NULL;
@@ -91336,7 +92272,7 @@
  		vdev->parent = vdev->v4l2_dev->dev;
  
  	/* Part 2: find a free minor, kernel number and device index. */
-@@ -582,6 +582,7 @@ module_exit(videodev_exit)
+@@ -582,6 +601,7 @@ module_exit(videodev_exit)
  MODULE_AUTHOR("Alan Cox, Mauro Carvalho Chehab <mchehab at infradead.org>");
  MODULE_DESCRIPTION("Device registrar for Video4Linux drivers v2");
  MODULE_LICENSE("GPL");
@@ -98247,7 +99183,7 @@
  
  #endif				/* __ZORAN_DEVICE_H__ */
 diff --git a/drivers/media/video/zoran/zoran_driver.c b/drivers/media/video/zoran/zoran_driver.c
-index 120ef23..1e87fb9 100644
+index 120ef23..f16e57c 100644
 --- a/drivers/media/video/zoran/zoran_driver.c
 +++ b/drivers/media/video/zoran/zoran_driver.c
 @@ -58,16 +58,6 @@
@@ -98624,9 +99560,9 @@
 +			SetPageReserved(virt_to_page(mem + off));
 +		dprintk(4,
 +			KERN_INFO
-+			"%s: %s - V4L frame %d mem 0x%lx (bus: 0x%lx)\n",
++			"%s: %s - V4L frame %d mem 0x%lx (bus: 0x%llx)\n",
 +			ZR_DEVNAME(zr), __func__, i, (unsigned long) mem,
-+			virt_to_bus(mem));
++			(unsigned long long)virt_to_bus(mem));
  	}
  
 -	fh->v4l_buffers.allocated = 1;
@@ -104816,6 +105752,19 @@
 +#define VIDIOC_INT_G_INPUT_STATUS	_IOR('d', 118, u32)
 +
  #endif /* V4L2_COMMON_H_ */
+diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h
+index e36faab..2058dd4 100644
+--- a/include/media/v4l2-dev.h
++++ b/include/media/v4l2-dev.h
+@@ -40,6 +40,8 @@ struct v4l2_file_operations {
+ 	unsigned int (*poll) (struct file *, struct poll_table_struct *);
+ 	long (*ioctl) (struct file *, unsigned int, unsigned long);
+ 	long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long);
++	unsigned long (*get_unmapped_area) (struct file *, unsigned long,
++				unsigned long, unsigned long, unsigned long);
+ 	int (*mmap) (struct file *, struct vm_area_struct *);
+ 	int (*open) (struct file *);
+ 	int (*release) (struct file *);
 diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h
 index 55e41af..0dd3e8e 100644
 --- a/include/media/v4l2-device.h

linux-2.6-v4l-dvb-update.patch:

Index: linux-2.6-v4l-dvb-update.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-v4l-dvb-update.patch,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- linux-2.6-v4l-dvb-update.patch	26 Mar 2009 08:25:59 -0000	1.13
+++ linux-2.6-v4l-dvb-update.patch	28 Mar 2009 12:52:34 -0000	1.14
@@ -0,0 +1,366 @@
+Mauro Carvalho Chehab (1):
+      Merge branch 'next' of ../devel into Fedora
+
+Uri Shkolnik (1):
+      V4L/DVB (11241): Siano: SDIO interface driver - remove two redundant lines
+
+diff --git a/linux/drivers/media/dvb/siano/smssdio.c b/linux/drivers/media/dvb/siano/smssdio.c
+new file mode 100644
+index 0000000..4f8fa59
+--- /dev/null
++++ b/linux/drivers/media/dvb/siano/smssdio.c
+@@ -0,0 +1,354 @@
++/*
++ *  smssdio.c - Siano 1xxx SDIO interface driver
++ *
++ *  Copyright 2008 Pierre Ossman
++ *
++ * Based on code by Siano Mobile Silicon, Inc.,
++ * Copyright (C) 2006-2008, Uri Shkolnik
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or (at
++ * your option) any later version.
++ *
++ *
++ * This hardware is a bit odd in that all transfers should be done
++ * to/from the SMSSDIO_DATA register, yet the "increase address" bit
++ * always needs to be set.
++ *
++ * Also, buffers from the card are always aligned to 128 byte
++ * boundaries.
++ */
++
++/*
++ * General cleanup notes:
++ *
++ * - only typedefs should be name *_t
++ *
++ * - use ERR_PTR and friends for smscore_register_device()
++ *
++ * - smscore_getbuffer should zero fields
++ *
++ * Fix stop command
++ */
++
++#include <linux/moduleparam.h>
++#include <linux/firmware.h>
++#include <linux/delay.h>
++#include <linux/mmc/card.h>
++#include <linux/mmc/sdio_func.h>
++#include <linux/mmc/sdio_ids.h>
++
++#include "smscoreapi.h"
++#include "sms-cards.h"
++
++/* Registers */
++
++#define SMSSDIO_DATA		0x00
++#define SMSSDIO_INT		0x04
++
++static const struct sdio_device_id smssdio_ids[] = {
++	{SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_STELLAR),
++	 .driver_data = SMS1XXX_BOARD_SIANO_STELLAR},
++	{SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_NOVA_A0),
++	 .driver_data = SMS1XXX_BOARD_SIANO_NOVA_A},
++	{SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_NOVA_B0),
++	 .driver_data = SMS1XXX_BOARD_SIANO_NOVA_B},
++	{SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_VEGA_A0),
++	 .driver_data = SMS1XXX_BOARD_SIANO_VEGA},
++	{SDIO_DEVICE(SDIO_VENDOR_ID_SIANO, SDIO_DEVICE_ID_SIANO_VENICE),
++	 .driver_data = SMS1XXX_BOARD_SIANO_VEGA},
++	{ /* end: all zeroes */ },
++};
++
++MODULE_DEVICE_TABLE(sdio, smssdio_ids);
++
++struct smssdio_device {
++	struct sdio_func *func;
++
++	struct smscore_device_t *coredev;
++
++	struct smscore_buffer_t *split_cb;
++};
++
++/*******************************************************************/
++/* Siano core callbacks                                            */
++/*******************************************************************/
++
++static int smssdio_sendrequest(void *context, void *buffer, size_t size)
++{
++	int ret;
++	struct smssdio_device *smsdev;
++
++	smsdev = context;
++
++	sdio_claim_host(smsdev->func);
++
++	while (size >= smsdev->func->cur_blksize) {
++		ret = sdio_write_blocks(smsdev->func, SMSSDIO_DATA, buffer, 1);
++		if (ret)
++			goto out;
++
++		buffer += smsdev->func->cur_blksize;
++		size -= smsdev->func->cur_blksize;
++	}
++
++	if (size) {
++		ret = sdio_write_bytes(smsdev->func, SMSSDIO_DATA,
++				       buffer, size);
++	}
++
++out:
++	sdio_release_host(smsdev->func);
++
++	return ret;
++}
++
++/*******************************************************************/
++/* SDIO callbacks                                                  */
++/*******************************************************************/
++
++static void smssdio_interrupt(struct sdio_func *func)
++{
++	int ret, isr;
++
++	struct smssdio_device *smsdev;
++	struct smscore_buffer_t *cb;
++	struct SmsMsgHdr_ST *hdr;
++	size_t size;
++
++	smsdev = sdio_get_drvdata(func);
++
++	/*
++	 * The interrupt register has no defined meaning. It is just
++	 * a way of turning of the level triggered interrupt.
++	 */
++	isr = sdio_readb(func, SMSSDIO_INT, &ret);
++	if (ret) {
++		dev_err(&smsdev->func->dev,
++			"Unable to read interrupt register!\n");
++		return;
++	}
++
++	if (smsdev->split_cb == NULL) {
++		cb = smscore_getbuffer(smsdev->coredev);
++		if (!cb) {
++			dev_err(&smsdev->func->dev,
++				"Unable to allocate data buffer!\n");
++			return;
++		}
++
++		ret = sdio_read_blocks(smsdev->func, cb->p, SMSSDIO_DATA, 1);
++		if (ret) {
++			dev_err(&smsdev->func->dev,
++				"Error %d reading initial block!\n", ret);
++			return;
++		}
++
++		hdr = cb->p;
++
++		if (hdr->msgFlags & MSG_HDR_FLAG_SPLIT_MSG) {
++			smsdev->split_cb = cb;
++			return;
++		}
++
++		size = hdr->msgLength - smsdev->func->cur_blksize;
++	} else {
++		cb = smsdev->split_cb;
++		hdr = cb->p;
++
++		size = hdr->msgLength - sizeof(struct SmsMsgHdr_ST);
++
++		smsdev->split_cb = NULL;
++	}
++
++	if (hdr->msgLength > smsdev->func->cur_blksize) {
++		void *buffer;
++
++		size = ALIGN(size, 128);
++		buffer = cb->p + hdr->msgLength;
++
++		BUG_ON(smsdev->func->cur_blksize != 128);
++
++		/*
++		 * First attempt to transfer all of it in one go...
++		 */
++		ret = sdio_read_blocks(smsdev->func, buffer,
++				       SMSSDIO_DATA, size / 128);
++		if (ret && ret != -EINVAL) {
++			smscore_putbuffer(smsdev->coredev, cb);
++			dev_err(&smsdev->func->dev,
++				"Error %d reading data from card!\n", ret);
++			return;
++		}
++
++		/*
++		 * ..then fall back to one block at a time if that is
++		 * not possible...
++		 *
++		 * (we have to do this manually because of the
++		 * problem with the "increase address" bit)
++		 */
++		if (ret == -EINVAL) {
++			while (size) {
++				ret = sdio_read_blocks(smsdev->func,
++						       buffer, SMSSDIO_DATA, 1);
++				if (ret) {
++					smscore_putbuffer(smsdev->coredev, cb);
++					dev_err(&smsdev->func->dev,
++						"Error %d reading "
++						"data from card!\n", ret);
++					return;
++				}
++
++				buffer += smsdev->func->cur_blksize;
++				if (size > smsdev->func->cur_blksize)
++					size -= smsdev->func->cur_blksize;
++				else
++					size = 0;
++			}
++		}
++	}
++
++	cb->size = hdr->msgLength;
++	cb->offset = 0;
++
++	smscore_onresponse(smsdev->coredev, cb);
++}
++
++static int smssdio_probe(struct sdio_func *func,
++			 const struct sdio_device_id *id)
++{
++	int ret;
++
++	int board_id;
++	struct smssdio_device *smsdev;
++	struct smsdevice_params_t params;
++
++	board_id = id->driver_data;
++
++	smsdev = kzalloc(sizeof(struct smssdio_device), GFP_KERNEL);
++	if (!smsdev)
++		return -ENOMEM;
++
++	smsdev->func = func;
++
++	memset(&params, 0, sizeof(struct smsdevice_params_t));
++
++	params.device = &func->dev;
++	params.buffer_size = 0x5000;	/* ?? */
++	params.num_buffers = 22;	/* ?? */
++	params.context = smsdev;
++
++	snprintf(params.devpath, sizeof(params.devpath),
++		 "sdio\\%s", sdio_func_id(func));
++
++	params.sendrequest_handler = smssdio_sendrequest;
++
++	params.device_type = sms_get_board(board_id)->type;
++
++	if (params.device_type != SMS_STELLAR)
++		params.flags |= SMS_DEVICE_FAMILY2;
++	else {
++		/*
++		 * FIXME: Stellar needs special handling...
++		 */
++		ret = -ENODEV;
++		goto free;
++	}
++
++	ret = smscore_register_device(&params, &smsdev->coredev);
++	if (ret < 0)
++		goto free;
++
++	smscore_set_board_id(smsdev->coredev, board_id);
++
++	sdio_claim_host(func);
++
++	ret = sdio_enable_func(func);
++	if (ret)
++		goto release;
++
++	ret = sdio_set_block_size(func, 128);
++	if (ret)
++		goto disable;
++
++	ret = sdio_claim_irq(func, smssdio_interrupt);
++	if (ret)
++		goto disable;
++
++	sdio_set_drvdata(func, smsdev);
++
++	sdio_release_host(func);
++
++	ret = smscore_start_device(smsdev->coredev);
++	if (ret < 0)
++		goto reclaim;
++
++	return 0;
++
++reclaim:
++	sdio_claim_host(func);
++	sdio_release_irq(func);
++disable:
++	sdio_disable_func(func);
++release:
++	sdio_release_host(func);
++	smscore_unregister_device(smsdev->coredev);
++free:
++	kfree(smsdev);
++
++	return ret;
++}
++
++static void smssdio_remove(struct sdio_func *func)
++{
++	struct smssdio_device *smsdev;
++
++	smsdev = sdio_get_drvdata(func);
++
++	/* FIXME: racy! */
++	if (smsdev->split_cb)
++		smscore_putbuffer(smsdev->coredev, smsdev->split_cb);
++
++	smscore_unregister_device(smsdev->coredev);
++
++	sdio_claim_host(func);
++	sdio_release_irq(func);
++	sdio_disable_func(func);
++	sdio_release_host(func);
++
++	kfree(smsdev);
++}
++
++static struct sdio_driver smssdio_driver = {
++	.name = "smssdio",
++	.id_table = smssdio_ids,
++	.probe = smssdio_probe,
++	.remove = smssdio_remove,
++};
++
++/*******************************************************************/
++/* Module functions                                                */
++/*******************************************************************/
++
++int smssdio_register(void)
++{
++	int ret = 0;
++
++	printk(KERN_INFO "smssdio: Siano SMS1xxx SDIO driver\n");
++	printk(KERN_INFO "smssdio: Copyright Pierre Ossman\n");
++
++	ret = sdio_register_driver(&smssdio_driver);
++
++	return ret;
++}
++
++void smssdio_unregister(void)
++{
++	sdio_unregister_driver(&smssdio_driver);
++}
++
++MODULE_DESCRIPTION("Siano SMS1xxx SDIO driver");
++MODULE_AUTHOR("Pierre Ossman");
++MODULE_LICENSE("GPL");




More information about the fedora-extras-commits mailing list