Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26803
b: refs/heads/master
c: 2c171bf
h: refs/heads/master
i:
  26801: a3e34b5
  26799: 9c37163
v: v3
  • Loading branch information
Pavel Pisa authored and Russell King committed May 19, 2006
1 parent f148c21 commit d00cc31
Show file tree
Hide file tree
Showing 23 changed files with 58 additions and 61 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: 890f74291c9133eaed6c0eb8514f7618d43d0925
refs/heads/master: 2c171bf13423dc5293188cea7f6c2da1720926e2
3 changes: 0 additions & 3 deletions trunk/Documentation/watchdog/watchdog-api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ timeout or margin. The simplest way to ping the watchdog is to write
some data to the device. So a very simple watchdog daemon would look
like this:

#include <stdlib.h>
#include <fcntl.h>

int main(int argc, const char *argv[]) {
int fd=open("/dev/watchdog",O_WRONLY);
if (fd==-1) {
Expand Down
5 changes: 1 addition & 4 deletions trunk/arch/arm/mach-pxa/mainstone.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,7 @@ static void __init mainstone_init_irq(void)
for(irq = MAINSTONE_IRQ(0); irq <= MAINSTONE_IRQ(15); irq++) {
set_irq_chip(irq, &mainstone_irq_chip);
set_irq_handler(irq, do_level_IRQ);
if (irq == MAINSTONE_IRQ(10) || irq == MAINSTONE_IRQ(14))
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE | IRQF_NOAUTOEN);
else
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
}
set_irq_flags(MAINSTONE_IRQ(8), 0);
set_irq_flags(MAINSTONE_IRQ(12), 0);
Expand Down
6 changes: 4 additions & 2 deletions trunk/arch/arm/mach-s3c2410/sleep.S
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ ENTRY(s3c2410_cpu_suspend)
mrc p15, 0, r5, c13, c0, 0 @ PID
mrc p15, 0, r6, c3, c0, 0 @ Domain ID
mrc p15, 0, r7, c2, c0, 0 @ translation table base address
mrc p15, 0, r8, c1, c0, 0 @ control register
mrc p15, 0, r8, c2, c0, 0 @ auxiliary control register
mrc p15, 0, r9, c1, c0, 0 @ control register

stmia r0, { r4 - r13 }

Expand Down Expand Up @@ -164,14 +165,15 @@ ENTRY(s3c2410_cpu_resume)
mcr p15, 0, r5, c13, c0, 0 @ PID
mcr p15, 0, r6, c3, c0, 0 @ Domain ID
mcr p15, 0, r7, c2, c0, 0 @ translation table base
mcr p15, 0, r8, c1, c1, 0 @ auxilliary control

#ifdef CONFIG_DEBUG_RESUME
mov r3, #'R'
strb r3, [ r2, #S3C2410_UTXH ]
#endif

ldr r2, =resume_with_mmu
mcr p15, 0, r8, c1, c0, 0 @ turn on MMU, etc
mcr p15, 0, r9, c1, c0, 0 @ turn on MMU, etc
nop @ second-to-last before mmu
mov pc, r2 @ go back to virtual address

Expand Down
16 changes: 11 additions & 5 deletions trunk/drivers/char/watchdog/i8xx_tco.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
* 82801E (C-ICH) : document number 273599-001, 273645-002,
* 82801EB (ICH5) : document number 252516-001, 252517-003,
* 82801ER (ICH5R) : document number 252516-001, 252517-003,
* 82801FB (ICH6) : document number 301473-002, 301474-007,
* 82801FR (ICH6R) : document number 301473-002, 301474-007,
* 82801FBM (ICH6-M) : document number 301473-002, 301474-007,
* 82801FW (ICH6W) : document number 301473-001, 301474-007,
* 82801FRW (ICH6RW) : document number 301473-001, 301474-007
*
* 20000710 Nils Faerber
* Initial Version 0.01
Expand Down Expand Up @@ -61,10 +66,6 @@
* 20050807 Wim Van Sebroeck <wim@iguana.be>
* 0.08 Make sure that the watchdog is only "armed" when started.
* (Kernel Bug 4251)
* 20060416 Wim Van Sebroeck <wim@iguana.be>
* 0.09 Remove support for the ICH6, ICH6R, ICH6-M, ICH6W and ICH6RW and
* ICH7 chipsets. (See Kernel Bug 6031 - other code will support these
* chipsets)
*/

/*
Expand All @@ -89,7 +90,7 @@
#include "i8xx_tco.h"

/* Module and version information */
#define TCO_VERSION "0.09"
#define TCO_VERSION "0.08"
#define TCO_MODULE_NAME "i8xx TCO timer"
#define TCO_DRIVER_NAME TCO_MODULE_NAME ", v" TCO_VERSION
#define PFX TCO_MODULE_NAME ": "
Expand Down Expand Up @@ -390,6 +391,11 @@ static struct pci_device_id i8xx_tco_pci_tbl[] = {
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, PCI_ANY_ID, PCI_ANY_ID, },
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801E_0, PCI_ANY_ID, PCI_ANY_ID, },
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801EB_0, PCI_ANY_ID, PCI_ANY_ID, },
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_0, PCI_ANY_ID, PCI_ANY_ID, },
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_1, PCI_ANY_ID, PCI_ANY_ID, },
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH6_2, PCI_ANY_ID, PCI_ANY_ID, },
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_0, PCI_ANY_ID, PCI_ANY_ID, },
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_1, PCI_ANY_ID, PCI_ANY_ID, },
{ PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_1, PCI_ANY_ID, PCI_ANY_ID, },
{ 0, }, /* End of list */
};
Expand Down
6 changes: 0 additions & 6 deletions trunk/drivers/char/watchdog/s3c2410_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,12 +423,6 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
if (tmr_atboot && started == 0) {
printk(KERN_INFO PFX "Starting Watchdog Timer\n");
s3c2410wdt_start();
} else if (!tmr_atboot) {
/* if we're not enabling the watchdog, then ensure it is
* disabled if it has been left running from the bootloader
* or other source */

s3c2410wdt_stop();
}

