mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
Merge commit 'v2.6.29-rc5' into x86/apic
This commit is contained in:
commit
b69bc39674
41 changed files with 8879 additions and 8995 deletions
|
@ -137,7 +137,7 @@ static void cn_test_timer_func(unsigned long __data)
|
|||
|
||||
memcpy(m + 1, data, m->len);
|
||||
|
||||
cn_netlink_send(m, 0, gfp_any());
|
||||
cn_netlink_send(m, 0, GFP_ATOMIC);
|
||||
kfree(m);
|
||||
}
|
||||
|
||||
|
@ -160,10 +160,8 @@ static int cn_test_init(void)
|
|||
goto err_out;
|
||||
}
|
||||
|
||||
init_timer(&cn_test_timer);
|
||||
cn_test_timer.function = cn_test_timer_func;
|
||||
setup_timer(&cn_test_timer, cn_test_timer_func, 0);
|
||||
cn_test_timer.expires = jiffies + HZ;
|
||||
cn_test_timer.data = 0;
|
||||
add_timer(&cn_test_timer);
|
||||
|
||||
return 0;
|
||||
|
|
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
|||
VERSION = 2
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 29
|
||||
EXTRAVERSION = -rc4
|
||||
EXTRAVERSION = -rc5
|
||||
NAME = Erotic Pickled Herring
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
|
|
@ -2519,8 +2519,8 @@ fore200e_load_and_start_fw(struct fore200e* fore200e)
|
|||
return err;
|
||||
|
||||
sprintf(buf, "%s%s", fore200e->bus->proc_name, FW_EXT);
|
||||
if (request_firmware(&firmware, buf, device) == 1) {
|
||||
printk(FORE200E "missing %s firmware image\n", fore200e->bus->model_name);
|
||||
if ((err = request_firmware(&firmware, buf, device)) < 0) {
|
||||
printk(FORE200E "problem loading firmware image %s\n", fore200e->bus->model_name);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
@ -493,21 +493,27 @@ static bool receive_pcb(struct net_device *dev, pcb_struct * pcb)
|
|||
}
|
||||
/* read the data */
|
||||
spin_lock_irqsave(&adapter->lock, flags);
|
||||
i = 0;
|
||||
do {
|
||||
j = 0;
|
||||
while (((stat = get_status(dev->base_addr)) & ACRF) == 0 && j++ < 20000);
|
||||
pcb->data.raw[i++] = inb_command(dev->base_addr);
|
||||
if (i > MAX_PCB_DATA)
|
||||
INVALID_PCB_MSG(i);
|
||||
} while ((stat & ASF_PCB_MASK) != ASF_PCB_END && j < 20000);
|
||||
for (i = 0; i < MAX_PCB_DATA; i++) {
|
||||
for (j = 0; j < 20000; j++) {
|
||||
stat = get_status(dev->base_addr);
|
||||
if (stat & ACRF)
|
||||
break;
|
||||
}
|
||||
pcb->data.raw[i] = inb_command(dev->base_addr);
|
||||
if ((stat & ASF_PCB_MASK) == ASF_PCB_END || j >= 20000)
|
||||
break;
|
||||
}
|
||||
spin_unlock_irqrestore(&adapter->lock, flags);
|
||||
if (i >= MAX_PCB_DATA) {
|
||||
INVALID_PCB_MSG(i);
|
||||
return false;
|
||||
}
|
||||
if (j >= 20000) {
|
||||
TIMEOUT_MSG(__LINE__);
|
||||
return false;
|
||||
}
|
||||
/* woops, the last "data" byte was really the length! */
|
||||
total_length = pcb->data.raw[--i];
|
||||
/* the last "data" byte was really the length! */
|
||||
total_length = pcb->data.raw[i];
|
||||
|
||||
/* safety check total length vs data length */
|
||||
if (total_length != (pcb->length + 2)) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* bnx2.c: Broadcom NX2 network driver.
|
||||
*
|
||||
* Copyright (c) 2004-2008 Broadcom Corporation
|
||||
* Copyright (c) 2004-2009 Broadcom Corporation
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -57,8 +57,8 @@
|
|||
|
||||
#define DRV_MODULE_NAME "bnx2"
|
||||
#define PFX DRV_MODULE_NAME ": "
|
||||
#define DRV_MODULE_VERSION "1.9.0"
|
||||
#define DRV_MODULE_RELDATE "Dec 16, 2008"
|
||||
#define DRV_MODULE_VERSION "1.9.2"
|
||||
#define DRV_MODULE_RELDATE "Feb 11, 2009"
|
||||
|
||||
#define RUN_AT(x) (jiffies + (x))
|
||||
|
||||
|
@ -2910,18 +2910,8 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
|
|||
|
||||
rx_hdr = (struct l2_fhdr *) skb->data;
|
||||
len = rx_hdr->l2_fhdr_pkt_len;
|
||||
status = rx_hdr->l2_fhdr_status;
|
||||
|
||||
if ((status = rx_hdr->l2_fhdr_status) &
|
||||
(L2_FHDR_ERRORS_BAD_CRC |
|
||||
L2_FHDR_ERRORS_PHY_DECODE |
|
||||
L2_FHDR_ERRORS_ALIGNMENT |
|
||||
L2_FHDR_ERRORS_TOO_SHORT |
|
||||
L2_FHDR_ERRORS_GIANT_FRAME)) {
|
||||
|
||||
bnx2_reuse_rx_skb(bp, rxr, skb, sw_ring_cons,
|
||||
sw_ring_prod);
|
||||
goto next_rx;
|
||||
}
|
||||
hdr_len = 0;
|
||||
if (status & L2_FHDR_STATUS_SPLIT) {
|
||||
hdr_len = rx_hdr->l2_fhdr_ip_xsum;
|
||||
|
@ -2931,6 +2921,24 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
|
|||
pg_ring_used = 1;
|
||||
}
|
||||
|
||||
if (unlikely(status & (L2_FHDR_ERRORS_BAD_CRC |
|
||||
L2_FHDR_ERRORS_PHY_DECODE |
|
||||
L2_FHDR_ERRORS_ALIGNMENT |
|
||||
L2_FHDR_ERRORS_TOO_SHORT |
|
||||
L2_FHDR_ERRORS_GIANT_FRAME))) {
|
||||
|
||||
bnx2_reuse_rx_skb(bp, rxr, skb, sw_ring_cons,
|
||||
sw_ring_prod);
|
||||
if (pg_ring_used) {
|
||||
int pages;
|
||||
|
||||
pages = PAGE_ALIGN(len - hdr_len) >> PAGE_SHIFT;
|
||||
|
||||
bnx2_reuse_rx_skb_pages(bp, rxr, NULL, pages);
|
||||
}
|
||||
goto next_rx;
|
||||
}
|
||||
|
||||
len -= 4;
|
||||
|
||||
if (len <= bp->rx_copy_thresh) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* bnx2.h: Broadcom NX2 network driver.
|
||||
*
|
||||
* Copyright (c) 2004-2007 Broadcom Corporation
|
||||
* Copyright (c) 2004-2009 Broadcom Corporation
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -585,7 +585,7 @@ static int mcs_speed_change(struct mcs_cb *mcs)
|
|||
mcs_get_reg(mcs, MCS_RESV_REG, &rval);
|
||||
} while(cnt++ < 100 && (rval & MCS_IRINTX));
|
||||
|
||||
if(cnt >= 100) {
|
||||
if (cnt > 100) {
|
||||
IRDA_ERROR("unable to change speed\n");
|
||||
ret = -EIO;
|
||||
goto error;
|
||||
|
|
|
@ -201,9 +201,9 @@ static int nx_set_dma_mask(struct netxen_adapter *adapter, uint8_t revision_id)
|
|||
adapter->pci_using_dac = 1;
|
||||
return 0;
|
||||
}
|
||||
set_32_bit_mask:
|
||||
#endif /* CONFIG_IA64 */
|
||||
|
||||
set_32_bit_mask:
|
||||
err = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
|
||||
if (!err)
|
||||
err = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
|
||||
|
@ -372,67 +372,6 @@ static void netxen_set_port_mode(struct netxen_adapter *adapter)
|
|||
}
|
||||
}
|
||||
|
||||
#define PCI_CAP_ID_GEN 0x10
|
||||
|
||||
static void netxen_pcie_strap_init(struct netxen_adapter *adapter)
|
||||
{
|
||||
u32 pdevfuncsave;
|
||||
u32 c8c9value = 0;
|
||||
u32 chicken = 0;
|
||||
u32 control = 0;
|
||||
int i, pos;
|
||||
struct pci_dev *pdev;
|
||||
|
||||
pdev = adapter->pdev;
|
||||
|
||||
adapter->hw_read_wx(adapter,
|
||||
NETXEN_PCIE_REG(PCIE_CHICKEN3), &chicken, 4);
|
||||
/* clear chicken3.25:24 */
|
||||
chicken &= 0xFCFFFFFF;
|
||||
/*
|
||||
* if gen1 and B0, set F1020 - if gen 2, do nothing
|
||||
* if gen2 set to F1000
|
||||
*/
|
||||
pos = pci_find_capability(pdev, PCI_CAP_ID_GEN);
|
||||
if (pos == 0xC0) {
|
||||
pci_read_config_dword(pdev, pos + 0x10, &control);
|
||||
if ((control & 0x000F0000) != 0x00020000) {
|
||||
/* set chicken3.24 if gen1 */
|
||||
chicken |= 0x01000000;
|
||||
}
|
||||
printk(KERN_INFO "%s Gen2 strapping detected\n",
|
||||
netxen_nic_driver_name);
|
||||
c8c9value = 0xF1000;
|
||||
} else {
|
||||
/* set chicken3.24 if gen1 */
|
||||
chicken |= 0x01000000;
|
||||
printk(KERN_INFO "%s Gen1 strapping detected\n",
|
||||
netxen_nic_driver_name);
|
||||
if (adapter->ahw.revision_id == NX_P3_B0)
|
||||
c8c9value = 0xF1020;
|
||||
else
|
||||
c8c9value = 0;
|
||||
|
||||
}
|
||||
adapter->hw_write_wx(adapter,
|
||||
NETXEN_PCIE_REG(PCIE_CHICKEN3), &chicken, 4);
|
||||
|
||||
if (!c8c9value)
|
||||
return;
|
||||
|
||||
pdevfuncsave = pdev->devfn;
|
||||
if (pdevfuncsave & 0x07)
|
||||
return;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
pci_read_config_dword(pdev, pos + 8, &control);
|
||||
pci_read_config_dword(pdev, pos + 8, &control);
|
||||
pci_write_config_dword(pdev, pos + 8, c8c9value);
|
||||
pdev->devfn++;
|
||||
}
|
||||
pdev->devfn = pdevfuncsave;
|
||||
}
|
||||
|
||||
static void netxen_set_msix_bit(struct pci_dev *pdev, int enable)
|
||||
{
|
||||
u32 control;
|
||||
|
@ -812,9 +751,6 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
}
|
||||
netxen_load_firmware(adapter);
|
||||
|
||||
if (NX_IS_REVISION_P3(revision_id))
|
||||
netxen_pcie_strap_init(adapter);
|
||||
|
||||
if (NX_IS_REVISION_P2(revision_id)) {
|
||||
|
||||
/* Initialize multicast addr pool owners */
|
||||
|
|
|
@ -125,6 +125,8 @@ static int __devinit mdio_gpio_bus_init(struct device *dev,
|
|||
if (gpio_request(bitbang->mdio, "mdio"))
|
||||
goto out_free_mdc;
|
||||
|
||||
gpio_direction_output(bitbang->mdc, 0);
|
||||
|
||||
dev_set_drvdata(dev, new_bus);
|
||||
|
||||
ret = mdiobus_register(new_bus);
|
||||
|
|
|
@ -898,6 +898,7 @@ static void ql_update_lbq(struct ql_adapter *qdev, struct rx_ring *rx_ring)
|
|||
lbq_desc->index);
|
||||
lbq_desc->p.lbq_page = alloc_page(GFP_ATOMIC);
|
||||
if (lbq_desc->p.lbq_page == NULL) {
|
||||
rx_ring->lbq_clean_idx = clean_idx;
|
||||
QPRINTK(qdev, RX_STATUS, ERR,
|
||||
"Couldn't get a page.\n");
|
||||
return;
|
||||
|
@ -907,6 +908,9 @@ static void ql_update_lbq(struct ql_adapter *qdev, struct rx_ring *rx_ring)
|
|||
0, PAGE_SIZE,
|
||||
PCI_DMA_FROMDEVICE);
|
||||
if (pci_dma_mapping_error(qdev->pdev, map)) {
|
||||
rx_ring->lbq_clean_idx = clean_idx;
|
||||
put_page(lbq_desc->p.lbq_page);
|
||||
lbq_desc->p.lbq_page = NULL;
|
||||
QPRINTK(qdev, RX_STATUS, ERR,
|
||||
"PCI mapping failed.\n");
|
||||
return;
|
||||
|
@ -968,6 +972,8 @@ static void ql_update_sbq(struct ql_adapter *qdev, struct rx_ring *rx_ring)
|
|||
if (pci_dma_mapping_error(qdev->pdev, map)) {
|
||||
QPRINTK(qdev, IFUP, ERR, "PCI mapping failed.\n");
|
||||
rx_ring->sbq_clean_idx = clean_idx;
|
||||
dev_kfree_skb_any(sbq_desc->p.skb);
|
||||
sbq_desc->p.skb = NULL;
|
||||
return;
|
||||
}
|
||||
pci_unmap_addr_set(sbq_desc, mapaddr, map);
|
||||
|
@ -1449,12 +1455,12 @@ static void ql_process_mac_rx_intr(struct ql_adapter *qdev,
|
|||
if (qdev->vlgrp && (ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_V)) {
|
||||
QPRINTK(qdev, RX_STATUS, DEBUG,
|
||||
"Passing a VLAN packet upstream.\n");
|
||||
vlan_hwaccel_rx(skb, qdev->vlgrp,
|
||||
vlan_hwaccel_receive_skb(skb, qdev->vlgrp,
|
||||
le16_to_cpu(ib_mac_rsp->vlan_id));
|
||||
} else {
|
||||
QPRINTK(qdev, RX_STATUS, DEBUG,
|
||||
"Passing a normal packet upstream.\n");
|
||||
netif_rx(skb);
|
||||
netif_receive_skb(skb);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1511,6 +1517,11 @@ void ql_queue_asic_error(struct ql_adapter *qdev)
|
|||
netif_stop_queue(qdev->ndev);
|
||||
netif_carrier_off(qdev->ndev);
|
||||
ql_disable_interrupts(qdev);
|
||||
/* Clear adapter up bit to signal the recovery
|
||||
* process that it shouldn't kill the reset worker
|
||||
* thread
|
||||
*/
|
||||
clear_bit(QL_ADAPTER_UP, &qdev->flags);
|
||||
queue_delayed_work(qdev->workqueue, &qdev->asic_reset_work, 0);
|
||||
}
|
||||
|
||||
|
@ -1927,10 +1938,6 @@ static int qlge_send(struct sk_buff *skb, struct net_device *ndev)
|
|||
tx_ring_desc = &tx_ring->q[tx_ring->prod_idx];
|
||||
mac_iocb_ptr = tx_ring_desc->queue_entry;
|
||||
memset((void *)mac_iocb_ptr, 0, sizeof(mac_iocb_ptr));
|
||||
if (ql_map_send(qdev, mac_iocb_ptr, skb, tx_ring_desc) != NETDEV_TX_OK) {
|
||||
QPRINTK(qdev, TX_QUEUED, ERR, "Could not map the segments.\n");
|
||||
return NETDEV_TX_BUSY;
|
||||
}
|
||||
|
||||
mac_iocb_ptr->opcode = OPCODE_OB_MAC_IOCB;
|
||||
mac_iocb_ptr->tid = tx_ring_desc->index;
|
||||
|
@ -1956,6 +1963,12 @@ static int qlge_send(struct sk_buff *skb, struct net_device *ndev)
|
|||
ql_hw_csum_setup(skb,
|
||||
(struct ob_mac_tso_iocb_req *)mac_iocb_ptr);
|
||||
}
|
||||
if (ql_map_send(qdev, mac_iocb_ptr, skb, tx_ring_desc) !=
|
||||
NETDEV_TX_OK) {
|
||||
QPRINTK(qdev, TX_QUEUED, ERR,
|
||||
"Could not map the segments.\n");
|
||||
return NETDEV_TX_BUSY;
|
||||
}
|
||||
QL_DUMP_OB_MAC_IOCB(mac_iocb_ptr);
|
||||
tx_ring->prod_idx++;
|
||||
if (tx_ring->prod_idx == tx_ring->wq_len)
|
||||
|
@ -2873,8 +2886,8 @@ static int ql_start_rss(struct ql_adapter *qdev)
|
|||
/*
|
||||
* Fill out the Indirection Table.
|
||||
*/
|
||||
for (i = 0; i < 32; i++)
|
||||
hash_id[i] = i & 1;
|
||||
for (i = 0; i < 256; i++)
|
||||
hash_id[i] = i & (qdev->rss_ring_count - 1);
|
||||
|
||||
/*
|
||||
* Random values for the IPv6 and IPv4 Hash Keys.
|
||||
|
@ -3100,7 +3113,11 @@ static int ql_adapter_down(struct ql_adapter *qdev)
|
|||
netif_stop_queue(ndev);
|
||||
netif_carrier_off(ndev);
|
||||
|
||||
cancel_delayed_work_sync(&qdev->asic_reset_work);
|
||||
/* Don't kill the reset worker thread if we
|
||||
* are in the process of recovery.
|
||||
*/
|
||||
if (test_bit(QL_ADAPTER_UP, &qdev->flags))
|
||||
cancel_delayed_work_sync(&qdev->asic_reset_work);
|
||||
cancel_delayed_work_sync(&qdev->mpi_reset_work);
|
||||
cancel_delayed_work_sync(&qdev->mpi_work);
|
||||
|
||||
|
@ -3501,7 +3518,7 @@ static int qlge_set_mac_address(struct net_device *ndev, void *p)
|
|||
static void qlge_tx_timeout(struct net_device *ndev)
|
||||
{
|
||||
struct ql_adapter *qdev = (struct ql_adapter *)netdev_priv(ndev);
|
||||
queue_delayed_work(qdev->workqueue, &qdev->asic_reset_work, 0);
|
||||
ql_queue_asic_error(qdev);
|
||||
}
|
||||
|
||||
static void ql_asic_reset_work(struct work_struct *work)
|
||||
|
|
|
@ -428,7 +428,7 @@ static int lance_open( struct net_device *dev )
|
|||
while (--i > 0)
|
||||
if (DREG & CSR0_IDON)
|
||||
break;
|
||||
if (i < 0 || (DREG & CSR0_ERR)) {
|
||||
if (i <= 0 || (DREG & CSR0_ERR)) {
|
||||
DPRINTK( 2, ( "lance_open(): opening %s failed, i=%d, csr0=%04x\n",
|
||||
dev->name, i, DREG ));
|
||||
DREG = CSR0_STOP;
|
||||
|
|
|
@ -2543,25 +2543,36 @@ static struct quattro * __devinit quattro_sbus_find(struct of_device *child)
|
|||
}
|
||||
|
||||
/* After all quattro cards have been probed, we call these functions
|
||||
* to register the IRQ handlers.
|
||||
* to register the IRQ handlers for the cards that have been
|
||||
* successfully probed and skip the cards that failed to initialize
|
||||
*/
|
||||
static void __init quattro_sbus_register_irqs(void)
|
||||
static int __init quattro_sbus_register_irqs(void)
|
||||
{
|
||||
struct quattro *qp;
|
||||
|
||||
for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) {
|
||||
struct of_device *op = qp->quattro_dev;
|
||||
int err;
|
||||
int err, qfe_slot, skip = 0;
|
||||
|
||||
for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) {
|
||||
if (!qp->happy_meals[qfe_slot])
|
||||
skip = 1;
|
||||
}
|
||||
if (skip)
|
||||
continue;
|
||||
|
||||
err = request_irq(op->irqs[0],
|
||||
quattro_sbus_interrupt,
|
||||
IRQF_SHARED, "Quattro",
|
||||
qp);
|
||||
if (err != 0) {
|
||||
printk(KERN_ERR "Quattro: Fatal IRQ registery error %d.\n", err);
|
||||
panic("QFE request irq");
|
||||
printk(KERN_ERR "Quattro HME: IRQ registration "
|
||||
"error %d.\n", err);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void quattro_sbus_free_irqs(void)
|
||||
|
@ -2570,6 +2581,14 @@ static void quattro_sbus_free_irqs(void)
|
|||
|
||||
for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) {
|
||||
struct of_device *op = qp->quattro_dev;
|
||||
int qfe_slot, skip = 0;
|
||||
|
||||
for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) {
|
||||
if (!qp->happy_meals[qfe_slot])
|
||||
skip = 1;
|
||||
}
|
||||
if (skip)
|
||||
continue;
|
||||
|
||||
free_irq(op->irqs[0], qp);
|
||||
}
|
||||
|
@ -2828,6 +2847,9 @@ err_out_iounmap:
|
|||
if (hp->tcvregs)
|
||||
of_iounmap(&op->resource[4], hp->tcvregs, TCVR_REG_SIZE);
|
||||
|
||||
if (qp)
|
||||
qp->happy_meals[qfe_slot] = NULL;
|
||||
|
||||
err_out_free_netdev:
|
||||
free_netdev(dev);
|
||||
|
||||
|
@ -3285,7 +3307,7 @@ static int __init happy_meal_sbus_init(void)
|
|||
|
||||
err = of_register_driver(&hme_sbus_driver, &of_bus_type);
|
||||
if (!err)
|
||||
quattro_sbus_register_irqs();
|
||||
err = quattro_sbus_register_irqs();
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
|
@ -852,7 +852,7 @@ static int tg3_bmcr_reset(struct tg3 *tp)
|
|||
}
|
||||
udelay(10);
|
||||
}
|
||||
if (limit <= 0)
|
||||
if (limit < 0)
|
||||
return -EBUSY;
|
||||
|
||||
return 0;
|
||||
|
@ -1603,7 +1603,7 @@ static int tg3_wait_macro_done(struct tg3 *tp)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (limit <= 0)
|
||||
if (limit < 0)
|
||||
return -EBUSY;
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -1098,6 +1098,42 @@ ath5k_hw_to_driver_rix(struct ath5k_softc *sc, int hw_rix)
|
|||
* Buffers setup *
|
||||
\***************/
|
||||
|
||||
static
|
||||
struct sk_buff *ath5k_rx_skb_alloc(struct ath5k_softc *sc, dma_addr_t *skb_addr)
|
||||
{
|
||||
struct sk_buff *skb;
|
||||
unsigned int off;
|
||||
|
||||
/*
|
||||
* Allocate buffer with headroom_needed space for the
|
||||
* fake physical layer header at the start.
|
||||
*/
|
||||
skb = dev_alloc_skb(sc->rxbufsize + sc->cachelsz - 1);
|
||||
|
||||
if (!skb) {
|
||||
ATH5K_ERR(sc, "can't alloc skbuff of size %u\n",
|
||||
sc->rxbufsize + sc->cachelsz - 1);
|
||||
return NULL;
|
||||
}
|
||||
/*
|
||||
* Cache-line-align. This is important (for the
|
||||
* 5210 at least) as not doing so causes bogus data
|
||||
* in rx'd frames.
|
||||
*/
|
||||
off = ((unsigned long)skb->data) % sc->cachelsz;
|
||||
if (off != 0)
|
||||
skb_reserve(skb, sc->cachelsz - off);
|
||||
|
||||
*skb_addr = pci_map_single(sc->pdev,
|
||||
skb->data, sc->rxbufsize, PCI_DMA_FROMDEVICE);
|
||||
if (unlikely(pci_dma_mapping_error(sc->pdev, *skb_addr))) {
|
||||
ATH5K_ERR(sc, "%s: DMA mapping failed\n", __func__);
|
||||
dev_kfree_skb(skb);
|
||||
return NULL;
|
||||
}
|
||||
return skb;
|
||||
}
|
||||
|
||||
static int
|
||||
ath5k_rxbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf)
|
||||
{
|
||||
|
@ -1105,37 +1141,11 @@ ath5k_rxbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf)
|
|||
struct sk_buff *skb = bf->skb;
|
||||
struct ath5k_desc *ds;
|
||||
|
||||
if (likely(skb == NULL)) {
|
||||
unsigned int off;
|
||||
|
||||
/*
|
||||
* Allocate buffer with headroom_needed space for the
|
||||
* fake physical layer header at the start.
|
||||
*/
|
||||
skb = dev_alloc_skb(sc->rxbufsize + sc->cachelsz - 1);
|
||||
if (unlikely(skb == NULL)) {
|
||||
ATH5K_ERR(sc, "can't alloc skbuff of size %u\n",
|
||||
sc->rxbufsize + sc->cachelsz - 1);
|
||||
if (!skb) {
|
||||
skb = ath5k_rx_skb_alloc(sc, &bf->skbaddr);
|
||||
if (!skb)
|
||||
return -ENOMEM;
|
||||
}
|
||||
/*
|
||||
* Cache-line-align. This is important (for the
|
||||
* 5210 at least) as not doing so causes bogus data
|
||||
* in rx'd frames.
|
||||
*/
|
||||
off = ((unsigned long)skb->data) % sc->cachelsz;
|
||||
if (off != 0)
|
||||
skb_reserve(skb, sc->cachelsz - off);
|
||||
|
||||
bf->skb = skb;
|
||||
bf->skbaddr = pci_map_single(sc->pdev,
|
||||
skb->data, sc->rxbufsize, PCI_DMA_FROMDEVICE);
|
||||
if (unlikely(pci_dma_mapping_error(sc->pdev, bf->skbaddr))) {
|
||||
ATH5K_ERR(sc, "%s: DMA mapping failed\n", __func__);
|
||||
dev_kfree_skb(skb);
|
||||
bf->skb = NULL;
|
||||
return -ENOMEM;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1664,7 +1674,8 @@ ath5k_tasklet_rx(unsigned long data)
|
|||
{
|
||||
struct ieee80211_rx_status rxs = {};
|
||||
struct ath5k_rx_status rs = {};
|
||||
struct sk_buff *skb;
|
||||
struct sk_buff *skb, *next_skb;
|
||||
dma_addr_t next_skb_addr;
|
||||
struct ath5k_softc *sc = (void *)data;
|
||||
struct ath5k_buf *bf, *bf_last;
|
||||
struct ath5k_desc *ds;
|
||||
|
@ -1749,10 +1760,17 @@ ath5k_tasklet_rx(unsigned long data)
|
|||
goto next;
|
||||
}
|
||||
accept:
|
||||
next_skb = ath5k_rx_skb_alloc(sc, &next_skb_addr);
|
||||
|
||||
/*
|
||||
* If we can't replace bf->skb with a new skb under memory
|
||||
* pressure, just skip this packet
|
||||
*/
|
||||
if (!next_skb)
|
||||
goto next;
|
||||
|
||||
pci_unmap_single(sc->pdev, bf->skbaddr, sc->rxbufsize,
|
||||
PCI_DMA_FROMDEVICE);
|
||||
bf->skb = NULL;
|
||||
|
||||
skb_put(skb, rs.rs_datalen);
|
||||
|
||||
/* The MAC header is padded to have 32-bit boundary if the
|
||||
|
@ -1825,6 +1843,9 @@ accept:
|
|||
ath5k_check_ibss_tsf(sc, skb, &rxs);
|
||||
|
||||
__ieee80211_rx(sc->hw, skb, &rxs);
|
||||
|
||||
bf->skb = next_skb;
|
||||
bf->skbaddr = next_skb_addr;
|
||||
next:
|
||||
list_move_tail(&bf->list, &sc->rxbuf);
|
||||
} while (ath5k_rxbuf_setup(sc, bf) == 0);
|
||||
|
|
|
@ -4042,7 +4042,19 @@ static int iwl_pci_suspend(struct pci_dev *pdev, pm_message_t state)
|
|||
priv->is_open = 1;
|
||||
}
|
||||
|
||||
pci_save_state(pdev);
|
||||
/* pci driver assumes state will be saved in this function.
|
||||
* pci state is saved and device disabled when interface is
|
||||
* stopped, so at this time pci device will always be disabled -
|
||||
* whether interface was started or not. saving pci state now will
|
||||
* cause saved state be that of a disabled device, which will cause
|
||||
* problems during resume in that we will end up with a disabled device.
|
||||
*
|
||||
* indicate that the current saved state (from when interface was
|
||||
* stopped) is valid. if interface was never up at time of suspend
|
||||
* then the saved state will still be valid as it was saved during
|
||||
* .probe. */
|
||||
pdev->state_saved = true;
|
||||
|
||||
pci_set_power_state(pdev, PCI_D3hot);
|
||||
|
||||
return 0;
|
||||
|
@ -4053,7 +4065,6 @@ static int iwl_pci_resume(struct pci_dev *pdev)
|
|||
struct iwl_priv *priv = pci_get_drvdata(pdev);
|
||||
|
||||
pci_set_power_state(pdev, PCI_D0);
|
||||
pci_restore_state(pdev);
|
||||
|
||||
if (priv->is_open)
|
||||
iwl_mac_start(priv->hw);
|
||||
|
|
|
@ -8143,7 +8143,19 @@ static int iwl3945_pci_suspend(struct pci_dev *pdev, pm_message_t state)
|
|||
priv->is_open = 1;
|
||||
}
|
||||
|
||||
pci_save_state(pdev);
|
||||
/* pci driver assumes state will be saved in this function.
|
||||
* pci state is saved and device disabled when interface is
|
||||
* stopped, so at this time pci device will always be disabled -
|
||||
* whether interface was started or not. saving pci state now will
|
||||
* cause saved state be that of a disabled device, which will cause
|
||||
* problems during resume in that we will end up with a disabled device.
|
||||
*
|
||||
* indicate that the current saved state (from when interface was
|
||||
* stopped) is valid. if interface was never up at time of suspend
|
||||
* then the saved state will still be valid as it was saved during
|
||||
* .probe. */
|
||||
pdev->state_saved = true;
|
||||
|
||||
pci_set_power_state(pdev, PCI_D3hot);
|
||||
|
||||
return 0;
|
||||
|
@ -8154,7 +8166,6 @@ static int iwl3945_pci_resume(struct pci_dev *pdev)
|
|||
struct iwl3945_priv *priv = pci_get_drvdata(pdev);
|
||||
|
||||
pci_set_power_state(pdev, PCI_D0);
|
||||
pci_restore_state(pdev);
|
||||
|
||||
if (priv->is_open)
|
||||
iwl3945_mac_start(priv->hw);
|
||||
|
|
|
@ -86,6 +86,7 @@ int zd_rf_init_hw(struct zd_rf *rf, u8 type)
|
|||
case AL7230B_RF:
|
||||
r = zd_rf_init_al7230b(rf);
|
||||
break;
|
||||
case MAXIM_NEW_RF:
|
||||
case UW2453_RF:
|
||||
r = zd_rf_init_uw2453(rf);
|
||||
break;
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
static struct usb_device_id usb_ids[] = {
|
||||
/* ZD1211 */
|
||||
{ USB_DEVICE(0x0ace, 0x1211), .driver_info = DEVICE_ZD1211 },
|
||||
{ USB_DEVICE(0x0ace, 0xa211), .driver_info = DEVICE_ZD1211 },
|
||||
{ USB_DEVICE(0x07b8, 0x6001), .driver_info = DEVICE_ZD1211 },
|
||||
{ USB_DEVICE(0x126f, 0xa006), .driver_info = DEVICE_ZD1211 },
|
||||
{ USB_DEVICE(0x6891, 0xa727), .driver_info = DEVICE_ZD1211 },
|
||||
|
|
|
@ -515,7 +515,7 @@ enum
|
|||
|
||||
struct tc_drr_stats
|
||||
{
|
||||
u32 deficit;
|
||||
__u32 deficit;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1045,50 +1045,36 @@ typedef struct mixer_vol_table {
|
|||
*/
|
||||
#define LOCL_STARTAUDIO 1
|
||||
|
||||
#if (!defined(__KERNEL__) && !defined(KERNEL) && !defined(INKERNEL) && !defined(_KERNEL)) || defined(USE_SEQ_MACROS)
|
||||
#if !defined(__KERNEL__) || defined(USE_SEQ_MACROS)
|
||||
/*
|
||||
* Some convenience macros to simplify programming of the
|
||||
* /dev/sequencer interface
|
||||
*
|
||||
* These macros define the API which should be used when possible.
|
||||
* This is a legacy interface for applications written against
|
||||
* the OSSlib-3.8 style interface. It is no longer possible
|
||||
* to actually link against OSSlib with this header, but we
|
||||
* still provide these macros for programs using them.
|
||||
*
|
||||
* If you want to use OSSlib, it is recommended that you get
|
||||
* the GPL version of OSS-4.x and build against that version
|
||||
* of the header.
|
||||
*
|
||||
* We redefine the extern keyword so that make headers_check
|
||||
* does not complain about SEQ_USE_EXTBUF.
|
||||
*/
|
||||
#define SEQ_DECLAREBUF() SEQ_USE_EXTBUF()
|
||||
|
||||
void seqbuf_dump(void); /* This function must be provided by programs */
|
||||
|
||||
extern int OSS_init(int seqfd, int buflen);
|
||||
extern void OSS_seqbuf_dump(int fd, unsigned char *buf, int buflen);
|
||||
extern void OSS_seq_advbuf(int len, int fd, unsigned char *buf, int buflen);
|
||||
extern void OSS_seq_needbuf(int len, int fd, unsigned char *buf, int buflen);
|
||||
extern void OSS_patch_caching(int dev, int chn, int patch,
|
||||
int fd, unsigned char *buf, int buflen);
|
||||
extern void OSS_drum_caching(int dev, int chn, int patch,
|
||||
int fd, unsigned char *buf, int buflen);
|
||||
extern void OSS_write_patch(int fd, unsigned char *buf, int len);
|
||||
extern int OSS_write_patch2(int fd, unsigned char *buf, int len);
|
||||
|
||||
#define SEQ_PM_DEFINES int __foo_bar___
|
||||
#ifdef OSSLIB
|
||||
# define SEQ_USE_EXTBUF() \
|
||||
extern unsigned char *_seqbuf; \
|
||||
extern int _seqbuflen;extern int _seqbufptr
|
||||
# define SEQ_DEFINEBUF(len) SEQ_USE_EXTBUF();static int _requested_seqbuflen=len
|
||||
# define _SEQ_ADVBUF(len) OSS_seq_advbuf(len, seqfd, _seqbuf, _seqbuflen)
|
||||
# define _SEQ_NEEDBUF(len) OSS_seq_needbuf(len, seqfd, _seqbuf, _seqbuflen)
|
||||
# define SEQ_DUMPBUF() OSS_seqbuf_dump(seqfd, _seqbuf, _seqbuflen)
|
||||
|
||||
# define SEQ_LOAD_GMINSTR(dev, instr) \
|
||||
OSS_patch_caching(dev, -1, instr, seqfd, _seqbuf, _seqbuflen)
|
||||
# define SEQ_LOAD_GMDRUM(dev, drum) \
|
||||
OSS_drum_caching(dev, -1, drum, seqfd, _seqbuf, _seqbuflen)
|
||||
#else /* !OSSLIB */
|
||||
#define SEQ_LOAD_GMINSTR(dev, instr)
|
||||
#define SEQ_LOAD_GMDRUM(dev, drum)
|
||||
|
||||
# define SEQ_LOAD_GMINSTR(dev, instr)
|
||||
# define SEQ_LOAD_GMDRUM(dev, drum)
|
||||
|
||||
# define SEQ_USE_EXTBUF() \
|
||||
extern unsigned char _seqbuf[]; \
|
||||
extern int _seqbuflen;extern int _seqbufptr
|
||||
#define _SEQ_EXTERN extern
|
||||
#define SEQ_USE_EXTBUF() \
|
||||
_SEQ_EXTERN unsigned char _seqbuf[]; \
|
||||
_SEQ_EXTERN int _seqbuflen; _SEQ_EXTERN int _seqbufptr
|
||||
|
||||
#ifndef USE_SIMPLE_MACROS
|
||||
/* Sample seqbuf_dump() implementation:
|
||||
|
@ -1131,7 +1117,6 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len);
|
|||
*/
|
||||
#define _SEQ_NEEDBUF(len) /* empty */
|
||||
#endif
|
||||
#endif /* !OSSLIB */
|
||||
|
||||
#define SEQ_VOLUME_MODE(dev, mode) {_SEQ_NEEDBUF(8);\
|
||||
_seqbuf[_seqbufptr] = SEQ_EXTENDED;\
|
||||
|
@ -1215,14 +1200,8 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len);
|
|||
_CHN_COMMON(dev, MIDI_CHN_PRESSURE, chn, pressure, 0, 0)
|
||||
|
||||
#define SEQ_SET_PATCH SEQ_PGM_CHANGE
|
||||
#ifdef OSSLIB
|
||||
# define SEQ_PGM_CHANGE(dev, chn, patch) \
|
||||
{OSS_patch_caching(dev, chn, patch, seqfd, _seqbuf, _seqbuflen); \
|
||||
_CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0);}
|
||||
#else
|
||||
# define SEQ_PGM_CHANGE(dev, chn, patch) \
|
||||
#define SEQ_PGM_CHANGE(dev, chn, patch) \
|
||||
_CHN_COMMON(dev, MIDI_PGM_CHANGE, chn, patch, 0, 0)
|
||||
#endif
|
||||
|
||||
#define SEQ_CONTROL(dev, chn, controller, value) \
|
||||
_CHN_COMMON(dev, MIDI_CTL_CHANGE, chn, controller, 0, value)
|
||||
|
@ -1300,19 +1279,12 @@ extern int OSS_write_patch2(int fd, unsigned char *buf, int len);
|
|||
/*
|
||||
* Patch loading.
|
||||
*/
|
||||
#ifdef OSSLIB
|
||||
# define SEQ_WRPATCH(patchx, len) \
|
||||
OSS_write_patch(seqfd, (char*)(patchx), len)
|
||||
# define SEQ_WRPATCH2(patchx, len) \
|
||||
OSS_write_patch2(seqfd, (char*)(patchx), len)
|
||||
#else
|
||||
# define SEQ_WRPATCH(patchx, len) \
|
||||
#define SEQ_WRPATCH(patchx, len) \
|
||||
{if (_seqbufptr) SEQ_DUMPBUF();\
|
||||
if (write(seqfd, (char*)(patchx), len)==-1) \
|
||||
perror("Write patch: /dev/sequencer");}
|
||||
# define SEQ_WRPATCH2(patchx, len) \
|
||||
#define SEQ_WRPATCH2(patchx, len) \
|
||||
(SEQ_DUMPBUF(), write(seqfd, (char*)(patchx), len))
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1308,7 +1308,7 @@ static inline int sock_writeable(const struct sock *sk)
|
|||
|
||||
static inline gfp_t gfp_any(void)
|
||||
{
|
||||
return in_atomic() ? GFP_ATOMIC : GFP_KERNEL;
|
||||
return in_softirq() ? GFP_ATOMIC : GFP_KERNEL;
|
||||
}
|
||||
|
||||
static inline long sock_rcvtimeo(const struct sock *sk, int noblock)
|
||||
|
|
|
@ -72,6 +72,7 @@ static void uid_hash_insert(struct user_struct *up, struct hlist_head *hashent)
|
|||
static void uid_hash_remove(struct user_struct *up)
|
||||
{
|
||||
hlist_del_init(&up->uidhash_node);
|
||||
put_user_ns(up->user_ns);
|
||||
}
|
||||
|
||||
static struct user_struct *uid_hash_find(uid_t uid, struct hlist_head *hashent)
|
||||
|
@ -334,7 +335,6 @@ static void free_user(struct user_struct *up, unsigned long flags)
|
|||
atomic_inc(&up->__count);
|
||||
spin_unlock_irqrestore(&uidhash_lock, flags);
|
||||
|
||||
put_user_ns(up->user_ns);
|
||||
INIT_WORK(&up->work, remove_user_sysfs_dir);
|
||||
schedule_work(&up->work);
|
||||
}
|
||||
|
@ -357,7 +357,6 @@ static void free_user(struct user_struct *up, unsigned long flags)
|
|||
sched_destroy_user(up);
|
||||
key_put(up->uid_keyring);
|
||||
key_put(up->session_keyring);
|
||||
put_user_ns(up->user_ns);
|
||||
kmem_cache_free(uid_cachep, up);
|
||||
}
|
||||
|
||||
|
|
|
@ -696,6 +696,8 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
|
|||
if (len < 0)
|
||||
return -EINVAL;
|
||||
|
||||
v.val = 0;
|
||||
|
||||
switch(optname) {
|
||||
case SO_DEBUG:
|
||||
v.val = sock_flag(sk, SOCK_DBG);
|
||||
|
|
|
@ -1343,6 +1343,8 @@ int ieee80211_master_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
list) {
|
||||
if (!netif_running(sdata->dev))
|
||||
continue;
|
||||
if (sdata->vif.type != NL80211_IFTYPE_AP)
|
||||
continue;
|
||||
if (compare_ether_addr(sdata->dev->dev_addr,
|
||||
hdr->addr2)) {
|
||||
dev_hold(sdata->dev);
|
||||
|
|
|
@ -207,7 +207,6 @@ static int gprs_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
dev->name, err);
|
||||
dev->stats.tx_aborted_errors++;
|
||||
dev->stats.tx_errors++;
|
||||
dev_kfree_skb(skb);
|
||||
} else {
|
||||
dev->stats.tx_packets++;
|
||||
dev->stats.tx_bytes += len;
|
||||
|
|
|
@ -553,7 +553,7 @@ static int pep_do_rcv(struct sock *sk, struct sk_buff *skb)
|
|||
{
|
||||
struct pep_sock *pn = pep_sk(sk);
|
||||
struct sock *sknode;
|
||||
struct pnpipehdr *hdr = pnp_hdr(skb);
|
||||
struct pnpipehdr *hdr;
|
||||
struct sockaddr_pn dst;
|
||||
int err = NET_RX_SUCCESS;
|
||||
u8 pipe_handle;
|
||||
|
|
|
@ -94,12 +94,13 @@ struct wimax_dev *wimax_dev_get_by_genl_info(
|
|||
list_for_each_entry(wimax_dev, &wimax_id_table, id_table_node) {
|
||||
if (wimax_dev->net_dev->ifindex == ifindex) {
|
||||
dev_hold(wimax_dev->net_dev);
|
||||
break;
|
||||
goto found;
|
||||
}
|
||||
}
|
||||
if (wimax_dev == NULL)
|
||||
d_printf(1, NULL, "wimax: no devices found with ifindex %d\n",
|
||||
ifindex);
|
||||
wimax_dev = NULL;
|
||||
d_printf(1, NULL, "wimax: no devices found with ifindex %d\n",
|
||||
ifindex);
|
||||
found:
|
||||
spin_unlock(&wimax_id_table_lock);
|
||||
d_fnend(3, NULL, "(info %p ifindex %d) = %p\n",
|
||||
info, ifindex, wimax_dev);
|
||||
|
|
|
@ -706,7 +706,6 @@ static int __devinit snd_mtpav_probe(struct platform_device *dev)
|
|||
mtp_card->card = card;
|
||||
mtp_card->irq = -1;
|
||||
mtp_card->share_irq = 0;
|
||||
mtp_card->inmidiport = 0xffffffff;
|
||||
mtp_card->inmidistate = 0;
|
||||
mtp_card->outmidihwport = 0xffffffff;
|
||||
init_timer(&mtp_card->timer);
|
||||
|
@ -719,6 +718,8 @@ static int __devinit snd_mtpav_probe(struct platform_device *dev)
|
|||
if (err < 0)
|
||||
goto __error;
|
||||
|
||||
mtp_card->inmidiport = mtp_card->num_ports + MTPAV_PIDX_BROADCAST;
|
||||
|
||||
err = snd_mtpav_get_ISA(mtp_card);
|
||||
if (err < 0)
|
||||
goto __error;
|
||||
|
|
|
@ -3088,6 +3088,16 @@ int snd_hda_multi_out_dig_prepare(struct hda_codec *codec,
|
|||
}
|
||||
EXPORT_SYMBOL_HDA(snd_hda_multi_out_dig_prepare);
|
||||
|
||||
int snd_hda_multi_out_dig_cleanup(struct hda_codec *codec,
|
||||
struct hda_multi_out *mout)
|
||||
{
|
||||
mutex_lock(&codec->spdif_mutex);
|
||||
cleanup_dig_out_stream(codec, mout->dig_out_nid);
|
||||
mutex_unlock(&codec->spdif_mutex);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_HDA(snd_hda_multi_out_dig_cleanup);
|
||||
|
||||
/*
|
||||
* release the digital out
|
||||
*/
|
||||
|
|
|
@ -175,7 +175,7 @@ static int reconfig_codec(struct hda_codec *codec)
|
|||
err = snd_hda_codec_build_controls(codec);
|
||||
if (err < 0)
|
||||
return err;
|
||||
return 0;
|
||||
return snd_card_register(codec->bus->card);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -251,6 +251,8 @@ int snd_hda_multi_out_dig_prepare(struct hda_codec *codec,
|
|||
unsigned int stream_tag,
|
||||
unsigned int format,
|
||||
struct snd_pcm_substream *substream);
|
||||
int snd_hda_multi_out_dig_cleanup(struct hda_codec *codec,
|
||||
struct hda_multi_out *mout);
|
||||
int snd_hda_multi_out_analog_open(struct hda_codec *codec,
|
||||
struct hda_multi_out *mout,
|
||||
struct snd_pcm_substream *substream,
|
||||
|
|
|
@ -275,6 +275,14 @@ static int ad198x_dig_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
|
|||
format, substream);
|
||||
}
|
||||
|
||||
static int ad198x_dig_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
|
||||
struct hda_codec *codec,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct ad198x_spec *spec = codec->spec;
|
||||
return snd_hda_multi_out_dig_cleanup(codec, &spec->multiout);
|
||||
}
|
||||
|
||||
/*
|
||||
* Analog capture
|
||||
*/
|
||||
|
@ -333,7 +341,8 @@ static struct hda_pcm_stream ad198x_pcm_digital_playback = {
|
|||
.ops = {
|
||||
.open = ad198x_dig_playback_pcm_open,
|
||||
.close = ad198x_dig_playback_pcm_close,
|
||||
.prepare = ad198x_dig_playback_pcm_prepare
|
||||
.prepare = ad198x_dig_playback_pcm_prepare,
|
||||
.cleanup = ad198x_dig_playback_pcm_cleanup
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -1885,8 +1894,8 @@ static hda_nid_t ad1988_capsrc_nids[3] = {
|
|||
#define AD1988_SPDIF_OUT_HDMI 0x0b
|
||||
#define AD1988_SPDIF_IN 0x07
|
||||
|
||||
static hda_nid_t ad1989b_slave_dig_outs[2] = {
|
||||
AD1988_SPDIF_OUT, AD1988_SPDIF_OUT_HDMI
|
||||
static hda_nid_t ad1989b_slave_dig_outs[] = {
|
||||
AD1988_SPDIF_OUT, AD1988_SPDIF_OUT_HDMI, 0
|
||||
};
|
||||
|
||||
static struct hda_input_mux ad1988_6stack_capture_source = {
|
||||
|
|
|
@ -49,11 +49,6 @@ static struct hda_verb pinout_enable_verb[] = {
|
|||
{} /* terminator */
|
||||
};
|
||||
|
||||
static struct hda_verb pinout_disable_verb[] = {
|
||||
{PIN_NID, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00},
|
||||
{}
|
||||
};
|
||||
|
||||
static struct hda_verb unsolicited_response_verb[] = {
|
||||
{PIN_NID, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN |
|
||||
INTEL_HDMI_EVENT_TAG},
|
||||
|
@ -248,10 +243,6 @@ static void hdmi_write_dip_byte(struct hda_codec *codec, hda_nid_t nid,
|
|||
|
||||
static void hdmi_enable_output(struct hda_codec *codec)
|
||||
{
|
||||
/* Enable Audio InfoFrame Transmission */
|
||||
hdmi_set_dip_index(codec, PIN_NID, 0x0, 0x0);
|
||||
snd_hda_codec_write(codec, PIN_NID, 0, AC_VERB_SET_HDMI_DIP_XMIT,
|
||||
AC_DIPXMIT_BEST);
|
||||
/* Unmute */
|
||||
if (get_wcaps(codec, PIN_NID) & AC_WCAP_OUT_AMP)
|
||||
snd_hda_codec_write(codec, PIN_NID, 0,
|
||||
|
@ -260,17 +251,24 @@ static void hdmi_enable_output(struct hda_codec *codec)
|
|||
snd_hda_sequence_write(codec, pinout_enable_verb);
|
||||
}
|
||||
|
||||
static void hdmi_disable_output(struct hda_codec *codec)
|
||||
/*
|
||||
* Enable Audio InfoFrame Transmission
|
||||
*/
|
||||
static void hdmi_start_infoframe_trans(struct hda_codec *codec)
|
||||
{
|
||||
snd_hda_sequence_write(codec, pinout_disable_verb);
|
||||
if (get_wcaps(codec, PIN_NID) & AC_WCAP_OUT_AMP)
|
||||
snd_hda_codec_write(codec, PIN_NID, 0,
|
||||
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
|
||||
hdmi_set_dip_index(codec, PIN_NID, 0x0, 0x0);
|
||||
snd_hda_codec_write(codec, PIN_NID, 0, AC_VERB_SET_HDMI_DIP_XMIT,
|
||||
AC_DIPXMIT_BEST);
|
||||
}
|
||||
|
||||
/*
|
||||
* FIXME: noises may arise when playing music after reloading the
|
||||
* kernel module, until the next X restart or monitor repower.
|
||||
*/
|
||||
/*
|
||||
* Disable Audio InfoFrame Transmission
|
||||
*/
|
||||
static void hdmi_stop_infoframe_trans(struct hda_codec *codec)
|
||||
{
|
||||
hdmi_set_dip_index(codec, PIN_NID, 0x0, 0x0);
|
||||
snd_hda_codec_write(codec, PIN_NID, 0, AC_VERB_SET_HDMI_DIP_XMIT,
|
||||
AC_DIPXMIT_DISABLE);
|
||||
}
|
||||
|
||||
static int hdmi_get_channel_count(struct hda_codec *codec)
|
||||
|
@ -368,11 +366,16 @@ static void hdmi_fill_audio_infoframe(struct hda_codec *codec,
|
|||
struct hdmi_audio_infoframe *ai)
|
||||
{
|
||||
u8 *params = (u8 *)ai;
|
||||
u8 sum = 0;
|
||||
int i;
|
||||
|
||||
hdmi_debug_dip_size(codec);
|
||||
hdmi_clear_dip_buffers(codec); /* be paranoid */
|
||||
|
||||
for (i = 0; i < sizeof(ai); i++)
|
||||
sum += params[i];
|
||||
ai->checksum = - sum;
|
||||
|
||||
hdmi_set_dip_index(codec, PIN_NID, 0x0, 0x0);
|
||||
for (i = 0; i < sizeof(ai); i++)
|
||||
hdmi_write_dip_byte(codec, PIN_NID, params[i]);
|
||||
|
@ -419,13 +422,17 @@ static int hdmi_setup_channel_allocation(struct hda_codec *codec,
|
|||
/*
|
||||
* CA defaults to 0 for basic stereo audio
|
||||
*/
|
||||
if (!eld->eld_ver)
|
||||
return 0;
|
||||
if (!eld->spk_alloc)
|
||||
return 0;
|
||||
if (channels <= 2)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* HDMI sink's ELD info cannot always be retrieved for now, e.g.
|
||||
* in console or for audio devices. Assume the highest speakers
|
||||
* configuration, to _not_ prohibit multi-channel audio playback.
|
||||
*/
|
||||
if (!eld->spk_alloc)
|
||||
eld->spk_alloc = 0xffff;
|
||||
|
||||
/*
|
||||
* expand ELD's speaker allocation mask
|
||||
*
|
||||
|
@ -485,6 +492,7 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec,
|
|||
hdmi_setup_channel_mapping(codec, &ai);
|
||||
|
||||
hdmi_fill_audio_infoframe(codec, &ai);
|
||||
hdmi_start_infoframe_trans(codec);
|
||||
}
|
||||
|
||||
|
||||
|
@ -562,7 +570,7 @@ static int intel_hdmi_playback_pcm_close(struct hda_pcm_stream *hinfo,
|
|||
{
|
||||
struct intel_hdmi_spec *spec = codec->spec;
|
||||
|
||||
hdmi_disable_output(codec);
|
||||
hdmi_stop_infoframe_trans(codec);
|
||||
|
||||
return snd_hda_multi_out_dig_close(codec, &spec->multiout);
|
||||
}
|
||||
|
@ -582,8 +590,6 @@ static int intel_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
|
|||
|
||||
hdmi_setup_audio_infoframe(codec, substream);
|
||||
|
||||
hdmi_enable_output(codec);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -628,8 +634,7 @@ static int intel_hdmi_build_controls(struct hda_codec *codec)
|
|||
|
||||
static int intel_hdmi_init(struct hda_codec *codec)
|
||||
{
|
||||
/* disable audio output as early as possible */
|
||||
hdmi_disable_output(codec);
|
||||
hdmi_enable_output(codec);
|
||||
|
||||
snd_hda_sequence_write(codec, unsolicited_response_verb);
|
||||
|
||||
|
@ -679,6 +684,7 @@ static struct hda_codec_preset snd_hda_preset_intelhdmi[] = {
|
|||
{ .id = 0x80862801, .name = "G45 DEVBLC", .patch = patch_intel_hdmi },
|
||||
{ .id = 0x80862802, .name = "G45 DEVCTG", .patch = patch_intel_hdmi },
|
||||
{ .id = 0x80862803, .name = "G45 DEVELK", .patch = patch_intel_hdmi },
|
||||
{ .id = 0x80862804, .name = "G45 DEVIBX", .patch = patch_intel_hdmi },
|
||||
{ .id = 0x10951392, .name = "SiI1392 HDMI", .patch = patch_intel_hdmi },
|
||||
{} /* terminator */
|
||||
};
|
||||
|
@ -687,6 +693,7 @@ MODULE_ALIAS("snd-hda-codec-id:808629fb");
|
|||
MODULE_ALIAS("snd-hda-codec-id:80862801");
|
||||
MODULE_ALIAS("snd-hda-codec-id:80862802");
|
||||
MODULE_ALIAS("snd-hda-codec-id:80862803");
|
||||
MODULE_ALIAS("snd-hda-codec-id:80862804");
|
||||
MODULE_ALIAS("snd-hda-codec-id:10951392");
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
|
|
|
@ -8478,6 +8478,7 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = {
|
|||
SND_PCI_QUIRK(0x103c, 0x2a66, "HP Acacia", ALC888_3ST_HP),
|
||||
SND_PCI_QUIRK(0x1043, 0x1873, "Asus M90V", ALC888_ASUS_M90V),
|
||||
SND_PCI_QUIRK(0x1043, 0x8249, "Asus M2A-VM HDMI", ALC883_3ST_6ch_DIG),
|
||||
SND_PCI_QUIRK(0x1043, 0x8284, "Asus Z37E", ALC883_6ST_DIG),
|
||||
SND_PCI_QUIRK(0x1043, 0x82fe, "Asus P5Q-EM HDMI", ALC1200_ASUS_P5Q),
|
||||
SND_PCI_QUIRK(0x1043, 0x835f, "Asus Eee 1601", ALC888_ASUS_EEE1601),
|
||||
SND_PCI_QUIRK(0x105b, 0x0ce8, "Foxconn P35AX-S", ALC883_6ST_DIG),
|
||||
|
|
|
@ -1799,7 +1799,7 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = {
|
|||
SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f2,
|
||||
"HP dv5", STAC_HP_M4),
|
||||
SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f4,
|
||||
"HP dv7", STAC_HP_M4),
|
||||
"HP dv7", STAC_HP_DV5),
|
||||
SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30f7,
|
||||
"HP dv4", STAC_HP_DV5),
|
||||
SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x30fc,
|
||||
|
@ -2442,6 +2442,14 @@ static int stac92xx_dig_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
|
|||
stream_tag, format, substream);
|
||||
}
|
||||
|
||||
static int stac92xx_dig_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
|
||||
struct hda_codec *codec,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
struct sigmatel_spec *spec = codec->spec;
|
||||
return snd_hda_multi_out_dig_cleanup(codec, &spec->multiout);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Analog capture callbacks
|
||||
|
@ -2486,7 +2494,8 @@ static struct hda_pcm_stream stac92xx_pcm_digital_playback = {
|
|||
.ops = {
|
||||
.open = stac92xx_dig_playback_pcm_open,
|
||||
.close = stac92xx_dig_playback_pcm_close,
|
||||
.prepare = stac92xx_dig_playback_pcm_prepare
|
||||
.prepare = stac92xx_dig_playback_pcm_prepare,
|
||||
.cleanup = stac92xx_dig_playback_pcm_cleanup
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -165,10 +165,13 @@ static int snd_soc_dapm_put_volsw_aic3x(struct snd_kcontrol *kcontrol,
|
|||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol);
|
||||
int reg = kcontrol->private_value & 0xff;
|
||||
int shift = (kcontrol->private_value >> 8) & 0x0f;
|
||||
int mask = (kcontrol->private_value >> 16) & 0xff;
|
||||
int invert = (kcontrol->private_value >> 24) & 0x01;
|
||||
struct soc_mixer_control *mc =
|
||||
(struct soc_mixer_control *)kcontrol->private_value;
|
||||
unsigned int reg = mc->reg;
|
||||
unsigned int shift = mc->shift;
|
||||
int max = mc->max;
|
||||
unsigned int mask = (1 << fls(max)) - 1;
|
||||
unsigned int invert = mc->invert;
|
||||
unsigned short val, val_mask;
|
||||
int ret;
|
||||
struct snd_soc_dapm_path *path;
|
||||
|
|
|
@ -176,7 +176,9 @@ static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol,
|
|||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||
int reg = kcontrol->private_value & 0xff;
|
||||
struct soc_mixer_control *mc =
|
||||
(struct soc_mixer_control *)kcontrol->private_value;
|
||||
int reg = mc->reg;
|
||||
int ret;
|
||||
u16 val;
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ static struct snd_soc_dai_link sdp3430_dai = {
|
|||
};
|
||||
|
||||
/* Audio machine driver */
|
||||
static struct snd_soc_machine snd_soc_machine_sdp3430 = {
|
||||
static struct snd_soc_card snd_soc_sdp3430 = {
|
||||
.name = "SDP3430",
|
||||
.platform = &omap_soc_platform,
|
||||
.dai_link = &sdp3430_dai,
|
||||
|
@ -100,7 +100,7 @@ static struct snd_soc_machine snd_soc_machine_sdp3430 = {
|
|||
|
||||
/* Audio subsystem */
|
||||
static struct snd_soc_device sdp3430_snd_devdata = {
|
||||
.machine = &snd_soc_machine_sdp3430,
|
||||
.card = &snd_soc_sdp3430,
|
||||
.codec_dev = &soc_codec_dev_twl4030,
|
||||
};
|
||||
|
||||
|
|
|
@ -1385,7 +1385,10 @@ int snd_soc_init_card(struct snd_soc_device *socdev)
|
|||
|
||||
mutex_lock(&codec->mutex);
|
||||
#ifdef CONFIG_SND_SOC_AC97_BUS
|
||||
if (ac97) {
|
||||
/* Only instantiate AC97 if not already done by the adaptor
|
||||
* for the generic AC97 subsystem.
|
||||
*/
|
||||
if (ac97 && strcmp(codec->name, "AC97") != 0) {
|
||||
ret = soc_ac97_dev_register(codec);
|
||||
if (ret < 0) {
|
||||
printk(KERN_ERR "asoc: AC97 device register failed\n");
|
||||
|
|
Loading…
Reference in a new issue