Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154958
b: refs/heads/master
c: 9861df1
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jul 6, 2009
1 parent 1f8c821 commit 73c9551
Show file tree
Hide file tree
Showing 56 changed files with 1,202 additions and 186 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 67fc25ef34a27dc43ce6dfc98a8b249db304d641
refs/heads/master: 9861df15f44d98eb6fa9a839b558633ecee87194
53 changes: 52 additions & 1 deletion trunk/Documentation/dvb/get_dvb_firmware
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use IO::Handle;
"tda10046lifeview", "av7110", "dec2000t", "dec2540t",
"dec3000s", "vp7041", "dibusb", "nxt2002", "nxt2004",
"or51211", "or51132_qam", "or51132_vsb", "bluebird",
"opera1", "cx231xx", "cx18", "cx23885", "pvrusb2" );
"opera1", "cx231xx", "cx18", "cx23885", "pvrusb2", "mpc718" );

# Check args
syntax() if (scalar(@ARGV) != 1);
Expand Down Expand Up @@ -381,6 +381,57 @@ sub cx18 {
$allfiles;
}

sub mpc718 {
my $archive = 'Yuan MPC718 TV Tuner Card 2.13.10.1016.zip';
my $url = "ftp://ftp.work.acer-euro.com/desktop/aspire_idea510/vista/Drivers/$archive";
my $fwfile = "dvb-cx18-mpc718-mt352.fw";
my $tmpdir = tempdir(DIR => "/tmp", CLEANUP => 1);

checkstandard();
wgetfile($archive, $url);
unzip($archive, $tmpdir);

my $sourcefile = "$tmpdir/Yuan MPC718 TV Tuner Card 2.13.10.1016/mpc718_32bit/yuanrap.sys";
my $found = 0;

open IN, '<', $sourcefile or die "Couldn't open $sourcefile to extract $fwfile data\n";
binmode IN;
open OUT, '>', $fwfile;
binmode OUT;
{
# Block scope because we change the line terminator variable $/
my $prevlen = 0;
my $currlen;

# Buried in the data segment are 3 runs of almost identical
# register-value pairs that end in 0x5d 0x01 which is a "TUNER GO"
# command for the MT352.
# Pull out the middle run (because it's easy) of register-value
# pairs to make the "firmware" file.

local $/ = "\x5d\x01"; # MT352 "TUNER GO"

while (<IN>) {
$currlen = length($_);
if ($prevlen == $currlen && $currlen <= 64) {
chop; chop; # Get rid of "TUNER GO"
s/^\0\0//; # get rid of leading 00 00 if it's there
printf OUT "$_";
$found = 1;
last;
}
$prevlen = $currlen;
}
}
close OUT;
close IN;
if (!$found) {
unlink $fwfile;
die "Couldn't find valid register-value sequence in $sourcefile for $fwfile\n";
}
$fwfile;
}

