Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 209955
b: refs/heads/master
c: bd45fe5
h: refs/heads/master
i:
  209953: e768dee
  209951: 3f5e392
v: v3
  • Loading branch information
Linus Torvalds committed Aug 24, 2010
1 parent a3cb945 commit 305812f
Show file tree
Hide file tree
Showing 55 changed files with 380 additions and 4,405 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: 314b389b1795286400f109a25e9c2f02ab3b9b15
refs/heads/master: bd45fe539f0e26ff8d76b4cb954195ab8a6467af
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-imx/mach-cpuimx27.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,13 @@ static void __init eukrea_cpuimx27_init(void)
#if defined(CONFIG_USB_ULPI)
if (otg_mode_host) {
otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);

mxc_register_device(&mxc_otg_host, &otg_pdata);
}

usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);

mxc_register_device(&mxc_usbh2, &usbh2_pdata);
#endif
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/mach-imx/mach-pca100.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,13 +419,13 @@ static void __init pca100_init(void)
#if defined(CONFIG_USB_ULPI)
if (otg_mode_host) {
otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);

mxc_register_device(&mxc_otg_host, &otg_pdata);
}

usbh2_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);

mxc_register_device(&mxc_usbh2, &usbh2_pdata);
#endif
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-mx25/mach-cpuimx25.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ static void __init eukrea_cpuimx25_init(void)
#if defined(CONFIG_USB_ULPI)
if (otg_mode_host) {
otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);

mxc_register_device(&mxc_otg, &otg_pdata);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-mx3/mach-cpuimx35.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ static void __init mxc_board_init(void)
#if defined(CONFIG_USB_ULPI)
if (otg_mode_host) {
otg_pdata.otg = otg_ulpi_create(&mxc_ulpi_access_ops,
USB_OTG_DRV_VBUS | USB_OTG_DRV_VBUS_EXT);
ULPI_OTG_DRVVBUS | ULPI_OTG_DRVVBUS_EXT);

