Merge /scratch/Ksrc/linux-git/

This commit is contained in:
Roland Dreier
2005-07-27 19:12:56 -07:00
628 changed files with 72461 additions and 6599 deletions
+1 -9
View File
@@ -1935,23 +1935,15 @@ struct as_fs_entry {
static ssize_t
as_var_show(unsigned int var, char *page)
{
var = (var * 1000) / HZ;
return sprintf(page, "%d\n", var);
}
static ssize_t
as_var_store(unsigned long *var, const char *page, size_t count)
{
unsigned long tmp;
char *p = (char *) page;
tmp = simple_strtoul(p, &p, 10);
if (tmp != 0) {
tmp = (tmp * HZ) / 1000;
if (tmp == 0)
tmp = 1;
}
*var = tmp;
*var = simple_strtoul(p, &p, 10);
return count;
}
+2 -2
View File
@@ -1582,7 +1582,7 @@ static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
if (rc)
goto err_out;
#if IF_64BIT_DMA_IS_POSSIBLE /* grrrr... */
#ifdef IF_64BIT_DMA_IS_POSSIBLE /* grrrr... */
rc = pci_set_dma_mask(pdev, DMA_64BIT_MASK);
if (!rc) {
rc = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
@@ -1601,7 +1601,7 @@ static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
goto err_out_regions;
}
pci_dac = 0;
#if IF_64BIT_DMA_IS_POSSIBLE /* grrrr... */
#ifdef IF_64BIT_DMA_IS_POSSIBLE /* grrrr... */
}
#endif
+173 -44
View File
@@ -23,6 +23,7 @@
* -- Exterminate P3 printks
* -- Resove XXX's
* -- Redo "benh's retries", perhaps have spin-up code to handle them. V:D=?
* -- CLEAR, CLR2STS, CLRRS seem to be ripe for refactoring.
*/
#include <linux/kernel.h>
#include <linux/module.h>
@@ -37,6 +38,73 @@
#define UB_MAJOR 180
/*
* The command state machine is the key model for understanding of this driver.
*
* The general rule is that all transitions are done towards the bottom
* of the diagram, thus preventing any loops.
*
* An exception to that is how the STAT state is handled. A counter allows it
* to be re-entered along the path marked with [C].
*
* +--------+
* ! INIT !
* +--------+
* !
* ub_scsi_cmd_start fails ->--------------------------------------\
* ! !
* V !
* +--------+ !
* ! CMD ! !
* +--------+ !
* ! +--------+ !
* was -EPIPE -->-------------------------------->! CLEAR ! !
* ! +--------+ !
* ! ! !
* was error -->------------------------------------- ! --------->\
* ! ! !
* /--<-- cmd->dir == NONE ? ! !
* ! ! ! !
* ! V ! !
* ! +--------+ ! !
* ! ! DATA ! ! !
* ! +--------+ ! !
* ! ! +---------+ ! !
* ! was -EPIPE -->--------------->! CLR2STS ! ! !
* ! ! +---------+ ! !
* ! ! ! ! !
* ! ! was error -->---- ! --------->\
* ! was error -->--------------------- ! ------------- ! --------->\
* ! ! ! ! !
* ! V ! ! !
* \--->+--------+ ! ! !
* ! STAT !<--------------------------/ ! !
* /--->+--------+ ! !
* ! ! ! !
* [C] was -EPIPE -->-----------\ ! !
* ! ! ! ! !
* +<---- len == 0 ! ! !
* ! ! ! ! !
* ! was error -->--------------------------------------!---------->\
* ! ! ! ! !
* +<---- bad CSW ! ! !
* +<---- bad tag ! ! !
* ! ! V ! !
* ! ! +--------+ ! !
* ! ! ! CLRRS ! ! !
* ! ! +--------+ ! !
* ! ! ! ! !
* \------- ! --------------------[C]--------\ ! !
* ! ! ! !
* cmd->error---\ +--------+ ! !
* ! +--------------->! SENSE !<----------/ !
* STAT_FAIL----/ +--------+ !
* ! ! V
* ! V +--------+
* \--------------------------------\--------------------->! DONE !
* +--------+
*/
/*
* Definitions which have to be scattered once we understand the layout better.
*/
@@ -91,8 +159,6 @@ struct bulk_cs_wrap {
#define US_BULK_CS_WRAP_LEN 13
#define US_BULK_CS_SIGN 0x53425355 /* spells out 'USBS' */
/* This is for Olympus Camedia digital cameras */
#define US_BULK_CS_OLYMPUS_SIGN 0x55425355 /* spells out 'USBU' */
#define US_BULK_STAT_OK 0
#define US_BULK_STAT_FAIL 1
#define US_BULK_STAT_PHASE 2
@@ -135,6 +201,7 @@ enum ub_scsi_cmd_state {
UB_CMDST_CLR2STS, /* Clearing before requesting status */
UB_CMDST_STAT, /* Status phase */
UB_CMDST_CLEAR, /* Clearing a stall (halt, actually) */
UB_CMDST_CLRRS, /* Clearing before retrying status */
UB_CMDST_SENSE, /* Sending Request Sense */
UB_CMDST_DONE /* Final state */
};
@@ -146,6 +213,7 @@ static char *ub_scsi_cmd_stname[] = {
"c2s",
"sts",
"clr",
"crs",
"Sen",
"fin"
};
@@ -316,6 +384,7 @@ struct ub_dev {
struct urb work_urb;
struct timer_list work_timer;
int last_pipe; /* What might need clearing */
__le32 signature; /* Learned signature */
struct bulk_cb_wrap work_bcb;
struct bulk_cs_wrap work_bcs;
struct usb_ctrlrequest work_cr;
@@ -339,8 +408,9 @@ static void ub_scsi_action(unsigned long _dev);
static void ub_scsi_dispatch(struct ub_dev *sc);
static void ub_scsi_urb_compl(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
static void ub_state_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd, int rc);
static void __ub_state_stat(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
static int __ub_state_stat(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
static void ub_state_stat(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
static void ub_state_stat_counted(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
static void ub_state_sense(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
static int ub_submit_clear_stall(struct ub_dev *sc, struct ub_scsi_cmd *cmd,
int stalled_pipe);
@@ -1085,6 +1155,28 @@ static void ub_scsi_urb_compl(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
ub_state_stat(sc, cmd);
} else if (cmd->state == UB_CMDST_CLRRS) {
if (urb->status == -EPIPE) {
/*
* STALL while clearning STALL.
* The control pipe clears itself - nothing to do.
* XXX Might try to reset the device here and retry.
*/
printk(KERN_NOTICE "%s: stall on control pipe\n",
sc->name);
goto Bad_End;
}
/*
* We ignore the result for the halt clear.
*/
/* reset the endpoint toggle */
usb_settoggle(sc->dev, usb_pipeendpoint(sc->last_pipe),
usb_pipeout(sc->last_pipe), 0);
ub_state_stat_counted(sc, cmd);
} else if (cmd->state == UB_CMDST_CMD) {
if (urb->status == -EPIPE) {
rc = ub_submit_clear_stall(sc, cmd, sc->last_pipe);
@@ -1190,34 +1282,70 @@ static void ub_scsi_urb_compl(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
*/
goto Bad_End;
}
cmd->state = UB_CMDST_CLEAR;
/*
* Having a stall when getting CSW is an error, so
* make sure uppper levels are not oblivious to it.
*/
cmd->error = -EIO; /* A cheap trick... */
cmd->state = UB_CMDST_CLRRS;
ub_cmdtr_state(sc, cmd);
return;
}
if (urb->status == -EOVERFLOW) {
/*
* XXX We are screwed here. Retrying is pointless,
* because the pipelined data will not get in until
* we read with a big enough buffer. We must reset XXX.
*/
goto Bad_End;
}
if (urb->status != 0)
goto Bad_End;
if (urb->actual_length == 0) {
/*
* Some broken devices add unnecessary zero-length
* packets to the end of their data transfers.
* Such packets show up as 0-length CSWs. If we
* encounter such a thing, try to read the CSW again.
*/
if (++cmd->stat_count >= 4) {
printk(KERN_NOTICE "%s: unable to get CSW\n",
sc->name);
goto Bad_End;
}
__ub_state_stat(sc, cmd);
ub_state_stat_counted(sc, cmd);
return;
}
/*
* Check the returned Bulk protocol status.
* The status block has to be validated first.
*/
bcs = &sc->work_bcs;
if (sc->signature == cpu_to_le32(0)) {
/*
* This is the first reply, so do not perform the check.
* Instead, remember the signature the device uses
* for future checks. But do not allow a nul.
*/
sc->signature = bcs->Signature;
if (sc->signature == cpu_to_le32(0)) {
ub_state_stat_counted(sc, cmd);
return;
}
} else {
if (bcs->Signature != sc->signature) {
ub_state_stat_counted(sc, cmd);
return;
}
}
if (bcs->Tag != cmd->tag) {
/*
* This usually happens when we disagree with the
* device's microcode about something. For instance,
* a few of them throw this after timeouts. They buffer
* commands and reply at commands we timed out before.
* Without flushing these replies we loop forever.
*/
ub_state_stat_counted(sc, cmd);
return;
}
rc = le32_to_cpu(bcs->Residue);
if (rc != cmd->len - cmd->act_len) {
/*
@@ -1230,31 +1358,6 @@ static void ub_scsi_urb_compl(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
goto Bad_End;
}
#if 0
if (bcs->Signature != cpu_to_le32(US_BULK_CS_SIGN) &&
bcs->Signature != cpu_to_le32(US_BULK_CS_OLYMPUS_SIGN)) {
/* Windows ignores signatures, so do we. */
}
#endif
if (bcs->Tag != cmd->tag) {
/*
* This usually happens when we disagree with the
* device's microcode about something. For instance,
* a few of them throw this after timeouts. They buffer
* commands and reply at commands we timed out before.
* Without flushing these replies we loop forever.
*/
if (++cmd->stat_count >= 4) {
printk(KERN_NOTICE "%s: "
"tag mismatch orig 0x%x reply 0x%x\n",
sc->name, cmd->tag, bcs->Tag);
goto Bad_End;
}
__ub_state_stat(sc, cmd);
return;
}
switch (bcs->Status) {
case US_BULK_STAT_OK:
break;
@@ -1272,6 +1375,10 @@ static void ub_scsi_urb_compl(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
}
/* Not zeroing error to preserve a babble indicator */
if (cmd->error != 0) {
ub_state_sense(sc, cmd);
return;
}
cmd->state = UB_CMDST_DONE;
ub_cmdtr_state(sc, cmd);
ub_cmdq_pop(sc);
@@ -1310,7 +1417,7 @@ static void ub_state_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd, int rc)
* Factorization helper for the command state machine:
* Submit a CSW read.
*/
static void __ub_state_stat(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
static int __ub_state_stat(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
{
int rc;
@@ -1328,11 +1435,12 @@ static void __ub_state_stat(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
/* XXX Clear stalls */
ub_complete(&sc->work_done);
ub_state_done(sc, cmd, rc);
return;
return -1;
}
sc->work_timer.expires = jiffies + UB_STAT_TIMEOUT;
add_timer(&sc->work_timer);
return 0;
}
/*
@@ -1341,13 +1449,34 @@ static void __ub_state_stat(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
*/
static void ub_state_stat(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
{
__ub_state_stat(sc, cmd);
if (__ub_state_stat(sc, cmd) != 0)
return;
cmd->stat_count = 0;
cmd->state = UB_CMDST_STAT;
ub_cmdtr_state(sc, cmd);
}
/*
* Factorization helper for the command state machine:
* Submit a CSW read and go to STAT state with counter (along [C] path).
*/
static void ub_state_stat_counted(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
{
if (++cmd->stat_count >= 4) {
ub_state_sense(sc, cmd);
return;
}
if (__ub_state_stat(sc, cmd) != 0)
return;
cmd->state = UB_CMDST_STAT;
ub_cmdtr_state(sc, cmd);
}
/*
* Factorization helper for the command state machine:
* Submit a REQUEST SENSE and go to SENSE state.
+1 -1
View File
@@ -18,7 +18,7 @@
*
* 19 June 2004 -- check_region() converted to request_region()
* and return statement cleanups.
* Jesper Juhl <juhl-lkml@dif.dk>
* - Jesper Juhl
*
* Detect cdrom interface on ISP16 sound card.
* Configure cdrom interface.
+4 -4
View File
@@ -51,7 +51,7 @@
*/
#if RCS
#ifdef RCS
static const char *mcdx_c_version
= "$Id: mcdx.c,v 1.21 1997/01/26 07:12:59 davem Exp $";
#endif
@@ -706,7 +706,7 @@ static int mcdx_open(struct cdrom_device_info *cdi, int purpose)
xtrace(OPENCLOSE, "open() init irq generation\n");
if (-1 == mcdx_config(stuffp, 1))
return -EIO;
#if FALLBACK
#ifdef FALLBACK
/* Set the read speed */
xwarn("AAA %x AAA\n", stuffp->readcmd);
if (stuffp->readerrs)
@@ -1216,7 +1216,7 @@ static int __init mcdx_init_drive(int drive)
}
#if WE_KNOW_WHY
#ifdef WE_KNOW_WHY
/* irq 11 -> channel register */
outb(0x50, stuffp->wreg_chn);
#endif
@@ -1294,7 +1294,7 @@ static int mcdx_transfer(struct s_drive_stuff *stuffp,
ans = mcdx_xfer(stuffp, p, sector, nr_sectors);
return ans;
#if FALLBACK
#ifdef FALLBACK
if (-1 == ans)
stuffp->readerrs++;
else
+14 -14
View File
@@ -245,7 +245,7 @@ module_param(optcd_port, short, 0);
/* Busy wait until FLAG goes low. Return 0 on timeout. */
inline static int flag_low(int flag, unsigned long timeout)
static inline int flag_low(int flag, unsigned long timeout)
{
int flag_high;
unsigned long count = 0;
@@ -381,7 +381,7 @@ static int send_seek_params(struct cdrom_msf *params)
/* Wait for command execution status. Choice between busy waiting
and sleeping. Return value <0 indicates timeout. */
inline static int get_exec_status(int busy_waiting)
static inline int get_exec_status(int busy_waiting)
{
unsigned char exec_status;
@@ -398,7 +398,7 @@ inline static int get_exec_status(int busy_waiting)
/* Wait busy for extra byte of data that a command returns.
Return value <0 indicates timeout. */
inline static int get_data(int short_timeout)
static inline int get_data(int short_timeout)
{
unsigned char data;
@@ -441,14 +441,14 @@ static int reset_drive(void)
/* Facilities for asynchronous operation */
/* Read status/data availability flags FL_STEN and FL_DTEN */
inline static int stdt_flags(void)
static inline int stdt_flags(void)
{
return inb(STATUS_PORT) & FL_STDT;
}
/* Fetch status that has previously been waited for. <0 means not available */
inline static int fetch_status(void)
static inline int fetch_status(void)
{
unsigned char status;
@@ -462,7 +462,7 @@ inline static int fetch_status(void)
/* Fetch data that has previously been waited for. */
inline static void fetch_data(char *buf, int n)
static inline void fetch_data(char *buf, int n)
{
insb(DATA_PORT, buf, n);
DEBUG((DEBUG_DRIVE_IF, "fetched 0x%x bytes", n));
@@ -470,7 +470,7 @@ inline static void fetch_data(char *buf, int n)
/* Flush status and data fifos */
inline static void flush_data(void)
static inline void flush_data(void)
{
while ((inb(STATUS_PORT) & FL_STDT) != FL_STDT)
inb(DATA_PORT);
@@ -482,7 +482,7 @@ inline static void flush_data(void)
/* Send a simple command and wait for response. Command codes < COMFETCH
are quick response commands */
inline static int exec_cmd(int cmd)
static inline int exec_cmd(int cmd)
{
int ack = send_cmd(cmd);
if (ack < 0)
@@ -493,7 +493,7 @@ inline static int exec_cmd(int cmd)
/* Send a command with parameters. Don't wait for the response,
* which consists of data blocks read from the CD. */
inline static int exec_read_cmd(int cmd, struct cdrom_msf *params)
static inline int exec_read_cmd(int cmd, struct cdrom_msf *params)
{
int ack = send_cmd(cmd);
if (ack < 0)
@@ -503,7 +503,7 @@ inline static int exec_read_cmd(int cmd, struct cdrom_msf *params)
/* Send a seek command with parameters and wait for response */
inline static int exec_seek_cmd(int cmd, struct cdrom_msf *params)
static inline int exec_seek_cmd(int cmd, struct cdrom_msf *params)
{
int ack = send_cmd(cmd);
if (ack < 0)
@@ -516,7 +516,7 @@ inline static int exec_seek_cmd(int cmd, struct cdrom_msf *params)
/* Send a command with parameters and wait for response */
inline static int exec_long_cmd(int cmd, struct cdrom_msf *params)
static inline int exec_long_cmd(int cmd, struct cdrom_msf *params)
{
int ack = exec_read_cmd(cmd, params);
if (ack < 0)
@@ -528,7 +528,7 @@ inline static int exec_long_cmd(int cmd, struct cdrom_msf *params)
/* Binary to BCD (2 digits) */
inline static void single_bin2bcd(u_char *p)
static inline void single_bin2bcd(u_char *p)
{
DEBUG((DEBUG_CONV, "bin2bcd %02d", *p));
*p = (*p % 10) | ((*p / 10) << 4);
@@ -565,7 +565,7 @@ static void lba2msf(int lba, struct cdrom_msf *msf)
/* Two BCD digits to binary */
inline static u_char bcd2bin(u_char bcd)
static inline u_char bcd2bin(u_char bcd)
{
DEBUG((DEBUG_CONV, "bcd2bin %x%02x", bcd));
return (bcd >> 4) * 10 + (bcd & 0x0f);
@@ -988,7 +988,7 @@ static char buf[CD_FRAMESIZE * N_BUFS];
static volatile int buf_bn[N_BUFS], next_bn;
static volatile int buf_in = 0, buf_out = NOBUF;
inline static void opt_invalidate_buffers(void)
static inline void opt_invalidate_buffers(void)
{
int i;
+1 -1
View File
@@ -735,7 +735,7 @@ config SGI_IP27_RTC
config GEN_RTC
tristate "Generic /dev/rtc emulation"
depends on RTC!=y && !IA64 && !ARM
depends on RTC!=y && !IA64 && !ARM && !PPC64
---help---
If you say Y here and create a character special file /dev/rtc with
major number 10 and minor number 135 using mknod ("man mknod"), you
+5 -5
View File
@@ -231,7 +231,7 @@ int via_dma_init(DRM_IOCTL_ARGS)
drm_via_dma_init_t init;
int retcode = 0;
DRM_COPY_FROM_USER_IOCTL(init, (drm_via_dma_init_t *) data,
DRM_COPY_FROM_USER_IOCTL(init, (drm_via_dma_init_t __user *) data,
sizeof(init));
switch (init.func) {
@@ -343,7 +343,7 @@ int via_cmdbuffer(DRM_IOCTL_ARGS)
LOCK_TEST_WITH_RETURN( dev, filp );
DRM_COPY_FROM_USER_IOCTL(cmdbuf, (drm_via_cmdbuffer_t *) data,
DRM_COPY_FROM_USER_IOCTL(cmdbuf, (drm_via_cmdbuffer_t __user *) data,
sizeof(cmdbuf));
DRM_DEBUG("via cmdbuffer, buf %p size %lu\n", cmdbuf.buf, cmdbuf.size);
@@ -386,7 +386,7 @@ int via_pci_cmdbuffer(DRM_IOCTL_ARGS)
LOCK_TEST_WITH_RETURN( dev, filp );
DRM_COPY_FROM_USER_IOCTL(cmdbuf, (drm_via_cmdbuffer_t *) data,
DRM_COPY_FROM_USER_IOCTL(cmdbuf, (drm_via_cmdbuffer_t __user *) data,
sizeof(cmdbuf));
DRM_DEBUG("via_pci_cmdbuffer, buf %p size %lu\n", cmdbuf.buf,
@@ -701,7 +701,7 @@ via_cmdbuf_size(DRM_IOCTL_ARGS)
return DRM_ERR(EFAULT);
}
DRM_COPY_FROM_USER_IOCTL(d_siz, (drm_via_cmdbuf_size_t *) data,
DRM_COPY_FROM_USER_IOCTL(d_siz, (drm_via_cmdbuf_size_t __user *) data,
sizeof(d_siz));
@@ -735,7 +735,7 @@ via_cmdbuf_size(DRM_IOCTL_ARGS)
}
d_siz.size = tmp_size;
DRM_COPY_TO_USER_IOCTL((drm_via_cmdbuf_size_t *) data, d_siz,
DRM_COPY_TO_USER_IOCTL((drm_via_cmdbuf_size_t __user *) data, d_siz,
sizeof(d_siz));
return ret;
}
+1 -1
View File
@@ -158,7 +158,7 @@ typedef struct _drm_via_dma_init {
} drm_via_dma_init_t;
typedef struct _drm_via_cmdbuffer {
char *buf;
char __user *buf;
unsigned long size;
} drm_via_cmdbuffer_t;
+2 -2
View File
@@ -133,7 +133,7 @@ memHeap_t *via_mmInit(int ofs, int size)
PMemBlock blocks;
if (size <= 0)
return 0;
return NULL;
blocks = (TMemBlock *) drm_calloc(1, sizeof(TMemBlock), DRM_MEM_DRIVER);
@@ -143,7 +143,7 @@ memHeap_t *via_mmInit(int ofs, int size)
blocks->free = 1;
return (memHeap_t *) blocks;
} else
return 0;
return NULL;
}
static TMemBlock *SliceBlock(TMemBlock * p,
+2 -2
View File
@@ -61,8 +61,8 @@ struct mem_block_t {
struct mem_block_t *heap;
int ofs, size;
int align;
int free:1;
int reserved:1;
unsigned int free:1;
unsigned int reserved:1;
};
typedef struct mem_block_t TMemBlock;
typedef struct mem_block_t *PMemBlock;
+2 -1
View File
@@ -95,7 +95,8 @@ int via_map_init(DRM_IOCTL_ARGS)
DRM_DEBUG("%s\n", __FUNCTION__);
DRM_COPY_FROM_USER_IOCTL(init, (drm_via_init_t *) data, sizeof(init));
DRM_COPY_FROM_USER_IOCTL(init, (drm_via_init_t __user *) data,
sizeof(init));
switch (init.func) {
case VIA_INIT_MAP:
+9 -6
View File
@@ -76,7 +76,8 @@ int via_agp_init(DRM_IOCTL_ARGS)
{
drm_via_agp_t agp;
DRM_COPY_FROM_USER_IOCTL(agp, (drm_via_agp_t *) data, sizeof(agp));
DRM_COPY_FROM_USER_IOCTL(agp, (drm_via_agp_t __user *) data,
sizeof(agp));
AgpHeap = via_mmInit(agp.offset, agp.size);
@@ -92,7 +93,7 @@ int via_fb_init(DRM_IOCTL_ARGS)
{
drm_via_fb_t fb;
DRM_COPY_FROM_USER_IOCTL(fb, (drm_via_fb_t *) data, sizeof(fb));
DRM_COPY_FROM_USER_IOCTL(fb, (drm_via_fb_t __user *) data, sizeof(fb));
FBHeap = via_mmInit(fb.offset, fb.size);
@@ -193,19 +194,20 @@ int via_mem_alloc(DRM_IOCTL_ARGS)
{
drm_via_mem_t mem;
DRM_COPY_FROM_USER_IOCTL(mem, (drm_via_mem_t *) data, sizeof(mem));
DRM_COPY_FROM_USER_IOCTL(mem, (drm_via_mem_t __user *) data,
sizeof(mem));
switch (mem.type) {
case VIDEO:
if (via_fb_alloc(&mem) < 0)
return -EFAULT;
DRM_COPY_TO_USER_IOCTL((drm_via_mem_t *) data, mem,
DRM_COPY_TO_USER_IOCTL((drm_via_mem_t __user *) data, mem,
sizeof(mem));
return 0;
case AGP:
if (via_agp_alloc(&mem) < 0)
return -EFAULT;
DRM_COPY_TO_USER_IOCTL((drm_via_mem_t *) data, mem,
DRM_COPY_TO_USER_IOCTL((drm_via_mem_t __user *) data, mem,
sizeof(mem));
return 0;
}
@@ -289,7 +291,8 @@ int via_mem_free(DRM_IOCTL_ARGS)
{
drm_via_mem_t mem;
DRM_COPY_FROM_USER_IOCTL(mem, (drm_via_mem_t *) data, sizeof(mem));
DRM_COPY_FROM_USER_IOCTL(mem, (drm_via_mem_t __user *) data,
sizeof(mem));
switch (mem.type) {
+2 -1
View File
@@ -76,7 +76,8 @@ via_decoder_futex(DRM_IOCTL_ARGS)
DRM_DEBUG("%s\n", __FUNCTION__);
DRM_COPY_FROM_USER_IOCTL(fx, (drm_via_futex_t *) data, sizeof(fx));
DRM_COPY_FROM_USER_IOCTL(fx, (drm_via_futex_t __user *) data,
sizeof(fx));
if (fx.lock > VIA_NR_XVMC_LOCKS)
return -EFAULT;
+1 -1
View File
@@ -1726,7 +1726,7 @@ static int dmi_table(u32 base, int len, int num)
return status;
}
inline static int dmi_checksum(u8 *buf)
static inline int dmi_checksum(u8 *buf)
{
u8 sum=0;
int a;
+1 -5
View File
@@ -131,11 +131,7 @@
#define WDIOC_GET_PRETIMEOUT _IOW(WATCHDOG_IOCTL_BASE, 22, int)
#endif
#ifdef CONFIG_WATCHDOG_NOWAYOUT
static int nowayout = 1;
#else
static int nowayout;
#endif
static int nowayout = WATCHDOG_NOWAYOUT;
static ipmi_user_t watchdog_user = NULL;
+6 -6
View File
@@ -902,7 +902,7 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
(HostP->Mapping[entry].RtaUniqueNum==RtaUniq))
{
HostP->Mapping[entry].Flags |= RTA_BOOTED|RTA_NEWBOOT;
#if NEED_TO_FIX
#ifdef NEED_TO_FIX
RIO_SV_BROADCAST(HostP->svFlags[entry]);
#endif
if ( (sysport=HostP->Mapping[entry].SysPort) != NO_PORT )
@@ -918,7 +918,7 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
{
entry2 = HostP->Mapping[entry].ID2 - 1;
HostP->Mapping[entry2].Flags |= RTA_BOOTED|RTA_NEWBOOT;
#if NEED_TO_FIX
#ifdef NEED_TO_FIX
RIO_SV_BROADCAST(HostP->svFlags[entry2]);
#endif
sysport = HostP->Mapping[entry2].SysPort;
@@ -1143,7 +1143,7 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
CCOPY( MapP->Name, HostP->Mapping[entry].Name, MAX_NAME_LEN );
HostP->Mapping[entry].Flags =
SLOT_IN_USE | RTA_BOOTED | RTA_NEWBOOT;
#if NEED_TO_FIX
#ifdef NEED_TO_FIX
RIO_SV_BROADCAST(HostP->svFlags[entry]);
#endif
RIOReMapPorts( p, HostP, &HostP->Mapping[entry] );
@@ -1159,7 +1159,7 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
"This RTA has a tentative entry on another host - delete that entry (1)\n");
HostP->Mapping[entry].Flags =
SLOT_TENTATIVE | RTA_BOOTED | RTA_NEWBOOT;
#if NEED_TO_FIX
#ifdef NEED_TO_FIX
RIO_SV_BROADCAST(HostP->svFlags[entry]);
#endif
}
@@ -1169,7 +1169,7 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
{
HostP->Mapping[entry2].Flags = SLOT_IN_USE |
RTA_BOOTED | RTA_NEWBOOT | RTA16_SECOND_SLOT;
#if NEED_TO_FIX
#ifdef NEED_TO_FIX
RIO_SV_BROADCAST(HostP->svFlags[entry2]);
#endif
HostP->Mapping[entry2].SysPort = MapP2->SysPort;
@@ -1188,7 +1188,7 @@ static int RIOBootComplete( struct rio_info *p, struct Host *HostP, uint Rup, st
else
HostP->Mapping[entry2].Flags = SLOT_TENTATIVE |
RTA_BOOTED | RTA_NEWBOOT | RTA16_SECOND_SLOT;
#if NEED_TO_FIX
#ifdef NEED_TO_FIX
RIO_SV_BROADCAST(HostP->svFlags[entry2]);
#endif
bzero( (caddr_t)MapP2, sizeof(struct Map) );
+1 -1
View File
@@ -1023,7 +1023,7 @@ RIOFreeDisconnected(struct rio_info *p, struct Host *HostP, int unit)
if (link < LINKS_PER_UNIT)
return 1;
#if NEED_TO_FIX_THIS
#ifdef NEED_TO_FIX_THIS
/* Ok so all the links are disconnected. But we may have only just
** made this slot tentative and not yet received a topology update.
** Lets check how long ago we made it tentative.
+1 -1
View File
@@ -771,7 +771,7 @@ int RIOAssignRta( struct rio_info *p, struct Map *MapP )
if ((MapP->Flags & RTA16_SECOND_SLOT) == 0)
CCOPY( MapP->Name, HostMapP->Name, MAX_NAME_LEN );
HostMapP->Flags = SLOT_IN_USE | RTA_BOOTED;
#if NEED_TO_FIX
#ifdef NEED_TO_FIX
RIO_SV_BROADCAST(p->RIOHosts[host].svFlags[MapP->ID-1]);
#endif
if (MapP->Flags & RTA16_SECOND_SLOT)
+11
View File
@@ -35,5 +35,16 @@ config TCG_ATMEL
will be accessible from within Linux. To compile this driver
as a module, choose M here; the module will be called tpm_atmel.
config TCG_INFINEON
tristate "Infineon Technologies SLD 9630 TPM Interface"
depends on TCG_TPM
---help---
If you have a TPM security chip from Infineon Technologies
say Yes and it will be accessible from within Linux. To
compile this driver as a module, choose M here; the module
will be called tpm_infineon.
Further information on this driver and the supported hardware
can be found at http://www.prosec.rub.de/tpm
endmenu

Some files were not shown because too many files have changed in this diff Show More