Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4848490c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits)
  niu: VLAN_ETH_HLEN should be used to make sure that the whole MAC header was copied to the head buffer in the Vlan packets case
  KS8851: Fix ks8851_set_rx_mode() for IFF_MULTICAST
  KS8851: Fix MAC address write order
  KS8851: Add soft reset at probe time
  net: fix section mismatch in fec.c
  net: Fix struct inet_timewait_sock bitfield annotation
  tcp: Try to catch MSG_PEEK bug
  net: Fix IP_MULTICAST_IF
  bluetooth: static lock key fix
  bluetooth: scheduling while atomic bug fix
  tcp: fix TCP_DEFER_ACCEPT retrans calculation
  tcp: reduce SYN-ACK retrans for TCP_DEFER_ACCEPT
  tcp: accept socket after TCP_DEFER_ACCEPT period
  Revert "tcp: fix tcp_defer_accept to consider the timeout"
  AF_UNIX: Fix deadlock on connecting to shutdown socket
  ethoc: clear only pending irqs
  ethoc: inline regs access
  vmxnet3: use dev_dbg, fix build for CONFIG_BLOCK=n
  virtio_net: use dev_kfree_skb_any() in free_old_xmit_skbs()
  be2net: fix support for PCI hot plug
  ...
parents d995053d 845de8af
Loading
Loading
Loading
Loading
+22 −11
Original line number Original line Diff line number Diff line
@@ -243,15 +243,26 @@ static int be_POST_stage_get(struct be_adapter *adapter, u16 *stage)


int be_cmd_POST(struct be_adapter *adapter)
int be_cmd_POST(struct be_adapter *adapter)
{
{
	u16 stage, error;
	u16 stage;
	int status, timeout = 0;


	error = be_POST_stage_get(adapter, &stage);
	do {
	if (error || stage != POST_STAGE_ARMFW_RDY) {
		status = be_POST_stage_get(adapter, &stage);
		dev_err(&adapter->pdev->dev, "POST failed.\n");
		if (status) {
			dev_err(&adapter->pdev->dev, "POST error; stage=0x%x\n",
				stage);
			return -1;
			return -1;
		} else if (stage != POST_STAGE_ARMFW_RDY) {
			set_current_state(TASK_INTERRUPTIBLE);
			schedule_timeout(2 * HZ);
			timeout += 2;
		} else {
			return 0;
		}
		}
	} while (timeout < 20);


	return 0;
	dev_err(&adapter->pdev->dev, "POST timeout; stage=0x%x\n", stage);
	return -1;
}
}