mxc_register_device(&mxc_otg_host, &otg_pdata);
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/base/firmware_class.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ static int _request_firmware(const struct firmware **firmware_p,
out:
if (retval) {
release_firmware(firmware);
firmware_p = NULL;
*firmware_p = NULL;
}

return retval;
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/char/ip2/ip2main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1650,7 +1650,7 @@ ip2_close( PTTY tty, struct file *pFile )
/* disable DSS reporting */
i2QueueCommands(PTYPE_INLINE, pCh, 100, 4,
CMD_DCD_NREP, CMD_CTS_NREP, CMD_DSR_NREP, CMD_RI_NREP);
if ( !tty || (tty->termios->c_cflag & HUPCL) ) {
if (tty->termios->c_cflag & HUPCL) {
i2QueueCommands(PTYPE_INLINE, pCh, 100, 2, CMD_RTSDN, CMD_DTRDN);
pCh->dataSetOut &= ~(I2_DTR | I2_RTS);
i2QueueCommands( PTYPE_INLINE, pCh, 100, 1, CMD_PAUSE(25));
Expand Down Expand Up @@ -2930,6 +2930,8 @@ ip2_ipl_ioctl (struct file *pFile, UINT cmd, ULONG arg )
if ( pCh )
{
rc = copy_to_user(argp, pCh, sizeof(i2ChanStr));
if (rc)
rc = -EFAULT;
} else {
rc = -ENODEV;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/char/rocket.c
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,7 @@ static int set_config(struct tty_struct *tty, struct r_port *info,
}
info->flags = ((info->flags & ~ROCKET_USR_MASK) | (new_serial.flags & ROCKET_USR_MASK));
configure_r_port(tty, info, NULL);
mutex_unlock(&info->port.mutex);
return 0;
}

Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/char/synclink_gt.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,8 +691,10 @@ static int open(struct tty_struct *tty, struct file *filp)
if (info->port.count == 1) {
/* 1st open on this device, init hardware */
retval = startup(info);
if (retval < 0)
if (retval < 0) {
mutex_unlock(&info->port.mutex);
goto cleanup;
}
}
mutex_unlock(&info->port.mutex);
retval = block_til_ready(tty, filp, info);
Expand Down
29 changes: 11 additions & 18 deletions trunk/drivers/serial/68328serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,9 @@ static int get_serial_info(struct m68k_serial * info,
tmp.close_delay = info->close_delay;
tmp.closing_wait = info->closing_wait;
tmp.custom_divisor = info->custom_divisor;
copy_to_user(retinfo,&tmp,sizeof(*retinfo));
if (copy_to_user(retinfo, &tmp, sizeof(*retinfo)))
return -EFAULT;

return 0;
}

Expand All @@ -882,7 +884,8 @@ static int set_serial_info(struct m68k_serial * info,

if (!new_info)
return -EFAULT;
copy_from_user(&new_serial,new_info,sizeof(new_serial));
if (copy_from_user(&new_serial, new_info, sizeof(new_serial)))
return -EFAULT;
old_info = *info;

if (!capable(CAP_SYS_ADMIN)) {
Expand Down Expand Up @@ -943,8 +946,7 @@ static int get_lsr_info(struct m68k_serial * info, unsigned int *value)
status = 0;
#endif
local_irq_restore(flags);
put_user(status,value);
return 0;
return put_user(status, value);
}

/*
Expand Down Expand Up @@ -999,27 +1001,18 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
send_break(info, arg ? arg*(100) : 250);
return 0;
case TIOCGSERIAL:
if (access_ok(VERIFY_WRITE, (void *) arg,
sizeof(struct serial_struct)))
return get_serial_info(info,
(struct serial_struct *) arg);
return -EFAULT;
return get_serial_info(info,
(struct serial_struct *) arg);
case TIOCSSERIAL:
return set_serial_info(info,
(struct serial_struct *) arg);
case TIOCSERGETLSR: /* Get line status register */
if (access_ok(VERIFY_WRITE, (void *) arg,
sizeof(unsigned int)))
return get_lsr_info(info, (unsigned int *) arg);
return -EFAULT;
return get_lsr_info(info, (unsigned int *) arg);
case TIOCSERGSTRUCT:
if (!access_ok(VERIFY_WRITE, (void *) arg,
sizeof(struct m68k_serial)))
if (copy_to_user((struct m68k_serial *) arg,
info, sizeof(struct m68k_serial)))
return -EFAULT;
copy_to_user((struct m68k_serial *) arg,
info, sizeof(struct m68k_serial));
return 0;

default:
return -ENOIOCTLCMD;
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/serial/8250_early.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,13 @@ static int __init parse_options(struct early_serial8250_device *device,

if (mmio || mmio32)
printk(KERN_INFO
"Early serial console at MMIO%s 0x%llu (options '%s')\n",
"Early serial console at MMIO%s 0x%llx (options '%s')\n",
mmio32 ? "32" : "",
(unsigned long long)port->mapbase,
device->options);
else
printk(KERN_INFO
"Early serial console at I/O port 0x%lu (options '%s')\n",
"Early serial console at I/O port 0x%lx (options '%s')\n",
port->iobase,
device->options);

Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/staging/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ source "drivers/staging/vme/Kconfig"

source "drivers/staging/memrar/Kconfig"

source "drivers/staging/sep/Kconfig"

source "drivers/staging/iio/Kconfig"

source "drivers/staging/zram/Kconfig"
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/staging/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ obj-$(CONFIG_FB_UDL) += udlfb/
obj-$(CONFIG_HYPERV) += hv/
obj-$(CONFIG_VME_BUS) += vme/
obj-$(CONFIG_MRST_RAR_HANDLER) += memrar/
obj-$(CONFIG_DX_SEP) += sep/
obj-$(CONFIG_IIO) += iio/
obj-$(CONFIG_ZRAM) += zram/
obj-$(CONFIG_WLAGS49_H2) += wlags49_h2/
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/staging/batman-adv/bat_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@ static ssize_t store_log_level(struct kobject *kobj, struct attribute *attr,
if (atomic_read(&bat_priv->log_level) == log_level_tmp)
return count;

bat_info(net_dev, "Changing log level from: %i to: %li\n",
atomic_read(&bat_priv->log_level),
log_level_tmp);

atomic_set(&bat_priv->log_level, (unsigned)log_level_tmp);
return count;
}
Expand Down
29 changes: 12 additions & 17 deletions trunk/drivers/staging/batman-adv/hard-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ static bool hardif_is_iface_up(struct batman_if *batman_if)

static void update_mac_addresses(struct batman_if *batman_if)
{
if (!batman_if || !batman_if->packet_buff)
return;

addr_to_string(batman_if->addr_str, batman_if->net_dev->dev_addr);

memcpy(((struct batman_packet *)(batman_if->packet_buff))->orig,
Expand Down Expand Up @@ -194,8 +197,6 @@ static void hardif_activate_interface(struct net_device *net_dev,
if (batman_if->if_status != IF_INACTIVE)
return;

dev_hold(batman_if->net_dev);

update_mac_addresses(batman_if);
batman_if->if_status = IF_TO_BE_ACTIVATED;

Expand All @@ -222,8 +223,6 @@ static void hardif_deactivate_interface(struct net_device *net_dev,
(batman_if->if_status != IF_TO_BE_ACTIVATED))
return;

dev_put(batman_if->net_dev);

batman_if->if_status = IF_INACTIVE;

bat_info(net_dev, "Interface deactivated: %s\n", batman_if->dev);
Expand Down Expand Up @@ -318,11 +317,13 @@ static struct batman_if *hardif_add_interface(struct net_device *net_dev)
if (ret != 1)
goto out;

dev_hold(net_dev);

batman_if = kmalloc(sizeof(struct batman_if), GFP_ATOMIC);
if (!batman_if) {
pr_err("Can't add interface (%s): out of memory\n",
net_dev->name);
goto out;
goto release_dev;
}

batman_if->dev = kstrdup(net_dev->name, GFP_ATOMIC);
Expand All @@ -336,6 +337,7 @@ static struct batman_if *hardif_add_interface(struct net_device *net_dev)
batman_if->if_num = -1;
batman_if->net_dev = net_dev;
batman_if->if_status = IF_NOT_IN_USE;
batman_if->packet_buff = NULL;
INIT_LIST_HEAD(&batman_if->list);

check_known_mac_addr(batman_if->net_dev->dev_addr);
Expand All @@ -346,6 +348,8 @@ static struct batman_if *hardif_add_interface(struct net_device *net_dev)
kfree(batman_if->dev);
free_if:
kfree(batman_if);
release_dev:
dev_put(net_dev);
out:
return NULL;
}
Expand Down Expand Up @@ -374,6 +378,7 @@ static void hardif_remove_interface(struct batman_if *batman_if)
batman_if->if_status = IF_TO_BE_REMOVED;
list_del_rcu(&batman_if->list);
sysfs_del_hardif(&batman_if->hardif_obj);
dev_put(batman_if->net_dev);
call_rcu(&batman_if->rcu, hardif_free_interface);
}

Expand All @@ -393,15 +398,13 @@ static int hard_if_event(struct notifier_block *this,
/* FIXME: each batman_if will be attached to a softif */
struct bat_priv *bat_priv = netdev_priv(soft_device);

if (!batman_if)
batman_if = hardif_add_interface(net_dev);
if (!batman_if && event == NETDEV_REGISTER)
batman_if = hardif_add_interface(net_dev);

if (!batman_if)
goto out;

switch (event) {
case NETDEV_REGISTER:
break;
case NETDEV_UP:
hardif_activate_interface(soft_device, bat_priv, batman_if);
break;
Expand Down Expand Up @@ -442,8 +445,6 @@ int batman_skb_recv(struct sk_buff *skb, struct net_device *dev,
struct bat_priv *bat_priv = netdev_priv(soft_device);
struct batman_packet *batman_packet;
struct batman_if *batman_if;
struct net_device_stats *stats;
struct rtnl_link_stats64 temp;
int ret;

skb = skb_share_check(skb, GFP_ATOMIC);
Expand Down Expand Up @@ -479,12 +480,6 @@ int batman_skb_recv(struct sk_buff *skb, struct net_device *dev,
if (batman_if->if_status != IF_ACTIVE)
goto err_free;

stats = (struct net_device_stats *)dev_get_stats(skb->dev, &temp);
if (stats) {
stats->rx_packets++;
stats->rx_bytes += skb->len;
}

batman_packet = (struct batman_packet *)skb->data;

if (batman_packet->version != COMPAT_VERSION) {
Expand Down
12 changes: 8 additions & 4 deletions trunk/drivers/staging/batman-adv/icmp_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ static int bat_socket_open(struct inode *inode, struct file *file)
INIT_LIST_HEAD(&socket_client->queue_list);
socket_client->queue_len = 0;
socket_client->index = i;
socket_client->bat_priv = inode->i_private;
spin_lock_init(&socket_client->lock);
init_waitqueue_head(&socket_client->queue_wait);

Expand Down Expand Up @@ -151,9 +152,8 @@ static ssize_t bat_socket_read(struct file *file, char __user *buf,
static ssize_t bat_socket_write(struct file *file, const char __user *buff,
size_t len, loff_t *off)
{
/* FIXME: each orig_node->batman_if will be attached to a softif */
struct bat_priv *bat_priv = netdev_priv(soft_device);
struct socket_client *socket_client = file->private_data;
struct bat_priv *bat_priv = socket_client->bat_priv;
struct icmp_packet_rr icmp_packet;
struct orig_node *orig_node;
struct batman_if *batman_if;
Expand All @@ -168,6 +168,9 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff,
return -EINVAL;
}

if (!bat_priv->primary_if)
return -EFAULT;

if (len >= sizeof(struct icmp_packet_rr))
packet_len = sizeof(struct icmp_packet_rr);

Expand Down Expand Up @@ -223,7 +226,8 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff,
if (batman_if->if_status != IF_ACTIVE)
goto dst_unreach;

memcpy(icmp_packet.orig, batman_if->net_dev->dev_addr, ETH_ALEN);
memcpy(icmp_packet.orig,
bat_priv->primary_if->net_dev->dev_addr, ETH_ALEN);

if (packet_len == sizeof(struct icmp_packet_rr))
memcpy(icmp_packet.rr, batman_if->net_dev->dev_addr, ETH_ALEN);
Expand Down Expand Up @@ -271,7 +275,7 @@ int bat_socket_setup(struct bat_priv *bat_priv)
goto err;

d = debugfs_create_file(ICMP_SOCKET, S_IFREG | S_IWUSR | S_IRUSR,
bat_priv->debug_dir, NULL, &fops);
bat_priv->debug_dir, bat_priv, &fops);
if (d)
goto err;

Expand Down
7 changes: 5 additions & 2 deletions trunk/drivers/staging/batman-adv/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,13 @@ int choose_orig(void *data, int32_t size)
int is_my_mac(uint8_t *addr)
{
struct batman_if *batman_if;

rcu_read_lock();
list_for_each_entry_rcu(batman_if, &if_list, list) {
if ((batman_if->net_dev) &&
(compare_orig(batman_if->net_dev->dev_addr, addr))) {
if (batman_if->if_status != IF_ACTIVE)
continue;

if (compare_orig(batman_if->net_dev->dev_addr, addr)) {
rcu_read_unlock();
return 1;
}
Expand Down
Loading

0 comments on commit 305812f

Please sign in to comment.