sub cx23885 {
my $url = "http://linuxtv.org/downloads/firmware/";

Expand Down
1 change: 1 addition & 0 deletions trunk/Documentation/video4linux/CARDLIST.em28xx
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,4 @@
68 -> Terratec AV350 (em2860) [0ccd:0084]
69 -> KWorld ATSC 315U HDTV TV Box (em2882) [eb1a:a313]
70 -> Evga inDtube (em2882)
71 -> Silvercrest Webcam 1.3mpix (em2820/em2840)
12 changes: 12 additions & 0 deletions trunk/arch/x86/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1913,6 +1913,18 @@ config DMAR_DEFAULT_ON
recommended you say N here while the DMAR code remains
experimental.

config DMAR_BROKEN_GFX_WA
def_bool n
prompt "Workaround broken graphics drivers (going away soon)"
depends on DMAR
---help---
Current Graphics drivers tend to use physical address
for DMA and avoid using DMA APIs. Setting this config
option permits the IOMMU driver to set a unity map for
all the OS-visible memory. Hence the driver can continue
to use physical addresses for DMA, at least until this
option is removed in the 2.6.32 kernel.

config DMAR_FLOPPY_WA
def_bool y
depends on DMAR
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ CFLAGS_tsc.o := $(nostackp)
CFLAGS_paravirt.o := $(nostackp)
GCOV_PROFILE_vsyscall_64.o := n
GCOV_PROFILE_hpet.o := n
GCOV_PROFILE_tsc.o := n
GCOV_PROFILE_paravirt.o := n

obj-y := process_$(BITS).o signal.o entry_$(BITS).o
obj-y += traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o
Expand Down
14 changes: 7 additions & 7 deletions trunk/drivers/firewire/core-card.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ static void allocate_broadcast_channel(struct fw_card *card, int generation)
{
int channel, bandwidth = 0;

fw_iso_resource_manage(card, generation, 1ULL << 31,
&channel, &bandwidth, true);
fw_iso_resource_manage(card, generation, 1ULL << 31, &channel,
&bandwidth, true, card->bm_transaction_data);
if (channel == 31) {
card->broadcast_channel_allocated = true;
device_for_each_child(card->device, (void *)(long)generation,
Expand Down Expand Up @@ -230,7 +230,6 @@ static void fw_card_bm_work(struct work_struct *work)
bool do_reset = false;
bool root_device_is_running;
bool root_device_is_cmc;
__be32 lock_data[2];

spin_lock_irqsave(&card->lock, flags);

Expand Down Expand Up @@ -273,22 +272,23 @@ static void fw_card_bm_work(struct work_struct *work)
goto pick_me;
}

lock_data[0] = cpu_to_be32(0x3f);
lock_data[1] = cpu_to_be32(local_id);
card->bm_transaction_data[0] = cpu_to_be32(0x3f);
card->bm_transaction_data[1] = cpu_to_be32(local_id);

spin_unlock_irqrestore(&card->lock, flags);

rcode = fw_run_transaction(card, TCODE_LOCK_COMPARE_SWAP,
irm_id, generation, SCODE_100,
CSR_REGISTER_BASE + CSR_BUS_MANAGER_ID,
lock_data, sizeof(lock_data));
card->bm_transaction_data,
sizeof(card->bm_transaction_data));

if (rcode == RCODE_GENERATION)
/* Another bus reset, BM work has been rescheduled. */
goto out;

if (rcode == RCODE_COMPLETE &&
lock_data[0] != cpu_to_be32(0x3f)) {
card->bm_transaction_data[0] != cpu_to_be32(0x3f)) {

/* Somebody else is BM. Only act as IRM. */
if (local_id == irm_id)
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/firewire/core-cdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ struct iso_resource {
int generation;
u64 channels;
s32 bandwidth;
__be32 transaction_data[2];
struct iso_resource_event *e_alloc, *e_dealloc;
};

Expand Down Expand Up @@ -1049,7 +1050,8 @@ static void iso_resource_work(struct work_struct *work)
r->channels, &channel, &bandwidth,
todo == ISO_RES_ALLOC ||
todo == ISO_RES_REALLOC ||
todo == ISO_RES_ALLOC_ONCE);
todo == ISO_RES_ALLOC_ONCE,
r->transaction_data);
/*
* Is this generation outdated already? As long as this resource sticks
* in the idr, it will be scheduled again for a newer generation or at
Expand Down
24 changes: 13 additions & 11 deletions trunk/drivers/firewire/core-iso.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,8 @@ EXPORT_SYMBOL(fw_iso_context_stop);
*/

static int manage_bandwidth(struct fw_card *card, int irm_id, int generation,
int bandwidth, bool allocate)
int bandwidth, bool allocate, __be32 data[2])
{
__be32 data[2];
int try, new, old = allocate ? BANDWIDTH_AVAILABLE_INITIAL : 0;

/*
Expand Down Expand Up @@ -215,9 +214,9 @@ static int manage_bandwidth(struct fw_card *card, int irm_id, int generation,
}

static int manage_channel(struct fw_card *card, int irm_id, int generation,
u32 channels_mask, u64 offset, bool allocate)
u32 channels_mask, u64 offset, bool allocate, __be32 data[2])
{
__be32 data[2], c, all, old;
__be32 c, all, old;
int i, retry = 5;

old = all = allocate ? cpu_to_be32(~0) : 0;
Expand Down Expand Up @@ -260,7 +259,7 @@ static int manage_channel(struct fw_card *card, int irm_id, int generation,
}

static void deallocate_channel(struct fw_card *card, int irm_id,
int generation, int channel)
int generation, int channel, __be32 buffer[2])
{
u32 mask;
u64 offset;
Expand All @@ -269,7 +268,7 @@ static void deallocate_channel(struct fw_card *card, int irm_id,
offset = channel < 32 ? CSR_REGISTER_BASE + CSR_CHANNELS_AVAILABLE_HI :
CSR_REGISTER_BASE + CSR_CHANNELS_AVAILABLE_LO;

manage_channel(card, irm_id, generation, mask, offset, false);
manage_channel(card, irm_id, generation, mask, offset, false, buffer);
}

/**
Expand Down Expand Up @@ -298,7 +297,7 @@ static void deallocate_channel(struct fw_card *card, int irm_id,
*/
void fw_iso_resource_manage(struct fw_card *card, int generation,
u64 channels_mask, int *channel, int *bandwidth,
bool allocate)
bool allocate, __be32 buffer[2])
{
u32 channels_hi = channels_mask; /* channels 31...0 */
u32 channels_lo = channels_mask >> 32; /* channels 63...32 */
Expand All @@ -310,10 +309,12 @@ void fw_iso_resource_manage(struct fw_card *card, int generation,

if (channels_hi)
c = manage_channel(card, irm_id, generation, channels_hi,
CSR_REGISTER_BASE + CSR_CHANNELS_AVAILABLE_HI, allocate);
CSR_REGISTER_BASE + CSR_CHANNELS_AVAILABLE_HI,
allocate, buffer);
if (channels_lo && c < 0) {
c = manage_channel(card, irm_id, generation, channels_lo,
CSR_REGISTER_BASE + CSR_CHANNELS_AVAILABLE_LO, allocate);
CSR_REGISTER_BASE + CSR_CHANNELS_AVAILABLE_LO,
allocate, buffer);
if (c >= 0)
c += 32;
}
Expand All @@ -325,12 +326,13 @@ void fw_iso_resource_manage(struct fw_card *card, int generation,
if (*bandwidth == 0)
return;

ret = manage_bandwidth(card, irm_id, generation, *bandwidth, allocate);
ret = manage_bandwidth(card, irm_id, generation, *bandwidth,
allocate, buffer);
if (ret < 0)
*bandwidth = 0;

if (allocate && ret < 0 && c >= 0) {
deallocate_channel(card, irm_id, generation, c);
deallocate_channel(card, irm_id, generation, c, buffer);
*channel = ret;
}
}
3 changes: 2 additions & 1 deletion trunk/drivers/firewire/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ void fw_node_event(struct fw_card *card, struct fw_node *node, int event);

