Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73190
b: refs/heads/master
c: 5d66f15
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Nov 5, 2007
1 parent ae2357c commit 78a36e7
Show file tree
Hide file tree
Showing 36 changed files with 281 additions and 96 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: bd3989e006ed1c88d47c3308746ae0330fc1bcf4
refs/heads/master: 5d66f151ac7cb5162f201fe2996c6e01f0323f37
3 changes: 3 additions & 0 deletions trunk/Documentation/video4linux/CARDLIST.em28xx
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@
7 -> Leadtek Winfast USB II (em2800)
8 -> Kworld USB2800 (em2800)
9 -> Pinnacle Dazzle DVC 90 (em2820/em2840) [2304:0207]
10 -> Hauppauge WinTV HVR 900 (em2880)
11 -> Terratec Hybrid XS (em2880)
12 -> Kworld PVR TV 2800 RF (em2820/em2840)
13 -> Terratec Prodigy XS (em2880)
19 changes: 16 additions & 3 deletions trunk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,22 @@ KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,)

# Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
KBUILD_CPPFLAGS += $(CPPFLAGS)
KBUILD_AFLAGS += $(AFLAGS)
KBUILD_CFLAGS += $(CFLAGS)
# But warn user when we do so
warn-assign = \
$(warning "WARNING: Appending $$K$(1) ($(K$(1))) from $(origin K$(1)) to kernel $$$(1)")

ifneq ($(KCPPFLAGS),)
$(call warn-assign,CPPFLAGS)
KBUILD_CPPFLAGS += $(KCPPFLAGS)
endif
ifneq ($(KAFLAGS),)
$(call warn-assign,AFLAGS)
KBUILD_AFLAGS += $(KAFLAGS)
endif
ifneq ($(KCFLAGS),)
$(call warn-assign,CFLAGS)
KBUILD_CFLAGS += $(KCFLAGS)
endif

# Use --build-id when available.
LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
Expand Down
22 changes: 18 additions & 4 deletions trunk/drivers/ide/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,22 @@ config BLK_DEV_IDEDISK
If unsure, say Y.

config IDEDISK_MULTI_MODE
bool "Use multi-mode by default"
help
If you get this error, try to say Y here:
bool "Use multiple sector mode for Programmed Input/Output by default"
help
This setting is irrelevant for most IDE disks, with direct memory
access, to which multiple sector mode does not apply. Multiple sector
mode is a feature of most modern IDE hard drives, permitting the
transfer of multiple sectors per Programmed Input/Output interrupt,
rather than the usual one sector per interrupt. When this feature is
enabled, it can reduce operating system overhead for disk Programmed
Input/Output. On some systems, it also can increase the data
throughput of Programmed Input/Output. Some drives, however, seemed
to run slower with multiple sector mode enabled. Some drives claimed
to support multiple sector mode, but lost data at some settings.
Under rare circumstances, such failures could result in massive
filesystem corruption.

If you get the following error, try to say Y here:

hda: set_multmode: status=0x51 { DriveReady SeekComplete Error }
hda: set_multmode: error=0x04 { DriveStatusError }
Expand Down Expand Up @@ -380,9 +393,10 @@ config IDEPCI_SHARE_IRQ
config IDEPCI_PCIBUS_ORDER
def_bool BLK_DEV_IDE=y && BLK_DEV_IDEPCI

# TODO: split it on per host driver config options (or module parameters)
config BLK_DEV_OFFBOARD
bool "Boot off-board chipsets first support"
depends on BLK_DEV_IDEPCI
depends on BLK_DEV_IDEPCI && (BLK_DEV_AEC62XX || BLK_DEV_GENERIC || BLK_DEV_HPT34X || BLK_DEV_HPT366 || BLK_DEV_PDC202XX_NEW || BLK_DEV_PDC202XX_OLD || BLK_DEV_TC86C001)
help
Normally, IDE controllers built into the motherboard (on-board
controllers) are assigned to ide0 and ide1 while those on add-in PCI
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/ide/ide-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ static int config_drive_for_dma (ide_drive_t *drive)

if (drive->media != ide_disk) {
if (hwif->host_flags & IDE_HFLAG_NO_ATAPI_DMA)
return -1;
return 0;
}

