Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (89 commits)
  bonding: documentation and code cleanup for resend_igmp
  bonding: prevent deadlock on slave store with alb mode (v3)
  net: hold rtnl again in dump callbacks
  Add Fujitsu 1000base-SX PCI ID to tg3
  bnx2x: protect sequence increment with mutex
  sch_sfq: fix peek() implementation
  isdn: netjet - blacklist Digium TDM400P
  via-velocity: don't annotate MAC registers as packed
  xen: netfront: hold RTNL when updating features.
  sctp: fix memory leak of the ASCONF queue when free asoc
  net: make dev_disable_lro use physical device if passed a vlan dev (v2)
  net: move is_vlan_dev into public header file (v2)
  bug.h: Fix build with CONFIG_PRINTK disabled.
  wireless: fix fatal kernel-doc error + warning in mac80211.h
  wireless: fix cfg80211.h new kernel-doc warnings
  iwlagn: dbg_fixed_rate only used when CONFIG_MAC80211_DEBUGFS enabled
  dst: catch uninitialized metrics
  be2net: hash key for rss-config cmd not set
  bridge: initialize fake_rtable metrics
  net: fix __dst_destroy_metrics_generic()
  ...

Fix up trivial conflicts in drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
This commit is contained in:
Linus Torvalds
2011-05-25 17:00:17 -07:00
187 changed files with 2047 additions and 1201 deletions
+11 -2
View File
@@ -770,8 +770,17 @@ resend_igmp
a failover event. One membership report is issued immediately after a failover event. One membership report is issued immediately after
the failover, subsequent packets are sent in each 200ms interval. the failover, subsequent packets are sent in each 200ms interval.
The valid range is 0 - 255; the default value is 1. This option The valid range is 0 - 255; the default value is 1. A value of 0
was added for bonding version 3.7.0. prevents the IGMP membership report from being issued in response
to the failover event.
This option is useful for bonding modes balance-rr (0), active-backup
(1), balance-tlb (5) and balance-alb (6), in which a failover can
switch the IGMP traffic from one slave to another. Therefore a fresh
IGMP report must be issued to cause the switch to forward the incoming
IGMP traffic over the newly selected slave.
This option was added for bonding version 3.7.0.
3. Configuring Bonding Devices 3. Configuring Bonding Devices
============================== ==============================
+1
View File
@@ -171,6 +171,7 @@ static void bcma_host_pci_remove(struct pci_dev *dev)
} }
static DEFINE_PCI_DEVICE_TABLE(bcma_pci_bridge_tbl) = { static DEFINE_PCI_DEVICE_TABLE(bcma_pci_bridge_tbl) = {
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x0576) },
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4331) }, { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4331) },
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4353) }, { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4353) },
{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4727) }, { PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4727) },
+6
View File
@@ -1072,6 +1072,12 @@ nj_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
return -ENODEV; return -ENODEV;
} }
if (pdev->subsystem_vendor == 0xb100 &&
pdev->subsystem_device == 0x0003 ) {
pr_notice("Netjet: Digium TDM400P not handled yet\n");
return -ENODEV;
}
card = kzalloc(sizeof(struct tiger_hw), GFP_ATOMIC); card = kzalloc(sizeof(struct tiger_hw), GFP_ATOMIC);
if (!card) { if (!card) {
pr_info("No kmem for Netjet\n"); pr_info("No kmem for Netjet\n");
+2 -1
View File
@@ -1703,7 +1703,8 @@ int be_cmd_rss_config(struct be_adapter *adapter, u8 *rsstable, u16 table_size)
{ {
struct be_mcc_wrb *wrb; struct be_mcc_wrb *wrb;
struct be_cmd_req_rss_config *req; struct be_cmd_req_rss_config *req;
u32 myhash[10]; u32 myhash[10] = {0x0123, 0x4567, 0x89AB, 0xCDEF, 0x01EF,
0x0123, 0x4567, 0x89AB, 0xCDEF, 0x01EF};
int status; int status;
if (mutex_lock_interruptible(&adapter->mbox_lock)) if (mutex_lock_interruptible(&adapter->mbox_lock))
+1 -1
View File
@@ -2675,7 +2675,7 @@ alloc_mem_err:
* Min size diferent for TPA and non-TPA queues * Min size diferent for TPA and non-TPA queues
*/ */
if (ring_size < (fp->disable_tpa ? if (ring_size < (fp->disable_tpa ?
MIN_RX_SIZE_TPA : MIN_RX_SIZE_NONTPA)) { MIN_RX_SIZE_NONTPA : MIN_RX_SIZE_TPA)) {
/* release memory allocated for this queue */ /* release memory allocated for this queue */
bnx2x_free_fp_mem_at(bp, index); bnx2x_free_fp_mem_at(bp, index);
return -ENOMEM; return -ENOMEM;
+2 -1
View File
@@ -2222,12 +2222,13 @@ static void bnx2x_pmf_update(struct bnx2x *bp)
u32 bnx2x_fw_command(struct bnx2x *bp, u32 command, u32 param) u32 bnx2x_fw_command(struct bnx2x *bp, u32 command, u32 param)
{ {
int mb_idx = BP_FW_MB_IDX(bp); int mb_idx = BP_FW_MB_IDX(bp);
u32 seq = ++bp->fw_seq; u32 seq;
u32 rc = 0; u32 rc = 0;
u32 cnt = 1; u32 cnt = 1;
u8 delay = CHIP_REV_IS_SLOW(bp) ? 100 : 10; u8 delay = CHIP_REV_IS_SLOW(bp) ? 100 : 10;
mutex_lock(&bp->fw_mb_mutex); mutex_lock(&bp->fw_mb_mutex);
seq = ++bp->fw_seq;
SHMEM_WR(bp, func_mb[mb_idx].drv_mb_param, param); SHMEM_WR(bp, func_mb[mb_idx].drv_mb_param, param);
SHMEM_WR(bp, func_mb[mb_idx].drv_mb_header, (command | seq)); SHMEM_WR(bp, func_mb[mb_idx].drv_mb_header, (command | seq));
-4
View File
@@ -163,8 +163,6 @@ static int tlb_initialize(struct bonding *bond)
struct tlb_client_info *new_hashtbl; struct tlb_client_info *new_hashtbl;
int i; int i;
spin_lock_init(&(bond_info->tx_hashtbl_lock));
new_hashtbl = kzalloc(size, GFP_KERNEL); new_hashtbl = kzalloc(size, GFP_KERNEL);
if (!new_hashtbl) { if (!new_hashtbl) {
pr_err("%s: Error: Failed to allocate TLB hash table\n", pr_err("%s: Error: Failed to allocate TLB hash table\n",
@@ -747,8 +745,6 @@ static int rlb_initialize(struct bonding *bond)
int size = RLB_HASH_TABLE_SIZE * sizeof(struct rlb_client_info); int size = RLB_HASH_TABLE_SIZE * sizeof(struct rlb_client_info);
int i; int i;
spin_lock_init(&(bond_info->rx_hashtbl_lock));
new_hashtbl = kmalloc(size, GFP_KERNEL); new_hashtbl = kmalloc(size, GFP_KERNEL);
if (!new_hashtbl) { if (!new_hashtbl) {
pr_err("%s: Error: Failed to allocate RLB hash table\n", pr_err("%s: Error: Failed to allocate RLB hash table\n",
+17 -11
View File
@@ -852,7 +852,7 @@ static void bond_resend_igmp_join_requests(struct bonding *bond)
static void bond_resend_igmp_join_requests_delayed(struct work_struct *work) static void bond_resend_igmp_join_requests_delayed(struct work_struct *work)
{ {
struct bonding *bond = container_of(work, struct bonding, struct bonding *bond = container_of(work, struct bonding,
mcast_work.work); mcast_work.work);
bond_resend_igmp_join_requests(bond); bond_resend_igmp_join_requests(bond);
} }
@@ -1172,10 +1172,12 @@ void bond_change_active_slave(struct bonding *bond, struct slave *new_active)
} }
/* resend IGMP joins since active slave has changed or /* resend IGMP joins since active slave has changed or
* all were sent on curr_active_slave */ * all were sent on curr_active_slave.
if (((USES_PRIMARY(bond->params.mode) && new_active) || * resend only if bond is brought up with the affected
bond->params.mode == BOND_MODE_ROUNDROBIN) && * bonding modes and the retransmission is enabled */
netif_running(bond->dev)) { if (netif_running(bond->dev) && (bond->params.resend_igmp > 0) &&
((USES_PRIMARY(bond->params.mode) && new_active) ||
bond->params.mode == BOND_MODE_ROUNDROBIN)) {
bond->igmp_retrans = bond->params.resend_igmp; bond->igmp_retrans = bond->params.resend_igmp;
queue_delayed_work(bond->wq, &bond->mcast_work, 0); queue_delayed_work(bond->wq, &bond->mcast_work, 0);
} }
@@ -1542,12 +1544,6 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
bond_dev->name, slave_dev->name); bond_dev->name, slave_dev->name);
} }
/* bond must be initialized by bond_open() before enslaving */
if (!(bond_dev->flags & IFF_UP)) {
pr_warning("%s: master_dev is not up in bond_enslave\n",
bond_dev->name);
}
/* already enslaved */ /* already enslaved */
if (slave_dev->flags & IFF_SLAVE) { if (slave_dev->flags & IFF_SLAVE) {
pr_debug("Error, Device was already enslaved\n"); pr_debug("Error, Device was already enslaved\n");
@@ -4834,9 +4830,19 @@ static int bond_init(struct net_device *bond_dev)
{ {
struct bonding *bond = netdev_priv(bond_dev); struct bonding *bond = netdev_priv(bond_dev);
struct bond_net *bn = net_generic(dev_net(bond_dev), bond_net_id); struct bond_net *bn = net_generic(dev_net(bond_dev), bond_net_id);
struct alb_bond_info *bond_info = &(BOND_ALB_INFO(bond));
pr_debug("Begin bond_init for %s\n", bond_dev->name); pr_debug("Begin bond_init for %s\n", bond_dev->name);
/*
* Initialize locks that may be required during
* en/deslave operations. All of the bond_open work
* (of which this is part) should really be moved to
* a phase prior to dev_open
*/
spin_lock_init(&(bond_info->tx_hashtbl_lock));
spin_lock_init(&(bond_info->rx_hashtbl_lock));
bond->wq = create_singlethread_workqueue(bond_dev->name); bond->wq = create_singlethread_workqueue(bond_dev->name);
if (!bond->wq) if (!bond->wq)
return -ENOMEM; return -ENOMEM;
+5 -11
View File
@@ -227,12 +227,6 @@ static ssize_t bonding_store_slaves(struct device *d,
struct net_device *dev; struct net_device *dev;
struct bonding *bond = to_bond(d); struct bonding *bond = to_bond(d);
/* Quick sanity check -- is the bond interface up? */
if (!(bond->dev->flags & IFF_UP)) {
pr_warning("%s: doing slave updates when interface is down.\n",
bond->dev->name);
}
if (!rtnl_trylock()) if (!rtnl_trylock())
return restart_syscall(); return restart_syscall();
@@ -1539,8 +1533,8 @@ static DEVICE_ATTR(all_slaves_active, S_IRUGO | S_IWUSR,
* Show and set the number of IGMP membership reports to send on link failure * Show and set the number of IGMP membership reports to send on link failure
*/ */
static ssize_t bonding_show_resend_igmp(struct device *d, static ssize_t bonding_show_resend_igmp(struct device *d,
struct device_attribute *attr, struct device_attribute *attr,
char *buf) char *buf)
{ {
struct bonding *bond = to_bond(d); struct bonding *bond = to_bond(d);
@@ -1548,8 +1542,8 @@ static ssize_t bonding_show_resend_igmp(struct device *d,
} }
static ssize_t bonding_store_resend_igmp(struct device *d, static ssize_t bonding_store_resend_igmp(struct device *d,
struct device_attribute *attr, struct device_attribute *attr,
const char *buf, size_t count) const char *buf, size_t count)
{ {
int new_value, ret = count; int new_value, ret = count;
struct bonding *bond = to_bond(d); struct bonding *bond = to_bond(d);
@@ -1561,7 +1555,7 @@ static ssize_t bonding_store_resend_igmp(struct device *d,
goto out; goto out;
} }
if (new_value < 0) { if (new_value < 0 || new_value > 255) {
pr_err("%s: Invalid resend_igmp value %d not in range 0-255; rejected.\n", pr_err("%s: Invalid resend_igmp value %d not in range 0-255; rejected.\n",
bond->dev->name, new_value); bond->dev->name, new_value);
ret = -EINVAL; ret = -EINVAL;
+1 -1
View File
@@ -2083,7 +2083,7 @@ static void ehea_set_multicast_list(struct net_device *dev)
struct netdev_hw_addr *ha; struct netdev_hw_addr *ha;
int ret; int ret;
if (dev->flags & IFF_PROMISC) { if (port->promisc) {
ehea_promiscuous(dev, 1); ehea_promiscuous(dev, 1);
return; return;
} }
+29 -30
View File
@@ -67,27 +67,27 @@ static void bfin_sir_stop_tx(struct bfin_sir_port *port)
disable_dma(port->tx_dma_channel); disable_dma(port->tx_dma_channel);
#endif #endif
while (!(SIR_UART_GET_LSR(port) & THRE)) { while (!(UART_GET_LSR(port) & THRE)) {
cpu_relax(); cpu_relax();
continue; continue;
} }
SIR_UART_STOP_TX(port); UART_CLEAR_IER(port, ETBEI);
} }
static void bfin_sir_enable_tx(struct bfin_sir_port *port) static void bfin_sir_enable_tx(struct bfin_sir_port *port)
{ {
SIR_UART_ENABLE_TX(port); UART_SET_IER(port, ETBEI);
} }
static void bfin_sir_stop_rx(struct bfin_sir_port *port) static void bfin_sir_stop_rx(struct bfin_sir_port *port)
{ {
SIR_UART_STOP_RX(port); UART_CLEAR_IER(port, ERBFI);
} }
static void bfin_sir_enable_rx(struct bfin_sir_port *port) static void bfin_sir_enable_rx(struct bfin_sir_port *port)
{ {
SIR_UART_ENABLE_RX(port); UART_SET_IER(port, ERBFI);
} }
static int bfin_sir_set_speed(struct bfin_sir_port *port, int speed) static int bfin_sir_set_speed(struct bfin_sir_port *port, int speed)
@@ -116,7 +116,7 @@ static int bfin_sir_set_speed(struct bfin_sir_port *port, int speed)
do { do {
udelay(utime); udelay(utime);
lsr = SIR_UART_GET_LSR(port); lsr = UART_GET_LSR(port);
} while (!(lsr & TEMT) && count--); } while (!(lsr & TEMT) && count--);
/* The useconds for 1 bits to transmit */ /* The useconds for 1 bits to transmit */
@@ -125,27 +125,27 @@ static int bfin_sir_set_speed(struct bfin_sir_port *port, int speed)
/* Clear UCEN bit to reset the UART state machine /* Clear UCEN bit to reset the UART state machine
* and control registers * and control registers
*/ */
val = SIR_UART_GET_GCTL(port); val = UART_GET_GCTL(port);
val &= ~UCEN; val &= ~UCEN;
SIR_UART_PUT_GCTL(port, val); UART_PUT_GCTL(port, val);
/* Set DLAB in LCR to Access THR RBR IER */ /* Set DLAB in LCR to Access THR RBR IER */
SIR_UART_SET_DLAB(port); UART_SET_DLAB(port);
SSYNC(); SSYNC();
SIR_UART_PUT_DLL(port, quot & 0xFF); UART_PUT_DLL(port, quot & 0xFF);
SIR_UART_PUT_DLH(port, (quot >> 8) & 0xFF); UART_PUT_DLH(port, (quot >> 8) & 0xFF);
SSYNC(); SSYNC();
/* Clear DLAB in LCR */ /* Clear DLAB in LCR */
SIR_UART_CLEAR_DLAB(port); UART_CLEAR_DLAB(port);
SSYNC(); SSYNC();
SIR_UART_PUT_LCR(port, lcr); UART_PUT_LCR(port, lcr);
val = SIR_UART_GET_GCTL(port); val = UART_GET_GCTL(port);
val |= UCEN; val |= UCEN;
SIR_UART_PUT_GCTL(port, val); UART_PUT_GCTL(port, val);
ret = 0; ret = 0;
break; break;
@@ -154,12 +154,12 @@ static int bfin_sir_set_speed(struct bfin_sir_port *port, int speed)
break; break;
} }
val = SIR_UART_GET_GCTL(port); val = UART_GET_GCTL(port);
/* If not add the 'RPOLC', we can't catch the receive interrupt. /* If not add the 'RPOLC', we can't catch the receive interrupt.
* It's related with the HW layout and the IR transiver. * It's related with the HW layout and the IR transiver.
*/ */
val |= IREN | RPOLC; val |= IREN | RPOLC;
SIR_UART_PUT_GCTL(port, val); UART_PUT_GCTL(port, val);
return ret; return ret;
} }
@@ -168,7 +168,7 @@ static int bfin_sir_is_receiving(struct net_device *dev)
struct bfin_sir_self *self = netdev_priv(dev); struct bfin_sir_self *self = netdev_priv(dev);
struct bfin_sir_port *port = self->sir_port; struct bfin_sir_port *port = self->sir_port;
if (!(SIR_UART_GET_IER(port) & ERBFI)) if (!(UART_GET_IER(port) & ERBFI))
return 0; return 0;
return self->rx_buff.state != OUTSIDE_FRAME; return self->rx_buff.state != OUTSIDE_FRAME;
} }
@@ -182,7 +182,7 @@ static void bfin_sir_tx_chars(struct net_device *dev)
if (self->tx_buff.len != 0) { if (self->tx_buff.len != 0) {
chr = *(self->tx_buff.data); chr = *(self->tx_buff.data);
SIR_UART_PUT_CHAR(port, chr); UART_PUT_CHAR(port, chr);
self->tx_buff.data++; self->tx_buff.data++;
self->tx_buff.len--; self->tx_buff.len--;
} else { } else {
@@ -206,8 +206,8 @@ static void bfin_sir_rx_chars(struct net_device *dev)
struct bfin_sir_port *port = self->sir_port; struct bfin_sir_port *port = self->sir_port;
unsigned char ch; unsigned char ch;
SIR_UART_CLEAR_LSR(port); UART_CLEAR_LSR(port);
ch = SIR_UART_GET_CHAR(port); ch = UART_GET_CHAR(port);
async_unwrap_char(dev, &self->stats, &self->rx_buff, ch); async_unwrap_char(dev, &self->stats, &self->rx_buff, ch);
dev->last_rx = jiffies; dev->last_rx = jiffies;
} }
@@ -219,7 +219,7 @@ static irqreturn_t bfin_sir_rx_int(int irq, void *dev_id)
struct bfin_sir_port *port = self->sir_port; struct bfin_sir_port *port = self->sir_port;
spin_lock(&self->lock); spin_lock(&self->lock);
while ((SIR_UART_GET_LSR(port) & DR)) while ((UART_GET_LSR(port) & DR))
bfin_sir_rx_chars(dev); bfin_sir_rx_chars(dev);
spin_unlock(&self->lock); spin_unlock(&self->lock);
@@ -233,7 +233,7 @@ static irqreturn_t bfin_sir_tx_int(int irq, void *dev_id)
struct bfin_sir_port *port = self->sir_port; struct bfin_sir_port *port = self->sir_port;
spin_lock(&self->lock); spin_lock(&self->lock);
if (SIR_UART_GET_LSR(port) & THRE) if (UART_GET_LSR(port) & THRE)
bfin_sir_tx_chars(dev); bfin_sir_tx_chars(dev);
spin_unlock(&self->lock); spin_unlock(&self->lock);
@@ -312,7 +312,7 @@ static void bfin_sir_dma_rx_chars(struct net_device *dev)
struct bfin_sir_port *port = self->sir_port; struct bfin_sir_port *port = self->sir_port;
int i; int i;
SIR_UART_CLEAR_LSR(port); UART_CLEAR_LSR(port);
for (i = port->rx_dma_buf.head; i < port->rx_dma_buf.tail; i++) for (i = port->rx_dma_buf.head; i < port->rx_dma_buf.tail; i++)
async_unwrap_char(dev, &self->stats, &self->rx_buff, port->rx_dma_buf.buf[i]); async_unwrap_char(dev, &self->stats, &self->rx_buff, port->rx_dma_buf.buf[i]);
@@ -430,11 +430,10 @@ static void bfin_sir_shutdown(struct bfin_sir_port *port, struct net_device *dev
unsigned short val; unsigned short val;
bfin_sir_stop_rx(port); bfin_sir_stop_rx(port);
SIR_UART_DISABLE_INTS(port);
val = SIR_UART_GET_GCTL(port); val = UART_GET_GCTL(port);
val &= ~(UCEN | IREN | RPOLC); val &= ~(UCEN | IREN | RPOLC);
SIR_UART_PUT_GCTL(port, val); UART_PUT_GCTL(port, val);
#ifdef CONFIG_SIR_BFIN_DMA #ifdef CONFIG_SIR_BFIN_DMA
disable_dma(port->tx_dma_channel); disable_dma(port->tx_dma_channel);
@@ -518,12 +517,12 @@ static void bfin_sir_send_work(struct work_struct *work)
* sending data. We also can set the speed, which will * sending data. We also can set the speed, which will
* reset all the UART. * reset all the UART.
*/ */
val = SIR_UART_GET_GCTL(port); val = UART_GET_GCTL(port);
val &= ~(IREN | RPOLC); val &= ~(IREN | RPOLC);
SIR_UART_PUT_GCTL(port, val); UART_PUT_GCTL(port, val);
SSYNC(); SSYNC();
val |= IREN | RPOLC; val |= IREN | RPOLC;
SIR_UART_PUT_GCTL(port, val); UART_PUT_GCTL(port, val);
SSYNC(); SSYNC();
/* bfin_sir_set_speed(port, self->speed); */ /* bfin_sir_set_speed(port, self->speed); */
+4 -59
View File
@@ -26,7 +26,6 @@
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/portmux.h> #include <asm/portmux.h>
#include <mach/bfin_serial_5xx.h>
#undef DRIVER_NAME #undef DRIVER_NAME
#ifdef CONFIG_SIR_BFIN_DMA #ifdef CONFIG_SIR_BFIN_DMA
@@ -83,64 +82,10 @@ struct bfin_sir_self {
#define DRIVER_NAME "bfin_sir" #define DRIVER_NAME "bfin_sir"
#define SIR_UART_GET_CHAR(port) bfin_read16((port)->membase + OFFSET_RBR) #define port_membase(port) (((struct bfin_sir_port *)(port))->membase)
#define SIR_UART_GET_DLL(port) bfin_read16((port)->membase + OFFSET_DLL) #define get_lsr_cache(port) (((struct bfin_sir_port *)(port))->lsr)
#define SIR_UART_GET_DLH(port) bfin_read16((port)->membase + OFFSET_DLH) #define put_lsr_cache(port, v) (((struct bfin_sir_port *)(port))->lsr = (v))
#define SIR_UART_GET_LCR(port) bfin_read16((port)->membase + OFFSET_LCR) #include <asm/bfin_serial.h>
#define SIR_UART_GET_GCTL(port) bfin_read16((port)->membase + OFFSET_GCTL)
#define SIR_UART_PUT_CHAR(port, v) bfin_write16(((port)->membase + OFFSET_THR), v)
#define SIR_UART_PUT_DLL(port, v) bfin_write16(((port)->membase + OFFSET_DLL), v)
#define SIR_UART_PUT_DLH(port, v) bfin_write16(((port)->membase + OFFSET_DLH), v)
#define SIR_UART_PUT_LCR(port, v) bfin_write16(((port)->membase + OFFSET_LCR), v)
#define SIR_UART_PUT_GCTL(port, v) bfin_write16(((port)->membase + OFFSET_GCTL), v)
#ifdef CONFIG_BF54x
#define SIR_UART_GET_LSR(port) bfin_read16((port)->membase + OFFSET_LSR)
#define SIR_UART_GET_IER(port) bfin_read16((port)->membase + OFFSET_IER_SET)
#define SIR_UART_SET_IER(port, v) bfin_write16(((port)->membase + OFFSET_IER_SET), v)
#define SIR_UART_CLEAR_IER(port, v) bfin_write16(((port)->membase + OFFSET_IER_CLEAR), v)
#define SIR_UART_PUT_LSR(port, v) bfin_write16(((port)->membase + OFFSET_LSR), v)
#define SIR_UART_CLEAR_LSR(port) bfin_write16(((port)->membase + OFFSET_LSR), -1)
#define SIR_UART_SET_DLAB(port)
#define SIR_UART_CLEAR_DLAB(port)
#define SIR_UART_ENABLE_INTS(port, v) SIR_UART_SET_IER(port, v)
#define SIR_UART_DISABLE_INTS(port) SIR_UART_CLEAR_IER(port, 0xF)
#define SIR_UART_STOP_TX(port) do { SIR_UART_PUT_LSR(port, TFI); SIR_UART_CLEAR_IER(port, ETBEI); } while (0)
#define SIR_UART_ENABLE_TX(port) do { SIR_UART_SET_IER(port, ETBEI); } while (0)
#define SIR_UART_STOP_RX(port) do { SIR_UART_CLEAR_IER(port, ERBFI); } while (0)
#define SIR_UART_ENABLE_RX(port) do { SIR_UART_SET_IER(port, ERBFI); } while (0)
#else
#define SIR_UART_GET_IIR(port) bfin_read16((port)->membase + OFFSET_IIR)
#define SIR_UART_GET_IER(port) bfin_read16((port)->membase + OFFSET_IER)
#define SIR_UART_PUT_IER(port, v) bfin_write16(((port)->membase + OFFSET_IER), v)
#define SIR_UART_SET_DLAB(port) do { SIR_UART_PUT_LCR(port, SIR_UART_GET_LCR(port) | DLAB); } while (0)
#define SIR_UART_CLEAR_DLAB(port) do { SIR_UART_PUT_LCR(port, SIR_UART_GET_LCR(port) & ~DLAB); } while (0)
#define SIR_UART_ENABLE_INTS(port, v) SIR_UART_PUT_IER(port, v)
#define SIR_UART_DISABLE_INTS(port) SIR_UART_PUT_IER(port, 0)
#define SIR_UART_STOP_TX(port) do { SIR_UART_PUT_IER(port, SIR_UART_GET_IER(port) & ~ETBEI); } while (0)
#define SIR_UART_ENABLE_TX(port) do { SIR_UART_PUT_IER(port, SIR_UART_GET_IER(port) | ETBEI); } while (0)
#define SIR_UART_STOP_RX(port) do { SIR_UART_PUT_IER(port, SIR_UART_GET_IER(port) & ~ERBFI); } while (0)
#define SIR_UART_ENABLE_RX(port) do { SIR_UART_PUT_IER(port, SIR_UART_GET_IER(port) | ERBFI); } while (0)
static inline unsigned int SIR_UART_GET_LSR(struct bfin_sir_port *port)
{
unsigned int lsr = bfin_read16(port->membase + OFFSET_LSR);
port->lsr |= (lsr & (BI|FE|PE|OE));
return lsr | port->lsr;
}
static inline void SIR_UART_CLEAR_LSR(struct bfin_sir_port *port)
{
port->lsr = 0;
bfin_read16(port->membase + OFFSET_LSR);
}
#endif
static const unsigned short per[][4] = { static const unsigned short per[][4] = {
/* rx pin tx pin NULL uart_number */ /* rx pin tx pin NULL uart_number */
+1
View File
@@ -292,6 +292,7 @@ static DEFINE_PCI_DEVICE_TABLE(tg3_pci_tbl) = {
{PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1003)}, {PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC1003)},
{PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC9100)}, {PCI_DEVICE(PCI_VENDOR_ID_ALTIMA, PCI_DEVICE_ID_ALTIMA_AC9100)},
{PCI_DEVICE(PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_TIGON3)}, {PCI_DEVICE(PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_TIGON3)},
{PCI_DEVICE(0x10cf, 0x11a2)}, /* Fujitsu 1000base-SX with BCM5703SKHB */
{} {}
}; };
+25 -48
View File
@@ -54,7 +54,7 @@
#include <linux/usb/usbnet.h> #include <linux/usb/usbnet.h>
#include <linux/usb/cdc.h> #include <linux/usb/cdc.h>
#define DRIVER_VERSION "06-May-2011" #define DRIVER_VERSION "24-May-2011"
/* CDC NCM subclass 3.2.1 */ /* CDC NCM subclass 3.2.1 */
#define USB_CDC_NCM_NDP16_LENGTH_MIN 0x10 #define USB_CDC_NCM_NDP16_LENGTH_MIN 0x10
@@ -134,8 +134,6 @@ struct cdc_ncm_ctx {
u16 tx_ndp_modulus; u16 tx_ndp_modulus;
u16 tx_seq; u16 tx_seq;
u16 connected; u16 connected;
u8 data_claimed;
u8 control_claimed;
}; };
static void cdc_ncm_tx_timeout(unsigned long arg); static void cdc_ncm_tx_timeout(unsigned long arg);
@@ -460,17 +458,6 @@ static void cdc_ncm_free(struct cdc_ncm_ctx *ctx)
del_timer_sync(&ctx->tx_timer); del_timer_sync(&ctx->tx_timer);
if (ctx->data_claimed) {
usb_set_intfdata(ctx->data, NULL);
usb_driver_release_interface(driver_of(ctx->intf), ctx->data);
}
if (ctx->control_claimed) {
usb_set_intfdata(ctx->control, NULL);
usb_driver_release_interface(driver_of(ctx->intf),
ctx->control);
}
if (ctx->tx_rem_skb != NULL) { if (ctx->tx_rem_skb != NULL) {
dev_kfree_skb_any(ctx->tx_rem_skb); dev_kfree_skb_any(ctx->tx_rem_skb);
ctx->tx_rem_skb = NULL; ctx->tx_rem_skb = NULL;
@@ -495,7 +482,7 @@ static int cdc_ncm_bind(struct usbnet *dev, struct usb_interface *intf)
ctx = kmalloc(sizeof(*ctx), GFP_KERNEL); ctx = kmalloc(sizeof(*ctx), GFP_KERNEL);
if (ctx == NULL) if (ctx == NULL)
goto error; return -ENODEV;
memset(ctx, 0, sizeof(*ctx)); memset(ctx, 0, sizeof(*ctx));
@@ -568,46 +555,36 @@ advance:
/* check if we got everything */ /* check if we got everything */
if ((ctx->control == NULL) || (ctx->data == NULL) || if ((ctx->control == NULL) || (ctx->data == NULL) ||
(ctx->ether_desc == NULL)) (ctx->ether_desc == NULL) || (ctx->control != intf))
goto error; goto error;
/* claim interfaces, if any */ /* claim interfaces, if any */
if (ctx->data != intf) { temp = usb_driver_claim_interface(driver, ctx->data, dev);
temp = usb_driver_claim_interface(driver, ctx->data, dev); if (temp)
if (temp) goto error;
goto error;
ctx->data_claimed = 1;
}
if (ctx->control != intf) {
temp = usb_driver_claim_interface(driver, ctx->control, dev);
if (temp)
goto error;
ctx->control_claimed = 1;
}
iface_no = ctx->data->cur_altsetting->desc.bInterfaceNumber; iface_no = ctx->data->cur_altsetting->desc.bInterfaceNumber;
/* reset data interface */ /* reset data interface */
temp = usb_set_interface(dev->udev, iface_no, 0); temp = usb_set_interface(dev->udev, iface_no, 0);
if (temp) if (temp)
goto error; goto error2;
/* initialize data interface */ /* initialize data interface */
if (cdc_ncm_setup(ctx)) if (cdc_ncm_setup(ctx))
goto error; goto error2;
/* configure data interface */ /* configure data interface */
temp = usb_set_interface(dev->udev, iface_no, 1); temp = usb_set_interface(dev->udev, iface_no, 1);
if (temp) if (temp)
goto error; goto error2;
cdc_ncm_find_endpoints(ctx, ctx->data); cdc_ncm_find_endpoints(ctx, ctx->data);
cdc_ncm_find_endpoints(ctx, ctx->control); cdc_ncm_find_endpoints(ctx, ctx->control);
if ((ctx->in_ep == NULL) || (ctx->out_ep == NULL) || if ((ctx->in_ep == NULL) || (ctx->out_ep == NULL) ||
(ctx->status_ep == NULL)) (ctx->status_ep == NULL))
goto error; goto error2;
dev->net->ethtool_ops = &cdc_ncm_ethtool_ops; dev->net->ethtool_ops = &cdc_ncm_ethtool_ops;
@@ -617,7 +594,7 @@ advance:
temp = usbnet_get_ethernet_addr(dev, ctx->ether_desc->iMACAddress); temp = usbnet_get_ethernet_addr(dev, ctx->ether_desc->iMACAddress);
if (temp) if (temp)
goto error; goto error2;
dev_info(&dev->udev->dev, "MAC-Address: " dev_info(&dev->udev->dev, "MAC-Address: "
"0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n", "0x%02x:0x%02x:0x%02x:0x%02x:0x%02x:0x%02x\n",
@@ -642,38 +619,38 @@ advance:
ctx->tx_speed = ctx->rx_speed = 0; ctx->tx_speed = ctx->rx_speed = 0;
return 0; return 0;
error2:
usb_set_intfdata(ctx->control, NULL);
usb_set_intfdata(ctx->data, NULL);
usb_driver_release_interface(driver, ctx->data);
error: error:
cdc_ncm_free((struct cdc_ncm_ctx *)dev->data[0]); cdc_ncm_free((struct cdc_ncm_ctx *)dev->data[0]);
dev->data[0] = 0; dev->data[0] = 0;
dev_info(&dev->udev->dev, "Descriptor failure\n"); dev_info(&dev->udev->dev, "bind() failure\n");
return -ENODEV; return -ENODEV;
} }
static void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf) static void cdc_ncm_unbind(struct usbnet *dev, struct usb_interface *intf)
{ {
struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0]; struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0];
struct usb_driver *driver; struct usb_driver *driver = driver_of(intf);
if (ctx == NULL) if (ctx == NULL)
return; /* no setup */ return; /* no setup */
driver = driver_of(intf); /* disconnect master --> disconnect slave */
if (intf == ctx->control && ctx->data) {
usb_set_intfdata(ctx->data, NULL); usb_set_intfdata(ctx->data, NULL);
usb_set_intfdata(ctx->control, NULL);
usb_set_intfdata(ctx->intf, NULL);
/* release interfaces, if any */
if (ctx->data_claimed) {
usb_driver_release_interface(driver, ctx->data); usb_driver_release_interface(driver, ctx->data);
ctx->data_claimed = 0; ctx->data = NULL;
}
if (ctx->control_claimed) { } else if (intf == ctx->data && ctx->control) {
usb_set_intfdata(ctx->control, NULL);
usb_driver_release_interface(driver, ctx->control); usb_driver_release_interface(driver, ctx->control);
ctx->control_claimed = 0; ctx->control = NULL;
} }
usb_set_intfdata(ctx->intf, NULL);
cdc_ncm_free(ctx); cdc_ncm_free(ctx);
} }
+1 -1
View File
@@ -1096,7 +1096,7 @@ struct mac_regs {
volatile __le16 PatternCRC[8]; /* 0xB0 */ volatile __le16 PatternCRC[8]; /* 0xB0 */
volatile __le32 ByteMask[4][4]; /* 0xC0 */ volatile __le32 ByteMask[4][4]; /* 0xC0 */
} __packed; };
enum hw_mib { enum hw_mib {
+11 -22
View File
@@ -4501,17 +4501,15 @@ static int setup_proc_entry( struct net_device *dev,
struct proc_dir_entry *entry; struct proc_dir_entry *entry;
/* First setup the device directory */ /* First setup the device directory */
strcpy(apriv->proc_name,dev->name); strcpy(apriv->proc_name,dev->name);
apriv->proc_entry = create_proc_entry(apriv->proc_name, apriv->proc_entry = proc_mkdir_mode(apriv->proc_name, airo_perm,
S_IFDIR|airo_perm, airo_entry);
airo_entry);
if (!apriv->proc_entry) if (!apriv->proc_entry)
goto fail; goto fail;
apriv->proc_entry->uid = proc_uid; apriv->proc_entry->uid = proc_uid;
apriv->proc_entry->gid = proc_gid; apriv->proc_entry->gid = proc_gid;
/* Setup the StatsDelta */ /* Setup the StatsDelta */
entry = proc_create_data("StatsDelta", entry = proc_create_data("StatsDelta", S_IRUGO & proc_perm,
S_IFREG | (S_IRUGO&proc_perm),
apriv->proc_entry, &proc_statsdelta_ops, dev); apriv->proc_entry, &proc_statsdelta_ops, dev);
if (!entry) if (!entry)
goto fail_stats_delta; goto fail_stats_delta;
@@ -4519,8 +4517,7 @@ static int setup_proc_entry( struct net_device *dev,
entry->gid = proc_gid; entry->gid = proc_gid;
/* Setup the Stats */ /* Setup the Stats */
entry = proc_create_data("Stats", entry = proc_create_data("Stats", S_IRUGO & proc_perm,
S_IFREG | (S_IRUGO&proc_perm),
apriv->proc_entry, &proc_stats_ops, dev); apriv->proc_entry, &proc_stats_ops, dev);
if (!entry) if (!entry)
goto fail_stats; goto fail_stats;
@@ -4528,8 +4525,7 @@ static int setup_proc_entry( struct net_device *dev,
entry->gid = proc_gid; entry->gid = proc_gid;
/* Setup the Status */ /* Setup the Status */
entry = proc_create_data("Status", entry = proc_create_data("Status", S_IRUGO & proc_perm,
S_IFREG | (S_IRUGO&proc_perm),
apriv->proc_entry, &proc_status_ops, dev); apriv->proc_entry, &proc_status_ops, dev);
if (!entry) if (!entry)
goto fail_status; goto fail_status;
@@ -4537,8 +4533,7 @@ static int setup_proc_entry( struct net_device *dev,
entry->gid = proc_gid; entry->gid = proc_gid;
/* Setup the Config */ /* Setup the Config */
entry = proc_create_data("Config", entry = proc_create_data("Config", proc_perm,
S_IFREG | proc_perm,
apriv->proc_entry, &proc_config_ops, dev); apriv->proc_entry, &proc_config_ops, dev);
if (!entry) if (!entry)
goto fail_config; goto fail_config;
@@ -4546,8 +4541,7 @@ static int setup_proc_entry( struct net_device *dev,
entry->gid = proc_gid; entry->gid = proc_gid;
/* Setup the SSID */ /* Setup the SSID */
entry = proc_create_data("SSID", entry = proc_create_data("SSID", proc_perm,
S_IFREG | proc_perm,
apriv->proc_entry, &proc_SSID_ops, dev); apriv->proc_entry, &proc_SSID_ops, dev);
if (!entry) if (!entry)
goto fail_ssid; goto fail_ssid;
@@ -4555,8 +4549,7 @@ static int setup_proc_entry( struct net_device *dev,
entry->gid = proc_gid; entry->gid = proc_gid;
/* Setup the APList */ /* Setup the APList */
entry = proc_create_data("APList", entry = proc_create_data("APList", proc_perm,
S_IFREG | proc_perm,
apriv->proc_entry, &proc_APList_ops, dev); apriv->proc_entry, &proc_APList_ops, dev);
if (!entry) if (!entry)
goto fail_aplist; goto fail_aplist;
@@ -4564,8 +4557,7 @@ static int setup_proc_entry( struct net_device *dev,
entry->gid = proc_gid; entry->gid = proc_gid;
/* Setup the BSSList */ /* Setup the BSSList */
entry = proc_create_data("BSSList", entry = proc_create_data("BSSList", proc_perm,
S_IFREG | proc_perm,
apriv->proc_entry, &proc_BSSList_ops, dev); apriv->proc_entry, &proc_BSSList_ops, dev);
if (!entry) if (!entry)
goto fail_bsslist; goto fail_bsslist;
@@ -4573,8 +4565,7 @@ static int setup_proc_entry( struct net_device *dev,
entry->gid = proc_gid; entry->gid = proc_gid;
/* Setup the WepKey */ /* Setup the WepKey */
entry = proc_create_data("WepKey", entry = proc_create_data("WepKey", proc_perm,
S_IFREG | proc_perm,
apriv->proc_entry, &proc_wepkey_ops, dev); apriv->proc_entry, &proc_wepkey_ops, dev);
if (!entry) if (!entry)
goto fail_wepkey; goto fail_wepkey;
@@ -5706,9 +5697,7 @@ static int __init airo_init_module( void )
{ {
int i; int i;
airo_entry = create_proc_entry("driver/aironet", airo_entry = proc_mkdir_mode("driver/aironet", airo_perm, NULL);
S_IFDIR | airo_perm,
NULL);
if (airo_entry) { if (airo_entry) {
airo_entry->uid = proc_uid; airo_entry->uid = proc_uid;
+1 -1
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2008-2009 Atheros Communications Inc. * Copyright (c) 2008-2011 Atheros Communications Inc.
* Copyright (c) 2009 Gabor Juhos <juhosg@openwrt.org> * Copyright (c) 2009 Gabor Juhos <juhosg@openwrt.org>
* Copyright (c) 2009 Imre Kaloz <kaloz@openwrt.org> * Copyright (c) 2009 Imre Kaloz <kaloz@openwrt.org>
* *
+1 -1
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2008-2010 Atheros Communications Inc. * Copyright (c) 2008-2011 Atheros Communications Inc.
* *
* Permission to use, copy, modify, and/or distribute this software for any * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * purpose with or without fee is hereby granted, provided that the above
+1 -1
View File
@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2008-2009 Atheros Communications Inc. * Copyright (c) 2008-2011 Atheros Communications Inc.
* *
* Permission to use, copy, modify, and/or distribute this software for any * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * purpose with or without fee is hereby granted, provided that the above
@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2010 Atheros Communications Inc. * Copyright (c) 2010-2011 Atheros Communications Inc.
* *
* Permission to use, copy, modify, and/or distribute this software for any * Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * purpose with or without fee is hereby granted, provided that the above

Some files were not shown because too many files have changed in this diff Show More