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

Commit 92b4522f authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

parents 67a3e12b 29030374
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -97,8 +97,10 @@ static int write_reg(struct hfcsusb *hw, __u8 reg, __u8 val)
			hw->name, __func__, reg, val);
			hw->name, __func__, reg, val);


	spin_lock(&hw->ctrl_lock);
	spin_lock(&hw->ctrl_lock);
	if (hw->ctrl_cnt >= HFC_CTRL_BUFSIZE)
	if (hw->ctrl_cnt >= HFC_CTRL_BUFSIZE) {
		spin_unlock(&hw->ctrl_lock);
		return 1;
		return 1;
	}
	buf = &hw->ctrl_buff[hw->ctrl_in_idx];
	buf = &hw->ctrl_buff[hw->ctrl_in_idx];
	buf->hfcs_reg = reg;
	buf->hfcs_reg = reg;
	buf->reg_val = val;
	buf->reg_val = val;
+7 −4
Original line number Original line Diff line number Diff line
@@ -1429,7 +1429,7 @@ int be_cmd_write_flashrom(struct be_adapter *adapter, struct be_dma_mem *cmd,
	wrb = wrb_from_mccq(adapter);
	wrb = wrb_from_mccq(adapter);
	if (!wrb) {
	if (!wrb) {
		status = -EBUSY;
		status = -EBUSY;
		goto err;
		goto err_unlock;
	}
	}
	req = cmd->va;
	req = cmd->va;
	sge = nonembedded_sgl(wrb);
	sge = nonembedded_sgl(wrb);
@@ -1457,7 +1457,10 @@ int be_cmd_write_flashrom(struct be_adapter *adapter, struct be_dma_mem *cmd,
	else
	else
		status = adapter->flash_status;
		status = adapter->flash_status;


err:
	return status;

err_unlock:
	spin_unlock_bh(&adapter->mcc_lock);
	return status;
	return status;
}
}


@@ -1497,7 +1500,7 @@ err:
	return status;
	return status;
}
}


extern int be_cmd_enable_magic_wol(struct be_adapter *adapter, u8 *mac,
int be_cmd_enable_magic_wol(struct be_adapter *adapter, u8 *mac,
				struct be_dma_mem *nonemb_cmd)
				struct be_dma_mem *nonemb_cmd)
{
{
	struct be_mcc_wrb *wrb;
	struct be_mcc_wrb *wrb;
@@ -1662,7 +1665,7 @@ err:
	return status;
	return status;
}
}


extern int be_cmd_get_seeprom_data(struct be_adapter *adapter,
int be_cmd_get_seeprom_data(struct be_adapter *adapter,
				struct be_dma_mem *nonemb_cmd)
				struct be_dma_mem *nonemb_cmd)
{
{
	struct be_mcc_wrb *wrb;
	struct be_mcc_wrb *wrb;
+43 −6
Original line number Original line Diff line number Diff line
@@ -504,17 +504,54 @@ static int get_regs_len(struct net_device *dev)
}
}


/* Some transmit errors cause the transmitter to shut
/* Some transmit errors cause the transmitter to shut
 * down.  We now issue a restart transmit.  Since the
 * down.  We now issue a restart transmit.
 * errors close the BD and update the pointers, the restart
 * Also, to workaround 8260 device erratum CPM37, we must
 * _should_ pick up without having to reset any of our
 * disable and then re-enable the transmitterfollowing a
 * pointers either.  Also, To workaround 8260 device erratum
 * Late Collision, Underrun, or Retry Limit error.
 * CPM37, we must disable and then re-enable the transmitter
 * In addition, tbptr may point beyond BDs beyond still marked
 * following a Late Collision, Underrun, or Retry Limit error.
 * as ready due to internal pipelining, so we need to look back
 * through the BDs and adjust tbptr to point to the last BD
 * marked as ready.  This may result in some buffers being
 * retransmitted.
 */
 */