static inline void *embedded_payload(struct be_mcc_wrb *wrb)
static inline void *embedded_payload(struct be_mcc_wrb *wrb)
@@ -729,8 +740,8 @@ int be_cmd_q_destroy(struct be_adapter *adapter, struct be_queue_info *q,
/* Create an rx filtering policy configuration on an i/f
/* Create an rx filtering policy configuration on an i/f
 * Uses mbox
 * Uses mbox
 */
 */
int be_cmd_if_create(struct be_adapter *adapter, u32 flags, u8 *mac,
int be_cmd_if_create(struct be_adapter *adapter, u32 cap_flags, u32 en_flags,
		bool pmac_invalid, u32 *if_handle, u32 *pmac_id)
		u8 *mac, bool pmac_invalid, u32 *if_handle, u32 *pmac_id)
{
{
	struct be_mcc_wrb *wrb;
	struct be_mcc_wrb *wrb;
	struct be_cmd_req_if_create *req;
	struct be_cmd_req_if_create *req;
@@ -746,8 +757,8 @@ int be_cmd_if_create(struct be_adapter *adapter, u32 flags, u8 *mac,
	be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON,
	be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON,
		OPCODE_COMMON_NTWK_INTERFACE_CREATE, sizeof(*req));
		OPCODE_COMMON_NTWK_INTERFACE_CREATE, sizeof(*req));


	req->capability_flags = cpu_to_le32(flags);
	req->capability_flags = cpu_to_le32(cap_flags);
	req->enable_flags = cpu_to_le32(flags);
	req->enable_flags = cpu_to_le32(en_flags);
	req->pmac_invalid = pmac_invalid;
	req->pmac_invalid = pmac_invalid;
	if (!pmac_invalid)
	if (!pmac_invalid)
		memcpy(req->mac_addr, mac, ETH_ALEN);
		memcpy(req->mac_addr, mac, ETH_ALEN);
+3 −2
Original line number Original line Diff line number Diff line
@@ -720,8 +720,9 @@ extern int be_cmd_mac_addr_query(struct be_adapter *adapter, u8 *mac_addr,
extern int be_cmd_pmac_add(struct be_adapter *adapter, u8 *mac_addr,
extern int be_cmd_pmac_add(struct be_adapter *adapter, u8 *mac_addr,
			u32 if_id, u32 *pmac_id);
			u32 if_id, u32 *pmac_id);
extern int be_cmd_pmac_del(struct be_adapter *adapter, u32 if_id, u32 pmac_id);
extern int be_cmd_pmac_del(struct be_adapter *adapter, u32 if_id, u32 pmac_id);
extern int be_cmd_if_create(struct be_adapter *adapter, u32 if_flags, u8 *mac,
extern int be_cmd_if_create(struct be_adapter *adapter, u32 cap_flags,
			bool pmac_invalid, u32 *if_handle, u32 *pmac_id);
			u32 en_flags, u8 *mac, bool pmac_invalid,
			u32 *if_handle, u32 *pmac_id);
extern int be_cmd_if_destroy(struct be_adapter *adapter, u32 if_handle);
extern int be_cmd_if_destroy(struct be_adapter *adapter, u32 if_handle);
extern int be_cmd_eq_create(struct be_adapter *adapter,
extern int be_cmd_eq_create(struct be_adapter *adapter,
			struct be_queue_info *eq, int eq_delay);
			struct be_queue_info *eq, int eq_delay);
+15 −12
Original line number Original line Diff line number Diff line
@@ -1620,19 +1620,22 @@ static int be_open(struct net_device *netdev)
static int be_setup(struct be_adapter *adapter)
static int be_setup(struct be_adapter *adapter)
{
{
	struct net_device *netdev = adapter->netdev;
	struct net_device *netdev = adapter->netdev;
	u32 if_flags;
	u32 cap_flags, en_flags;
	int status;
	int status;


	if_flags = BE_IF_FLAGS_BROADCAST | BE_IF_FLAGS_PROMISCUOUS |
	cap_flags = BE_IF_FLAGS_UNTAGGED | BE_IF_FLAGS_BROADCAST |
		BE_IF_FLAGS_MCAST_PROMISCUOUS | BE_IF_FLAGS_UNTAGGED |
			BE_IF_FLAGS_MCAST_PROMISCUOUS |
			BE_IF_FLAGS_PROMISCUOUS |
			BE_IF_FLAGS_PASS_L3L4_ERRORS;
			BE_IF_FLAGS_PASS_L3L4_ERRORS;
	status = be_cmd_if_create(adapter, if_flags, netdev->dev_addr,
	en_flags = BE_IF_FLAGS_UNTAGGED | BE_IF_FLAGS_BROADCAST |
			false/* pmac_invalid */, &adapter->if_handle,
			BE_IF_FLAGS_PASS_L3L4_ERRORS;
			&adapter->pmac_id);

	status = be_cmd_if_create(adapter, cap_flags, en_flags,
			netdev->dev_addr, false/* pmac_invalid */,
			&adapter->if_handle, &adapter->pmac_id);
	if (status != 0)
	if (status != 0)
		goto do_none;
		goto do_none;



	status = be_tx_queues_create(adapter);
	status = be_tx_queues_create(adapter);
	if (status != 0)
	if (status != 0)
		goto if_destroy;
		goto if_destroy;
@@ -2055,6 +2058,10 @@ static int be_hw_up(struct be_adapter *adapter)
	if (status)
	if (status)
		return status;
		return status;


	status = be_cmd_reset_function(adapter);
	if (status)
		return status;

	status = be_cmd_get_fw_ver(adapter, adapter->fw_ver);
	status = be_cmd_get_fw_ver(adapter, adapter->fw_ver);
	if (status)
	if (status)
		return status;
		return status;
@@ -2108,10 +2115,6 @@ static int __devinit be_probe(struct pci_dev *pdev,
	if (status)
	if (status)
		goto free_netdev;
		goto free_netdev;


	status = be_cmd_reset_function(adapter);
	if (status)
		goto ctrl_clean;

	status = be_stats_init(adapter);
	status = be_stats_init(adapter);
	if (status)
	if (status)
		goto ctrl_clean;
		goto ctrl_clean;
+11 −10
Original line number Original line Diff line number Diff line
@@ -223,24 +223,25 @@ struct ethoc_bd {
	u32 addr;
	u32 addr;
};
};


static u32 ethoc_read(struct ethoc *dev, loff_t offset)
static inline u32 ethoc_read(struct ethoc *dev, loff_t offset)
{
{
	return ioread32(dev->iobase + offset);
	return ioread32(dev->iobase + offset);
}
}


static void ethoc_write(struct ethoc *dev, loff_t offset, u32 data)
static inline void ethoc_write(struct ethoc *dev, loff_t offset, u32 data)
{
{
	iowrite32(data, dev->iobase + offset);
	iowrite32(data, dev->iobase + offset);
}
}


static void ethoc_read_bd(struct ethoc *dev, int index, struct ethoc_bd *bd)
static inline void ethoc_read_bd(struct ethoc *dev, int index,
		struct ethoc_bd *bd)
{
{
	loff_t offset = ETHOC_BD_BASE + (index * sizeof(struct ethoc_bd));
	loff_t offset = ETHOC_BD_BASE + (index * sizeof(struct ethoc_bd));
	bd->stat = ethoc_read(dev, offset + 0);
	bd->stat = ethoc_read(dev, offset + 0);
	bd->addr = ethoc_read(dev, offset + 4);
	bd->addr = ethoc_read(dev, offset + 4);
}
}


static void ethoc_write_bd(struct ethoc *dev, int index,
static inline void ethoc_write_bd(struct ethoc *dev, int index,
		const struct ethoc_bd *bd)
		const struct ethoc_bd *bd)
{
{
	loff_t offset = ETHOC_BD_BASE + (index * sizeof(struct ethoc_bd));
	loff_t offset = ETHOC_BD_BASE + (index * sizeof(struct ethoc_bd));
@@ -248,33 +249,33 @@ static void ethoc_write_bd(struct ethoc *dev, int index,
	ethoc_write(dev, offset + 4, bd->addr);
	ethoc_write(dev, offset + 4, bd->addr);
}
}


static void ethoc_enable_irq(struct ethoc *dev, u32 mask)
static inline void ethoc_enable_irq(struct ethoc *dev, u32 mask)
{
{
	u32 imask = ethoc_read(dev, INT_MASK);
	u32 imask = ethoc_read(dev, INT_MASK);
	imask |= mask;
	imask |= mask;
	ethoc_write(dev, INT_MASK, imask);
	ethoc_write(dev, INT_MASK, imask);
}
}


static void ethoc_disable_irq(struct ethoc *dev, u32 mask)
static inline void ethoc_disable_irq(struct ethoc *dev, u32 mask)
{
{
	u32 imask = ethoc_read(dev, INT_MASK);
	u32 imask = ethoc_read(dev, INT_MASK);
	imask &= ~mask;
	imask &= ~mask;
	ethoc_write(dev, INT_MASK, imask);
	ethoc_write(dev, INT_MASK, imask);
}
}


static void ethoc_ack_irq(struct ethoc *dev, u32 mask)
static inline void ethoc_ack_irq(struct ethoc *dev, u32 mask)
{
{
	ethoc_write(dev, INT_SOURCE, mask);
	ethoc_write(dev, INT_SOURCE, mask);
}
}


static void ethoc_enable_rx_and_tx(struct ethoc *dev)
static inline void ethoc_enable_rx_and_tx(struct ethoc *dev)
{
{
	u32 mode = ethoc_read(dev, MODER);
	u32 mode = ethoc_read(dev, MODER);
	mode |= MODER_RXEN | MODER_TXEN;
	mode |= MODER_RXEN | MODER_TXEN;
	ethoc_write(dev, MODER, mode);
	ethoc_write(dev, MODER, mode);
}
}


static void ethoc_disable_rx_and_tx(struct ethoc *dev)
static inline void ethoc_disable_rx_and_tx(struct ethoc *dev)
{
{
	u32 mode = ethoc_read(dev, MODER);
	u32 mode = ethoc_read(dev, MODER);
	mode &= ~(MODER_RXEN | MODER_TXEN);
	mode &= ~(MODER_RXEN | MODER_TXEN);
@@ -508,7 +509,7 @@ static irqreturn_t ethoc_interrupt(int irq, void *dev_id)
		return IRQ_NONE;
		return IRQ_NONE;
	}
	}


	ethoc_ack_irq(priv, INT_MASK_ALL);
	ethoc_ack_irq(priv, pending);


	if (pending & INT_MASK_BUSY) {
	if (pending & INT_MASK_BUSY) {
		dev_err(&dev->dev, "packet dropped\n");
		dev_err(&dev->dev, "packet dropped\n");
+1 −1
Original line number Original line Diff line number Diff line
@@ -1654,7 +1654,7 @@ static const struct net_device_ops fec_netdev_ops = {
  *
  *
  * index is only used in legacy code
  * index is only used in legacy code
  */
  */
int __init fec_enet_init(struct net_device *dev, int index)
static int fec_enet_init(struct net_device *dev, int index)
{
{
	struct fec_enet_private *fep = netdev_priv(dev);
	struct fec_enet_private *fep = netdev_priv(dev);
	struct bufdesc *cbd_base;
	struct bufdesc *cbd_base;
Loading