return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/char/watchdog/sc1200wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ static int __init sc1200wdt_init(void)
{
int ret;

printk("%s\n", banner);
printk(banner);

spin_lock_init(&sc1200wdt_lock);
sema_init(&open_sem, 1);
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/mmc/au1xmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ static void au1xmmc_data_complete(struct au1xmmc_host *host, u32 status)
}
else
data->bytes_xfered =
(data->blocks * (1 << data->blksz_bits)) -
(data->blocks * data->blksz) -
host->pio.len;
}

Expand Down Expand Up @@ -575,7 +575,7 @@ static int
au1xmmc_prepare_data(struct au1xmmc_host *host, struct mmc_data *data)
{

int datalen = data->blocks * (1 << data->blksz_bits);
int datalen = data->blocks * data->blksz;

if (dma != 0)
host->flags |= HOST_F_DMA;
Expand All @@ -596,7 +596,7 @@ au1xmmc_prepare_data(struct au1xmmc_host *host, struct mmc_data *data)
if (host->dma.len == 0)
return MMC_ERR_TIMEOUT;

au_writel((1 << data->blksz_bits) - 1, HOST_BLKSIZE(host));
au_writel(data->blksz - 1, HOST_BLKSIZE(host));

if (host->flags & HOST_F_DMA) {
int i;
Expand Down
24 changes: 14 additions & 10 deletions trunk/drivers/mmc/imxmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,10 @@ static int imxmci_busy_wait_for_status(struct imxmci_host *host,
if(!loops)
return 0;

dev_info(mmc_dev(host->mmc), "busy wait for %d usec in %s, STATUS = 0x%x (0x%x)\n",
loops, where, *pstat, stat_mask);
/* The busy-wait is expected there for clock <8MHz due to SDHC hardware flaws */
if(!(stat_mask & STATUS_END_CMD_RESP) || (host->mmc->ios.clock>=8000000))
dev_info(mmc_dev(host->mmc), "busy wait for %d usec in %s, STATUS = 0x%x (0x%x)\n",
loops, where, *pstat, stat_mask);
return loops;
}

Expand Down Expand Up @@ -333,6 +335,9 @@ static void imxmci_start_cmd(struct imxmci_host *host, struct mmc_command *cmd,
WARN_ON(host->cmd != NULL);
host->cmd = cmd;

/* Ensure, that clock are stopped else command programming and start fails */
imxmci_stop_clock(host);

if (cmd->flags & MMC_RSP_BUSY)
cmdat |= CMD_DAT_CONT_BUSY;

Expand Down Expand Up @@ -553,7 +558,7 @@ static int imxmci_cpu_driven_data(struct imxmci_host *host, unsigned int *pstat)
int trans_done = 0;
unsigned int stat = *pstat;

if(host->actual_bus_width == MMC_BUS_WIDTH_4)
if(host->actual_bus_width != MMC_BUS_WIDTH_4)
burst_len = 16;
else
burst_len = 64;
Expand Down Expand Up @@ -591,8 +596,7 @@ static int imxmci_cpu_driven_data(struct imxmci_host *host, unsigned int *pstat)
stat = MMC_STATUS;

/* Flush extra bytes from FIFO */
while(flush_len >= 2){
flush_len -= 2;
while(flush_len && !(stat & STATUS_DATA_TRANS_DONE)){
i = MMC_BUFFER_ACCESS;
stat = MMC_STATUS;
stat &= ~STATUS_CRC_READ_ERR; /* Stupid but required there */
Expand Down Expand Up @@ -746,10 +750,6 @@ static void imxmci_tasklet_fnc(unsigned long data)
data_dir_mask = STATUS_DATA_TRANS_DONE;
}

imxmci_busy_wait_for_status(host, &stat,
data_dir_mask,
50, "imxmci_tasklet_fnc data");

if(stat & data_dir_mask) {
clear_bit(IMXMCI_PEND_DMA_END_b, &host->pending_events);
imxmci_data_done(host, stat);
Expand Down Expand Up @@ -865,7 +865,11 @@ static void imxmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)

imxmci_stop_clock(host);
MMC_CLK_RATE = (prescaler<<3) | clk;
imxmci_start_clock(host);
/*
* Under my understanding, clock should not be started there, because it would
* initiate SDHC sequencer and send last or random command into card
*/
/*imxmci_start_clock(host);*/

dev_dbg(mmc_dev(host->mmc), "MMC_CLK_RATE: 0x%08x\n", MMC_CLK_RATE);
} else {
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/mmc/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -951,6 +951,7 @@ static void mmc_read_scrs(struct mmc_host *host)
data.timeout_ns = card->csd.tacc_ns * 10;
data.timeout_clks = card->csd.tacc_clks * 10;
data.blksz_bits = 3;
data.blksz = 1 << 3;
data.blocks = 1;
data.flags = MMC_DATA_READ;
data.sg = &sg;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/mmc/mmc_block.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
brq.data.timeout_ns = card->csd.tacc_ns * 10;
brq.data.timeout_clks = card->csd.tacc_clks * 10;
brq.data.blksz_bits = md->block_bits;
brq.data.blksz = 1 << md->block_bits;
brq.data.blocks = req->nr_sectors >> (md->block_bits - 9);
brq.stop.opcode = MMC_STOP_TRANSMISSION;
brq.stop.arg = 0;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/mmc/pxamci.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data)
nob = 0xffff;

writel(nob, host->base + MMC_NOB);
writel(1 << data->blksz_bits, host->base + MMC_BLKLEN);
writel(data->blksz, host->base + MMC_BLKLEN);

clks = (unsigned long long)data->timeout_ns * CLOCKRATE;
do_div(clks, 1000000000UL);
Expand Down Expand Up @@ -283,7 +283,7 @@ static int pxamci_data_done(struct pxamci_host *host, unsigned int stat)
* data blocks as being in error.
*/
if (data->error == MMC_ERR_NONE)
data->bytes_xfered = data->blocks << data->blksz_bits;
data->bytes_xfered = data->blocks * data->blksz;
else
data->bytes_xfered = 0;

Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/mmc/wbsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,14 +662,14 @@ static void wbsd_prepare_data(struct wbsd_host *host, struct mmc_data *data)
unsigned long dmaflags;

DBGF("blksz %04x blks %04x flags %08x\n",
1 << data->blksz_bits, data->blocks, data->flags);
data->blksz, data->blocks, data->flags);
DBGF("tsac %d ms nsac %d clk\n",
data->timeout_ns / 1000000, data->timeout_clks);

/*
* Calculate size.
*/
host->size = data->blocks << data->blksz_bits;
host->size = data->blocks * data->blksz;

/*
* Check timeout values for overflow.
Expand All @@ -696,12 +696,12 @@ static void wbsd_prepare_data(struct wbsd_host *host, struct mmc_data *data)
* Two bytes are needed for each data line.
*/
if (host->bus_width == MMC_BUS_WIDTH_1) {
blksize = (1 << data->blksz_bits) + 2;
blksize = data->blksz + 2;

wbsd_write_index(host, WBSD_IDX_PBSMSB, (blksize >> 4) & 0xF0);
wbsd_write_index(host, WBSD_IDX_PBSLSB, blksize & 0xFF);
} else if (host->bus_width == MMC_BUS_WIDTH_4) {
blksize = (1 << data->blksz_bits) + 2 * 4;
blksize = data->blksz + 2 * 4;

wbsd_write_index(host, WBSD_IDX_PBSMSB,
((blksize >> 4) & 0xF0) | WBSD_DATA_WIDTH);
Expand Down
6 changes: 0 additions & 6 deletions trunk/include/asm-arm/spinlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,6 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw)
: "cc");
}