/*
Expand Down Expand Up @@ -752,7 +752,8 @@ u8 ide_find_dma_mode(ide_drive_t *drive, u8 req_mode)
mode = XFER_MW_DMA_1;
}

printk(KERN_DEBUG "%s: selected mode 0x%x\n", drive->name, mode);
printk(KERN_DEBUG "%s: %s mode selected\n", drive->name,
mode ? ide_xfer_verbose(mode) : "no DMA");

return min(mode, req_mode);
}
Expand Down
5 changes: 4 additions & 1 deletion trunk/drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@ void ide_end_drive_cmd (ide_drive_t *drive, u8 stat, u8 err)
if (args) {
args[0] = stat;
args[1] = err;
/* be sure we're looking at the low order bits */
hwif->OUTB(drive->ctl & ~0x80, IDE_CONTROL_REG);
args[2] = hwif->INB(IDE_NSECTOR_REG);
args[3] = hwif->INB(IDE_SECTOR_REG);
args[4] = hwif->INB(IDE_LCYL_REG);
Expand Down Expand Up @@ -654,7 +656,8 @@ static ide_startstop_t drive_cmd_intr (ide_drive_t *drive)
int retries = 10;

local_irq_enable_in_hardirq();
if ((stat & DRQ_STAT) && args && args[3]) {
if (rq->cmd_type == REQ_TYPE_ATA_CMD &&
(stat & DRQ_STAT) && args && args[3]) {
u8 io_32bit = drive->io_32bit;
drive->io_32bit = 0;
hwif->ata_input_data(drive, &args[4], args[3] * SECTOR_WORDS);
Expand Down
8 changes: 6 additions & 2 deletions trunk/drivers/ide/ide-iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,12 @@ void ide_fix_driveid (struct hd_driveid *id)
#endif
}

/* FIXME: exported for use by the USB storage (isd200.c) code only */
EXPORT_SYMBOL(ide_fix_driveid);
/*
* ide_fixstring() cleans up and (optionally) byte-swaps a text string,
* removing leading/trailing blanks and compressing internal blanks.
* It is primarily used to tidy up the model name/number fields as
* returned by the WIN_[P]IDENTIFY commands.
*/

void ide_fixstring (u8 *s, const int bytecount, const int byteswap)
{
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,12 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd)
ide_fixstring(id->fw_rev, sizeof(id->fw_rev), bswap);
ide_fixstring(id->serial_no, sizeof(id->serial_no), bswap);

/* we depend on this a lot! */
id->model[sizeof(id->model)-1] = '\0';

if (strstr(id->model, "E X A B Y T E N E S T"))
goto err_misc;

/* we depend on this a lot! */
id->model[sizeof(id->model)-1] = '\0';
printk("%s: %s, ", drive->name, id->model);
drive->present = 1;
drive->dead = 0;
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/ide/ide-taskfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ static int ide_diag_taskfile(ide_drive_t *drive, ide_task_t *args, unsigned long
struct request rq;

memset(&rq, 0, sizeof(rq));
rq.ref_count = 1;
rq.cmd_type = REQ_TYPE_ATA_TASKFILE;
rq.buffer = buf;

Expand Down Expand Up @@ -511,6 +512,7 @@ int ide_raw_taskfile (ide_drive_t *drive, ide_task_t *args, u8 *buf)

EXPORT_SYMBOL(ide_raw_taskfile);

#ifdef CONFIG_IDE_TASK_IOCTL
int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)
{
ide_task_request_t *req_task;
Expand Down Expand Up @@ -660,6 +662,7 @@ int ide_taskfile_ioctl (ide_drive_t *drive, unsigned int cmd, unsigned long arg)

return err;
}
#endif

int ide_wait_cmd (ide_drive_t *drive, u8 cmd, u8 nsect, u8 feature, u8 sectors, u8 *buf)
{
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/ide/pci/piix.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ struct ich_laptop {

static const struct ich_laptop ich_laptop[] = {
/* devid, subvendor, subdev */
{ 0x27DF, 0x1025, 0x0102 }, /* ICH7 on Acer 5602aWLMi */
{ 0x27DF, 0x0005, 0x0280 }, /* ICH7 on Acer 5602WLMi */
{ 0x27DF, 0x1025, 0x0110 }, /* ICH7 on Acer 3682WLMi */
{ 0x27DF, 0x1043, 0x1267 }, /* ICH7 on Asus W5F */
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ config VIDEO_IR_I2C

config VIDEO_IR
tristate
depends on INPUT
select VIDEO_IR_I2C if I2C

config VIDEO_TVEEPROM
Expand Down
70 changes: 58 additions & 12 deletions trunk/drivers/media/common/saa7146_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,43 +59,89 @@ void saa7146_setgpio(struct saa7146_dev *dev, int port, u32 data)
}

/* This DEBI code is based on the saa7146 Stradis driver by Nathan Laredo */
int saa7146_wait_for_debi_done(struct saa7146_dev *dev, int nobusyloop)
static inline int saa7146_wait_for_debi_done_sleep(struct saa7146_dev *dev,
unsigned long us1, unsigned long us2)
{
unsigned long start;
unsigned long timeout;
int err;

/* wait for registers to be programmed */
start = jiffies;
timeout = jiffies + usecs_to_jiffies(us1);
while (1) {
err = time_after(jiffies, start + HZ/20);
err = time_after(jiffies, timeout);
if (saa7146_read(dev, MC2) & 2)
break;
if (err) {
DEB_S(("timed out while waiting for registers getting programmed\n"));
printk(KERN_ERR "%s: %s timed out while waiting for "
"registers getting programmed\n",
dev->name, __FUNCTION__);
return -ETIMEDOUT;
}
if (nobusyloop)
msleep(1);
msleep(1);
}

/* wait for transfer to complete */
start = jiffies;
timeout = jiffies + usecs_to_jiffies(us2);
while (1) {
err = time_after(jiffies, start + HZ/4);
err = time_after(jiffies, timeout);
if (!(saa7146_read(dev, PSR) & SPCI_DEBI_S))
break;
saa7146_read(dev, MC2);
if (err) {
DEB_S(("timed out while waiting for transfer completion\n"));
DEB_S(("%s: %s timed out while waiting for transfer "
"completion\n", dev->name, __FUNCTION__));
return -ETIMEDOUT;
}
if (nobusyloop)
msleep(1);
msleep(1);
}

return 0;
}

static inline int saa7146_wait_for_debi_done_busyloop(struct saa7146_dev *dev,
unsigned long us1, unsigned long us2)
{
unsigned long loops;

/* wait for registers to be programmed */
loops = us1;
while (1) {
if (saa7146_read(dev, MC2) & 2)
break;
if (!loops--) {
printk(KERN_ERR "%s: %s timed out while waiting for "
"registers getting programmed\n",
dev->name, __FUNCTION__);
return -ETIMEDOUT;
}
udelay(1);
}

/* wait for transfer to complete */
loops = us2 / 5;
while (1) {
if (!(saa7146_read(dev, PSR) & SPCI_DEBI_S))
break;
saa7146_read(dev, MC2);
if (!loops--) {
DEB_S(("%s: %s timed out while waiting for transfer "
"completion\n", dev->name, __FUNCTION__));
return -ETIMEDOUT;
}
udelay(5);
}

return 0;
}

int saa7146_wait_for_debi_done(struct saa7146_dev *dev, int nobusyloop)
{
if (nobusyloop)
return saa7146_wait_for_debi_done_sleep(dev, 50000, 250000);
else
return saa7146_wait_for_debi_done_busyloop(dev, 50000, 250000);
}

/****************************************************************************
* general helper functions
****************************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/dvb/frontends/mt2131.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ static int mt2131_set_params(struct dvb_frontend *fe,
f_lo1 = (f_lo1 / 250) * 250;
f_lo2 = f_lo1 - freq - MT2131_IF2;

priv->frequency = (f_lo1 - f_lo2 - MT2131_IF2) * 1000,
priv->frequency = (f_lo1 - f_lo2 - MT2131_IF2) * 1000;

/* Frequency LO1 = 16MHz * (DIV1 + NUM1/8192 ) */
num1 = f_lo1 * 64 / (MT2131_FREF / 128);
Expand Down
Loading

0 comments on commit 78a36e7

Please sign in to comment.