Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97200
b: refs/heads/master
c: c4ea6fc
h: refs/heads/master
v: v3
  • Loading branch information
Cyrill Gorcunov authored and Rusty Russell committed May 23, 2008
1 parent 56fcd68 commit 792b973
Show file tree
Hide file tree
Showing 44 changed files with 476 additions and 146 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: 5e2daeb3c982ea19ecad0c2e720a4052034be14b
refs/heads/master: c4ea6fcf5a192dbba54666f308bdace1c278e0c1
36 changes: 11 additions & 25 deletions trunk/arch/sparc64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,39 +657,20 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
struct task_struct *p, struct pt_regs *regs)
{
struct thread_info *t = task_thread_info(p);
struct sparc_stackf *parent_sf;
unsigned long child_stack_sz;
char *child_trap_frame;
int kernel_thread;

kernel_thread = (regs->tstate & TSTATE_PRIV) ? 1 : 0;
parent_sf = ((struct sparc_stackf *) regs) - 1;

/* Calculate offset to stack_frame & pt_regs */
child_stack_sz = ((STACKFRAME_SZ + TRACEREG_SZ) +
(kernel_thread ? STACKFRAME_SZ : 0));
child_trap_frame = (task_stack_page(p) +
(THREAD_SIZE - child_stack_sz));
memcpy(child_trap_frame, parent_sf, child_stack_sz);

t->flags = (t->flags & ~((0xffUL << TI_FLAG_CWP_SHIFT) |
(0xffUL << TI_FLAG_CURRENT_DS_SHIFT))) |
child_trap_frame = task_stack_page(p) + (THREAD_SIZE - (TRACEREG_SZ+STACKFRAME_SZ));
memcpy(child_trap_frame, (((struct sparc_stackf *)regs)-1), (TRACEREG_SZ+STACKFRAME_SZ));

t->flags = (t->flags & ~((0xffUL << TI_FLAG_CWP_SHIFT) | (0xffUL << TI_FLAG_CURRENT_DS_SHIFT))) |
(((regs->tstate + 1) & TSTATE_CWP) << TI_FLAG_CWP_SHIFT);
t->new_child = 1;
t->ksp = ((unsigned long) child_trap_frame) - STACK_BIAS;
t->kregs = (struct pt_regs *) (child_trap_frame +
sizeof(struct sparc_stackf));
t->kregs = (struct pt_regs *)(child_trap_frame+sizeof(struct sparc_stackf));
t->fpsaved[0] = 0;

if (kernel_thread) {
struct sparc_stackf *child_sf = (struct sparc_stackf *)
(child_trap_frame + (STACKFRAME_SZ + TRACEREG_SZ));

/* Zero terminate the stack backtrace. */
child_sf->fp = NULL;
t->kregs->u_regs[UREG_FP] =
((unsigned long) child_sf) - STACK_BIAS;

if (regs->tstate & TSTATE_PRIV) {
/* Special case, if we are spawning a kernel thread from
* a userspace task (via KMOD, NFS, or similar) we must
* disable performance counters in the child because the
Expand All @@ -700,7 +681,12 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
t->pcr_reg = 0;
t->flags &= ~_TIF_PERFCTR;
}
t->kregs->u_regs[UREG_FP] = t->ksp;
t->flags |= ((long)ASI_P << TI_FLAG_CURRENT_DS_SHIFT);
flush_register_windows();
memcpy((void *)(t->ksp + STACK_BIAS),
(void *)(regs->u_regs[UREG_FP] + STACK_BIAS),
sizeof(struct sparc_stackf));
t->kregs->u_regs[UREG_G6] = (unsigned long) t;
t->kregs->u_regs[UREG_G4] = (unsigned long) t->task;
} else {
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/sparc64/kernel/rtrap.S
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,6 @@ kern_rtt: rdpr %canrestore, %g1
brz,pn %g1, kern_rtt_fill
nop
kern_rtt_restore:
stw %g0, [%sp + PTREGS_OFF + PT_V9_MAGIC]
restore
retry

Expand Down
12 changes: 5 additions & 7 deletions trunk/arch/sparc64/kernel/stacktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void save_stack_trace(struct stack_trace *trace)
fp = ksp + STACK_BIAS;
thread_base = (unsigned long) tp;
do {
struct sparc_stackf *sf;
struct reg_window *rw;
struct pt_regs *regs;
unsigned long pc;

Expand All @@ -28,17 +28,15 @@ void save_stack_trace(struct stack_trace *trace)
fp >= (thread_base + THREAD_SIZE))
break;

sf = (struct sparc_stackf *) fp;
regs = (struct pt_regs *) (sf + 1);
rw = (struct reg_window *) fp;
regs = (struct pt_regs *) (rw + 1);

if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) {
if (!(regs->tstate & TSTATE_PRIV))
break;
pc = regs->tpc;
fp = regs->u_regs[UREG_I6] + STACK_BIAS;
} else {
pc = sf->callers_pc;
fp = (unsigned long)sf->fp + STACK_BIAS;
pc = rw->ins[7];
fp = rw->ins[6] + STACK_BIAS;
}

if (trace->skip > 0)
Expand Down
12 changes: 5 additions & 7 deletions trunk/arch/sparc64/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -2116,25 +2116,23 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
printk("\n");
#endif
do {
struct sparc_stackf *sf;
struct reg_window *rw;
struct pt_regs *regs;
unsigned long pc;

/* Bogus frame pointer? */
if (fp < (thread_base + sizeof(struct thread_info)) ||
fp >= (thread_base + THREAD_SIZE))
break;
sf = (struct sparc_stackf *) fp;
regs = (struct pt_regs *) (sf + 1);
rw = (struct reg_window *)fp;
regs = (struct pt_regs *) (rw + 1);

if ((regs->magic & ~0x1ff) == PT_REGS_MAGIC) {
if (!(regs->tstate & TSTATE_PRIV))
break;
pc = regs->tpc;
fp = regs->u_regs[UREG_I6] + STACK_BIAS;
} else {
pc = sf->callers_pc;
fp = (unsigned long)sf->fp + STACK_BIAS;
pc = rw->ins[7];
fp = rw->ins[6] + STACK_BIAS;
}

printk(" [%016lx] ", pc);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/boot/printf.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ static char *number(char *str, long num, int base, int size, int precision,
if (type & LEFT)
type &= ~ZEROPAD;
if (base < 2 || base > 36)
return NULL;
return 0;
c = (type & ZEROPAD) ? '0' : ' ';
sign = 0;
if (type & SIGN) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/dispatcher/dsmethod.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,

acpi_os_release_mutex(method_desc->method.
mutex->mutex.os_mutex);
method_desc->method.mutex->mutex.thread_id = NULL;
method_desc->method.mutex->mutex.thread_id = 0;
}
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/acpi/executer/exmutex.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ acpi_status acpi_ex_release_mutex_object(union acpi_operand_object *obj_desc)

/* Clear mutex info */

obj_desc->mutex.thread_id = NULL;
obj_desc->mutex.thread_id = 0;
return_ACPI_STATUS(status);
}

Expand Down Expand Up @@ -463,7 +463,7 @@ void acpi_ex_release_all_mutexes(struct acpi_thread_state *thread)
/* Mark mutex unowned */

obj_desc->mutex.owner_thread = NULL;
obj_desc->mutex.thread_id = NULL;
obj_desc->mutex.thread_id = 0;

/* Update Thread sync_level (Last mutex is the important one) */

Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/isdn/hysdn/hycapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,11 +462,11 @@ static int hycapi_read_proc(char *page, char **start, off_t off,
default: s = "???"; break;
}
len += sprintf(page+len, "%-16s %s\n", "type", s);
if ((s = cinfo->version[VER_DRIVER]) != NULL)
if ((s = cinfo->version[VER_DRIVER]) != 0)
len += sprintf(page+len, "%-16s %s\n", "ver_driver", s);
if ((s = cinfo->version[VER_CARDTYPE]) != NULL)
if ((s = cinfo->version[VER_CARDTYPE]) != 0)
len += sprintf(page+len, "%-16s %s\n", "ver_cardtype", s);
if ((s = cinfo->version[VER_SERIAL]) != NULL)
if ((s = cinfo->version[VER_SERIAL]) != 0)
len += sprintf(page+len, "%-16s %s\n", "ver_serial", s);

len += sprintf(page+len, "%-16s %s\n", "cardname", cinfo->cardname);
Expand Down
11 changes: 4 additions & 7 deletions trunk/drivers/net/cassini.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@

#define DRV_MODULE_NAME "cassini"
#define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "1.6"
#define DRV_MODULE_RELDATE "21 May 2008"
#define DRV_MODULE_VERSION "1.5"
#define DRV_MODULE_RELDATE "4 Jan 2008"

#define CAS_DEF_MSG_ENABLE \
(NETIF_MSG_DRV | \
Expand Down Expand Up @@ -2136,12 +2136,9 @@ static int cas_rx_process_pkt(struct cas *cp, struct cas_rx_comp *rxc,
if (addr)
cas_page_unmap(addr);
}
skb->csum = csum_unfold(~csum);
skb->ip_summed = CHECKSUM_COMPLETE;
skb->protocol = eth_type_trans(skb, cp->dev);
if (skb->protocol == htons(ETH_P_IP)) {
skb->csum = csum_unfold(~csum);
skb->ip_summed = CHECKSUM_COMPLETE;
} else
skb->ip_summed = CHECKSUM_NONE;
return len;
}

Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/wireless/ath5k/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1787,8 +1787,6 @@ ath5k_tasklet_rx(unsigned long data)

spin_lock(&sc->rxbuflock);
do {
rxs.flag = 0;

if (unlikely(list_empty(&sc->rxbuf))) {
ATH5K_WARN(sc, "empty rx buf pool\n");
break;
Expand Down
6 changes: 2 additions & 4 deletions trunk/drivers/net/wireless/ath5k/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -4119,7 +4119,6 @@ static int ath5k_hw_proc_5210_rx_status(struct ath5k_hw *ah,
rs->rs_tstamp = AR5K_REG_MS(rx_status->rx_status_1,
AR5K_5210_RX_DESC_STATUS1_RECEIVE_TIMESTAMP);
rs->rs_status = 0;
rs->rs_phyerr = 0;

/*
* Key table status
Expand All @@ -4146,7 +4145,7 @@ static int ath5k_hw_proc_5210_rx_status(struct ath5k_hw *ah,
if (rx_status->rx_status_1 &
AR5K_5210_RX_DESC_STATUS1_PHY_ERROR) {
rs->rs_status |= AR5K_RXERR_PHY;
rs->rs_phyerr |= AR5K_REG_MS(rx_status->rx_status_1,
rs->rs_phyerr = AR5K_REG_MS(rx_status->rx_status_1,
AR5K_5210_RX_DESC_STATUS1_PHY_ERROR);
}

Expand Down Expand Up @@ -4194,7 +4193,6 @@ static int ath5k_hw_proc_5212_rx_status(struct ath5k_hw *ah,
rs->rs_tstamp = AR5K_REG_MS(rx_status->rx_status_1,
AR5K_5212_RX_DESC_STATUS1_RECEIVE_TIMESTAMP);
rs->rs_status = 0;
rs->rs_phyerr = 0;

/*
* Key table status
Expand All @@ -4217,7 +4215,7 @@ static int ath5k_hw_proc_5212_rx_status(struct ath5k_hw *ah,
if (rx_status->rx_status_1 &
AR5K_5212_RX_DESC_STATUS1_PHY_ERROR) {
rs->rs_status |= AR5K_RXERR_PHY;
rs->rs_phyerr |= AR5K_REG_MS(rx_err->rx_error_1,
rs->rs_phyerr = AR5K_REG_MS(rx_err->rx_error_1,
AR5K_RX_DESC_ERROR1_PHY_ERROR_CODE);
}

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/wireless/hostap/hostap_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,6 @@ static struct pcmcia_device_id hostap_cs_ids[] = {
PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x0001),
PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x7300),
/* PCMCIA_DEVICE_MANF_CARD(0xc00f, 0x0000), conflict with pcnet_cs */
PCMCIA_DEVICE_MANF_CARD(0xc250, 0x0002),
PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0002),
PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0005),
PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0010),
Expand Down
27 changes: 14 additions & 13 deletions trunk/drivers/net/wireless/libertas/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev,
return ret;
}

static void lbs_ethtool_get_stats(struct net_device *dev,
struct ethtool_stats *stats, uint64_t *data)
static void lbs_ethtool_get_stats(struct net_device * dev,
struct ethtool_stats * stats, u64 * data)
{
struct lbs_private *priv = dev->priv;
struct cmd_ds_mesh_access mesh_access;
Expand All @@ -83,12 +83,12 @@ static void lbs_ethtool_get_stats(struct net_device *dev,
lbs_deb_enter(LBS_DEB_ETHTOOL);

/* Get Mesh Statistics */
ret = lbs_mesh_access(priv, CMD_ACT_MESH_GET_STATS, &mesh_access);
ret = lbs_prepare_and_send_command(priv,
CMD_MESH_ACCESS, CMD_ACT_MESH_GET_STATS,
CMD_OPTION_WAITFORRSP, 0, &mesh_access);

if (ret) {
memset(data, 0, MESH_STATS_NUM*(sizeof(uint64_t)));
if (ret)
return;
}

priv->mstats.fwd_drop_rbt = le32_to_cpu(mesh_access.data[0]);
priv->mstats.fwd_drop_ttl = le32_to_cpu(mesh_access.data[1]);
Expand All @@ -111,18 +111,19 @@ static void lbs_ethtool_get_stats(struct net_device *dev,
lbs_deb_enter(LBS_DEB_ETHTOOL);
}

static int lbs_ethtool_get_sset_count(struct net_device *dev, int sset)
static int lbs_ethtool_get_sset_count(struct net_device * dev, int sset)
{
struct lbs_private *priv = dev->priv;

if (sset == ETH_SS_STATS && dev == priv->mesh_dev)
switch (sset) {
case ETH_SS_STATS:
return MESH_STATS_NUM;

return -EOPNOTSUPP;
default:
return -EOPNOTSUPP;
}
}

static void lbs_ethtool_get_strings(struct net_device *dev,
uint32_t stringset, uint8_t *s)
u32 stringset,
u8 * s)
{
int i;

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/wireless/orinoco_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@ static struct pcmcia_device_id orinoco_cs_ids[] = {
PCMCIA_DEVICE_MANF_CARD(0x028a, 0x0673), /* Linksys WCF12 Wireless CompactFlash Card */
PCMCIA_DEVICE_MANF_CARD(0x02aa, 0x0002), /* ASUS SpaceLink WL-100 */
PCMCIA_DEVICE_MANF_CARD(0x02ac, 0x0002), /* SpeedStream SS1021 Wireless Adapter */
PCMCIA_DEVICE_MANF_CARD(0x02ac, 0x3021), /* SpeedStream Wireless Adapter */
PCMCIA_DEVICE_MANF_CARD(0x14ea, 0xb001), /* PLANEX RoadLannerWave GW-NS11H */
PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x7300), /* Airvast WN-100 */
PCMCIA_DEVICE_MANF_CARD(0x9005, 0x0021), /* Adaptec Ultra Wireless ANW-8030 */
Expand Down
14 changes: 2 additions & 12 deletions trunk/drivers/net/wireless/rtl8187_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ static void rtl8187_iowrite_async(struct rtl8187_priv *priv, __le16 addr,
u8 data[4];
struct usb_ctrlrequest dr;
} *buf;
int rc;

buf = kmalloc(sizeof(*buf), GFP_ATOMIC);
if (!buf)
Expand All @@ -117,11 +116,7 @@ static void rtl8187_iowrite_async(struct rtl8187_priv *priv, __le16 addr,
usb_fill_control_urb(urb, priv->udev, usb_sndctrlpipe(priv->udev, 0),
(unsigned char *)dr, buf, len,
rtl8187_iowrite_async_cb, buf);
rc = usb_submit_urb(urb, GFP_ATOMIC);
if (rc < 0) {
kfree(buf);
usb_free_urb(urb);
}
usb_submit_urb(urb, GFP_ATOMIC);
}

static inline void rtl818x_iowrite32_async(struct rtl8187_priv *priv,
Expand Down Expand Up @@ -174,7 +169,6 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb,
struct urb *urb;
__le16 rts_dur = 0;
u32 flags;
int rc;

urb = usb_alloc_urb(0, GFP_ATOMIC);
if (!urb) {
Expand Down Expand Up @@ -214,11 +208,7 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb,
info->dev = dev;
usb_fill_bulk_urb(urb, priv->udev, usb_sndbulkpipe(priv->udev, 2),
hdr, skb->len, rtl8187_tx_cb, skb);
rc = usb_submit_urb(urb, GFP_ATOMIC);
if (rc < 0) {
usb_free_urb(urb);
kfree_skb(skb);
}
usb_submit_urb(urb, GFP_ATOMIC);

return 0;
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/scsi/3w-9xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1278,7 +1278,7 @@ static irqreturn_t twa_interrupt(int irq, void *dev_instance)
error = 0;
/* Check for command packet errors */
if (full_command_packet->command.newcommand.status != 0) {
if (tw_dev->srb[request_id] != NULL) {
if (tw_dev->srb[request_id] != 0) {
error = twa_fill_sense(tw_dev, request_id, 1, 1);
} else {
/* Skip ioctl error prints */
Expand All @@ -1290,15 +1290,15 @@ static irqreturn_t twa_interrupt(int irq, void *dev_instance)

/* Check for correct state */
if (tw_dev->state[request_id] != TW_S_POSTED) {
if (tw_dev->srb[request_id] != NULL) {
if (tw_dev->srb[request_id] != 0) {
TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1a, "Received a request id that wasn't posted");
TW_CLEAR_ALL_INTERRUPTS(tw_dev);
goto twa_interrupt_bail;
}
}

/* Check for internal command completion */
if (tw_dev->srb[request_id] == NULL) {
if (tw_dev->srb[request_id] == 0) {
if (request_id != tw_dev->chrdev_request_id) {
if (twa_aen_complete(tw_dev, request_id))
TW_PRINTK(tw_dev->host, TW_DRIVER, 0x1b, "Error completing AEN during attention interrupt");
Expand Down
Loading

0 comments on commit 792b973

Please sign in to comment.