/* write_can_lock - would write_trylock() succeed? */
#define __raw_write_can_lock(x) ((x)->lock == 0x80000000)

/*
* Read locks are a bit more hairy:
* - Exclusively load the lock value.
Expand Down Expand Up @@ -201,7 +198,4 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw)

#define __raw_read_trylock(lock) generic__raw_read_trylock(lock)

/* read_can_lock - would read_trylock() succeed? */
#define __raw_read_can_lock(x) ((x)->lock < 0x80000000)

#endif /* __ASM_SPINLOCK_H */
1 change: 1 addition & 0 deletions trunk/include/linux/mmc/mmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ struct mmc_data {
unsigned int timeout_ns; /* data timeout (in ns, max 80ms) */
unsigned int timeout_clks; /* data timeout (in clocks) */
unsigned int blksz_bits; /* data block size */
unsigned int blksz; /* data block size */
unsigned int blocks; /* number of blocks */
unsigned int error; /* data error */
unsigned int flags;
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/bridge/netfilter/ebt_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ static void ebt_log(const struct sk_buff *skb, unsigned int hooknr,

if (info->bitmask & EBT_LOG_NFLOG)
nf_log_packet(PF_BRIDGE, hooknr, skb, in, out, &li,
"%s", info->prefix);
info->prefix);
else
ebt_log_packet(PF_BRIDGE, hooknr, skb, in, out, &li,
info->prefix);
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/netfilter/arp_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ static int do_add_counters(void __user *user, unsigned int len)

write_lock_bh(&t->lock);
private = t->private;
if (private->number != tmp.num_counters) {
if (private->number != paddc->num_counters) {
ret = -EINVAL;
goto unlock_up_free;
}
Expand Down
12 changes: 6 additions & 6 deletions trunk/net/ipv4/netfilter/ip_nat_proto_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ gre_in_range(const struct ip_conntrack_tuple *tuple,
const union ip_conntrack_manip_proto *min,
const union ip_conntrack_manip_proto *max)
{
__be16 key;
u_int32_t key;

if (maniptype == IP_NAT_MANIP_SRC)
key = tuple->src.u.gre.key;
else
key = tuple->dst.u.gre.key;

return ntohs(key) >= ntohs(min->gre.key)
&& ntohs(key) <= ntohs(max->gre.key);
return ntohl(key) >= ntohl(min->gre.key)
&& ntohl(key) <= ntohl(max->gre.key);
}

/* generate unique tuple ... */
Expand All @@ -81,14 +81,14 @@ gre_unique_tuple(struct ip_conntrack_tuple *tuple,
min = 1;
range_size = 0xffff;
} else {
min = ntohs(range->min.gre.key);
range_size = ntohs(range->max.gre.key) - min + 1;
min = ntohl(range->min.gre.key);
range_size = ntohl(range->max.gre.key) - min + 1;
}

DEBUGP("min = %u, range_size = %u\n", min, range_size);

for (i = 0; i < range_size; i++, key++) {
*keyptr = htons(min + key % range_size);
*keyptr = htonl(min + key % range_size);
if (!ip_nat_used_tuple(tuple, conntrack))
return 1;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/netfilter/ipt_LOG.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ ipt_log_target(struct sk_buff **pskb,

if (loginfo->logflags & IPT_LOG_NFLOG)
nf_log_packet(PF_INET, hooknum, *pskb, in, out, &li,
"%s", loginfo->prefix);
loginfo->prefix);
else
ipt_log_packet(PF_INET, hooknum, *pskb, in, out, &li,
loginfo->prefix);
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/netfilter/ipt_recent.c
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,6 @@ checkentry(const char *tablename,
/* Create our proc 'status' entry. */
curr_table->status_proc = create_proc_entry(curr_table->name, ip_list_perms, proc_net_ipt_recent);
if (!curr_table->status_proc) {
vfree(hold);
printk(KERN_INFO RECENT_NAME ": checkentry: unable to allocate for /proc entry.\n");
/* Destroy the created table */
spin_lock_bh(&recent_lock);
Expand All @@ -846,6 +845,7 @@ checkentry(const char *tablename,
spin_unlock_bh(&recent_lock);
vfree(curr_table->time_info);
vfree(curr_table->hash_table);
vfree(hold);
vfree(curr_table->table);
vfree(curr_table);
return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv6/netfilter/ip6_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,7 @@ do_add_counters(void __user *user, unsigned int len)

write_lock_bh(&t->lock);
private = t->private;
if (private->number != tmp.num_counters) {
if (private->number != paddc->num_counters) {
ret = -EINVAL;
goto unlock_up_free;
}
Expand Down
Loading

0 comments on commit d00cc31

Please sign in to comment.