mirror of https://gitee.com/openkylin/linux.git
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
This commit is contained in:
commit
ebb27386ff
|
@ -1,129 +0,0 @@
|
|||
|
||||
Device Interfaces
|
||||
|
||||
Introduction
|
||||
~~~~~~~~~~~~
|
||||
|
||||
Device interfaces are the logical interfaces of device classes that correlate
|
||||
directly to userspace interfaces, like device nodes.
|
||||
|
||||
Each device class may have multiple interfaces through which you can
|
||||
access the same device. An input device may support the mouse interface,
|
||||
the 'evdev' interface, and the touchscreen interface. A SCSI disk would
|
||||
support the disk interface, the SCSI generic interface, and possibly a raw
|
||||
device interface.
|
||||
|
||||
Device interfaces are registered with the class they belong to. As devices
|
||||
are added to the class, they are added to each interface registered with
|
||||
the class. The interface is responsible for determining whether the device
|
||||
supports the interface or not.
|
||||
|
||||
|
||||
Programming Interface
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
struct device_interface {
|
||||
char * name;
|
||||
rwlock_t lock;
|
||||
u32 devnum;
|
||||
struct device_class * devclass;
|
||||
|
||||
struct list_head node;
|
||||
struct driver_dir_entry dir;
|
||||
|
||||
int (*add_device)(struct device *);
|
||||
int (*add_device)(struct intf_data *);
|
||||
};
|
||||
|
||||
int interface_register(struct device_interface *);
|
||||
void interface_unregister(struct device_interface *);
|
||||
|
||||
|
||||
An interface must specify the device class it belongs to. It is added
|
||||
to that class's list of interfaces on registration.
|
||||
|
||||
|
||||
Interfaces can be added to a device class at any time. Whenever it is
|
||||
added, each device in the class is passed to the interface's
|
||||
add_device callback. When an interface is removed, each device is
|
||||
removed from the interface.
|
||||
|
||||
|
||||
Devices
|
||||
~~~~~~~
|
||||
Once a device is added to a device class, it is added to each
|
||||
interface that is registered with the device class. The class
|
||||
is expected to place a class-specific data structure in
|
||||
struct device::class_data. The interface can use that (along with
|
||||
other fields of struct device) to determine whether or not the driver
|
||||
and/or device support that particular interface.
|
||||
|
||||
|
||||
Data
|
||||
~~~~
|
||||
|
||||
struct intf_data {
|
||||
struct list_head node;
|
||||
struct device_interface * intf;
|
||||
struct device * dev;
|
||||
u32 intf_num;
|
||||
};
|
||||
|
||||
int interface_add_data(struct interface_data *);
|
||||
|
||||
The interface is responsible for allocating and initializing a struct
|
||||
intf_data and calling interface_add_data() to add it to the device's list
|
||||
of interfaces it belongs to. This list will be iterated over when the device
|
||||
is removed from the class (instead of all possible interfaces for a class).
|
||||
This structure should probably be embedded in whatever per-device data
|
||||
structure the interface is allocating anyway.
|
||||
|
||||
Devices are enumerated within the interface. This happens in interface_add_data()
|
||||
and the enumerated value is stored in the struct intf_data for that device.
|
||||
|
||||
sysfs
|
||||
~~~~~
|
||||
Each interface is given a directory in the directory of the device
|
||||
class it belongs to:
|
||||
|
||||
Interfaces get a directory in the class's directory as well:
|
||||
|
||||
class/
|
||||
`-- input
|
||||
|-- devices
|
||||
|-- drivers
|
||||
|-- mouse
|
||||
`-- evdev
|
||||
|
||||
When a device is added to the interface, a symlink is created that points
|
||||
to the device's directory in the physical hierarchy:
|
||||
|
||||
class/
|
||||
`-- input
|
||||
|-- devices
|
||||
| `-- 1 -> ../../../root/pci0/00:1f.0/usb_bus/00:1f.2-1:0/
|
||||
|-- drivers
|
||||
| `-- usb:usb_mouse -> ../../../bus/drivers/usb_mouse/
|
||||
|-- mouse
|
||||
| `-- 1 -> ../../../root/pci0/00:1f.0/usb_bus/00:1f.2-1:0/
|
||||
`-- evdev
|
||||
`-- 1 -> ../../../root/pci0/00:1f.0/usb_bus/00:1f.2-1:0/
|
||||
|
||||
|
||||
Future Plans
|
||||
~~~~~~~~~~~~
|
||||
A device interface is correlated directly with a userspace interface
|
||||
for a device, specifically a device node. For instance, a SCSI disk
|
||||
exposes at least two interfaces to userspace: the standard SCSI disk
|
||||
interface and the SCSI generic interface. It might also export a raw
|
||||
device interface.
|
||||
|
||||
Many interfaces have a major number associated with them and each
|
||||
device gets a minor number. Or, multiple interfaces might share one
|
||||
major number, and each will receive a range of minor numbers (like in
|
||||
the case of input devices).
|
||||
|
||||
These major and minor numbers could be stored in the interface
|
||||
structure. Major and minor allocations could happen when the interface
|
||||
is registered with the class, or via a helper function.
|
||||
|
|
@ -660,11 +660,10 @@ struct address_space_operations {
|
|||
releasepage: releasepage is called on PagePrivate pages to indicate
|
||||
that the page should be freed if possible. ->releasepage
|
||||
should remove any private data from the page and clear the
|
||||
PagePrivate flag. It may also remove the page from the
|
||||
address_space. If this fails for some reason, it may indicate
|
||||
failure with a 0 return value.
|
||||
This is used in two distinct though related cases. The first
|
||||
is when the VM finds a clean page with no active users and
|
||||
PagePrivate flag. If releasepage() fails for some reason, it must
|
||||
indicate failure with a 0 return value.
|
||||
releasepage() is used in two distinct though related cases. The
|
||||
first is when the VM finds a clean page with no active users and
|
||||
wants to make it a free page. If ->releasepage succeeds, the
|
||||
page will be removed from the address_space and become free.
|
||||
|
||||
|
|
|
@ -2060,7 +2060,7 @@ F: Documentation/blockdev/drbd/
|
|||
|
||||
DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS
|
||||
M: Greg Kroah-Hartman <gregkh@suse.de>
|
||||
T: quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6.git
|
||||
S: Supported
|
||||
F: Documentation/kobject.txt
|
||||
F: drivers/base/
|
||||
|
@ -4064,9 +4064,8 @@ F: drivers/scsi/NCR_D700.*
|
|||
|
||||
NETEFFECT IWARP RNIC DRIVER (IW_NES)
|
||||
M: Faisal Latif <faisal.latif@intel.com>
|
||||
M: Chien Tung <chien.tin.tung@intel.com>
|
||||
L: linux-rdma@vger.kernel.org
|
||||
W: http://www.neteffect.com
|
||||
W: http://www.intel.com/Products/Server/Adapters/Server-Cluster/Server-Cluster-overview.htm
|
||||
S: Supported
|
||||
F: drivers/infiniband/hw/nes/
|
||||
|
||||
|
|
|
@ -2415,8 +2415,6 @@ void __init xen_init_mmu_ops(void)
|
|||
x86_init.paging.pagetable_setup_done = xen_pagetable_setup_done;
|
||||
pv_mmu_ops = xen_mmu_ops;
|
||||
|
||||
vmap_lazy_unmap = false;
|
||||
|
||||
memset(dummy_mapping, 0xff, PAGE_SIZE);
|
||||
}
|
||||
|
||||
|
|
|
@ -56,6 +56,18 @@ static struct cs5535_gpio_chip {
|
|||
* registers, see include/linux/cs5535.h.
|
||||
*/
|
||||
|
||||
static void errata_outl(u32 val, unsigned long addr)
|
||||
{
|
||||
/*
|
||||
* According to the CS5536 errata (#36), after suspend
|
||||
* a write to the high bank GPIO register will clear all
|
||||
* non-selected bits; the recommended workaround is a
|
||||
* read-modify-write operation.
|
||||
*/
|
||||
val |= inl(addr);
|
||||
outl(val, addr);
|
||||
}
|
||||
|
||||
static void __cs5535_gpio_set(struct cs5535_gpio_chip *chip, unsigned offset,
|
||||
unsigned int reg)
|
||||
{
|
||||
|
@ -64,7 +76,7 @@ static void __cs5535_gpio_set(struct cs5535_gpio_chip *chip, unsigned offset,
|
|||
outl(1 << offset, chip->base + reg);
|
||||
else
|
||||
/* high bank register */
|
||||
outl(1 << (offset - 16), chip->base + 0x80 + reg);
|
||||
errata_outl(1 << (offset - 16), chip->base + 0x80 + reg);
|
||||
}
|
||||
|
||||
void cs5535_gpio_set(unsigned offset, unsigned int reg)
|
||||
|
@ -86,7 +98,7 @@ static void __cs5535_gpio_clear(struct cs5535_gpio_chip *chip, unsigned offset,
|
|||
outl(1 << (offset + 16), chip->base + reg);
|
||||
else
|
||||
/* high bank register */
|
||||
outl(1 << offset, chip->base + 0x80 + reg);
|
||||
errata_outl(1 << offset, chip->base + 0x80 + reg);
|
||||
}
|
||||
|
||||
void cs5535_gpio_clear(unsigned offset, unsigned int reg)
|
||||
|
|
|
@ -1386,6 +1386,7 @@ static const struct hid_device_id hid_blacklist[] = {
|
|||
{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb651) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb653) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb65a) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED, USB_DEVICE_ID_TOPSEED_CYBERLINK) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED2, USB_DEVICE_ID_TOPSEED2_RF_COMBO) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_TWINHAN, USB_DEVICE_ID_TWINHAN_IR_REMOTE) },
|
||||
|
|
|
@ -221,7 +221,7 @@ static int egalax_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
|||
struct egalax_data *td;
|
||||
struct hid_report *report;
|
||||
|
||||
td = kmalloc(sizeof(struct egalax_data), GFP_KERNEL);
|
||||
td = kzalloc(sizeof(struct egalax_data), GFP_KERNEL);
|
||||
if (!td) {
|
||||
dev_err(&hdev->dev, "cannot allocate eGalax data\n");
|
||||
return -ENOMEM;
|
||||
|
|
|
@ -174,7 +174,7 @@ static int hidinput_setkeycode(struct input_dev *dev,
|
|||
|
||||
clear_bit(*old_keycode, dev->keybit);
|
||||
set_bit(usage->code, dev->keybit);
|
||||
dbg_hid(KERN_DEBUG "Assigned keycode %d to HID usage code %x\n",
|
||||
dbg_hid("Assigned keycode %d to HID usage code %x\n",
|
||||
usage->code, usage->hid);
|
||||
|
||||
/*
|
||||
|
@ -203,8 +203,8 @@ static int hidinput_setkeycode(struct input_dev *dev,
|
|||
*
|
||||
* as seen in the HID specification v1.11 6.2.2.7 Global Items.
|
||||
*
|
||||
* Only exponent 1 length units are processed. Centimeters are converted to
|
||||
* inches. Degrees are converted to radians.
|
||||
* Only exponent 1 length units are processed. Centimeters and inches are
|
||||
* converted to millimeters. Degrees are converted to radians.
|
||||
*/
|
||||
static __s32 hidinput_calc_abs_res(const struct hid_field *field, __u16 code)
|
||||
{
|
||||
|
@ -225,13 +225,16 @@ static __s32 hidinput_calc_abs_res(const struct hid_field *field, __u16 code)
|
|||
*/
|
||||
if (code == ABS_X || code == ABS_Y || code == ABS_Z) {
|
||||
if (field->unit == 0x11) { /* If centimeters */
|
||||
/* Convert to inches */
|
||||
prev = logical_extents;
|
||||
logical_extents *= 254;
|
||||
if (logical_extents < prev)
|
||||
/* Convert to millimeters */
|
||||
unit_exponent += 1;
|
||||
} else if (field->unit == 0x13) { /* If inches */
|
||||
/* Convert to millimeters */
|
||||
prev = physical_extents;
|
||||
physical_extents *= 254;
|
||||
if (physical_extents < prev)
|
||||
return 0;
|
||||
unit_exponent += 2;
|
||||
} else if (field->unit != 0x13) { /* If not inches */
|
||||
unit_exponent -= 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
} else if (code == ABS_RX || code == ABS_RY || code == ABS_RZ) {
|
||||
|
|
|
@ -256,6 +256,8 @@ static const struct hid_device_id tm_devices[] = {
|
|||
.driver_data = (unsigned long)ff_joystick },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654), /* FGT Force Feedback Wheel */
|
||||
.driver_data = (unsigned long)ff_joystick },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb65a), /* F430 Force Feedback Wheel */
|
||||
.driver_data = (unsigned long)ff_joystick },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(hid, tm_devices);
|
||||
|
|
|
@ -277,36 +277,6 @@ void ib_ud_header_init(int payload_bytes,
|
|||
}
|
||||
EXPORT_SYMBOL(ib_ud_header_init);
|
||||
|
||||
/**
|
||||
* ib_lrh_header_pack - Pack LRH header struct into wire format
|
||||
* @lrh:unpacked LRH header struct
|
||||
* @buf:Buffer to pack into
|
||||
*
|
||||
* ib_lrh_header_pack() packs the LRH header structure @lrh into
|
||||
* wire format in the buffer @buf.
|
||||
*/
|
||||
int ib_lrh_header_pack(struct ib_unpacked_lrh *lrh, void *buf)
|
||||
{
|
||||
ib_pack(lrh_table, ARRAY_SIZE(lrh_table), lrh, buf);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(ib_lrh_header_pack);
|
||||
|
||||
/**
|
||||
* ib_lrh_header_unpack - Unpack LRH structure from wire format
|
||||
* @lrh:unpacked LRH header struct
|
||||
* @buf:Buffer to pack into
|
||||
*
|
||||
* ib_lrh_header_unpack() unpacks the LRH header structure from
|
||||
* wire format (in buf) into @lrh.
|
||||
*/
|
||||
int ib_lrh_header_unpack(void *buf, struct ib_unpacked_lrh *lrh)
|
||||
{
|
||||
ib_unpack(lrh_table, ARRAY_SIZE(lrh_table), buf, lrh);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(ib_lrh_header_unpack);
|
||||
|
||||
/**
|
||||
* ib_ud_header_pack - Pack UD header struct into wire format
|
||||
* @header:UD header struct
|
||||
|
|
|
@ -40,18 +40,21 @@ void ib_copy_ah_attr_to_user(struct ib_uverbs_ah_attr *dst,
|
|||
dst->grh.sgid_index = src->grh.sgid_index;
|
||||
dst->grh.hop_limit = src->grh.hop_limit;
|
||||
dst->grh.traffic_class = src->grh.traffic_class;
|
||||
memset(&dst->grh.reserved, 0, sizeof(dst->grh.reserved));
|
||||
dst->dlid = src->dlid;
|
||||
dst->sl = src->sl;
|
||||
dst->src_path_bits = src->src_path_bits;
|
||||
dst->static_rate = src->static_rate;
|
||||
dst->is_global = src->ah_flags & IB_AH_GRH ? 1 : 0;
|
||||
dst->port_num = src->port_num;
|
||||
dst->reserved = 0;
|
||||
}
|
||||
EXPORT_SYMBOL(ib_copy_ah_attr_to_user);
|
||||
|
||||
void ib_copy_qp_attr_to_user(struct ib_uverbs_qp_attr *dst,
|
||||
struct ib_qp_attr *src)
|
||||
{
|
||||
dst->qp_state = src->qp_state;
|
||||
dst->cur_qp_state = src->cur_qp_state;
|
||||
dst->path_mtu = src->path_mtu;
|
||||
dst->path_mig_state = src->path_mig_state;
|
||||
|
@ -83,6 +86,7 @@ void ib_copy_qp_attr_to_user(struct ib_uverbs_qp_attr *dst,
|
|||
dst->rnr_retry = src->rnr_retry;
|
||||
dst->alt_port_num = src->alt_port_num;
|
||||
dst->alt_timeout = src->alt_timeout;
|
||||
memset(dst->reserved, 0, sizeof(dst->reserved));
|
||||
}
|
||||
EXPORT_SYMBOL(ib_copy_qp_attr_to_user);
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ static int eth_link_query_port(struct ib_device *ibdev, u8 port,
|
|||
struct net_device *ndev;
|
||||
enum ib_mtu tmp;
|
||||
|
||||
props->active_width = IB_WIDTH_4X;
|
||||
props->active_width = IB_WIDTH_1X;
|
||||
props->active_speed = 4;
|
||||
props->port_cap_flags = IB_PORT_CM_SUP;
|
||||
props->gid_tbl_len = to_mdev(ibdev)->dev->caps.gid_table_len[port];
|
||||
|
@ -242,7 +242,7 @@ static int eth_link_query_port(struct ib_device *ibdev, u8 port,
|
|||
tmp = iboe_get_mtu(ndev->mtu);
|
||||
props->active_mtu = tmp ? min(props->max_mtu, tmp) : IB_MTU_256;
|
||||
|
||||
props->state = netif_running(ndev) && netif_oper_up(ndev) ?
|
||||
props->state = (netif_running(ndev) && netif_carrier_ok(ndev)) ?
|
||||
IB_PORT_ACTIVE : IB_PORT_DOWN;
|
||||
props->phys_state = state_to_phys_state(props->state);
|
||||
|
||||
|
|
|
@ -1816,6 +1816,11 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
|
|||
ctrl->fence_size = (wr->send_flags & IB_SEND_FENCE ?
|
||||
MLX4_WQE_CTRL_FENCE : 0) | size;
|
||||
|
||||
if (be16_to_cpu(vlan) < 0x1000) {
|
||||
ctrl->ins_vlan = 1 << 6;
|
||||
ctrl->vlan_tag = vlan;
|
||||
}
|
||||
|
||||
/*
|
||||
* Make sure descriptor is fully written before
|
||||
* setting ownership bit (because HW can start
|
||||
|
@ -1831,11 +1836,6 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
|
|||
ctrl->owner_opcode = mlx4_ib_opcode[wr->opcode] |
|
||||
(ind & qp->sq.wqe_cnt ? cpu_to_be32(1 << 31) : 0) | blh;
|
||||
|
||||
if (be16_to_cpu(vlan) < 0x1000) {
|
||||
ctrl->ins_vlan = 1 << 6;
|
||||
ctrl->vlan_tag = vlan;
|
||||
}
|
||||
|
||||
stamp = ind + qp->sq_spare_wqes;
|
||||
ind += DIV_ROUND_UP(size * 16, 1U << qp->sq.wqe_shift);
|
||||
|
||||
|
|
|
@ -7,20 +7,20 @@ menuconfig NEW_LEDS
|
|||
This is not related to standard keyboard LEDs which are controlled
|
||||
via the input system.
|
||||
|
||||
if NEW_LEDS
|
||||
|
||||
config LEDS_CLASS
|
||||
bool "LED Class Support"
|
||||
depends on NEW_LEDS
|
||||
help
|
||||
This option enables the led sysfs class in /sys/class/leds. You'll
|
||||
need this to do anything useful with LEDs. If unsure, say N.
|
||||
|
||||
if LEDS_CLASS
|
||||
if NEW_LEDS
|
||||
|
||||
comment "LED drivers"
|
||||
|
||||
config LEDS_88PM860X
|
||||
tristate "LED Support for Marvell 88PM860x PMIC"
|
||||
depends on LEDS_CLASS
|
||||
depends on MFD_88PM860X
|
||||
help
|
||||
This option enables support for on-chip LED drivers found on Marvell
|
||||
|
@ -28,6 +28,7 @@ config LEDS_88PM860X
|
|||
|
||||
config LEDS_ATMEL_PWM
|
||||
tristate "LED Support using Atmel PWM outputs"
|
||||
depends on LEDS_CLASS
|
||||
depends on ATMEL_PWM
|
||||
help
|
||||
This option enables support for LEDs driven using outputs
|
||||
|
@ -35,6 +36,7 @@ config LEDS_ATMEL_PWM
|
|||
|
||||
config LEDS_LOCOMO
|
||||
tristate "LED Support for Locomo device"
|
||||
depends on LEDS_CLASS
|
||||
depends on SHARP_LOCOMO
|
||||
help
|
||||
This option enables support for the LEDs on Sharp Locomo.
|
||||
|
@ -42,6 +44,7 @@ config LEDS_LOCOMO
|
|||
|
||||
config LEDS_MIKROTIK_RB532
|
||||
tristate "LED Support for Mikrotik Routerboard 532"
|
||||
depends on LEDS_CLASS
|
||||
depends on MIKROTIK_RB532
|
||||
help
|
||||
This option enables support for the so called "User LED" of
|
||||
|
@ -49,6 +52,7 @@ config LEDS_MIKROTIK_RB532
|
|||
|
||||
config LEDS_S3C24XX
|
||||
tristate "LED Support for Samsung S3C24XX GPIO LEDs"
|
||||
depends on LEDS_CLASS
|
||||
depends on ARCH_S3C2410
|
||||
help
|
||||
This option enables support for LEDs connected to GPIO lines
|
||||
|
@ -56,12 +60,14 @@ config LEDS_S3C24XX
|
|||
|
||||
config LEDS_AMS_DELTA
|
||||
tristate "LED Support for the Amstrad Delta (E3)"
|
||||
depends on LEDS_CLASS
|
||||
depends on MACH_AMS_DELTA
|
||||
help
|
||||
This option enables support for the LEDs on Amstrad Delta (E3).
|
||||
|
||||
config LEDS_NET48XX
|
||||
tristate "LED Support for Soekris net48xx series Error LED"
|
||||
depends on LEDS_CLASS
|
||||
depends on SCx200_GPIO
|
||||
help
|
||||
This option enables support for the Soekris net4801 and net4826 error
|
||||
|
@ -79,18 +85,21 @@ config LEDS_NET5501
|
|||
|
||||
config LEDS_FSG
|
||||
tristate "LED Support for the Freecom FSG-3"
|
||||
depends on LEDS_CLASS
|
||||
depends on MACH_FSG
|
||||
help
|
||||
This option enables support for the LEDs on the Freecom FSG-3.
|
||||
|
||||
config LEDS_WRAP
|
||||
tristate "LED Support for the WRAP series LEDs"
|
||||
depends on LEDS_CLASS
|
||||
depends on SCx200_GPIO
|
||||
help
|
||||
This option enables support for the PCEngines WRAP programmable LEDs.
|
||||
|
||||
config LEDS_ALIX2
|
||||
tristate "LED Support for ALIX.2 and ALIX.3 series"
|
||||
depends on LEDS_CLASS
|
||||
depends on X86 && !GPIO_CS5535 && !CS5535_GPIO
|
||||
help
|
||||
This option enables support for the PCEngines ALIX.2 and ALIX.3 LEDs.
|
||||
|
@ -98,12 +107,14 @@ config LEDS_ALIX2
|
|||
|
||||
config LEDS_H1940
|
||||
tristate "LED Support for iPAQ H1940 device"
|
||||
depends on LEDS_CLASS
|
||||
depends on ARCH_H1940
|
||||
help
|
||||
This option enables support for the LEDs on the h1940.
|
||||
|
||||
config LEDS_COBALT_QUBE
|
||||
tristate "LED Support for the Cobalt Qube series front LED"
|
||||
depends on LEDS_CLASS
|
||||
depends on MIPS_COBALT
|
||||
help
|
||||
This option enables support for the front LED on Cobalt Qube series
|
||||
|
@ -117,6 +128,7 @@ config LEDS_COBALT_RAQ
|
|||
|
||||
config LEDS_SUNFIRE
|
||||
tristate "LED support for SunFire servers."
|
||||
depends on LEDS_CLASS
|
||||
depends on SPARC64
|
||||
select LEDS_TRIGGERS
|
||||
help
|
||||
|
@ -125,6 +137,7 @@ config LEDS_SUNFIRE
|
|||
|
||||
config LEDS_HP6XX
|
||||
tristate "LED Support for the HP Jornada 6xx"
|
||||
depends on LEDS_CLASS
|
||||
depends on SH_HP6XX
|
||||
help
|
||||
This option enables LED support for the handheld
|
||||
|
@ -132,6 +145,7 @@ config LEDS_HP6XX
|
|||
|
||||
config LEDS_PCA9532
|
||||
tristate "LED driver for PCA9532 dimmer"
|
||||
depends on LEDS_CLASS
|
||||
depends on I2C && INPUT && EXPERIMENTAL
|
||||
help
|
||||
This option enables support for NXP pca9532
|
||||
|
@ -140,6 +154,7 @@ config LEDS_PCA9532
|
|||
|
||||
config LEDS_GPIO
|
||||
tristate "LED Support for GPIO connected LEDs"
|
||||
depends on LEDS_CLASS
|
||||
depends on GENERIC_GPIO
|
||||
help
|
||||
This option enables support for the LEDs connected to GPIO
|
||||
|
@ -167,6 +182,7 @@ config LEDS_GPIO_OF
|
|||
|
||||
config LEDS_LP3944
|
||||
tristate "LED Support for N.S. LP3944 (Fun Light) I2C chip"
|
||||
depends on LEDS_CLASS
|
||||
depends on I2C
|
||||
help
|
||||
This option enables support for LEDs connected to the National
|
||||
|
@ -196,6 +212,7 @@ config LEDS_LP5523
|
|||
|
||||
config LEDS_CLEVO_MAIL
|
||||
tristate "Mail LED on Clevo notebook"
|
||||
depends on LEDS_CLASS
|
||||
depends on X86 && SERIO_I8042 && DMI
|
||||
help
|
||||
This driver makes the mail LED accessible from userspace
|
||||
|
@ -226,6 +243,7 @@ config LEDS_CLEVO_MAIL
|
|||
|
||||
config LEDS_PCA955X
|
||||
tristate "LED Support for PCA955x I2C chips"
|
||||
depends on LEDS_CLASS
|
||||
depends on I2C
|
||||
help
|
||||
This option enables support for LEDs connected to PCA955x
|
||||
|
@ -234,6 +252,7 @@ config LEDS_PCA955X
|
|||
|
||||
config LEDS_WM831X_STATUS
|
||||
tristate "LED support for status LEDs on WM831x PMICs"
|
||||
depends on LEDS_CLASS
|
||||
depends on MFD_WM831X
|
||||
help
|
||||
This option enables support for the status LEDs of the WM831x
|
||||
|
@ -241,6 +260,7 @@ config LEDS_WM831X_STATUS
|
|||
|
||||
config LEDS_WM8350
|
||||
tristate "LED Support for WM8350 AudioPlus PMIC"
|
||||
depends on LEDS_CLASS
|
||||
depends on MFD_WM8350
|
||||
help
|
||||
This option enables support for LEDs driven by the Wolfson
|
||||
|
@ -248,6 +268,7 @@ config LEDS_WM8350
|
|||
|
||||
config LEDS_DA903X
|
||||
tristate "LED Support for DA9030/DA9034 PMIC"
|
||||
depends on LEDS_CLASS
|
||||
depends on PMIC_DA903X
|
||||
help
|
||||
This option enables support for on-chip LED drivers found
|
||||
|
@ -255,6 +276,7 @@ config LEDS_DA903X
|
|||
|
||||
config LEDS_DAC124S085
|
||||
tristate "LED Support for DAC124S085 SPI DAC"
|
||||
depends on LEDS_CLASS
|
||||
depends on SPI
|
||||
help
|
||||
This option enables support for DAC124S085 SPI DAC from NatSemi,
|
||||
|
@ -262,18 +284,21 @@ config LEDS_DAC124S085
|
|||
|
||||
config LEDS_PWM
|
||||
tristate "PWM driven LED Support"
|
||||
depends on LEDS_CLASS
|
||||
depends on HAVE_PWM
|
||||
help
|
||||
This option enables support for pwm driven LEDs
|
||||
|
||||
config LEDS_REGULATOR
|
||||
tristate "REGULATOR driven LED support"
|
||||
depends on LEDS_CLASS
|
||||
depends on REGULATOR
|
||||
help
|
||||
This option enables support for regulator driven LEDs.
|
||||
|
||||
config LEDS_BD2802
|
||||
tristate "LED driver for BD2802 RGB LED"
|
||||
depends on LEDS_CLASS
|
||||
depends on I2C
|
||||
help
|
||||
This option enables support for BD2802GU RGB LED driver chips
|
||||
|
@ -281,6 +306,7 @@ config LEDS_BD2802
|
|||
|
||||
config LEDS_INTEL_SS4200
|
||||
tristate "LED driver for Intel NAS SS4200 series"
|
||||
depends on LEDS_CLASS
|
||||
depends on PCI && DMI
|
||||
help
|
||||
This option enables support for the Intel SS4200 series of
|
||||
|
@ -290,6 +316,7 @@ config LEDS_INTEL_SS4200
|
|||
|
||||
config LEDS_LT3593
|
||||
tristate "LED driver for LT3593 controllers"
|
||||
depends on LEDS_CLASS
|
||||
depends on GENERIC_GPIO
|
||||
help
|
||||
This option enables support for LEDs driven by a Linear Technology
|
||||
|
@ -298,6 +325,7 @@ config LEDS_LT3593
|
|||
|
||||
config LEDS_ADP5520
|
||||
tristate "LED Support for ADP5520/ADP5501 PMIC"
|
||||
depends on LEDS_CLASS
|
||||
depends on PMIC_ADP5520
|
||||
help
|
||||
This option enables support for on-chip LED drivers found
|
||||
|
@ -308,6 +336,7 @@ config LEDS_ADP5520
|
|||
|
||||
config LEDS_DELL_NETBOOKS
|
||||
tristate "External LED on Dell Business Netbooks"
|
||||
depends on LEDS_CLASS
|
||||
depends on X86 && ACPI_WMI
|
||||
help
|
||||
This adds support for the Latitude 2100 and similar
|
||||
|
@ -315,6 +344,7 @@ config LEDS_DELL_NETBOOKS
|
|||
|
||||
config LEDS_MC13783
|
||||
tristate "LED Support for MC13783 PMIC"
|
||||
depends on LEDS_CLASS
|
||||
depends on MFD_MC13783
|
||||
help
|
||||
This option enable support for on-chip LED drivers found
|
||||
|
@ -322,6 +352,7 @@ config LEDS_MC13783
|
|||
|
||||
config LEDS_NS2
|
||||
tristate "LED support for Network Space v2 GPIO LEDs"
|
||||
depends on LEDS_CLASS
|
||||
depends on MACH_NETSPACE_V2 || MACH_INETSPACE_V2 || MACH_NETSPACE_MAX_V2 || D2NET_V2
|
||||
default y
|
||||
help
|
||||
|
@ -340,17 +371,17 @@ config LEDS_NETXBIG
|
|||
|
||||
config LEDS_TRIGGERS
|
||||
bool "LED Trigger support"
|
||||
depends on LEDS_CLASS
|
||||
help
|
||||
This option enables trigger support for the leds class.
|
||||
These triggers allow kernel events to drive the LEDs and can
|
||||
be configured via sysfs. If unsure, say Y.
|
||||
|
||||
if LEDS_TRIGGERS
|
||||
|
||||
comment "LED Triggers"
|
||||
|
||||
config LEDS_TRIGGER_TIMER
|
||||
tristate "LED Timer Trigger"
|
||||
depends on LEDS_TRIGGERS
|
||||
help
|
||||
This allows LEDs to be controlled by a programmable timer
|
||||
via sysfs. Some LED hardware can be programmed to start
|
||||
|
@ -362,12 +393,14 @@ config LEDS_TRIGGER_TIMER
|
|||
config LEDS_TRIGGER_IDE_DISK
|
||||
bool "LED IDE Disk Trigger"
|
||||
depends on IDE_GD_ATA
|
||||
depends on LEDS_TRIGGERS
|
||||
help
|
||||
This allows LEDs to be controlled by IDE disk activity.
|
||||
If unsure, say Y.
|
||||
|
||||
config LEDS_TRIGGER_HEARTBEAT
|
||||
tristate "LED Heartbeat Trigger"
|
||||
depends on LEDS_TRIGGERS
|
||||
help
|
||||
This allows LEDs to be controlled by a CPU load average.
|
||||
The flash frequency is a hyperbolic function of the 1-minute
|
||||
|
@ -376,6 +409,7 @@ config LEDS_TRIGGER_HEARTBEAT
|
|||
|
||||
config LEDS_TRIGGER_BACKLIGHT
|
||||
tristate "LED backlight Trigger"
|
||||
depends on LEDS_TRIGGERS
|
||||
help
|
||||
This allows LEDs to be controlled as a backlight device: they
|
||||
turn off and on when the display is blanked and unblanked.
|
||||
|
@ -384,6 +418,7 @@ config LEDS_TRIGGER_BACKLIGHT
|
|||
|
||||
config LEDS_TRIGGER_GPIO
|
||||
tristate "LED GPIO Trigger"
|
||||
depends on LEDS_TRIGGERS
|
||||
depends on GPIOLIB
|
||||
help
|
||||
This allows LEDs to be controlled by gpio events. It's good
|
||||
|
@ -396,6 +431,7 @@ config LEDS_TRIGGER_GPIO
|
|||
|
||||
config LEDS_TRIGGER_DEFAULT_ON
|
||||
tristate "LED Default ON Trigger"
|
||||
depends on LEDS_TRIGGERS
|
||||
help
|
||||
This allows LEDs to be initialised in the ON state.
|
||||
If unsure, say Y.
|
||||
|
@ -403,8 +439,4 @@ config LEDS_TRIGGER_DEFAULT_ON
|
|||
comment "iptables trigger is under Netfilter config (LED target)"
|
||||
depends on LEDS_TRIGGERS
|
||||
|
||||
endif # LEDS_TRIGGERS
|
||||
|
||||
endif # LEDS_CLASS
|
||||
|
||||
endif # NEW_LEDS
|
||||
|
|
|
@ -102,6 +102,7 @@ config ADB_PMU_LED
|
|||
config ADB_PMU_LED_IDE
|
||||
bool "Use front LED as IDE LED by default"
|
||||
depends on ADB_PMU_LED
|
||||
depends on LEDS_CLASS
|
||||
select LEDS_TRIGGERS
|
||||
select LEDS_TRIGGER_IDE_DISK
|
||||
help
|
||||
|
|
|
@ -289,6 +289,10 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
|
|||
MLX4_GET(field, outbox, QUERY_DEV_CAP_LOG_BF_REG_SZ_OFFSET);
|
||||
dev_cap->bf_reg_size = 1 << (field & 0x1f);
|
||||
MLX4_GET(field, outbox, QUERY_DEV_CAP_LOG_MAX_BF_REGS_PER_PAGE_OFFSET);
|
||||
if ((1 << (field & 0x3f)) > (PAGE_SIZE / dev_cap->bf_reg_size)) {
|
||||
mlx4_warn(dev, "firmware bug: log2 # of blue flame regs is invalid (%d), forcing 3\n", field & 0x1f);
|
||||
field = 3;
|
||||
}
|
||||
dev_cap->bf_regs_per_page = 1 << (field & 0x3f);
|
||||
mlx4_dbg(dev, "BlueFlame available (reg size %d, regs/page %d)\n",
|
||||
dev_cap->bf_reg_size, dev_cap->bf_regs_per_page);
|
||||
|
|
|
@ -577,7 +577,7 @@ static int x25_asy_open_tty(struct tty_struct *tty)
|
|||
if (err)
|
||||
return err;
|
||||
/* Done. We have linked the TTY line to a channel. */
|
||||
return sl->dev->base_addr;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2872,7 +2872,7 @@ static struct console serial8250_console = {
|
|||
.device = uart_console_device,
|
||||
.setup = serial8250_console_setup,
|
||||
.early_setup = serial8250_console_early_setup,
|
||||
.flags = CON_PRINTBUFFER,
|
||||
.flags = CON_PRINTBUFFER | CON_ANYTIME,
|
||||
.index = -1,
|
||||
.data = &serial8250_reg,
|
||||
};
|
||||
|
|
|
@ -900,8 +900,7 @@ serial_hsu_set_termios(struct uart_port *port, struct ktermios *termios,
|
|||
unsigned char cval, fcr = 0;
|
||||
unsigned long flags;
|
||||
unsigned int baud, quot;
|
||||
u32 mul = 0x3600;
|
||||
u32 ps = 0x10;
|
||||
u32 ps, mul;
|
||||
|
||||
switch (termios->c_cflag & CSIZE) {
|
||||
case CS5:
|
||||
|
@ -943,31 +942,24 @@ serial_hsu_set_termios(struct uart_port *port, struct ktermios *termios,
|
|||
baud = uart_get_baud_rate(port, termios, old, 0, 4000000);
|
||||
|
||||
quot = 1;
|
||||
ps = 0x10;
|
||||
mul = 0x3600;
|
||||
switch (baud) {
|
||||
case 3500000:
|
||||
mul = 0x3345;
|
||||
ps = 0xC;
|
||||
break;
|
||||
case 3000000:
|
||||
mul = 0x2EE0;
|
||||
break;
|
||||
case 2500000:
|
||||
mul = 0x2710;
|
||||
break;
|
||||
case 2000000:
|
||||
mul = 0x1F40;
|
||||
break;
|
||||
case 1843200:
|
||||
mul = 0x2400;
|
||||
break;
|
||||
case 3000000:
|
||||
case 2500000:
|
||||
case 2000000:
|
||||
case 1500000:
|
||||
mul = 0x1770;
|
||||
break;
|
||||
case 1000000:
|
||||
mul = 0xFA0;
|
||||
break;
|
||||
case 500000:
|
||||
mul = 0x7D0;
|
||||
/* mul/ps/quot = 0x9C4/0x10/0x1 will make a 500000 bps */
|
||||
mul = baud / 500000 * 0x9C4;
|
||||
break;
|
||||
default:
|
||||
/* Use uart_get_divisor to get quot for other baud rates */
|
||||
|
|
|
@ -620,13 +620,13 @@ static ssize_t class_set_picture(struct device *device,
|
|||
|
||||
#define ASUS_OLED_DEVICE_ATTR(_file) dev_attr_asus_oled_##_file
|
||||
|
||||
static DEVICE_ATTR(asus_oled_enabled, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(asus_oled_enabled, S_IWUSR | S_IRUGO,
|
||||
get_enabled, set_enabled);
|
||||
static DEVICE_ATTR(asus_oled_picture, S_IWUGO , NULL, set_picture);
|
||||
static DEVICE_ATTR(asus_oled_picture, S_IWUSR , NULL, set_picture);
|
||||
|
||||
static DEVICE_ATTR(enabled, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(enabled, S_IWUSR | S_IRUGO,
|
||||
class_get_enabled, class_set_enabled);
|
||||
static DEVICE_ATTR(picture, S_IWUGO, NULL, class_set_picture);
|
||||
static DEVICE_ATTR(picture, S_IWUSR, NULL, class_set_picture);
|
||||
|
||||
static int asus_oled_probe(struct usb_interface *interface,
|
||||
const struct usb_device_id *id)
|
||||
|
|
|
@ -463,9 +463,6 @@ static void hardif_remove_interface(struct batman_if *batman_if)
|
|||
return;
|
||||
|
||||
batman_if->if_status = IF_TO_BE_REMOVED;
|
||||
|
||||
/* caller must take if_list_lock */
|
||||
list_del_rcu(&batman_if->list);
|
||||
synchronize_rcu();
|
||||
sysfs_del_hardif(&batman_if->hardif_obj);
|
||||
hardif_put(batman_if);
|
||||
|
@ -474,13 +471,21 @@ static void hardif_remove_interface(struct batman_if *batman_if)
|
|||
void hardif_remove_interfaces(void)
|
||||
{
|
||||
struct batman_if *batman_if, *batman_if_tmp;
|
||||
struct list_head if_queue;
|
||||
|
||||
INIT_LIST_HEAD(&if_queue);
|
||||
|
||||
rtnl_lock();
|
||||
spin_lock(&if_list_lock);
|
||||
list_for_each_entry_safe(batman_if, batman_if_tmp, &if_list, list) {
|
||||
hardif_remove_interface(batman_if);
|
||||
list_del_rcu(&batman_if->list);
|
||||
list_add_tail(&batman_if->list, &if_queue);
|
||||
}
|
||||
spin_unlock(&if_list_lock);
|
||||
|
||||
rtnl_lock();
|
||||
list_for_each_entry_safe(batman_if, batman_if_tmp, &if_queue, list) {
|
||||
hardif_remove_interface(batman_if);
|
||||
}
|
||||
rtnl_unlock();
|
||||
}
|
||||
|
||||
|
@ -507,8 +512,10 @@ static int hard_if_event(struct notifier_block *this,
|
|||
break;
|
||||
case NETDEV_UNREGISTER:
|
||||
spin_lock(&if_list_lock);
|
||||
hardif_remove_interface(batman_if);
|
||||
list_del_rcu(&batman_if->list);
|
||||
spin_unlock(&if_list_lock);
|
||||
|
||||
hardif_remove_interface(batman_if);
|
||||
break;
|
||||
case NETDEV_CHANGEMTU:
|
||||
if (batman_if->soft_iface)
|
||||
|
|
|
@ -194,14 +194,15 @@ void interface_rx(struct net_device *soft_iface,
|
|||
struct bat_priv *priv = netdev_priv(soft_iface);
|
||||
|
||||
/* check if enough space is available for pulling, and pull */
|
||||
if (!pskb_may_pull(skb, hdr_size)) {
|
||||
kfree_skb(skb);
|
||||
return;
|
||||
}
|
||||
if (!pskb_may_pull(skb, hdr_size))
|
||||
goto dropped;
|
||||
|
||||
skb_pull_rcsum(skb, hdr_size);
|
||||
/* skb_set_mac_header(skb, -sizeof(struct ethhdr));*/
|
||||
|
||||
/* skb->dev & skb->pkt_type are set here */
|
||||
if (unlikely(!pskb_may_pull(skb, ETH_HLEN)))
|
||||
goto dropped;
|
||||
skb->protocol = eth_type_trans(skb, soft_iface);
|
||||
|
||||
/* should not be neccesary anymore as we use skb_pull_rcsum()
|
||||
|
@ -216,6 +217,11 @@ void interface_rx(struct net_device *soft_iface,
|
|||
soft_iface->last_rx = jiffies;
|
||||
|
||||
netif_rx(skb);
|
||||
return;
|
||||
|
||||
dropped:
|
||||
kfree_skb(skb);
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef HAVE_NET_DEVICE_OPS
|
||||
|
|
|
@ -88,7 +88,9 @@ with the driver.
|
|||
|
||||
Contact Info:
|
||||
=============
|
||||
Brett Rudley brudley@broadcom.com
|
||||
Henry Ptasinski henryp@broadcom.com
|
||||
Dowan Kim dowan@broadcom.com
|
||||
Brett Rudley brudley@broadcom.com
|
||||
Henry Ptasinski henryp@broadcom.com
|
||||
Dowan Kim dowan@broadcom.com
|
||||
Roland Vossen rvossen@broadcom.com
|
||||
Arend van Spriel arend@broadcom.com
|
||||
|
||||
|
|
|
@ -46,4 +46,6 @@ Contact
|
|||
Brett Rudley <brudley@broadcom.com>
|
||||
Henry Ptasinski <henryp@broadcom.com>
|
||||
Dowan Kim <dowan@broadcom.com>
|
||||
Roland Vossen <rvossen@broadcom.com>
|
||||
Arend van Spriel <arend@broadcom.com>
|
||||
|
||||
|
|
|
@ -2295,8 +2295,8 @@ static void tidy_up(struct usbduxsub *usbduxsub_tmp)
|
|||
usbduxsub_tmp->inBuffer = NULL;
|
||||
kfree(usbduxsub_tmp->insnBuffer);
|
||||
usbduxsub_tmp->insnBuffer = NULL;
|
||||
kfree(usbduxsub_tmp->inBuffer);
|
||||
usbduxsub_tmp->inBuffer = NULL;
|
||||
kfree(usbduxsub_tmp->outBuffer);
|
||||
usbduxsub_tmp->outBuffer = NULL;
|
||||
kfree(usbduxsub_tmp->dac_commands);
|
||||
usbduxsub_tmp->dac_commands = NULL;
|
||||
kfree(usbduxsub_tmp->dux_commands);
|
||||
|
|
|
@ -75,6 +75,7 @@
|
|||
#include <linux/errno.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kref.h>
|
||||
#include <linux/usb.h>
|
||||
|
|
|
@ -204,7 +204,7 @@ static void usb_tranzport_abort_transfers(struct usb_tranzport *dev)
|
|||
t->value = temp; \
|
||||
return count; \
|
||||
} \
|
||||
static DEVICE_ATTR(value, S_IWUGO | S_IRUGO, show_##value, set_##value);
|
||||
static DEVICE_ATTR(value, S_IWUSR | S_IRUGO, show_##value, set_##value);
|
||||
|
||||
show_int(enable);
|
||||
show_int(offline);
|
||||
|
|
|
@ -507,7 +507,7 @@ static IIO_DEVICE_ATTR(reset, S_IWUSR, NULL,
|
|||
adis16220_write_reset, 0);
|
||||
|
||||
#define IIO_DEV_ATTR_CAPTURE(_store) \
|
||||
IIO_DEVICE_ATTR(capture, S_IWUGO, NULL, _store, 0)
|
||||
IIO_DEVICE_ATTR(capture, S_IWUSR, NULL, _store, 0)
|
||||
|
||||
static IIO_DEV_ATTR_CAPTURE(adis16220_write_capture);
|
||||
|
||||
|
|
|
@ -1269,7 +1269,7 @@ int sst_decode(int str_id, struct snd_sst_dbufs *dbufs)
|
|||
dbufs->output_bytes_produced = total_output;
|
||||
str_info->status = str_info->prev;
|
||||
str_info->prev = STREAM_DECODE;
|
||||
str_info->decode_ibuf = NULL;
|
||||
kfree(str_info->decode_ibuf);
|
||||
str_info->decode_ibuf = NULL;
|
||||
return retval;
|
||||
}
|
||||
|
|
|
@ -266,210 +266,210 @@ VARIAX_PARAM_R(float, mix2);
|
|||
VARIAX_PARAM_R(float, mix1);
|
||||
VARIAX_PARAM_R(int, pickup_wiring);
|
||||
|
||||
static DEVICE_ATTR(tweak, S_IWUGO | S_IRUGO, pod_get_tweak, pod_set_tweak);
|
||||
static DEVICE_ATTR(wah_position, S_IWUGO | S_IRUGO, pod_get_wah_position,
|
||||
static DEVICE_ATTR(tweak, S_IWUSR | S_IRUGO, pod_get_tweak, pod_set_tweak);
|
||||
static DEVICE_ATTR(wah_position, S_IWUSR | S_IRUGO, pod_get_wah_position,
|
||||
pod_set_wah_position);
|
||||
static DEVICE_ATTR(compression_gain, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(compression_gain, S_IWUSR | S_IRUGO,
|
||||
pod_get_compression_gain, pod_set_compression_gain);
|
||||
static DEVICE_ATTR(vol_pedal_position, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(vol_pedal_position, S_IWUSR | S_IRUGO,
|
||||
pod_get_vol_pedal_position, pod_set_vol_pedal_position);
|
||||
static DEVICE_ATTR(compression_threshold, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(compression_threshold, S_IWUSR | S_IRUGO,
|
||||
pod_get_compression_threshold,
|
||||
pod_set_compression_threshold);
|
||||
static DEVICE_ATTR(pan, S_IWUGO | S_IRUGO, pod_get_pan, pod_set_pan);
|
||||
static DEVICE_ATTR(amp_model_setup, S_IWUGO | S_IRUGO, pod_get_amp_model_setup,
|
||||
static DEVICE_ATTR(pan, S_IWUSR | S_IRUGO, pod_get_pan, pod_set_pan);
|
||||
static DEVICE_ATTR(amp_model_setup, S_IWUSR | S_IRUGO, pod_get_amp_model_setup,
|
||||
pod_set_amp_model_setup);
|
||||
static DEVICE_ATTR(amp_model, S_IWUGO | S_IRUGO, pod_get_amp_model,
|
||||
static DEVICE_ATTR(amp_model, S_IWUSR | S_IRUGO, pod_get_amp_model,
|
||||
pod_set_amp_model);
|
||||
static DEVICE_ATTR(drive, S_IWUGO | S_IRUGO, pod_get_drive, pod_set_drive);
|
||||
static DEVICE_ATTR(bass, S_IWUGO | S_IRUGO, pod_get_bass, pod_set_bass);
|
||||
static DEVICE_ATTR(mid, S_IWUGO | S_IRUGO, pod_get_mid, pod_set_mid);
|
||||
static DEVICE_ATTR(lowmid, S_IWUGO | S_IRUGO, pod_get_lowmid, pod_set_lowmid);
|
||||
static DEVICE_ATTR(treble, S_IWUGO | S_IRUGO, pod_get_treble, pod_set_treble);
|
||||
static DEVICE_ATTR(highmid, S_IWUGO | S_IRUGO, pod_get_highmid,
|
||||
static DEVICE_ATTR(drive, S_IWUSR | S_IRUGO, pod_get_drive, pod_set_drive);
|
||||
static DEVICE_ATTR(bass, S_IWUSR | S_IRUGO, pod_get_bass, pod_set_bass);
|
||||
static DEVICE_ATTR(mid, S_IWUSR | S_IRUGO, pod_get_mid, pod_set_mid);
|
||||
static DEVICE_ATTR(lowmid, S_IWUSR | S_IRUGO, pod_get_lowmid, pod_set_lowmid);
|
||||
static DEVICE_ATTR(treble, S_IWUSR | S_IRUGO, pod_get_treble, pod_set_treble);
|
||||
static DEVICE_ATTR(highmid, S_IWUSR | S_IRUGO, pod_get_highmid,
|
||||
pod_set_highmid);
|
||||
static DEVICE_ATTR(chan_vol, S_IWUGO | S_IRUGO, pod_get_chan_vol,
|
||||
static DEVICE_ATTR(chan_vol, S_IWUSR | S_IRUGO, pod_get_chan_vol,
|
||||
pod_set_chan_vol);
|
||||
static DEVICE_ATTR(reverb_mix, S_IWUGO | S_IRUGO, pod_get_reverb_mix,
|
||||
static DEVICE_ATTR(reverb_mix, S_IWUSR | S_IRUGO, pod_get_reverb_mix,
|
||||
pod_set_reverb_mix);
|
||||
static DEVICE_ATTR(effect_setup, S_IWUGO | S_IRUGO, pod_get_effect_setup,
|
||||
static DEVICE_ATTR(effect_setup, S_IWUSR | S_IRUGO, pod_get_effect_setup,
|
||||
pod_set_effect_setup);
|
||||
static DEVICE_ATTR(band_1_frequency, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(band_1_frequency, S_IWUSR | S_IRUGO,
|
||||
pod_get_band_1_frequency, pod_set_band_1_frequency);
|
||||
static DEVICE_ATTR(presence, S_IWUGO | S_IRUGO, pod_get_presence,
|
||||
static DEVICE_ATTR(presence, S_IWUSR | S_IRUGO, pod_get_presence,
|
||||
pod_set_presence);
|
||||
static DEVICE_ATTR2(treble__bass, treble, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR2(treble__bass, treble, S_IWUSR | S_IRUGO,
|
||||
pod_get_treble__bass, pod_set_treble__bass);
|
||||
static DEVICE_ATTR(noise_gate_enable, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(noise_gate_enable, S_IWUSR | S_IRUGO,
|
||||
pod_get_noise_gate_enable, pod_set_noise_gate_enable);
|
||||
static DEVICE_ATTR(gate_threshold, S_IWUGO | S_IRUGO, pod_get_gate_threshold,
|
||||
static DEVICE_ATTR(gate_threshold, S_IWUSR | S_IRUGO, pod_get_gate_threshold,
|
||||
pod_set_gate_threshold);
|
||||
static DEVICE_ATTR(gate_decay_time, S_IWUGO | S_IRUGO, pod_get_gate_decay_time,
|
||||
static DEVICE_ATTR(gate_decay_time, S_IWUSR | S_IRUGO, pod_get_gate_decay_time,
|
||||
pod_set_gate_decay_time);
|
||||
static DEVICE_ATTR(stomp_enable, S_IWUGO | S_IRUGO, pod_get_stomp_enable,
|
||||
static DEVICE_ATTR(stomp_enable, S_IWUSR | S_IRUGO, pod_get_stomp_enable,
|
||||
pod_set_stomp_enable);
|
||||
static DEVICE_ATTR(comp_enable, S_IWUGO | S_IRUGO, pod_get_comp_enable,
|
||||
static DEVICE_ATTR(comp_enable, S_IWUSR | S_IRUGO, pod_get_comp_enable,
|
||||
pod_set_comp_enable);
|
||||
static DEVICE_ATTR(stomp_time, S_IWUGO | S_IRUGO, pod_get_stomp_time,
|
||||
static DEVICE_ATTR(stomp_time, S_IWUSR | S_IRUGO, pod_get_stomp_time,
|
||||
pod_set_stomp_time);
|
||||
static DEVICE_ATTR(delay_enable, S_IWUGO | S_IRUGO, pod_get_delay_enable,
|
||||
static DEVICE_ATTR(delay_enable, S_IWUSR | S_IRUGO, pod_get_delay_enable,
|
||||
pod_set_delay_enable);
|
||||
static DEVICE_ATTR(mod_param_1, S_IWUGO | S_IRUGO, pod_get_mod_param_1,
|
||||
static DEVICE_ATTR(mod_param_1, S_IWUSR | S_IRUGO, pod_get_mod_param_1,
|
||||
pod_set_mod_param_1);
|
||||
static DEVICE_ATTR(delay_param_1, S_IWUGO | S_IRUGO, pod_get_delay_param_1,
|
||||
static DEVICE_ATTR(delay_param_1, S_IWUSR | S_IRUGO, pod_get_delay_param_1,
|
||||
pod_set_delay_param_1);
|
||||
static DEVICE_ATTR(delay_param_1_note_value, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(delay_param_1_note_value, S_IWUSR | S_IRUGO,
|
||||
pod_get_delay_param_1_note_value,
|
||||
pod_set_delay_param_1_note_value);
|
||||
static DEVICE_ATTR2(band_2_frequency__bass, band_2_frequency, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR2(band_2_frequency__bass, band_2_frequency, S_IWUSR | S_IRUGO,
|
||||
pod_get_band_2_frequency__bass,
|
||||
pod_set_band_2_frequency__bass);
|
||||
static DEVICE_ATTR(delay_param_2, S_IWUGO | S_IRUGO, pod_get_delay_param_2,
|
||||
static DEVICE_ATTR(delay_param_2, S_IWUSR | S_IRUGO, pod_get_delay_param_2,
|
||||
pod_set_delay_param_2);
|
||||
static DEVICE_ATTR(delay_volume_mix, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(delay_volume_mix, S_IWUSR | S_IRUGO,
|
||||
pod_get_delay_volume_mix, pod_set_delay_volume_mix);
|
||||
static DEVICE_ATTR(delay_param_3, S_IWUGO | S_IRUGO, pod_get_delay_param_3,
|
||||
static DEVICE_ATTR(delay_param_3, S_IWUSR | S_IRUGO, pod_get_delay_param_3,
|
||||
pod_set_delay_param_3);
|
||||
static DEVICE_ATTR(reverb_enable, S_IWUGO | S_IRUGO, pod_get_reverb_enable,
|
||||
static DEVICE_ATTR(reverb_enable, S_IWUSR | S_IRUGO, pod_get_reverb_enable,
|
||||
pod_set_reverb_enable);
|
||||
static DEVICE_ATTR(reverb_type, S_IWUGO | S_IRUGO, pod_get_reverb_type,
|
||||
static DEVICE_ATTR(reverb_type, S_IWUSR | S_IRUGO, pod_get_reverb_type,
|
||||
pod_set_reverb_type);
|
||||
static DEVICE_ATTR(reverb_decay, S_IWUGO | S_IRUGO, pod_get_reverb_decay,
|
||||
static DEVICE_ATTR(reverb_decay, S_IWUSR | S_IRUGO, pod_get_reverb_decay,
|
||||
pod_set_reverb_decay);
|
||||
static DEVICE_ATTR(reverb_tone, S_IWUGO | S_IRUGO, pod_get_reverb_tone,
|
||||
static DEVICE_ATTR(reverb_tone, S_IWUSR | S_IRUGO, pod_get_reverb_tone,
|
||||
pod_set_reverb_tone);
|
||||
static DEVICE_ATTR(reverb_pre_delay, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(reverb_pre_delay, S_IWUSR | S_IRUGO,
|
||||
pod_get_reverb_pre_delay, pod_set_reverb_pre_delay);
|
||||
static DEVICE_ATTR(reverb_pre_post, S_IWUGO | S_IRUGO, pod_get_reverb_pre_post,
|
||||
static DEVICE_ATTR(reverb_pre_post, S_IWUSR | S_IRUGO, pod_get_reverb_pre_post,
|
||||
pod_set_reverb_pre_post);
|
||||
static DEVICE_ATTR(band_2_frequency, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(band_2_frequency, S_IWUSR | S_IRUGO,
|
||||
pod_get_band_2_frequency, pod_set_band_2_frequency);
|
||||
static DEVICE_ATTR2(band_3_frequency__bass, band_3_frequency, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR2(band_3_frequency__bass, band_3_frequency, S_IWUSR | S_IRUGO,
|
||||
pod_get_band_3_frequency__bass,
|
||||
pod_set_band_3_frequency__bass);
|
||||
static DEVICE_ATTR(wah_enable, S_IWUGO | S_IRUGO, pod_get_wah_enable,
|
||||
static DEVICE_ATTR(wah_enable, S_IWUSR | S_IRUGO, pod_get_wah_enable,
|
||||
pod_set_wah_enable);
|
||||
static DEVICE_ATTR(modulation_lo_cut, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(modulation_lo_cut, S_IWUSR | S_IRUGO,
|
||||
pod_get_modulation_lo_cut, pod_set_modulation_lo_cut);
|
||||
static DEVICE_ATTR(delay_reverb_lo_cut, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(delay_reverb_lo_cut, S_IWUSR | S_IRUGO,
|
||||
pod_get_delay_reverb_lo_cut, pod_set_delay_reverb_lo_cut);
|
||||
static DEVICE_ATTR(volume_pedal_minimum, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(volume_pedal_minimum, S_IWUSR | S_IRUGO,
|
||||
pod_get_volume_pedal_minimum, pod_set_volume_pedal_minimum);
|
||||
static DEVICE_ATTR(eq_pre_post, S_IWUGO | S_IRUGO, pod_get_eq_pre_post,
|
||||
static DEVICE_ATTR(eq_pre_post, S_IWUSR | S_IRUGO, pod_get_eq_pre_post,
|
||||
pod_set_eq_pre_post);
|
||||
static DEVICE_ATTR(volume_pre_post, S_IWUGO | S_IRUGO, pod_get_volume_pre_post,
|
||||
static DEVICE_ATTR(volume_pre_post, S_IWUSR | S_IRUGO, pod_get_volume_pre_post,
|
||||
pod_set_volume_pre_post);
|
||||
static DEVICE_ATTR(di_model, S_IWUGO | S_IRUGO, pod_get_di_model,
|
||||
static DEVICE_ATTR(di_model, S_IWUSR | S_IRUGO, pod_get_di_model,
|
||||
pod_set_di_model);
|
||||
static DEVICE_ATTR(di_delay, S_IWUGO | S_IRUGO, pod_get_di_delay,
|
||||
static DEVICE_ATTR(di_delay, S_IWUSR | S_IRUGO, pod_get_di_delay,
|
||||
pod_set_di_delay);
|
||||
static DEVICE_ATTR(mod_enable, S_IWUGO | S_IRUGO, pod_get_mod_enable,
|
||||
static DEVICE_ATTR(mod_enable, S_IWUSR | S_IRUGO, pod_get_mod_enable,
|
||||
pod_set_mod_enable);
|
||||
static DEVICE_ATTR(mod_param_1_note_value, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(mod_param_1_note_value, S_IWUSR | S_IRUGO,
|
||||
pod_get_mod_param_1_note_value,
|
||||
pod_set_mod_param_1_note_value);
|
||||
static DEVICE_ATTR(mod_param_2, S_IWUGO | S_IRUGO, pod_get_mod_param_2,
|
||||
static DEVICE_ATTR(mod_param_2, S_IWUSR | S_IRUGO, pod_get_mod_param_2,
|
||||
pod_set_mod_param_2);
|
||||
static DEVICE_ATTR(mod_param_3, S_IWUGO | S_IRUGO, pod_get_mod_param_3,
|
||||
static DEVICE_ATTR(mod_param_3, S_IWUSR | S_IRUGO, pod_get_mod_param_3,
|
||||
pod_set_mod_param_3);
|
||||
static DEVICE_ATTR(mod_param_4, S_IWUGO | S_IRUGO, pod_get_mod_param_4,
|
||||
static DEVICE_ATTR(mod_param_4, S_IWUSR | S_IRUGO, pod_get_mod_param_4,
|
||||
pod_set_mod_param_4);
|
||||
static DEVICE_ATTR(mod_param_5, S_IWUGO | S_IRUGO, pod_get_mod_param_5,
|
||||
static DEVICE_ATTR(mod_param_5, S_IWUSR | S_IRUGO, pod_get_mod_param_5,
|
||||
pod_set_mod_param_5);
|
||||
static DEVICE_ATTR(mod_volume_mix, S_IWUGO | S_IRUGO, pod_get_mod_volume_mix,
|
||||
static DEVICE_ATTR(mod_volume_mix, S_IWUSR | S_IRUGO, pod_get_mod_volume_mix,
|
||||
pod_set_mod_volume_mix);
|
||||
static DEVICE_ATTR(mod_pre_post, S_IWUGO | S_IRUGO, pod_get_mod_pre_post,
|
||||
static DEVICE_ATTR(mod_pre_post, S_IWUSR | S_IRUGO, pod_get_mod_pre_post,
|
||||
pod_set_mod_pre_post);
|
||||
static DEVICE_ATTR(modulation_model, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(modulation_model, S_IWUSR | S_IRUGO,
|
||||
pod_get_modulation_model, pod_set_modulation_model);
|
||||
static DEVICE_ATTR(band_3_frequency, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(band_3_frequency, S_IWUSR | S_IRUGO,
|
||||
pod_get_band_3_frequency, pod_set_band_3_frequency);
|
||||
static DEVICE_ATTR2(band_4_frequency__bass, band_4_frequency, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR2(band_4_frequency__bass, band_4_frequency, S_IWUSR | S_IRUGO,
|
||||
pod_get_band_4_frequency__bass,
|
||||
pod_set_band_4_frequency__bass);
|
||||
static DEVICE_ATTR(mod_param_1_double_precision, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(mod_param_1_double_precision, S_IWUSR | S_IRUGO,
|
||||
pod_get_mod_param_1_double_precision,
|
||||
pod_set_mod_param_1_double_precision);
|
||||
static DEVICE_ATTR(delay_param_1_double_precision, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(delay_param_1_double_precision, S_IWUSR | S_IRUGO,
|
||||
pod_get_delay_param_1_double_precision,
|
||||
pod_set_delay_param_1_double_precision);
|
||||
static DEVICE_ATTR(eq_enable, S_IWUGO | S_IRUGO, pod_get_eq_enable,
|
||||
static DEVICE_ATTR(eq_enable, S_IWUSR | S_IRUGO, pod_get_eq_enable,
|
||||
pod_set_eq_enable);
|
||||
static DEVICE_ATTR(tap, S_IWUGO | S_IRUGO, pod_get_tap, pod_set_tap);
|
||||
static DEVICE_ATTR(volume_tweak_pedal_assign, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(tap, S_IWUSR | S_IRUGO, pod_get_tap, pod_set_tap);
|
||||
static DEVICE_ATTR(volume_tweak_pedal_assign, S_IWUSR | S_IRUGO,
|
||||
pod_get_volume_tweak_pedal_assign,
|
||||
pod_set_volume_tweak_pedal_assign);
|
||||
static DEVICE_ATTR(band_5_frequency, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(band_5_frequency, S_IWUSR | S_IRUGO,
|
||||
pod_get_band_5_frequency, pod_set_band_5_frequency);
|
||||
static DEVICE_ATTR(tuner, S_IWUGO | S_IRUGO, pod_get_tuner, pod_set_tuner);
|
||||
static DEVICE_ATTR(mic_selection, S_IWUGO | S_IRUGO, pod_get_mic_selection,
|
||||
static DEVICE_ATTR(tuner, S_IWUSR | S_IRUGO, pod_get_tuner, pod_set_tuner);
|
||||
static DEVICE_ATTR(mic_selection, S_IWUSR | S_IRUGO, pod_get_mic_selection,
|
||||
pod_set_mic_selection);
|
||||
static DEVICE_ATTR(cabinet_model, S_IWUGO | S_IRUGO, pod_get_cabinet_model,
|
||||
static DEVICE_ATTR(cabinet_model, S_IWUSR | S_IRUGO, pod_get_cabinet_model,
|
||||
pod_set_cabinet_model);
|
||||
static DEVICE_ATTR(stomp_model, S_IWUGO | S_IRUGO, pod_get_stomp_model,
|
||||
static DEVICE_ATTR(stomp_model, S_IWUSR | S_IRUGO, pod_get_stomp_model,
|
||||
pod_set_stomp_model);
|
||||
static DEVICE_ATTR(roomlevel, S_IWUGO | S_IRUGO, pod_get_roomlevel,
|
||||
static DEVICE_ATTR(roomlevel, S_IWUSR | S_IRUGO, pod_get_roomlevel,
|
||||
pod_set_roomlevel);
|
||||
static DEVICE_ATTR(band_4_frequency, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(band_4_frequency, S_IWUSR | S_IRUGO,
|
||||
pod_get_band_4_frequency, pod_set_band_4_frequency);
|
||||
static DEVICE_ATTR(band_6_frequency, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(band_6_frequency, S_IWUSR | S_IRUGO,
|
||||
pod_get_band_6_frequency, pod_set_band_6_frequency);
|
||||
static DEVICE_ATTR(stomp_param_1_note_value, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(stomp_param_1_note_value, S_IWUSR | S_IRUGO,
|
||||
pod_get_stomp_param_1_note_value,
|
||||
pod_set_stomp_param_1_note_value);
|
||||
static DEVICE_ATTR(stomp_param_2, S_IWUGO | S_IRUGO, pod_get_stomp_param_2,
|
||||
static DEVICE_ATTR(stomp_param_2, S_IWUSR | S_IRUGO, pod_get_stomp_param_2,
|
||||
pod_set_stomp_param_2);
|
||||
static DEVICE_ATTR(stomp_param_3, S_IWUGO | S_IRUGO, pod_get_stomp_param_3,
|
||||
static DEVICE_ATTR(stomp_param_3, S_IWUSR | S_IRUGO, pod_get_stomp_param_3,
|
||||
pod_set_stomp_param_3);
|
||||
static DEVICE_ATTR(stomp_param_4, S_IWUGO | S_IRUGO, pod_get_stomp_param_4,
|
||||
static DEVICE_ATTR(stomp_param_4, S_IWUSR | S_IRUGO, pod_get_stomp_param_4,
|
||||
pod_set_stomp_param_4);
|
||||
static DEVICE_ATTR(stomp_param_5, S_IWUGO | S_IRUGO, pod_get_stomp_param_5,
|
||||
static DEVICE_ATTR(stomp_param_5, S_IWUSR | S_IRUGO, pod_get_stomp_param_5,
|
||||
pod_set_stomp_param_5);
|
||||
static DEVICE_ATTR(stomp_param_6, S_IWUGO | S_IRUGO, pod_get_stomp_param_6,
|
||||
static DEVICE_ATTR(stomp_param_6, S_IWUSR | S_IRUGO, pod_get_stomp_param_6,
|
||||
pod_set_stomp_param_6);
|
||||
static DEVICE_ATTR(amp_switch_select, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(amp_switch_select, S_IWUSR | S_IRUGO,
|
||||
pod_get_amp_switch_select, pod_set_amp_switch_select);
|
||||
static DEVICE_ATTR(delay_param_4, S_IWUGO | S_IRUGO, pod_get_delay_param_4,
|
||||
static DEVICE_ATTR(delay_param_4, S_IWUSR | S_IRUGO, pod_get_delay_param_4,
|
||||
pod_set_delay_param_4);
|
||||
static DEVICE_ATTR(delay_param_5, S_IWUGO | S_IRUGO, pod_get_delay_param_5,
|
||||
static DEVICE_ATTR(delay_param_5, S_IWUSR | S_IRUGO, pod_get_delay_param_5,
|
||||
pod_set_delay_param_5);
|
||||
static DEVICE_ATTR(delay_pre_post, S_IWUGO | S_IRUGO, pod_get_delay_pre_post,
|
||||
static DEVICE_ATTR(delay_pre_post, S_IWUSR | S_IRUGO, pod_get_delay_pre_post,
|
||||
pod_set_delay_pre_post);
|
||||
static DEVICE_ATTR(delay_model, S_IWUGO | S_IRUGO, pod_get_delay_model,
|
||||
static DEVICE_ATTR(delay_model, S_IWUSR | S_IRUGO, pod_get_delay_model,
|
||||
pod_set_delay_model);
|
||||
static DEVICE_ATTR(delay_verb_model, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(delay_verb_model, S_IWUSR | S_IRUGO,
|
||||
pod_get_delay_verb_model, pod_set_delay_verb_model);
|
||||
static DEVICE_ATTR(tempo_msb, S_IWUGO | S_IRUGO, pod_get_tempo_msb,
|
||||
static DEVICE_ATTR(tempo_msb, S_IWUSR | S_IRUGO, pod_get_tempo_msb,
|
||||
pod_set_tempo_msb);
|
||||
static DEVICE_ATTR(tempo_lsb, S_IWUGO | S_IRUGO, pod_get_tempo_lsb,
|
||||
static DEVICE_ATTR(tempo_lsb, S_IWUSR | S_IRUGO, pod_get_tempo_lsb,
|
||||
pod_set_tempo_lsb);
|
||||
static DEVICE_ATTR(wah_model, S_IWUGO | S_IRUGO, pod_get_wah_model,
|
||||
static DEVICE_ATTR(wah_model, S_IWUSR | S_IRUGO, pod_get_wah_model,
|
||||
pod_set_wah_model);
|
||||
static DEVICE_ATTR(bypass_volume, S_IWUGO | S_IRUGO, pod_get_bypass_volume,
|
||||
static DEVICE_ATTR(bypass_volume, S_IWUSR | S_IRUGO, pod_get_bypass_volume,
|
||||
pod_set_bypass_volume);
|
||||
static DEVICE_ATTR(fx_loop_on_off, S_IWUGO | S_IRUGO, pod_get_fx_loop_on_off,
|
||||
static DEVICE_ATTR(fx_loop_on_off, S_IWUSR | S_IRUGO, pod_get_fx_loop_on_off,
|
||||
pod_set_fx_loop_on_off);
|
||||
static DEVICE_ATTR(tweak_param_select, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(tweak_param_select, S_IWUSR | S_IRUGO,
|
||||
pod_get_tweak_param_select, pod_set_tweak_param_select);
|
||||
static DEVICE_ATTR(amp1_engage, S_IWUGO | S_IRUGO, pod_get_amp1_engage,
|
||||
static DEVICE_ATTR(amp1_engage, S_IWUSR | S_IRUGO, pod_get_amp1_engage,
|
||||
pod_set_amp1_engage);
|
||||
static DEVICE_ATTR(band_1_gain, S_IWUGO | S_IRUGO, pod_get_band_1_gain,
|
||||
static DEVICE_ATTR(band_1_gain, S_IWUSR | S_IRUGO, pod_get_band_1_gain,
|
||||
pod_set_band_1_gain);
|
||||
static DEVICE_ATTR2(band_2_gain__bass, band_2_gain, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR2(band_2_gain__bass, band_2_gain, S_IWUSR | S_IRUGO,
|
||||
pod_get_band_2_gain__bass, pod_set_band_2_gain__bass);
|
||||
static DEVICE_ATTR(band_2_gain, S_IWUGO | S_IRUGO, pod_get_band_2_gain,
|
||||
static DEVICE_ATTR(band_2_gain, S_IWUSR | S_IRUGO, pod_get_band_2_gain,
|
||||
pod_set_band_2_gain);
|
||||
static DEVICE_ATTR2(band_3_gain__bass, band_3_gain, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR2(band_3_gain__bass, band_3_gain, S_IWUSR | S_IRUGO,
|
||||
pod_get_band_3_gain__bass, pod_set_band_3_gain__bass);
|
||||
static DEVICE_ATTR(band_3_gain, S_IWUGO | S_IRUGO, pod_get_band_3_gain,
|
||||
static DEVICE_ATTR(band_3_gain, S_IWUSR | S_IRUGO, pod_get_band_3_gain,
|
||||
pod_set_band_3_gain);
|
||||
static DEVICE_ATTR2(band_4_gain__bass, band_4_gain, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR2(band_4_gain__bass, band_4_gain, S_IWUSR | S_IRUGO,
|
||||
pod_get_band_4_gain__bass, pod_set_band_4_gain__bass);
|
||||
static DEVICE_ATTR2(band_5_gain__bass, band_5_gain, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR2(band_5_gain__bass, band_5_gain, S_IWUSR | S_IRUGO,
|
||||
pod_get_band_5_gain__bass, pod_set_band_5_gain__bass);
|
||||
static DEVICE_ATTR(band_4_gain, S_IWUGO | S_IRUGO, pod_get_band_4_gain,
|
||||
static DEVICE_ATTR(band_4_gain, S_IWUSR | S_IRUGO, pod_get_band_4_gain,
|
||||
pod_set_band_4_gain);
|
||||
static DEVICE_ATTR2(band_6_gain__bass, band_6_gain, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR2(band_6_gain__bass, band_6_gain, S_IWUSR | S_IRUGO,
|
||||
pod_get_band_6_gain__bass, pod_set_band_6_gain__bass);
|
||||
static DEVICE_ATTR(body, S_IRUGO, variax_get_body, line6_nop_write);
|
||||
static DEVICE_ATTR(pickup1_enable, S_IRUGO, variax_get_pickup1_enable,
|
||||
|
|
|
@ -350,9 +350,9 @@ static ssize_t midi_set_midi_mask_receive(struct device *dev,
|
|||
return count;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(midi_mask_transmit, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(midi_mask_transmit, S_IWUSR | S_IRUGO,
|
||||
midi_get_midi_mask_transmit, midi_set_midi_mask_transmit);
|
||||
static DEVICE_ATTR(midi_mask_receive, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(midi_mask_receive, S_IWUSR | S_IRUGO,
|
||||
midi_get_midi_mask_receive, midi_set_midi_mask_receive);
|
||||
|
||||
/* MIDI device destructor */
|
||||
|
|
|
@ -79,9 +79,9 @@ static ssize_t pcm_set_impulse_period(struct device *dev,
|
|||
return count;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(impulse_volume, S_IWUGO | S_IRUGO, pcm_get_impulse_volume,
|
||||
static DEVICE_ATTR(impulse_volume, S_IWUSR | S_IRUGO, pcm_get_impulse_volume,
|
||||
pcm_set_impulse_volume);
|
||||
static DEVICE_ATTR(impulse_period, S_IWUGO | S_IRUGO, pcm_get_impulse_period,
|
||||
static DEVICE_ATTR(impulse_period, S_IWUSR | S_IRUGO, pcm_get_impulse_period,
|
||||
pcm_set_impulse_period);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1051,48 +1051,48 @@ POD_GET_SYSTEM_PARAM(tuner_pitch, 1);
|
|||
#undef GET_SYSTEM_PARAM
|
||||
|
||||
/* POD special files: */
|
||||
static DEVICE_ATTR(channel, S_IWUGO | S_IRUGO, pod_get_channel,
|
||||
static DEVICE_ATTR(channel, S_IWUSR | S_IRUGO, pod_get_channel,
|
||||
pod_set_channel);
|
||||
static DEVICE_ATTR(clip, S_IRUGO, pod_wait_for_clip, line6_nop_write);
|
||||
static DEVICE_ATTR(device_id, S_IRUGO, pod_get_device_id, line6_nop_write);
|
||||
static DEVICE_ATTR(dirty, S_IRUGO, pod_get_dirty, line6_nop_write);
|
||||
static DEVICE_ATTR(dump, S_IWUGO | S_IRUGO, pod_get_dump, pod_set_dump);
|
||||
static DEVICE_ATTR(dump_buf, S_IWUGO | S_IRUGO, pod_get_dump_buf,
|
||||
static DEVICE_ATTR(dump, S_IWUSR | S_IRUGO, pod_get_dump, pod_set_dump);
|
||||
static DEVICE_ATTR(dump_buf, S_IWUSR | S_IRUGO, pod_get_dump_buf,
|
||||
pod_set_dump_buf);
|
||||
static DEVICE_ATTR(finish, S_IWUGO, line6_nop_read, pod_set_finish);
|
||||
static DEVICE_ATTR(finish, S_IWUSR, line6_nop_read, pod_set_finish);
|
||||
static DEVICE_ATTR(firmware_version, S_IRUGO, pod_get_firmware_version,
|
||||
line6_nop_write);
|
||||
static DEVICE_ATTR(midi_postprocess, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(midi_postprocess, S_IWUSR | S_IRUGO,
|
||||
pod_get_midi_postprocess, pod_set_midi_postprocess);
|
||||
static DEVICE_ATTR(monitor_level, S_IWUGO | S_IRUGO, pod_get_monitor_level,
|
||||
static DEVICE_ATTR(monitor_level, S_IWUSR | S_IRUGO, pod_get_monitor_level,
|
||||
pod_set_monitor_level);
|
||||
static DEVICE_ATTR(name, S_IRUGO, pod_get_name, line6_nop_write);
|
||||
static DEVICE_ATTR(name_buf, S_IRUGO, pod_get_name_buf, line6_nop_write);
|
||||
static DEVICE_ATTR(retrieve_amp_setup, S_IWUGO, line6_nop_read,
|
||||
static DEVICE_ATTR(retrieve_amp_setup, S_IWUSR, line6_nop_read,
|
||||
pod_set_retrieve_amp_setup);
|
||||
static DEVICE_ATTR(retrieve_channel, S_IWUGO, line6_nop_read,
|
||||
static DEVICE_ATTR(retrieve_channel, S_IWUSR, line6_nop_read,
|
||||
pod_set_retrieve_channel);
|
||||
static DEVICE_ATTR(retrieve_effects_setup, S_IWUGO, line6_nop_read,
|
||||
static DEVICE_ATTR(retrieve_effects_setup, S_IWUSR, line6_nop_read,
|
||||
pod_set_retrieve_effects_setup);
|
||||
static DEVICE_ATTR(routing, S_IWUGO | S_IRUGO, pod_get_routing,
|
||||
static DEVICE_ATTR(routing, S_IWUSR | S_IRUGO, pod_get_routing,
|
||||
pod_set_routing);
|
||||
static DEVICE_ATTR(serial_number, S_IRUGO, pod_get_serial_number,
|
||||
line6_nop_write);
|
||||
static DEVICE_ATTR(store_amp_setup, S_IWUGO, line6_nop_read,
|
||||
static DEVICE_ATTR(store_amp_setup, S_IWUSR, line6_nop_read,
|
||||
pod_set_store_amp_setup);
|
||||
static DEVICE_ATTR(store_channel, S_IWUGO, line6_nop_read,
|
||||
static DEVICE_ATTR(store_channel, S_IWUSR, line6_nop_read,
|
||||
pod_set_store_channel);
|
||||
static DEVICE_ATTR(store_effects_setup, S_IWUGO, line6_nop_read,
|
||||
static DEVICE_ATTR(store_effects_setup, S_IWUSR, line6_nop_read,
|
||||
pod_set_store_effects_setup);
|
||||
static DEVICE_ATTR(tuner_freq, S_IWUGO | S_IRUGO, pod_get_tuner_freq,
|
||||
static DEVICE_ATTR(tuner_freq, S_IWUSR | S_IRUGO, pod_get_tuner_freq,
|
||||
pod_set_tuner_freq);
|
||||
static DEVICE_ATTR(tuner_mute, S_IWUGO | S_IRUGO, pod_get_tuner_mute,
|
||||
static DEVICE_ATTR(tuner_mute, S_IWUSR | S_IRUGO, pod_get_tuner_mute,
|
||||
pod_set_tuner_mute);
|
||||
static DEVICE_ATTR(tuner_note, S_IRUGO, pod_get_tuner_note, line6_nop_write);
|
||||
static DEVICE_ATTR(tuner_pitch, S_IRUGO, pod_get_tuner_pitch, line6_nop_write);
|
||||
|
||||
#ifdef CONFIG_LINE6_USB_RAW
|
||||
static DEVICE_ATTR(raw, S_IWUGO, line6_nop_read, line6_set_raw);
|
||||
static DEVICE_ATTR(raw, S_IWUSR, line6_nop_read, line6_set_raw);
|
||||
#endif
|
||||
|
||||
/* control info callback */
|
||||
|
|
|
@ -154,9 +154,9 @@ static ssize_t toneport_set_led_green(struct device *dev,
|
|||
return count;
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(led_red, S_IWUGO | S_IRUGO, line6_nop_read,
|
||||
static DEVICE_ATTR(led_red, S_IWUSR | S_IRUGO, line6_nop_read,
|
||||
toneport_set_led_red);
|
||||
static DEVICE_ATTR(led_green, S_IWUGO | S_IRUGO, line6_nop_read,
|
||||
static DEVICE_ATTR(led_green, S_IWUSR | S_IRUGO, line6_nop_read,
|
||||
toneport_set_led_green);
|
||||
|
||||
static int toneport_send_cmd(struct usb_device *usbdev, int cmd1, int cmd2)
|
||||
|
|
|
@ -549,21 +549,21 @@ static ssize_t variax_set_raw2(struct device *dev,
|
|||
#endif
|
||||
|
||||
/* Variax workbench special files: */
|
||||
static DEVICE_ATTR(model, S_IWUGO | S_IRUGO, variax_get_model,
|
||||
static DEVICE_ATTR(model, S_IWUSR | S_IRUGO, variax_get_model,
|
||||
variax_set_model);
|
||||
static DEVICE_ATTR(volume, S_IWUGO | S_IRUGO, variax_get_volume,
|
||||
static DEVICE_ATTR(volume, S_IWUSR | S_IRUGO, variax_get_volume,
|
||||
variax_set_volume);
|
||||
static DEVICE_ATTR(tone, S_IWUGO | S_IRUGO, variax_get_tone, variax_set_tone);
|
||||
static DEVICE_ATTR(tone, S_IWUSR | S_IRUGO, variax_get_tone, variax_set_tone);
|
||||
static DEVICE_ATTR(name, S_IRUGO, variax_get_name, line6_nop_write);
|
||||
static DEVICE_ATTR(bank, S_IRUGO, variax_get_bank, line6_nop_write);
|
||||
static DEVICE_ATTR(dump, S_IRUGO, variax_get_dump, line6_nop_write);
|
||||
static DEVICE_ATTR(active, S_IWUGO | S_IRUGO, variax_get_active,
|
||||
static DEVICE_ATTR(active, S_IWUSR | S_IRUGO, variax_get_active,
|
||||
variax_set_active);
|
||||
static DEVICE_ATTR(guitar, S_IRUGO, variax_get_guitar, line6_nop_write);
|
||||
|
||||
#ifdef CONFIG_LINE6_USB_RAW
|
||||
static DEVICE_ATTR(raw, S_IWUGO, line6_nop_read, line6_set_raw);
|
||||
static DEVICE_ATTR(raw2, S_IWUGO, line6_nop_read, variax_set_raw2);
|
||||
static DEVICE_ATTR(raw, S_IWUSR, line6_nop_read, line6_set_raw);
|
||||
static DEVICE_ATTR(raw2, S_IWUSR, line6_nop_read, variax_set_raw2);
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
@ -355,7 +355,6 @@ static int quickstart_acpi_remove(struct acpi_device *device, int type)
|
|||
static void quickstart_exit(void)
|
||||
{
|
||||
input_unregister_device(quickstart_input);
|
||||
input_free_device(quickstart_input);
|
||||
|
||||
device_remove_file(&pf_device->dev, &dev_attr_pressed_button);
|
||||
device_remove_file(&pf_device->dev, &dev_attr_buttons);
|
||||
|
@ -375,6 +374,7 @@ static int __init quickstart_init_input(void)
|
|||
{
|
||||
struct quickstart_btn **ptr = &quickstart_data.btn_lst;
|
||||
int count;
|
||||
int ret;
|
||||
|
||||
quickstart_input = input_allocate_device();
|
||||
|
||||
|
@ -391,7 +391,13 @@ static int __init quickstart_init_input(void)
|
|||
ptr = &((*ptr)->next);
|
||||
}
|
||||
|
||||
return input_register_device(quickstart_input);
|
||||
ret = input_register_device(quickstart_input);
|
||||
if (ret) {
|
||||
input_free_device(quickstart_input);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init quickstart_init(void)
|
||||
|
|
|
@ -182,6 +182,7 @@ struct usb_device_id rtusb_usb_id[] = {
|
|||
{USB_DEVICE(0x2001, 0x3C09)}, /* D-Link */
|
||||
{USB_DEVICE(0x2001, 0x3C0A)}, /* D-Link 3072 */
|
||||
{USB_DEVICE(0x2019, 0xED14)}, /* Planex Communications, Inc. */
|
||||
{USB_DEVICE(0x0411, 0x015D)}, /* Buffalo Airstation WLI-UC-GN */
|
||||
{} /* Terminating entry */
|
||||
};
|
||||
|
||||
|
|
|
@ -264,8 +264,12 @@ HwHSSIThreeWire(
|
|||
|
||||
udelay(10);
|
||||
}
|
||||
if (TryCnt == TC_3W_POLL_MAX_TRY_CNT)
|
||||
panic("HwThreeWire(): CmdReg: %#X RE|WE bits are not clear!!\n", u1bTmp);
|
||||
if (TryCnt == TC_3W_POLL_MAX_TRY_CNT) {
|
||||
printk(KERN_ERR "rtl8187se: HwThreeWire(): CmdReg:"
|
||||
" %#X RE|WE bits are not clear!!\n", u1bTmp);
|
||||
dump_stack();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* RTL8187S HSSI Read/Write Function */
|
||||
u1bTmp = read_nic_byte(dev, RF_SW_CONFIG);
|
||||
|
@ -298,13 +302,23 @@ HwHSSIThreeWire(
|
|||
int idx;
|
||||
int ByteCnt = nDataBufBitCnt / 8;
|
||||
/* printk("%d\n",nDataBufBitCnt); */
|
||||
if ((nDataBufBitCnt % 8) != 0)
|
||||
panic("HwThreeWire(): nDataBufBitCnt(%d) should be multiple of 8!!!\n",
|
||||
nDataBufBitCnt);
|
||||
if ((nDataBufBitCnt % 8) != 0) {
|
||||
printk(KERN_ERR "rtl8187se: "
|
||||
"HwThreeWire(): nDataBufBitCnt(%d)"
|
||||
" should be multiple of 8!!!\n",
|
||||
nDataBufBitCnt);
|
||||
dump_stack();
|
||||
nDataBufBitCnt += 8;
|
||||
nDataBufBitCnt &= ~7;
|
||||
}
|
||||
|
||||
if (nDataBufBitCnt > 64)
|
||||
panic("HwThreeWire(): nDataBufBitCnt(%d) should <= 64!!!\n",
|
||||
nDataBufBitCnt);
|
||||
if (nDataBufBitCnt > 64) {
|
||||
printk(KERN_ERR "rtl8187se: HwThreeWire():"
|
||||
" nDataBufBitCnt(%d) should <= 64!!!\n",
|
||||
nDataBufBitCnt);
|
||||
dump_stack();
|
||||
nDataBufBitCnt = 64;
|
||||
}
|
||||
|
||||
for (idx = 0; idx < ByteCnt; idx++)
|
||||
write_nic_byte(dev, (SW_3W_DB0+idx), *(pDataBuf+idx));
|
||||
|
|
|
@ -37,7 +37,7 @@ u8 r8712_usb_hal_bus_init(struct _adapter *padapter)
|
|||
{
|
||||
u8 val8 = 0;
|
||||
u8 ret = _SUCCESS;
|
||||
u8 PollingCnt = 20;
|
||||
int PollingCnt = 20;
|
||||
struct registry_priv *pregistrypriv = &padapter->registrypriv;
|
||||
|
||||
if (pregistrypriv->chip_version == RTL8712_FPGA) {
|
||||
|
|
|
@ -356,7 +356,7 @@ static ssize_t set_silent_state(struct device *dev,
|
|||
}
|
||||
return count;
|
||||
}
|
||||
static DEVICE_ATTR(silent, S_IWUGO | S_IRUGO,
|
||||
static DEVICE_ATTR(silent, S_IWUSR | S_IRUGO,
|
||||
get_silent_state, set_silent_state);
|
||||
|
||||
|
||||
|
|
|
@ -62,7 +62,6 @@ void speakup_remove_virtual_keyboard(void)
|
|||
{
|
||||
if (virt_keyboard != NULL) {
|
||||
input_unregister_device(virt_keyboard);
|
||||
input_free_device(virt_keyboard);
|
||||
virt_keyboard = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -656,7 +656,7 @@ static int SBD_setup_device(struct spectra_nand_dev *dev, int which)
|
|||
/* Here we force report 512 byte hardware sector size to Kernel */
|
||||
blk_queue_logical_block_size(dev->queue, 512);
|
||||
|
||||
blk_queue_ordered(dev->queue, QUEUE_ORDERED_DRAIN_FLUSH);
|
||||
blk_queue_flush(dev->queue, REQ_FLUSH);
|
||||
|
||||
dev->thread = kthread_run(spectra_trans_thread, dev, "nand_thd");
|
||||
if (IS_ERR(dev->thread)) {
|
||||
|
|
|
@ -1441,7 +1441,7 @@ static struct device_attribute fb_device_attrs[] = {
|
|||
__ATTR_RO(metrics_bytes_identical),
|
||||
__ATTR_RO(metrics_bytes_sent),
|
||||
__ATTR_RO(metrics_cpu_kcycles_used),
|
||||
__ATTR(metrics_reset, S_IWUGO, NULL, metrics_reset_store),
|
||||
__ATTR(metrics_reset, S_IWUSR, NULL, metrics_reset_store),
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
#ifndef SYS_DEF_H
|
||||
#define SYS_DEF_H
|
||||
|
||||
#include <linux/delay.h>
|
||||
|
||||
#define WB_LINUX
|
||||
#define WB_LINUX_WPA_PSK
|
||||
|
||||
|
|
|
@ -189,10 +189,10 @@ static ssize_t mem_used_total_show(struct device *dev,
|
|||
return sprintf(buf, "%llu\n", val);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(disksize, S_IRUGO | S_IWUGO,
|
||||
static DEVICE_ATTR(disksize, S_IRUGO | S_IWUSR,
|
||||
disksize_show, disksize_store);
|
||||
static DEVICE_ATTR(initstate, S_IRUGO, initstate_show, NULL);
|
||||
static DEVICE_ATTR(reset, S_IWUGO, NULL, reset_store);
|
||||
static DEVICE_ATTR(reset, S_IWUSR, NULL, reset_store);
|
||||
static DEVICE_ATTR(num_reads, S_IRUGO, num_reads_show, NULL);
|
||||
static DEVICE_ATTR(num_writes, S_IRUGO, num_writes_show, NULL);
|
||||
static DEVICE_ATTR(invalid_io, S_IRUGO, invalid_io_show, NULL);
|
||||
|
|
|
@ -559,6 +559,9 @@ void __tty_hangup(struct tty_struct *tty)
|
|||
|
||||
tty_lock();
|
||||
|
||||
/* some functions below drop BTM, so we need this bit */
|
||||
set_bit(TTY_HUPPING, &tty->flags);
|
||||
|
||||
/* inuse_filps is protected by the single tty lock,
|
||||
this really needs to change if we want to flush the
|
||||
workqueue with the lock held */
|
||||
|
@ -578,6 +581,10 @@ void __tty_hangup(struct tty_struct *tty)
|
|||
}
|
||||
spin_unlock(&tty_files_lock);
|
||||
|
||||
/*
|
||||
* it drops BTM and thus races with reopen
|
||||
* we protect the race by TTY_HUPPING
|
||||
*/
|
||||
tty_ldisc_hangup(tty);
|
||||
|
||||
read_lock(&tasklist_lock);
|
||||
|
@ -615,7 +622,6 @@ void __tty_hangup(struct tty_struct *tty)
|
|||
tty->session = NULL;
|
||||
tty->pgrp = NULL;
|
||||
tty->ctrl_status = 0;
|
||||
set_bit(TTY_HUPPED, &tty->flags);
|
||||
spin_unlock_irqrestore(&tty->ctrl_lock, flags);
|
||||
|
||||
/* Account for the p->signal references we killed */
|
||||
|
@ -641,6 +647,7 @@ void __tty_hangup(struct tty_struct *tty)
|
|||
* can't yet guarantee all that.
|
||||
*/
|
||||
set_bit(TTY_HUPPED, &tty->flags);
|
||||
clear_bit(TTY_HUPPING, &tty->flags);
|
||||
tty_ldisc_enable(tty);
|
||||
|
||||
tty_unlock();
|
||||
|
@ -1310,7 +1317,9 @@ static int tty_reopen(struct tty_struct *tty)
|
|||
{
|
||||
struct tty_driver *driver = tty->driver;
|
||||
|
||||
if (test_bit(TTY_CLOSING, &tty->flags))
|
||||
if (test_bit(TTY_CLOSING, &tty->flags) ||
|
||||
test_bit(TTY_HUPPING, &tty->flags) ||
|
||||
test_bit(TTY_LDISC_CHANGING, &tty->flags))
|
||||
return -EIO;
|
||||
|
||||
if (driver->type == TTY_DRIVER_TYPE_PTY &&
|
||||
|
|
|
@ -454,6 +454,8 @@ static int tty_ldisc_open(struct tty_struct *tty, struct tty_ldisc *ld)
|
|||
/* BTM here locks versus a hangup event */
|
||||
WARN_ON(!tty_locked());
|
||||
ret = ld->ops->open(tty);
|
||||
if (ret)
|
||||
clear_bit(TTY_LDISC_OPEN, &tty->flags);
|
||||
return ret;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright(C) 2005, Benedikt Spranger <b.spranger@linutronix.de>
|
||||
* Copyright(C) 2005, Thomas Gleixner <tglx@linutronix.de>
|
||||
* Copyright(C) 2006, Hans J. Koch <hjk@linutronix.de>
|
||||
* Copyright(C) 2006, Hans J. Koch <hjk@hansjkoch.de>
|
||||
* Copyright(C) 2006, Greg Kroah-Hartman <greg@kroah.com>
|
||||
*
|
||||
* Userspace IO
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* UIO Hilscher CIF card driver
|
||||
*
|
||||
* (C) 2007 Hans J. Koch <hjk@linutronix.de>
|
||||
* (C) 2007 Hans J. Koch <hjk@hansjkoch.de>
|
||||
* Original code (C) 2005 Benedikt Spranger <b.spranger@linutronix.de>
|
||||
*
|
||||
* Licensed under GPL version 2 only.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* UIO driver for Hilscher NetX based fieldbus cards (cifX, comX).
|
||||
* See http://www.hilscher.com for details.
|
||||
*
|
||||
* (C) 2007 Hans J. Koch <hjk@linutronix.de>
|
||||
* (C) 2007 Hans J. Koch <hjk@hansjkoch.de>
|
||||
* (C) 2008 Manuel Traut <manut@linutronix.de>
|
||||
*
|
||||
* Licensed under GPL version 2 only.
|
||||
|
|
|
@ -1330,6 +1330,8 @@ static int map_urb_for_dma(struct usb_hcd *hcd, struct urb *urb,
|
|||
*/
|
||||
|
||||
if (usb_endpoint_xfer_control(&urb->ep->desc)) {
|
||||
if (hcd->self.uses_pio_for_control)
|
||||
return ret;
|
||||
if (hcd->self.uses_dma) {
|
||||
urb->setup_dma = dma_map_single(
|
||||
hcd->self.controller,
|
||||
|
|
|
@ -161,6 +161,18 @@ static int ehci_pci_setup(struct usb_hcd *hcd)
|
|||
if (pdev->revision < 0xa4)
|
||||
ehci->no_selective_suspend = 1;
|
||||
break;
|
||||
|
||||
/* MCP89 chips on the MacBookAir3,1 give EPROTO when
|
||||
* fetching device descriptors unless LPM is disabled.
|
||||
* There are also intermittent problems enumerating
|
||||
* devices with PPCD enabled.
|
||||
*/
|
||||
case 0x0d9d:
|
||||
ehci_info(ehci, "disable lpm/ppcd for nvidia mcp89");
|
||||
ehci->has_lpm = 0;
|
||||
ehci->has_ppcd = 0;
|
||||
ehci->command &= ~CMD_PPCEE;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case PCI_VENDOR_ID_VIA:
|
||||
|
|
|
@ -229,6 +229,13 @@ void xhci_ring_device(struct xhci_hcd *xhci, int slot_id)
|
|||
static void xhci_disable_port(struct xhci_hcd *xhci, u16 wIndex,
|
||||
u32 __iomem *addr, u32 port_status)
|
||||
{
|
||||
/* Don't allow the USB core to disable SuperSpeed ports. */
|
||||
if (xhci->port_array[wIndex] == 0x03) {
|
||||
xhci_dbg(xhci, "Ignoring request to disable "
|
||||
"SuperSpeed port.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Write 1 to disable the port */
|
||||
xhci_writel(xhci, port_status | PORT_PE, addr);
|
||||
port_status = xhci_readl(xhci, addr);
|
||||
|
|
|
@ -1443,6 +1443,13 @@ void xhci_mem_cleanup(struct xhci_hcd *xhci)
|
|||
xhci->dcbaa = NULL;
|
||||
|
||||
scratchpad_free(xhci);
|
||||
|
||||
xhci->num_usb2_ports = 0;
|
||||
xhci->num_usb3_ports = 0;
|
||||
kfree(xhci->usb2_ports);
|
||||
kfree(xhci->usb3_ports);
|
||||
kfree(xhci->port_array);
|
||||
|
||||
xhci->page_size = 0;
|
||||
xhci->page_shift = 0;
|
||||
xhci->bus_suspended = 0;
|
||||
|
@ -1627,6 +1634,161 @@ static void xhci_set_hc_event_deq(struct xhci_hcd *xhci)
|
|||
&xhci->ir_set->erst_dequeue);
|
||||
}
|
||||
|
||||
static void xhci_add_in_port(struct xhci_hcd *xhci, unsigned int num_ports,
|
||||
u32 __iomem *addr, u8 major_revision)
|
||||
{
|
||||
u32 temp, port_offset, port_count;
|
||||
int i;
|
||||
|
||||
if (major_revision > 0x03) {
|
||||
xhci_warn(xhci, "Ignoring unknown port speed, "
|
||||
"Ext Cap %p, revision = 0x%x\n",
|
||||
addr, major_revision);
|
||||
/* Ignoring port protocol we can't understand. FIXME */
|
||||
return;
|
||||
}
|
||||
|
||||
/* Port offset and count in the third dword, see section 7.2 */
|
||||
temp = xhci_readl(xhci, addr + 2);
|
||||
port_offset = XHCI_EXT_PORT_OFF(temp);
|
||||
port_count = XHCI_EXT_PORT_COUNT(temp);
|
||||
xhci_dbg(xhci, "Ext Cap %p, port offset = %u, "
|
||||
"count = %u, revision = 0x%x\n",
|
||||
addr, port_offset, port_count, major_revision);
|
||||
/* Port count includes the current port offset */
|
||||
if (port_offset == 0 || (port_offset + port_count - 1) > num_ports)
|
||||
/* WTF? "Valid values are ‘1’ to MaxPorts" */
|
||||
return;
|
||||
port_offset--;
|
||||
for (i = port_offset; i < (port_offset + port_count); i++) {
|
||||
/* Duplicate entry. Ignore the port if the revisions differ. */
|
||||
if (xhci->port_array[i] != 0) {
|
||||
xhci_warn(xhci, "Duplicate port entry, Ext Cap %p,"
|
||||
" port %u\n", addr, i);
|
||||
xhci_warn(xhci, "Port was marked as USB %u, "
|
||||
"duplicated as USB %u\n",
|
||||
xhci->port_array[i], major_revision);
|
||||
/* Only adjust the roothub port counts if we haven't
|
||||
* found a similar duplicate.
|
||||
*/
|
||||
if (xhci->port_array[i] != major_revision &&
|
||||
xhci->port_array[i] != (u8) -1) {
|
||||
if (xhci->port_array[i] == 0x03)
|
||||
xhci->num_usb3_ports--;
|
||||
else
|
||||
xhci->num_usb2_ports--;
|
||||
xhci->port_array[i] = (u8) -1;
|
||||
}
|
||||
/* FIXME: Should we disable the port? */
|
||||
}
|
||||
xhci->port_array[i] = major_revision;
|
||||
if (major_revision == 0x03)
|
||||
xhci->num_usb3_ports++;
|
||||
else
|
||||
xhci->num_usb2_ports++;
|
||||
}
|
||||
/* FIXME: Should we disable ports not in the Extended Capabilities? */
|
||||
}
|
||||
|
||||
/*
|
||||
* Scan the Extended Capabilities for the "Supported Protocol Capabilities" that
|
||||
* specify what speeds each port is supposed to be. We can't count on the port
|
||||
* speed bits in the PORTSC register being correct until a device is connected,
|
||||
* but we need to set up the two fake roothubs with the correct number of USB
|
||||
* 3.0 and USB 2.0 ports at host controller initialization time.
|
||||
*/
|
||||
static int xhci_setup_port_arrays(struct xhci_hcd *xhci, gfp_t flags)
|
||||
{
|
||||
u32 __iomem *addr;
|
||||
u32 offset;
|
||||
unsigned int num_ports;
|
||||
int i, port_index;
|
||||
|
||||
addr = &xhci->cap_regs->hcc_params;
|
||||
offset = XHCI_HCC_EXT_CAPS(xhci_readl(xhci, addr));
|
||||
if (offset == 0) {
|
||||
xhci_err(xhci, "No Extended Capability registers, "
|
||||
"unable to set up roothub.\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
num_ports = HCS_MAX_PORTS(xhci->hcs_params1);
|
||||
xhci->port_array = kzalloc(sizeof(*xhci->port_array)*num_ports, flags);
|
||||
if (!xhci->port_array)
|
||||
return -ENOMEM;
|
||||
|
||||
/*
|
||||
* For whatever reason, the first capability offset is from the
|
||||
* capability register base, not from the HCCPARAMS register.
|
||||
* See section 5.3.6 for offset calculation.
|
||||
*/
|
||||
addr = &xhci->cap_regs->hc_capbase + offset;
|
||||
while (1) {
|
||||
u32 cap_id;
|
||||
|
||||
cap_id = xhci_readl(xhci, addr);
|
||||
if (XHCI_EXT_CAPS_ID(cap_id) == XHCI_EXT_CAPS_PROTOCOL)
|
||||
xhci_add_in_port(xhci, num_ports, addr,
|
||||
(u8) XHCI_EXT_PORT_MAJOR(cap_id));
|
||||
offset = XHCI_EXT_CAPS_NEXT(cap_id);
|
||||
if (!offset || (xhci->num_usb2_ports + xhci->num_usb3_ports)
|
||||
== num_ports)
|
||||
break;
|
||||
/*
|
||||
* Once you're into the Extended Capabilities, the offset is
|
||||
* always relative to the register holding the offset.
|
||||
*/
|
||||
addr += offset;
|
||||
}
|
||||
|
||||
if (xhci->num_usb2_ports == 0 && xhci->num_usb3_ports == 0) {
|
||||
xhci_warn(xhci, "No ports on the roothubs?\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
xhci_dbg(xhci, "Found %u USB 2.0 ports and %u USB 3.0 ports.\n",
|
||||
xhci->num_usb2_ports, xhci->num_usb3_ports);
|
||||
/*
|
||||
* Note we could have all USB 3.0 ports, or all USB 2.0 ports.
|
||||
* Not sure how the USB core will handle a hub with no ports...
|
||||
*/
|
||||
if (xhci->num_usb2_ports) {
|
||||
xhci->usb2_ports = kmalloc(sizeof(*xhci->usb2_ports)*
|
||||
xhci->num_usb2_ports, flags);
|
||||
if (!xhci->usb2_ports)
|
||||
return -ENOMEM;
|
||||
|
||||
port_index = 0;
|
||||
for (i = 0; i < num_ports; i++)
|
||||
if (xhci->port_array[i] != 0x03) {
|
||||
xhci->usb2_ports[port_index] =
|
||||
&xhci->op_regs->port_status_base +
|
||||
NUM_PORT_REGS*i;
|
||||
xhci_dbg(xhci, "USB 2.0 port at index %u, "
|
||||
"addr = %p\n", i,
|
||||
xhci->usb2_ports[port_index]);
|
||||
port_index++;
|
||||
}
|
||||
}
|
||||
if (xhci->num_usb3_ports) {
|
||||
xhci->usb3_ports = kmalloc(sizeof(*xhci->usb3_ports)*
|
||||
xhci->num_usb3_ports, flags);
|
||||
if (!xhci->usb3_ports)
|
||||
return -ENOMEM;
|
||||
|
||||
port_index = 0;
|
||||
for (i = 0; i < num_ports; i++)
|
||||
if (xhci->port_array[i] == 0x03) {
|
||||
xhci->usb3_ports[port_index] =
|
||||
&xhci->op_regs->port_status_base +
|
||||
NUM_PORT_REGS*i;
|
||||
xhci_dbg(xhci, "USB 3.0 port at index %u, "
|
||||
"addr = %p\n", i,
|
||||
xhci->usb3_ports[port_index]);
|
||||
port_index++;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
|
||||
{
|
||||
|
@ -1809,6 +1971,8 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags)
|
|||
|
||||
if (scratchpad_alloc(xhci, flags))
|
||||
goto fail;
|
||||
if (xhci_setup_port_arrays(xhci, flags))
|
||||
goto fail;
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -1549,6 +1549,15 @@ static int xhci_configure_endpoint(struct xhci_hcd *xhci,
|
|||
cmd_completion = command->completion;
|
||||
cmd_status = &command->status;
|
||||
command->command_trb = xhci->cmd_ring->enqueue;
|
||||
|
||||
/* Enqueue pointer can be left pointing to the link TRB,
|
||||
* we must handle that
|
||||
*/
|
||||
if ((command->command_trb->link.control & TRB_TYPE_BITMASK)
|
||||
== TRB_TYPE(TRB_LINK))
|
||||
command->command_trb =
|
||||
xhci->cmd_ring->enq_seg->next->trbs;
|
||||
|
||||
list_add_tail(&command->cmd_list, &virt_dev->cmd_list);
|
||||
} else {
|
||||
in_ctx = virt_dev->in_ctx;
|
||||
|
@ -2272,6 +2281,15 @@ int xhci_discover_or_reset_device(struct usb_hcd *hcd, struct usb_device *udev)
|
|||
/* Attempt to submit the Reset Device command to the command ring */
|
||||
spin_lock_irqsave(&xhci->lock, flags);
|
||||
reset_device_cmd->command_trb = xhci->cmd_ring->enqueue;
|
||||
|
||||
/* Enqueue pointer can be left pointing to the link TRB,
|
||||
* we must handle that
|
||||
*/
|
||||
if ((reset_device_cmd->command_trb->link.control & TRB_TYPE_BITMASK)
|
||||
== TRB_TYPE(TRB_LINK))
|
||||
reset_device_cmd->command_trb =
|
||||
xhci->cmd_ring->enq_seg->next->trbs;
|
||||
|
||||
list_add_tail(&reset_device_cmd->cmd_list, &virt_dev->cmd_list);
|
||||
ret = xhci_queue_reset_device(xhci, slot_id);
|
||||
if (ret) {
|
||||
|
|
|
@ -453,6 +453,24 @@ struct xhci_doorbell_array {
|
|||
#define STREAM_ID_TO_DB(p) (((p) & 0xffff) << 16)
|
||||
|
||||
|
||||
/**
|
||||
* struct xhci_protocol_caps
|
||||
* @revision: major revision, minor revision, capability ID,
|
||||
* and next capability pointer.
|
||||
* @name_string: Four ASCII characters to say which spec this xHC
|
||||
* follows, typically "USB ".
|
||||
* @port_info: Port offset, count, and protocol-defined information.
|
||||
*/
|
||||
struct xhci_protocol_caps {
|
||||
u32 revision;
|
||||
u32 name_string;
|
||||
u32 port_info;
|
||||
};
|
||||
|
||||
#define XHCI_EXT_PORT_MAJOR(x) (((x) >> 24) & 0xff)
|
||||
#define XHCI_EXT_PORT_OFF(x) ((x) & 0xff)
|
||||
#define XHCI_EXT_PORT_COUNT(x) (((x) >> 8) & 0xff)
|
||||
|
||||
/**
|
||||
* struct xhci_container_ctx
|
||||
* @type: Type of context. Used to calculated offsets to contained contexts.
|
||||
|
@ -1240,6 +1258,14 @@ struct xhci_hcd {
|
|||
u32 suspended_ports[8]; /* which ports are
|
||||
suspended */
|
||||
unsigned long resume_done[MAX_HC_PORTS];
|
||||
/* Is each xHCI roothub port a USB 3.0, USB 2.0, or USB 1.1 port? */
|
||||
u8 *port_array;
|
||||
/* Array of pointers to USB 3.0 PORTSC registers */
|
||||
u32 __iomem **usb3_ports;
|
||||
unsigned int num_usb3_ports;
|
||||
/* Array of pointers to USB 2.0 PORTSC registers */
|
||||
u32 __iomem **usb2_ports;
|
||||
unsigned int num_usb2_ports;
|
||||
};
|
||||
|
||||
/* For testing purposes */
|
||||
|
|
|
@ -536,6 +536,7 @@ static const struct file_operations yurex_fops = {
|
|||
.open = yurex_open,
|
||||
.release = yurex_release,
|
||||
.fasync = yurex_fasync,
|
||||
.llseek = default_llseek,
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -2116,12 +2116,15 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
|
|||
* Otherwise, wait till the gadget driver hooks up.
|
||||
*/
|
||||
if (!is_otg_enabled(musb) && is_host_enabled(musb)) {
|
||||
struct usb_hcd *hcd = musb_to_hcd(musb);
|
||||
|
||||
MUSB_HST_MODE(musb);
|
||||
musb->xceiv->default_a = 1;
|
||||
musb->xceiv->state = OTG_STATE_A_IDLE;
|
||||
|
||||
status = usb_add_hcd(musb_to_hcd(musb), -1, 0);
|
||||
|
||||
hcd->self.uses_pio_for_control = 1;
|
||||
DBG(1, "%s mode, status %d, devctl %02x %c\n",
|
||||
"HOST", status,
|
||||
musb_readb(musb->mregs, MUSB_DEVCTL),
|
||||
|
|
|
@ -92,6 +92,59 @@
|
|||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
|
||||
/* Maps the buffer to dma */
|
||||
|
||||
static inline void map_dma_buffer(struct musb_request *request,
|
||||
struct musb *musb)
|
||||
{
|
||||
if (request->request.dma == DMA_ADDR_INVALID) {
|
||||
request->request.dma = dma_map_single(
|
||||
musb->controller,
|
||||
request->request.buf,
|
||||
request->request.length,
|
||||
request->tx
|
||||
? DMA_TO_DEVICE
|
||||
: DMA_FROM_DEVICE);
|
||||
request->mapped = 1;
|
||||
} else {
|
||||
dma_sync_single_for_device(musb->controller,
|
||||
request->request.dma,
|
||||
request->request.length,
|
||||
request->tx
|
||||
? DMA_TO_DEVICE
|
||||
: DMA_FROM_DEVICE);
|
||||
request->mapped = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Unmap the buffer from dma and maps it back to cpu */
|
||||
static inline void unmap_dma_buffer(struct musb_request *request,
|
||||
struct musb *musb)
|
||||
{
|
||||
if (request->request.dma == DMA_ADDR_INVALID) {
|
||||
DBG(20, "not unmapping a never mapped buffer\n");
|
||||
return;
|
||||
}
|
||||
if (request->mapped) {
|
||||
dma_unmap_single(musb->controller,
|
||||
request->request.dma,
|
||||
request->request.length,
|
||||
request->tx
|
||||
? DMA_TO_DEVICE
|
||||
: DMA_FROM_DEVICE);
|
||||
request->request.dma = DMA_ADDR_INVALID;
|
||||
request->mapped = 0;
|
||||
} else {
|
||||
dma_sync_single_for_cpu(musb->controller,
|
||||
request->request.dma,
|
||||
request->request.length,
|
||||
request->tx
|
||||
? DMA_TO_DEVICE
|
||||
: DMA_FROM_DEVICE);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Immediately complete a request.
|
||||
*
|
||||
|
@ -119,24 +172,8 @@ __acquires(ep->musb->lock)
|
|||
|
||||
ep->busy = 1;
|
||||
spin_unlock(&musb->lock);
|
||||
if (is_dma_capable()) {
|
||||
if (req->mapped) {
|
||||
dma_unmap_single(musb->controller,
|
||||
req->request.dma,
|
||||
req->request.length,
|
||||
req->tx
|
||||
? DMA_TO_DEVICE
|
||||
: DMA_FROM_DEVICE);
|
||||
req->request.dma = DMA_ADDR_INVALID;
|
||||
req->mapped = 0;
|
||||
} else if (req->request.dma != DMA_ADDR_INVALID)
|
||||
dma_sync_single_for_cpu(musb->controller,
|
||||
req->request.dma,
|
||||
req->request.length,
|
||||
req->tx
|
||||
? DMA_TO_DEVICE
|
||||
: DMA_FROM_DEVICE);
|
||||
}
|
||||
if (is_dma_capable() && ep->dma)
|
||||
unmap_dma_buffer(req, musb);
|
||||
if (request->status == 0)
|
||||
DBG(5, "%s done request %p, %d/%d\n",
|
||||
ep->end_point.name, request,
|
||||
|
@ -395,6 +432,13 @@ static void txstate(struct musb *musb, struct musb_request *req)
|
|||
#endif
|
||||
|
||||
if (!use_dma) {
|
||||
/*
|
||||
* Unmap the dma buffer back to cpu if dma channel
|
||||
* programming fails
|
||||
*/
|
||||
if (is_dma_capable() && musb_ep->dma)
|
||||
unmap_dma_buffer(req, musb);
|
||||
|
||||
musb_write_fifo(musb_ep->hw_ep, fifo_count,
|
||||
(u8 *) (request->buf + request->actual));
|
||||
request->actual += fifo_count;
|
||||
|
@ -713,6 +757,21 @@ static void rxstate(struct musb *musb, struct musb_request *req)
|
|||
return;
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* Unmap the dma buffer back to cpu if dma channel
|
||||
* programming fails. This buffer is mapped if the
|
||||
* channel allocation is successful
|
||||
*/
|
||||
if (is_dma_capable() && musb_ep->dma) {
|
||||
unmap_dma_buffer(req, musb);
|
||||
|
||||
/*
|
||||
* Clear DMAENAB and AUTOCLEAR for the
|
||||
* PIO mode transfer
|
||||
*/
|
||||
csr &= ~(MUSB_RXCSR_DMAENAB | MUSB_RXCSR_AUTOCLEAR);
|
||||
musb_writew(epio, MUSB_RXCSR, csr);
|
||||
}
|
||||
|
||||
musb_read_fifo(musb_ep->hw_ep, fifo_count, (u8 *)
|
||||
(request->buf + request->actual));
|
||||
|
@ -837,7 +896,9 @@ void musb_g_rx(struct musb *musb, u8 epnum)
|
|||
if (!request)
|
||||
return;
|
||||
}
|
||||
#if defined(CONFIG_USB_INVENTRA_DMA) || defined(CONFIG_USB_TUSB_OMAP_DMA)
|
||||
exit:
|
||||
#endif
|
||||
/* Analyze request */
|
||||
rxstate(musb, to_musb_request(request));
|
||||
}
|
||||
|
@ -1150,26 +1211,9 @@ static int musb_gadget_queue(struct usb_ep *ep, struct usb_request *req,
|
|||
request->epnum = musb_ep->current_epnum;
|
||||
request->tx = musb_ep->is_in;
|
||||
|
||||
if (is_dma_capable() && musb_ep->dma) {
|
||||
if (request->request.dma == DMA_ADDR_INVALID) {
|
||||
request->request.dma = dma_map_single(
|
||||
musb->controller,
|
||||
request->request.buf,
|
||||
request->request.length,
|
||||
request->tx
|
||||
? DMA_TO_DEVICE
|
||||
: DMA_FROM_DEVICE);
|
||||
request->mapped = 1;
|
||||
} else {
|
||||
dma_sync_single_for_device(musb->controller,
|
||||
request->request.dma,
|
||||
request->request.length,
|
||||
request->tx
|
||||
? DMA_TO_DEVICE
|
||||
: DMA_FROM_DEVICE);
|
||||
request->mapped = 0;
|
||||
}
|
||||
} else
|
||||
if (is_dma_capable() && musb_ep->dma)
|
||||
map_dma_buffer(request, musb);
|
||||
else
|
||||
request->mapped = 0;
|
||||
|
||||
spin_lock_irqsave(&musb->lock, lockflags);
|
||||
|
@ -1789,6 +1833,8 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver,
|
|||
spin_unlock_irqrestore(&musb->lock, flags);
|
||||
|
||||
if (is_otg_enabled(musb)) {
|
||||
struct usb_hcd *hcd = musb_to_hcd(musb);
|
||||
|
||||
DBG(3, "OTG startup...\n");
|
||||
|
||||
/* REVISIT: funcall to other code, which also
|
||||
|
@ -1803,6 +1849,8 @@ int usb_gadget_probe_driver(struct usb_gadget_driver *driver,
|
|||
musb->gadget_driver = NULL;
|
||||
musb->g.dev.driver = NULL;
|
||||
spin_unlock_irqrestore(&musb->lock, flags);
|
||||
} else {
|
||||
hcd->self.uses_pio_for_control = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -201,6 +201,7 @@ static struct usb_device_id id_table_combined [] = {
|
|||
{ USB_DEVICE(FTDI_VID, FTDI_MTXORB_5_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_R2000KU_TRUE_RNG) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_VARDAAN_PID) },
|
||||
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0100_PID) },
|
||||
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0101_PID) },
|
||||
{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0102_PID) },
|
||||
|
@ -696,6 +697,7 @@ static struct usb_device_id id_table_combined [] = {
|
|||
.driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk },
|
||||
{ USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) },
|
||||
{ USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_SERIAL_VX7_PID) },
|
||||
{ USB_DEVICE(RTSYSTEMS_VID, RTSYSTEMS_CT29B_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_PHI_FISCO_PID) },
|
||||
{ USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) },
|
||||
|
|
|
@ -114,6 +114,9 @@
|
|||
/* Lenz LI-USB Computer Interface. */
|
||||
#define FTDI_LENZ_LIUSB_PID 0xD780
|
||||
|
||||
/* Vardaan Enterprises Serial Interface VEUSB422R3 */
|
||||
#define FTDI_VARDAAN_PID 0xF070
|
||||
|
||||
/*
|
||||
* Xsens Technologies BV products (http://www.xsens.com).
|
||||
*/
|
||||
|
@ -721,6 +724,7 @@
|
|||
*/
|
||||
#define RTSYSTEMS_VID 0x2100 /* Vendor ID */
|
||||
#define RTSYSTEMS_SERIAL_VX7_PID 0x9e52 /* Serial converter for VX-7 Radios using FT232RL */
|
||||
#define RTSYSTEMS_CT29B_PID 0x9e54 /* CT29B Radio Cable */
|
||||
|
||||
/*
|
||||
* Bayer Ascensia Contour blood glucose meter USB-converter cable.
|
||||
|
|
|
@ -51,6 +51,7 @@ static struct usb_driver usb_serial_driver = {
|
|||
.suspend = usb_serial_suspend,
|
||||
.resume = usb_serial_resume,
|
||||
.no_dynamic_id = 1,
|
||||
.supports_autosuspend = 1,
|
||||
};
|
||||
|
||||
/* There is no MODULE_DEVICE_TABLE for usbserial.c. Instead
|
||||
|
@ -1343,6 +1344,8 @@ int usb_serial_register(struct usb_serial_driver *driver)
|
|||
return -ENODEV;
|
||||
|
||||
fixup_generic(driver);
|
||||
if (driver->usb_driver)
|
||||
driver->usb_driver->supports_autosuspend = 1;
|
||||
|
||||
if (!driver->description)
|
||||
driver->description = driver->driver.name;
|
||||
|
|
|
@ -558,6 +558,9 @@ config IT8712F_WDT
|
|||
This is the driver for the built-in watchdog timer on the IT8712F
|
||||
Super I/0 chipset used on many motherboards.
|
||||
|
||||
If the driver does not work, then make sure that the game port in
|
||||
the BIOS is enabled.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called it8712f_wdt.
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include <linux/miscdevice.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/moduleparam.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/watchdog.h>
|
||||
|
@ -220,14 +219,6 @@ static long bcm63xx_wdt_ioctl(struct file *file, unsigned int cmd,
|
|||
}
|
||||
}
|
||||
|
||||
static int bcm63xx_wdt_notify_sys(struct notifier_block *this,
|
||||
unsigned long code, void *unused)
|
||||
{
|
||||
if (code == SYS_DOWN || code == SYS_HALT)
|
||||
bcm63xx_wdt_pause();
|
||||
return NOTIFY_DONE;
|
||||
}
|
||||
|
||||
static const struct file_operations bcm63xx_wdt_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.llseek = no_llseek,
|
||||
|
@ -243,12 +234,8 @@ static struct miscdevice bcm63xx_wdt_miscdev = {
|
|||
.fops = &bcm63xx_wdt_fops,
|
||||
};
|
||||
|
||||
static struct notifier_block bcm63xx_wdt_notifier = {
|
||||
.notifier_call = bcm63xx_wdt_notify_sys,
|
||||
};
|
||||
|
||||
|
||||
static int bcm63xx_wdt_probe(struct platform_device *pdev)
|
||||
static int __devinit bcm63xx_wdt_probe(struct platform_device *pdev)
|
||||
{
|
||||
int ret;
|
||||
struct resource *r;
|
||||
|
@ -280,16 +267,10 @@ static int bcm63xx_wdt_probe(struct platform_device *pdev)
|
|||
wdt_time);
|
||||
}
|
||||
|
||||
ret = register_reboot_notifier(&bcm63xx_wdt_notifier);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed to register reboot_notifier\n");
|
||||
goto unregister_timer;
|
||||
}
|
||||
|
||||
ret = misc_register(&bcm63xx_wdt_miscdev);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "failed to register watchdog device\n");
|
||||
goto unregister_reboot_notifier;
|
||||
goto unregister_timer;
|
||||
}
|
||||
|
||||
dev_info(&pdev->dev, " started, timer margin: %d sec\n",
|
||||
|
@ -297,8 +278,6 @@ static int bcm63xx_wdt_probe(struct platform_device *pdev)
|
|||
|
||||
return 0;
|
||||
|
||||
unregister_reboot_notifier:
|
||||
unregister_reboot_notifier(&bcm63xx_wdt_notifier);
|
||||
unregister_timer:
|
||||
bcm63xx_timer_unregister(TIMER_WDT_ID);
|
||||
unmap:
|
||||
|
@ -306,25 +285,28 @@ static int bcm63xx_wdt_probe(struct platform_device *pdev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int bcm63xx_wdt_remove(struct platform_device *pdev)
|
||||
static int __devexit bcm63xx_wdt_remove(struct platform_device *pdev)
|
||||
{
|
||||
if (!nowayout)
|
||||
bcm63xx_wdt_pause();
|
||||
|
||||
misc_deregister(&bcm63xx_wdt_miscdev);
|
||||
|
||||
iounmap(bcm63xx_wdt_device.regs);
|
||||
|
||||
unregister_reboot_notifier(&bcm63xx_wdt_notifier);
|
||||
bcm63xx_timer_unregister(TIMER_WDT_ID);
|
||||
|
||||
iounmap(bcm63xx_wdt_device.regs);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void bcm63xx_wdt_shutdown(struct platform_device *pdev)
|
||||
{
|
||||
bcm63xx_wdt_pause();
|
||||
}
|
||||
|
||||
static struct platform_driver bcm63xx_wdt = {
|
||||
.probe = bcm63xx_wdt_probe,
|
||||
.remove = bcm63xx_wdt_remove,
|
||||
.remove = __devexit_p(bcm63xx_wdt_remove),
|
||||
.shutdown = bcm63xx_wdt_shutdown,
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "bcm63xx-wdt",
|
||||
}
|
||||
};
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/miscdevice.h>
|
||||
#include <linux/watchdog.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/io.h>
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
* document number 322169-001, 322170-003: 5 Series, 3400 Series (PCH)
|
||||
* document number 320066-003, 320257-008: EP80597 (IICH)
|
||||
* document number TBD : Cougar Point (CPT)
|
||||
* document number TBD : Patsburg (PBG)
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -146,7 +147,8 @@ enum iTCO_chipsets {
|
|||
TCO_CPT29, /* Cougar Point */
|
||||
TCO_CPT30, /* Cougar Point */
|
||||
TCO_CPT31, /* Cougar Point */
|
||||
TCO_PBG, /* Patsburg */
|
||||
TCO_PBG1, /* Patsburg */
|
||||
TCO_PBG2, /* Patsburg */
|
||||
};
|
||||
|
||||
static struct {
|
||||
|
@ -235,6 +237,7 @@ static struct {
|
|||
{"Cougar Point", 2},
|
||||
{"Cougar Point", 2},
|
||||
{"Patsburg", 2},
|
||||
{"Patsburg", 2},
|
||||
{NULL, 0}
|
||||
};
|
||||
|
||||
|
@ -350,7 +353,8 @@ static struct pci_device_id iTCO_wdt_pci_tbl[] = {
|
|||
{ ITCO_PCI_DEVICE(0x1c5d, TCO_CPT29)},
|
||||
{ ITCO_PCI_DEVICE(0x1c5e, TCO_CPT30)},
|
||||
{ ITCO_PCI_DEVICE(0x1c5f, TCO_CPT31)},
|
||||
{ ITCO_PCI_DEVICE(0x1d40, TCO_PBG)},
|
||||
{ ITCO_PCI_DEVICE(0x1d40, TCO_PBG1)},
|
||||
{ ITCO_PCI_DEVICE(0x1d41, TCO_PBG2)},
|
||||
{ 0, }, /* End of list */
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, iTCO_wdt_pci_tbl);
|
||||
|
|
|
@ -472,7 +472,9 @@ int reiserfs_acl_chmod(struct inode *inode)
|
|||
struct reiserfs_transaction_handle th;
|
||||
size_t size = reiserfs_xattr_nblocks(inode,
|
||||
reiserfs_acl_size(clone->a_count));
|
||||
reiserfs_write_lock(inode->i_sb);
|
||||
int depth;
|
||||
|
||||
depth = reiserfs_write_lock_once(inode->i_sb);
|
||||
error = journal_begin(&th, inode->i_sb, size * 2);
|
||||
if (!error) {
|
||||
int error2;
|
||||
|
@ -482,7 +484,7 @@ int reiserfs_acl_chmod(struct inode *inode)
|
|||
if (error2)
|
||||
error = error2;
|
||||
}
|
||||
reiserfs_write_unlock(inode->i_sb);
|
||||
reiserfs_write_unlock_once(inode->i_sb, depth);
|
||||
}
|
||||
posix_acl_release(clone);
|
||||
return error;
|
||||
|
|
|
@ -10,11 +10,6 @@
|
|||
*
|
||||
* CPUs are exported via sysfs in the class/cpu/devices/
|
||||
* directory.
|
||||
*
|
||||
* Per-cpu interfaces can be implemented using a struct device_interface.
|
||||
* See the following for how to do this:
|
||||
* - drivers/base/intf.c
|
||||
* - Documentation/driver-model/interface.txt
|
||||
*/
|
||||
#ifndef _LINUX_CPU_H_
|
||||
#define _LINUX_CPU_H_
|
||||
|
|
|
@ -161,6 +161,9 @@ extern void register_page_bootmem_info_node(struct pglist_data *pgdat);
|
|||
extern void put_page_bootmem(struct page *page);
|
||||
#endif
|
||||
|
||||
void lock_memory_hotplug(void);
|
||||
void unlock_memory_hotplug(void);
|
||||
|
||||
#else /* ! CONFIG_MEMORY_HOTPLUG */
|
||||
/*
|
||||
* Stub functions for when hotplug is off
|
||||
|
@ -192,6 +195,9 @@ static inline void register_page_bootmem_info_node(struct pglist_data *pgdat)
|
|||
{
|
||||
}
|
||||
|
||||
static inline void lock_memory_hotplug(void) {}
|
||||
static inline void unlock_memory_hotplug(void) {}
|
||||
|
||||
#endif /* ! CONFIG_MEMORY_HOTPLUG */
|
||||
|
||||
#ifdef CONFIG_MEMORY_HOTREMOVE
|
||||
|
|
|
@ -10,11 +10,6 @@
|
|||
*
|
||||
* Nodes are exported via driverfs in the class/node/devices/
|
||||
* directory.
|
||||
*
|
||||
* Per-node interfaces can be implemented using a struct device_interface.
|
||||
* See the following for how to do this:
|
||||
* - drivers/base/intf.c
|
||||
* - Documentation/driver-model/interface.txt
|
||||
*/
|
||||
#ifndef _LINUX_NODE_H_
|
||||
#define _LINUX_NODE_H_
|
||||
|
|
|
@ -366,6 +366,7 @@ struct tty_file_private {
|
|||
#define TTY_HUPPED 18 /* Post driver->hangup() */
|
||||
#define TTY_FLUSHING 19 /* Flushing to ldisc in progress */
|
||||
#define TTY_FLUSHPENDING 20 /* Queued buffer flush pending */
|
||||
#define TTY_HUPPING 21 /* ->hangup() in progress */
|
||||
|
||||
#define TTY_WRITE_FLUSH(tty) tty_write_flush((tty))
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*
|
||||
* Copyright(C) 2005, Benedikt Spranger <b.spranger@linutronix.de>
|
||||
* Copyright(C) 2005, Thomas Gleixner <tglx@linutronix.de>
|
||||
* Copyright(C) 2006, Hans J. Koch <hjk@linutronix.de>
|
||||
* Copyright(C) 2006, Hans J. Koch <hjk@hansjkoch.de>
|
||||
* Copyright(C) 2006, Greg Kroah-Hartman <greg@kroah.com>
|
||||
*
|
||||
* Userspace IO driver.
|
||||
|
|
|
@ -313,6 +313,10 @@ struct usb_bus {
|
|||
int busnum; /* Bus number (in order of reg) */
|
||||
const char *bus_name; /* stable id (PCI slot_name etc) */
|
||||
u8 uses_dma; /* Does the host controller use DMA? */
|
||||
u8 uses_pio_for_control; /*
|
||||
* Does the host controller use PIO
|
||||
* for control transfers?
|
||||
*/
|
||||
u8 otg_port; /* 0, or number of OTG/HNP port */
|
||||
unsigned is_b_host:1; /* true during some HNP roleswitches */
|
||||
unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
|
||||
struct vm_area_struct; /* vma defining user mapping in mm_types.h */
|
||||
|
||||
extern bool vmap_lazy_unmap;
|
||||
|
||||
/* bits in flags of vmalloc's vm_struct below */
|
||||
#define VM_IOREMAP 0x00000001 /* ioremap() and friends */
|
||||
#define VM_ALLOC 0x00000002 /* vmalloc() */
|
||||
|
|
|
@ -914,6 +914,15 @@ NORET_TYPE void do_exit(long code)
|
|||
if (unlikely(!tsk->pid))
|
||||
panic("Attempted to kill the idle task!");
|
||||
|
||||
/*
|
||||
* If do_exit is called because this processes oopsed, it's possible
|
||||
* that get_fs() was left as KERNEL_DS, so reset it to USER_DS before
|
||||
* continuing. Amongst other possible reasons, this is to prevent
|
||||
* mm_release()->clear_child_tid() from writing to a user-controlled
|
||||
* kernel address.
|
||||
*/
|
||||
set_fs(USER_DS);
|
||||
|
||||
tracehook_report_exit(&code);
|
||||
|
||||
validate_creds_for_do_exit(tsk);
|
||||
|
|
|
@ -2738,7 +2738,8 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
|
|||
unlock_page(pagecache_page);
|
||||
put_page(pagecache_page);
|
||||
}
|
||||
unlock_page(page);
|
||||
if (page != pagecache_page)
|
||||
unlock_page(page);
|
||||
|
||||
out_mutex:
|
||||
mutex_unlock(&hugetlb_instantiation_mutex);
|
||||
|
|
7
mm/ksm.c
7
mm/ksm.c
|
@ -1724,8 +1724,13 @@ static int ksm_memory_callback(struct notifier_block *self,
|
|||
/*
|
||||
* Keep it very simple for now: just lock out ksmd and
|
||||
* MADV_UNMERGEABLE while any memory is going offline.
|
||||
* mutex_lock_nested() is necessary because lockdep was alarmed
|
||||
* that here we take ksm_thread_mutex inside notifier chain
|
||||
* mutex, and later take notifier chain mutex inside
|
||||
* ksm_thread_mutex to unlock it. But that's safe because both
|
||||
* are inside mem_hotplug_mutex.
|
||||
*/
|
||||
mutex_lock(&ksm_thread_mutex);
|
||||
mutex_lock_nested(&ksm_thread_mutex, SINGLE_DEPTH_NESTING);
|
||||
break;
|
||||
|
||||
case MEM_OFFLINE:
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/swapops.h>
|
||||
#include <linux/hugetlb.h>
|
||||
#include <linux/memory_hotplug.h>
|
||||
#include "internal.h"
|
||||
|
||||
int sysctl_memory_failure_early_kill __read_mostly = 0;
|
||||
|
@ -1230,11 +1231,10 @@ static int get_any_page(struct page *p, unsigned long pfn, int flags)
|
|||
return 1;
|
||||
|
||||
/*
|
||||
* The lock_system_sleep prevents a race with memory hotplug,
|
||||
* because the isolation assumes there's only a single user.
|
||||
* The lock_memory_hotplug prevents a race with memory hotplug.
|
||||
* This is a big hammer, a better would be nicer.
|
||||
*/
|
||||
lock_system_sleep();
|
||||
lock_memory_hotplug();
|
||||
|
||||
/*
|
||||
* Isolate the page, so that it doesn't get reallocated if it
|
||||
|
@ -1264,7 +1264,7 @@ static int get_any_page(struct page *p, unsigned long pfn, int flags)
|
|||
ret = 1;
|
||||
}
|
||||
unset_migratetype_isolate(p);
|
||||
unlock_system_sleep();
|
||||
unlock_memory_hotplug();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,23 @@
|
|||
|
||||
#include "internal.h"
|
||||
|
||||
DEFINE_MUTEX(mem_hotplug_mutex);
|
||||
|
||||
void lock_memory_hotplug(void)
|
||||
{
|
||||
mutex_lock(&mem_hotplug_mutex);
|
||||
|
||||
/* for exclusive hibernation if CONFIG_HIBERNATION=y */
|
||||
lock_system_sleep();
|
||||
}
|
||||
|
||||
void unlock_memory_hotplug(void)
|
||||
{
|
||||
unlock_system_sleep();
|
||||
mutex_unlock(&mem_hotplug_mutex);
|
||||
}
|
||||
|
||||
|
||||
/* add this memory to iomem resource */
|
||||
static struct resource *register_memory_resource(u64 start, u64 size)
|
||||
{
|
||||
|
@ -493,7 +510,7 @@ int mem_online_node(int nid)
|
|||
pg_data_t *pgdat;
|
||||
int ret;
|
||||
|
||||
lock_system_sleep();
|
||||
lock_memory_hotplug();
|
||||
pgdat = hotadd_new_pgdat(nid, 0);
|
||||
if (pgdat) {
|
||||
ret = -ENOMEM;
|
||||
|
@ -504,7 +521,7 @@ int mem_online_node(int nid)
|
|||
BUG_ON(ret);
|
||||
|
||||
out:
|
||||
unlock_system_sleep();
|
||||
unlock_memory_hotplug();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -516,7 +533,7 @@ int __ref add_memory(int nid, u64 start, u64 size)
|
|||
struct resource *res;
|
||||
int ret;
|
||||
|
||||
lock_system_sleep();
|
||||
lock_memory_hotplug();
|
||||
|
||||
res = register_memory_resource(start, size);
|
||||
ret = -EEXIST;
|
||||
|
@ -563,7 +580,7 @@ int __ref add_memory(int nid, u64 start, u64 size)
|
|||
release_memory_resource(res);
|
||||
|
||||
out:
|
||||
unlock_system_sleep();
|
||||
unlock_memory_hotplug();
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(add_memory);
|
||||
|
@ -791,7 +808,7 @@ static int offline_pages(unsigned long start_pfn,
|
|||
if (!test_pages_in_a_zone(start_pfn, end_pfn))
|
||||
return -EINVAL;
|
||||
|
||||
lock_system_sleep();
|
||||
lock_memory_hotplug();
|
||||
|
||||
zone = page_zone(pfn_to_page(start_pfn));
|
||||
node = zone_to_nid(zone);
|
||||
|
@ -880,7 +897,7 @@ static int offline_pages(unsigned long start_pfn,
|
|||
writeback_set_ratelimit();
|
||||
|
||||
memory_notify(MEM_OFFLINE, &arg);
|
||||
unlock_system_sleep();
|
||||
unlock_memory_hotplug();
|
||||
return 0;
|
||||
|
||||
failed_removal:
|
||||
|
@ -891,7 +908,7 @@ static int offline_pages(unsigned long start_pfn,
|
|||
undo_isolate_page_range(start_pfn, end_pfn);
|
||||
|
||||
out:
|
||||
unlock_system_sleep();
|
||||
unlock_memory_hotplug();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -1307,15 +1307,18 @@ SYSCALL_DEFINE4(migrate_pages, pid_t, pid, unsigned long, maxnode,
|
|||
goto out;
|
||||
|
||||
/* Find the mm_struct */
|
||||
rcu_read_lock();
|
||||
read_lock(&tasklist_lock);
|
||||
task = pid ? find_task_by_vpid(pid) : current;
|
||||
if (!task) {
|
||||
read_unlock(&tasklist_lock);
|
||||
rcu_read_unlock();
|
||||
err = -ESRCH;
|
||||
goto out;
|
||||
}
|
||||
mm = get_task_mm(task);
|
||||
read_unlock(&tasklist_lock);
|
||||
rcu_read_unlock();
|
||||
|
||||
err = -EINVAL;
|
||||
if (!mm)
|
||||
|
|
28
mm/vmalloc.c
28
mm/vmalloc.c
|
@ -31,8 +31,6 @@
|
|||
#include <asm/tlbflush.h>
|
||||
#include <asm/shmparam.h>
|
||||
|
||||
bool vmap_lazy_unmap __read_mostly = true;
|
||||
|
||||
/*** Page table manipulation functions ***/
|
||||
|
||||
static void vunmap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end)
|
||||
|
@ -503,9 +501,6 @@ static unsigned long lazy_max_pages(void)
|
|||
{
|
||||
unsigned int log;
|
||||
|
||||
if (!vmap_lazy_unmap)
|
||||
return 0;
|
||||
|
||||
log = fls(num_online_cpus());
|
||||
|
||||
return log * (32UL * 1024 * 1024 / PAGE_SIZE);
|
||||
|
@ -566,7 +561,6 @@ static void __purge_vmap_area_lazy(unsigned long *start, unsigned long *end,
|
|||
if (va->va_end > *end)
|
||||
*end = va->va_end;
|
||||
nr += (va->va_end - va->va_start) >> PAGE_SHIFT;
|
||||
unmap_vmap_area(va);
|
||||
list_add_tail(&va->purge_list, &valist);
|
||||
va->flags |= VM_LAZY_FREEING;
|
||||
va->flags &= ~VM_LAZY_FREE;
|
||||
|
@ -611,10 +605,11 @@ static void purge_vmap_area_lazy(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Free and unmap a vmap area, caller ensuring flush_cache_vunmap had been
|
||||
* called for the correct range previously.
|
||||
* Free a vmap area, caller ensuring that the area has been unmapped
|
||||
* and flush_cache_vunmap had been called for the correct range
|
||||
* previously.
|
||||
*/
|
||||
static void free_unmap_vmap_area_noflush(struct vmap_area *va)
|
||||
static void free_vmap_area_noflush(struct vmap_area *va)
|
||||
{
|
||||
va->flags |= VM_LAZY_FREE;
|
||||
atomic_add((va->va_end - va->va_start) >> PAGE_SHIFT, &vmap_lazy_nr);
|
||||
|
@ -622,6 +617,16 @@ static void free_unmap_vmap_area_noflush(struct vmap_area *va)
|
|||
try_purge_vmap_area_lazy();
|
||||
}
|
||||
|
||||
/*
|
||||
* Free and unmap a vmap area, caller ensuring flush_cache_vunmap had been
|
||||
* called for the correct range previously.
|
||||
*/
|
||||
static void free_unmap_vmap_area_noflush(struct vmap_area *va)
|
||||
{
|
||||
unmap_vmap_area(va);
|
||||
free_vmap_area_noflush(va);
|
||||
}
|
||||
|
||||
/*
|
||||
* Free and unmap a vmap area
|
||||
*/
|
||||
|
@ -798,7 +803,7 @@ static void free_vmap_block(struct vmap_block *vb)
|
|||
spin_unlock(&vmap_block_tree_lock);
|
||||
BUG_ON(tmp != vb);
|
||||
|
||||
free_unmap_vmap_area_noflush(vb->va);
|
||||
free_vmap_area_noflush(vb->va);
|
||||
call_rcu(&vb->rcu_head, rcu_free_vb);
|
||||
}
|
||||
|
||||
|
@ -936,6 +941,8 @@ static void vb_free(const void *addr, unsigned long size)
|
|||
rcu_read_unlock();
|
||||
BUG_ON(!vb);
|
||||
|
||||
vunmap_page_range((unsigned long)addr, (unsigned long)addr + size);
|
||||
|
||||
spin_lock(&vb->lock);
|
||||
BUG_ON(bitmap_allocate_region(vb->dirty_map, offset >> PAGE_SHIFT, order));
|
||||
|
||||
|
@ -988,7 +995,6 @@ void vm_unmap_aliases(void)
|
|||
|
||||
s = vb->va->va_start + (i << PAGE_SHIFT);
|
||||
e = vb->va->va_start + (j << PAGE_SHIFT);
|
||||
vunmap_page_range(s, e);
|
||||
flush = 1;
|
||||
|
||||
if (s < start)
|
||||
|
|
|
@ -750,8 +750,6 @@ static const char * const vmstat_text[] = {
|
|||
"nr_shmem",
|
||||
"nr_dirtied",
|
||||
"nr_written",
|
||||
"nr_dirty_threshold",
|
||||
"nr_dirty_background_threshold",
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
"numa_hit",
|
||||
|
@ -761,6 +759,8 @@ static const char * const vmstat_text[] = {
|
|||
"numa_local",
|
||||
"numa_other",
|
||||
#endif
|
||||
"nr_dirty_threshold",
|
||||
"nr_dirty_background_threshold",
|
||||
|
||||
#ifdef CONFIG_VM_EVENT_COUNTERS
|
||||
"pgpgin",
|
||||
|
|
|
@ -92,7 +92,7 @@ config MAC80211_MESH
|
|||
config MAC80211_LEDS
|
||||
bool "Enable LED triggers"
|
||||
depends on MAC80211
|
||||
select NEW_LEDS
|
||||
depends on LEDS_CLASS
|
||||
select LEDS_TRIGGERS
|
||||
---help---
|
||||
This option enables a few LED triggers for different
|
||||
|
|
Loading…
Reference in New Issue