Release 4.7 drivers/usb/serial/io_ti.c
/*
* Edgeport USB Serial Converter driver
*
* Copyright (C) 2000-2002 Inside Out Networks, All rights reserved.
* Copyright (C) 2001-2002 Greg Kroah-Hartman <greg@kroah.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* Supports the following devices:
* EP/1 EP/2 EP/4 EP/21 EP/22 EP/221 EP/42 EP/421 WATCHPORT
*
* For questions or problems with this driver, contact Inside Out
* Networks technical support, or Peter Berger <pberger@brimson.com>,
* or Al Borchers <alborchers@steinerpoint.com>.
*/
#include <linux/kernel.h>
#include <linux/jiffies.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/tty.h>
#include <linux/tty_driver.h>
#include <linux/tty_flip.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/mutex.h>
#include <linux/serial.h>
#include <linux/swab.h>
#include <linux/kfifo.h>
#include <linux/ioctl.h>
#include <linux/firmware.h>
#include <linux/uaccess.h>
#include <linux/usb.h>
#include <linux/usb/serial.h>
#include "io_16654.h"
#include "io_usbvend.h"
#include "io_ti.h"
#define DRIVER_AUTHOR "Greg Kroah-Hartman <greg@kroah.com> and David Iacovelli"
#define DRIVER_DESC "Edgeport USB Serial Driver"
#define EPROM_PAGE_SIZE 64
/* different hardware types */
#define HARDWARE_TYPE_930 0
#define HARDWARE_TYPE_TIUMP 1
/* IOCTL_PRIVATE_TI_GET_MODE Definitions */
#define TI_MODE_CONFIGURING 0
/* Device has not entered start device */
#define TI_MODE_BOOT 1
/* Staying in boot mode */
#define TI_MODE_DOWNLOAD 2
/* Made it to download mode */
#define TI_MODE_TRANSITIONING 3
/*
* Currently in boot mode but
* transitioning to download mode
*/
/* read urb state */
#define EDGE_READ_URB_RUNNING 0
#define EDGE_READ_URB_STOPPING 1
#define EDGE_READ_URB_STOPPED 2
#define EDGE_CLOSING_WAIT 4000
/* in .01 sec */
/* Product information read from the Edgeport */
struct product_info {
int TiMode; /* Current TI Mode */
__u8 hardware_type; /* Type of hardware */
} __attribute__((packed));
/*
* Edgeport firmware header
*
* "build_number" has been set to 0 in all three of the images I have
* seen, and Digi Tech Support suggests that it is safe to ignore it.
*
* "length" is the number of bytes of actual data following the header.
*
* "checksum" is the low order byte resulting from adding the values of
* all the data bytes.
*/
struct edgeport_fw_hdr {
u8 major_version;
u8 minor_version;
__le16 build_number;
__le16 length;
u8 checksum;
}
__packed;
struct edgeport_port {
__u16 uart_base;
__u16 dma_address;
__u8 shadow_msr;
__u8 shadow_mcr;
__u8 shadow_lsr;
__u8 lsr_mask;
__u32 ump_read_timeout; /*
* Number of milliseconds the UMP will
* wait without data before completing
* a read short
*/
int baud_rate;
int close_pending;
int lsr_event;
struct edgeport_serial *edge_serial;
struct usb_serial_port *port;
__u8 bUartMode; /* Port type, 0: RS232, etc. */
spinlock_t ep_lock;
int ep_read_urb_state;
int ep_write_urb_in_use;
};
struct edgeport_serial {
struct product_info product_info;
u8 TI_I2C_Type; /* Type of I2C in UMP */
u8 TiReadI2C; /*
* Set to TRUE if we have read the
* I2c in Boot Mode
*/
struct mutex es_lock;
int num_ports_open;
struct usb_serial *serial;
struct delayed_work heartbeat_work;
int fw_version;
bool use_heartbeat;
};
/* Devices that this driver supports */
static const struct usb_device_id edgeport_1port_id_table[] = {
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_1) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_TI3410_EDGEPORT_1) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_TI3410_EDGEPORT_1I) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_PROXIMITY) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_MOTION) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_MOISTURE) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_TEMPERATURE) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_HUMIDITY) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_POWER) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_LIGHT) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_RADIATION) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_DISTANCE) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_ACCELERATION) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_PROX_DIST) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_PLUS_PWR_HP4CD) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_PLUS_PWR_PCI) },
{ }
};
static const struct usb_device_id edgeport_2port_id_table[] = {
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2C) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2I) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_421) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_42) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4I) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_22I) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_221C) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_22C) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21C) },
/* The 4, 8 and 16 port devices show up as multiple 2 port devices */
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4S) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_8) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_8S) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_416) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_416B) },
{ }
};
/* Devices that this driver supports */
static const struct usb_device_id id_table_combined[] = {
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_1) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_TI3410_EDGEPORT_1) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_TI3410_EDGEPORT_1I) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_PROXIMITY) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_MOTION) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_MOISTURE) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_TEMPERATURE) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_HUMIDITY) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_POWER) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_LIGHT) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_RADIATION) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_DISTANCE) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_ACCELERATION) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_WP_PROX_DIST) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_PLUS_PWR_HP4CD) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_PLUS_PWR_PCI) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2C) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_2I) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_421) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_42) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4I) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_22I) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_221C) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_22C) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_21C) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_4S) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_8) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_8S) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_416) },
{ USB_DEVICE(USB_VENDOR_ID_ION, ION_DEVICE_ID_TI_EDGEPORT_416B) },
{ }
};
MODULE_DEVICE_TABLE(usb, id_table_combined);
static int closing_wait = EDGE_CLOSING_WAIT;
static bool ignore_cpu_rev;
static int default_uart_mode;
/* RS232 */
static void edge_tty_recv(struct usb_serial_port *port, unsigned char *data,
int length);
static void stop_read(struct edgeport_port *edge_port);
static int restart_read(struct edgeport_port *edge_port);
static void edge_set_termios(struct tty_struct *tty,
struct usb_serial_port *port, struct ktermios *old_termios);
static void edge_send(struct usb_serial_port *port, struct tty_struct *tty);
static int do_download_mode(struct edgeport_serial *serial,
const struct firmware *fw);
static int do_boot_mode(struct edgeport_serial *serial,
const struct firmware *fw);
/* sysfs attributes */
static int edge_create_sysfs_attrs(struct usb_serial_port *port);
static int edge_remove_sysfs_attrs(struct usb_serial_port *port);
/*
* Some release of Edgeport firmware "down3.bin" after version 4.80
* introduced code to automatically disconnect idle devices on some
* Edgeport models after periods of inactivity, typically ~60 seconds.
* This occurs without regard to whether ports on the device are open
* or not. Digi International Tech Support suggested:
*
* 1. Adding driver "heartbeat" code to reset the firmware timer by
* requesting a descriptor record every 15 seconds, which should be
* effective with newer firmware versions that require it, and benign
* with older versions that do not. In practice 40 seconds seems often
* enough.
* 2. The heartbeat code is currently required only on Edgeport/416 models.
*/
#define FW_HEARTBEAT_VERSION_CUTOFF ((4 << 8) + 80)
#define FW_HEARTBEAT_SECS 40
/* Timeouts in msecs: firmware downloads take longer */
#define TI_VSEND_TIMEOUT_DEFAULT 1000
#define TI_VSEND_TIMEOUT_FW_DOWNLOAD 10000
static int ti_vread_sync(struct usb_device *dev, __u8 request,
__u16 value, __u16 index, u8 *data, int size)
{
int status;
status = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), request,
(USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN),
value, index, data, size, 1000);
if (status < 0)
return status;
if (status != size) {
dev_dbg(&dev->dev, "%s - wanted to write %d, but only wrote %d\n",
__func__, size, status);
return -ECOMM;
}
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 74 | 71.15% | 2 | 33.33% |
al borchers | al borchers | 27 | 25.96% | 1 | 16.67% |
alan cox | alan cox | 1 | 0.96% | 1 | 16.67% |
harvey harrison | harvey harrison | 1 | 0.96% | 1 | 16.67% |
nishanth aravamudan | nishanth aravamudan | 1 | 0.96% | 1 | 16.67% |
| Total | 104 | 100.00% | 6 | 100.00% |
static int ti_vsend_sync(struct usb_device *dev, u8 request, u16 value,
u16 index, u8 *data, int size, int timeout)
{
int status;
status = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), request,
(USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT),
value, index, data, size, timeout);
if (status < 0)
return status;
if (status != size) {
dev_dbg(&dev->dev, "%s - wanted to write %d, but only wrote %d\n",
__func__, size, status);
return -ECOMM;
}
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 98 | 91.59% | 2 | 40.00% |
peter e. berger | peter e. berger | 7 | 6.54% | 1 | 20.00% |
alan cox | alan cox | 1 | 0.93% | 1 | 20.00% |
harvey harrison | harvey harrison | 1 | 0.93% | 1 | 20.00% |
| Total | 107 | 100.00% | 5 | 100.00% |
static int send_cmd(struct usb_device *dev, __u8 command,
__u8 moduleid, __u16 value, u8 *data,
int size)
{
return ti_vsend_sync(dev, command, value, moduleid, data, size,
TI_VSEND_TIMEOUT_DEFAULT);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 41 | 91.11% | 1 | 33.33% |
alan cox | alan cox | 2 | 4.44% | 1 | 33.33% |
peter e. berger | peter e. berger | 2 | 4.44% | 1 | 33.33% |
| Total | 45 | 100.00% | 3 | 100.00% |
/* clear tx/rx buffers and fifo in TI UMP */
static int purge_port(struct usb_serial_port *port, __u16 mask)
{
int port_number = port->port_number;
dev_dbg(&port->dev, "%s - port %d, mask %x\n", __func__, port_number, mask);
return send_cmd(port->serial->dev,
UMPC_PURGE_PORT,
(__u8)(UMPM_UART1_PORT + port_number),
mask,
NULL,
0);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 61 | 95.31% | 3 | 60.00% |
alan cox | alan cox | 2 | 3.12% | 1 | 20.00% |
harvey harrison | harvey harrison | 1 | 1.56% | 1 | 20.00% |
| Total | 64 | 100.00% | 5 | 100.00% |
/**
* read_download_mem - Read edgeport memory from TI chip
* @dev: usb device pointer
* @start_address: Device CPU address at which to read
* @length: Length of above data
* @address_type: Can read both XDATA and I2C
* @buffer: pointer to input data buffer
*/
static int read_download_mem(struct usb_device *dev, int start_address,
int length, __u8 address_type, __u8 *buffer)
{
int status = 0;
__u8 read_length;
u16 be_start_address;
dev_dbg(&dev->dev, "%s - @ %x for %d\n", __func__, start_address, length);
/*
* Read in blocks of 64 bytes
* (TI firmware can't handle more than 64 byte reads)
*/
while (length) {
if (length > 64)
read_length = 64;
else
read_length = (__u8)length;
if (read_length > 1) {
dev_dbg(&dev->dev, "%s - @ %x for %d\n", __func__, start_address, read_length);
}
/*
* NOTE: Must use swab as wIndex is sent in little-endian
* byte order regardless of host byte order.
*/
be_start_address = swab16((u16)start_address);
status = ti_vread_sync(dev, UMPC_MEMORY_READ,
(__u16)address_type,
be_start_address,
buffer, read_length);
if (status) {
dev_dbg(&dev->dev, "%s - ERROR %x\n", __func__, status);
return status;
}
if (read_length > 1)
usb_serial_debug_data(&dev->dev, __func__, read_length, buffer);
/* Update pointers/length */
start_address += read_length;
buffer += read_length;
length -= read_length;
}
return status;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 177 | 93.16% | 4 | 50.00% |
johan hovold | johan hovold | 6 | 3.16% | 1 | 12.50% |
harvey harrison | harvey harrison | 4 | 2.11% | 1 | 12.50% |
alan cox | alan cox | 2 | 1.05% | 1 | 12.50% |
peter e. berger | peter e. berger | 1 | 0.53% | 1 | 12.50% |
| Total | 190 | 100.00% | 8 | 100.00% |
static int read_ram(struct usb_device *dev, int start_address,
int length, __u8 *buffer)
{
return read_download_mem(dev, start_address, length,
DTK_ADDR_SPACE_XDATA, buffer);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 33 | 94.29% | 2 | 66.67% |
alan cox | alan cox | 2 | 5.71% | 1 | 33.33% |
| Total | 35 | 100.00% | 3 | 100.00% |
/* Read edgeport memory to a given block */
static int read_boot_mem(struct edgeport_serial *serial,
int start_address, int length, __u8 *buffer)
{
int status = 0;
int i;
for (i = 0; i < length; i++) {
status = ti_vread_sync(serial->serial->dev,
UMPC_MEMORY_READ, serial->TI_I2C_Type,
(__u16)(start_address+i), &buffer[i], 0x01);
if (status) {
dev_dbg(&serial->serial->dev->dev, "%s - ERROR %x\n", __func__, status);
return status;
}
}
dev_dbg(&serial->serial->dev->dev, "%s - start_address = %x, length = %d\n",
__func__, start_address, length);
usb_serial_debug_data(&serial->serial->dev->dev, __func__, length, buffer);
serial->TiReadI2C = 1;
return status;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 147 | 96.71% | 3 | 60.00% |
harvey harrison | harvey harrison | 3 | 1.97% | 1 | 20.00% |
alan cox | alan cox | 2 | 1.32% | 1 | 20.00% |
| Total | 152 | 100.00% | 5 | 100.00% |
/* Write given block to TI EPROM memory */
static int write_boot_mem(struct edgeport_serial *serial,
int start_address, int length, __u8 *buffer)
{
int status = 0;
int i;
u8 *temp;
/* Must do a read before write */
if (!serial->TiReadI2C) {
temp = kmalloc(1, GFP_KERNEL);
if (!temp)
return -ENOMEM;
status = read_boot_mem(serial, 0, 1, temp);
kfree(temp);
if (status)
return status;
}
for (i = 0; i < length; ++i) {
status = ti_vsend_sync(serial->serial->dev, UMPC_MEMORY_WRITE,
buffer[i], (u16)(i + start_address), NULL,
0, TI_VSEND_TIMEOUT_DEFAULT);
if (status)
return status;
}
dev_dbg(&serial->serial->dev->dev, "%s - start_sddr = %x, length = %d\n", __func__, start_address, length);
usb_serial_debug_data(&serial->serial->dev->dev, __func__, length, buffer);
return status;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 149 | 81.87% | 3 | 42.86% |
johan hovold | johan hovold | 25 | 13.74% | 1 | 14.29% |
peter e. berger | peter e. berger | 3 | 1.65% | 1 | 14.29% |
alan cox | alan cox | 3 | 1.65% | 1 | 14.29% |
harvey harrison | harvey harrison | 2 | 1.10% | 1 | 14.29% |
| Total | 182 | 100.00% | 7 | 100.00% |
/* Write edgeport I2C memory to TI chip */
static int write_i2c_mem(struct edgeport_serial *serial,
int start_address, int length, __u8 address_type, __u8 *buffer)
{
struct device *dev = &serial->serial->dev->dev;
int status = 0;
int write_length;
u16 be_start_address;
/* We can only send a maximum of 1 aligned byte page at a time */
/* calculate the number of bytes left in the first page */
write_length = EPROM_PAGE_SIZE -
(start_address & (EPROM_PAGE_SIZE - 1));
if (write_length > length)
write_length = length;
dev_dbg(dev, "%s - BytesInFirstPage Addr = %x, length = %d\n",
__func__, start_address, write_length);
usb_serial_debug_data(dev, __func__, write_length, buffer);
/*
* Write first page.
*
* NOTE: Must use swab as wIndex is sent in little-endian byte order
* regardless of host byte order.
*/
be_start_address = swab16((u16)start_address);
status = ti_vsend_sync(serial->serial->dev, UMPC_MEMORY_WRITE,
(u16)address_type, be_start_address,
buffer, write_length, TI_VSEND_TIMEOUT_DEFAULT);
if (status) {
dev_dbg(dev, "%s - ERROR %d\n", __func__, status);
return status;
}
length -= write_length;
start_address += write_length;
buffer += write_length;
/*
* We should be aligned now -- can write max page size bytes at a
* time.
*/
while (length) {
if (length > EPROM_PAGE_SIZE)
write_length = EPROM_PAGE_SIZE;
else
write_length = length;
dev_dbg(dev, "%s - Page Write Addr = %x, length = %d\n",
__func__, start_address, write_length);
usb_serial_debug_data(dev, __func__, write_length, buffer);
/*
* Write next page.
*
* NOTE: Must use swab as wIndex is sent in little-endian byte
* order regardless of host byte order.
*/
be_start_address = swab16((u16)start_address);
status = ti_vsend_sync(serial->serial->dev, UMPC_MEMORY_WRITE,
(u16)address_type, be_start_address, buffer,
write_length, TI_VSEND_TIMEOUT_DEFAULT);
if (status) {
dev_err(dev, "%s - ERROR %d\n", __func__, status);
return status;
}
length -= write_length;
start_address += write_length;
buffer += write_length;
}
return status;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 254 | 88.81% | 3 | 30.00% |
johan hovold | johan hovold | 11 | 3.85% | 1 | 10.00% |
peter e. berger | peter e. berger | 7 | 2.45% | 2 | 20.00% |
harvey harrison | harvey harrison | 6 | 2.10% | 1 | 10.00% |
al borchers | al borchers | 4 | 1.40% | 1 | 10.00% |
alan cox | alan cox | 3 | 1.05% | 1 | 10.00% |
lucas de marchi | lucas de marchi | 1 | 0.35% | 1 | 10.00% |
| Total | 286 | 100.00% | 10 | 100.00% |
/*
* Examine the UMP DMA registers and LSR
*
* Check the MSBit of the X and Y DMA byte count registers.
* A zero in this bit indicates that the TX DMA buffers are empty
* then check the TX Empty bit in the UART.
*/
static int tx_active(struct edgeport_port *port)
{
int status;
struct out_endpoint_desc_block *oedb;
__u8 *lsr;
int bytes_left = 0;
oedb = kmalloc(sizeof(*oedb), GFP_KERNEL);
if (!oedb)
return -ENOMEM;
/*
* Sigh, that's right, just one byte, as not all platforms can
* do DMA from stack
*/
lsr = kmalloc(1, GFP_KERNEL);
if (!lsr) {
kfree(oedb);
return -ENOMEM;
}
/* Read the DMA Count Registers */
status = read_ram(port->port->serial->dev, port->dma_address,
sizeof(*oedb), (void *)oedb);
if (status)
goto exit_is_tx_active;
dev_dbg(&port->port->dev, "%s - XByteCount 0x%X\n", __func__, oedb->XByteCount);
/* and the LSR */
status = read_ram(port->port->serial->dev,
port->uart_base + UMPMEM_OFFS_UART_LSR, 1, lsr);
if (status)
goto exit_is_tx_active;
dev_dbg(&port->port->dev, "%s - LSR = 0x%X\n", __func__, *lsr);
/* If either buffer has data or we are transmitting then return TRUE */
if ((oedb->XByteCount & 0x80) != 0)
bytes_left += 64;
if ((*lsr & UMP_UART_LSR_TX_MASK) == 0)
bytes_left += 1;
/* We return Not Active if we get any kind of error */
exit_is_tx_active:
dev_dbg(&port->port->dev, "%s - return %d\n", __func__, bytes_left);
kfree(lsr);
kfree(oedb);
return bytes_left;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 200 | 82.30% | 3 | 42.86% |
oleg drokin | oleg drokin | 36 | 14.81% | 1 | 14.29% |
alan cox | alan cox | 3 | 1.23% | 1 | 14.29% |
harvey harrison | harvey harrison | 3 | 1.23% | 1 | 14.29% |
peter e. berger | peter e. berger | 1 | 0.41% | 1 | 14.29% |
| Total | 243 | 100.00% | 7 | 100.00% |
static int choose_config(struct usb_device *dev)
{
/*
* There may be multiple configurations on this device, in which case
* we would need to read and parse all of them to find out which one
* we want. However, we just support one config at this point,
* configuration # 1, which is Config Descriptor 0.
*/
dev_dbg(&dev->dev, "%s - Number of Interfaces = %d\n",
__func__, dev->config->desc.bNumInterfaces);
dev_dbg(&dev->dev, "%s - MAX Power = %d\n",
__func__, dev->config->desc.bMaxPower * 2);
if (dev->config->desc.bNumInterfaces != 1) {
dev_err(&dev->dev, "%s - bNumInterfaces is not 1, ERROR!\n", __func__);
return -ENODEV;
}
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 82 | 94.25% | 5 | 71.43% |
harvey harrison | harvey harrison | 3 | 3.45% | 1 | 14.29% |
alan cox | alan cox | 2 | 2.30% | 1 | 14.29% |
| Total | 87 | 100.00% | 7 | 100.00% |
static int read_rom(struct edgeport_serial *serial,
int start_address, int length, __u8 *buffer)
{
int status;
if (serial->product_info.TiMode == TI_MODE_DOWNLOAD) {
status = read_download_mem(serial->serial->dev,
start_address,
length,
serial->TI_I2C_Type,
buffer);
} else {
status = read_boot_mem(serial, start_address, length,
buffer);
}
return status;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 73 | 96.05% | 2 | 66.67% |
alan cox | alan cox | 3 | 3.95% | 1 | 33.33% |
| Total | 76 | 100.00% | 3 | 100.00% |
static int write_rom(struct edgeport_serial *serial, int start_address,
int length, __u8 *buffer)
{
if (serial->product_info.TiMode == TI_MODE_BOOT)
return write_boot_mem(serial, start_address, length,
buffer);
if (serial->product_info.TiMode == TI_MODE_DOWNLOAD)
return write_i2c_mem(serial, start_address, length,
serial->TI_I2C_Type, buffer);
return -EINVAL;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 70 | 95.89% | 2 | 66.67% |
alan cox | alan cox | 3 | 4.11% | 1 | 33.33% |
| Total | 73 | 100.00% | 3 | 100.00% |
/* Read a descriptor header from I2C based on type */
static int get_descriptor_addr(struct edgeport_serial *serial,
int desc_type, struct ti_i2c_desc *rom_desc)
{
int start_address;
int status;
/* Search for requested descriptor in I2C */
start_address = 2;
do {
status = read_rom(serial,
start_address,
sizeof(struct ti_i2c_desc),
(__u8 *)rom_desc);
if (status)
return 0;
if (rom_desc->Type == desc_type)
return start_address;
start_address = start_address + sizeof(struct ti_i2c_desc) +
le16_to_cpu(rom_desc->Size);
} while ((start_address < TI_MAX_I2C_SIZE) && rom_desc->Type);
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 100 | 95.24% | 1 | 33.33% |
johan hovold | johan hovold | 3 | 2.86% | 1 | 33.33% |
alan cox | alan cox | 2 | 1.90% | 1 | 33.33% |
| Total | 105 | 100.00% | 3 | 100.00% |
/* Validate descriptor checksum */
static int valid_csum(struct ti_i2c_desc *rom_desc, __u8 *buffer)
{
__u16 i;
__u8 cs = 0;
for (i = 0; i < le16_to_cpu(rom_desc->Size); i++)
cs = (__u8)(cs + buffer[i]);
if (cs != rom_desc->CheckSum) {
pr_debug("%s - Mismatch %x - %x", __func__, rom_desc->CheckSum, cs);
return -EINVAL;
}
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 80 | 94.12% | 2 | 40.00% |
johan hovold | johan hovold | 3 | 3.53% | 1 | 20.00% |
harvey harrison | harvey harrison | 1 | 1.18% | 1 | 20.00% |
alan cox | alan cox | 1 | 1.18% | 1 | 20.00% |
| Total | 85 | 100.00% | 5 | 100.00% |
/* Make sure that the I2C image is good */
static int check_i2c_image(struct edgeport_serial *serial)
{
struct device *dev = &serial->serial->dev->dev;
int status = 0;
struct ti_i2c_desc *rom_desc;
int start_address = 2;
__u8 *buffer;
__u16 ttype;
rom_desc = kmalloc(sizeof(*rom_desc), GFP_KERNEL);
if (!rom_desc)
return -ENOMEM;
buffer = kmalloc(TI_MAX_I2C_SIZE, GFP_KERNEL);
if (!buffer) {
kfree(rom_desc);
return -ENOMEM;
}
/* Read the first byte (Signature0) must be 0x52 or 0x10 */
status = read_rom(serial, 0, 1, buffer);
if (status)
goto out;
if (*buffer != UMP5152 && *buffer != UMP3410) {
dev_err(dev, "%s - invalid buffer signature\n", __func__);
status = -ENODEV;
goto out;
}
do {
/* Validate the I2C */
status = read_rom(serial,
start_address,
sizeof(struct ti_i2c_desc),
(__u8 *)rom_desc);
if (status)
break;
if ((start_address + sizeof(struct ti_i2c_desc) +
le16_to_cpu(rom_desc->Size)) > TI_MAX_I2C_SIZE) {
status = -ENODEV;
dev_dbg(dev, "%s - structure too big, erroring out.\n", __func__);
break;
}
dev_dbg(dev, "%s Type = 0x%x\n", __func__, rom_desc->Type);
/* Skip type 2 record */
ttype = rom_desc->Type & 0x0f;
if (ttype != I2C_DESC_TYPE_FIRMWARE_BASIC
&& ttype != I2C_DESC_TYPE_FIRMWARE_AUTO) {
/* Read the descriptor data */
status = read_rom(serial, start_address +
sizeof(struct ti_i2c_desc),
le16_to_cpu(rom_desc->Size),
buffer);
if (status)
break;
status = valid_csum(rom_desc, buffer);
if (status)
break;
}
start_address = start_address + sizeof(struct ti_i2c_desc) +
le16_to_cpu(rom_desc->Size);
} while ((rom_desc->Type != I2C_DESC_TYPE_ION) &&
(start_address < TI_MAX_I2C_SIZE));
if ((rom_desc->Type != I2C_DESC_TYPE_ION) ||
(start_address > TI_MAX_I2C_SIZE))
status = -ENODEV;
out:
kfree(buffer);
kfree(rom_desc);
return status;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 319 | 88.12% | 3 | 42.86% |
al borchers | al borchers | 19 | 5.25% | 1 | 14.29% |
alan cox | alan cox | 12 | 3.31% | 1 | 14.29% |
johan hovold | johan hovold | 9 | 2.49% | 1 | 14.29% |
harvey harrison | harvey harrison | 3 | 0.83% | 1 | 14.29% |
| Total | 362 | 100.00% | 7 | 100.00% |
static int get_manuf_info(struct edgeport_serial *serial, __u8 *buffer)
{
int status;
int start_address;
struct ti_i2c_desc *rom_desc;
struct edge_ti_manuf_descriptor *desc;
struct device *dev = &serial->serial->dev->dev;
rom_desc = kmalloc(sizeof(*rom_desc), GFP_KERNEL);
if (!rom_desc)
return -ENOMEM;
start_address = get_descriptor_addr(serial, I2C_DESC_TYPE_ION,
rom_desc);
if (!start_address) {
dev_dbg(dev, "%s - Edge Descriptor not found in I2C\n", __func__);
status = -ENODEV;
goto exit;
}
/* Read the descriptor data */
status = read_rom(serial, start_address+sizeof(struct ti_i2c_desc),
le16_to_cpu(rom_desc->Size), buffer);
if (status)
goto exit;
status = valid_csum(rom_desc, buffer);
desc = (struct edge_ti_manuf_descriptor *)buffer;
dev_dbg(dev, "%s - IonConfig 0x%x\n", __func__, desc->IonConfig);
dev_dbg(dev, "%s - Version %d\n", __func__, desc->Version);
dev_dbg(dev, "%s - Cpu/Board 0x%x\n", __func__, desc->CpuRev_BoardRev);
dev_dbg(dev, "%s - NumPorts %d\n", __func__, desc->NumPorts);
dev_dbg(dev, "%s - NumVirtualPorts %d\n", __func__, desc->NumVirtualPorts);
dev_dbg(dev, "%s - TotalPorts %d\n", __func__, desc->TotalPorts);
exit:
kfree(rom_desc);
return status;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 225 | 93.75% | 2 | 40.00% |
harvey harrison | harvey harrison | 7 | 2.92% | 1 | 20.00% |
alan cox | alan cox | 5 | 2.08% | 1 | 20.00% |
johan hovold | johan hovold | 3 | 1.25% | 1 | 20.00% |
| Total | 240 | 100.00% | 5 | 100.00% |
/* Build firmware header used for firmware update */
static int build_i2c_fw_hdr(u8 *header, const struct firmware *fw)
{
__u8 *buffer;
int buffer_size;
int i;
__u8 cs = 0;
struct ti_i2c_desc *i2c_header;
struct ti_i2c_image_header *img_header;
struct ti_i2c_firmware_rec *firmware_rec;
struct edgeport_fw_hdr *fw_hdr = (struct edgeport_fw_hdr *)fw->data;
/*
* In order to update the I2C firmware we must change the type 2 record
* to type 0xF2. This will force the UMP to come up in Boot Mode.
* Then while in boot mode, the driver will download the latest
* firmware (padded to 15.5k) into the UMP ram. And finally when the
* device comes back up in download mode the driver will cause the new
* firmware to be copied from the UMP Ram to I2C and the firmware will
* update the record type from 0xf2 to 0x02.
*/
/*
* Allocate a 15.5k buffer + 2 bytes for version number (Firmware
* Record)
*/
buffer_size = (((1024 * 16) - 512 ) +
sizeof(struct ti_i2c_firmware_rec));
buffer = kmalloc(buffer_size, GFP_KERNEL);
if (!buffer)
return -ENOMEM;
/* Set entire image of 0xffs */
memset(buffer, 0xff, buffer_size);
/* Copy version number into firmware record */
firmware_rec = (struct ti_i2c_firmware_rec *)buffer;
firmware_rec->Ver_Major = fw_hdr->major_version;
firmware_rec->Ver_Minor = fw_hdr->minor_version;
/* Pointer to fw_down memory image */
img_header = (struct ti_i2c_image_header *)&fw->data[4];
memcpy(buffer + sizeof(struct ti_i2c_firmware_rec),
&fw->data[4 + sizeof(struct ti_i2c_image_header)],
le16_to_cpu(img_header->Length));
for (i=0; i < buffer_size; i++) {
cs = (__u8)(cs + buffer[i]);
}
kfree(buffer);
/* Build new header */
i2c_header = (struct ti_i2c_desc *)header;
firmware_rec = (struct ti_i2c_firmware_rec*)i2c_header->Data;
i2c_header->Type = I2C_DESC_TYPE_FIRMWARE_BLANK;
i2c_header->Size = cpu_to_le16(buffer_size);
i2c_header->CheckSum = cs;
firmware_rec->Ver_Major = fw_hdr->major_version;
firmware_rec->Ver_Minor = fw_hdr->minor_version;
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 225 | 80.65% | 2 | 25.00% |
peter e. berger | peter e. berger | 31 | 11.11% | 2 | 25.00% |
jaswinder singh rajput | jaswinder singh rajput | 13 | 4.66% | 1 | 12.50% |
alan cox | alan cox | 4 | 1.43% | 1 | 12.50% |
al borchers | al borchers | 3 | 1.08% | 1 | 12.50% |
johan hovold | johan hovold | 3 | 1.08% | 1 | 12.50% |
| Total | 279 | 100.00% | 8 | 100.00% |
/* Try to figure out what type of I2c we have */
static int i2c_type_bootmode(struct edgeport_serial *serial)
{
struct device *dev = &serial->serial->dev->dev;
int status;
u8 *data;
data = kmalloc(1, GFP_KERNEL);
if (!data)
return -ENOMEM;
/* Try to read type 2 */
status = ti_vread_sync(serial->serial->dev, UMPC_MEMORY_READ,
DTK_ADDR_SPACE_I2C_TYPE_II, 0, data, 0x01);
if (status)
dev_dbg(dev, "%s - read 2 status error = %d\n", __func__, status);
else
dev_dbg(dev, "%s - read 2 data = 0x%x\n", __func__, *data);
if ((!status) && (*data == UMP5152 || *data == UMP3410)) {
dev_dbg(dev, "%s - ROM_TYPE_II\n", __func__);
serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II;
goto out;
}
/* Try to read type 3 */
status = ti_vread_sync(serial->serial->dev, UMPC_MEMORY_READ,
DTK_ADDR_SPACE_I2C_TYPE_III, 0, data, 0x01);
if (status)
dev_dbg(dev, "%s - read 3 status error = %d\n", __func__, status);
else
dev_dbg(dev, "%s - read 2 data = 0x%x\n", __func__, *data);
if ((!status) && (*data == UMP5152 || *data == UMP3410)) {
dev_dbg(dev, "%s - ROM_TYPE_III\n", __func__);
serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_III;
goto out;
}
dev_dbg(dev, "%s - Unknown\n", __func__);
serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II;
status = -ENODEV;
out:
kfree(data);
return status;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 188 | 72.87% | 2 | 33.33% |
johan hovold | johan hovold | 44 | 17.05% | 1 | 16.67% |
al borchers | al borchers | 14 | 5.43% | 1 | 16.67% |
harvey harrison | harvey harrison | 7 | 2.71% | 1 | 16.67% |
alan cox | alan cox | 5 | 1.94% | 1 | 16.67% |
| Total | 258 | 100.00% | 6 | 100.00% |
static int bulk_xfer(struct usb_serial *serial, void *buffer,
int length, int *num_sent)
{
int status;
status = usb_bulk_msg(serial->dev,
usb_sndbulkpipe(serial->dev,
serial->port[0]->bulk_out_endpointAddress),
buffer, length, num_sent, 1000);
return status;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 59 | 96.72% | 2 | 50.00% |
alan cox | alan cox | 1 | 1.64% | 1 | 25.00% |
nishanth aravamudan | nishanth aravamudan | 1 | 1.64% | 1 | 25.00% |
| Total | 61 | 100.00% | 4 | 100.00% |
/* Download given firmware image to the device (IN BOOT MODE) */
static int download_code(struct edgeport_serial *serial, __u8 *image,
int image_length)
{
int status = 0;
int pos;
int transfer;
int done;
/* Transfer firmware image */
for (pos = 0; pos < image_length; ) {
/* Read the next buffer from file */
transfer = image_length - pos;
if (transfer > EDGE_FW_BULK_MAX_PACKET_SIZE)
transfer = EDGE_FW_BULK_MAX_PACKET_SIZE;
/* Transfer data */
status = bulk_xfer(serial->serial, &image[pos],
transfer, &done);
if (status)
break;
/* Advance buffer pointer */
pos += done;
}
return status;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 91 | 93.81% | 1 | 50.00% |
alan cox | alan cox | 6 | 6.19% | 1 | 50.00% |
| Total | 97 | 100.00% | 2 | 100.00% |
/* FIXME!!! */
static int config_boot_dev(struct usb_device *dev)
{
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 13 | 92.86% | 1 | 50.00% |
alan cox | alan cox | 1 | 7.14% | 1 | 50.00% |
| Total | 14 | 100.00% | 2 | 100.00% |
static int ti_cpu_rev(struct edge_ti_manuf_descriptor *desc)
{
return TI_GET_CPU_REVISION(desc->CpuRev_BoardRev);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
alan cox | alan cox | 19 | 100.00% | 1 | 100.00% |
| Total | 19 | 100.00% | 1 | 100.00% |
static int check_fw_sanity(struct edgeport_serial *serial,
const struct firmware *fw)
{
u16 length_total;
u8 checksum = 0;
int pos;
struct device *dev = &serial->serial->interface->dev;
struct edgeport_fw_hdr *fw_hdr = (struct edgeport_fw_hdr *)fw->data;
if (fw->size < sizeof(struct edgeport_fw_hdr)) {
dev_err(dev, "incomplete fw header\n");
return -EINVAL;
}
length_total = le16_to_cpu(fw_hdr->length) +
sizeof(struct edgeport_fw_hdr);
if (fw->size != length_total) {
dev_err(dev, "bad fw size (expected: %u, got: %zu)\n",
length_total, fw->size);
return -EINVAL;
}
for (pos = sizeof(struct edgeport_fw_hdr); pos < fw->size; ++pos)
checksum += fw->data[pos];
if (checksum != fw_hdr->checksum) {
dev_err(dev, "bad fw checksum (expected: 0x%x, got: 0x%x)\n",
fw_hdr->checksum, checksum);
return -EINVAL;
}
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
peter e. berger | peter e. berger | 181 | 100.00% | 1 | 100.00% |
| Total | 181 | 100.00% | 1 | 100.00% |
/*
* DownloadTIFirmware - Download run-time operating firmware to the TI5052
*
* This routine downloads the main operating code into the TI5052, using the
* boot code already burned into E2PROM or ROM.
*/
static int download_fw(struct edgeport_serial *serial)
{
struct device *dev = &serial->serial->interface->dev;
int status = 0;
struct usb_interface_descriptor *interface;
const struct firmware *fw;
const char *fw_name = "edgeport/down3.bin";
struct edgeport_fw_hdr *fw_hdr;
status = request_firmware(&fw, fw_name, dev);
if (status) {
dev_err(dev, "Failed to load image \"%s\" err %d\n",
fw_name, status);
return status;
}
if (check_fw_sanity(serial, fw)) {
status = -EINVAL;
goto out;
}
fw_hdr = (struct edgeport_fw_hdr *)fw->data;
/* If on-board version is newer, "fw_version" will be updated later. */
serial->fw_version = (fw_hdr->major_version << 8) +
fw_hdr->minor_version;
/*
* This routine is entered by both the BOOT mode and the Download mode
* We can determine which code is running by the reading the config
* descriptor and if we have only one bulk pipe it is in boot mode
*/
serial->product_info.hardware_type = HARDWARE_TYPE_TIUMP;
/* Default to type 2 i2c */
serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II;
status = choose_config(serial->serial->dev);
if (status)
goto out;
interface = &serial->serial->interface->cur_altsetting->desc;
if (!interface) {
dev_err(dev, "%s - no interface set, error!\n", __func__);
status = -ENODEV;
goto out;
}
/*
* Setup initial mode -- the default mode 0 is TI_MODE_CONFIGURING
* if we have more than one endpoint we are definitely in download
* mode
*/
if (interface->bNumEndpoints > 1) {
serial->product_info.TiMode = TI_MODE_DOWNLOAD;
status = do_download_mode(serial, fw);
} else {
/* Otherwise we will remain in configuring mode */
serial->product_info.TiMode = TI_MODE_CONFIGURING;
status = do_boot_mode(serial, fw);
}
out:
release_firmware(fw);
return status;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
peter e. berger | peter e. berger | 141 | 53.82% | 6 | 46.15% |
greg kroah-hartman | greg kroah-hartman | 114 | 43.51% | 3 | 23.08% |
alan cox | alan cox | 4 | 1.53% | 1 | 7.69% |
al borchers | al borchers | 1 | 0.38% | 1 | 7.69% |
harvey harrison | harvey harrison | 1 | 0.38% | 1 | 7.69% |
alan stern | alan stern | 1 | 0.38% | 1 | 7.69% |
| Total | 262 | 100.00% | 13 | 100.00% |
static int do_download_mode(struct edgeport_serial *serial,
const struct firmware *fw)
{
struct device *dev = &serial->serial->interface->dev;
int status = 0;
int start_address;
struct edge_ti_manuf_descriptor *ti_manuf_desc;
int download_cur_ver;
int download_new_ver;
struct edgeport_fw_hdr *fw_hdr = (struct edgeport_fw_hdr *)fw->data;
struct ti_i2c_desc *rom_desc;
dev_dbg(dev, "%s - RUNNING IN DOWNLOAD MODE\n", __func__);
status = check_i2c_image(serial);
if (status) {
dev_dbg(dev, "%s - DOWNLOAD MODE -- BAD I2C\n", __func__);
return status;
}
/*
* Validate Hardware version number
* Read Manufacturing Descriptor from TI Based Edgeport
*/
ti_manuf_desc = kmalloc(sizeof(*ti_manuf_desc), GFP_KERNEL);
if (!ti_manuf_desc)
return -ENOMEM;
status = get_manuf_info(serial, (__u8 *)ti_manuf_desc);
if (status) {
kfree(ti_manuf_desc);
return status;
}
/* Check version number of ION descriptor */
if (!ignore_cpu_rev && ti_cpu_rev(ti_manuf_desc) < 2) {
dev_dbg(dev, "%s - Wrong CPU Rev %d (Must be 2)\n",
__func__, ti_cpu_rev(ti_manuf_desc));
kfree(ti_manuf_desc);
return -EINVAL;
}
rom_desc = kmalloc(sizeof(*rom_desc), GFP_KERNEL);
if (!rom_desc) {
kfree(ti_manuf_desc);
return -ENOMEM;
}
/* Search for type 2 record (firmware record) */
start_address = get_descriptor_addr(serial,
I2C_DESC_TYPE_FIRMWARE_BASIC, rom_desc);
if (start_address != 0) {
struct ti_i2c_firmware_rec *firmware_version;
u8 *record;
dev_dbg(dev, "%s - Found Type FIRMWARE (Type 2) record\n",
__func__);
firmware_version = kmalloc(sizeof(*firmware_version),
GFP_KERNEL);
if (!firmware_version) {
kfree(rom_desc);
kfree(ti_manuf_desc);
return -ENOMEM;
}
/*
* Validate version number
* Read the descriptor data
*/
status = read_rom(serial, start_address +
sizeof(struct ti_i2c_desc),
sizeof(struct ti_i2c_firmware_rec),
(__u8 *)firmware_version);
if (status) {
kfree(firmware_version);
kfree(rom_desc);
kfree(ti_manuf_desc);
return status;
}
/*
* Check version number of download with current
* version in I2c
*/
download_cur_ver = (firmware_version->Ver_Major << 8) +
(firmware_version->Ver_Minor);
download_new_ver = (fw_hdr->major_version << 8) +
(fw_hdr->minor_version);
dev_dbg(dev, "%s - >> FW Versions Device %d.%d Driver %d.%d\n",
__func__, firmware_version->Ver_Major,
firmware_version->Ver_Minor,
fw_hdr->major_version, fw_hdr->minor_version);
/*
* Check if we have an old version in the I2C and
* update if necessary
*/
if (download_cur_ver < download_new_ver) {
dev_dbg(dev, "%s - Update I2C dld from %d.%d to %d.%d\n",
__func__,
firmware_version->Ver_Major,
firmware_version->Ver_Minor,
fw_hdr->major_version,
fw_hdr->minor_version);
record = kmalloc(1, GFP_KERNEL);
if (!record) {
kfree(firmware_version);
kfree(rom_desc);
kfree(ti_manuf_desc);
return -ENOMEM;
}
/*
* In order to update the I2C firmware we must
* change the type 2 record to type 0xF2. This
* will force the UMP to come up in Boot Mode.
* Then while in boot mode, the driver will
* download the latest firmware (padded to
* 15.5k) into the UMP ram. Finally when the
* device comes back up in download mode the
* driver will cause the new firmware to be
* copied from the UMP Ram to I2C and the
* firmware will update the record type from
* 0xf2 to 0x02.
*/
*record = I2C_DESC_TYPE_FIRMWARE_BLANK;
/*
* Change the I2C Firmware record type to
* 0xf2 to trigger an update
*/
status = write_rom(serial, start_address,
sizeof(*record), record);
if (status) {
kfree(record);
kfree(firmware_version);
kfree(rom_desc);
kfree(ti_manuf_desc);
return status;
}
/*
* verify the write -- must do this in order
* for write to complete before we do the
* hardware reset
*/
status = read_rom(serial,
start_address,
sizeof(*record),
record);
if (status) {
kfree(record);
kfree(firmware_version);
kfree(rom_desc);
kfree(ti_manuf_desc);
return status;
}
if (*record != I2C_DESC_TYPE_FIRMWARE_BLANK) {
dev_err(dev, "%s - error resetting device\n",
__func__);
kfree(record);
kfree(firmware_version);
kfree(rom_desc);
kfree(ti_manuf_desc);
return -ENODEV;
}
dev_dbg(dev, "%s - HARDWARE RESET\n", __func__);
/* Reset UMP -- Back to BOOT MODE */
status = ti_vsend_sync(serial->serial->dev,
UMPC_HARDWARE_RESET,
0, 0, NULL, 0,
TI_VSEND_TIMEOUT_DEFAULT);
dev_dbg(dev, "%s - HARDWARE RESET return %d\n",
__func__, status);
/* return an error on purpose. */
kfree(record);
kfree(firmware_version);
kfree(rom_desc);
kfree(ti_manuf_desc);
return -ENODEV;
}
/* Same or newer fw version is already loaded */
serial->fw_version = download_cur_ver;
kfree(firmware_version);
}
/* Search for type 0xF2 record (firmware blank record) */
else {
start_address = get_descriptor_addr(serial,
I2C_DESC_TYPE_FIRMWARE_BLANK, rom_desc);
if (start_address != 0) {
#define HEADER_SIZE (sizeof(struct ti_i2c_desc) + \
sizeof(struct ti_i2c_firmware_rec))
__u8 *header;
__u8 *vheader;
header = kmalloc(HEADER_SIZE, GFP_KERNEL);
if (!header) {
kfree(rom_desc);
kfree(ti_manuf_desc);
return -ENOMEM;
}
vheader = kmalloc(HEADER_SIZE, GFP_KERNEL);
if (!vheader) {
kfree(header);
kfree(rom_desc);
kfree(ti_manuf_desc);
return -ENOMEM;
}
dev_dbg(dev, "%s - Found Type BLANK FIRMWARE (Type F2) record\n",
__func__);
/*
* In order to update the I2C firmware we must change
* the type 2 record to type 0xF2. This will force the
* UMP to come up in Boot Mode. Then while in boot
* mode, the driver will download the latest firmware
* (padded to 15.5k) into the UMP ram. Finally when the
* device comes back up in download mode the driver
* will cause the new firmware to be copied from the
* UMP Ram to I2C and the firmware will update the
* record type from 0xf2 to 0x02.
*/
status = build_i2c_fw_hdr(header, fw);
if (status) {
kfree(vheader);
kfree(header);
kfree(rom_desc);
kfree(ti_manuf_desc);
return -EINVAL;
}
/*
* Update I2C with type 0xf2 record with correct
* size and checksum
*/
status = write_rom(serial,
start_address,
HEADER_SIZE,
header);
if (status) {
kfree(vheader);
kfree(header);
kfree(rom_desc);
kfree(ti_manuf_desc);
return -EINVAL;
}
/*
* verify the write -- must do this in order for
* write to complete before we do the hardware reset
*/
status = read_rom(serial, start_address,
HEADER_SIZE, vheader);
if (status) {
dev_dbg(dev, "%s - can't read header back\n",
__func__);
kfree(vheader);
kfree(header);
kfree(rom_desc);
kfree(ti_manuf_desc);
return status;
}
if (memcmp(vheader, header, HEADER_SIZE)) {
dev_dbg(dev, "%s - write download record failed\n",
__func__);
kfree(vheader);
kfree(header);
kfree(rom_desc);
kfree(ti_manuf_desc);
return -EINVAL;
}
kfree(vheader);
kfree(header);
dev_dbg(dev, "%s - Start firmware update\n", __func__);
/* Tell firmware to copy download image into I2C */
status = ti_vsend_sync(serial->serial->dev,
UMPC_COPY_DNLD_TO_I2C,
0, 0, NULL, 0,
TI_VSEND_TIMEOUT_FW_DOWNLOAD);
dev_dbg(dev, "%s - Update complete 0x%x\n", __func__,
status);
if (status) {
dev_err(dev,
"%s - UMPC_COPY_DNLD_TO_I2C failed\n",
__func__);
kfree(rom_desc);
kfree(ti_manuf_desc);
return status;
}
}
}
/* The device is running the download code */
kfree(rom_desc);
kfree(ti_manuf_desc);
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 841 | 77.80% | 4 | 23.53% |
peter e. berger | peter e. berger | 110 | 10.18% | 4 | 23.53% |
johan hovold | johan hovold | 61 | 5.64% | 1 | 5.88% |
alan cox | alan cox | 24 | 2.22% | 1 | 5.88% |
oleg drokin | oleg drokin | 20 | 1.85% | 1 | 5.88% |
harvey harrison | harvey harrison | 13 | 1.20% | 1 | 5.88% |
roel kluin | roel kluin | 6 | 0.56% | 3 | 17.65% |
al borchers | al borchers | 4 | 0.37% | 1 | 5.88% |
andrew morton | andrew morton | 2 | 0.19% | 1 | 5.88% |
| Total | 1081 | 100.00% | 17 | 100.00% |
static int do_boot_mode(struct edgeport_serial *serial,
const struct firmware *fw)
{
struct device *dev = &serial->serial->interface->dev;
int status = 0;
struct edge_ti_manuf_descriptor *ti_manuf_desc;
struct edgeport_fw_hdr *fw_hdr = (struct edgeport_fw_hdr *)fw->data;
dev_dbg(dev, "%s - RUNNING IN BOOT MODE\n", __func__);
/* Configure the TI device so we can use the BULK pipes for download */
status = config_boot_dev(serial->serial->dev);
if (status)
return status;
if (le16_to_cpu(serial->serial->dev->descriptor.idVendor)
!= USB_VENDOR_ID_ION) {
dev_dbg(dev, "%s - VID = 0x%x\n", __func__,
le16_to_cpu(serial->serial->dev->descriptor.idVendor));
serial->TI_I2C_Type = DTK_ADDR_SPACE_I2C_TYPE_II;
goto stayinbootmode;
}
/*
* We have an ION device (I2c Must be programmed)
* Determine I2C image type
*/
if (i2c_type_bootmode(serial))
goto stayinbootmode;
/* Check for ION Vendor ID and that the I2C is valid */
if (!check_i2c_image(serial)) {
struct ti_i2c_image_header *header;
int i;
__u8 cs = 0;
__u8 *buffer;
int buffer_size;
/*
* Validate Hardware version number
* Read Manufacturing Descriptor from TI Based Edgeport
*/
ti_manuf_desc = kmalloc(sizeof(*ti_manuf_desc), GFP_KERNEL);
if (!ti_manuf_desc)
return -ENOMEM;
status = get_manuf_info(serial, (__u8 *)ti_manuf_desc);
if (status) {
kfree(ti_manuf_desc);
goto stayinbootmode;
}
/* Check for version 2 */
if (!ignore_cpu_rev && ti_cpu_rev(ti_manuf_desc) < 2) {
dev_dbg(dev, "%s - Wrong CPU Rev %d (Must be 2)\n",
__func__, ti_cpu_rev(ti_manuf_desc));
kfree(ti_manuf_desc);
goto stayinbootmode;
}
kfree(ti_manuf_desc);
/*
* In order to update the I2C firmware we must change the type
* 2 record to type 0xF2. This will force the UMP to come up
* in Boot Mode. Then while in boot mode, the driver will
* download the latest firmware (padded to 15.5k) into the
* UMP ram. Finally when the device comes back up in download
* mode the driver will cause the new firmware to be copied
* from the UMP Ram to I2C and the firmware will update the
* record type from 0xf2 to 0x02.
*
* Do we really have to copy the whole firmware image,
* or could we do this in place!
*/
/* Allocate a 15.5k buffer + 3 byte header */
buffer_size = (((1024 * 16) - 512) +
sizeof(struct ti_i2c_image_header));
buffer = kmalloc(buffer_size, GFP_KERNEL);
if (!buffer)
return -ENOMEM;
/* Initialize the buffer to 0xff (pad the buffer) */
memset(buffer, 0xff, buffer_size);
memcpy(buffer, &fw->data[4], fw->size - 4);
for (i = sizeof(struct ti_i2c_image_header);
i < buffer_size; i++) {
cs = (__u8)(cs + buffer[i]);
}
header = (struct ti_i2c_image_header *)buffer;
/* update length and checksum after padding */
header->Length = cpu_to_le16((__u16)(buffer_size -
sizeof(struct ti_i2c_image_header)));
header->CheckSum = cs;
/* Download the operational code */
dev_dbg(dev, "%s - Downloading operational code image version %d.%d (TI UMP)\n",
__func__,
fw_hdr->major_version, fw_hdr->minor_version);
status = download_code(serial, buffer, buffer_size);
kfree(buffer);
if (status) {
dev_dbg(dev, "%s - Error downloading operational code image\n", __func__);
return status;
}
/* Device will reboot */
serial->product_info.TiMode = TI_MODE_TRANSITIONING;
dev_dbg(dev, "%s - Download successful -- Device rebooting...\n", __func__);
/* return an error on purpose */
return -ENODEV;
}
stayinbootmode:
/* Eprom is invalid or blank stay in boot mode */
dev_dbg(dev, "%s - STAYING IN BOOT MODE\n", __func__);
serial->product_info.TiMode = TI_MODE_BOOT;
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 395 | 78.53% | 3 | 27.27% |
peter e. berger | peter e. berger | 65 | 12.92% | 3 | 27.27% |
alan cox | alan cox | 22 | 4.37% | 1 | 9.09% |
jaswinder singh rajput | jaswinder singh rajput | 11 | 2.19% | 1 | 9.09% |
harvey harrison | harvey harrison | 5 | 0.99% | 1 | 9.09% |
al borchers | al borchers | 3 | 0.60% | 1 | 9.09% |
andrew morton | andrew morton | 2 | 0.40% | 1 | 9.09% |
| Total | 503 | 100.00% | 11 | 100.00% |
static int ti_do_config(struct edgeport_port *port, int feature, int on)
{
int port_number = port->port->port_number;
on = !!on; /* 1 or 0 not bitmask */
return send_cmd(port->port->serial->dev,
feature, (__u8)(UMPM_UART1_PORT + port_number),
on, NULL, 0);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 46 | 74.19% | 2 | 66.67% |
alan cox | alan cox | 16 | 25.81% | 1 | 33.33% |
| Total | 62 | 100.00% | 3 | 100.00% |
static int restore_mcr(struct edgeport_port *port, __u8 mcr)
{
int status = 0;
dev_dbg(&port->port->dev, "%s - %x\n", __func__, mcr);
status = ti_do_config(port, UMPC_SET_CLR_DTR, mcr & MCR_DTR);
if (status)
return status;
status = ti_do_config(port, UMPC_SET_CLR_RTS, mcr & MCR_RTS);
if (status)
return status;
return ti_do_config(port, UMPC_SET_CLR_LOOPBACK, mcr & MCR_LOOPBACK);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 51 | 58.62% | 2 | 50.00% |
alan cox | alan cox | 35 | 40.23% | 1 | 25.00% |
harvey harrison | harvey harrison | 1 | 1.15% | 1 | 25.00% |
| Total | 87 | 100.00% | 4 | 100.00% |
/* Convert TI LSR to standard UART flags */
static __u8 map_line_status(__u8 ti_lsr)
{
__u8 lsr = 0;
#define MAP_FLAG(flagUmp, flagUart) \
if (ti_lsr & flagUmp) \
lsr |= flagUart;
MAP_FLAG(UMP_UART_LSR_OV_MASK, LSR_OVER_ERR) /* overrun */
MAP_FLAG(UMP_UART_LSR_PE_MASK, LSR_PAR_ERR) /* parity error */
MAP_FLAG(UMP_UART_LSR_FE_MASK, LSR_FRM_ERR) /* framing error */
MAP_FLAG(UMP_UART_LSR_BR_MASK, LSR_BREAK) /* break detected */
MAP_FLAG(UMP_UART_LSR_RX_MASK, LSR_RX_AVAIL) /* rx data available */
MAP_FLAG(UMP_UART_LSR_TX_MASK, LSR_TX_EMPTY) /* tx hold reg empty */
#undef MAP_FLAG
return lsr;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 68 | 94.44% | 1 | 33.33% |
alan cox | alan cox | 3 | 4.17% | 1 | 33.33% |
francois romieu | francois romieu | 1 | 1.39% | 1 | 33.33% |
| Total | 72 | 100.00% | 3 | 100.00% |
static void handle_new_msr(struct edgeport_port *edge_port, __u8 msr)
{
struct async_icount *icount;
struct tty_struct *tty;
dev_dbg(&edge_port->port->dev, "%s - %02x\n", __func__, msr);
if (msr & (EDGEPORT_MSR_DELTA_CTS | EDGEPORT_MSR_DELTA_DSR |
EDGEPORT_MSR_DELTA_RI | EDGEPORT_MSR_DELTA_CD)) {
icount = &edge_port->port->icount;
/* update input line counters */
if (msr & EDGEPORT_MSR_DELTA_CTS)
icount->cts++;
if (msr & EDGEPORT_MSR_DELTA_DSR)
icount->dsr++;
if (msr & EDGEPORT_MSR_DELTA_CD)
icount->dcd++;
if (msr & EDGEPORT_MSR_DELTA_RI)
icount->rng++;
wake_up_interruptible(&edge_port->port->port.delta_msr_wait);
}
/* Save the new modem status */
edge_port->shadow_msr = msr & 0xf0;
tty = tty_port_tty_get(&edge_port->port->port);
/* handle CTS flow control */
if (tty && C_CRTSCTS(tty)) {
if (msr & EDGEPORT_MSR_CTS)
tty_wakeup(tty);
}
tty_kref_put(tty);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 111 | 64.91% | 2 | 20.00% |
al borchers | al borchers | 35 | 20.47% | 1 | 10.00% |
alan cox | alan cox | 10 | 5.85% | 2 | 20.00% |
olaf hering | olaf hering | 8 | 4.68% | 1 | 10.00% |
johan hovold | johan hovold | 6 | 3.51% | 3 | 30.00% |
harvey harrison | harvey harrison | 1 | 0.58% | 1 | 10.00% |
| Total | 171 | 100.00% | 10 | 100.00% |
static void handle_new_lsr(struct edgeport_port *edge_port, int lsr_data,
__u8 lsr, __u8 data)
{
struct async_icount *icount;
__u8 new_lsr = (__u8)(lsr & (__u8)(LSR_OVER_ERR | LSR_PAR_ERR |
LSR_FRM_ERR | LSR_BREAK));
dev_dbg(&edge_port->port->dev, "%s - %02x\n", __func__, new_lsr);
edge_port->shadow_lsr = lsr;
if (new_lsr & LSR_BREAK)
/*
* Parity and Framing errors only count if they
* occur exclusive of a break being received.
*/
new_lsr &= (__u8)(LSR_OVER_ERR | LSR_BREAK);
/* Place LSR data byte into Rx buffer */
if (lsr_data)
edge_tty_recv(edge_port->port, &data, 1);
/* update input line counters */
icount = &edge_port->port->icount;
if (new_lsr & LSR_BREAK)
icount->brk++;
if (new_lsr & LSR_OVER_ERR)
icount->overrun++;
if (new_lsr & LSR_PAR_ERR)
icount->parity++;
if (new_lsr & LSR_FRM_ERR)
icount->frame++;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 149 | 93.71% | 2 | 33.33% |
al borchers | al borchers | 6 | 3.77% | 1 | 16.67% |
johan hovold | johan hovold | 2 | 1.26% | 1 | 16.67% |
harvey harrison | harvey harrison | 1 | 0.63% | 1 | 16.67% |
alan cox | alan cox | 1 | 0.63% | 1 | 16.67% |
| Total | 159 | 100.00% | 6 | 100.00% |
static void edge_interrupt_callback(struct urb *urb)
{
struct edgeport_serial *edge_serial = urb->context;
struct usb_serial_port *port;
struct edgeport_port *edge_port;
struct device *dev;
unsigned char *data = urb->transfer_buffer;
int length = urb->actual_length;
int port_number;
int function;
int retval;
__u8 lsr;
__u8 msr;
int status = urb->status;
switch (status) {
case 0:
/* success */
break;
case -ECONNRESET:
case -ENOENT:
case -ESHUTDOWN:
/* this urb is terminated, clean up */
dev_dbg(&urb->dev->dev, "%s - urb shutting down with status: %d\n",
__func__, status);
return;
default:
dev_err(&urb->dev->dev, "%s - nonzero urb status received: "
"%d\n", __func__, status);
goto exit;
}
if (!length) {
dev_dbg(&urb->dev->dev, "%s - no data in urb\n", __func__);
goto exit;
}
dev = &edge_serial->serial->dev->dev;
usb_serial_debug_data(dev, __func__, length, data);
if (length != 2) {
dev_dbg(dev, "%s - expecting packet of size 2, got %d\n", __func__, length);
goto exit;
}
port_number = TIUMP_GET_PORT_FROM_CODE(data[0]);
function = TIUMP_GET_FUNC_FROM_CODE(data[0]);
dev_dbg(dev, "%s - port_number %d, function %d, info 0x%x\n", __func__,
port_number, function, data[1]);
port = edge_serial->serial->port[port_number];
edge_port = usb_get_serial_port_data(port);
if (!edge_port) {
dev_dbg(dev, "%s - edge_port not found\n", __func__);
return;
}
switch (function) {
case TIUMP_INTERRUPT_CODE_LSR:
lsr = map_line_status(data[1]);
if (lsr & UMP_UART_LSR_DATA_MASK) {
/*
* Save the LSR event for bulk read completion routine
*/
dev_dbg(dev, "%s - LSR Event Port %u LSR Status = %02x\n",
__func__, port_number, lsr);
edge_port->lsr_event = 1;
edge_port->lsr_mask = lsr;
} else {
dev_dbg(dev, "%s - ===== Port %d LSR Status = %02x ======\n",
__func__, port_number, lsr);
handle_new_lsr(edge_port, 0, lsr, 0);
}
break;
case TIUMP_INTERRUPT_CODE_MSR: /* MSR */
/* Copy MSR from UMP */
msr = data[1];
dev_dbg(dev, "%s - ===== Port %u MSR Status = %02x ======\n",
__func__, port_number, msr);
handle_new_msr(edge_port, msr);
break;
default:
dev_err(&urb->dev->dev,
"%s - Unknown Interrupt code from UMP %x\n",
__func__, data[1]);
break;
}
exit:
retval = usb_submit_urb(urb, GFP_ATOMIC);
if (retval)
dev_err(&urb->dev->dev,
"%s - usb_submit_urb failed with result %d\n",
__func__, retval);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 419 | 94.80% | 9 | 69.23% |
harvey harrison | harvey harrison | 12 | 2.71% | 1 | 7.69% |
al borchers | al borchers | 8 | 1.81% | 1 | 7.69% |
alan cox | alan cox | 2 | 0.45% | 1 | 7.69% |
peter e. berger | peter e. berger | 1 | 0.23% | 1 | 7.69% |
| Total | 442 | 100.00% | 13 | 100.00% |
static void edge_bulk_in_callback(struct urb *urb)
{
struct edgeport_port *edge_port = urb->context;
struct device *dev = &edge_port->port->dev;
unsigned char *data = urb->transfer_buffer;
int retval = 0;
int port_number;
int status = urb->status;
switch (status) {
case 0:
/* success */
break;
case -ECONNRESET:
case -ENOENT:
case -ESHUTDOWN:
/* this urb is terminated, clean up */
dev_dbg(&urb->dev->dev, "%s - urb shutting down with status: %d\n", __func__, status);
return;
default:
dev_err(&urb->dev->dev, "%s - nonzero read bulk status received: %d\n", __func__, status);
}
if (status == -EPIPE)
goto exit;
if (status) {
dev_err(&urb->dev->dev, "%s - stopping read!\n", __func__);
return;
}
port_number = edge_port->port->port_number;
if (edge_port->lsr_event) {
edge_port->lsr_event = 0;
dev_dbg(dev, "%s ===== Port %u LSR Status = %02x, Data = %02x ======\n",
__func__, port_number, edge_port->lsr_mask, *data);
handle_new_lsr(edge_port, 1, edge_port->lsr_mask, *data);
/* Adjust buffer length/pointer */
--urb->actual_length;
++data;
}
if (urb->actual_length) {
usb_serial_debug_data(dev, __func__, urb->actual_length, data);
if (edge_port->close_pending)
dev_dbg(dev, "%s - close pending, dropping data on the floor\n",
__func__);
else
edge_tty_recv(edge_port->port, data,
urb->actual_length);
edge_port->port->icount.rx += urb->actual_length;
}
exit:
/* continue read unless stopped */
spin_lock(&edge_port->ep_lock);
if (edge_port->ep_read_urb_state == EDGE_READ_URB_RUNNING)
retval = usb_submit_urb(urb, GFP_ATOMIC);
else if (edge_port->ep_read_urb_state == EDGE_READ_URB_STOPPING)
edge_port->ep_read_urb_state = EDGE_READ_URB_STOPPED;
spin_unlock(&edge_port->ep_lock);
if (retval)
dev_err(dev, "%s - usb_submit_urb failed with result %d\n", __func__, retval);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 227 | 67.56% | 6 | 60.00% |
al borchers | al borchers | 97 | 28.87% | 1 | 10.00% |
harvey harrison | harvey harrison | 7 | 2.08% | 1 | 10.00% |
jiri slaby | jiri slaby | 3 | 0.89% | 1 | 10.00% |
johan hovold | johan hovold | 2 | 0.60% | 1 | 10.00% |
| Total | 336 | 100.00% | 10 | 100.00% |
static void edge_tty_recv(struct usb_serial_port *port, unsigned char *data,
int length)
{
int queued;
queued = tty_insert_flip_string(&port->port, data, length);
if (queued < length)
dev_err(&port->dev, "%s - dropping data, %d bytes lost\n",
__func__, length - queued);
tty_flip_buffer_push(&port->port);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
al borchers | al borchers | 21 | 31.82% | 1 | 12.50% |
greg kroah-hartman | greg kroah-hartman | 15 | 22.73% | 1 | 12.50% |
alan cox | alan cox | 15 | 22.73% | 2 | 25.00% |
jiri slaby | jiri slaby | 13 | 19.70% | 2 | 25.00% |
harvey harrison | harvey harrison | 1 | 1.52% | 1 | 12.50% |
david s. miller | david s. miller | 1 | 1.52% | 1 | 12.50% |
| Total | 66 | 100.00% | 8 | 100.00% |
static void edge_bulk_out_callback(struct urb *urb)
{
struct usb_serial_port *port = urb->context;
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
int status = urb->status;
struct tty_struct *tty;
edge_port->ep_write_urb_in_use = 0;
switch (status) {
case 0:
/* success */
break;
case -ECONNRESET:
case -ENOENT:
case -ESHUTDOWN:
/* this urb is terminated, clean up */
dev_dbg(&urb->dev->dev, "%s - urb shutting down with status: %d\n",
__func__, status);
return;
default:
dev_err_console(port, "%s - nonzero write bulk status "
"received: %d\n", __func__, status);
}
/* send any buffered data */
tty = tty_port_tty_get(&port->port);
edge_send(port, tty);
tty_kref_put(tty);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
al borchers | al borchers | 73 | 58.40% | 1 | 11.11% |
greg kroah-hartman | greg kroah-hartman | 25 | 20.00% | 3 | 33.33% |
alan cox | alan cox | 21 | 16.80% | 2 | 22.22% |
harvey harrison | harvey harrison | 2 | 1.60% | 1 | 11.11% |
johan hovold | johan hovold | 2 | 1.60% | 1 | 11.11% |
jiri slaby | jiri slaby | 2 | 1.60% | 1 | 11.11% |
| Total | 125 | 100.00% | 9 | 100.00% |
static int edge_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
struct edgeport_serial *edge_serial;
struct usb_device *dev;
struct urb *urb;
int port_number;
int status;
u16 open_settings;
u8 transaction_timeout;
if (edge_port == NULL)
return -ENODEV;
port_number = port->port_number;
dev = port->serial->dev;
/* turn off loopback */
status = ti_do_config(edge_port, UMPC_SET_CLR_LOOPBACK, 0);
if (status) {
dev_err(&port->dev,
"%s - cannot send clear loopback command, %d\n",
__func__, status);
return status;
}
/* set up the port settings */
if (tty)
edge_set_termios(tty, port, &tty->termios);
/* open up the port */
/* milliseconds to timeout for DMA transfer */
transaction_timeout = 2;
edge_port->ump_read_timeout =
max(20, ((transaction_timeout * 3) / 2));
/* milliseconds to timeout for DMA transfer */
open_settings = (u8)(UMP_DMA_MODE_CONTINOUS |
UMP_PIPE_TRANS_TIMEOUT_ENA |
(transaction_timeout << 2));
dev_dbg(&port->dev, "%s - Sending UMPC_OPEN_PORT\n", __func__);
/* Tell TI to open and start the port */
status = send_cmd(dev, UMPC_OPEN_PORT,
(u8)(UMPM_UART1_PORT + port_number), open_settings, NULL, 0);
if (status) {
dev_err(&port->dev, "%s - cannot send open command, %d\n",
__func__, status);
return status;
}
/* Start the DMA? */
status = send_cmd(dev, UMPC_START_PORT,
(u8)(UMPM_UART1_PORT + port_number), 0, NULL, 0);
if (status) {
dev_err(&port->dev, "%s - cannot send start DMA command, %d\n",
__func__, status);
return status;
}
/* Clear TX and RX buffers in UMP */
status = purge_port(port, UMP_PORT_DIR_OUT | UMP_PORT_DIR_IN);
if (status) {
dev_err(&port->dev,
"%s - cannot send clear buffers command, %d\n",
__func__, status);
return status;
}
/* Read Initial MSR */
status = ti_vread_sync(dev, UMPC_READ_MSR, 0,
(__u16)(UMPM_UART1_PORT + port_number),
&edge_port->shadow_msr, 1);
if (status) {
dev_err(&port->dev, "%s - cannot send read MSR command, %d\n",
__func__, status);
return status;
}
dev_dbg(&port->dev, "ShadowMSR 0x%X\n", edge_port->shadow_msr);
/* Set Initial MCR */
edge_port->shadow_mcr = MCR_RTS | MCR_DTR;
dev_dbg(&port->dev, "ShadowMCR 0x%X\n", edge_port->shadow_mcr);
edge_serial = edge_port->edge_serial;
if (mutex_lock_interruptible(&edge_serial->es_lock))
return -ERESTARTSYS;
if (edge_serial->num_ports_open == 0) {
/* we are the first port to open, post the interrupt urb */
urb = edge_serial->serial->port[0]->interrupt_in_urb;
if (!urb) {
dev_err(&port->dev,
"%s - no interrupt urb present, exiting\n",
__func__);
status = -EINVAL;
goto release_es_lock;
}
urb->context = edge_serial;
status = usb_submit_urb(urb, GFP_KERNEL);
if (status) {
dev_err(&port->dev,
"%s - usb_submit_urb failed with value %d\n",
__func__, status);
goto release_es_lock;
}
}
/*
* reset the data toggle on the bulk endpoints to work around bug in
* host controllers where things get out of sync some times
*/
usb_clear_halt(dev, port->write_urb->pipe);
usb_clear_halt(dev, port->read_urb->pipe);
/* start up our bulk read urb */
urb = port->read_urb;
if (!urb) {
dev_err(&port->dev, "%s - no read urb present, exiting\n",
__func__);
status = -EINVAL;
goto unlink_int_urb;
}
edge_port->ep_read_urb_state = EDGE_READ_URB_RUNNING;
urb->context = edge_port;
status = usb_submit_urb(urb, GFP_KERNEL);
if (status) {
dev_err(&port->dev,
"%s - read bulk usb_submit_urb failed with value %d\n",
__func__, status);
goto unlink_int_urb;
}
++edge_serial->num_ports_open;
goto release_es_lock;
unlink_int_urb:
if (edge_port->edge_serial->num_ports_open == 0)
usb_kill_urb(port->serial->port[0]->interrupt_in_urb);
release_es_lock:
mutex_unlock(&edge_serial->es_lock);
return status;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 449 | 68.03% | 7 | 50.00% |
al borchers | al borchers | 167 | 25.30% | 1 | 7.14% |
alan cox | alan cox | 26 | 3.94% | 4 | 28.57% |
harvey harrison | harvey harrison | 10 | 1.52% | 1 | 7.14% |
matthias kaehlcke | matthias kaehlcke | 8 | 1.21% | 1 | 7.14% |
| Total | 660 | 100.00% | 14 | 100.00% |
static void edge_close(struct usb_serial_port *port)
{
struct edgeport_serial *edge_serial;
struct edgeport_port *edge_port;
struct usb_serial *serial = port->serial;
unsigned long flags;
int port_number;
edge_serial = usb_get_serial_data(port->serial);
edge_port = usb_get_serial_port_data(port);
if (edge_serial == NULL || edge_port == NULL)
return;
/*
* The bulkreadcompletion routine will check
* this flag and dump add read data
*/
edge_port->close_pending = 1;
usb_kill_urb(port->read_urb);
usb_kill_urb(port->write_urb);
edge_port->ep_write_urb_in_use = 0;
spin_lock_irqsave(&edge_port->ep_lock, flags);
kfifo_reset_out(&port->write_fifo);
spin_unlock_irqrestore(&edge_port->ep_lock, flags);
dev_dbg(&port->dev, "%s - send umpc_close_port\n", __func__);
port_number = port->port_number;
send_cmd(serial->dev, UMPC_CLOSE_PORT,
(__u8)(UMPM_UART1_PORT + port_number), 0, NULL, 0);
mutex_lock(&edge_serial->es_lock);
--edge_port->edge_serial->num_ports_open;
if (edge_port->edge_serial->num_ports_open <= 0) {
/* last port is now closed, let's shut down our interrupt urb */
usb_kill_urb(port->serial->port[0]->interrupt_in_urb);
edge_port->edge_serial->num_ports_open = 0;
}
mutex_unlock(&edge_serial->es_lock);
edge_port->close_pending = 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 151 | 67.11% | 8 | 53.33% |
johan hovold | johan hovold | 43 | 19.11% | 3 | 20.00% |
al borchers | al borchers | 25 | 11.11% | 1 | 6.67% |
matthias kaehlcke | matthias kaehlcke | 4 | 1.78% | 1 | 6.67% |
peter e. berger | peter e. berger | 1 | 0.44% | 1 | 6.67% |
harvey harrison | harvey harrison | 1 | 0.44% | 1 | 6.67% |
| Total | 225 | 100.00% | 15 | 100.00% |
static int edge_write(struct tty_struct *tty, struct usb_serial_port *port,
const unsigned char *data, int count)
{
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
if (count == 0) {
dev_dbg(&port->dev, "%s - write request of 0 bytes\n", __func__);
return 0;
}
if (edge_port == NULL)
return -ENODEV;
if (edge_port->close_pending == 1)
return -ENODEV;
count = kfifo_in_locked(&port->write_fifo, data, count,
&edge_port->ep_lock);
edge_send(port, tty);
return count;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 86 | 78.90% | 4 | 40.00% |
al borchers | al borchers | 9 | 8.26% | 1 | 10.00% |
alan cox | alan cox | 6 | 5.50% | 1 | 10.00% |
johan hovold | johan hovold | 5 | 4.59% | 2 | 20.00% |
jiri slaby | jiri slaby | 2 | 1.83% | 1 | 10.00% |
harvey harrison | harvey harrison | 1 | 0.92% | 1 | 10.00% |
| Total | 109 | 100.00% | 10 | 100.00% |
static void edge_send(struct usb_serial_port *port, struct tty_struct *tty)
{
int count, result;
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
unsigned long flags;
spin_lock_irqsave(&edge_port->ep_lock, flags);
if (edge_port->ep_write_urb_in_use) {
spin_unlock_irqrestore(&edge_port->ep_lock, flags);
return;
}
count = kfifo_out(&port->write_fifo,
port->write_urb->transfer_buffer,
port->bulk_out_size);
if (count == 0) {
spin_unlock_irqrestore(&edge_port->ep_lock, flags);
return;
}
edge_port->ep_write_urb_in_use = 1;
spin_unlock_irqrestore(&edge_port->ep_lock, flags);
usb_serial_debug_data(&port->dev, __func__, count, port->write_urb->transfer_buffer);
/* set up our urb */
port->write_urb->transfer_buffer_length = count;
/* send the data out the bulk port */
result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
if (result) {
dev_err_console(port,
"%s - failed submitting write urb, error %d\n",
__func__, result);
edge_port->ep_write_urb_in_use = 0;
/* TODO: reschedule edge_send */
} else
edge_port->port->icount.tx += count;
/*
* wakeup any process waiting for writes to complete
* there is now more room in the buffer for new writes
*/
if (tty)
tty_wakeup(tty);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
al borchers | al borchers | 140 | 68.97% | 1 | 6.67% |
greg kroah-hartman | greg kroah-hartman | 43 | 21.18% | 4 | 26.67% |
johan hovold | johan hovold | 9 | 4.43% | 5 | 33.33% |
jiri slaby | jiri slaby | 5 | 2.46% | 1 | 6.67% |
alan cox | alan cox | 3 | 1.48% | 2 | 13.33% |
harvey harrison | harvey harrison | 2 | 0.99% | 1 | 6.67% |
peter e. berger | peter e. berger | 1 | 0.49% | 1 | 6.67% |
| Total | 203 | 100.00% | 15 | 100.00% |
static int edge_write_room(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
int room = 0;
unsigned long flags;
if (edge_port == NULL)
return 0;
if (edge_port->close_pending == 1)
return 0;
spin_lock_irqsave(&edge_port->ep_lock, flags);
room = kfifo_avail(&port->write_fifo);
spin_unlock_irqrestore(&edge_port->ep_lock, flags);
dev_dbg(&port->dev, "%s - returns %d\n", __func__, room);
return room;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 66 | 62.26% | 4 | 40.00% |
al borchers | al borchers | 22 | 20.75% | 1 | 10.00% |
alan cox | alan cox | 13 | 12.26% | 2 | 20.00% |
johan hovold | johan hovold | 4 | 3.77% | 2 | 20.00% |
harvey harrison | harvey harrison | 1 | 0.94% | 1 | 10.00% |
| Total | 106 | 100.00% | 10 | 100.00% |
static int edge_chars_in_buffer(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
int chars = 0;
unsigned long flags;
if (edge_port == NULL)
return 0;
spin_lock_irqsave(&edge_port->ep_lock, flags);
chars = kfifo_len(&port->write_fifo);
spin_unlock_irqrestore(&edge_port->ep_lock, flags);
dev_dbg(&port->dev, "%s - returns %d\n", __func__, chars);
return chars;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 57 | 60.00% | 3 | 33.33% |
al borchers | al borchers | 21 | 22.11% | 1 | 11.11% |
alan cox | alan cox | 12 | 12.63% | 2 | 22.22% |
johan hovold | johan hovold | 4 | 4.21% | 2 | 22.22% |
harvey harrison | harvey harrison | 1 | 1.05% | 1 | 11.11% |
| Total | 95 | 100.00% | 9 | 100.00% |
static bool edge_tx_empty(struct usb_serial_port *port)
{
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
int ret;
ret = tx_active(edge_port);
if (ret > 0)
return false;
return true;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
johan hovold | johan hovold | 43 | 100.00% | 1 | 100.00% |
| Total | 43 | 100.00% | 1 | 100.00% |
static void edge_throttle(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
int status;
if (edge_port == NULL)
return;
/* if we are implementing XON/XOFF, send the stop character */
if (I_IXOFF(tty)) {
unsigned char stop_char = STOP_CHAR(tty);
status = edge_write(tty, port, &stop_char, 1);
if (status <= 0) {
dev_err(&port->dev, "%s - failed to write stop character, %d\n", __func__, status);
}
}
/*
* if we are implementing RTS/CTS, stop reads
* and the Edgeport will clear the RTS line
*/
if (C_CRTSCTS(tty))
stop_read(edge_port);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 74 | 68.52% | 2 | 33.33% |
al borchers | al borchers | 17 | 15.74% | 1 | 16.67% |
alan cox | alan cox | 15 | 13.89% | 1 | 16.67% |
peter e. berger | peter e. berger | 1 | 0.93% | 1 | 16.67% |
harvey harrison | harvey harrison | 1 | 0.93% | 1 | 16.67% |
| Total | 108 | 100.00% | 6 | 100.00% |
static void edge_unthrottle(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
int status;
if (edge_port == NULL)
return;
/* if we are implementing XON/XOFF, send the start character */
if (I_IXOFF(tty)) {
unsigned char start_char = START_CHAR(tty);
status = edge_write(tty, port, &start_char, 1);
if (status <= 0) {
dev_err(&port->dev, "%s - failed to write start character, %d\n", __func__, status);
}
}
/*
* if we are implementing RTS/CTS, restart reads
* are the Edgeport will assert the RTS line
*/
if (C_CRTSCTS(tty)) {
status = restart_read(edge_port);
if (status)
dev_err(&port->dev,
"%s - read bulk usb_submit_urb failed: %d\n",
__func__, status);
}
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 72 | 55.38% | 2 | 28.57% |
al borchers | al borchers | 39 | 30.00% | 1 | 14.29% |
alan cox | alan cox | 16 | 12.31% | 2 | 28.57% |
harvey harrison | harvey harrison | 2 | 1.54% | 1 | 14.29% |
peter e. berger | peter e. berger | 1 | 0.77% | 1 | 14.29% |
| Total | 130 | 100.00% | 7 | 100.00% |
static void stop_read(struct edgeport_port *edge_port)
{
unsigned long flags;
spin_lock_irqsave(&edge_port->ep_lock, flags);
if (edge_port->ep_read_urb_state == EDGE_READ_URB_RUNNING)
edge_port->ep_read_urb_state = EDGE_READ_URB_STOPPING;
edge_port->shadow_mcr &= ~MCR_RTS;
spin_unlock_irqrestore(&edge_port->ep_lock, flags);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
al borchers | al borchers | 51 | 91.07% | 1 | 50.00% |
greg kroah-hartman | greg kroah-hartman | 5 | 8.93% | 1 | 50.00% |
| Total | 56 | 100.00% | 2 | 100.00% |
static int restart_read(struct edgeport_port *edge_port)
{
struct urb *urb;
int status = 0;
unsigned long flags;
spin_lock_irqsave(&edge_port->ep_lock, flags);
if (edge_port->ep_read_urb_state == EDGE_READ_URB_STOPPED) {
urb = edge_port->port->read_urb;
status = usb_submit_urb(urb, GFP_ATOMIC);
}
edge_port->ep_read_urb_state = EDGE_READ_URB_RUNNING;
edge_port->shadow_mcr |= MCR_RTS;
spin_unlock_irqrestore(&edge_port->ep_lock, flags);
return status;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
al borchers | al borchers | 69 | 79.31% | 1 | 20.00% |
greg kroah-hartman | greg kroah-hartman | 17 | 19.54% | 3 | 60.00% |
oliver neukum | oliver neukum | 1 | 1.15% | 1 | 20.00% |
| Total | 87 | 100.00% | 5 | 100.00% |
static void change_port_settings(struct tty_struct *tty,
struct edgeport_port *edge_port, struct ktermios *old_termios)
{
struct device *dev = &edge_port->port->dev;
struct ump_uart_config *config;
int baud;
unsigned cflag;
int status;
int port_number = edge_port->port->port_number;
config = kmalloc (sizeof (*config), GFP_KERNEL);
if (!config) {
tty->termios = *old_termios;
return;
}
cflag = tty->termios.c_cflag;
config->wFlags = 0;
/* These flags must be set */
config->wFlags |= UMP_MASK_UART_FLAGS_RECEIVE_MS_INT;
config->wFlags |= UMP_MASK_UART_FLAGS_AUTO_START_ON_ERR;
config->bUartMode = (__u8)(edge_port->bUartMode);
switch (cflag & CSIZE) {
case CS5:
config->bDataBits = UMP_UART_CHAR5BITS;
dev_dbg(dev, "%s - data bits = 5\n", __func__);
break;
case CS6:
config->bDataBits = UMP_UART_CHAR6BITS;
dev_dbg(dev, "%s - data bits = 6\n", __func__);
break;
case CS7:
config->bDataBits = UMP_UART_CHAR7BITS;
dev_dbg(dev, "%s - data bits = 7\n", __func__);
break;
default:
case CS8:
config->bDataBits = UMP_UART_CHAR8BITS;
dev_dbg(dev, "%s - data bits = 8\n", __func__);
break;
}
if (cflag & PARENB) {
if (cflag & PARODD) {
config->wFlags |= UMP_MASK_UART_FLAGS_PARITY;
config->bParity = UMP_UART_ODDPARITY;
dev_dbg(dev, "%s - parity = odd\n", __func__);
} else {
config->wFlags |= UMP_MASK_UART_FLAGS_PARITY;
config->bParity = UMP_UART_EVENPARITY;
dev_dbg(dev, "%s - parity = even\n", __func__);
}
} else {
config->bParity = UMP_UART_NOPARITY;
dev_dbg(dev, "%s - parity = none\n", __func__);
}
if (cflag & CSTOPB) {
config->bStopBits = UMP_UART_STOPBIT2;
dev_dbg(dev, "%s - stop bits = 2\n", __func__);
} else {
config->bStopBits = UMP_UART_STOPBIT1;
dev_dbg(dev, "%s - stop bits = 1\n", __func__);
}
/* figure out the flow control settings */
if (cflag & CRTSCTS) {
config->wFlags |= UMP_MASK_UART_FLAGS_OUT_X_CTS_FLOW;
config->wFlags |= UMP_MASK_UART_FLAGS_RTS_FLOW;
dev_dbg(dev, "%s - RTS/CTS is enabled\n", __func__);
} else {
dev_dbg(dev, "%s - RTS/CTS is disabled\n", __func__);
restart_read(edge_port);
}
/*
* if we are implementing XON/XOFF, set the start and stop
* character in the device
*/
config->cXon = START_CHAR(tty);
config->cXoff = STOP_CHAR(tty);
/* if we are implementing INBOUND XON/XOFF */
if (I_IXOFF(tty)) {
config->wFlags |= UMP_MASK_UART_FLAGS_IN_X;
dev_dbg(dev, "%s - INBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x\n",
__func__, config->cXon, config->cXoff);
} else
dev_dbg(dev, "%s - INBOUND XON/XOFF is disabled\n", __func__);
/* if we are implementing OUTBOUND XON/XOFF */
if (I_IXON(tty)) {
config->wFlags |= UMP_MASK_UART_FLAGS_OUT_X;
dev_dbg(dev, "%s - OUTBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x\n",
__func__, config->cXon, config->cXoff);
} else
dev_dbg(dev, "%s - OUTBOUND XON/XOFF is disabled\n", __func__);
tty->termios.c_cflag &= ~CMSPAR;
/* Round the baud rate */
baud = tty_get_baud_rate(tty);
if (!baud) {
/* pick a default, any default... */
baud = 9600;
} else
tty_encode_baud_rate(tty, baud, baud);
edge_port->baud_rate = baud;
config->wBaudRate = (__u16)((461550L + baud/2) / baud);
/* FIXME: Recompute actual baud from divisor here */
dev_dbg(dev, "%s - baud rate = %d, wBaudRate = %d\n", __func__, baud, config->wBaudRate);
dev_dbg(dev, "wBaudRate: %d\n", (int)(461550L / config->wBaudRate));
dev_dbg(dev, "wFlags: 0x%x\n", config->wFlags);
dev_dbg(dev, "bDataBits: %d\n", config->bDataBits);
dev_dbg(dev, "bParity: %d\n", config->bParity);
dev_dbg(dev, "bStopBits: %d\n", config->bStopBits);
dev_dbg(dev, "cXon: %d\n", config->cXon);
dev_dbg(dev, "cXoff: %d\n", config->cXoff);
dev_dbg(dev, "bUartMode: %d\n", config->bUartMode);
/* move the word values into big endian mode */
cpu_to_be16s(&config->wFlags);
cpu_to_be16s(&config->wBaudRate);
status = send_cmd(edge_port->port->serial->dev, UMPC_SET_CONFIG,
(__u8)(UMPM_UART1_PORT + port_number),
0, (__u8 *)config, sizeof(*config));
if (status)
dev_dbg(dev, "%s - error %d when trying to write config to device\n",
__func__, status);
kfree(config);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 653 | 89.33% | 4 | 33.33% |
alan cox | alan cox | 35 | 4.79% | 5 | 41.67% |
al borchers | al borchers | 25 | 3.42% | 1 | 8.33% |
harvey harrison | harvey harrison | 17 | 2.33% | 1 | 8.33% |
peter e. berger | peter e. berger | 1 | 0.14% | 1 | 8.33% |
| Total | 731 | 100.00% | 12 | 100.00% |
static void edge_set_termios(struct tty_struct *tty,
struct usb_serial_port *port, struct ktermios *old_termios)
{
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
unsigned int cflag;
cflag = tty->termios.c_cflag;
dev_dbg(&port->dev, "%s - clfag %08x iflag %08x\n", __func__,
tty->termios.c_cflag, tty->termios.c_iflag);
dev_dbg(&port->dev, "%s - old clfag %08x old iflag %08x\n", __func__,
old_termios->c_cflag, old_termios->c_iflag);
if (edge_port == NULL)
return;
/* change the port settings to the new ones specified */
change_port_settings(tty, edge_port, old_termios);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 82 | 78.85% | 3 | 42.86% |
alan cox | alan cox | 20 | 19.23% | 3 | 42.86% |
harvey harrison | harvey harrison | 2 | 1.92% | 1 | 14.29% |
| Total | 104 | 100.00% | 7 | 100.00% |
static int edge_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
struct usb_serial_port *port = tty->driver_data;
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
unsigned int mcr;
unsigned long flags;
spin_lock_irqsave(&edge_port->ep_lock, flags);
mcr = edge_port->shadow_mcr;
if (set & TIOCM_RTS)
mcr |= MCR_RTS;
if (set & TIOCM_DTR)
mcr |= MCR_DTR;
if (set & TIOCM_LOOP)
mcr |= MCR_LOOPBACK;
if (clear & TIOCM_RTS)
mcr &= ~MCR_RTS;
if (clear & TIOCM_DTR)
mcr &= ~MCR_DTR;
if (clear & TIOCM_LOOP)
mcr &= ~MCR_LOOPBACK;
edge_port->shadow_mcr = mcr;
spin_unlock_irqrestore(&edge_port->ep_lock, flags);
restore_mcr(edge_port, mcr);
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 115 | 76.16% | 2 | 40.00% |
alan cox | alan cox | 36 | 23.84% | 3 | 60.00% |
| Total | 151 | 100.00% | 5 | 100.00% |
static int edge_tiocmget(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
unsigned int result = 0;
unsigned int msr;
unsigned int mcr;
unsigned long flags;
spin_lock_irqsave(&edge_port->ep_lock, flags);
msr = edge_port->shadow_msr;
mcr = edge_port->shadow_mcr;
result = ((mcr & MCR_DTR) ? TIOCM_DTR: 0) /* 0x002 */
| ((mcr & MCR_RTS) ? TIOCM_RTS: 0) /* 0x004 */
| ((msr & EDGEPORT_MSR_CTS) ? TIOCM_CTS: 0) /* 0x020 */
| ((msr & EDGEPORT_MSR_CD) ? TIOCM_CAR: 0) /* 0x040 */
| ((msr & EDGEPORT_MSR_RI) ? TIOCM_RI: 0) /* 0x080 */
| ((msr & EDGEPORT_MSR_DSR) ? TIOCM_DSR: 0); /* 0x100 */
dev_dbg(&port->dev, "%s -- %x\n", __func__, result);
spin_unlock_irqrestore(&edge_port->ep_lock, flags);
return result;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 137 | 77.40% | 4 | 50.00% |
alan cox | alan cox | 35 | 19.77% | 2 | 25.00% |
olaf hering | olaf hering | 4 | 2.26% | 1 | 12.50% |
harvey harrison | harvey harrison | 1 | 0.56% | 1 | 12.50% |
| Total | 177 | 100.00% | 8 | 100.00% |
static int get_serial_info(struct edgeport_port *edge_port,
struct serial_struct __user *retinfo)
{
struct serial_struct tmp;
unsigned cwait;
if (!retinfo)
return -EFAULT;
cwait = edge_port->port->port.closing_wait;
if (cwait != ASYNC_CLOSING_WAIT_NONE)
cwait = jiffies_to_msecs(cwait) / 10;
memset(&tmp, 0, sizeof(tmp));
tmp.type = PORT_16550A;
tmp.line = edge_port->port->minor;
tmp.port = edge_port->port->port_number;
tmp.irq = 0;
tmp.flags = ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ;
tmp.xmit_fifo_size = edge_port->port->bulk_out_size;
tmp.baud_base = 9600;
tmp.close_delay = 5*HZ;
tmp.closing_wait = cwait;
if (copy_to_user(retinfo, &tmp, sizeof(*retinfo)))
return -EFAULT;
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 135 | 82.32% | 3 | 60.00% |
johan hovold | johan hovold | 29 | 17.68% | 2 | 40.00% |
| Total | 164 | 100.00% | 5 | 100.00% |
static int edge_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
struct usb_serial_port *port = tty->driver_data;
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
switch (cmd) {
case TIOCGSERIAL:
dev_dbg(&port->dev, "%s - TIOCGSERIAL\n", __func__);
return get_serial_info(edge_port,
(struct serial_struct __user *) arg);
}
return -ENOIOCTLCMD;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 66 | 85.71% | 4 | 80.00% |
alan cox | alan cox | 11 | 14.29% | 1 | 20.00% |
| Total | 77 | 100.00% | 5 | 100.00% |
static void edge_break(struct tty_struct *tty, int break_state)
{
struct usb_serial_port *port = tty->driver_data;
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
int status;
int bv = 0; /* Off */
if (break_state == -1)
bv = 1; /* On */
status = ti_do_config(edge_port, UMPC_SET_CLR_BREAK, bv);
if (status)
dev_dbg(&port->dev, "%s - error %d sending break set/clear command.\n",
__func__, status);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 55 | 66.27% | 3 | 50.00% |
alan cox | alan cox | 27 | 32.53% | 2 | 33.33% |
harvey harrison | harvey harrison | 1 | 1.20% | 1 | 16.67% |
| Total | 83 | 100.00% | 6 | 100.00% |
static void edge_heartbeat_schedule(struct edgeport_serial *edge_serial)
{
if (!edge_serial->use_heartbeat)
return;
schedule_delayed_work(&edge_serial->heartbeat_work,
FW_HEARTBEAT_SECS * HZ);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
peter e. berger | peter e. berger | 31 | 100.00% | 1 | 100.00% |
| Total | 31 | 100.00% | 1 | 100.00% |
static void edge_heartbeat_work(struct work_struct *work)
{
struct edgeport_serial *serial;
struct ti_i2c_desc *rom_desc;
serial = container_of(work, struct edgeport_serial,
heartbeat_work.work);
rom_desc = kmalloc(sizeof(*rom_desc), GFP_KERNEL);
/* Descriptor address request is enough to reset the firmware timer */
if (!rom_desc || !get_descriptor_addr(serial, I2C_DESC_TYPE_ION,
rom_desc)) {
dev_err(&serial->serial->interface->dev,
"%s - Incomplete heartbeat\n", __func__);
}
kfree(rom_desc);
edge_heartbeat_schedule(serial);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
peter e. berger | peter e. berger | 92 | 100.00% | 1 | 100.00% |
| Total | 92 | 100.00% | 1 | 100.00% |
static int edge_startup(struct usb_serial *serial)
{
struct edgeport_serial *edge_serial;
int status;
u16 product_id;
/* create our private serial structure */
edge_serial = kzalloc(sizeof(struct edgeport_serial), GFP_KERNEL);
if (!edge_serial)
return -ENOMEM;
mutex_init(&edge_serial->es_lock);
edge_serial->serial = serial;
usb_set_serial_data(serial, edge_serial);
status = download_fw(edge_serial);
if (status) {
kfree(edge_serial);
return status;
}
product_id = le16_to_cpu(
edge_serial->serial->dev->descriptor.idProduct);
/* Currently only the EP/416 models require heartbeat support */
if (edge_serial->fw_version > FW_HEARTBEAT_VERSION_CUTOFF) {
if (product_id == ION_DEVICE_ID_TI_EDGEPORT_416 ||
product_id == ION_DEVICE_ID_TI_EDGEPORT_416B) {
edge_serial->use_heartbeat = true;
}
}
INIT_DELAYED_WORK(&edge_serial->heartbeat_work, edge_heartbeat_work);
edge_heartbeat_schedule(edge_serial);
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 73 | 48.99% | 2 | 22.22% |
peter e. berger | peter e. berger | 62 | 41.61% | 1 | 11.11% |
al borchers | al borchers | 6 | 4.03% | 1 | 11.11% |
johan hovold | johan hovold | 4 | 2.68% | 2 | 22.22% |
matthias kaehlcke | matthias kaehlcke | 2 | 1.34% | 1 | 11.11% |
alan cox | alan cox | 1 | 0.67% | 1 | 11.11% |
eric sesterhenn | eric sesterhenn | 1 | 0.67% | 1 | 11.11% |
| Total | 149 | 100.00% | 9 | 100.00% |
static void edge_disconnect(struct usb_serial *serial)
{
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
johan hovold | johan hovold | 9 | 90.00% | 1 | 50.00% |
greg kroah-hartman | greg kroah-hartman | 1 | 10.00% | 1 | 50.00% |
| Total | 10 | 100.00% | 2 | 100.00% |
static void edge_release(struct usb_serial *serial)
{
struct edgeport_serial *edge_serial = usb_get_serial_data(serial);
cancel_delayed_work_sync(&edge_serial->heartbeat_work);
kfree(edge_serial);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
peter e. berger | peter e. berger | 17 | 50.00% | 1 | 50.00% |
johan hovold | johan hovold | 17 | 50.00% | 1 | 50.00% |
| Total | 34 | 100.00% | 2 | 100.00% |
static int edge_port_probe(struct usb_serial_port *port)
{
struct edgeport_port *edge_port;
int ret;
edge_port = kzalloc(sizeof(*edge_port), GFP_KERNEL);
if (!edge_port)
return -ENOMEM;
spin_lock_init(&edge_port->ep_lock);
edge_port->port = port;
edge_port->edge_serial = usb_get_serial_data(port->serial);
edge_port->bUartMode = default_uart_mode;
switch (port->port_number) {
case 0:
edge_port->uart_base = UMPMEM_BASE_UART1;
edge_port->dma_address = UMPD_OEDB1_ADDRESS;
break;
case 1:
edge_port->uart_base = UMPMEM_BASE_UART2;
edge_port->dma_address = UMPD_OEDB2_ADDRESS;
break;
default:
dev_err(&port->dev, "unknown port number\n");
ret = -ENODEV;
goto err;
}
dev_dbg(&port->dev,
"%s - port_number = %d, uart_base = %04x, dma_address = %04x\n",
__func__, port->port_number, edge_port->uart_base,
edge_port->dma_address);
usb_set_serial_port_data(port, edge_port);
ret = edge_create_sysfs_attrs(port);
if (ret)
goto err;
port->port.closing_wait = msecs_to_jiffies(closing_wait * 10);
port->port.drain_delay = 1;
return 0;
err:
kfree(edge_port);
return ret;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
johan hovold | johan hovold | 165 | 78.57% | 5 | 55.56% |
al borchers | al borchers | 28 | 13.33% | 1 | 11.11% |
greg kroah-hartman | greg kroah-hartman | 15 | 7.14% | 1 | 11.11% |
martin k. petersen | martin k. petersen | 1 | 0.48% | 1 | 11.11% |
eric sesterhenn | eric sesterhenn | 1 | 0.48% | 1 | 11.11% |
| Total | 210 | 100.00% | 9 | 100.00% |
static int edge_port_remove(struct usb_serial_port *port)
{
struct edgeport_port *edge_port;
edge_port = usb_get_serial_port_data(port);
edge_remove_sysfs_attrs(port);
kfree(edge_port);
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
alan stern | alan stern | 18 | 50.00% | 1 | 33.33% |
johan hovold | johan hovold | 12 | 33.33% | 1 | 33.33% |
al borchers | al borchers | 6 | 16.67% | 1 | 33.33% |
| Total | 36 | 100.00% | 3 | 100.00% |
/* Sysfs Attributes */
static ssize_t uart_mode_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct usb_serial_port *port = to_usb_serial_port(dev);
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
return sprintf(buf, "%d\n", edge_port->bUartMode);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
martin k. petersen | martin k. petersen | 51 | 98.08% | 1 | 50.00% |
greg kroah-hartman | greg kroah-hartman | 1 | 1.92% | 1 | 50.00% |
| Total | 52 | 100.00% | 2 | 100.00% |
static ssize_t uart_mode_store(struct device *dev,
struct device_attribute *attr, const char *valbuf, size_t count)
{
struct usb_serial_port *port = to_usb_serial_port(dev);
struct edgeport_port *edge_port = usb_get_serial_port_data(port);
unsigned int v = simple_strtoul(valbuf, NULL, 0);
dev_dbg(dev, "%s: setting uart_mode = %d\n", __func__, v);
if (v < 256)
edge_port->bUartMode = v;
else
dev_err(dev, "%s - uart_mode %d is invalid\n", __func__, v);
return count;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
martin k. petersen | martin k. petersen | 88 | 92.63% | 1 | 25.00% |
greg kroah-hartman | greg kroah-hartman | 5 | 5.26% | 2 | 50.00% |
harvey harrison | harvey harrison | 2 | 2.11% | 1 | 25.00% |
| Total | 95 | 100.00% | 4 | 100.00% |
static DEVICE_ATTR_RW(uart_mode);
static int edge_create_sysfs_attrs(struct usb_serial_port *port)
{
return device_create_file(&port->dev, &dev_attr_uart_mode);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
martin k. petersen | martin k. petersen | 23 | 100.00% | 1 | 100.00% |
| Total | 23 | 100.00% | 1 | 100.00% |
static int edge_remove_sysfs_attrs(struct usb_serial_port *port)
{
device_remove_file(&port->dev, &dev_attr_uart_mode);
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
martin k. petersen | martin k. petersen | 25 | 100.00% | 1 | 100.00% |
| Total | 25 | 100.00% | 1 | 100.00% |
#ifdef CONFIG_PM
static int edge_suspend(struct usb_serial *serial, pm_message_t message)
{
struct edgeport_serial *edge_serial = usb_get_serial_data(serial);
cancel_delayed_work_sync(&edge_serial->heartbeat_work);
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
peter e. berger | peter e. berger | 35 | 100.00% | 1 | 100.00% |
| Total | 35 | 100.00% | 1 | 100.00% |
static int edge_resume(struct usb_serial *serial)
{
struct edgeport_serial *edge_serial = usb_get_serial_data(serial);
edge_heartbeat_schedule(edge_serial);
return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp |
peter e. berger | peter e. berger | 29 | 100.00% | 1 | 100.00% |
| Total | 29 | 100.00% | 1 | 100.00% |
#endif
static struct usb_serial_driver edgeport_1port_device = {
.driver = {
.owner = THIS_MODULE,
.name = "edgeport_ti_1",
},
.description = "Edgeport TI 1 port adapter",
.id_table = edgeport_1port_id_table,
.num_ports = 1,
.open = edge_open,
.close = edge_close,
.throttle = edge_throttle,
.unthrottle = edge_unthrottle,
.attach = edge_startup,
.disconnect = edge_disconnect,
.release = edge_release,
.port_probe = edge_port_probe,
.port_remove = edge_port_remove,
.ioctl = edge_ioctl,
.set_termios = edge_set_termios,
.tiocmget = edge_tiocmget,
.tiocmset = edge_tiocmset,
.tiocmiwait = usb_serial_generic_tiocmiwait,
.get_icount = usb_serial_generic_get_icount,
.write = edge_write,
.write_room = edge_write_room,
.chars_in_buffer = edge_chars_in_buffer,
.tx_empty = edge_tx_empty,
.break_ctl = edge_break,
.read_int_callback = edge_interrupt_callback,
.read_bulk_callback = edge_bulk_in_callback,
.write_bulk_callback = edge_bulk_out_callback,
#ifdef CONFIG_PM
.suspend = edge_suspend,
.resume = edge_resume,
#endif
};
static struct usb_serial_driver edgeport_2port_device = {
.driver = {
.owner = THIS_MODULE,
.name = "edgeport_ti_2",
},
.description = "Edgeport TI 2 port adapter",
.id_table = edgeport_2port_id_table,
.num_ports = 2,
.open = edge_open,
.close = edge_close,
.throttle = edge_throttle,
.unthrottle = edge_unthrottle,
.attach = edge_startup,
.disconnect = edge_disconnect,
.release = edge_release,
.port_probe = edge_port_probe,
.port_remove = edge_port_remove,
.ioctl = edge_ioctl,
.set_termios = edge_set_termios,
.tiocmget = edge_tiocmget,
.tiocmset = edge_tiocmset,
.tiocmiwait = usb_serial_generic_tiocmiwait,
.get_icount = usb_serial_generic_get_icount,
.write = edge_write,
.write_room = edge_write_room,
.chars_in_buffer = edge_chars_in_buffer,
.tx_empty = edge_tx_empty,
.break_ctl = edge_break,
.read_int_callback = edge_interrupt_callback,
.read_bulk_callback = edge_bulk_in_callback,
.write_bulk_callback = edge_bulk_out_callback,
#ifdef CONFIG_PM
.suspend = edge_suspend,
.resume = edge_resume,
#endif
};
static struct usb_serial_driver * const serial_drivers[] = {
&edgeport_1port_device, &edgeport_2port_device, NULL
};
module_usb_serial_driver(serial_drivers, id_table_combined);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL");
MODULE_FIRMWARE("edgeport/down3.bin");
module_param(closing_wait, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(closing_wait, "Maximum wait for data to drain, in .01 secs");
module_param(ignore_cpu_rev, bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(ignore_cpu_rev,
"Ignore the cpu revision when connecting to a device");
module_param(default_uart_mode, int, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(default_uart_mode, "Default uart_mode, 0=RS232, ...");
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp |
greg kroah-hartman | greg kroah-hartman | 8154 | 65.95% | 31 | 31.00% |
al borchers | al borchers | 1424 | 11.52% | 2 | 2.00% |
peter e. berger | peter e. berger | 947 | 7.66% | 8 | 8.00% |
johan hovold | johan hovold | 561 | 4.54% | 22 | 22.00% |
alan cox | alan cox | 516 | 4.17% | 9 | 9.00% |
martin k. petersen | martin k. petersen | 319 | 2.58% | 1 | 1.00% |
harvey harrison | harvey harrison | 128 | 1.04% | 1 | 1.00% |
art haas | art haas | 64 | 0.52% | 1 | 1.00% |
oleg drokin | oleg drokin | 56 | 0.45% | 2 | 2.00% |
alan stern | alan stern | 52 | 0.42% | 3 | 3.00% |
jiri slaby | jiri slaby | 32 | 0.26% | 3 | 3.00% |
jaswinder singh rajput | jaswinder singh rajput | 32 | 0.26% | 1 | 1.00% |
matthias kaehlcke | matthias kaehlcke | 19 | 0.15% | 1 | 1.00% |
gary algier | gary algier | 17 | 0.14% | 1 | 1.00% |
olaf hering | olaf hering | 12 | 0.10% | 1 | 1.00% |
eric w. biederman | eric w. biederman | 8 | 0.06% | 1 | 1.00% |
roel kluin | roel kluin | 6 | 0.05% | 3 | 3.00% |
andrew morton | andrew morton | 4 | 0.03% | 1 | 1.00% |
marton nemeth | marton nemeth | 3 | 0.02% | 1 | 1.00% |
nishanth aravamudan | nishanth aravamudan | 2 | 0.02% | 1 | 1.00% |
eric sesterhenn | eric sesterhenn | 2 | 0.02% | 1 | 1.00% |
francois romieu | francois romieu | 1 | 0.01% | 1 | 1.00% |
lucas de marchi | lucas de marchi | 1 | 0.01% | 1 | 1.00% |
rusty russell | rusty russell | 1 | 0.01% | 1 | 1.00% |
oliver neukum | oliver neukum | 1 | 0.01% | 1 | 1.00% |
david s. miller | david s. miller | 1 | 0.01% | 1 | 1.00% |
| Total | 12363 | 100.00% | 100 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.