int fw_iso_buffer_map(struct fw_iso_buffer *buffer, struct vm_area_struct *vma);
void fw_iso_resource_manage(struct fw_card *card, int generation,
u64 channels_mask, int *channel, int *bandwidth, bool allocate);
u64 channels_mask, int *channel, int *bandwidth,
bool allocate, __be32 buffer[2]);


/* -topology */
Expand Down
10 changes: 9 additions & 1 deletion trunk/drivers/firewire/sbp2.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,12 @@ static struct fw_device *target_device(struct sbp2_target *tgt)
#define SBP2_RETRY_LIMIT 0xf /* 15 retries */
#define SBP2_CYCLE_LIMIT (0xc8 << 12) /* 200 125us cycles */

/*
* There is no transport protocol limit to the CDB length, but we implement
* a fixed length only. 16 bytes is enough for disks larger than 2 TB.
*/
#define SBP2_MAX_CDB_SIZE 16

/*
* The default maximum s/g segment size of a FireWire controller is
* usually 0x10000, but SBP-2 only allows 0xffff. Since buffers have to
Expand Down Expand Up @@ -312,7 +318,7 @@ struct sbp2_command_orb {
struct sbp2_pointer next;
struct sbp2_pointer data_descriptor;
__be32 misc;
u8 command_block[12];
u8 command_block[SBP2_MAX_CDB_SIZE];
} request;
struct scsi_cmnd *cmd;
scsi_done_fn_t done;
Expand Down Expand Up @@ -1146,6 +1152,8 @@ static int sbp2_probe(struct device *dev)
if (fw_device_enable_phys_dma(device) < 0)
goto fail_shost_put;

shost->max_cmd_len = SBP2_MAX_CDB_SIZE;

if (scsi_add_host(shost, &unit->device) < 0)
goto fail_shost_put;

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/ieee1394/sbp2.c
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,7 @@ static struct sbp2_lu *sbp2_alloc_device(struct unit_directory *ud)
}

shost->hostdata[0] = (unsigned long)lu;
shost->max_cmd_len = SBP2_MAX_CDB_SIZE;

if (!scsi_add_host(shost, &ud->device)) {
lu->shost = shost;
Expand Down
8 changes: 7 additions & 1 deletion trunk/drivers/ieee1394/sbp2.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@

#define SBP2_DEVICE_NAME "sbp2"

/*
* There is no transport protocol limit to the CDB length, but we implement
* a fixed length only. 16 bytes is enough for disks larger than 2 TB.
*/
#define SBP2_MAX_CDB_SIZE 16

