@@ -205,8 +205,8 @@ static void ec_bhf_reset(struct ec_bhf_priv *priv)
static void ec_bhf_send_packet(struct ec_bhf_priv *priv, struct tx_desc *desc)
{
- u32 addr = (u8 *)desc - priv->tx_buf.buf;
u32 len = le16_to_cpu(desc->header.len) + sizeof(desc->header);
+ u32 addr = (u8 *)desc - priv->tx_buf.buf;
iowrite32((ALIGN(len, 8) << 24) | addr, priv->fifo_io + FIFO_TX_REG);
@@ -598,11 +598,11 @@ static const struct net_device_ops ec_bhf_netdev_ops = {
static int ec_bhf_probe(struct pci_dev *dev, const struct pci_device_id *id)
{
- int err = 0;
- void * __iomem io;
- void * __iomem dma_io;
struct net_device *net_dev;
struct ec_bhf_priv *priv;
+ void * __iomem dma_io;
+ void * __iomem io;
+ int err = 0;
err = pci_enable_device(dev);
if (err)