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

Commit b6d3d16e authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6:
  r8169: fix suspend/resume for down interface
  r8169: issue request_irq after the private data are completely initialized
  b44: fix IFF_ALLMULTI handling of CAM slots
  cxgb3 - Firwmare update
  cxgb3 - Tighten xgmac workaround
  cxgb3 - detect NIC only adapters
  cxgb3 - Safeguard TCAM size usage
parents 348e3fd1 1371fa6d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1709,7 +1709,7 @@ static void __b44_set_rx_mode(struct net_device *dev)
		bw32(bp, B44_RXCONFIG, val);
	} else {
		unsigned char zero[6] = {0, 0, 0, 0, 0, 0};
		int i = 0;
		int i = 1;

		__b44_set_mac_addr(bp);

+6 −3
Original line number Diff line number Diff line
@@ -112,8 +112,7 @@ enum {
};

enum {
	SUPPORTED_OFFLOAD = 1 << 24,
	SUPPORTED_IRQ = 1 << 25
	SUPPORTED_IRQ      = 1 << 24
};

enum {				/* adapter interrupt-maintained statistics */
@@ -358,6 +357,9 @@ enum {
	MC5_MODE_72_BIT = 2
};

/* MC5 min active region size */
enum { MC5_MIN_TIDS = 16 };

struct vpd_params {
	unsigned int cclk;
	unsigned int mclk;
@@ -402,6 +404,7 @@ struct adapter_params {
	unsigned int stats_update_period;	/* MAC stats accumulation period */
	unsigned int linkpoll_period;	/* link poll period in 0.1s */
	unsigned int rev;	/* chip revision */
	unsigned int offload;
};

enum {					    /* chip revisions */
@@ -602,7 +605,7 @@ static inline int is_10G(const struct adapter *adap)

static inline int is_offload(const struct adapter *adap)
{
	return adapter_info(adap)->caps & SUPPORTED_OFFLOAD;
	return adap->params.offload;
}

static inline unsigned int core_ticks_per_usec(const struct adapter *adap)
+24 −11
Original line number Diff line number Diff line
@@ -185,16 +185,26 @@ void t3_os_link_changed(struct adapter *adapter, int port_id, int link_stat,
			int speed, int duplex, int pause)
{
	struct net_device *dev = adapter->port[port_id];
	struct port_info *pi = netdev_priv(dev);
	struct cmac *mac = &pi->mac;

	/* Skip changes from disabled ports. */
	if (!netif_running(dev))
		return;

	if (link_stat != netif_carrier_ok(dev)) {
		if (link_stat)
		if (link_stat) {
			t3_set_reg_field(adapter,
					 A_XGM_TXFIFO_CFG + mac->offset,
					 F_ENDROPPKT, 0);
			netif_carrier_on(dev);
		else
		} else {
			netif_carrier_off(dev);
			t3_set_reg_field(adapter,
					 A_XGM_TXFIFO_CFG + mac->offset,
					 F_ENDROPPKT, F_ENDROPPKT);
		}

		link_report(dev);
	}
}
@@ -407,7 +417,7 @@ static void quiesce_rx(struct adapter *adap)
static int setup_sge_qsets(struct adapter *adap)
{
	int i, j, err, irq_idx = 0, qset_idx = 0, dummy_dev_idx = 0;
	unsigned int ntxq = is_offload(adap) ? SGE_TXQ_PER_SET : 1;
	unsigned int ntxq = SGE_TXQ_PER_SET;

	if (adap->params.rev > 0 && !(adap->flags & USING_MSI))
		irq_idx = -1;
@@ -485,12 +495,14 @@ static ssize_t show_##name(struct device *d, struct device_attribute *attr, \
static ssize_t set_nfilters(struct net_device *dev, unsigned int val)
{
	struct adapter *adap = dev->priv;
	int min_tids = is_offload(adap) ? MC5_MIN_TIDS : 0;

	if (adap->flags & FULL_INIT_DONE)
		return -EBUSY;
	if (val && adap->params.rev == 0)
		return -EINVAL;
	if (val > t3_mc5_size(&adap->mc5) - adap->params.mc5.nservers)
	if (val > t3_mc5_size(&adap->mc5) - adap->params.mc5.nservers -
	    min_tids)
		return -EINVAL;
	adap->params.mc5.nfilters = val;
	return 0;
@@ -508,7 +520,8 @@ static ssize_t set_nservers(struct net_device *dev, unsigned int val)

	if (adap->flags & FULL_INIT_DONE)
		return -EBUSY;
	if (val > t3_mc5_size(&adap->mc5) - adap->params.mc5.nfilters)
	if (val > t3_mc5_size(&adap->mc5) - adap->params.mc5.nfilters -
	    MC5_MIN_TIDS)
		return -EINVAL;
	adap->params.mc5.nservers = val;
	return 0;
@@ -708,7 +721,7 @@ static void bind_qsets(struct adapter *adap)
	}
}

#define FW_FNAME "t3fw-%d.%d.bin"
#define FW_FNAME "t3fw-%d.%d.%d.bin"

static int upgrade_fw(struct adapter *adap)
{
@@ -718,7 +731,7 @@ static int upgrade_fw(struct adapter *adap)
	struct device *dev = &adap->pdev->dev;

	snprintf(buf, sizeof(buf), FW_FNAME, FW_VERSION_MAJOR,
		 FW_VERSION_MINOR);
		 FW_VERSION_MINOR, FW_VERSION_MICRO);
	ret = request_firmware(&fw, buf, dev);
	if (ret < 0) {
		dev_err(dev, "could not upgrade firmware: unable to load %s\n",
@@ -919,7 +932,7 @@ static int cxgb_open(struct net_device *dev)
		return err;

	set_bit(pi->port_id, &adapter->open_device_map);
	if (!ofld_disable) {
	if (is_offload(adapter) && !ofld_disable) {
		err = offload_open(dev);
		if (err)
			printk(KERN_WARNING
@@ -2116,7 +2129,7 @@ static void check_t3b2_mac(struct adapter *adapter)
			continue;

		status = 0;
		if (netif_running(dev))
		if (netif_running(dev) && netif_carrier_ok(dev))
			status = t3b2_mac_watchdog_task(&p->mac);
		if (status == 1)
			p->mac.stats.num_toggled++;
@@ -2267,9 +2280,9 @@ static void __devinit print_port_info(struct adapter *adap,

		if (!test_bit(i, &adap->registered_device_map))
			continue;
		printk(KERN_INFO "%s: %s %s RNIC (rev %d) %s%s\n",
		printk(KERN_INFO "%s: %s %s %sNIC (rev %d) %s%s\n",
		       dev->name, ai->desc, pi->port_type->desc,
		       adap->params.rev, buf,
		       is_offload(adap) ? "R" : "", adap->params.rev, buf,
		       (adap->flags & USING_MSIX) ? " MSI-X" :
		       (adap->flags & USING_MSI) ? " MSI" : "");
		if (adap->name == dev->name && adap->params.vpd.mclk)
+3 −1
Original line number Diff line number Diff line
@@ -553,7 +553,9 @@ int cxgb3_alloc_atid(struct t3cdev *tdev, struct cxgb3_client *client,
	struct tid_info *t = &(T3C_DATA(tdev))->tid_maps;

	spin_lock_bh(&t->atid_lock);
	if (t->afree) {
	if (t->afree &&
	    t->atids_in_use + atomic_read(&t->tids_in_use) + MC5_MIN_TIDS <=
	    t->ntids) {
		union active_open_entry *p = t->afree;

		atid = (p - t->atid_tab) + t->atid_base;
+3 −0
Original line number Diff line number Diff line
@@ -328,6 +328,9 @@ int t3_mc5_init(struct mc5 *mc5, unsigned int nservers, unsigned int nfilters,
	unsigned int tcam_size = mc5->tcam_size;
	struct adapter *adap = mc5->adapter;

	if (!tcam_size)
		return 0;

	if (nroutes > MAX_ROUTES || nroutes + nservers + nfilters > tcam_size)
		return -EINVAL;

Loading