Merge branch 'master' into for-next
Fast-forwarded to current state of Linus' tree as there are patches to be applied for files that didn't exist on the old branch.
This commit is contained in:
@@ -416,7 +416,7 @@ static netdev_tx_t at91_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
|
||||
stats->tx_bytes += cf->can_dlc;
|
||||
|
||||
/* _NOTE_: substract AT91_MB_TX_FIRST offset from mb! */
|
||||
/* _NOTE_: subtract AT91_MB_TX_FIRST offset from mb! */
|
||||
can_put_echo_skb(skb, dev, mb - AT91_MB_TX_FIRST);
|
||||
|
||||
/*
|
||||
@@ -782,7 +782,7 @@ static void at91_irq_tx(struct net_device *dev, u32 reg_sr)
|
||||
reg_msr = at91_read(priv, AT91_MSR(mb));
|
||||
if (likely(reg_msr & AT91_MSR_MRDY &&
|
||||
~reg_msr & AT91_MSR_MABT)) {
|
||||
/* _NOTE_: substract AT91_MB_TX_FIRST offset from mb! */
|
||||
/* _NOTE_: subtract AT91_MB_TX_FIRST offset from mb! */
|
||||
can_get_echo_skb(dev, mb - AT91_MB_TX_FIRST);
|
||||
dev->stats.tx_packets++;
|
||||
}
|
||||
|
@@ -588,14 +588,9 @@ static void c_can_chip_config(struct net_device *dev)
|
||||
{
|
||||
struct c_can_priv *priv = netdev_priv(dev);
|
||||
|
||||
if (priv->can.ctrlmode & CAN_CTRLMODE_ONE_SHOT)
|
||||
/* disable automatic retransmission */
|
||||
priv->write_reg(priv, &priv->regs->control,
|
||||
CONTROL_DISABLE_AR);
|
||||
else
|
||||
/* enable automatic retransmission */
|
||||
priv->write_reg(priv, &priv->regs->control,
|
||||
CONTROL_ENABLE_AR);
|
||||
/* enable automatic retransmission */
|
||||
priv->write_reg(priv, &priv->regs->control,
|
||||
CONTROL_ENABLE_AR);
|
||||
|
||||
if (priv->can.ctrlmode & (CAN_CTRLMODE_LISTENONLY &
|
||||
CAN_CTRLMODE_LOOPBACK)) {
|
||||
@@ -633,9 +628,6 @@ static void c_can_start(struct net_device *dev)
|
||||
{
|
||||
struct c_can_priv *priv = netdev_priv(dev);
|
||||
|
||||
/* enable status change, error and module interrupts */
|
||||
c_can_enable_all_interrupts(priv, ENABLE_ALL_INTERRUPTS);
|
||||
|
||||
/* basic c_can configuration */
|
||||
c_can_chip_config(dev);
|
||||
|
||||
@@ -643,6 +635,9 @@ static void c_can_start(struct net_device *dev)
|
||||
|
||||
/* reset tx helper pointers */
|
||||
priv->tx_next = priv->tx_echo = 0;
|
||||
|
||||
/* enable status change, error and module interrupts */
|
||||
c_can_enable_all_interrupts(priv, ENABLE_ALL_INTERRUPTS);
|
||||
}
|
||||
|
||||
static void c_can_stop(struct net_device *dev)
|
||||
@@ -704,7 +699,6 @@ static void c_can_do_tx(struct net_device *dev)
|
||||
|
||||
for (/* nix */; (priv->tx_next - priv->tx_echo) > 0; priv->tx_echo++) {
|
||||
msg_obj_no = get_tx_echo_msg_obj(priv);
|
||||
c_can_inval_msg_object(dev, 0, msg_obj_no);
|
||||
val = c_can_read_reg32(priv, &priv->regs->txrqst1);
|
||||
if (!(val & (1 << msg_obj_no))) {
|
||||
can_get_echo_skb(dev,
|
||||
@@ -713,6 +707,7 @@ static void c_can_do_tx(struct net_device *dev)
|
||||
&priv->regs->ifregs[0].msg_cntrl)
|
||||
& IF_MCONT_DLC_MASK;
|
||||
stats->tx_packets++;
|
||||
c_can_inval_msg_object(dev, 0, msg_obj_no);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -818,7 +813,7 @@ static int c_can_handle_state_change(struct net_device *dev,
|
||||
struct sk_buff *skb;
|
||||
struct can_berr_counter bec;
|
||||
|
||||
/* propogate the error condition to the CAN stack */
|
||||
/* propagate the error condition to the CAN stack */
|
||||
skb = alloc_can_err_skb(dev, &cf);
|
||||
if (unlikely(!skb))
|
||||
return 0;
|
||||
@@ -892,7 +887,7 @@ static int c_can_handle_bus_err(struct net_device *dev,
|
||||
if (lec_type == LEC_UNUSED || lec_type == LEC_NO_ERROR)
|
||||
return 0;
|
||||
|
||||
/* propogate the error condition to the CAN stack */
|
||||
/* propagate the error condition to the CAN stack */
|
||||
skb = alloc_can_err_skb(dev, &cf);
|
||||
if (unlikely(!skb))
|
||||
return 0;
|
||||
@@ -1112,8 +1107,7 @@ struct net_device *alloc_c_can_dev(void)
|
||||
priv->can.bittiming_const = &c_can_bittiming_const;
|
||||
priv->can.do_set_mode = c_can_set_mode;
|
||||
priv->can.do_get_berr_counter = c_can_get_berr_counter;
|
||||
priv->can.ctrlmode_supported = CAN_CTRLMODE_ONE_SHOT |
|
||||
CAN_CTRLMODE_LOOPBACK |
|
||||
priv->can.ctrlmode_supported = CAN_CTRLMODE_LOOPBACK |
|
||||
CAN_CTRLMODE_LISTENONLY |
|
||||
CAN_CTRLMODE_BERR_REPORTING;
|
||||
|
||||
|
@@ -73,7 +73,8 @@ static int __devinit c_can_plat_probe(struct platform_device *pdev)
|
||||
void __iomem *addr;
|
||||
struct net_device *dev;
|
||||
struct c_can_priv *priv;
|
||||
struct resource *mem, *irq;
|
||||
struct resource *mem;
|
||||
int irq;
|
||||
#ifdef CONFIG_HAVE_CLK
|
||||
struct clk *clk;
|
||||
|
||||
@@ -88,8 +89,8 @@ static int __devinit c_can_plat_probe(struct platform_device *pdev)
|
||||
|
||||
/* get the platform data */
|
||||
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
|
||||
if (!mem || (irq <= 0)) {
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (!mem || irq <= 0) {
|
||||
ret = -ENODEV;
|
||||
goto exit_free_clk;
|
||||
}
|
||||
@@ -117,7 +118,7 @@ static int __devinit c_can_plat_probe(struct platform_device *pdev)
|
||||
|
||||
priv = netdev_priv(dev);
|
||||
|
||||
dev->irq = irq->start;
|
||||
dev->irq = irq;
|
||||
priv->regs = addr;
|
||||
#ifdef CONFIG_HAVE_CLK
|
||||
priv->can.clock.freq = clk_get_rate(clk);
|
||||
|
@@ -15,6 +15,7 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/mfd/core.h>
|
||||
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/can.h>
|
||||
@@ -273,7 +274,7 @@ static inline void ican3_set_page(struct ican3_dev *mod, unsigned int page)
|
||||
*/
|
||||
|
||||
/*
|
||||
* Recieve a message from the ICAN3 "old-style" firmware interface
|
||||
* Receive a message from the ICAN3 "old-style" firmware interface
|
||||
*
|
||||
* LOCKING: must hold mod->lock
|
||||
*
|
||||
@@ -1049,7 +1050,7 @@ static void ican3_handle_inquiry(struct ican3_dev *mod, struct ican3_msg *msg)
|
||||
complete(&mod->termination_comp);
|
||||
break;
|
||||
default:
|
||||
dev_err(mod->dev, "recieved an unknown inquiry response\n");
|
||||
dev_err(mod->dev, "received an unknown inquiry response\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1057,7 +1058,7 @@ static void ican3_handle_inquiry(struct ican3_dev *mod, struct ican3_msg *msg)
|
||||
static void ican3_handle_unknown_message(struct ican3_dev *mod,
|
||||
struct ican3_msg *msg)
|
||||
{
|
||||
dev_warn(mod->dev, "recieved unknown message: spec 0x%.2x length %d\n",
|
||||
dev_warn(mod->dev, "received unknown message: spec 0x%.2x length %d\n",
|
||||
msg->spec, le16_to_cpu(msg->len));
|
||||
}
|
||||
|
||||
@@ -1112,7 +1113,7 @@ static bool ican3_txok(struct ican3_dev *mod)
|
||||
}
|
||||
|
||||
/*
|
||||
* Recieve one CAN frame from the hardware
|
||||
* Receive one CAN frame from the hardware
|
||||
*
|
||||
* CONTEXT: must be called from user context
|
||||
*/
|
||||
@@ -1643,7 +1644,7 @@ static int __devinit ican3_probe(struct platform_device *pdev)
|
||||
struct device *dev;
|
||||
int ret;
|
||||
|
||||
pdata = pdev->dev.platform_data;
|
||||
pdata = mfd_get_data(pdev);
|
||||
if (!pdata)
|
||||
return -ENXIO;
|
||||
|
||||
|
@@ -931,7 +931,8 @@ static int mcp251x_open(struct net_device *net)
|
||||
priv->tx_len = 0;
|
||||
|
||||
ret = request_threaded_irq(spi->irq, NULL, mcp251x_can_ist,
|
||||
IRQF_TRIGGER_FALLING, DEVICE_NAME, priv);
|
||||
pdata->irq_flags ? pdata->irq_flags : IRQF_TRIGGER_FALLING,
|
||||
DEVICE_NAME, priv);
|
||||
if (ret) {
|
||||
dev_err(&spi->dev, "failed to acquire irq %d\n", spi->irq);
|
||||
if (pdata->transceiver_enable)
|
||||
|
@@ -260,7 +260,7 @@ static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev)
|
||||
|
||||
if (!ofdev->dev.of_match)
|
||||
return -EINVAL;
|
||||
data = (struct mpc5xxx_can_data *)of_dev->dev.of_match->data;
|
||||
data = (struct mpc5xxx_can_data *)ofdev->dev.of_match->data;
|
||||
|
||||
base = of_iomap(np, 0);
|
||||
if (!base) {
|
||||
|
@@ -246,7 +246,7 @@ static netdev_tx_t mscan_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
out_be16(®s->tx.idr3_2, can_id);
|
||||
|
||||
can_id >>= 16;
|
||||
/* EFF_FLAGS are inbetween the IDs :( */
|
||||
/* EFF_FLAGS are between the IDs :( */
|
||||
can_id = (can_id & 0x7) | ((can_id << 2) & 0xffe0)
|
||||
| MSCAN_EFF_FLAGS;
|
||||
} else {
|
||||
|
@@ -425,7 +425,7 @@ static int sja1000_err(struct net_device *dev, uint8_t isrc, uint8_t status)
|
||||
cf->data[3] = ecc & ECC_SEG;
|
||||
break;
|
||||
}
|
||||
/* Error occured during transmission? */
|
||||
/* Error occurred during transmission? */
|
||||
if ((ecc & ECC_DIR) == 0)
|
||||
cf->data[2] |= CAN_ERR_PROT_TX;
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@ struct softing_priv {
|
||||
struct softing *card;
|
||||
struct {
|
||||
int pending;
|
||||
/* variables wich hold the circular buffer */
|
||||
/* variables which hold the circular buffer */
|
||||
int echo_put;
|
||||
int echo_get;
|
||||
} tx;
|
||||
|
@@ -218,7 +218,7 @@ static int softing_handle_1(struct softing *card)
|
||||
ptr = buf;
|
||||
cmd = *ptr++;
|
||||
if (cmd == 0xff)
|
||||
/* not quite usefull, probably the card has got out */
|
||||
/* not quite useful, probably the card has got out */
|
||||
return 0;
|
||||
netdev = card->net[0];
|
||||
if (cmd & CMD_BUS2)
|
||||
|
@@ -663,7 +663,7 @@ static int ti_hecc_error(struct net_device *ndev, int int_status,
|
||||
struct can_frame *cf;
|
||||
struct sk_buff *skb;
|
||||
|
||||
/* propogate the error condition to the can stack */
|
||||
/* propagate the error condition to the can stack */
|
||||
skb = alloc_can_err_skb(ndev, &cf);
|
||||
if (!skb) {
|
||||
if (printk_ratelimit())
|
||||
|
@@ -386,7 +386,7 @@ static void ems_usb_rx_err(struct ems_usb *dev, struct ems_cpc_msg *msg)
|
||||
break;
|
||||
}
|
||||
|
||||
/* Error occured during transmission? */
|
||||
/* Error occurred during transmission? */
|
||||
if ((ecc & SJA1000_ECC_DIR) == 0)
|
||||
cf->data[2] |= CAN_ERR_PROT_TX;
|
||||
|
||||
|
@@ -284,7 +284,7 @@ static void esd_usb2_rx_event(struct esd_usb2_net_priv *priv,
|
||||
break;
|
||||
}
|
||||
|
||||
/* Error occured during transmission? */
|
||||
/* Error occurred during transmission? */
|
||||
if (!(ecc & SJA1000_ECC_DIR))
|
||||
cf->data[2] |= CAN_ERR_PROT_TX;
|
||||
|
||||
|
Reference in New Issue
Block a user