/*
* SBP-2 specific definitions
*/
Expand Down Expand Up @@ -51,7 +57,7 @@ struct sbp2_command_orb {
u32 data_descriptor_hi;
u32 data_descriptor_lo;
u32 misc;
u8 cdb[12];
u8 cdb[SBP2_MAX_CDB_SIZE];
} __attribute__((packed));

#define SBP2_LOGIN_REQUEST 0x0
Expand Down
13 changes: 12 additions & 1 deletion trunk/drivers/media/common/tuners/tuner-xc2028.c
Original file line number Diff line number Diff line change
Expand Up @@ -1096,8 +1096,19 @@ static int xc2028_set_params(struct dvb_frontend *fe,
}

/* All S-code tables need a 200kHz shift */
if (priv->ctrl.demod)
if (priv->ctrl.demod) {
demod = priv->ctrl.demod + 200;
/*
* The DTV7 S-code table needs a 700 kHz shift.
* Thanks to Terry Wu <terrywu2009@gmail.com> for reporting this
*
* DTV7 is only used in Australia. Germany or Italy may also
* use this firmware after initialization, but a tune to a UHF
* channel should then cause DTV78 to be used.
*/
if (type & DTV7)
demod += 500;
}

return generic_set_freq(fe, p->frequency,
T_DIGITAL_TV, type, 0, demod);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/dvb/ttpci/Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
config TTPCI_EEPROM
tristate
depends on I2C
default n

config DVB_AV7110
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/media/radio/radio-si470x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@ static int si470x_fops_release(struct file *file)
video_unregister_device(radio->videodev);
kfree(radio->buffer);
kfree(radio);
goto done;
goto unlock;
}

/* stop rds reception */
Expand All @@ -1213,9 +1213,8 @@ static int si470x_fops_release(struct file *file)
retval = si470x_stop(radio);
usb_autopm_put_interface(radio->intf);
}

unlock:
mutex_unlock(&radio->disconnect_lock);

done:
return retval;
}
Expand Down
8 changes: 8 additions & 0 deletions trunk/drivers/media/video/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,14 @@ config VIDEO_OV7670
OV7670 VGA camera. It currently only works with the M88ALP01
controller.

config VIDEO_MT9V011
tristate "Micron mt9v011 sensor support"
depends on I2C && VIDEO_V4L2
---help---
This is a Video4Linux2 sensor-level driver for the Micron
mt0v011 1.3 Mpixel camera. It currently only works with the
em28xx driver.

config VIDEO_TCM825X
tristate "TCM825x camera sensor support"
depends on I2C && VIDEO_V4L2
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/video/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ obj-$(CONFIG_VIDEO_UPD64083) += upd64083.o
obj-$(CONFIG_VIDEO_OV7670) += ov7670.o
obj-$(CONFIG_VIDEO_TCM825X) += tcm825x.o
obj-$(CONFIG_VIDEO_TVEEPROM) += tveeprom.o
obj-$(CONFIG_VIDEO_MT9V011) += mt9v011.o

obj-$(CONFIG_SOC_CAMERA_MT9M001) += mt9m001.o
obj-$(CONFIG_SOC_CAMERA_MT9M111) += mt9m111.o
Expand Down
Loading

0 comments on commit 73c9551

Please sign in to comment.