static void tx_restart(struct net_device *dev)
static void tx_restart(struct net_device *dev)
{
{
	struct fs_enet_private *fep = netdev_priv(dev);
	struct fs_enet_private *fep = netdev_priv(dev);
	fcc_t __iomem *fccp = fep->fcc.fccp;
	fcc_t __iomem *fccp = fep->fcc.fccp;
	const struct fs_platform_info *fpi = fep->fpi;
	fcc_enet_t __iomem *ep = fep->fcc.ep;
	cbd_t __iomem *curr_tbptr;
	cbd_t __iomem *recheck_bd;
	cbd_t __iomem *prev_bd;
	cbd_t __iomem *last_tx_bd;

	last_tx_bd = fep->tx_bd_base + (fpi->tx_ring * sizeof(cbd_t));

	/* get the current bd held in TBPTR  and scan back from this point */
	recheck_bd = curr_tbptr = (cbd_t __iomem *)
		((R32(ep, fen_genfcc.fcc_tbptr) - fep->ring_mem_addr) +
		fep->ring_base);

	prev_bd = (recheck_bd == fep->tx_bd_base) ? last_tx_bd : recheck_bd - 1;

	/* Move through the bds in reverse, look for the earliest buffer
	 * that is not ready.  Adjust TBPTR to the following buffer */
	while ((CBDR_SC(prev_bd) & BD_ENET_TX_READY) != 0) {
		/* Go back one buffer */
		recheck_bd = prev_bd;

		/* update the previous buffer */
		prev_bd = (prev_bd == fep->tx_bd_base) ? last_tx_bd : prev_bd - 1;

		/* We should never see all bds marked as ready, check anyway */
		if (recheck_bd == curr_tbptr)
			break;
	}
	/* Now update the TBPTR and dirty flag to the current buffer */
	W32(ep, fen_genfcc.fcc_tbptr,
		(uint) (((void *)recheck_bd - fep->ring_base) +
		fep->ring_mem_addr));
	fep->dirty_tx = recheck_bd;


	C32(fccp, fcc_gfmr, FCC_GFMR_ENT);
	C32(fccp, fcc_gfmr, FCC_GFMR_ENT);
	udelay(10);
	udelay(10);
+12 −2
Original line number Original line Diff line number Diff line
@@ -739,17 +739,27 @@ err_out:
static void ar9170_usb_firmware_failed(struct ar9170_usb *aru)
static void ar9170_usb_firmware_failed(struct ar9170_usb *aru)
{
{
	struct device *parent = aru->udev->dev.parent;
	struct device *parent = aru->udev->dev.parent;
	struct usb_device *udev;

	/*
	 * Store a copy of the usb_device pointer locally.
	 * This is because device_release_driver initiates
	 * ar9170_usb_disconnect, which in turn frees our
	 * driver context (aru).
	 */
	udev = aru->udev;


	complete(&aru->firmware_loading_complete);
	complete(&aru->firmware_loading_complete);


	/* unbind anything failed */
	/* unbind anything failed */
	if (parent)
	if (parent)
		device_lock(parent);
		device_lock(parent);
	device_release_driver(&aru->udev->dev);

	device_release_driver(&udev->dev);
	if (parent)
	if (parent)
		device_unlock(parent);
		device_unlock(parent);


	usb_put_dev(aru->udev);
	usb_put_dev(udev);
}
}


static void ar9170_usb_firmware_finish(const struct firmware *fw, void *context)
static void ar9170_usb_firmware_finish(const struct firmware *fw, void *context)
+4 −2
Original line number Original line Diff line number Diff line
@@ -1198,7 +1198,7 @@ void ath_drain_all_txq(struct ath_softc *sc, bool retry_tx)
		int r;
		int r;


		ath_print(common, ATH_DBG_FATAL,
		ath_print(common, ATH_DBG_FATAL,
			  "Unable to stop TxDMA. Reset HAL!\n");
			  "Failed to stop TX DMA. Resetting hardware!\n");


		spin_lock_bh(&sc->sc_resetlock);
		spin_lock_bh(&sc->sc_resetlock);
		r = ath9k_hw_reset(ah, sc->sc_ah->curchan, false);
		r = ath9k_hw_reset(ah, sc->sc_ah->curchan, false);
@@ -1728,6 +1728,8 @@ static int ath_tx_setup_buffer(struct ieee80211_hw *hw, struct ath_buf *bf,
	} else
	} else
		bf->bf_isnullfunc = false;
		bf->bf_isnullfunc = false;


	bf->bf_tx_aborted = false;

	return 0;
	return 0;
}
}


@@ -1989,7 +1991,7 @@ static int ath_tx_num_badfrms(struct ath_softc *sc, struct ath_buf *bf,
	int nbad = 0;
	int nbad = 0;
	int isaggr = 0;
	int isaggr = 0;


	if (bf->bf_tx_aborted)
	if (bf->bf_lastbf->bf_tx_aborted)
		return 0;
		return 0;


	isaggr = bf_isaggr(bf);
	isaggr = bf_isaggr(bf);
Loading