Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26805
b: refs/heads/master
c: 8de8c87
h: refs/heads/master
i:
  26803: d00cc31
v: v3
  • Loading branch information
Sridhar Samudrala committed May 19, 2006
1 parent 2cf0a19 commit 3ef9c92
Show file tree
Hide file tree
Showing 20 changed files with 101 additions and 87 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: ae83e255045ed3cdc798664e8e189aa5cf2702eb
refs/heads/master: 8de8c8738086501bbe3057ed6f4b70dded657488
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 * data->blksz) -
(data->blocks * (1 << data->blksz_bits)) -
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 * data->blksz;
int datalen = data->blocks * (1 << data->blksz_bits);

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(data->blksz - 1, HOST_BLKSIZE(host));
au_writel((1 << data->blksz_bits) - 1, HOST_BLKSIZE(host));

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

/* 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);
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 @@ -335,9 +333,6 @@ 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 @@ -558,7 +553,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 @@ -596,7 +591,8 @@ static int imxmci_cpu_driven_data(struct imxmci_host *host, unsigned int *pstat)
stat = MMC_STATUS;

/* Flush extra bytes from FIFO */
while(flush_len && !(stat & STATUS_DATA_TRANS_DONE)){
while(flush_len >= 2){
flush_len -= 2;
i = MMC_BUFFER_ACCESS;
stat = MMC_STATUS;
stat &= ~STATUS_CRC_READ_ERR; /* Stupid but required there */
Expand Down Expand Up @@ -750,6 +746,10 @@ 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,11 +865,7 @@ static void imxmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)

imxmci_stop_clock(host);
MMC_CLK_RATE = (prescaler<<3) | clk;
/*
* 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);*/
imxmci_start_clock(host);

dev_dbg(mmc_dev(host->mmc), "MMC_CLK_RATE: 0x%08x\n", MMC_CLK_RATE);
} else {
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/mmc/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,6 @@ 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: 0 additions & 1 deletion trunk/drivers/mmc/mmc_block.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ 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(data->blksz, host->base + MMC_BLKLEN);
writel(1 << data->blksz_bits, 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;
data->bytes_xfered = data->blocks << data->blksz_bits;
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",
data->blksz, data->blocks, data->flags);
1 << data->blksz_bits, 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;
host->size = data->blocks << data->blksz_bits;

/*
* 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 = data->blksz + 2;
blksize = (1 << data->blksz_bits) + 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 = data->blksz + 2 * 4;
blksize = (1 << data->blksz_bits) + 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: 0 additions & 1 deletion trunk/include/linux/mmc/mmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ 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
1 change: 1 addition & 0 deletions trunk/include/net/sctp/command.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ typedef enum {
SCTP_CMD_DEL_NON_PRIMARY, /* Removes non-primary peer transports. */
SCTP_CMD_T3_RTX_TIMERS_STOP, /* Stops T3-rtx pending timers */
SCTP_CMD_FORCE_PRIM_RETRAN, /* Forces retrans. over primary path. */
SCTP_CMD_SET_SK_ERR, /* Set sk_err */
SCTP_CMD_LAST
} sctp_verb_t;

Expand Down
4 changes: 2 additions & 2 deletions trunk/net/sctp/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ struct sock *sctp_err_lookup(int family, struct sk_buff *skb,
union sctp_addr daddr;
struct sctp_af *af;
struct sock *sk = NULL;
struct sctp_association *asoc = NULL;
struct sctp_association *asoc;
struct sctp_transport *transport = NULL;

*app = NULL; *tpp = NULL;
Expand Down Expand Up @@ -490,7 +490,7 @@ void sctp_v4_err(struct sk_buff *skb, __u32 info)
int type = skb->h.icmph->type;
int code = skb->h.icmph->code;
struct sock *sk;
struct sctp_association *asoc;
struct sctp_association *asoc = NULL;
struct sctp_transport *transport;
struct inet_sock *inet;
char *saveip, *savesctp;
Expand Down
16 changes: 12 additions & 4 deletions trunk/net/sctp/sm_sideeffect.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,10 +498,6 @@ static void sctp_cmd_assoc_failed(sctp_cmd_seq_t *commands,
sctp_add_cmd_sf(commands, SCTP_CMD_NEW_STATE,
SCTP_STATE(SCTP_STATE_CLOSED));

/* Set sk_err to ECONNRESET on a 1-1 style socket. */
if (!sctp_style(asoc->base.sk, UDP))
asoc->base.sk->sk_err = ECONNRESET;

/* SEND_FAILED sent later when cleaning up the association. */
asoc->outqueue.error = error;
sctp_add_cmd_sf(commands, SCTP_CMD_DELETE_TCB, SCTP_NULL());
Expand Down Expand Up @@ -838,6 +834,15 @@ static void sctp_cmd_del_non_primary(struct sctp_association *asoc)
return;
}

/* Helper function to set sk_err on a 1-1 style socket. */
static void sctp_cmd_set_sk_err(struct sctp_association *asoc, int error)
{
struct sock *sk = asoc->base.sk;

if (!sctp_style(sk, UDP))
sk->sk_err = error;
}

/* These three macros allow us to pull the debugging code out of the
* main flow of sctp_do_sm() to keep attention focused on the real
* functionality there.
Expand Down Expand Up @@ -1458,6 +1463,9 @@ static int sctp_cmd_interpreter(sctp_event_t event_type,
local_cork = 0;
asoc->peer.retran_path = t;
break;
case SCTP_CMD_SET_SK_ERR:
sctp_cmd_set_sk_err(asoc, cmd->obj.error);
break;
default:
printk(KERN_WARNING "Impossible command: %u, %p\n",
cmd->verb, cmd->obj.ptr);
Expand Down
Loading

0 comments on commit 3ef9c92

Please sign in to comment.