Merge remote-tracking branch 'stable/linux-3.0.y' into develop-3.0
Merge v3.0.59 Conflicts: Makefile drivers/net/wireless/ath/ath9k/ar9003_2p2_initvals.h drivers/net/wireless/ath/ath9k/ar9003_eeprom.h drivers/usb/serial/option.c
This commit is contained in:
commit
67450b3bb6
104 changed files with 643 additions and 299 deletions
|
|
@ -425,7 +425,7 @@ _STATIC(__after_prom_start)
|
|||
tovirt(r6,r6) /* on booke, we already run at PAGE_OFFSET */
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CRASH_DUMP
|
||||
#ifdef CONFIG_RELOCATABLE
|
||||
/*
|
||||
* Check if the kernel has to be running as relocatable kernel based on the
|
||||
* variable __run_at_load, if it is set the kernel is treated as relocatable
|
||||
|
|
|
|||
|
|
@ -859,13 +859,8 @@ void update_vsyscall(struct timespec *wall_time, struct timespec *wtm,
|
|||
|
||||
void update_vsyscall_tz(void)
|
||||
{
|
||||
/* Make userspace gettimeofday spin until we're done. */
|
||||
++vdso_data->tb_update_count;
|
||||
smp_mb();
|
||||
vdso_data->tz_minuteswest = sys_tz.tz_minuteswest;
|
||||
vdso_data->tz_dsttime = sys_tz.tz_dsttime;
|
||||
smp_mb();
|
||||
++vdso_data->tb_update_count;
|
||||
}
|
||||
|
||||
static void __init clocksource_init(void)
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ int kvmppc_core_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu,
|
|||
run->dcr.dcrn = dcrn;
|
||||
run->dcr.data = 0;
|
||||
run->dcr.is_write = 0;
|
||||
vcpu->arch.dcr_is_write = 0;
|
||||
vcpu->arch.io_gpr = rt;
|
||||
vcpu->arch.dcr_needed = 1;
|
||||
kvmppc_account_exit(vcpu, DCR_EXITS);
|
||||
|
|
@ -100,6 +101,7 @@ int kvmppc_core_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu,
|
|||
run->dcr.dcrn = dcrn;
|
||||
run->dcr.data = kvmppc_get_gpr(vcpu, rs);
|
||||
run->dcr.is_write = 1;
|
||||
vcpu->arch.dcr_is_write = 1;
|
||||
vcpu->arch.dcr_needed = 1;
|
||||
kvmppc_account_exit(vcpu, DCR_EXITS);
|
||||
emulated = EMULATE_DO_DCR;
|
||||
|
|
|
|||
|
|
@ -568,6 +568,20 @@ static void __cpuinit init_amd(struct cpuinfo_x86 *c)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* The way access filter has a performance penalty on some workloads.
|
||||
* Disable it on the affected CPUs.
|
||||
*/
|
||||
if ((c->x86 == 0x15) &&
|
||||
(c->x86_model >= 0x02) && (c->x86_model < 0x20)) {
|
||||
u64 val;
|
||||
|
||||
if (!rdmsrl_safe(0xc0011021, &val) && !(val & 0x1E)) {
|
||||
val |= 0x1E;
|
||||
checking_wrmsrl(0xc0011021, val);
|
||||
}
|
||||
}
|
||||
|
||||
cpu_detect_cache_sizes(c);
|
||||
|
||||
/* Multi core CPU? */
|
||||
|
|
|
|||
|
|
@ -789,8 +789,8 @@ acpi_bus_extract_wakeup_device_power_package(acpi_handle handle,
|
|||
static void acpi_bus_set_run_wake_flags(struct acpi_device *device)
|
||||
{
|
||||
struct acpi_device_id button_device_ids[] = {
|
||||
{"PNP0C0D", 0},
|
||||
{"PNP0C0C", 0},
|
||||
{"PNP0C0D", 0},
|
||||
{"PNP0C0E", 0},
|
||||
{"", 0},
|
||||
};
|
||||
|
|
@ -802,6 +802,11 @@ static void acpi_bus_set_run_wake_flags(struct acpi_device *device)
|
|||
/* Power button, Lid switch always enable wakeup */
|
||||
if (!acpi_match_device_ids(device, button_device_ids)) {
|
||||
device->wakeup.flags.run_wake = 1;
|
||||
if (!acpi_match_device_ids(device, &button_device_ids[1])) {
|
||||
/* Do not use Lid/sleep button for S5 wakeup */
|
||||
if (device->wakeup.sleep_state == ACPI_STATE_S5)
|
||||
device->wakeup.sleep_state = ACPI_STATE_S4;
|
||||
}
|
||||
device_set_wakeup_capable(&device->dev, true);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2543,6 +2543,7 @@ int ata_bus_probe(struct ata_port *ap)
|
|||
* bus as we may be talking too fast.
|
||||
*/
|
||||
dev->pio_mode = XFER_PIO_0;
|
||||
dev->dma_mode = 0xff;
|
||||
|
||||
/* If the controller has a pio mode setup function
|
||||
* then use it to set the chipset to rights. Don't
|
||||
|
|
|
|||
|
|
@ -2602,6 +2602,7 @@ int ata_eh_reset(struct ata_link *link, int classify,
|
|||
* bus as we may be talking too fast.
|
||||
*/
|
||||
dev->pio_mode = XFER_PIO_0;
|
||||
dev->dma_mode = 0xff;
|
||||
|
||||
/* If the controller has a pio mode setup function
|
||||
* then use it to set the chipset to rights. Don't
|
||||
|
|
|
|||
|
|
@ -308,7 +308,8 @@ ata_scsi_activity_show(struct device *dev, struct device_attribute *attr,
|
|||
struct ata_port *ap = ata_shost_to_port(sdev->host);
|
||||
struct ata_device *atadev = ata_scsi_find_dev(ap, sdev);
|
||||
|
||||
if (ap->ops->sw_activity_show && (ap->flags & ATA_FLAG_SW_ACTIVITY))
|
||||
if (atadev && ap->ops->sw_activity_show &&
|
||||
(ap->flags & ATA_FLAG_SW_ACTIVITY))
|
||||
return ap->ops->sw_activity_show(atadev, buf);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
@ -323,7 +324,8 @@ ata_scsi_activity_store(struct device *dev, struct device_attribute *attr,
|
|||
enum sw_activity val;
|
||||
int rc;
|
||||
|
||||
if (ap->ops->sw_activity_store && (ap->flags & ATA_FLAG_SW_ACTIVITY)) {
|
||||
if (atadev && ap->ops->sw_activity_store &&
|
||||
(ap->flags & ATA_FLAG_SW_ACTIVITY)) {
|
||||
val = simple_strtoul(buf, NULL, 0);
|
||||
switch (val) {
|
||||
case OFF: case BLINK_ON: case BLINK_OFF:
|
||||
|
|
|
|||
|
|
@ -147,6 +147,10 @@ struct pdc_port_priv {
|
|||
dma_addr_t pkt_dma;
|
||||
};
|
||||
|
||||
struct pdc_host_priv {
|
||||
spinlock_t hard_reset_lock;
|
||||
};
|
||||
|
||||
static int pdc_sata_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
|
||||
static int pdc_sata_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val);
|
||||
static int pdc_ata_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
|
||||
|
|
@ -801,9 +805,10 @@ static void pdc_hard_reset_port(struct ata_port *ap)
|
|||
void __iomem *host_mmio = ap->host->iomap[PDC_MMIO_BAR];
|
||||
void __iomem *pcictl_b1_mmio = host_mmio + PDC_PCI_CTL + 1;
|
||||
unsigned int ata_no = pdc_ata_port_to_ata_no(ap);
|
||||
struct pdc_host_priv *hpriv = ap->host->private_data;
|
||||
u8 tmp;
|
||||
|
||||
spin_lock(&ap->host->lock);
|
||||
spin_lock(&hpriv->hard_reset_lock);
|
||||
|
||||
tmp = readb(pcictl_b1_mmio);
|
||||
tmp &= ~(0x10 << ata_no);
|
||||
|
|
@ -814,7 +819,7 @@ static void pdc_hard_reset_port(struct ata_port *ap)
|
|||
writeb(tmp, pcictl_b1_mmio);
|
||||
readb(pcictl_b1_mmio); /* flush */
|
||||
|
||||
spin_unlock(&ap->host->lock);
|
||||
spin_unlock(&hpriv->hard_reset_lock);
|
||||
}
|
||||
|
||||
static int pdc_sata_hardreset(struct ata_link *link, unsigned int *class,
|
||||
|
|
@ -1183,6 +1188,7 @@ static int pdc_ata_init_one(struct pci_dev *pdev,
|
|||
const struct ata_port_info *pi = &pdc_port_info[ent->driver_data];
|
||||
const struct ata_port_info *ppi[PDC_MAX_PORTS];
|
||||
struct ata_host *host;
|
||||
struct pdc_host_priv *hpriv;
|
||||
void __iomem *host_mmio;
|
||||
int n_ports, i, rc;
|
||||
int is_sataii_tx4;
|
||||
|
|
@ -1220,6 +1226,11 @@ static int pdc_ata_init_one(struct pci_dev *pdev,
|
|||
dev_printk(KERN_ERR, &pdev->dev, "failed to allocate host\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
hpriv = devm_kzalloc(&pdev->dev, sizeof *hpriv, GFP_KERNEL);
|
||||
if (!hpriv)
|
||||
return -ENOMEM;
|
||||
spin_lock_init(&hpriv->hard_reset_lock);
|
||||
host->private_data = hpriv;
|
||||
host->iomap = pcim_iomap_table(pdev);
|
||||
|
||||
is_sataii_tx4 = pdc_is_sataii_tx4(pi->flags);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/* Copyright (c) 2007 Coraid, Inc. See COPYING for GPL terms. */
|
||||
#define VERSION "47"
|
||||
#define VERSION "47q"
|
||||
#define AOE_MAJOR 152
|
||||
#define DEVICE_NAME "aoe"
|
||||
|
||||
|
|
|
|||
|
|
@ -277,8 +277,6 @@ aoeblk_gdalloc(void *vp)
|
|||
goto err_mempool;
|
||||
blk_queue_make_request(d->blkq, aoeblk_make_request);
|
||||
d->blkq->backing_dev_info.name = "aoe";
|
||||
if (bdi_init(&d->blkq->backing_dev_info))
|
||||
goto err_blkq;
|
||||
spin_lock_irqsave(&d->lock, flags);
|
||||
gd->major = AOE_MAJOR;
|
||||
gd->first_minor = d->sysminor * AOE_PARTITIONS;
|
||||
|
|
@ -299,9 +297,6 @@ aoeblk_gdalloc(void *vp)
|
|||
aoedisk_add_sysfs(d);
|
||||
return;
|
||||
|
||||
err_blkq:
|
||||
blk_cleanup_queue(d->blkq);
|
||||
d->blkq = NULL;
|
||||
err_mempool:
|
||||
mempool_destroy(d->bufpool);
|
||||
err_disk:
|
||||
|
|
|
|||
|
|
@ -863,8 +863,8 @@ static void fwnet_receive_broadcast(struct fw_iso_context *context,
|
|||
if (specifier_id == IANA_SPECIFIER_ID && ver == RFC2734_SW_VERSION) {
|
||||
buf_ptr += 2;
|
||||
length -= IEEE1394_GASP_HDR_SIZE;
|
||||
fwnet_incoming_packet(dev, buf_ptr, length,
|
||||
source_node_id, -1, true);
|
||||
fwnet_incoming_packet(dev, buf_ptr, length, source_node_id,
|
||||
context->card->generation, true);
|
||||
}
|
||||
|
||||
packet.payload_length = dev->rcv_buffer_size;
|
||||
|
|
@ -959,7 +959,12 @@ static void fwnet_transmit_packet_done(struct fwnet_packet_task *ptask)
|
|||
break;
|
||||
}
|
||||
|
||||
skb_pull(skb, ptask->max_payload);
|
||||
if (ptask->dest_node == IEEE1394_ALL_NODES) {
|
||||
skb_pull(skb,
|
||||
ptask->max_payload + IEEE1394_GASP_HDR_SIZE);
|
||||
} else {
|
||||
skb_pull(skb, ptask->max_payload);
|
||||
}
|
||||
if (ptask->outstanding_pkts > 1) {
|
||||
fwnet_make_sf_hdr(&ptask->hdr, RFC2374_HDR_INTFRAG,
|
||||
dg_size, fg_off, datagram_label);
|
||||
|
|
@ -1062,7 +1067,7 @@ static int fwnet_send_packet(struct fwnet_packet_task *ptask)
|
|||
smp_rmb();
|
||||
node_id = dev->card->node_id;
|
||||
|
||||
p = skb_push(ptask->skb, 8);
|
||||
p = skb_push(ptask->skb, IEEE1394_GASP_HDR_SIZE);
|
||||
put_unaligned_be32(node_id << 16 | IANA_SPECIFIER_ID >> 8, p);
|
||||
put_unaligned_be32((IANA_SPECIFIER_ID & 0xff) << 24
|
||||
| RFC2734_SW_VERSION, &p[4]);
|
||||
|
|
|
|||
|
|
@ -2754,6 +2754,8 @@
|
|||
#define _PFA_CTL_1 0x68080
|
||||
#define _PFB_CTL_1 0x68880
|
||||
#define PF_ENABLE (1<<31)
|
||||
#define PF_PIPE_SEL_MASK_IVB (3<<29)
|
||||
#define PF_PIPE_SEL_IVB(pipe) ((pipe)<<29)
|
||||
#define PF_FILTER_MASK (3<<23)
|
||||
#define PF_FILTER_PROGRAMMED (0<<23)
|
||||
#define PF_FILTER_MED_3x3 (1<<23)
|
||||
|
|
|
|||
|
|
@ -2696,7 +2696,11 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc)
|
|||
* as some pre-programmed values are broken,
|
||||
* e.g. x201.
|
||||
*/
|
||||
I915_WRITE(PF_CTL(pipe), PF_ENABLE | PF_FILTER_MED_3x3);
|
||||
if (IS_IVYBRIDGE(dev))
|
||||
I915_WRITE(PF_CTL(pipe), PF_ENABLE | PF_FILTER_MED_3x3 |
|
||||
PF_PIPE_SEL_IVB(pipe));
|
||||
else
|
||||
I915_WRITE(PF_CTL(pipe), PF_ENABLE | PF_FILTER_MED_3x3);
|
||||
I915_WRITE(PF_WIN_POS(pipe), dev_priv->pch_pf_pos);
|
||||
I915_WRITE(PF_WIN_SZ(pipe), dev_priv->pch_pf_size);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -751,14 +751,6 @@ static const struct dmi_system_id intel_no_lvds[] = {
|
|||
DMI_MATCH(DMI_BOARD_NAME, "MS-7469"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = intel_no_lvds_dmi_callback,
|
||||
.ident = "ZOTAC ZBOXSD-ID12/ID13",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_BOARD_VENDOR, "ZOTAC"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "ZBOXSD-ID12/ID13"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = intel_no_lvds_dmi_callback,
|
||||
.ident = "Gigabyte GA-D525TUD",
|
||||
|
|
|
|||
|
|
@ -617,6 +617,14 @@ static enum drm_connector_status radeon_legacy_primary_dac_detect(struct drm_enc
|
|||
enum drm_connector_status found = connector_status_disconnected;
|
||||
bool color = true;
|
||||
|
||||
/* just don't bother on RN50 those chip are often connected to remoting
|
||||
* console hw and often we get failure to load detect those. So to make
|
||||
* everyone happy report the encoder as always connected.
|
||||
*/
|
||||
if (ASIC_IS_RN50(rdev)) {
|
||||
return connector_status_connected;
|
||||
}
|
||||
|
||||
/* save the regs we need */
|
||||
vclk_ecp_cntl = RREG32_PLL(RADEON_VCLK_ECP_CNTL);
|
||||
crtc_ext_cntl = RREG32(RADEON_CRTC_EXT_CNTL);
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ static int ibnl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
|
|||
return -EINVAL;
|
||||
return netlink_dump_start(nls, skb, nlh,
|
||||
client->cb_table[op].dump,
|
||||
NULL);
|
||||
NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -511,6 +511,7 @@ void nes_iwarp_ce_handler(struct nes_device *, struct nes_hw_cq *);
|
|||
int nes_destroy_cqp(struct nes_device *);
|
||||
int nes_nic_cm_xmit(struct sk_buff *, struct net_device *);
|
||||
void nes_recheck_link_status(struct work_struct *work);
|
||||
void nes_terminate_timeout(unsigned long context);
|
||||
|
||||
/* nes_nic.c */
|
||||
struct net_device *nes_netdev_init(struct nes_device *, void __iomem *);
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
|
|||
static void process_critical_error(struct nes_device *nesdev);
|
||||
static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number);
|
||||
static unsigned int nes_reset_adapter_ne020(struct nes_device *nesdev, u8 *OneG_Mode);
|
||||
static void nes_terminate_timeout(unsigned long context);
|
||||
static void nes_terminate_start_timer(struct nes_qp *nesqp);
|
||||
|
||||
#ifdef CONFIG_INFINIBAND_NES_DEBUG
|
||||
|
|
@ -3496,7 +3495,7 @@ static void nes_terminate_received(struct nes_device *nesdev,
|
|||
}
|
||||
|
||||
/* Timeout routine in case terminate fails to complete */
|
||||
static void nes_terminate_timeout(unsigned long context)
|
||||
void nes_terminate_timeout(unsigned long context)
|
||||
{
|
||||
struct nes_qp *nesqp = (struct nes_qp *)(unsigned long)context;
|
||||
|
||||
|
|
@ -3506,11 +3505,7 @@ static void nes_terminate_timeout(unsigned long context)
|
|||
/* Set a timer in case hw cannot complete the terminate sequence */
|
||||
static void nes_terminate_start_timer(struct nes_qp *nesqp)
|
||||
{
|
||||
init_timer(&nesqp->terminate_timer);
|
||||
nesqp->terminate_timer.function = nes_terminate_timeout;
|
||||
nesqp->terminate_timer.expires = jiffies + HZ;
|
||||
nesqp->terminate_timer.data = (unsigned long)nesqp;
|
||||
add_timer(&nesqp->terminate_timer);
|
||||
mod_timer(&nesqp->terminate_timer, (jiffies + HZ));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1414,6 +1414,9 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
|
|||
}
|
||||
|
||||
nesqp->sig_all = (init_attr->sq_sig_type == IB_SIGNAL_ALL_WR);
|
||||
init_timer(&nesqp->terminate_timer);
|
||||
nesqp->terminate_timer.function = nes_terminate_timeout;
|
||||
nesqp->terminate_timer.data = (unsigned long)nesqp;
|
||||
|
||||
/* update the QP table */
|
||||
nesdev->nesadapter->qp_table[nesqp->hwqp.qp_id-NES_FIRST_QPN] = nesqp;
|
||||
|
|
@ -1423,7 +1426,6 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
|
|||
return &nesqp->ibqp;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* nes_clean_cq
|
||||
*/
|
||||
|
|
@ -2568,6 +2570,11 @@ static struct ib_mr *nes_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
|
|||
return ibmr;
|
||||
case IWNES_MEMREG_TYPE_QP:
|
||||
case IWNES_MEMREG_TYPE_CQ:
|
||||
if (!region->length) {
|
||||
nes_debug(NES_DBG_MR, "Unable to register zero length region for CQ\n");
|
||||
ib_umem_release(region);
|
||||
return ERR_PTR(-EINVAL);
|
||||
}
|
||||
nespbl = kzalloc(sizeof(*nespbl), GFP_KERNEL);
|
||||
if (!nespbl) {
|
||||
nes_debug(NES_DBG_MR, "Unable to allocate PBL\n");
|
||||
|
|
|
|||
|
|
@ -1524,6 +1524,14 @@ static int copy_params(struct dm_ioctl __user *user, struct dm_ioctl **param)
|
|||
if (copy_from_user(dmi, user, tmp.data_size))
|
||||
goto bad;
|
||||
|
||||
/*
|
||||
* Abort if something changed the ioctl data while it was being copied.
|
||||
*/
|
||||
if (dmi->data_size != tmp.data_size) {
|
||||
DMERR("rejecting ioctl: data size modified while processing parameters");
|
||||
goto bad;
|
||||
}
|
||||
|
||||
/* Wipe the user buffer so we do not return it to userspace */
|
||||
if (secure_data && clear_user(user, tmp.data_size))
|
||||
goto bad;
|
||||
|
|
|
|||
|
|
@ -18,6 +18,10 @@
|
|||
#include <linux/pm_runtime.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
static struct device_type mfd_dev_type = {
|
||||
.name = "mfd_device",
|
||||
};
|
||||
|
||||
int mfd_cell_enable(struct platform_device *pdev)
|
||||
{
|
||||
const struct mfd_cell *cell = mfd_get_cell(pdev);
|
||||
|
|
@ -87,6 +91,7 @@ static int mfd_add_device(struct device *parent, int id,
|
|||
goto fail_device;
|
||||
|
||||
pdev->dev.parent = parent;
|
||||
pdev->dev.type = &mfd_dev_type;
|
||||
|
||||
if (cell->pdata_size) {
|
||||
ret = platform_device_add_data(pdev,
|
||||
|
|
@ -182,10 +187,16 @@ EXPORT_SYMBOL(mfd_add_devices);
|
|||
|
||||
static int mfd_remove_devices_fn(struct device *dev, void *c)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
const struct mfd_cell *cell = mfd_get_cell(pdev);
|
||||
struct platform_device *pdev;
|
||||
const struct mfd_cell *cell;
|
||||
atomic_t **usage_count = c;
|
||||
|
||||
if (dev->type != &mfd_dev_type)
|
||||
return 0;
|
||||
|
||||
pdev = to_platform_device(dev);
|
||||
cell = mfd_get_cell(pdev);
|
||||
|
||||
/* find the base address of usage_count pointers (for freeing) */
|
||||
if (!*usage_count || (cell->usage_count < *usage_count))
|
||||
*usage_count = cell->usage_count;
|
||||
|
|
|
|||
|
|
@ -152,6 +152,9 @@ enum {
|
|||
/* Device IDs */
|
||||
USB_DEVICE_ID_I6050 = 0x0186,
|
||||
USB_DEVICE_ID_I6050_2 = 0x0188,
|
||||
USB_DEVICE_ID_I6150 = 0x07d6,
|
||||
USB_DEVICE_ID_I6150_2 = 0x07d7,
|
||||
USB_DEVICE_ID_I6150_3 = 0x07d9,
|
||||
USB_DEVICE_ID_I6250 = 0x0187,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -491,6 +491,9 @@ int i2400mu_probe(struct usb_interface *iface,
|
|||
switch (id->idProduct) {
|
||||
case USB_DEVICE_ID_I6050:
|
||||
case USB_DEVICE_ID_I6050_2:
|
||||
case USB_DEVICE_ID_I6150:
|
||||
case USB_DEVICE_ID_I6150_2:
|
||||
case USB_DEVICE_ID_I6150_3:
|
||||
case USB_DEVICE_ID_I6250:
|
||||
i2400mu->i6050 = 1;
|
||||
break;
|
||||
|
|
@ -740,6 +743,9 @@ static
|
|||
struct usb_device_id i2400mu_id_table[] = {
|
||||
{ USB_DEVICE(0x8086, USB_DEVICE_ID_I6050) },
|
||||
{ USB_DEVICE(0x8086, USB_DEVICE_ID_I6050_2) },
|
||||
{ USB_DEVICE(0x8087, USB_DEVICE_ID_I6150) },
|
||||
{ USB_DEVICE(0x8087, USB_DEVICE_ID_I6150_2) },
|
||||
{ USB_DEVICE(0x8087, USB_DEVICE_ID_I6150_3) },
|
||||
{ USB_DEVICE(0x8086, USB_DEVICE_ID_I6250) },
|
||||
{ USB_DEVICE(0x8086, 0x0181) },
|
||||
{ USB_DEVICE(0x8086, 0x1403) },
|
||||
|
|
|
|||
|
|
@ -1793,10 +1793,17 @@ static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn,
|
|||
if (!pte)
|
||||
return -ENOMEM;
|
||||
/* It is large page*/
|
||||
if (largepage_lvl > 1)
|
||||
if (largepage_lvl > 1) {
|
||||
pteval |= DMA_PTE_LARGE_PAGE;
|
||||
else
|
||||
/* Ensure that old small page tables are removed to make room
|
||||
for superpage, if they exist. */
|
||||
dma_pte_clear_range(domain, iov_pfn,
|
||||
iov_pfn + lvl_to_nr_pages(largepage_lvl) - 1);
|
||||
dma_pte_free_pagetable(domain, iov_pfn,
|
||||
iov_pfn + lvl_to_nr_pages(largepage_lvl) - 1);
|
||||
} else {
|
||||
pteval &= ~(uint64_t)DMA_PTE_LARGE_PAGE;
|
||||
}
|
||||
|
||||
}
|
||||
/* We don't need lock here, nobody else
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ static int pgid_cmp(struct pgid *p1, struct pgid *p2)
|
|||
* Determine pathgroup state from PGID data.
|
||||
*/
|
||||
static void pgid_analyze(struct ccw_device *cdev, struct pgid **p,
|
||||
int *mismatch, int *reserved, u8 *reset)
|
||||
int *mismatch, u8 *reserved, u8 *reset)
|
||||
{
|
||||
struct pgid *pgid = &cdev->private->pgid[0];
|
||||
struct pgid *first = NULL;
|
||||
|
|
@ -248,7 +248,7 @@ static void pgid_analyze(struct ccw_device *cdev, struct pgid **p,
|
|||
if ((cdev->private->pgid_valid_mask & lpm) == 0)
|
||||
continue;
|
||||
if (pgid->inf.ps.state2 == SNID_STATE2_RESVD_ELSE)
|
||||
*reserved = 1;
|
||||
*reserved |= lpm;
|
||||
if (pgid_is_reset(pgid)) {
|
||||
*reset |= lpm;
|
||||
continue;
|
||||
|
|
@ -316,14 +316,14 @@ static void snid_done(struct ccw_device *cdev, int rc)
|
|||
struct subchannel *sch = to_subchannel(cdev->dev.parent);
|
||||
struct pgid *pgid;
|
||||
int mismatch = 0;
|
||||
int reserved = 0;
|
||||
u8 reserved = 0;
|
||||
u8 reset = 0;
|
||||
u8 donepm;
|
||||
|
||||
if (rc)
|
||||
goto out;
|
||||
pgid_analyze(cdev, &pgid, &mismatch, &reserved, &reset);
|
||||
if (reserved)
|
||||
if (reserved == cdev->private->pgid_valid_mask)
|
||||
rc = -EUSERS;
|
||||
else if (mismatch)
|
||||
rc = -EOPNOTSUPP;
|
||||
|
|
@ -336,7 +336,7 @@ static void snid_done(struct ccw_device *cdev, int rc)
|
|||
}
|
||||
out:
|
||||
CIO_MSG_EVENT(2, "snid: device 0.%x.%04x: rc=%d pvm=%02x vpm=%02x "
|
||||
"todo=%02x mism=%d rsvd=%d reset=%02x\n", id->ssid,
|
||||
"todo=%02x mism=%d rsvd=%02x reset=%02x\n", id->ssid,
|
||||
id->devno, rc, cdev->private->pgid_valid_mask, sch->vpm,
|
||||
cdev->private->pgid_todo_mask, mismatch, reserved, reset);
|
||||
switch (rc) {
|
||||
|
|
|
|||
|
|
@ -193,21 +193,11 @@ struct mvs_prd {
|
|||
#define SPI_ADDR_VLD_94XX (1U << 1)
|
||||
#define SPI_CTRL_SpiStart_94XX (1U << 0)
|
||||
|
||||
#define mv_ffc(x) ffz(x)
|
||||
|
||||
static inline int
|
||||
mv_ffc64(u64 v)
|
||||
{
|
||||
int i;
|
||||
i = mv_ffc((u32)v);
|
||||
if (i >= 0)
|
||||
return i;
|
||||
i = mv_ffc((u32)(v>>32));
|
||||
|
||||
if (i != 0)
|
||||
return 32 + i;
|
||||
|
||||
return -1;
|
||||
u64 x = ~v;
|
||||
return x ? __ffs64(x) : -1;
|
||||
}
|
||||
|
||||
#define r_reg_set_enable(i) \
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ extern struct kmem_cache *mvs_task_list_cache;
|
|||
#define DEV_IS_EXPANDER(type) \
|
||||
((type == EDGE_DEV) || (type == FANOUT_DEV))
|
||||
|
||||
#define bit(n) ((u32)1 << n)
|
||||
#define bit(n) ((u64)1 << n)
|
||||
|
||||
#define for_each_phy(__lseq_mask, __mc, __lseq) \
|
||||
for ((__mc) = (__lseq_mask), (__lseq) = 0; \
|
||||
|
|
|
|||
|
|
@ -3406,9 +3406,9 @@ qla2x00_do_dpc(void *data)
|
|||
base_vha->host_no));
|
||||
}
|
||||
|
||||
if (test_bit(FCPORT_UPDATE_NEEDED, &base_vha->dpc_flags)) {
|
||||
if (test_and_clear_bit(FCPORT_UPDATE_NEEDED,
|
||||
&base_vha->dpc_flags)) {
|
||||
qla2x00_update_fcports(base_vha);
|
||||
clear_bit(FCPORT_UPDATE_NEEDED, &base_vha->dpc_flags);
|
||||
}
|
||||
|
||||
if (test_bit(ISP_QUIESCE_NEEDED, &base_vha->dpc_flags)) {
|
||||
|
|
|
|||
|
|
@ -424,6 +424,7 @@ config COMEDI_ADQ12B
|
|||
|
||||
config COMEDI_NI_AT_A2150
|
||||
tristate "NI AT-A2150 ISA card support"
|
||||
select COMEDI_FC
|
||||
depends on COMEDI_NI_COMMON
|
||||
depends on VIRT_TO_BUS
|
||||
default N
|
||||
|
|
|
|||
|
|
@ -138,6 +138,9 @@ static long comedi_unlocked_ioctl(struct file *file, unsigned int cmd,
|
|||
if (cmd == COMEDI_DEVCONFIG) {
|
||||
rc = do_devconfig_ioctl(dev,
|
||||
(struct comedi_devconfig __user *)arg);
|
||||
if (rc == 0)
|
||||
/* Evade comedi_auto_unconfig(). */
|
||||
dev_file_info->hardware_device = NULL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
@ -2207,6 +2210,7 @@ int comedi_alloc_board_minor(struct device *hardware_device)
|
|||
kfree(info);
|
||||
return -ENOMEM;
|
||||
}
|
||||
info->hardware_device = hardware_device;
|
||||
comedi_device_init(info->device);
|
||||
spin_lock_irqsave(&comedi_file_info_table_lock, flags);
|
||||
for (i = 0; i < COMEDI_NUM_BOARD_MINORS; ++i) {
|
||||
|
|
@ -2296,6 +2300,23 @@ void comedi_free_board_minor(unsigned minor)
|
|||
}
|
||||
}
|
||||
|
||||
int comedi_find_board_minor(struct device *hardware_device)
|
||||
{
|
||||
int minor;
|
||||
struct comedi_device_file_info *info;
|
||||
|
||||
for (minor = 0; minor < COMEDI_NUM_BOARD_MINORS; minor++) {
|
||||
spin_lock(&comedi_file_info_table_lock);
|
||||
info = comedi_file_info_table[minor];
|
||||
if (info && info->hardware_device == hardware_device) {
|
||||
spin_unlock(&comedi_file_info_table_lock);
|
||||
return minor;
|
||||
}
|
||||
spin_unlock(&comedi_file_info_table_lock);
|
||||
}
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
int comedi_alloc_subdevice_minor(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -237,6 +237,7 @@ struct comedi_device_file_info {
|
|||
struct comedi_device *device;
|
||||
struct comedi_subdevice *read_subdevice;
|
||||
struct comedi_subdevice *write_subdevice;
|
||||
struct device *hardware_device;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_COMEDI_DEBUG
|
||||
|
|
|
|||
|
|
@ -819,25 +819,14 @@ static int comedi_auto_config(struct device *hardware_device,
|
|||
int minor;
|
||||
struct comedi_device_file_info *dev_file_info;
|
||||
int retval;
|
||||
unsigned *private_data = NULL;
|
||||
|
||||
if (!comedi_autoconfig) {
|
||||
dev_set_drvdata(hardware_device, NULL);
|
||||
if (!comedi_autoconfig)
|
||||
return 0;
|
||||
}
|
||||
|
||||
minor = comedi_alloc_board_minor(hardware_device);
|
||||
if (minor < 0)
|
||||
return minor;
|
||||
|
||||
private_data = kmalloc(sizeof(unsigned), GFP_KERNEL);
|
||||
if (private_data == NULL) {
|
||||
retval = -ENOMEM;
|
||||
goto cleanup;
|
||||
}
|
||||
*private_data = minor;
|
||||
dev_set_drvdata(hardware_device, private_data);
|
||||
|
||||
dev_file_info = comedi_get_device_file_info(minor);
|
||||
|
||||
memset(&it, 0, sizeof(it));
|
||||
|
|
@ -850,25 +839,22 @@ static int comedi_auto_config(struct device *hardware_device,
|
|||
retval = comedi_device_attach(dev_file_info->device, &it);
|
||||
mutex_unlock(&dev_file_info->device->mutex);
|
||||
|
||||
cleanup:
|
||||
if (retval < 0) {
|
||||
kfree(private_data);
|
||||
if (retval < 0)
|
||||
comedi_free_board_minor(minor);
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
static void comedi_auto_unconfig(struct device *hardware_device)
|
||||
{
|
||||
unsigned *minor = (unsigned *)dev_get_drvdata(hardware_device);
|
||||
if (minor == NULL)
|
||||
int minor;
|
||||
|
||||
if (hardware_device == NULL)
|
||||
return;
|
||||
|
||||
BUG_ON(*minor >= COMEDI_NUM_BOARD_MINORS);
|
||||
|
||||
comedi_free_board_minor(*minor);
|
||||
dev_set_drvdata(hardware_device, NULL);
|
||||
kfree(minor);
|
||||
minor = comedi_find_board_minor(hardware_device);
|
||||
if (minor < 0)
|
||||
return;
|
||||
BUG_ON(minor >= COMEDI_NUM_BOARD_MINORS);
|
||||
comedi_free_board_minor(minor);
|
||||
}
|
||||
|
||||
int comedi_pci_auto_config(struct pci_dev *pcidev, const char *board_name)
|
||||
|
|
|
|||
|
|
@ -461,7 +461,7 @@ static int waveform_ai_cancel(struct comedi_device *dev,
|
|||
struct comedi_subdevice *s)
|
||||
{
|
||||
devpriv->timer_running = 0;
|
||||
del_timer(&devpriv->timer);
|
||||
del_timer_sync(&devpriv->timer);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ int insn_inval(struct comedi_device *dev, struct comedi_subdevice *s,
|
|||
struct comedi_insn *insn, unsigned int *data);
|
||||
int comedi_alloc_board_minor(struct device *hardware_device);
|
||||
void comedi_free_board_minor(unsigned minor);
|
||||
int comedi_find_board_minor(struct device *hardware_device);
|
||||
void comedi_reset_async_buf(struct comedi_async *async);
|
||||
int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
unsigned long new_size);
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ static struct usb_device_id rtl871x_usb_id_tbl[] = {
|
|||
{USB_DEVICE(0x0B05, 0x1791)}, /* 11n mode disable */
|
||||
/* Belkin */
|
||||
{USB_DEVICE(0x050D, 0x945A)},
|
||||
/* ISY IWL - Belkin clone */
|
||||
{USB_DEVICE(0x050D, 0x11F1)},
|
||||
/* Corega */
|
||||
{USB_DEVICE(0x07AA, 0x0047)},
|
||||
/* D-Link */
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ int synth_init(char *synth_name)
|
|||
|
||||
mutex_lock(&spk_mutex);
|
||||
/* First, check if we already have it loaded. */
|
||||
for (i = 0; synths[i] != NULL && i < MAXSYNTHS; i++)
|
||||
for (i = 0; i < MAXSYNTHS && synths[i] != NULL; i++)
|
||||
if (strcmp(synths[i]->name, synth_name) == 0)
|
||||
synth = synths[i];
|
||||
|
||||
|
|
@ -423,7 +423,7 @@ int synth_add(struct spk_synth *in_synth)
|
|||
int i;
|
||||
int status = 0;
|
||||
mutex_lock(&spk_mutex);
|
||||
for (i = 0; synths[i] != NULL && i < MAXSYNTHS; i++)
|
||||
for (i = 0; i < MAXSYNTHS && synths[i] != NULL; i++)
|
||||
/* synth_remove() is responsible for rotating the array down */
|
||||
if (in_synth == synths[i]) {
|
||||
mutex_unlock(&spk_mutex);
|
||||
|
|
|
|||
|
|
@ -1256,7 +1256,7 @@ static BOOL s_bHandleRxEncryption (
|
|||
|
||||
PayloadLen -= (WLAN_HDR_ADDR3_LEN + 8 + 4); // 24 is 802.11 header, 8 is IV&ExtIV, 4 is crc
|
||||
*pdwRxTSC47_16 = cpu_to_le32(*(PDWORD)(pbyIV + 4));
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ExtIV: %lx\n",*pdwRxTSC47_16);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ExtIV: %x\n", *pdwRxTSC47_16);
|
||||
if (byDecMode == KEY_CTL_TKIP) {
|
||||
*pwRxTSC15_0 = cpu_to_le16(MAKEWORD(*(pbyIV+2), *pbyIV));
|
||||
} else {
|
||||
|
|
@ -1367,7 +1367,7 @@ static BOOL s_bHostWepRxEncryption (
|
|||
|
||||
PayloadLen -= (WLAN_HDR_ADDR3_LEN + 8 + 4); // 24 is 802.11 header, 8 is IV&ExtIV, 4 is crc
|
||||
*pdwRxTSC47_16 = cpu_to_le32(*(PDWORD)(pbyIV + 4));
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ExtIV: %lx\n",*pdwRxTSC47_16);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ExtIV: %x\n", *pdwRxTSC47_16);
|
||||
|
||||
if (byDecMode == KEY_CTL_TKIP) {
|
||||
*pwRxTSC15_0 = cpu_to_le16(MAKEWORD(*(pbyIV+2), *pbyIV));
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ BOOL KeybSetKey(
|
|||
PSKeyManagement pTable,
|
||||
PBYTE pbyBSSID,
|
||||
DWORD dwKeyIndex,
|
||||
unsigned long uKeyLength,
|
||||
u32 uKeyLength,
|
||||
PQWORD pKeyRSC,
|
||||
PBYTE pbyKey,
|
||||
BYTE byKeyDecMode
|
||||
|
|
@ -235,7 +235,8 @@ BOOL KeybSetKey(
|
|||
PSKeyItem pKey;
|
||||
unsigned int uKeyIdx;
|
||||
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Enter KeybSetKey: %lX\n", dwKeyIndex);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
|
||||
"Enter KeybSetKey: %X\n", dwKeyIndex);
|
||||
|
||||
j = (MAX_KEY_TABLE-1);
|
||||
for (i=0;i<(MAX_KEY_TABLE-1);i++) {
|
||||
|
|
@ -261,7 +262,9 @@ BOOL KeybSetKey(
|
|||
if ((dwKeyIndex & TRANSMIT_KEY) != 0) {
|
||||
// Group transmit key
|
||||
pTable->KeyTable[i].dwGTKeyIndex = dwKeyIndex;
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Group transmit key(R)[%lX]: %d\n", pTable->KeyTable[i].dwGTKeyIndex, i);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
|
||||
"Group transmit key(R)[%X]: %d\n",
|
||||
pTable->KeyTable[i].dwGTKeyIndex, i);
|
||||
}
|
||||
pTable->KeyTable[i].wKeyCtl &= 0xFF0F; // clear group key control filed
|
||||
pTable->KeyTable[i].wKeyCtl |= (byKeyDecMode << 4);
|
||||
|
|
@ -302,9 +305,12 @@ BOOL KeybSetKey(
|
|||
}
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n");
|
||||
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwTSC47_16: %lx\n ", pKey->dwTSC47_16);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->wTSC15_0: %x\n ", pKey->wTSC15_0);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %lx\n ", pKey->dwKeyIndex);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwTSC47_16: %x\n ",
|
||||
pKey->dwTSC47_16);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->wTSC15_0: %x\n ",
|
||||
pKey->wTSC15_0);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %x\n ",
|
||||
pKey->dwKeyIndex);
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
|
@ -326,7 +332,9 @@ BOOL KeybSetKey(
|
|||
if ((dwKeyIndex & TRANSMIT_KEY) != 0) {
|
||||
// Group transmit key
|
||||
pTable->KeyTable[j].dwGTKeyIndex = dwKeyIndex;
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Group transmit key(N)[%lX]: %d\n", pTable->KeyTable[j].dwGTKeyIndex, j);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
|
||||
"Group transmit key(N)[%X]: %d\n",
|
||||
pTable->KeyTable[j].dwGTKeyIndex, j);
|
||||
}
|
||||
pTable->KeyTable[j].wKeyCtl &= 0xFF0F; // clear group key control filed
|
||||
pTable->KeyTable[j].wKeyCtl |= (byKeyDecMode << 4);
|
||||
|
|
@ -367,9 +375,11 @@ BOOL KeybSetKey(
|
|||
}
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n");
|
||||
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwTSC47_16: %lx\n ", pKey->dwTSC47_16);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwTSC47_16: %x\n ",
|
||||
pKey->dwTSC47_16);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->wTSC15_0: %x\n ", pKey->wTSC15_0);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %lx\n ", pKey->dwKeyIndex);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %x\n ",
|
||||
pKey->dwKeyIndex);
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
|
@ -597,7 +607,8 @@ BOOL KeybGetTransmitKey(PSKeyManagement pTable, PBYTE pbyBSSID, DWORD dwKeyType,
|
|||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%x ", pTable->KeyTable[i].abyBSSID[ii]);
|
||||
}
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n");
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"dwGTKeyIndex: %lX\n", pTable->KeyTable[i].dwGTKeyIndex);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"dwGTKeyIndex: %X\n",
|
||||
pTable->KeyTable[i].dwGTKeyIndex);
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
|
@ -664,7 +675,7 @@ BOOL KeybSetDefaultKey(
|
|||
void *pDeviceHandler,
|
||||
PSKeyManagement pTable,
|
||||
DWORD dwKeyIndex,
|
||||
unsigned long uKeyLength,
|
||||
u32 uKeyLength,
|
||||
PQWORD pKeyRSC,
|
||||
PBYTE pbyKey,
|
||||
BYTE byKeyDecMode
|
||||
|
|
@ -693,7 +704,10 @@ BOOL KeybSetDefaultKey(
|
|||
if ((dwKeyIndex & TRANSMIT_KEY) != 0) {
|
||||
// Group transmit key
|
||||
pTable->KeyTable[MAX_KEY_TABLE-1].dwGTKeyIndex = dwKeyIndex;
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Group transmit key(R)[%lX]: %d\n", pTable->KeyTable[MAX_KEY_TABLE-1].dwGTKeyIndex, MAX_KEY_TABLE-1);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
|
||||
"Group transmit key(R)[%X]: %d\n",
|
||||
pTable->KeyTable[MAX_KEY_TABLE-1].dwGTKeyIndex,
|
||||
MAX_KEY_TABLE-1);
|
||||
|
||||
}
|
||||
pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl &= 0x7F00; // clear all key control filed
|
||||
|
|
@ -744,9 +758,11 @@ BOOL KeybSetDefaultKey(
|
|||
}
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n");
|
||||
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwTSC47_16: %lx\n", pKey->dwTSC47_16);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwTSC47_16: %x\n",
|
||||
pKey->dwTSC47_16);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->wTSC15_0: %x\n", pKey->wTSC15_0);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %lx\n", pKey->dwKeyIndex);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %x\n",
|
||||
pKey->dwKeyIndex);
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
|
@ -772,7 +788,7 @@ BOOL KeybSetAllGroupKey(
|
|||
void *pDeviceHandler,
|
||||
PSKeyManagement pTable,
|
||||
DWORD dwKeyIndex,
|
||||
unsigned long uKeyLength,
|
||||
u32 uKeyLength,
|
||||
PQWORD pKeyRSC,
|
||||
PBYTE pbyKey,
|
||||
BYTE byKeyDecMode
|
||||
|
|
@ -784,7 +800,8 @@ BOOL KeybSetAllGroupKey(
|
|||
PSKeyItem pKey;
|
||||
unsigned int uKeyIdx;
|
||||
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Enter KeybSetAllGroupKey: %lX\n", dwKeyIndex);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Enter KeybSetAllGroupKey: %X\n",
|
||||
dwKeyIndex);
|
||||
|
||||
|
||||
if ((dwKeyIndex & PAIRWISE_KEY) != 0) { // Pairwise key
|
||||
|
|
@ -801,7 +818,9 @@ BOOL KeybSetAllGroupKey(
|
|||
if ((dwKeyIndex & TRANSMIT_KEY) != 0) {
|
||||
// Group transmit key
|
||||
pTable->KeyTable[i].dwGTKeyIndex = dwKeyIndex;
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Group transmit key(R)[%lX]: %d\n", pTable->KeyTable[i].dwGTKeyIndex, i);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
|
||||
"Group transmit key(R)[%X]: %d\n",
|
||||
pTable->KeyTable[i].dwGTKeyIndex, i);
|
||||
|
||||
}
|
||||
pTable->KeyTable[i].wKeyCtl &= 0xFF0F; // clear group key control filed
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
typedef struct tagSKeyItem
|
||||
{
|
||||
BOOL bKeyValid;
|
||||
unsigned long uKeyLength;
|
||||
u32 uKeyLength;
|
||||
BYTE abyKey[MAX_KEY_LEN];
|
||||
QWORD KeyRSC;
|
||||
DWORD dwTSC47_16;
|
||||
|
|
@ -107,7 +107,7 @@ BOOL KeybSetKey(
|
|||
PSKeyManagement pTable,
|
||||
PBYTE pbyBSSID,
|
||||
DWORD dwKeyIndex,
|
||||
unsigned long uKeyLength,
|
||||
u32 uKeyLength,
|
||||
PQWORD pKeyRSC,
|
||||
PBYTE pbyKey,
|
||||
BYTE byKeyDecMode
|
||||
|
|
@ -146,7 +146,7 @@ BOOL KeybSetDefaultKey(
|
|||
void *pDeviceHandler,
|
||||
PSKeyManagement pTable,
|
||||
DWORD dwKeyIndex,
|
||||
unsigned long uKeyLength,
|
||||
u32 uKeyLength,
|
||||
PQWORD pKeyRSC,
|
||||
PBYTE pbyKey,
|
||||
BYTE byKeyDecMode
|
||||
|
|
@ -156,7 +156,7 @@ BOOL KeybSetAllGroupKey(
|
|||
void *pDeviceHandler,
|
||||
PSKeyManagement pTable,
|
||||
DWORD dwKeyIndex,
|
||||
unsigned long uKeyLength,
|
||||
u32 uKeyLength,
|
||||
PQWORD pKeyRSC,
|
||||
PBYTE pbyKey,
|
||||
BYTE byKeyDecMode
|
||||
|
|
|
|||
|
|
@ -262,7 +262,8 @@ BYTE pbyData[24];
|
|||
dwData1 <<= 16;
|
||||
dwData1 |= MAKEWORD(*(pbyAddr+4), *(pbyAddr+5));
|
||||
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"1. wOffset: %d, Data: %lX, KeyCtl:%X\n", wOffset, dwData1, wKeyCtl);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"1. wOffset: %d, Data: %X,"\
|
||||
" KeyCtl:%X\n", wOffset, dwData1, wKeyCtl);
|
||||
|
||||
//VNSvOutPortW(dwIoBase + MAC_REG_MISCFFNDEX, wOffset);
|
||||
//VNSvOutPortD(dwIoBase + MAC_REG_MISCFFDATA, dwData);
|
||||
|
|
@ -279,7 +280,8 @@ BYTE pbyData[24];
|
|||
dwData2 <<= 8;
|
||||
dwData2 |= *(pbyAddr+0);
|
||||
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"2. wOffset: %d, Data: %lX\n", wOffset, dwData2);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"2. wOffset: %d, Data: %X\n",
|
||||
wOffset, dwData2);
|
||||
|
||||
//VNSvOutPortW(dwIoBase + MAC_REG_MISCFFNDEX, wOffset);
|
||||
//VNSvOutPortD(dwIoBase + MAC_REG_MISCFFDATA, dwData);
|
||||
|
|
|
|||
|
|
@ -769,6 +769,9 @@ BYTE byPwr = pDevice->byCCKPwr;
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
if (uCH == 0)
|
||||
return -EINVAL;
|
||||
|
||||
switch (uRATE) {
|
||||
case RATE_1M:
|
||||
case RATE_2M:
|
||||
|
|
|
|||
|
|
@ -377,7 +377,8 @@ s_vFillTxKey (
|
|||
*(pbyIVHead+3) = (BYTE)(((pDevice->byKeyIndex << 6) & 0xc0) | 0x20); // 0x20 is ExtIV
|
||||
// Append IV&ExtIV after Mac Header
|
||||
*pdwExtIV = cpu_to_le32(pTransmitKey->dwTSC47_16);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"vFillTxKey()---- pdwExtIV: %lx\n", *pdwExtIV);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"vFillTxKey()---- pdwExtIV: %x\n",
|
||||
*pdwExtIV);
|
||||
|
||||
} else if (pTransmitKey->byCipherSuite == KEY_CTL_CCMP) {
|
||||
pTransmitKey->wTSC15_0++;
|
||||
|
|
@ -1753,7 +1754,8 @@ s_bPacketToWirelessUsb(
|
|||
MIC_vAppend((PBYTE)&(psEthHeader->abyDstAddr[0]), 12);
|
||||
dwMIC_Priority = 0;
|
||||
MIC_vAppend((PBYTE)&dwMIC_Priority, 4);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC KEY: %lX, %lX\n", dwMICKey0, dwMICKey1);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC KEY: %X, %X\n",
|
||||
dwMICKey0, dwMICKey1);
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
@ -2635,7 +2637,8 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb) {
|
|||
MIC_vAppend((PBYTE)&(sEthHeader.abyDstAddr[0]), 12);
|
||||
dwMIC_Priority = 0;
|
||||
MIC_vAppend((PBYTE)&dwMIC_Priority, 4);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"DMA0_tx_8021:MIC KEY: %lX, %lX\n", dwMICKey0, dwMICKey1);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"DMA0_tx_8021:MIC KEY:"\
|
||||
" %X, %X\n", dwMICKey0, dwMICKey1);
|
||||
|
||||
uLength = cbHeaderSize + cbMacHdLen + uPadding + cbIVlen;
|
||||
|
||||
|
|
@ -2655,7 +2658,8 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb) {
|
|||
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"uLength: %d, %d\n", uLength, cbFrameBodySize);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"cbReqCount:%d, %d, %d, %d\n", cbReqCount, cbHeaderSize, uPadding, cbIVlen);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC:%lx, %lx\n", *pdwMIC_L, *pdwMIC_R);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC:%x, %x\n",
|
||||
*pdwMIC_L, *pdwMIC_R);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -3029,7 +3033,8 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)
|
|||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"error: KEY is GTK!!~~\n");
|
||||
}
|
||||
else {
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Find PTK [%lX]\n", pTransmitKey->dwKeyIndex);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Find PTK [%X]\n",
|
||||
pTransmitKey->dwKeyIndex);
|
||||
bNeedEncryption = TRUE;
|
||||
}
|
||||
}
|
||||
|
|
@ -3043,7 +3048,8 @@ int nsDMA_tx_packet(PSDevice pDevice, unsigned int uDMAIdx, struct sk_buff *skb)
|
|||
if (pDevice->bEnableHostWEP) {
|
||||
if ((uNodeIndex != 0) &&
|
||||
(pMgmt->sNodeDBTable[uNodeIndex].dwKeyIndex & PAIRWISE_KEY)) {
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Find PTK [%lX]\n", pTransmitKey->dwKeyIndex);
|
||||
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Find PTK [%X]\n",
|
||||
pTransmitKey->dwKeyIndex);
|
||||
bNeedEncryption = TRUE;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@
|
|||
#ifndef __TTYPE_H__
|
||||
#define __TTYPE_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/******* Common definitions and typedefs ***********************************/
|
||||
|
||||
typedef int BOOL;
|
||||
|
|
@ -42,17 +44,17 @@ typedef int BOOL;
|
|||
|
||||
/****** Simple typedefs ***************************************************/
|
||||
|
||||
typedef unsigned char BYTE; // 8-bit
|
||||
typedef unsigned short WORD; // 16-bit
|
||||
typedef unsigned long DWORD; // 32-bit
|
||||
typedef u8 BYTE;
|
||||
typedef u16 WORD;
|
||||
typedef u32 DWORD;
|
||||
|
||||
// QWORD is for those situation that we want
|
||||
// an 8-byte-aligned 8 byte long structure
|
||||
// which is NOT really a floating point number.
|
||||
typedef union tagUQuadWord {
|
||||
struct {
|
||||
DWORD dwLowDword;
|
||||
DWORD dwHighDword;
|
||||
u32 dwLowDword;
|
||||
u32 dwHighDword;
|
||||
} u;
|
||||
double DoNotUseThisField;
|
||||
} UQuadWord;
|
||||
|
|
@ -60,8 +62,8 @@ typedef UQuadWord QWORD; // 64-bit
|
|||
|
||||
/****** Common pointer types ***********************************************/
|
||||
|
||||
typedef unsigned long ULONG_PTR; // 32-bit
|
||||
typedef unsigned long DWORD_PTR; // 32-bit
|
||||
typedef u32 ULONG_PTR;
|
||||
typedef u32 DWORD_PTR;
|
||||
|
||||
// boolean pointer
|
||||
|
||||
|
|
|
|||
|
|
@ -316,17 +316,19 @@ s_MgrMakeProbeRequest(
|
|||
return pTxPacket;
|
||||
}
|
||||
|
||||
void vCommandTimerWait(void *hDeviceContext, unsigned int MSecond)
|
||||
void vCommandTimerWait(void *hDeviceContext, unsigned long MSecond)
|
||||
{
|
||||
PSDevice pDevice = (PSDevice)hDeviceContext;
|
||||
PSDevice pDevice = (PSDevice)hDeviceContext;
|
||||
|
||||
init_timer(&pDevice->sTimerCommand);
|
||||
pDevice->sTimerCommand.data = (unsigned long)pDevice;
|
||||
pDevice->sTimerCommand.function = (TimerFunction)vRunCommand;
|
||||
// RUN_AT :1 msec ~= (HZ/1024)
|
||||
pDevice->sTimerCommand.expires = (unsigned int)RUN_AT((MSecond * HZ) >> 10);
|
||||
add_timer(&pDevice->sTimerCommand);
|
||||
return;
|
||||
init_timer(&pDevice->sTimerCommand);
|
||||
|
||||
pDevice->sTimerCommand.data = (unsigned long)pDevice;
|
||||
pDevice->sTimerCommand.function = (TimerFunction)vRunCommand;
|
||||
pDevice->sTimerCommand.expires = RUN_AT((MSecond * HZ) / 1000);
|
||||
|
||||
add_timer(&pDevice->sTimerCommand);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void vRunCommand(void *hDeviceContext)
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ typedef struct tagsPMKIDInfo {
|
|||
} PMKIDInfo, *PPMKIDInfo;
|
||||
|
||||
typedef struct tagSPMKIDCache {
|
||||
unsigned long BSSIDInfoCount;
|
||||
PMKIDInfo BSSIDInfo[MAX_PMKID_CACHE];
|
||||
u32 BSSIDInfoCount;
|
||||
PMKIDInfo BSSIDInfo[MAX_PMKID_CACHE];
|
||||
} SPMKIDCache, *PSPMKIDCache;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -468,7 +468,6 @@ static void ft_sess_rcu_free(struct rcu_head *rcu)
|
|||
{
|
||||
struct ft_sess *sess = container_of(rcu, struct ft_sess, rcu);
|
||||
|
||||
transport_deregister_session(sess->se_sess);
|
||||
kfree(sess);
|
||||
}
|
||||
|
||||
|
|
@ -476,6 +475,7 @@ static void ft_sess_free(struct kref *kref)
|
|||
{
|
||||
struct ft_sess *sess = container_of(kref, struct ft_sess, kref);
|
||||
|
||||
transport_deregister_session(sess->se_sess);
|
||||
call_rcu(&sess->rcu, ft_sess_rcu_free);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1509,6 +1509,9 @@ static const struct usb_device_id acm_ids[] = {
|
|||
{ USB_DEVICE(0x0572, 0x1340), /* Conexant CX93010-2x UCMxx */
|
||||
.driver_info = NO_UNION_NORMAL,
|
||||
},
|
||||
{ USB_DEVICE(0x05f9, 0x4002), /* PSC Scanning, Magellan 800i */
|
||||
.driver_info = NO_UNION_NORMAL,
|
||||
},
|
||||
{ USB_DEVICE(0x1bbb, 0x0003), /* Alcatel OT-I650 */
|
||||
.driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2057,7 +2057,7 @@ static unsigned hub_is_wusb(struct usb_hub *hub)
|
|||
#define HUB_ROOT_RESET_TIME 50 /* times are in msec */
|
||||
#define HUB_SHORT_RESET_TIME 10
|
||||
#define HUB_LONG_RESET_TIME 200
|
||||
#define HUB_RESET_TIMEOUT 500
|
||||
#define HUB_RESET_TIMEOUT 800
|
||||
|
||||
static int hub_port_wait_reset(struct usb_hub *hub, int port1,
|
||||
struct usb_device *udev, unsigned int delay)
|
||||
|
|
@ -2420,7 +2420,7 @@ int usb_port_suspend(struct usb_device *udev, pm_message_t msg)
|
|||
static int finish_port_resume(struct usb_device *udev)
|
||||
{
|
||||
int status = 0;
|
||||
u16 devstatus;
|
||||
u16 devstatus = 0;
|
||||
|
||||
/* caller owns the udev device lock */
|
||||
dev_dbg(&udev->dev, "%s\n",
|
||||
|
|
@ -2465,7 +2465,13 @@ static int finish_port_resume(struct usb_device *udev)
|
|||
if (status) {
|
||||
dev_dbg(&udev->dev, "gone after usb resume? status %d\n",
|
||||
status);
|
||||
} else if (udev->actconfig) {
|
||||
/*
|
||||
* There are a few quirky devices which violate the standard
|
||||
* by claiming to have remote wakeup enabled after a reset,
|
||||
* which crash if the feature is cleared, hence check for
|
||||
* udev->reset_resume
|
||||
*/
|
||||
} else if (udev->actconfig && !udev->reset_resume) {
|
||||
le16_to_cpus(&devstatus);
|
||||
if (devstatus & (1 << USB_DEVICE_REMOTE_WAKEUP)) {
|
||||
status = usb_control_msg(udev,
|
||||
|
|
|
|||
|
|
@ -122,10 +122,7 @@ static const char ep0name [] = "ep0";
|
|||
static const char *const ep_name [] = {
|
||||
ep0name, /* everyone has ep0 */
|
||||
|
||||
/* act like a net2280: high speed, six configurable endpoints */
|
||||
"ep-a", "ep-b", "ep-c", "ep-d", "ep-e", "ep-f",
|
||||
|
||||
/* or like pxa250: fifteen fixed function endpoints */
|
||||
/* act like a pxa250: fifteen fixed function endpoints */
|
||||
"ep1in-bulk", "ep2out-bulk", "ep3in-iso", "ep4out-iso", "ep5in-int",
|
||||
"ep6in-bulk", "ep7out-bulk", "ep8in-iso", "ep9out-iso", "ep10in-int",
|
||||
"ep11in-bulk", "ep12out-bulk", "ep13in-iso", "ep14out-iso",
|
||||
|
|
@ -133,6 +130,10 @@ static const char *const ep_name [] = {
|
|||
|
||||
/* or like sa1100: two fixed function endpoints */
|
||||
"ep1out-bulk", "ep2in-bulk",
|
||||
|
||||
/* and now some generic EPs so we have enough in multi config */
|
||||
"ep3out", "ep4in", "ep5out", "ep6out", "ep7in", "ep8out", "ep9in",
|
||||
"ep10out", "ep11out", "ep12in", "ep13out", "ep14in", "ep15out",
|
||||
};
|
||||
#define DUMMY_ENDPOINTS ARRAY_SIZE(ep_name)
|
||||
|
||||
|
|
|
|||
|
|
@ -1026,6 +1026,8 @@ static unsigned int xhci_microframes_to_exponent(struct usb_device *udev,
|
|||
static unsigned int xhci_parse_microframe_interval(struct usb_device *udev,
|
||||
struct usb_host_endpoint *ep)
|
||||
{
|
||||
if (ep->desc.bInterval == 0)
|
||||
return 0;
|
||||
return xhci_microframes_to_exponent(udev, ep,
|
||||
ep->desc.bInterval, 0, 15);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -879,6 +879,8 @@ static struct usb_device_id id_table_combined [] = {
|
|||
{ USB_DEVICE(FTDI_VID, FTDI_DISTORTEC_JTAG_LOCK_PICK_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_LUMEL_PD12_PID) },
|
||||
/* Crucible Devices */
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_CT_COMET_PID) },
|
||||
{ }, /* Optional parameter entry */
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1259,3 +1259,9 @@
|
|||
* ATI command output: Cinterion MC55i
|
||||
*/
|
||||
#define FTDI_CINTERION_MC55I_PID 0xA951
|
||||
|
||||
/*
|
||||
* Product: Comet Caller ID decoder
|
||||
* Manufacturer: Crucible Technologies
|
||||
*/
|
||||
#define FTDI_CT_COMET_PID 0x8e08
|
||||
|
|
|
|||
|
|
@ -289,6 +289,7 @@ static void option_instat_callback(struct urb *urb);
|
|||
#define ALCATEL_VENDOR_ID 0x1bbb
|
||||
#define ALCATEL_PRODUCT_X060S_X200 0x0000
|
||||
#define ALCATEL_PRODUCT_X220_X500D 0x0017
|
||||
#define ALCATEL_PRODUCT_L100V 0x011e
|
||||
|
||||
#define PIRELLI_VENDOR_ID 0x1266
|
||||
#define PIRELLI_PRODUCT_C100_1 0x1002
|
||||
|
|
@ -371,6 +372,10 @@ static void option_instat_callback(struct urb *urb);
|
|||
#define SC8800G_VENDOR_ID 0x067b
|
||||
#define SC8800G_PRODUCT_ID 0x2303
|
||||
|
||||
/*usi mt6229 modem*/
|
||||
#define MT6229_VENDOR_ID 0x0e8d
|
||||
#define MT6229_PRODUCT_ID 0x00a0
|
||||
|
||||
/* YUGA products www.yuga-info.com gavin.kx@qq.com */
|
||||
#define YUGA_VENDOR_ID 0x257A
|
||||
#define YUGA_PRODUCT_CEM600 0x1601
|
||||
|
|
@ -442,9 +447,12 @@ static void option_instat_callback(struct urb *urb);
|
|||
#define MEDIATEK_VENDOR_ID 0x0e8d
|
||||
#define MEDIATEK_PRODUCT_DC_1COM 0x00a0
|
||||
#define MEDIATEK_PRODUCT_DC_4COM 0x00a5
|
||||
#define MEDIATEK_PRODUCT_DC_4COM2 0x00a7
|
||||
#define MEDIATEK_PRODUCT_DC_5COM 0x00a4
|
||||
#define MEDIATEK_PRODUCT_7208_1COM 0x7101
|
||||
#define MEDIATEK_PRODUCT_7208_2COM 0x7102
|
||||
#define MEDIATEK_PRODUCT_7103_2COM 0x7103
|
||||
#define MEDIATEK_PRODUCT_7106_2COM 0x7106
|
||||
#define MEDIATEK_PRODUCT_FP_1COM 0x0003
|
||||
#define MEDIATEK_PRODUCT_FP_2COM 0x0023
|
||||
#define MEDIATEK_PRODUCT_FPDC_1COM 0x0043
|
||||
|
|
@ -454,10 +462,9 @@ static void option_instat_callback(struct urb *urb);
|
|||
#define CELLIENT_VENDOR_ID 0x2692
|
||||
#define CELLIENT_PRODUCT_MEN200 0x9005
|
||||
|
||||
/*usi mt6229 modem*/
|
||||
#define MT6229_VENDOR_ID 0x0e8d
|
||||
#define MT6229_PRODUCT_ID 0x00a0
|
||||
|
||||
/* Hyundai Petatel Inc. products */
|
||||
#define PETATEL_VENDOR_ID 0x1ff4
|
||||
#define PETATEL_PRODUCT_NP10T 0x600e
|
||||
|
||||
/* some devices interfaces need special handling due to a number of reasons */
|
||||
enum option_blacklist_reason {
|
||||
|
|
@ -945,7 +952,8 @@ static const struct usb_device_id option_ids[] = {
|
|||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0257, 0xff, 0xff, 0xff), /* ZTE MF821 */
|
||||
.driver_info = (kernel_ulong_t)&net_intf3_blacklist },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0265, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0284, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0284, 0xff, 0xff, 0xff), /* ZTE MF880 */
|
||||
.driver_info = (kernel_ulong_t)&net_intf4_blacklist },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0317, 0xff, 0xff, 0xff) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0326, 0xff, 0xff, 0xff),
|
||||
.driver_info = (kernel_ulong_t)&net_intf4_blacklist },
|
||||
|
|
@ -1217,6 +1225,8 @@ static const struct usb_device_id option_ids[] = {
|
|||
.driver_info = (kernel_ulong_t)&alcatel_x200_blacklist
|
||||
},
|
||||
{ USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_X220_X500D) },
|
||||
{ USB_DEVICE(ALCATEL_VENDOR_ID, ALCATEL_PRODUCT_L100V),
|
||||
.driver_info = (kernel_ulong_t)&net_intf4_blacklist },
|
||||
{ USB_DEVICE(AIRPLUS_VENDOR_ID, AIRPLUS_PRODUCT_MCD650) },
|
||||
{ USB_DEVICE(TLAYTECH_VENDOR_ID, TLAYTECH_PRODUCT_TEU800) },
|
||||
{ USB_DEVICE(LONGCHEER_VENDOR_ID, FOUR_G_SYSTEMS_PRODUCT_W14),
|
||||
|
|
@ -1394,7 +1404,12 @@ static const struct usb_device_id option_ids[] = {
|
|||
{ USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FP_2COM, 0x0a, 0x00, 0x00) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FPDC_1COM, 0x0a, 0x00, 0x00) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_FPDC_2COM, 0x0a, 0x00, 0x00) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_7103_2COM, 0xff, 0x00, 0x00) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_7106_2COM, 0x02, 0x02, 0x01) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x02, 0x01) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(MEDIATEK_VENDOR_ID, MEDIATEK_PRODUCT_DC_4COM2, 0xff, 0x00, 0x00) },
|
||||
{ USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) },
|
||||
{ USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T) },
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
MODULE_DEVICE_TABLE(usb, option_ids);
|
||||
|
|
|
|||
|
|
@ -365,7 +365,8 @@ static void mxsfb_disable_controller(struct fb_info *fb_info)
|
|||
loop--;
|
||||
}
|
||||
|
||||
writel(VDCTRL4_SYNC_SIGNALS_ON, host->base + LCDC_VDCTRL4 + REG_CLR);
|
||||
reg = readl(host->base + LCDC_VDCTRL4);
|
||||
writel(reg & ~VDCTRL4_SYNC_SIGNALS_ON, host->base + LCDC_VDCTRL4);
|
||||
|
||||
clk_disable(host->clk);
|
||||
|
||||
|
|
|
|||
|
|
@ -1197,9 +1197,29 @@ static int ep_modify(struct eventpoll *ep, struct epitem *epi, struct epoll_even
|
|||
* otherwise we might miss an event that happens between the
|
||||
* f_op->poll() call and the new event set registering.
|
||||
*/
|
||||
epi->event.events = event->events;
|
||||
epi->event.events = event->events; /* need barrier below */
|
||||
epi->event.data = event->data; /* protected by mtx */
|
||||
|
||||
/*
|
||||
* The following barrier has two effects:
|
||||
*
|
||||
* 1) Flush epi changes above to other CPUs. This ensures
|
||||
* we do not miss events from ep_poll_callback if an
|
||||
* event occurs immediately after we call f_op->poll().
|
||||
* We need this because we did not take ep->lock while
|
||||
* changing epi above (but ep_poll_callback does take
|
||||
* ep->lock).
|
||||
*
|
||||
* 2) We also need to ensure we do not miss _past_ events
|
||||
* when calling f_op->poll(). This barrier also
|
||||
* pairs with the barrier in wq_has_sleeper (see
|
||||
* comments for wq_has_sleeper).
|
||||
*
|
||||
* This barrier will now guarantee ep_poll_callback or f_op->poll
|
||||
* (or both) will notice the readiness of an item.
|
||||
*/
|
||||
smp_mb();
|
||||
|
||||
/*
|
||||
* Get current event bits. We can safely use the file* here because
|
||||
* its usage count has been increased by the caller of this function.
|
||||
|
|
|
|||
|
|
@ -450,8 +450,10 @@ ext4_xattr_set_acl(struct dentry *dentry, const char *name, const void *value,
|
|||
|
||||
retry:
|
||||
handle = ext4_journal_start(inode, EXT4_DATA_TRANS_BLOCKS(inode->i_sb));
|
||||
if (IS_ERR(handle))
|
||||
return PTR_ERR(handle);
|
||||
if (IS_ERR(handle)) {
|
||||
error = PTR_ERR(handle);
|
||||
goto release_and_out;
|
||||
}
|
||||
error = ext4_set_acl(handle, inode, type, acl);
|
||||
ext4_journal_stop(handle);
|
||||
if (error == -ENOSPC && ext4_should_retry_alloc(inode->i_sb, &retries))
|
||||
|
|
|
|||
|
|
@ -2140,13 +2140,14 @@ ext4_ext_in_cache(struct inode *inode, ext4_lblk_t block,
|
|||
* last index in the block only.
|
||||
*/
|
||||
static int ext4_ext_rm_idx(handle_t *handle, struct inode *inode,
|
||||
struct ext4_ext_path *path)
|
||||
struct ext4_ext_path *path, int depth)
|
||||
{
|
||||
int err;
|
||||
ext4_fsblk_t leaf;
|
||||
|
||||
/* free index block */
|
||||
path--;
|
||||
depth--;
|
||||
path = path + depth;
|
||||
leaf = ext4_idx_pblock(path->p_idx);
|
||||
if (unlikely(path->p_hdr->eh_entries == 0)) {
|
||||
EXT4_ERROR_INODE(inode, "path->p_hdr->eh_entries == 0");
|
||||
|
|
@ -2162,6 +2163,19 @@ static int ext4_ext_rm_idx(handle_t *handle, struct inode *inode,
|
|||
ext_debug("index is empty, remove it, free block %llu\n", leaf);
|
||||
ext4_free_blocks(handle, inode, NULL, leaf, 1,
|
||||
EXT4_FREE_BLOCKS_METADATA | EXT4_FREE_BLOCKS_FORGET);
|
||||
|
||||
while (--depth >= 0) {
|
||||
if (path->p_idx != EXT_FIRST_INDEX(path->p_hdr))
|
||||
break;
|
||||
path--;
|
||||
err = ext4_ext_get_access(handle, inode, path);
|
||||
if (err)
|
||||
break;
|
||||
path->p_idx->ei_block = (path+1)->p_idx->ei_block;
|
||||
err = ext4_ext_dirty(handle, inode, path);
|
||||
if (err)
|
||||
break;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
@ -2509,7 +2523,7 @@ ext4_ext_rm_leaf(handle_t *handle, struct inode *inode,
|
|||
/* if this leaf is free, then we should
|
||||
* remove it from index block above */
|
||||
if (err == 0 && eh->eh_entries == 0 && path[depth].p_bh != NULL)
|
||||
err = ext4_ext_rm_idx(handle, inode, path + depth);
|
||||
err = ext4_ext_rm_idx(handle, inode, path, depth);
|
||||
|
||||
out:
|
||||
return err;
|
||||
|
|
@ -2639,7 +2653,7 @@ again:
|
|||
/* index is empty, remove it;
|
||||
* handle must be already prepared by the
|
||||
* truncatei_leaf() */
|
||||
err = ext4_ext_rm_idx(handle, inode, path + i);
|
||||
err = ext4_ext_rm_idx(handle, inode, path, i);
|
||||
}
|
||||
/* root level has p_bh == NULL, brelse() eats this */
|
||||
brelse(path[i].p_bh);
|
||||
|
|
|
|||
|
|
@ -2204,7 +2204,9 @@ static void ext4_orphan_cleanup(struct super_block *sb,
|
|||
__func__, inode->i_ino, inode->i_size);
|
||||
jbd_debug(2, "truncating inode %lu to %lld bytes\n",
|
||||
inode->i_ino, inode->i_size);
|
||||
mutex_lock(&inode->i_mutex);
|
||||
ext4_truncate(inode);
|
||||
mutex_unlock(&inode->i_mutex);
|
||||
nr_truncates++;
|
||||
} else {
|
||||
ext4_msg(sb, KERN_DEBUG,
|
||||
|
|
@ -4438,7 +4440,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
|
|||
}
|
||||
|
||||
ext4_setup_system_zone(sb);
|
||||
if (sbi->s_journal == NULL)
|
||||
if (sbi->s_journal == NULL && !(old_sb_flags & MS_RDONLY))
|
||||
ext4_commit_super(sb, 1);
|
||||
|
||||
#ifdef CONFIG_QUOTA
|
||||
|
|
|
|||
|
|
@ -139,16 +139,14 @@ static void buf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)
|
|||
struct gfs2_meta_header *mh;
|
||||
struct gfs2_trans *tr;
|
||||
|
||||
lock_buffer(bd->bd_bh);
|
||||
gfs2_log_lock(sdp);
|
||||
if (!list_empty(&bd->bd_list_tr))
|
||||
goto out;
|
||||
return;
|
||||
tr = current->journal_info;
|
||||
tr->tr_touched = 1;
|
||||
tr->tr_num_buf++;
|
||||
list_add(&bd->bd_list_tr, &tr->tr_list_buf);
|
||||
if (!list_empty(&le->le_list))
|
||||
goto out;
|
||||
return;
|
||||
set_bit(GLF_LFLUSH, &bd->bd_gl->gl_flags);
|
||||
set_bit(GLF_DIRTY, &bd->bd_gl->gl_flags);
|
||||
gfs2_meta_check(sdp, bd->bd_bh);
|
||||
|
|
@ -159,9 +157,6 @@ static void buf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)
|
|||
sdp->sd_log_num_buf++;
|
||||
list_add(&le->le_list, &sdp->sd_log_le_buf);
|
||||
tr->tr_num_buf_new++;
|
||||
out:
|
||||
gfs2_log_unlock(sdp);
|
||||
unlock_buffer(bd->bd_bh);
|
||||
}
|
||||
|
||||
static void buf_lo_before_commit(struct gfs2_sbd *sdp)
|
||||
|
|
@ -528,11 +523,9 @@ static void databuf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)
|
|||
struct address_space *mapping = bd->bd_bh->b_page->mapping;
|
||||
struct gfs2_inode *ip = GFS2_I(mapping->host);
|
||||
|
||||
lock_buffer(bd->bd_bh);
|
||||
gfs2_log_lock(sdp);
|
||||
if (tr) {
|
||||
if (!list_empty(&bd->bd_list_tr))
|
||||
goto out;
|
||||
return;
|
||||
tr->tr_touched = 1;
|
||||
if (gfs2_is_jdata(ip)) {
|
||||
tr->tr_num_buf++;
|
||||
|
|
@ -540,7 +533,7 @@ static void databuf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)
|
|||
}
|
||||
}
|
||||
if (!list_empty(&le->le_list))
|
||||
goto out;
|
||||
return;
|
||||
|
||||
set_bit(GLF_LFLUSH, &bd->bd_gl->gl_flags);
|
||||
set_bit(GLF_DIRTY, &bd->bd_gl->gl_flags);
|
||||
|
|
@ -552,9 +545,6 @@ static void databuf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)
|
|||
} else {
|
||||
list_add_tail(&le->le_list, &sdp->sd_log_le_ordered);
|
||||
}
|
||||
out:
|
||||
gfs2_log_unlock(sdp);
|
||||
unlock_buffer(bd->bd_bh);
|
||||
}
|
||||
|
||||
static void gfs2_check_magic(struct buffer_head *bh)
|
||||
|
|
|
|||
|
|
@ -145,14 +145,22 @@ void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta)
|
|||
struct gfs2_sbd *sdp = gl->gl_sbd;
|
||||
struct gfs2_bufdata *bd;
|
||||
|
||||
lock_buffer(bh);
|
||||
gfs2_log_lock(sdp);
|
||||
bd = bh->b_private;
|
||||
if (bd)
|
||||
gfs2_assert(sdp, bd->bd_gl == gl);
|
||||
else {
|
||||
gfs2_log_unlock(sdp);
|
||||
unlock_buffer(bh);
|
||||
gfs2_attach_bufdata(gl, bh, meta);
|
||||
bd = bh->b_private;
|
||||
lock_buffer(bh);
|
||||
gfs2_log_lock(sdp);
|
||||
}
|
||||
lops_add(sdp, &bd->bd_le);
|
||||
gfs2_log_unlock(sdp);
|
||||
unlock_buffer(bh);
|
||||
}
|
||||
|
||||
void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd)
|
||||
|
|
|
|||
|
|
@ -178,7 +178,8 @@ repeat:
|
|||
if (!new_transaction)
|
||||
goto alloc_transaction;
|
||||
write_lock(&journal->j_state_lock);
|
||||
if (!journal->j_running_transaction) {
|
||||
if (!journal->j_running_transaction &&
|
||||
!journal->j_barrier_count) {
|
||||
jbd2_get_transaction(journal, new_transaction);
|
||||
new_transaction = NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -355,14 +355,16 @@ static int jffs2_do_reserve_space(struct jffs2_sb_info *c, uint32_t minsize,
|
|||
spin_unlock(&c->erase_completion_lock);
|
||||
|
||||
ret = jffs2_prealloc_raw_node_refs(c, jeb, 1);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Just lock it again and continue. Nothing much can change because
|
||||
we hold c->alloc_sem anyway. In fact, it's not entirely clear why
|
||||
we hold c->erase_completion_lock in the majority of this function...
|
||||
but that's a question for another (more caffeine-rich) day. */
|
||||
spin_lock(&c->erase_completion_lock);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
waste = jeb->free_size;
|
||||
jffs2_link_node_ref(c, jeb,
|
||||
(jeb->offset + c->sector_size - waste) | REF_OBSOLETE,
|
||||
|
|
|
|||
|
|
@ -575,6 +575,7 @@ static struct buffer_head *inode_getblk(struct inode *inode, sector_t block,
|
|||
struct udf_inode_info *iinfo = UDF_I(inode);
|
||||
int goal = 0, pgoal = iinfo->i_location.logicalBlockNum;
|
||||
int lastblock = 0;
|
||||
bool isBeyondEOF;
|
||||
|
||||
prev_epos.offset = udf_file_entry_alloc_offset(inode);
|
||||
prev_epos.block = iinfo->i_location;
|
||||
|
|
@ -653,7 +654,7 @@ static struct buffer_head *inode_getblk(struct inode *inode, sector_t block,
|
|||
/* Are we beyond EOF? */
|
||||
if (etype == -1) {
|
||||
int ret;
|
||||
|
||||
isBeyondEOF = 1;
|
||||
if (count) {
|
||||
if (c)
|
||||
laarr[0] = laarr[1];
|
||||
|
|
@ -696,6 +697,7 @@ static struct buffer_head *inode_getblk(struct inode *inode, sector_t block,
|
|||
endnum = c + 1;
|
||||
lastblock = 1;
|
||||
} else {
|
||||
isBeyondEOF = 0;
|
||||
endnum = startnum = ((count > 2) ? 2 : count);
|
||||
|
||||
/* if the current extent is in position 0,
|
||||
|
|
@ -738,10 +740,13 @@ static struct buffer_head *inode_getblk(struct inode *inode, sector_t block,
|
|||
goal, err);
|
||||
if (!newblocknum) {
|
||||
brelse(prev_epos.bh);
|
||||
brelse(cur_epos.bh);
|
||||
brelse(next_epos.bh);
|
||||
*err = -ENOSPC;
|
||||
return NULL;
|
||||
}
|
||||
iinfo->i_lenExtents += inode->i_sb->s_blocksize;
|
||||
if (isBeyondEOF)
|
||||
iinfo->i_lenExtents += inode->i_sb->s_blocksize;
|
||||
}
|
||||
|
||||
/* if the extent the requsted block is located in contains multiple
|
||||
|
|
@ -768,6 +773,8 @@ static struct buffer_head *inode_getblk(struct inode *inode, sector_t block,
|
|||
udf_update_extents(inode, laarr, startnum, endnum, &prev_epos);
|
||||
|
||||
brelse(prev_epos.bh);
|
||||
brelse(cur_epos.bh);
|
||||
brelse(next_epos.bh);
|
||||
|
||||
newblock = udf_get_pblock(inode->i_sb, newblocknum,
|
||||
iinfo->i_location.partitionReferenceNum, 0);
|
||||
|
|
|
|||
|
|
@ -137,6 +137,7 @@ enum {
|
|||
IFLA_AF_SPEC,
|
||||
IFLA_GROUP, /* Group the device belongs to */
|
||||
IFLA_NET_NS_FD,
|
||||
IFLA_EXT_MASK, /* Extended info mask, VFs, etc */
|
||||
__IFLA_MAX
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -222,7 +222,8 @@ struct netlink_callback {
|
|||
int (*dump)(struct sk_buff * skb,
|
||||
struct netlink_callback *cb);
|
||||
int (*done)(struct netlink_callback *cb);
|
||||
int family;
|
||||
u16 family;
|
||||
u16 min_dump_alloc;
|
||||
long args[6];
|
||||
};
|
||||
|
||||
|
|
@ -260,7 +261,8 @@ __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags)
|
|||
extern int netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
|
||||
const struct nlmsghdr *nlh,
|
||||
int (*dump)(struct sk_buff *skb, struct netlink_callback*),
|
||||
int (*done)(struct netlink_callback*));
|
||||
int (*done)(struct netlink_callback*),
|
||||
u16 min_dump_alloc);
|
||||
|
||||
|
||||
#define NL_NONROOT_RECV 0x1
|
||||
|
|
|
|||
|
|
@ -600,6 +600,9 @@ struct tcamsg {
|
|||
#define TCA_ACT_TAB 1 /* attr type must be >=1 */
|
||||
#define TCAA_MAX 1
|
||||
|
||||
/* New extended info filters for IFLA_EXT_MASK */
|
||||
#define RTEXT_FILTER_VF (1 << 0)
|
||||
|
||||
/* End of information exported to user level */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
|
|
|||
|
|
@ -6,11 +6,14 @@
|
|||
|
||||
typedef int (*rtnl_doit_func)(struct sk_buff *, struct nlmsghdr *, void *);
|
||||
typedef int (*rtnl_dumpit_func)(struct sk_buff *, struct netlink_callback *);
|
||||
typedef u16 (*rtnl_calcit_func)(struct sk_buff *, struct nlmsghdr *);
|
||||
|
||||
extern int __rtnl_register(int protocol, int msgtype,
|
||||
rtnl_doit_func, rtnl_dumpit_func);
|
||||
rtnl_doit_func, rtnl_dumpit_func,
|
||||
rtnl_calcit_func);
|
||||
extern void rtnl_register(int protocol, int msgtype,
|
||||
rtnl_doit_func, rtnl_dumpit_func);
|
||||
rtnl_doit_func, rtnl_dumpit_func,
|
||||
rtnl_calcit_func);
|
||||
extern int rtnl_unregister(int protocol, int msgtype);
|
||||
extern void rtnl_unregister_all(int protocol);
|
||||
|
||||
|
|
|
|||
|
|
@ -2926,6 +2926,8 @@ rb_get_reader_page(struct ring_buffer_per_cpu *cpu_buffer)
|
|||
* Splice the empty reader page into the list around the head.
|
||||
*/
|
||||
reader = rb_set_head_page(cpu_buffer);
|
||||
if (!reader)
|
||||
goto out;
|
||||
cpu_buffer->reader_page->list.next = rb_list_head(reader->list.next);
|
||||
cpu_buffer->reader_page->list.prev = reader->list.prev;
|
||||
|
||||
|
|
|
|||
|
|
@ -714,14 +714,12 @@ static int compact_node(int nid)
|
|||
}
|
||||
|
||||
/* Compact all nodes in the system */
|
||||
static int compact_nodes(void)
|
||||
static void compact_nodes(void)
|
||||
{
|
||||
int nid;
|
||||
|
||||
for_each_online_node(nid)
|
||||
compact_node(nid);
|
||||
|
||||
return COMPACT_COMPLETE;
|
||||
}
|
||||
|
||||
/* The written value is actually unused, all memory is compacted */
|
||||
|
|
@ -732,7 +730,7 @@ int sysctl_compaction_handler(struct ctl_table *table, int write,
|
|||
void __user *buffer, size_t *length, loff_t *ppos)
|
||||
{
|
||||
if (write)
|
||||
return compact_nodes();
|
||||
compact_nodes();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -920,6 +920,8 @@ int do_huge_pmd_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
|
|||
count_vm_event(THP_FAULT_FALLBACK);
|
||||
ret = do_huge_pmd_wp_page_fallback(mm, vma, address,
|
||||
pmd, orig_pmd, page, haddr);
|
||||
if (ret & VM_FAULT_OOM)
|
||||
split_huge_page(page);
|
||||
put_page(page);
|
||||
goto out;
|
||||
}
|
||||
|
|
@ -927,6 +929,7 @@ int do_huge_pmd_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
|
|||
|
||||
if (unlikely(mem_cgroup_newpage_charge(new_page, mm, GFP_KERNEL))) {
|
||||
put_page(new_page);
|
||||
split_huge_page(page);
|
||||
put_page(page);
|
||||
ret |= VM_FAULT_OOM;
|
||||
goto out;
|
||||
|
|
|
|||
18
mm/memory.c
18
mm/memory.c
|
|
@ -3470,6 +3470,7 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
|
|||
if (unlikely(is_vm_hugetlb_page(vma)))
|
||||
return hugetlb_fault(mm, vma, address, flags);
|
||||
|
||||
retry:
|
||||
pgd = pgd_offset(mm, address);
|
||||
pud = pud_alloc(mm, pgd, address);
|
||||
if (!pud)
|
||||
|
|
@ -3483,13 +3484,24 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
|
|||
pmd, flags);
|
||||
} else {
|
||||
pmd_t orig_pmd = *pmd;
|
||||
int ret;
|
||||
|
||||
barrier();
|
||||
if (pmd_trans_huge(orig_pmd)) {
|
||||
if (flags & FAULT_FLAG_WRITE &&
|
||||
!pmd_write(orig_pmd) &&
|
||||
!pmd_trans_splitting(orig_pmd))
|
||||
return do_huge_pmd_wp_page(mm, vma, address,
|
||||
pmd, orig_pmd);
|
||||
!pmd_trans_splitting(orig_pmd)) {
|
||||
ret = do_huge_pmd_wp_page(mm, vma, address, pmd,
|
||||
orig_pmd);
|
||||
/*
|
||||
* If COW results in an oom, the huge pmd will
|
||||
* have been split, so retry the fault on the
|
||||
* pte for a smaller charge.
|
||||
*/
|
||||
if (unlikely(ret & VM_FAULT_OOM))
|
||||
goto retry;
|
||||
return ret;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5515,7 +5515,7 @@ static inline int pfn_to_bitidx(struct zone *zone, unsigned long pfn)
|
|||
pfn &= (PAGES_PER_SECTION-1);
|
||||
return (pfn >> pageblock_order) * NR_PAGEBLOCK_BITS;
|
||||
#else
|
||||
pfn = pfn - zone->zone_start_pfn;
|
||||
pfn = pfn - round_down(zone->zone_start_pfn, pageblock_nr_pages);
|
||||
return (pfn >> pageblock_order) * NR_PAGEBLOCK_BITS;
|
||||
#endif /* CONFIG_SPARSEMEM */
|
||||
}
|
||||
|
|
|
|||
|
|
@ -219,19 +219,24 @@ int __init br_netlink_init(void)
|
|||
if (err < 0)
|
||||
goto err1;
|
||||
|
||||
err = __rtnl_register(PF_BRIDGE, RTM_GETLINK, NULL, br_dump_ifinfo);
|
||||
err = __rtnl_register(PF_BRIDGE, RTM_GETLINK, NULL,
|
||||
br_dump_ifinfo, NULL);
|
||||
if (err)
|
||||
goto err2;
|
||||
err = __rtnl_register(PF_BRIDGE, RTM_SETLINK, br_rtm_setlink, NULL);
|
||||
err = __rtnl_register(PF_BRIDGE, RTM_SETLINK,
|
||||
br_rtm_setlink, NULL, NULL);
|
||||
if (err)
|
||||
goto err3;
|
||||
err = __rtnl_register(PF_BRIDGE, RTM_NEWNEIGH, br_fdb_add, NULL);
|
||||
err = __rtnl_register(PF_BRIDGE, RTM_NEWNEIGH,
|
||||
br_fdb_add, NULL, NULL);
|
||||
if (err)
|
||||
goto err3;
|
||||
err = __rtnl_register(PF_BRIDGE, RTM_DELNEIGH, br_fdb_delete, NULL);
|
||||
err = __rtnl_register(PF_BRIDGE, RTM_DELNEIGH,
|
||||
br_fdb_delete, NULL, NULL);
|
||||
if (err)
|
||||
goto err3;
|
||||
err = __rtnl_register(PF_BRIDGE, RTM_GETNEIGH, NULL, br_fdb_dump);
|
||||
err = __rtnl_register(PF_BRIDGE, RTM_GETNEIGH,
|
||||
NULL, br_fdb_dump, NULL);
|
||||
if (err)
|
||||
goto err3;
|
||||
|
||||
|
|
|
|||
|
|
@ -740,9 +740,9 @@ static struct pernet_operations fib_rules_net_ops = {
|
|||
static int __init fib_rules_init(void)
|
||||
{
|
||||
int err;
|
||||
rtnl_register(PF_UNSPEC, RTM_NEWRULE, fib_nl_newrule, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_DELRULE, fib_nl_delrule, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_GETRULE, NULL, fib_nl_dumprule);
|
||||
rtnl_register(PF_UNSPEC, RTM_NEWRULE, fib_nl_newrule, NULL, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_DELRULE, fib_nl_delrule, NULL, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_GETRULE, NULL, fib_nl_dumprule, NULL);
|
||||
|
||||
err = register_pernet_subsys(&fib_rules_net_ops);
|
||||
if (err < 0)
|
||||
|
|
|
|||
|
|
@ -2918,12 +2918,13 @@ EXPORT_SYMBOL(neigh_sysctl_unregister);
|
|||
|
||||
static int __init neigh_init(void)
|
||||
{
|
||||
rtnl_register(PF_UNSPEC, RTM_NEWNEIGH, neigh_add, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_DELNEIGH, neigh_delete, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_GETNEIGH, NULL, neigh_dump_info);
|
||||
rtnl_register(PF_UNSPEC, RTM_NEWNEIGH, neigh_add, NULL, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_DELNEIGH, neigh_delete, NULL, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_GETNEIGH, NULL, neigh_dump_info, NULL);
|
||||
|
||||
rtnl_register(PF_UNSPEC, RTM_GETNEIGHTBL, NULL, neightbl_dump_info);
|
||||
rtnl_register(PF_UNSPEC, RTM_SETNEIGHTBL, neightbl_set, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_GETNEIGHTBL, NULL, neightbl_dump_info,
|
||||
NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_SETNEIGHTBL, neightbl_set, NULL, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@
|
|||
struct rtnl_link {
|
||||
rtnl_doit_func doit;
|
||||
rtnl_dumpit_func dumpit;
|
||||
rtnl_calcit_func calcit;
|
||||
};
|
||||
|
||||
static DEFINE_MUTEX(rtnl_mutex);
|
||||
|
|
@ -144,12 +145,28 @@ static rtnl_dumpit_func rtnl_get_dumpit(int protocol, int msgindex)
|
|||
return tab ? tab[msgindex].dumpit : NULL;
|
||||
}
|
||||
|
||||
static rtnl_calcit_func rtnl_get_calcit(int protocol, int msgindex)
|
||||
{
|
||||
struct rtnl_link *tab;
|
||||
|
||||
if (protocol <= RTNL_FAMILY_MAX)
|
||||
tab = rtnl_msg_handlers[protocol];
|
||||
else
|
||||
tab = NULL;
|
||||
|
||||
if (tab == NULL || tab[msgindex].calcit == NULL)
|
||||
tab = rtnl_msg_handlers[PF_UNSPEC];
|
||||
|
||||
return tab ? tab[msgindex].calcit : NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* __rtnl_register - Register a rtnetlink message type
|
||||
* @protocol: Protocol family or PF_UNSPEC
|
||||
* @msgtype: rtnetlink message type
|
||||
* @doit: Function pointer called for each request message
|
||||
* @dumpit: Function pointer called for each dump request (NLM_F_DUMP) message
|
||||
* @calcit: Function pointer to calc size of dump message
|
||||
*
|
||||
* Registers the specified function pointers (at least one of them has
|
||||
* to be non-NULL) to be called whenever a request message for the
|
||||
|
|
@ -162,7 +179,8 @@ static rtnl_dumpit_func rtnl_get_dumpit(int protocol, int msgindex)
|
|||
* Returns 0 on success or a negative error code.
|
||||
*/
|
||||
int __rtnl_register(int protocol, int msgtype,
|
||||
rtnl_doit_func doit, rtnl_dumpit_func dumpit)
|
||||
rtnl_doit_func doit, rtnl_dumpit_func dumpit,
|
||||
rtnl_calcit_func calcit)
|
||||
{
|
||||
struct rtnl_link *tab;
|
||||
int msgindex;
|
||||
|
|
@ -185,6 +203,9 @@ int __rtnl_register(int protocol, int msgtype,
|
|||
if (dumpit)
|
||||
tab[msgindex].dumpit = dumpit;
|
||||
|
||||
if (calcit)
|
||||
tab[msgindex].calcit = calcit;
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__rtnl_register);
|
||||
|
|
@ -199,9 +220,10 @@ EXPORT_SYMBOL_GPL(__rtnl_register);
|
|||
* of memory implies no sense in continuing.
|
||||
*/
|
||||
void rtnl_register(int protocol, int msgtype,
|
||||
rtnl_doit_func doit, rtnl_dumpit_func dumpit)
|
||||
rtnl_doit_func doit, rtnl_dumpit_func dumpit,
|
||||
rtnl_calcit_func calcit)
|
||||
{
|
||||
if (__rtnl_register(protocol, msgtype, doit, dumpit) < 0)
|
||||
if (__rtnl_register(protocol, msgtype, doit, dumpit, calcit) < 0)
|
||||
panic("Unable to register rtnetlink message handler, "
|
||||
"protocol = %d, message type = %d\n",
|
||||
protocol, msgtype);
|
||||
|
|
@ -704,10 +726,11 @@ static void copy_rtnl_link_stats64(void *v, const struct rtnl_link_stats64 *b)
|
|||
}
|
||||
|
||||
/* All VF info */
|
||||
static inline int rtnl_vfinfo_size(const struct net_device *dev)
|
||||
static inline int rtnl_vfinfo_size(const struct net_device *dev,
|
||||
u32 ext_filter_mask)
|
||||
{
|
||||
if (dev->dev.parent && dev_is_pci(dev->dev.parent)) {
|
||||
|
||||
if (dev->dev.parent && dev_is_pci(dev->dev.parent) &&
|
||||
(ext_filter_mask & RTEXT_FILTER_VF)) {
|
||||
int num_vfs = dev_num_vf(dev->dev.parent);
|
||||
size_t size = nla_total_size(sizeof(struct nlattr));
|
||||
size += nla_total_size(num_vfs * sizeof(struct nlattr));
|
||||
|
|
@ -745,7 +768,8 @@ static size_t rtnl_port_size(const struct net_device *dev)
|
|||
return port_self_size;
|
||||
}
|
||||
|
||||
static noinline size_t if_nlmsg_size(const struct net_device *dev)
|
||||
static noinline size_t if_nlmsg_size(const struct net_device *dev,
|
||||
u32 ext_filter_mask)
|
||||
{
|
||||
return NLMSG_ALIGN(sizeof(struct ifinfomsg))
|
||||
+ nla_total_size(IFNAMSIZ) /* IFLA_IFNAME */
|
||||
|
|
@ -763,8 +787,9 @@ static noinline size_t if_nlmsg_size(const struct net_device *dev)
|
|||
+ nla_total_size(4) /* IFLA_MASTER */
|
||||
+ nla_total_size(1) /* IFLA_OPERSTATE */
|
||||
+ nla_total_size(1) /* IFLA_LINKMODE */
|
||||
+ nla_total_size(4) /* IFLA_NUM_VF */
|
||||
+ rtnl_vfinfo_size(dev) /* IFLA_VFINFO_LIST */
|
||||
+ nla_total_size(ext_filter_mask
|
||||
& RTEXT_FILTER_VF ? 4 : 0) /* IFLA_NUM_VF */
|
||||
+ rtnl_vfinfo_size(dev, ext_filter_mask) /* IFLA_VFINFO_LIST */
|
||||
+ rtnl_port_size(dev) /* IFLA_VF_PORTS + IFLA_PORT_SELF */
|
||||
+ rtnl_link_get_size(dev) /* IFLA_LINKINFO */
|
||||
+ rtnl_link_get_af_size(dev); /* IFLA_AF_SPEC */
|
||||
|
|
@ -847,7 +872,7 @@ static int rtnl_port_fill(struct sk_buff *skb, struct net_device *dev)
|
|||
|
||||
static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,
|
||||
int type, u32 pid, u32 seq, u32 change,
|
||||
unsigned int flags)
|
||||
unsigned int flags, u32 ext_filter_mask)
|
||||
{
|
||||
struct ifinfomsg *ifm;
|
||||
struct nlmsghdr *nlh;
|
||||
|
|
@ -920,10 +945,11 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,
|
|||
goto nla_put_failure;
|
||||
copy_rtnl_link_stats64(nla_data(attr), stats);
|
||||
|
||||
if (dev->dev.parent)
|
||||
if (dev->dev.parent && (ext_filter_mask & RTEXT_FILTER_VF))
|
||||
NLA_PUT_U32(skb, IFLA_NUM_VF, dev_num_vf(dev->dev.parent));
|
||||
|
||||
if (dev->netdev_ops->ndo_get_vf_config && dev->dev.parent) {
|
||||
if (dev->netdev_ops->ndo_get_vf_config && dev->dev.parent
|
||||
&& (ext_filter_mask & RTEXT_FILTER_VF)) {
|
||||
int i;
|
||||
|
||||
struct nlattr *vfinfo, *vf;
|
||||
|
|
@ -1010,11 +1036,21 @@ static int rtnl_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
|
|||
struct net_device *dev;
|
||||
struct hlist_head *head;
|
||||
struct hlist_node *node;
|
||||
struct nlattr *tb[IFLA_MAX+1];
|
||||
u32 ext_filter_mask = 0;
|
||||
|
||||
s_h = cb->args[0];
|
||||
s_idx = cb->args[1];
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
if (nlmsg_parse(cb->nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX,
|
||||
ifla_policy) >= 0) {
|
||||
|
||||
if (tb[IFLA_EXT_MASK])
|
||||
ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]);
|
||||
}
|
||||
|
||||
for (h = s_h; h < NETDEV_HASHENTRIES; h++, s_idx = 0) {
|
||||
idx = 0;
|
||||
head = &net->dev_index_head[h];
|
||||
|
|
@ -1024,7 +1060,8 @@ static int rtnl_dump_ifinfo(struct sk_buff *skb, struct netlink_callback *cb)
|
|||
if (rtnl_fill_ifinfo(skb, dev, RTM_NEWLINK,
|
||||
NETLINK_CB(cb->skb).pid,
|
||||
cb->nlh->nlmsg_seq, 0,
|
||||
NLM_F_MULTI) <= 0)
|
||||
NLM_F_MULTI,
|
||||
ext_filter_mask) <= 0)
|
||||
goto out;
|
||||
cont:
|
||||
idx++;
|
||||
|
|
@ -1058,6 +1095,7 @@ const struct nla_policy ifla_policy[IFLA_MAX+1] = {
|
|||
[IFLA_VF_PORTS] = { .type = NLA_NESTED },
|
||||
[IFLA_PORT_SELF] = { .type = NLA_NESTED },
|
||||
[IFLA_AF_SPEC] = { .type = NLA_NESTED },
|
||||
[IFLA_EXT_MASK] = { .type = NLA_U32 },
|
||||
};
|
||||
EXPORT_SYMBOL(ifla_policy);
|
||||
|
||||
|
|
@ -1790,6 +1828,7 @@ static int rtnl_getlink(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
|
|||
struct net_device *dev = NULL;
|
||||
struct sk_buff *nskb;
|
||||
int err;
|
||||
u32 ext_filter_mask = 0;
|
||||
|
||||
err = nlmsg_parse(nlh, sizeof(*ifm), tb, IFLA_MAX, ifla_policy);
|
||||
if (err < 0)
|
||||
|
|
@ -1798,6 +1837,9 @@ static int rtnl_getlink(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
|
|||
if (tb[IFLA_IFNAME])
|
||||
nla_strlcpy(ifname, tb[IFLA_IFNAME], IFNAMSIZ);
|
||||
|
||||
if (tb[IFLA_EXT_MASK])
|
||||
ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]);
|
||||
|
||||
ifm = nlmsg_data(nlh);
|
||||
if (ifm->ifi_index > 0)
|
||||
dev = __dev_get_by_index(net, ifm->ifi_index);
|
||||
|
|
@ -1809,12 +1851,12 @@ static int rtnl_getlink(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
|
|||
if (dev == NULL)
|
||||
return -ENODEV;
|
||||
|
||||
nskb = nlmsg_new(if_nlmsg_size(dev), GFP_KERNEL);
|
||||
nskb = nlmsg_new(if_nlmsg_size(dev, ext_filter_mask), GFP_KERNEL);
|
||||
if (nskb == NULL)
|
||||
return -ENOBUFS;
|
||||
|
||||
err = rtnl_fill_ifinfo(nskb, dev, RTM_NEWLINK, NETLINK_CB(skb).pid,
|
||||
nlh->nlmsg_seq, 0, 0);
|
||||
nlh->nlmsg_seq, 0, 0, ext_filter_mask);
|
||||
if (err < 0) {
|
||||
/* -EMSGSIZE implies BUG in if_nlmsg_size */
|
||||
WARN_ON(err == -EMSGSIZE);
|
||||
|
|
@ -1825,6 +1867,35 @@ static int rtnl_getlink(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
|
|||
return err;
|
||||
}
|
||||
|
||||
static u16 rtnl_calcit(struct sk_buff *skb, struct nlmsghdr *nlh)
|
||||
{
|
||||
struct net *net = sock_net(skb->sk);
|
||||
struct net_device *dev;
|
||||
struct nlattr *tb[IFLA_MAX+1];
|
||||
u32 ext_filter_mask = 0;
|
||||
u16 min_ifinfo_dump_size = 0;
|
||||
|
||||
if (nlmsg_parse(nlh, sizeof(struct rtgenmsg), tb, IFLA_MAX,
|
||||
ifla_policy) >= 0) {
|
||||
if (tb[IFLA_EXT_MASK])
|
||||
ext_filter_mask = nla_get_u32(tb[IFLA_EXT_MASK]);
|
||||
}
|
||||
|
||||
if (!ext_filter_mask)
|
||||
return NLMSG_GOODSIZE;
|
||||
/*
|
||||
* traverse the list of net devices and compute the minimum
|
||||
* buffer size based upon the filter mask.
|
||||
*/
|
||||
list_for_each_entry(dev, &net->dev_base_head, dev_list) {
|
||||
min_ifinfo_dump_size = max_t(u16, min_ifinfo_dump_size,
|
||||
if_nlmsg_size(dev,
|
||||
ext_filter_mask));
|
||||
}
|
||||
|
||||
return min_ifinfo_dump_size;
|
||||
}
|
||||
|
||||
static int rtnl_dump_all(struct sk_buff *skb, struct netlink_callback *cb)
|
||||
{
|
||||
int idx;
|
||||
|
|
@ -1854,12 +1925,13 @@ void rtmsg_ifinfo(int type, struct net_device *dev, unsigned change)
|
|||
struct net *net = dev_net(dev);
|
||||
struct sk_buff *skb;
|
||||
int err = -ENOBUFS;
|
||||
size_t if_info_size;
|
||||
|
||||
skb = nlmsg_new(if_nlmsg_size(dev), GFP_KERNEL);
|
||||
skb = nlmsg_new((if_info_size = if_nlmsg_size(dev, 0)), GFP_KERNEL);
|
||||
if (skb == NULL)
|
||||
goto errout;
|
||||
|
||||
err = rtnl_fill_ifinfo(skb, dev, type, 0, 0, change, 0);
|
||||
err = rtnl_fill_ifinfo(skb, dev, type, 0, 0, change, 0, 0);
|
||||
if (err < 0) {
|
||||
/* -EMSGSIZE implies BUG in if_nlmsg_size() */
|
||||
WARN_ON(err == -EMSGSIZE);
|
||||
|
|
@ -1909,14 +1981,20 @@ static int rtnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
|
|||
if (kind == 2 && nlh->nlmsg_flags&NLM_F_DUMP) {
|
||||
struct sock *rtnl;
|
||||
rtnl_dumpit_func dumpit;
|
||||
rtnl_calcit_func calcit;
|
||||
u16 min_dump_alloc = 0;
|
||||
|
||||
dumpit = rtnl_get_dumpit(family, type);
|
||||
if (dumpit == NULL)
|
||||
return -EOPNOTSUPP;
|
||||
calcit = rtnl_get_calcit(family, type);
|
||||
if (calcit)
|
||||
min_dump_alloc = calcit(skb, nlh);
|
||||
|
||||
__rtnl_unlock();
|
||||
rtnl = net->rtnl;
|
||||
err = netlink_dump_start(rtnl, skb, nlh, dumpit, NULL);
|
||||
err = netlink_dump_start(rtnl, skb, nlh, dumpit,
|
||||
NULL, min_dump_alloc);
|
||||
rtnl_lock();
|
||||
return err;
|
||||
}
|
||||
|
|
@ -2026,12 +2104,13 @@ void __init rtnetlink_init(void)
|
|||
netlink_set_nonroot(NETLINK_ROUTE, NL_NONROOT_RECV);
|
||||
register_netdevice_notifier(&rtnetlink_dev_notifier);
|
||||
|
||||
rtnl_register(PF_UNSPEC, RTM_GETLINK, rtnl_getlink, rtnl_dump_ifinfo);
|
||||
rtnl_register(PF_UNSPEC, RTM_SETLINK, rtnl_setlink, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_NEWLINK, rtnl_newlink, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_DELLINK, rtnl_dellink, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_GETLINK, rtnl_getlink,
|
||||
rtnl_dump_ifinfo, rtnl_calcit);
|
||||
rtnl_register(PF_UNSPEC, RTM_SETLINK, rtnl_setlink, NULL, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_NEWLINK, rtnl_newlink, NULL, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_DELLINK, rtnl_dellink, NULL, NULL);
|
||||
|
||||
rtnl_register(PF_UNSPEC, RTM_GETADDR, NULL, rtnl_dump_all);
|
||||
rtnl_register(PF_UNSPEC, RTM_GETROUTE, NULL, rtnl_dump_all);
|
||||
rtnl_register(PF_UNSPEC, RTM_GETADDR, NULL, rtnl_dump_all, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_GETROUTE, NULL, rtnl_dump_all, NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1819,8 +1819,8 @@ static int __init dcbnl_init(void)
|
|||
{
|
||||
INIT_LIST_HEAD(&dcb_app_list);
|
||||
|
||||
rtnl_register(PF_UNSPEC, RTM_GETDCB, dcb_doit, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_SETDCB, dcb_doit, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_GETDCB, dcb_doit, NULL, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_SETDCB, dcb_doit, NULL, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1414,9 +1414,9 @@ void __init dn_dev_init(void)
|
|||
|
||||
dn_dev_devices_on();
|
||||
|
||||
rtnl_register(PF_DECnet, RTM_NEWADDR, dn_nl_newaddr, NULL);
|
||||
rtnl_register(PF_DECnet, RTM_DELADDR, dn_nl_deladdr, NULL);
|
||||
rtnl_register(PF_DECnet, RTM_GETADDR, NULL, dn_nl_dump_ifaddr);
|
||||
rtnl_register(PF_DECnet, RTM_NEWADDR, dn_nl_newaddr, NULL, NULL);
|
||||
rtnl_register(PF_DECnet, RTM_DELADDR, dn_nl_deladdr, NULL, NULL);
|
||||
rtnl_register(PF_DECnet, RTM_GETADDR, NULL, dn_nl_dump_ifaddr, NULL);
|
||||
|
||||
proc_net_fops_create(&init_net, "decnet_dev", S_IRUGO, &dn_dev_seq_fops);
|
||||
|
||||
|
|
|
|||
|
|
@ -763,8 +763,8 @@ void __init dn_fib_init(void)
|
|||
|
||||
register_dnaddr_notifier(&dn_fib_dnaddr_notifier);
|
||||
|
||||
rtnl_register(PF_DECnet, RTM_NEWROUTE, dn_fib_rtm_newroute, NULL);
|
||||
rtnl_register(PF_DECnet, RTM_DELROUTE, dn_fib_rtm_delroute, NULL);
|
||||
rtnl_register(PF_DECnet, RTM_NEWROUTE, dn_fib_rtm_newroute, NULL, NULL);
|
||||
rtnl_register(PF_DECnet, RTM_DELROUTE, dn_fib_rtm_delroute, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1843,10 +1843,11 @@ void __init dn_route_init(void)
|
|||
proc_net_fops_create(&init_net, "decnet_cache", S_IRUGO, &dn_rt_cache_seq_fops);
|
||||
|
||||
#ifdef CONFIG_DECNET_ROUTER
|
||||
rtnl_register(PF_DECnet, RTM_GETROUTE, dn_cache_getroute, dn_fib_dump);
|
||||
rtnl_register(PF_DECnet, RTM_GETROUTE, dn_cache_getroute,
|
||||
dn_fib_dump, NULL);
|
||||
#else
|
||||
rtnl_register(PF_DECnet, RTM_GETROUTE, dn_cache_getroute,
|
||||
dn_cache_dump);
|
||||
dn_cache_dump, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1844,8 +1844,8 @@ void __init devinet_init(void)
|
|||
|
||||
rtnl_af_register(&inet_af_ops);
|
||||
|
||||
rtnl_register(PF_INET, RTM_NEWADDR, inet_rtm_newaddr, NULL);
|
||||
rtnl_register(PF_INET, RTM_DELADDR, inet_rtm_deladdr, NULL);
|
||||
rtnl_register(PF_INET, RTM_GETADDR, NULL, inet_dump_ifaddr);
|
||||
rtnl_register(PF_INET, RTM_NEWADDR, inet_rtm_newaddr, NULL, NULL);
|
||||
rtnl_register(PF_INET, RTM_DELADDR, inet_rtm_deladdr, NULL, NULL);
|
||||
rtnl_register(PF_INET, RTM_GETADDR, NULL, inet_dump_ifaddr, NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1124,9 +1124,9 @@ static struct pernet_operations fib_net_ops = {
|
|||
|
||||
void __init ip_fib_init(void)
|
||||
{
|
||||
rtnl_register(PF_INET, RTM_NEWROUTE, inet_rtm_newroute, NULL);
|
||||
rtnl_register(PF_INET, RTM_DELROUTE, inet_rtm_delroute, NULL);
|
||||
rtnl_register(PF_INET, RTM_GETROUTE, NULL, inet_dump_fib);
|
||||
rtnl_register(PF_INET, RTM_NEWROUTE, inet_rtm_newroute, NULL, NULL);
|
||||
rtnl_register(PF_INET, RTM_DELROUTE, inet_rtm_delroute, NULL, NULL);
|
||||
rtnl_register(PF_INET, RTM_GETROUTE, NULL, inet_dump_fib, NULL);
|
||||
|
||||
register_pernet_subsys(&fib_net_ops);
|
||||
register_netdevice_notifier(&fib_netdev_notifier);
|
||||
|
|
|
|||
|
|
@ -869,7 +869,7 @@ static int inet_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
|
|||
}
|
||||
|
||||
return netlink_dump_start(idiagnl, skb, nlh,
|
||||
inet_diag_dump, NULL);
|
||||
inet_diag_dump, NULL, 0);
|
||||
}
|
||||
|
||||
return inet_diag_get_exact(skb, nlh);
|
||||
|
|
|
|||
|
|
@ -2554,7 +2554,8 @@ int __init ip_mr_init(void)
|
|||
goto add_proto_fail;
|
||||
}
|
||||
#endif
|
||||
rtnl_register(RTNL_FAMILY_IPMR, RTM_GETROUTE, NULL, ipmr_rtm_dumproute);
|
||||
rtnl_register(RTNL_FAMILY_IPMR, RTM_GETROUTE,
|
||||
NULL, ipmr_rtm_dumproute, NULL);
|
||||
return 0;
|
||||
|
||||
#ifdef CONFIG_IP_PIMSM_V2
|
||||
|
|
|
|||
|
|
@ -3459,7 +3459,7 @@ int __init ip_rt_init(void)
|
|||
xfrm_init();
|
||||
xfrm4_init(ip_rt_max_size);
|
||||
#endif
|
||||
rtnl_register(PF_INET, RTM_GETROUTE, inet_rtm_getroute, NULL);
|
||||
rtnl_register(PF_INET, RTM_GETROUTE, inet_rtm_getroute, NULL, NULL);
|
||||
|
||||
#ifdef CONFIG_SYSCTL
|
||||
register_pernet_subsys(&sysctl_route_ops);
|
||||
|
|
|
|||
|
|
@ -4721,16 +4721,20 @@ int __init addrconf_init(void)
|
|||
if (err < 0)
|
||||
goto errout_af;
|
||||
|
||||
err = __rtnl_register(PF_INET6, RTM_GETLINK, NULL, inet6_dump_ifinfo);
|
||||
err = __rtnl_register(PF_INET6, RTM_GETLINK, NULL, inet6_dump_ifinfo,
|
||||
NULL);
|
||||
if (err < 0)
|
||||
goto errout;
|
||||
|
||||
/* Only the first call to __rtnl_register can fail */
|
||||
__rtnl_register(PF_INET6, RTM_NEWADDR, inet6_rtm_newaddr, NULL);
|
||||
__rtnl_register(PF_INET6, RTM_DELADDR, inet6_rtm_deladdr, NULL);
|
||||
__rtnl_register(PF_INET6, RTM_GETADDR, inet6_rtm_getaddr, inet6_dump_ifaddr);
|
||||
__rtnl_register(PF_INET6, RTM_GETMULTICAST, NULL, inet6_dump_ifmcaddr);
|
||||
__rtnl_register(PF_INET6, RTM_GETANYCAST, NULL, inet6_dump_ifacaddr);
|
||||
__rtnl_register(PF_INET6, RTM_NEWADDR, inet6_rtm_newaddr, NULL, NULL);
|
||||
__rtnl_register(PF_INET6, RTM_DELADDR, inet6_rtm_deladdr, NULL, NULL);
|
||||
__rtnl_register(PF_INET6, RTM_GETADDR, inet6_rtm_getaddr,
|
||||
inet6_dump_ifaddr, NULL);
|
||||
__rtnl_register(PF_INET6, RTM_GETMULTICAST, NULL,
|
||||
inet6_dump_ifmcaddr, NULL);
|
||||
__rtnl_register(PF_INET6, RTM_GETANYCAST, NULL,
|
||||
inet6_dump_ifacaddr, NULL);
|
||||
|
||||
ipv6_addr_label_rtnl_register();
|
||||
|
||||
|
|
|
|||
|
|
@ -592,8 +592,11 @@ out:
|
|||
|
||||
void __init ipv6_addr_label_rtnl_register(void)
|
||||
{
|
||||
__rtnl_register(PF_INET6, RTM_NEWADDRLABEL, ip6addrlbl_newdel, NULL);
|
||||
__rtnl_register(PF_INET6, RTM_DELADDRLABEL, ip6addrlbl_newdel, NULL);
|
||||
__rtnl_register(PF_INET6, RTM_GETADDRLABEL, ip6addrlbl_get, ip6addrlbl_dump);
|
||||
__rtnl_register(PF_INET6, RTM_NEWADDRLABEL, ip6addrlbl_newdel,
|
||||
NULL, NULL);
|
||||
__rtnl_register(PF_INET6, RTM_DELADDRLABEL, ip6addrlbl_newdel,
|
||||
NULL, NULL);
|
||||
__rtnl_register(PF_INET6, RTM_GETADDRLABEL, ip6addrlbl_get,
|
||||
ip6addrlbl_dump, NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1586,7 +1586,8 @@ int __init fib6_init(void)
|
|||
if (ret)
|
||||
goto out_kmem_cache_create;
|
||||
|
||||
ret = __rtnl_register(PF_INET6, RTM_GETROUTE, NULL, inet6_dump_fib);
|
||||
ret = __rtnl_register(PF_INET6, RTM_GETROUTE, NULL, inet6_dump_fib,
|
||||
NULL);
|
||||
if (ret)
|
||||
goto out_unregister_subsys;
|
||||
out:
|
||||
|
|
|
|||
|
|
@ -1356,7 +1356,8 @@ int __init ip6_mr_init(void)
|
|||
goto add_proto_fail;
|
||||
}
|
||||
#endif
|
||||
rtnl_register(RTNL_FAMILY_IP6MR, RTM_GETROUTE, NULL, ip6mr_rtm_dumproute);
|
||||
rtnl_register(RTNL_FAMILY_IP6MR, RTM_GETROUTE, NULL,
|
||||
ip6mr_rtm_dumproute, NULL);
|
||||
return 0;
|
||||
#ifdef CONFIG_IPV6_PIMSM_V2
|
||||
add_proto_fail:
|
||||
|
|
|
|||
|
|
@ -2958,9 +2958,9 @@ int __init ip6_route_init(void)
|
|||
goto fib6_rules_init;
|
||||
|
||||
ret = -ENOBUFS;
|
||||
if (__rtnl_register(PF_INET6, RTM_NEWROUTE, inet6_rtm_newroute, NULL) ||
|
||||
__rtnl_register(PF_INET6, RTM_DELROUTE, inet6_rtm_delroute, NULL) ||
|
||||
__rtnl_register(PF_INET6, RTM_GETROUTE, inet6_rtm_getroute, NULL))
|
||||
if (__rtnl_register(PF_INET6, RTM_NEWROUTE, inet6_rtm_newroute, NULL, NULL) ||
|
||||
__rtnl_register(PF_INET6, RTM_DELROUTE, inet6_rtm_delroute, NULL, NULL) ||
|
||||
__rtnl_register(PF_INET6, RTM_GETROUTE, inet6_rtm_getroute, NULL, NULL))
|
||||
goto out_register_late_subsys;
|
||||
|
||||
ret = register_netdevice_notifier(&ip6_route_dev_notifier);
|
||||
|
|
|
|||
|
|
@ -794,7 +794,7 @@ void sta_info_init(struct ieee80211_local *local)
|
|||
|
||||
void sta_info_stop(struct ieee80211_local *local)
|
||||
{
|
||||
del_timer(&local->sta_cleanup);
|
||||
del_timer_sync(&local->sta_cleanup);
|
||||
sta_info_flush(local, NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1120,7 +1120,7 @@ ip_set_dump(struct sock *ctnl, struct sk_buff *skb,
|
|||
|
||||
return netlink_dump_start(ctnl, skb, nlh,
|
||||
ip_set_dump_start,
|
||||
ip_set_dump_done);
|
||||
ip_set_dump_done, 0);
|
||||
}
|
||||
|
||||
/* Add, del and test */
|
||||
|
|
|
|||
|
|
@ -970,7 +970,7 @@ ctnetlink_get_conntrack(struct sock *ctnl, struct sk_buff *skb,
|
|||
|
||||
if (nlh->nlmsg_flags & NLM_F_DUMP)
|
||||
return netlink_dump_start(ctnl, skb, nlh, ctnetlink_dump_table,
|
||||
ctnetlink_done);
|
||||
ctnetlink_done, 0);
|
||||
|
||||
err = ctnetlink_parse_zone(cda[CTA_ZONE], &zone);
|
||||
if (err < 0)
|
||||
|
|
@ -1840,7 +1840,7 @@ ctnetlink_get_expect(struct sock *ctnl, struct sk_buff *skb,
|
|||
if (nlh->nlmsg_flags & NLM_F_DUMP) {
|
||||
return netlink_dump_start(ctnl, skb, nlh,
|
||||
ctnetlink_exp_dump_table,
|
||||
ctnetlink_exp_done);
|
||||
ctnetlink_exp_done, 0);
|
||||
}
|
||||
|
||||
err = ctnetlink_parse_zone(cda[CTA_EXPECT_ZONE], &zone);
|
||||
|
|
|
|||
|
|
@ -1677,13 +1677,10 @@ static int netlink_dump(struct sock *sk)
|
|||
{
|
||||
struct netlink_sock *nlk = nlk_sk(sk);
|
||||
struct netlink_callback *cb;
|
||||
struct sk_buff *skb;
|
||||
struct sk_buff *skb = NULL;
|
||||
struct nlmsghdr *nlh;
|
||||
int len, err = -ENOBUFS;
|
||||
|
||||
skb = sock_rmalloc(sk, NLMSG_GOODSIZE, 0, GFP_KERNEL);
|
||||
if (!skb)
|
||||
goto errout;
|
||||
int alloc_size;
|
||||
|
||||
mutex_lock(nlk->cb_mutex);
|
||||
|
||||
|
|
@ -1693,6 +1690,12 @@ static int netlink_dump(struct sock *sk)
|
|||
goto errout_skb;
|
||||
}
|
||||
|
||||
alloc_size = max_t(int, cb->min_dump_alloc, NLMSG_GOODSIZE);
|
||||
|
||||
skb = sock_rmalloc(sk, alloc_size, 0, GFP_KERNEL);
|
||||
if (!skb)
|
||||
goto errout;
|
||||
|
||||
len = cb->dump(skb, cb);
|
||||
|
||||
if (len > 0) {
|
||||
|
|
@ -1735,7 +1738,8 @@ int netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
|
|||
const struct nlmsghdr *nlh,
|
||||
int (*dump)(struct sk_buff *skb,
|
||||
struct netlink_callback *),
|
||||
int (*done)(struct netlink_callback *))
|
||||
int (*done)(struct netlink_callback *),
|
||||
u16 min_dump_alloc)
|
||||
{
|
||||
struct netlink_callback *cb;
|
||||
struct sock *sk;
|
||||
|
|
@ -1749,6 +1753,7 @@ int netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
|
|||
cb->dump = dump;
|
||||
cb->done = done;
|
||||
cb->nlh = nlh;
|
||||
cb->min_dump_alloc = min_dump_alloc;
|
||||
atomic_inc(&skb->users);
|
||||
cb->skb = skb;
|
||||
|
||||
|
|
|
|||
|
|
@ -525,7 +525,7 @@ static int genl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
|
|||
|
||||
genl_unlock();
|
||||
err = netlink_dump_start(net->genl_sock, skb, nlh,
|
||||
ops->dumpit, ops->done);
|
||||
ops->dumpit, ops->done, 0);
|
||||
genl_lock();
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -289,15 +289,16 @@ out:
|
|||
|
||||
int __init phonet_netlink_register(void)
|
||||
{
|
||||
int err = __rtnl_register(PF_PHONET, RTM_NEWADDR, addr_doit, NULL);
|
||||
int err = __rtnl_register(PF_PHONET, RTM_NEWADDR, addr_doit,
|
||||
NULL, NULL);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/* Further __rtnl_register() cannot fail */
|
||||
__rtnl_register(PF_PHONET, RTM_DELADDR, addr_doit, NULL);
|
||||
__rtnl_register(PF_PHONET, RTM_GETADDR, NULL, getaddr_dumpit);
|
||||
__rtnl_register(PF_PHONET, RTM_NEWROUTE, route_doit, NULL);
|
||||
__rtnl_register(PF_PHONET, RTM_DELROUTE, route_doit, NULL);
|
||||
__rtnl_register(PF_PHONET, RTM_GETROUTE, NULL, route_dumpit);
|
||||
__rtnl_register(PF_PHONET, RTM_DELADDR, addr_doit, NULL, NULL);
|
||||
__rtnl_register(PF_PHONET, RTM_GETADDR, NULL, getaddr_dumpit, NULL);
|
||||
__rtnl_register(PF_PHONET, RTM_NEWROUTE, route_doit, NULL, NULL);
|
||||
__rtnl_register(PF_PHONET, RTM_DELROUTE, route_doit, NULL, NULL);
|
||||
__rtnl_register(PF_PHONET, RTM_GETROUTE, NULL, route_dumpit, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1115,9 +1115,10 @@ nlmsg_failure:
|
|||
|
||||
static int __init tc_action_init(void)
|
||||
{
|
||||
rtnl_register(PF_UNSPEC, RTM_NEWACTION, tc_ctl_action, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_DELACTION, tc_ctl_action, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_GETACTION, tc_ctl_action, tc_dump_action);
|
||||
rtnl_register(PF_UNSPEC, RTM_NEWACTION, tc_ctl_action, NULL, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_DELACTION, tc_ctl_action, NULL, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_GETACTION, tc_ctl_action, tc_dump_action,
|
||||
NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -610,10 +610,10 @@ EXPORT_SYMBOL(tcf_exts_dump_stats);
|
|||
|
||||
static int __init tc_filter_init(void)
|
||||
{
|
||||
rtnl_register(PF_UNSPEC, RTM_NEWTFILTER, tc_ctl_tfilter, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_DELTFILTER, tc_ctl_tfilter, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_NEWTFILTER, tc_ctl_tfilter, NULL, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_DELTFILTER, tc_ctl_tfilter, NULL, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_GETTFILTER, tc_ctl_tfilter,
|
||||
tc_dump_tfilter);
|
||||
tc_dump_tfilter, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1792,12 +1792,12 @@ static int __init pktsched_init(void)
|
|||
register_qdisc(&pfifo_head_drop_qdisc_ops);
|
||||
register_qdisc(&mq_qdisc_ops);
|
||||
|
||||
rtnl_register(PF_UNSPEC, RTM_NEWQDISC, tc_modify_qdisc, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_DELQDISC, tc_get_qdisc, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_GETQDISC, tc_get_qdisc, tc_dump_qdisc);
|
||||
rtnl_register(PF_UNSPEC, RTM_NEWTCLASS, tc_ctl_tclass, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_DELTCLASS, tc_ctl_tclass, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_GETTCLASS, tc_ctl_tclass, tc_dump_tclass);
|
||||
rtnl_register(PF_UNSPEC, RTM_NEWQDISC, tc_modify_qdisc, NULL, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_DELQDISC, tc_get_qdisc, NULL, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_GETQDISC, tc_get_qdisc, tc_dump_qdisc, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_NEWTCLASS, tc_ctl_tclass, NULL, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_DELTCLASS, tc_ctl_tclass, NULL, NULL);
|
||||
rtnl_register(PF_UNSPEC, RTM_GETTCLASS, tc_ctl_tclass, tc_dump_tclass, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue