Commit 15b06690 authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (44 commits)
  qlge: Fix sparse warnings for tx ring indexes.
  qlge: Fix sparse warning regarding rx buffer queues.
  qlge: Fix sparse endian warning in ql_hw_csum_setup().
  qlge: Fix sparse endian warning for inbound packet control block flags.
  qlge: Fix sparse warnings for byte swapping in qlge_ethool.c
  myri10ge: print MAC and serial number on probe failure
  pkt_sched: cls_u32: Fix locking in u32_change()
  iucv: fix cpu hotplug
  af_iucv: Free iucv path/socket in path_pending callback
  af_iucv: avoid left over IUCV connections from failing connects
  af_iucv: New error return codes for connect()
  net/ehea: bitops work on unsigned longs
  Revert "net: Fix for initial link state in 2.6.28"
  tcp: Kill extraneous SPLICE_F_NONBLOCK checks.
  tcp: don't mask EOF and socket errors on nonblocking splice receive
  dccp: Integrate the TFRC library with DCCP
  dccp: Clean up ccid.c after integration of CCID plugins
  dccp: Lockless integration of CCID congestion-control plugins
  qeth: get rid of extra argument after printk to dev_* conversion
  qeth: No large send using EDDP for HiperSockets.
  ...
parents c155b914 3537d54c
......@@ -1519,7 +1519,7 @@ static int decodeFVteln(char *teln, unsigned long *bmaskp, int *activep)
int digit2 = 0;
if (!isdigit(*s)) return -3;
while (isdigit(*s)) { digit1 = digit1*10 + (*s - '0'); s++; }
if (digit1 <= 0 && digit1 > 30) return -4;
if (digit1 <= 0 || digit1 > 30) return -4;
if (*s == 0 || *s == ',' || *s == ' ') {
bmask |= (1 << digit1);
digit1 = 0;
......@@ -1530,7 +1530,7 @@ static int decodeFVteln(char *teln, unsigned long *bmaskp, int *activep)
s++;
if (!isdigit(*s)) return -3;
while (isdigit(*s)) { digit2 = digit2*10 + (*s - '0'); s++; }
if (digit2 <= 0 && digit2 > 30) return -4;
if (digit2 <= 0 || digit2 > 30) return -4;
if (*s == 0 || *s == ',' || *s == ' ') {
if (digit1 > digit2)
for (i = digit2; i <= digit1 ; i++)
......
......@@ -66,6 +66,7 @@
#include <linux/mm.h>
#include <linux/highmem.h>
#include <linux/sockios.h>
#include <linux/firmware.h>
#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
#include <linux/if_vlan.h>
......@@ -186,8 +187,6 @@ MODULE_DEVICE_TABLE(pci, acenic_pci_tbl);
#define MAX_RODATA_LEN 8*1024
#define MAX_DATA_LEN 2*1024
#include "acenic_firmware.h"
#ifndef tigon2FwReleaseLocal
#define tigon2FwReleaseLocal 0
#endif
......@@ -417,6 +416,10 @@ static int dis_pci_mem_inval[ACE_MAX_MOD_PARMS] = {1, 1, 1, 1, 1, 1, 1, 1};
MODULE_AUTHOR("Jes Sorensen <jes@trained-monkey.org>");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("AceNIC/3C985/GA620 Gigabit Ethernet driver");
#ifndef CONFIG_ACENIC_OMIT_TIGON_I
MODULE_FIRMWARE("acenic/tg1.bin");
#endif
MODULE_FIRMWARE("acenic/tg2.bin");
module_param_array_named(link, link_state, int, NULL, 0);
module_param_array(trace, int, NULL, 0);
......@@ -943,8 +946,8 @@ static int __devinit ace_init(struct net_device *dev)
case 4:
case 5:
printk(KERN_INFO " Tigon I (Rev. %i), Firmware: %i.%i.%i, ",
tig_ver, tigonFwReleaseMajor, tigonFwReleaseMinor,
tigonFwReleaseFix);
tig_ver, ap->firmware_major, ap->firmware_minor,
ap->firmware_fix);
writel(0, &regs->LocalCtrl);
ap->version = 1;
ap->tx_ring_entries = TIGON_I_TX_RING_ENTRIES;
......@@ -952,8 +955,8 @@ static int __devinit ace_init(struct net_device *dev)
#endif
case 6:
printk(KERN_INFO " Tigon II (Rev. %i), Firmware: %i.%i.%i, ",
tig_ver, tigon2FwReleaseMajor, tigon2FwReleaseMinor,
tigon2FwReleaseFix);
tig_ver, ap->firmware_major, ap->firmware_minor,
ap->firmware_fix);
writel(readl(&regs->CpuBCtrl) | CPU_HALT, &regs->CpuBCtrl);
readl(&regs->CpuBCtrl); /* PCI write posting */
/*
......@@ -1205,7 +1208,9 @@ static int __devinit ace_init(struct net_device *dev)
memset(ap->info, 0, sizeof(struct ace_info));
memset(ap->skb, 0, sizeof(struct ace_skb));
ace_load_firmware(dev);
if (ace_load_firmware(dev))
goto init_error;
ap->fw_running = 0;
tmp_ptr = ap->info_dma;
......@@ -1441,10 +1446,7 @@ static int __devinit ace_init(struct net_device *dev)
if (ap->version >= 2)
writel(tmp, &regs->TuneFastLink);
if (ACE_IS_TIGON_I(ap))
writel(tigonFwStartAddr, &regs->Pc);
if (ap->version == 2)
writel(tigon2FwStartAddr, &regs->Pc);
writel(ap->firmware_start, &regs->Pc);
writel(0, &regs->Mb0Lo);
......@@ -2761,8 +2763,8 @@ static void ace_get_drvinfo(struct net_device *dev,
strlcpy(info->driver, "acenic", sizeof(info->driver));
snprintf(info->version, sizeof(info->version), "%i.%i.%i",
tigonFwReleaseMajor, tigonFwReleaseMinor,
tigonFwReleaseFix);
ap->firmware_major, ap->firmware_minor,
ap->firmware_fix);
if (ap->pdev)
strlcpy(info->bus_info, pci_name(ap->pdev),
......@@ -2869,11 +2871,10 @@ static struct net_device_stats *ace_get_stats(struct net_device *dev)
}
static void __devinit ace_copy(struct ace_regs __iomem *regs, void *src,
u32 dest, int size)
static void __devinit ace_copy(struct ace_regs __iomem *regs, const __be32 *src,
u32 dest, int size)
{
void __iomem *tdest;
u32 *wsrc;
short tsize, i;
if (size <= 0)
......@@ -2885,20 +2886,15 @@ static void __devinit ace_copy(struct ace_regs __iomem *regs, void *src,
tdest = (void __iomem *) &regs->Window +
(dest & (ACE_WINDOW_SIZE - 1));
writel(dest & ~(ACE_WINDOW_SIZE - 1), &regs->WinBase);
/*
* This requires byte swapping on big endian, however
* writel does that for us
*/
wsrc = src;
for (i = 0; i < (tsize / 4); i++) {
writel(wsrc[i], tdest + i*4);
/* Firmware is big-endian */
writel(be32_to_cpup(src), tdest);
src++;
tdest += 4;
dest += 4;
size -= 4;
}
dest += tsize;
src += tsize;
size -= tsize;
}
return;
}
......@@ -2937,8 +2933,13 @@ static void __devinit ace_clear(struct ace_regs __iomem *regs, u32 dest, int siz
*/
static int __devinit ace_load_firmware(struct net_device *dev)
{
const struct firmware *fw;
const char *fw_name = "acenic/tg2.bin";
struct ace_private *ap = netdev_priv(dev);
struct ace_regs __iomem *regs = ap->regs;
const __be32 *fw_data;
u32 load_addr;
int ret;
if (!(readl(&regs->CpuCtrl) & CPU_HALTED)) {
printk(KERN_ERR "%s: trying to download firmware while the "
......@@ -2946,28 +2947,52 @@ static int __devinit ace_load_firmware(struct net_device *dev)
return -EFAULT;
}
if (ACE_IS_TIGON_I(ap))
fw_name = "acenic/tg1.bin";
ret = request_firmware(&fw, fw_name, &ap->pdev->dev);
if (ret) {
printk(KERN_ERR "%s: Failed to load firmware \"%s\"\n",
ap->name, fw_name);
return ret;
}
fw_data = (void *)fw->data;
/* Firmware blob starts with version numbers, followed by
load and start address. Remainder is the blob to be loaded
contiguously from load address. We don't bother to represent
the BSS/SBSS sections any more, since we were clearing the
whole thing anyway. */
ap->firmware_major = fw->data[0];
ap->firmware_minor = fw->data[1];
ap->firmware_fix = fw->data[2];
ap->firmware_start = be32_to_cpu(fw_data[1]);
if (ap->firmware_start < 0x4000 || ap->firmware_start >= 0x80000) {
printk(KERN_ERR "%s: bogus load address %08x in \"%s\"\n",
ap->name, ap->firmware_start, fw_name);
ret = -EINVAL;
goto out;
}
load_addr = be32_to_cpu(fw_data[2]);
if (load_addr < 0x4000 || load_addr >= 0x80000) {
printk(KERN_ERR "%s: bogus load address %08x in \"%s\"\n",
ap->name, load_addr, fw_name);
ret = -EINVAL;
goto out;
}
/*
* Do not try to clear more than 512KB or we end up seeing
* funny things on NICs with only 512KB SRAM
* Do not try to clear more than 512KiB or we end up seeing
* funny things on NICs with only 512KiB SRAM
*/
ace_clear(regs, 0x2000, 0x80000-0x2000);
if (ACE_IS_TIGON_I(ap)) {
ace_copy(regs, tigonFwText, tigonFwTextAddr, tigonFwTextLen);
ace_copy(regs, tigonFwData, tigonFwDataAddr, tigonFwDataLen);
ace_copy(regs, tigonFwRodata, tigonFwRodataAddr,
tigonFwRodataLen);
ace_clear(regs, tigonFwBssAddr, tigonFwBssLen);
ace_clear(regs, tigonFwSbssAddr, tigonFwSbssLen);
}else if (ap->version == 2) {
ace_clear(regs, tigon2FwBssAddr, tigon2FwBssLen);
ace_clear(regs, tigon2FwSbssAddr, tigon2FwSbssLen);
ace_copy(regs, tigon2FwText, tigon2FwTextAddr,tigon2FwTextLen);
ace_copy(regs, tigon2FwRodata, tigon2FwRodataAddr,
tigon2FwRodataLen);
ace_copy(regs, tigon2FwData, tigon2FwDataAddr,tigon2FwDataLen);
}
return 0;
ace_copy(regs, &fw_data[3], load_addr, fw->size-12);
out:
release_firmware(fw);
return ret;
}
......
......@@ -694,6 +694,10 @@ struct ace_private
u32 last_tx, last_std_rx, last_mini_rx;
#endif
int pci_using_dac;
u8 firmware_major;
u8 firmware_minor;
u8 firmware_fix;
u32 firmware_start;
};
......
This diff is collapsed.
......@@ -478,7 +478,7 @@ struct ehea_port {
int num_add_tx_qps;
int num_mcs;
int resets;
u64 flags;
unsigned long flags;
u64 mac_addr;
u32 logical_port_id;
u32 port_speed;
......@@ -510,7 +510,6 @@ void ehea_set_ethtool_ops(struct net_device *netdev);
int ehea_sense_port_attr(struct ehea_port *port);
int ehea_set_portspeed(struct ehea_port *port, u32 port_speed);
extern u64 ehea_driver_flags;
extern struct work_struct ehea_rereg_mr_task;
#endif /* __EHEA_H__ */
......@@ -99,7 +99,7 @@ MODULE_PARM_DESC(use_lro, " Large Receive Offload, 1: enable, 0: disable, "
static int port_name_cnt;
static LIST_HEAD(adapter_list);
u64 ehea_driver_flags;
static unsigned long ehea_driver_flags;
struct work_struct ehea_rereg_mr_task;
static DEFINE_MUTEX(dlpar_mem_lock);
struct ehea_fw_handle_array ehea_fw_handles;
......
......@@ -944,7 +944,7 @@ static void enc28j60_hw_rx(struct net_device *ndev)
if (netif_msg_rx_status(priv))
enc28j60_dump_rsv(priv, __func__, next_packet, len, rxstat);
if (!RSV_GETBIT(rxstat, RSV_RXOK)) {
if (!RSV_GETBIT(rxstat, RSV_RXOK) || len > MAX_FRAMELEN) {
if (netif_msg_rx_err(priv))
dev_err(&ndev->dev, "Rx Error (%04x)\n", rxstat);
ndev->stats.rx_errors++;
......@@ -952,6 +952,8 @@ static void enc28j60_hw_rx(struct net_device *ndev)
ndev->stats.rx_crc_errors++;
if (RSV_GETBIT(rxstat, RSV_LENCHECKERR))
ndev->stats.rx_frame_errors++;
if (len > MAX_FRAMELEN)
ndev->stats.rx_over_errors++;
} else {
skb = dev_alloc_skb(len + NET_IP_ALIGN);
if (!skb) {
......
......@@ -75,7 +75,7 @@
#include "myri10ge_mcp.h"
#include "myri10ge_mcp_gen_header.h"
#define MYRI10GE_VERSION_STR "1.4.4-1.395"
#define MYRI10GE_VERSION_STR "1.4.4-1.398"
MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
MODULE_AUTHOR("Maintainer: help@myri.com");
......@@ -3929,6 +3929,10 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
myri10ge_dummy_rdma(mgp, 0);
abort_with_ioremap:
if (mgp->mac_addr_string != NULL)
dev_err(&pdev->dev,
"myri10ge_probe() failed: MAC=%s, SN=%ld\n",
mgp->mac_addr_string, mgp->serial_number);
iounmap(mgp->sram);
abort_with_mtrr:
......
......@@ -818,15 +818,6 @@ struct tx_doorbell_context {
};
/* DATA STRUCTURES SHARED WITH HARDWARE. */
struct bq_element {
u32 addr_lo;
#define BQ_END 0x00000001
#define BQ_CONT 0x00000002
#define BQ_MASK 0x00000003
u32 addr_hi;
} __attribute((packed));
struct tx_buf_desc {
__le64 addr;
__le32 len;
......@@ -860,8 +851,8 @@ struct ob_mac_iocb_req {
__le16 frame_len;
#define OB_MAC_IOCB_LEN_MASK 0x3ffff
__le16 reserved2;
__le32 tid;
__le32 txq_idx;
u32 tid;
u32 txq_idx;
__le32 reserved3;
__le16 vlan_tci;
__le16 reserved4;
......@@ -880,8 +871,8 @@ struct ob_mac_iocb_rsp {
u8 flags2; /* */
u8 flags3; /* */
#define OB_MAC_IOCB_RSP_B 0x80 /* */
__le32 tid;
__le32 txq_idx;
u32 tid;
u32 txq_idx;
__le32 reserved[13];
} __attribute((packed));
......@@ -903,8 +894,8 @@ struct ob_mac_tso_iocb_req {
#define OB_MAC_TSO_IOCB_V 0x04
__le32 reserved1[2];
__le32 frame_len;
__le32 tid;
__le32 txq_idx;
u32 tid;
u32 txq_idx;
__le16 total_hdrs_len;
__le16 net_trans_offset;
#define OB_MAC_TRANSPORT_HDR_SHIFT 6
......@@ -925,8 +916,8 @@ struct ob_mac_tso_iocb_rsp {
u8 flags2; /* */
u8 flags3; /* */
#define OB_MAC_TSO_IOCB_RSP_B 0x8000
__le32 tid;
__le32 txq_idx;
u32 tid;
u32 txq_idx;
__le32 reserved2[13];
} __attribute((packed));
......@@ -979,10 +970,11 @@ struct ib_mac_iocb_rsp {
__le16 reserved1;
__le32 reserved2[6];
__le32 flags4;
#define IB_MAC_IOCB_RSP_HV 0x20000000 /* */
#define IB_MAC_IOCB_RSP_HS 0x40000000 /* */
#define IB_MAC_IOCB_RSP_HL 0x80000000 /* */
u8 reserved3[3];
u8 flags4;
#define IB_MAC_IOCB_RSP_HV 0x20
#define IB_MAC_IOCB_RSP_HS 0x40
#define IB_MAC_IOCB_RSP_HL 0x80
__le32 hdr_len; /* */
__le32 hdr_addr_lo; /* */
__le32 hdr_addr_hi; /* */
......@@ -1126,7 +1118,7 @@ struct map_list {
struct tx_ring_desc {
struct sk_buff *skb;
struct ob_mac_iocb_req *queue_entry;
int index;
u32 index;
struct oal oal;
struct map_list map[MAX_SKB_FRAGS + 1];
int map_cnt;
......@@ -1138,8 +1130,8 @@ struct bq_desc {
struct page *lbq_page;
struct sk_buff *skb;
} p;
struct bq_element *bq;
int index;
__le64 *addr;
u32 index;
DECLARE_PCI_UNMAP_ADDR(mapaddr);
DECLARE_PCI_UNMAP_LEN(maplen);
};
......@@ -1189,7 +1181,7 @@ struct rx_ring {
u32 cq_size;
u32 cq_len;
u16 cq_id;
u32 *prod_idx_sh_reg; /* Shadowed producer register. */
volatile __le32 *prod_idx_sh_reg; /* Shadowed producer register. */
dma_addr_t prod_idx_sh_reg_dma;
void __iomem *cnsmr_idx_db_reg; /* PCI doorbell mem area + 0 */
u32 cnsmr_idx; /* current sw idx */
......@@ -1467,21 +1459,6 @@ static inline void ql_write_db_reg(u32 val, void __iomem *addr)
mmiowb();
}
/*
* Shadow Registers:
* Outbound queues have a consumer index that is maintained by the chip.
* Inbound queues have a producer index that is maintained by the chip.
* For lower overhead, these registers are "shadowed" to host memory
* which allows the device driver to track the queue progress without
* PCI reads. When an entry is placed on an inbound queue, the chip will
* update the relevant index register and then copy the value to the
* shadow register in host memory.
*/
static inline unsigned int ql_read_sh_reg(const volatile void *addr)
{
return *(volatile unsigned int __force *)addr;
}
extern char qlge_driver_name[];
extern const char qlge_driver_version[];
extern const struct ethtool_ops qlge_ethtool_ops;
......
......@@ -821,14 +821,11 @@ void ql_dump_ib_mac_rsp(struct ib_mac_iocb_rsp *ib_mac_rsp)
le16_to_cpu(ib_mac_rsp->vlan_id));
printk(KERN_ERR PFX "flags4 = %s%s%s.\n",
le32_to_cpu(ib_mac_rsp->
flags4) & IB_MAC_IOCB_RSP_HV ? "HV " : "",
le32_to_cpu(ib_mac_rsp->
flags4) & IB_MAC_IOCB_RSP_HS ? "HS " : "",
le32_to_cpu(ib_mac_rsp->
flags4) & IB_MAC_IOCB_RSP_HL ? "HL " : "");
if (le32_to_cpu(ib_mac_rsp->flags4) & IB_MAC_IOCB_RSP_HV) {
ib_mac_rsp->flags4 & IB_MAC_IOCB_RSP_HV ? "HV " : "",
ib_mac_rsp->flags4 & IB_MAC_IOCB_RSP_HS ? "HS " : "",
ib_mac_rsp->flags4 & IB_MAC_IOCB_RSP_HL ? "HL " : "");
if (ib_mac_rsp->flags4 & IB_MAC_IOCB_RSP_HV) {
printk(KERN_ERR PFX "hdr length = %d.\n",
le32_to_cpu(ib_mac_rsp->hdr_len));
printk(KERN_ERR PFX "hdr addr_hi = 0x%x.\n",
......
......@@ -56,9 +56,9 @@ static int ql_update_ring_coalescing(struct ql_adapter *qdev)
for (i = 1; i < qdev->rss_ring_first_cq_id; i++, rx_ring++) {
rx_ring = &qdev->rx_ring[i];
cqicb = (struct cqicb *)rx_ring;
cqicb->irq_delay = le16_to_cpu(qdev->tx_coalesce_usecs);
cqicb->irq_delay = cpu_to_le16(qdev->tx_coalesce_usecs);
cqicb->pkt_delay =
le16_to_cpu(qdev->tx_max_coalesced_frames);
cpu_to_le16(qdev->tx_max_coalesced_frames);
cqicb->flags = FLAGS_LI;
status = ql_write_cfg(qdev, cqicb, sizeof(cqicb),
CFG_LCQ, rx_ring->cq_id);
......@@ -79,9 +79,9 @@ static int ql_update_ring_coalescing(struct ql_adapter *qdev)
i++) {
rx_ring = &qdev->rx_ring[i];
cqicb = (struct cqicb *)rx_ring;
cqicb->irq_delay = le16_to_cpu(qdev->rx_coalesce_usecs);
cqicb->irq_delay = cpu_to_le16(qdev->rx_coalesce_usecs);
cqicb->pkt_delay =
le16_to_cpu(qdev->rx_max_coalesced_frames);
cpu_to_le16(qdev->rx_max_coalesced_frames);
cqicb->flags = FLAGS_LI;
status = ql_write_cfg(qdev, cqicb, sizeof(cqicb),
CFG_LCQ, rx_ring->cq_id);
......
This diff is collapsed.
......@@ -42,11 +42,11 @@
#include <linux/mii.h>
#include <linux/if_vlan.h>
#include <linux/mm.h>
#include <linux/firmware.h>
#include <asm/processor.h> /* Processor type for cache alignment. */
#include <asm/uaccess.h>
#include <asm/io.h>
#include "starfire_firmware.h"
/*
* The current frame processor firmware fails to checksum a fragment
* of length 1. If and when this is fixed, the #define below can be removed.
......@@ -173,6 +173,10 @@ static int full_duplex[MAX_UNITS] = {0, };
#define skb_first_frag_len(skb) skb_headlen(skb)
#define skb_num_frags(skb) (skb_shinfo(skb)->nr_frags + 1)
/* Firmware names */
#define FIRMWARE_RX "adaptec/starfire_rx.bin"
#define FIRMWARE_TX "adaptec/starfire_tx.bin"
/* These identify the driver base version and may not be removed. */
static char version[] =
KERN_INFO "starfire.c:v1.03 7/26/2000 Written by Donald Becker <becker@scyld.com>\n"
......@@ -182,6 +186,8 @@ MODULE_AUTHOR("Donald Becker <becker@scyld.com>");
MODULE_DESCRIPTION("Adaptec Starfire Ethernet driver");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
MODULE_FIRMWARE(FIRMWARE_RX);
MODULE_FIRMWARE(FIRMWARE_TX);
module_param(max_interrupt_work, int, 0);
module_param(mtu, int, 0);
......@@ -902,9 +908,12 @@ static void mdio_write(struct net_device *dev, int phy_id, int location, int val
static int netdev_open(struct net_device *dev)
{
const struct firmware *fw_rx, *fw_tx;
const __be32 *fw_rx_data, *fw_tx_data;
struct netdev_private *np = netdev_priv(dev);
void __iomem *ioaddr = np->base;
int i, retval;
size_t tx_size, rx_size;
size_t tx_done_q_size, rx_done_q_size, tx_ring_size, rx_ring_size;
/* Do we ever need to reset the chip??? */
......@@ -1040,11 +1049,40 @@ static int netdev_open(struct net_device *dev)
writel(ETH_P_8021Q, ioaddr + VlanType);
#endif /* VLAN_SUPPORT */
retval = request_firmware(&fw_rx, FIRMWARE_RX, &np->pci_dev->dev);
if (retval) {
printk(KERN_ERR "starfire: Failed to load firmware \"%s\"\n",
FIRMWARE_RX);
return retval;
}
if (fw_rx->size % 4) {
printk(KERN_ERR "starfire: bogus length %zu in \"%s\"\n",
fw_rx->size, FIRMWARE_RX);
retval = -EINVAL;
goto out_rx;
}
retval = request_firmware(&fw_tx, FIRMWARE_TX, &np->pci_dev->dev);
if (retval) {
printk(KERN_ERR "starfire: Failed to load firmware \"%s\"\n",
FIRMWARE_TX);
goto out_rx;
}
if (fw_tx->size % 4) {
printk(KERN_ERR "starfire: bogus length %zu in \"%s\"\n",
fw_tx->size, FIRMWARE_TX);
retval = -EINVAL;
goto out_tx;
}
fw_rx_data = (const __be32 *)&fw_rx->data[0];
fw_tx_data = (const __be32 *)&fw_tx->data[0];
rx_size = fw_rx->size / 4;
tx_size = fw_tx->size / 4;
/* Load Rx/Tx firmware into the frame processors */
for (i = 0; i < FIRMWARE_RX_SIZE * 2; i++)
writel(firmware_rx[i], ioaddr + RxGfpMem + i * 4);
for (i = 0; i < FIRMWARE_TX_SIZE * 2; i++)
writel(firmware_tx[i], ioaddr + TxGfpMem + i * 4);
for (i = 0; i < rx_size; i++)
writel(be32_to_cpup(&fw_rx_data[i]), ioaddr + RxGfpMem + i * 4);
for (i = 0; i < tx_size; i++)
writel(be32_to_cpup(&fw_tx_data[i]), ioaddr + TxGfpMem + i * 4);
if (enable_hw_cksum)
/* Enable the Rx and Tx units, and the Rx/Tx frame processors. */
writel(TxEnable|TxGFPEnable|RxEnable|RxGFPEnable, ioaddr + GenCtrl);
......@@ -1056,7 +1094,11 @@ static int netdev_open(struct net_device *dev)
printk(KERN_DEBUG "%s: Done netdev_open().\n",
dev->name);
return 0;
out_tx:
release_firmware(fw_tx);
out_rx:
release_firmware(fw_rx);
return retval;
}
......
/*
* Copyright 2003 Adaptec, Inc.
*
* Please read the following license before using the Adaptec Software
* ("Program"). If you do not agree to the license terms, do not use the
* Program:
*
* You agree to be bound by version 2 of the General Public License ("GPL")
* dated June 1991, which can be found at http://www.fsf.org/licenses/gpl.html.
* If the link is broken, write to Free Software Foundation, 59 Temple Place,
* Boston, Massachusetts 02111-1307.
*
* BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE IT IS LICENSED "AS IS" AND
* THERE IS NO WARRANTY FOR THE PROGRAM, INCLUDING BUT NOT LIMITED TO THE
* IMPLIED WARRANTIES OF MERCHANTIBILITY OR FITNESS FOR A PARTICULAR PURPOSE
* (TO THE EXTENT PERMITTED BY APPLICABLE LAW). USE OF THE PROGRAM IS AT YOUR
* OWN RISK. IN NO EVENT WILL ADAPTEC OR ITS LICENSORS BE LIABLE TO YOU FOR
* DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
* ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM.
*
*/
static const u32 firmware_rx[] = {
0x010003dc, 0x00000000,
0x04000421, 0x00000086,
0x80000015, 0x0000180e,
0x81000015, 0x00006664,
0x1a0040ab, 0x00000b06,
0x14200011, 0x00000000,
0x14204022, 0x0000aaaa,
0x14204022, 0x00000300,
0x14204022, 0x00000000,
0x1a0040ab, 0x00000b14,
0x14200011, 0x00000000,
0x83000015, 0x00000002,
0x04000021, 0x00000000,
0x00000010, 0x00000000,
0x04000421, 0x00000087,
0x00000010, 0x00000000,
0x00000010, 0x00000000,
0x00008015, 0x00000000,
0x0000003e, 0x00000000,
0x00000010, 0x00000000,
0x82000015, 0x00004000,
0x009e8050, 0x00000000,
0x03008015, 0x00000000,
0x86008015, 0x00000000,
0x82000015, 0x00008000,
0x0100001c, 0x00000000,
0x000050a0, 0x0000010c,
0x4e20d011, 0x00006008,
0x1420d012, 0x00004008,
0x0000f090, 0x00007000,
0x0000c8b0, 0x00003000,
0x00004040, 0x00000000,
0x00108015, 0x00000000,
0x00a2c150, 0x00004000,
0x00a400b0, 0x00000014,
0x00000020, 0x00000000,
0x2500400d, 0x00002525,
0x00047220, 0x00003100,
0x00934070, 0x00000000,
0x00000020, 0x00000000,
0x00924460, 0x00000184,
0x2b20c011, 0x00000000,
0x0000c420, 0x00000540,
0x36014018, 0x0000422d,
0x14200011, 0x00000000,
0x00924460, 0x00000183,
0x3200001f, 0x00000034,
0x02ac0015, 0x00000002,
0x00a60110, 0x00000008,
0x42200011, 0x00000000,
0x00924060, 0x00000103,
0x0000001e, 0x00000000,
0x00000020, 0x00000100,
0x0000001e, 0x00000000,
0x00924460, 0x00000086,
0x00004080, 0x00000000,
0x0092c070, 0x00000000,
0x00924060, 0x00000100,
0x0000c890, 0x00005000,
0x00a6c110, 0x00000000,
0x00b0c090, 0x00000012,
0x021c0015, 0x00000000,
0x3200001f, 0x00000034,
0x00924460, 0x00000510,
0x44210011, 0x00000000,
0x42000011, 0x00000000,
0x83000015, 0x00000040,
0x00924460, 0x00000508,
0x45014018, 0x00004545,
0x00808050, 0x00000000,
0x62208012, 0x00000000,
0x82000015, 0x00000800,
0x15200011, 0x00000000,
0x00000010, 0x00000000,
0x00000010, 0x00000000,
0x00000010, 0x00000000,
0x00000010, 0x00000000,
0x00000010, 0x00000000,
0x80000015, 0x0000eea4,
0x81000015, 0x0000005f,
0x00000060, 0x00000000,
0x00004120, 0x00000000,
0x00004a00, 0x00004000,
0x00924460, 0x00000190,
0x5601401a, 0x00005956,
0x14000011, 0x00000000,
0x00934050, 0x00000018,
0x00930050, 0x00000018,
0x3601403a, 0x0000002d,
0x000643a9, 0x00000000,
0x0000c420, 0x00000140,
0x5601401a, 0x00005956,
0x14000011, 0x00000000,
0x00000010, 0x00000000,
0x00000010, 0x00000000,
0x000642a9, 0x00000000,
0x00024420, 0x00000183,
0x5601401a, 0x00005956,
0x82000015, 0x00002000,
0x15200011, 0x00000000,
0x82000015, 0x00000010,
0x15200011, 0x00000000,
0x82000015, 0x00000010,
0x15200011, 0x00000000,
}; /* 104 Rx instructions */
#define FIRMWARE_RX_SIZE 104
static const u32 firmware_tx[] = {
0x010003dc, 0x00000000,
0x04000421, 0x00000086,
0x80000015, 0x0000180e,
0x81000015, 0x00006664,
0x1a0040ab, 0x00000b06,
0x14200011, 0x00000000,
0x14204022, 0x0000aaaa,
0x14204022, 0x00000300,
0x14204022, 0x00000000,
0x1a0040ab, 0x00000b14,
0x14200011, 0x00000000,
0x83000015, 0x00000002,
0x04000021, 0x00000000,
0x00000010, 0x00000000,
0x04000421, 0x00000087,
0x00000010, 0x00000000,
0x00000010, 0x00000000,
0x00008015, 0x00000000,
0x0000003e, 0x00000000,
0x00000010, 0x00000000,
0x82000015, 0x00004000,
0x009e8050, 0x00000000,
0x03008015, 0x00000000,
0x86008015, 0x00000000,
0x82000015, 0x00008000,
0x0100001c, 0x00000000,
0x000050a0, 0x0000010c,
0x4e20d011, 0x00006008,
0x1420d012, 0x00004008,
0x0000f090, 0x00007000,
0x0000c8b0, 0x00003000,
0x00004040, 0x00000000,
0x00108015, 0x00000000,
0x00a2c150, 0x00004000,
0x00a400b0, 0x00000014,
0x00000020, 0x00000000,
0x2500400d, 0x00002525,
0x00047220, 0x00003100,
0x00934070, 0x00000000,
0x00000020, 0x00000000,
0x00924460, 0x00000184,
0x2b20c011, 0x00000000,
0x0000c420, 0x00000540,
0x36014018, 0x0000422d,
0x14200011, 0x00000000,
0x00924460, 0x00000183,
0x3200001f, 0x00000034,
0x02ac0015, 0x00000002,
0x00a60110, 0x00000008,
0x42200011, 0x00000000,
0x00924060, 0x00000103,
0x0000001e, 0x00000000,
0x00000020, 0x00000100,
0x0000001e, 0x00000000,
0x00924460, 0x00000086,
0x00004080, 0x00000000,
0x0092c070, 0x00000000,
0x00924060, 0x00000100,
0x0000c890, 0x00005000,
0x00a6c110, 0x00000000,
0x00b0c090, 0x00000012,
0x021c0015, 0x00000000,
0x3200001f, 0x00000034,
0x00924460, 0x00000510,
0x44210011, 0x00000000,
0x42000011, 0x00000000,
0x83000015, 0x00000040,
0x00924460, 0x00000508,
0x45014018, 0x00004545,
0x00808050, 0x00000000,
0x62208012, 0x00000000,
0x82000015, 0x00000800,
0x15200011, 0x00000000,
0x00000010, 0x00000000,
0x00000010, 0x00000000,
0x00000010, 0x00000000,
0x00000010, 0x00000000,
0x00000010, 0x00000000,
0x80000015, 0x0000eea4,
0x81000015, 0x0000005f,
0x00000060, 0x00000000,
0x00004120, 0x00000000,
0x00004a00, 0x00004000,
0x00924460, 0x00000190,
0x5601401a, 0x00005956,
0x14000011, 0x00000000,
0x00934050, 0x00000018,
0x00930050, 0x00000018,
0x3601403a, 0x0000002d,
0x000643a9, 0x00000000,
0x0000c420, 0x00000140,
0x5601401a, 0x00005956,
0x14000011, 0x00000000,
0x00000010, 0x00000000,
0x00000010, 0x00000000,
0x000642a9, 0x00000000,
0x00024420, 0x00000183,
0x5601401a, 0x00005956,
0x82000015, 0x00002000,
0x15200011, 0x00000000,
0x82000015, 0x00000010,
0x15200011, 0x00000000,
0x82000015, 0x00000010,
0x15200011, 0x00000000,
}; /* 104 Tx instructions */
#define FIRMWARE_TX_SIZE 104
#if 0
static const u32 firmware_wol[] = {
0x010003dc, 0x00000000,
0x19000421, 0x00000087,
0x80000015, 0x00001a1a,
0x81000015, 0x00001a1a,
0x1a0040ab, 0x00000b06,
0x15200011, 0x00000000,
0x15204022, 0x0000aaaa,
0x15204022, 0x00000300,
0x15204022, 0x00000000,
0x1a0040ab, 0x00000b15,
0x15200011, 0x00000000,
0x83000015, 0x00000002,
0x04000021, 0x00000000,
0x00000010, 0x00000000,
0x04000421, 0x00000087,
0x00000010, 0x00000000,
0x00000010, 0x00000000,
0x00008015, 0x00000000,
0x0000003e, 0x00000000,
0x00000010, 0x00000000,
0x00000010, 0x00000000,
0x82000015, 0x00004000,
0x82000015, 0x00008000,
0x0000000c, 0x00000000,
0x00000010, 0x00000000,
0x00004080, 0x00000100,
0x1f20c011, 0x00001122,
0x2720f011, 0x00003011,
0x19200071, 0x00000000,
0x1a200051, 0x00000000,
0x00000010, 0x00000000,
0x00000010, 0x00000000,
0x1d2040a4, 0x00003344,
0x1d2040a2, 0x00005566,
0x000040a0, 0x00000100,
0x00108050, 0x00000001,
0x1a208012, 0x00000006,
0x82000015, 0x00008080,
0x010003dc, 0x00000000,
0x1d2040a4, 0x00002233,
0x1d2040a4, 0x00004455,
0x2d208011, 0x00000005,
0x1d2040a4, 0x00006611,
0x00108050, 0x00000001,
0x27200011, 0x00000000,
0x1d2050a4, 0x00006600,
0x82000015, 0x00008080,
0x010003dc, 0x00000000,
0x00000050, 0x00000000,
0x1b200031, 0x00000000,
0x0000001e, 0x00000000,
0x0000001e, 0x00000000,
0x0000001e, 0x00000000,
0x0000001e, 0x00000000,
0x00924460, 0x00000086,
0x00004080, 0x00000000,
0x0092c070, 0x00000000,
0x00924060, 0x00000100,
0x0000c890, 0x00005000,
0x00a6c110, 0x00000000,
0x00b0c090, 0x00000012,
0x021c0015, 0x00000000,
0x3200001f, 0x00000034,
0x00924460, 0x00000510,
0x44210011, 0x00000000,
0x42000011, 0x00000000,
0x83000015, 0x00000040,
0x00924460, 0x00000508,
0x476a0012, 0x00000100,
0x83000015, 0x00000008,
0x16200011, 0x00000000,
0x001e8050, 0x00000000,
0x001e8050, 0x00000000,
0x00808050, 0x00000000,
0x03008015, 0x00000000,
0x62208012, 0x00000000,
0x82000015, 0x00000800,
0x16200011, 0x00000000,
0x80000015, 0x0000eea4,
0x81000015, 0x0000005f,
0x00000020, 0x00000000,
0x00004120, 0x00000000,
0x00004a00, 0x00004000,
0x00924460, 0x00000190,
0x5c01401a, 0x0000595c,
0x15000011, 0x00000000,
0x00934050, 0x00000018,
0x00930050, 0x00000018,
0x3601403a, 0x0000002d,
0x00064029, 0x00000000,
0x0000c420, 0x00000140,
0x5c01401a, 0x0000595c,
0x15000011, 0x00000000,
0x00000010, 0x00000000,
0x00000010, 0x00000000,
0x00064029, 0x00000000,
0x00024420, 0x00000183,
0x5c01401a, 0x0000595c,
0x82000015, 0x00002000,
0x16200011, 0x00000000,
0x82000015, 0x00000010,
0x16200011, 0x00000000,
0x82000015, 0x00000010,
0x16200011, 0x00000000,
}; /* 104 WoL instructions */
#define FIRMWARE_WOL_SIZE 104
#endif
#!/usr/bin/perl
# This script can be used to generate a new starfire_firmware.h
# from GFP_RX.DAT and GFP_TX.DAT, files included with the DDK
# and also with the Novell drivers.
open FW, "GFP_RX.DAT" || die;
open FWH, ">starfire_firmware.h" || die;
printf(FWH "static u32 firmware_rx[] = {\n");
$counter = 0;
while ($foo = <FW>) {
chomp;
printf(FWH " 0x%s, 0x0000%s,\n", substr($foo, 4, 8), substr($foo, 0, 4));
$counter++;
}
close FW;
open FW, "GFP_TX.DAT" || die;
printf(FWH "};\t/* %d Rx instructions */\n#define FIRMWARE_RX_SIZE %d\n\nstatic u32 firmware_tx[] = {\n", $counter, $counter);
$counter = 0;
while ($foo = <FW>) {
chomp;
printf(FWH " 0x%s, 0x0000%s,\n", substr($foo, 4, 8), substr($foo, 0, 4));
$counter++;
}
close FW;
printf(FWH "};\t/* %d Tx instructions */\n#define FIRMWARE_TX_SIZE %d\n", $counter, $counter);
close(FWH);
This diff is collapsed.
......@@ -2762,6 +2762,10 @@ struct tg3 {
#define SST_25VF0X0_PAGE_SIZE 4098
struct ethtool_coalesce coal;
/* firmware info */
const struct firmware *fw;
u32 fw_len; /* includes BSS */
};
#endif /* !(_T3_H) */
......@@ -213,7 +213,7 @@ static int check_filter(struct tap_filter *filter, const struct sk_buff *skb)
/* Network device part of the driver */
static unsigned int tun_net_id;
static int tun_net_id;
struct tun_net {
struct list_head dev_list;
};
......
......@@ -643,7 +643,6 @@ struct qeth_card_options {
int macaddr_mode;
int fake_broadcast;
int add_hhlen;
int fake_ll;
int layer2;
enum qeth_large_send_types large_send;
int performance_stats;
......
......@@ -287,8 +287,15 @@ int qeth_set_large_send(struct qeth_card *card,
card->options.large_send = type;
switch (card->options.large_send) {
case QETH_LARGE_SEND_EDDP:
card->dev->features |= NETIF_F_TSO | NETIF_F_SG |
if (card->info.type != QETH_CARD_TYPE_IQD) {
card->dev->features |= NETIF_F_TSO | NETIF_F_SG |
NETIF_F_HW_CSUM;
} else {
card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG |
NETIF_F_HW_CSUM);
card->options.large_send = QETH_LARGE_SEND_NO;
rc = -EOPNOTSUPP;
}
break;
case QETH_LARGE_SEND_TSO:
if (qeth_is_supported(card, IPA_OUTBOUND_TSO)) {
......@@ -572,6 +579,10 @@ static void qeth_send_control_data_cb(struct qeth_channel *channel,
card = CARD_FROM_CDEV(channel->ccwdev);
if (qeth_check_idx_response(iob->data)) {
qeth_clear_ipacmd_list(card);
if (((iob->data[2] & 0xc0) == 0xc0) && iob->data[4] == 0xf6)
dev_err(&card->gdev->dev,
"The qeth device is not configured "
"for the OSI layer required by z/VM\n");
qeth_schedule_recovery(card);
goto out;
}
......@@ -1072,7 +1083,6 @@ static void qeth_set_intial_options(struct qeth_card *card)
card->options.macaddr_mode = QETH_TR_MACADDR_NONCANONICAL;
card->options.fake_broadcast = 0;
card->options.add_hhlen = DEFAULT_ADD_HHLEN;
card->options.fake_ll = 0;
card->options.performance_stats = 0;
card->options.rx_sg_cb = QETH_RX_SG_CB;
}
......@@ -1682,6 +1692,7 @@ int qeth_send_control_data(struct qeth_card *card, int len,
unsigned long flags;
struct qeth_reply *reply = NULL;
unsigned long timeout;
struct qeth_ipa_cmd *cmd;
QETH_DBF_TEXT(TRACE, 2, "sendctl");
......@@ -1728,17 +1739,34 @@ int qeth_send_control_data(struct qeth_card *card, int len,
wake_up(&card->wait_q);
return rc;
}
while (!atomic_read(&reply->received)) {
if (time_after(jiffies, timeout)) {
spin_lock_irqsave(&reply->card->lock, flags);
list_del_init(&reply->list);
spin_unlock_irqrestore(&reply->card->lock, flags);
reply->rc = -ETIME;
atomic_inc(&reply->received);
wake_up(&reply->wait_q);
}
cpu_relax();
};
/* we have only one long running ipassist, since we can ensure
process context of this command we can sleep */
cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
if ((cmd->hdr.command == IPA_CMD_SETIP) &&
(cmd->hdr.prot_version == QETH_PROT_IPV4)) {
if (!wait_event_timeout(reply->wait_q,
atomic_read(&reply->received), timeout))
goto time_err;
} else {
while (!atomic_read(&reply->received)) {
if (time_after(jiffies, timeout))
goto time_err;
cpu_relax();
};
}
rc = reply->rc;
qeth_put_reply(reply);
return rc;
time_err:
spin_lock_irqsave(&reply->card->lock, flags);
list_del_init(&reply->list);
spin_unlock_irqrestore(&reply->card->lock, flags);
reply->rc = -ETIME;
atomic_inc(&reply->received);
wake_up(&reply->wait_q);
rc = reply->rc;
qeth_put_reply(reply);
return rc;
......@@ -2250,7 +2278,8 @@ void qeth_print_status_message(struct qeth_card *card)
}
/* fallthrough */
case QETH_CARD_TYPE_IQD:
if (card->info.guestlan) {
if ((card->info.guestlan) ||
(card->info.mcl_level[0] & 0x80)) {
card->info.mcl_level[0] = (char) _ebcasc[(__u8)
card->info.mcl_level[0]];
card->info.mcl_level[1] = (char) _ebcasc[(__u8)
......
......@@ -1126,9 +1126,11 @@ static int qeth_l2_recover(void *ptr)
dev_info(&card->gdev->dev,
"Device successfully recovered!\n");
else {
rtnl_lock();
dev_close(card->dev);
rtnl_unlock();
if (card->dev) {
rtnl_lock();
dev_close(card->dev);
rtnl_unlock();
}
dev_warn(&card->gdev->dev, "The qeth device driver "
"failed to recover an error on the device\n");
}
......
......@@ -1047,7 +1047,7 @@ static int qeth_l3_setadapter_parms(struct qeth_card *card)
rc = qeth_setadpparms_change_macaddr(card);
if (rc)
dev_warn(&card->gdev->dev, "Reading the adapter MAC"
" address failed\n", rc);
" address failed\n");
}
if ((card->info.link_type == QETH_LINK_TYPE_HSTR) ||
......@@ -1207,12 +1207,9 @@ static int qeth_l3_start_ipa_source_mac(struct qeth_card *card)
QETH_DBF_TEXT(TRACE, 3, "stsrcmac");
if (!card->options.fake_ll)
return -EOPNOTSUPP;
if (!qeth_is_supported(card, IPA_SOURCE_MAC)) {
dev_info(&card->gdev->dev,
"Inbound source address not supported on %s\n",
"Inbound source MAC-address not supported on %s\n",
QETH_CARD_IFNAME(card));
return -EOPNOTSUPP;
}
......@@ -1221,7 +1218,7 @@ static int qeth_l3_start_ipa_source_mac(struct qeth_card *card)
IPA_CMD_ASS_START, 0);
if (rc)
dev_warn(&card->gdev->dev,
"Starting proxy ARP support for %s failed\n",
"Starting source MAC-address support for %s failed\n",
QETH_CARD_IFNAME(card));
return rc;
}
......@@ -1921,8 +1918,13 @@ static inline __u16 qeth_l3_rebuild_skb(struct qeth_card *card,
memcpy(tg_addr, card->dev->dev_addr,
card->dev->addr_len);
}
card->dev->header_ops->create(skb, card->dev, prot, tg_addr,
"FAKELL", card->dev->addr_len);
if (hdr->hdr.l3.ext_flags & QETH_HDR_EXT_SRC_MAC_ADDR)
card->dev->header_ops->create(skb, card->dev, prot,
tg_addr, &hdr->hdr.l3.dest_addr[2],
card->dev->addr_len);
else
card->dev->header_ops->create(skb, card->dev, prot,
tg_addr, "FAKELL", card->dev->addr_len);
}
#ifdef CONFIG_TR
......@@ -2080,9 +2082,11 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode)
if (recovery_mode)
qeth_l3_stop(card->dev);
else {
rtnl_lock();
dev_close(card->dev);
rtnl_unlock();
if (card->dev) {
rtnl_lock();
dev_close(card->dev);
rtnl_unlock();
}
}
if (!card->use_hard_stop) {
rc = qeth_send_stoplan(card);
......
......@@ -20,6 +20,15 @@ fw-external-y := $(subst ",,$(CONFIG_EXTRA_FIRMWARE))
# accurate. In the latter case it doesn't matter -- it'll use $(fw-shipped-all).
# But be aware that the config file might not be included at all.
ifdef CONFIG_ACENIC_OMIT_TIGON_I
acenic-objs := acenic/tg2.bin
fw-shipped- += acenic/tg1.bin
else
acenic-objs := acenic/tg1.bin acenic/tg2.bin
endif
fw-shipped-$(CONFIG_ACENIC) += $(acenic-objs)
fw-shipped-$(CONFIG_ADAPTEC_STARFIRE) += adaptec/starfire_rx.bin \
adaptec/starfire_tx.bin
fw-shipped-$(CONFIG_ATARI_DSP56K) += dsp56k/bootstrap.bin
fw-shipped-$(CONFIG_ATM_AMBASSADOR) += atmsar11.fw
fw-shipped-$(CONFIG_CASSINI) += sun/cassini.bin
......@@ -38,6 +47,8 @@ fw-shipped-$(CONFIG_SND_SB16_CSP) += sb16/mulaw_main.csp sb16/alaw_main.csp \
sb16/ima_adpcm_capture.csp
fw-shipped-$(CONFIG_SND_YMFPCI) += yamaha/ds1_ctrl.fw yamaha/ds1_dsp.fw \
yamaha/ds1e_ctrl.fw
fw-shipped-$(CONFIG_TIGON3) += tigon/tg3.bin tigon/tg3_tso.bin \
tigon/tg3_tso5.bin
fw-shipped-$(CONFIG_USB_DABUSB) += dabusb/firmware.fw dabusb/bitstream.bin
fw-shipped-$(CONFIG_USB_EMI26) += emi26/loader.fw emi26/firmware.fw \
emi26/bitstream.fw
......
......@@ -360,3 +360,52 @@ License: GPLv2 or OpenIB.org BSD license, no source visible
--------------------------------------------------------------------------
Driver: acenic -- Alteon AceNIC Gigabit Ethernet card
File: acenic/tg1.bin
File: acenic/tg2.bin
Licence: Unknown
Found in hex form in kernel source, but source allegedly available at
http://alteon.shareable.org/
--------------------------------------------------------------------------
Driver: tigon3 -- Broadcom Tigon3 based gigabit Ethernet cards
File: tigon/tg3.bin
File: tigon/tg3_tso.bin
File: tigon/tg3_tso5.bin
Licence:
* Firmware is:
* Derived from proprietary unpublished source code,
* Copyright (C) 2000-2003 Broadcom Corporation.
*
* Permission is hereby granted for the distribution of this firmware
* data in hexadecimal or equivalent format, provided this copyright
* notice is accompanying it.
Found in hex form in kernel source.
--------------------------------------------------------------------------
Driver: ADAPTEC_STARFIRE - Adaptec Starfire/DuraLAN support
File: adaptec/starfire_rx.bin
File: adaptec/starfire_tx.bin
Licence: Allegedly GPLv2, but no source visible.
Found in hex form in kernel source, with the following notice:
BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE IT IS LICENSED "AS IS" AND
THERE IS NO WARRANTY FOR THE PROGRAM, INCLUDING BUT NOT LIMITED TO THE
IMPLIED WARRANTIES OF MERCHANTIBILITY OR FITNESS FOR A PARTICULAR PURPOSE
(TO THE EXTENT PERMITTED BY APPLICABLE LAW). USE OF THE PROGRAM IS AT YOUR
OWN RISK. IN NO EVENT WILL ADAPTEC OR ITS LICENSORS BE LIABLE TO YOU FOR
DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM.
--------------------------------------------------------------------------
This diff is collapsed.
This diff is collapsed.
:10000000010003DC00000000040004210000008661
:10001000800000150000180E8100001500006664C5
:100020001A0040AB00000B06142000110000000075
:10003000142040220000AAAA14204022000003003D
:1000400014204022000000001A0040AB00000B14F6
:1000500014200011000000008300001500000002C1
:10006000040000210000000000000010000000005B
:1000700004000421000000870000001000000000C0
:1000800000000010000000000000801500000000CB
:100090000000003E00000000000000100000000012
:1000A0008200001500004000009E8050000000000B
:1000B000030080150000000086008015000000008D
:1000C00082000015000080000100001C00000000FC
:1000D000000050A00000010C4E20D011000060086C
:1000E0001420D012000040080000F09000007000C2
:1000F0000000C8B0000030000000404000000000D8
:10010000001080150000000000A2C1500000400057
:1001100000A400B000000014000000200000000057
:100120002500400D0000252500047220000031004C
:10013000009340700000000000000020000000005C
:1001400000924460000001842B20C01100000000D8
:100150000000C42000000540360140180000422D78
:100160001420001100000000009244600000018390
:100170003200001F0000003402AC00150000000235
:1001800000A601100000000842200011000000003D
:1001900000924060000001030000001E000000000B
:1001A00000000020000001000000001E0000000010
:1001B00000924460000000860000408000000000C3
:1001C0000092C0700000000000924060000001003A
:1001D0000000C8900000500000A6C1100000000000
:1001E00000B0C09000000012021C001500000000CA
:1001F0003200001F0000003400924460000005102F
:100200004421001100000000420000110000000025
:1002100083000015000000400092446000000508C3
:100220004501401800004545008080500000000056
:10023000622080120000000082000015000008000B
:100240001520001100000000000000100000000058
:10025000000000100000000000000010000000007E
:10026000000000100000000000000010000000006E
:10027000800000150000EEA4810000150000005F62
:1002800000000060000000000000412000000000AD
:1002900000004A000000400000924460000001900D
:1002A0005601401A000059561400001100000000C9
:1002B0000093405000000018009300500000001808
:1002C0003601403A0000002D000643A9000000005E
:1002D0000000C420000001405601401A0000595699
:1002E00014000011000000000000001000000000D9
:1002F0000000001000000000000642A900000000FD
:1003000000024420000001835601401A00005956A3
:1003100082000015000020001520001100000000E0
:1003200082000015000000101520001100000000E0
:1003300082000015000000101520001100000000D0
:00000001FF
:10000000010003DC00000000040004210000008661
:10001000800000150000180E8100001500006664C5
:100020001A0040AB00000B06142000110000000075
:10003000142040220000AAAA14204022000003003D
:1000400014204022000000001A0040AB00000B14F6
:1000500014200011000000008300001500000002C1
:10006000040000210000000000000010000000005B
:1000700004000421000000870000001000000000C0
:1000800000000010000000000000801500000000CB
:100090000000003E00000000000000100000000012
:1000A0008200001500004000009E8050000000000B
:1000B000030080150000000086008015000000008D
:1000C00082000015000080000100001C00000000FC
:1000D000000050A00000010C4E20D011000060086C
:1000E0001420D012000040080000F09000007000C2
:1000F0000000C8B0000030000000404000000000D8
:10010000001080150000000000A2C1500000400057
:1001100000A400B000000014000000200000000057
:100120002500400D0000252500047220000031004C
:10013000009340700000000000000020000000005C
:1001400000924460000001842B20C01100000000D8
:100150000000C42000000540360140180000422D78
:100160001420001100000000009244600000018390
:100170003200001F0000003402AC00150000000235
:1001800000A601100000000842200011000000003D
:1001900000924060000001030000001E000000000B
:1001A00000000020000001000000001E0000000010
:1001B00000924460000000860000408000000000C3
:1001C0000092C0700000000000924060000001003A
:1001D0000000C8900000500000A6C1100000000000
:1001E00000B0C09000000012021C001500000000CA
:1001F0003200001F0000003400924460000005102F
:100200004421001100000000420000110000000025
:1002100083000015000000400092446000000508C3
:100220004501401800004545008080500000000056
:10023000622080120000000082000015000008000B
:100240001520001100000000000000100000000058
:10025000000000100000000000000010000000007E
:10026000000000100000000000000010000000006E
:10027000800000150000EEA4810000150000005F62
:1002800000000060000000000000412000000000AD
:1002900000004A000000400000924460000001900D
:1002A0005601401A000059561400001100000000C9
:1002B0000093405000000018009300500000001808
:1002C0003601403A0000002D000643A9000000005E
:1002D0000000C420000001405601401A0000595699
:1002E00014000011000000000000001000000000D9
:1002F0000000001000000000000642A900000000FD
:1003000000024420000001835601401A00005956A3
:1003100082000015000020001520001100000000E0
:1003200082000015000000101520001100000000E0
:1003300082000015000000101520001100000000D0
:00000001FF
:10000000000000000800000000000A80000000005E
:1000100010000003000000000000000D0000000DB3
:100020003C1D080037BD3FFC03A0F0213C10080038
:10003000261000000E000018000000000000000D57
:100040003C1D080037BD3FFC03A0F0213C10080018
:10005000261000340E00021C000000000000000DFD
:1000600000000000000000000000000027BDFFE0CD
:100070003C1CC000AFBF0018AF80680C0E00004CE5
:10008000241B210597850000978700029782002C8A
:100090009783002E3C040800248409C0AFA00014FC
:1000A000000214000062182500052C00AFA3001008
:1000B0008F86001000E528250E000060240701024D
:1000C0003C02AC00344201003C03AC01346301004B
:1000D000AF8204903C02FFFFAF820494AF83049888
:1000E000AF82049C24020001AF825CE00E00003F5E
:1000F000AF825D000E000140000000008FBF0018BD
:1001000003E0000827BD00202402FFFFAF82540453
:100110008F83540034630400AF835400AF825404CF
:100120003C02080024420034AF82541C03E0000863
:10013000AF80540000000000000000003C020800F6
:10014000344230003C030800346330003C040800B3
:10015000348437FF3C010800AC220A6424020040CA
:100160003C010800AC220A683C010800AC200A608F
:10017000AC600000246300040083102B5040FFFD9E
:10018000AC60000003E0000800000000008048218F
:100190008FAA00103C0208008C420A603C04080050
:1001A0008C840A688FAB0014244300010044102B98
:1001B0003C010800AC230A60144000030000402109
:1001C0003C010800AC200A603C0208008C420A6036
:1001D0003C0308008C630A64912400000002114073
:1001E000004310210048102125080001A044000010
:1001F000290200081440FFF4252900013C020800F0
:100200008C420A603C0308008C630A648F84680C8B
:100210000002114000431021AC440008AC45000C22
:10022000AC460010AC470014AC4A001803E00008CC
:10023000AC4B001C000000000000000000000000AB
:1002400000000000000000000000000000000000AE
:10025000000000000000000000000000000000009E
:10026000000000000000000000000000000000008E
:10027000000000000000000000000000000000007E
:10028000000000000000000000000000000000006E
:10029000000000000000000000000000000000005E
:1002A000000000000000000000000000000000004E
:1002B000000000000000000000000000000000003E
:1002C000000000000000000000000000000000002E
:1002D000000000000000000000000000000000001E
:1002E000000000000000000000000000000000000E
:1002F00000000000000000000000000000000000FE
:1003000000000000000000000000000002000008E3
:10031000000000000A0001E33C0A00010A0001E3BA
:100320003C0A00020A0001E3000000000A0001E3A9
:10033000000000000A0001E3000000000A0001E3E1
:10034000000000000A0001E3000000000A0001E3D1
:10035000000000000A0001E3000000000A0001E3C1
:10036000000000000A0001E3000000000A0001E3B1
:100370003C0A00070A0001E33C0A00080A0001E306
:100380003C0A00090A0001E3000000000A0001E342
:10039000000000000A0001E33C0A000B0A0001E330
:1003A0003C0A000C0A0001E33C0A000D0A0001E3CC
:1003B000000000000A0001E3000000000A0001E361
:1003C0003C0A000E0A0001E3000000000A0001E3FD
:1003D000000000000A0001E3000000000A0001E341
:1003E000000000000A0001E3000000000A0001E331
:1003F000000000000A0001E3000000000A0001E321
:10040000000000000A0001E33C0A00130A0001E3B7
:100410003C0A001400000000000000000000000082
:1004200000000000000000000000000000000000CC
:1004300000000000000000000000000000000000BC
:1004400000000000000000000000000000000000AC
:10045000000000000000000000000000000000009C
:10046000000000000000000000000000000000008C
:10047000000000000000000000000000000000007C
:10048000000000000000000000000000000000006C
:10049000000000000000000000000000000000005C
:1004A000000000000000000000000000000000004C
:1004B000000000000000000000000000000000003C
:1004C000000000000000000000000000000000002C
:1004D000000000000000000000000000000000001C
:1004E000000000000000000000000000000000000C
:1004F00000000000000000000000000000000000FC
:1005000000000000000000000000000027BDFFE028
:100510000000182100001021AFBF0018AFB1001477
:10052000AFB000103C01080000220821AC200A7086
:100530003C01080000220821AC200A743C0108009C
:1005400000220821AC200A78246300011860FFF51E
:100550002442000C241100018F9068103202000424
:1005600014400005240400013C0208008C420A7873
:1005700018400003000020210E000182000000004E
:100580003202000110400003000000000E0001696B
:10059000000000000A000153AF9150288FBF0018DF
:1005A0008FB100148FB0001003E0000827BD0020B9
:1005B0003C0508008CA50A703C0608008CC60A8021
:1005C0003C0708008CE70A7827BDFFE03C040800E0
:1005D000248409D0AFBF0018AFA000100E00006047
:1005E000AFA000140E00017B000020218FBF001877
:1005F00003E0000827BD0020240200018F8368105B
:1006000000821004000210270062182403E0000892
:10061000AF83681027BDFFD8AFBF00241080002E25
:10062000AFB000208F825CECAFA200188F825CEC30
:100630003C10080026100A78AFA2001C340280008B
:10064000AF825CEC8E020000184000160000000033
:100650003C02080094420A748FA3001C000221C0CF
:10066000AC8300048FA2001C3C0108000E000201B4
:10067000AC220A7410400005000000008E02000049
:10068000244200010A0001DFAE0200003C02080023
:100690008C420A7000021C02000321C00A0001C53E
:1006A000AFA2001C0E000201000000001040001F5D
:1006B000000000008E0200008FA3001C24420001F5
:1006C0003C010800AC230A703C010800AC230A740A
:1006D0000A0001DFAE0200003C10080026100A7874
:1006E0008E02000018400028000000000E000201E9
:1006F0000000000014400024000000008E020000F2
:100700003C0308008C630A702442FFFFAFA3001C67
:1007100018400006AE02000000031402000221C0CF
:100720008C8200043C010800AC220A7097A2001ED3
:100730002442FF002C4203001440000B240240001E
:100740003C040800248409DCAFA00010AFA0001412
:100750008FA6001C240500080E0000600000382150
:100760000A0001DF00000000AF825CF83C020800D4
:100770008C420A408FA3001C24420001AF835CF826
:100780003C010800AC220A408FBF00248FB000203B
:1007900003E0000827BD002827BDFFE03C04080057
:1007A000248409E8000028210000302100003821BD
:1007B000AFBF0018AFA000100E000060AFA0001483
:1007C0008FBF001803E0000827BD00208F82680C4F
:1007D0008F85680C000218270003182B00031823CC
:1007E000004310240044102100A2282B10A0000672
:1007F00000000000004018218F82680C0043102B7D
:100800001440FFFD0000000003E0000800000000AD
:100810003C0408008C8400003C0308008C630A4000
:100820000064102B54400002008310230064102346
:100830002C42000803E000083842000127BDFFE019
:10084000008028213C04080024840A000000302194
:1008500000003821AFBF0018AFA000100E000060EC
:10086000AFA000140A000216000000008FBF00189D
:1008700003E0000827BD00200000000027BDFFE0C6
:100880003C1CC000AFBF00180E00004CAF80680CCD
:100890003C04080024840A10038028210000302131
:1008A00000003821AFA000100E000060AFA00014BF
:1008B0002402FFFFAF8254043C0200AA0E0002345F
:1008C000AF8254348FBF001803E0000827BD00201A
:1008D00000000000000000000000000027BDFFE84D
:1008E000AFB0001024100001AFBF00143C01C003E2
:1008F000AC2000008F8268103042200010400003BE
:10090000000000000E000246000000000A00023A4B
:10091000AF9054288FBF00148FB0001003E0000880
:1009200027BD001827BDFFF88F845D0C3C0200FF37
:100930003C0308008C630A503442FFF80082102404
:100940001043001E3C0500FF34A5FFF83C06C00321
:100950003C074000008518248C6200103C01080010
:10096000AC230A50304200081040000500871025D3
:100970008CC2000024420001ACC200000087102598
:10098000AF825D0C8FA2000024420001AFA20000E4
:100990008FA200008FA2000024420001AFA200003D
:1009A0008FA200008F845D0C3C0308008C630A500A
:1009B000008510241443FFE80085182427BD000893
:1009C00003E000080000000000000000353730316F
:1009D000726C734100000000000000005377457600
:1009E000656E743000000000726C704576656E7440
:1009F00031000000556E6B6E45766E74000000008D
:100A0000000000000000000000000000666174614A
:100A10006C45727200000000000000004D61696EBC
:100A2000437075420000000000000000000000005C
:100A300000000000000000000000000000000000B6
:100A400000000000000000000000000000000000A6
:100A50000000000000000000000000000000000096
:0C0A60000000000000000000000000008A
:00000001FF
* Firmware is:
* Derived from proprietary unpublished source code,
* Copyright (C) 2000-2003 Broadcom Corporation.
*
* Permission is hereby granted for the distribution of this firmware
* data in hexadecimal or equivalent format, provided this copyright
* notice is accompanying it.
This diff is collapsed.
This diff is collapsed.
......@@ -313,10 +313,11 @@ struct napi_struct {
#ifdef CONFIG_NETPOLL
spinlock_t poll_lock;
int poll_owner;
struct net_device *dev;
#endif
struct net_device *dev;
struct list_head dev_list;
struct sk_buff *gro_list;
struct sk_buff *skb;
};
enum
......@@ -990,6 +991,9 @@ struct napi_gro_cb {
/* Number of segments aggregated. */
int count;
/* Free the skb? */
int free;
};
#define NAPI_GRO_CB(skb) ((struct napi_gro_cb *)(skb)->cb)
......@@ -1011,6 +1015,14 @@ struct packet_type {
struct list_head list;
};
struct napi_gro_fraginfo {
skb_frag_t frags[MAX_SKB_FRAGS];
unsigned int nr_frags;
unsigned int ip_summed;
unsigned int len;
__wsum csum;
};
#include <linux/interrupt.h>
#include <linux/notifier.h>
......@@ -1363,6 +1375,8 @@ extern int netif_receive_skb(struct sk_buff *skb);
extern void napi_gro_flush(struct napi_struct *napi);
extern int napi_gro_receive(struct napi_struct *napi,
struct sk_buff *skb);
extern int napi_gro_frags(struct napi_struct *napi,
struct napi_gro_fraginfo *info);
extern void netif_nit_deliver(struct sk_buff *skb);
extern int dev_valid_name(const char *name);
extern int dev_ioctl(struct net *net, unsigned int cmd, void __user *);
......
......@@ -155,9 +155,9 @@ static inline struct neighbour * ndisc_get_neigh(struct net_device *dev, const s
{
if (dev)
return __neigh_lookup(&nd_tbl, addr, dev, 1);
return __neigh_lookup_errno(&nd_tbl, addr, dev);
return NULL;
return ERR_PTR(-ENODEV);
}
......
This diff is collapsed.
......@@ -132,6 +132,9 @@
/* Instead of increasing this, you should create a hash table. */
#define MAX_GRO_SKBS 8
/* This should be increased if a protocol with a bigger head is added. */
#define GRO_MAX_HEAD (MAX_HEADER + 128)
/*
* The list of packet types we will receive (as opposed to discard)
* and the routines to invoke.
......@@ -2345,7 +2348,7 @@ static int napi_gro_complete(struct sk_buff *skb)
struct list_head *head = &ptype_base[ntohs(type) & PTYPE_HASH_MASK];
int err = -ENOENT;
if (!skb_shinfo(skb)->frag_list)
if (NAPI_GRO_CB(skb)->count == 1)
goto out;
rcu_read_lock();
......@@ -2365,6 +2368,7 @@ static int napi_gro_complete(struct sk_buff *skb)
}
out:
skb_shinfo(skb)->gso_size = 0;
__skb_push(skb, -skb_network_offset(skb));
return netif_receive_skb(skb);
}
......@@ -2383,7 +2387,7 @@ void napi_gro_flush(struct napi_struct *napi)
}
EXPORT_SYMBOL(napi_gro_flush);
int napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
static int __napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
{
struct sk_buff **pp = NULL;
struct packet_type *ptype;
......@@ -2392,6 +2396,7 @@ int napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
int count = 0;
int same_flow;
int mac_len;
int free;
if (!(skb->dev->features & NETIF_F_GRO))
goto normal;
......@@ -2408,6 +2413,7 @@ int napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
skb->mac_len = mac_len;
NAPI_GRO_CB(skb)->same_flow = 0;
NAPI_GRO_CB(skb)->flush = 0;
NAPI_GRO_CB(skb)->free = 0;
for (p = napi->gro_list; p; p = p->next) {
count++;
......@@ -2427,6 +2433,7 @@ int napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
goto normal;
same_flow = NAPI_GRO_CB(skb)->same_flow;
free = NAPI_GRO_CB(skb)->free;
if (pp) {
struct sk_buff *nskb = *pp;
......@@ -2446,17 +2453,91 @@ int napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
}
NAPI_GRO_CB(skb)->count = 1;
skb_shinfo(skb)->gso_size = skb->len;
skb->next = napi->gro_list;
napi->gro_list = skb;
ok:
return NET_RX_SUCCESS;
return free;
normal:
return netif_receive_skb(skb);
return -1;
}
int napi_gro_receive(struct napi_struct *napi, struct sk_buff *skb)
{
switch (__napi_gro_receive(napi, skb)) {
case -1:
return netif_receive_skb(skb);
case 1:
kfree_skb(skb);
break;
}
return NET_RX_SUCCESS;
}
EXPORT_SYMBOL(napi_gro_receive);
int napi_gro_frags(struct napi_struct *napi, struct napi_gro_fraginfo *info)
{
struct net_device *dev = napi->dev;
struct sk_buff *skb = napi->skb;
int err = NET_RX_DROP;
napi->skb = NULL;
if (!skb) {
skb = netdev_alloc_skb(dev, GRO_MAX_HEAD + NET_IP_ALIGN);
if (!skb)
goto out;
skb_reserve(skb, NET_IP_ALIGN);
}
BUG_ON(info->nr_frags > MAX_SKB_FRAGS);
skb_shinfo(skb)->nr_frags = info->nr_frags;
memcpy(skb_shinfo(skb)->frags, info->frags, sizeof(info->frags));
skb->data_len = info->len;
skb->len += info->len;
skb->truesize += info->len;
if (!pskb_may_pull(skb, ETH_HLEN))
goto reuse;
err = NET_RX_SUCCESS;
skb->protocol = eth_type_trans(skb, dev);
skb->ip_summed = info->ip_summed;
skb->csum = info->csum;
switch (__napi_gro_receive(napi, skb)) {
case -1:
return netif_receive_skb(skb);
case 0:
goto out;
}
reuse:
skb_shinfo(skb)->nr_frags = 0;
skb->len -= skb->data_len;
skb->truesize -= skb->data_len;
skb->data_len = 0;
__skb_pull(skb, skb_headlen(skb));
skb_reserve(skb, NET_IP_ALIGN - skb_headroom(skb));
napi->skb = skb;
out:
return err;
}
EXPORT_SYMBOL(napi_gro_frags);
static int process_backlog(struct napi_struct *napi, int quota)
{
int work = 0;
......@@ -2535,11 +2616,12 @@ void netif_napi_add(struct net_device *dev, struct napi_struct *napi,
{
INIT_LIST_HEAD(&napi->poll_list);
napi->gro_list = NULL;
napi->skb = NULL;
napi->poll = poll;
napi->weight = weight;
list_add(&napi->dev_list, &dev->napi_list);
#ifdef CONFIG_NETPOLL
napi->dev = dev;
#ifdef CONFIG_NETPOLL
spin_lock_init(&napi->poll_lock);
napi->poll_owner = -1;
#endif
......@@ -2552,6 +2634,7 @@ void netif_napi_del(struct napi_struct *napi)
struct sk_buff *skb, *next;
list_del_init(&napi->dev_list);
kfree(napi->skb);
for (skb = napi->gro_list; skb; skb = next) {
next = skb->next;
......
......@@ -2594,6 +2594,17 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb)
if (skb_shinfo(p)->frag_list)
goto merge;
else if (!skb_headlen(p) && !skb_headlen(skb) &&
skb_shinfo(p)->nr_frags + skb_shinfo(skb)->nr_frags <
MAX_SKB_FRAGS) {
memcpy(skb_shinfo(p)->frags + skb_shinfo(p)->nr_frags,
skb_shinfo(skb)->frags,
skb_shinfo(skb)->nr_frags * sizeof(skb_frag_t));
skb_shinfo(p)->nr_frags += skb_shinfo(skb)->nr_frags;
NAPI_GRO_CB(skb)->free = 1;
goto done;
}
headroom = skb_headroom(p);
nskb = netdev_alloc_skb(p->dev, headroom);
......@@ -2613,6 +2624,7 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb)
*NAPI_GRO_CB(nskb) = *NAPI_GRO_CB(p);
skb_shinfo(nskb)->frag_list = p;
skb_shinfo(nskb)->gso_size = skb_shinfo(p)->gso_size;
skb_header_release(p);
nskb->prev = p;
......@@ -2627,11 +2639,12 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb)
p = nskb;
merge:
NAPI_GRO_CB(p)->count++;
p->prev->next = skb;
p->prev = skb;
skb_header_release(skb);
done:
NAPI_GRO_CB(p)->count++;
p->data_len += skb->len;
p->truesize += skb->len;
p->len += skb->len;
......
......@@ -191,7 +191,7 @@ static int dcbnl_reply(u8 value, u8 event, u8 cmd, u8 attr, u32 pid,
return 0;
nlmsg_failure:
err:
kfree(dcbnl_skb);
kfree_skb(dcbnl_skb);
return ret;
}
......@@ -272,7 +272,7 @@ static int dcbnl_getpfccfg(struct net_device *netdev, struct nlattr **tb,
return 0;
nlmsg_failure:
err:
kfree(dcbnl_skb);
kfree_skb(dcbnl_skb);
err_out:
return -EINVAL;
}
......@@ -314,7 +314,7 @@ static int dcbnl_getperm_hwaddr(struct net_device *netdev, struct nlattr **tb,
nlmsg_failure:
err:
kfree(dcbnl_skb);
kfree_skb(dcbnl_skb);
err_out:
return -EINVAL;
}
......@@ -380,7 +380,7 @@ static int dcbnl_getcap(struct net_device *netdev, struct nlattr **tb,
return 0;
nlmsg_failure:
err:
kfree(dcbnl_skb);
kfree_skb(dcbnl_skb);
err_out:
return -EINVAL;
}
......@@ -458,7 +458,7 @@ static int dcbnl_getnumtcs(struct net_device *netdev, struct nlattr **tb,
return 0;
nlmsg_failure:
err:
kfree(dcbnl_skb);
kfree_skb(dcbnl_skb);
err_out:
return ret;
}
......@@ -687,7 +687,7 @@ static int __dcbnl_pg_getcfg(struct net_device *netdev, struct nlattr **tb,
nla_nest_cancel(dcbnl_skb, pg_nest);
nlmsg_failure:
err:
kfree(dcbnl_skb);
kfree_skb(dcbnl_skb);
err_out:
ret = -EINVAL;
return ret;
......@@ -949,7 +949,7 @@ static int dcbnl_bcn_getcfg(struct net_device *netdev, struct nlattr **tb,
nla_nest_cancel(dcbnl_skb, bcn_nest);
nlmsg_failure:
err:
kfree(dcbnl_skb);
kfree_skb(dcbnl_skb);
err_out:
ret = -EINVAL;
return ret;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment