提交 39892032 编写于 作者: L 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:
  b44: Use kernel DMA addresses for the kernel DMA API
  forcedeth: Fix resume from hibernation regression.
  xfrm: fix fragmentation on inter family tunnels
  ibm_newemac: Fix dangerous struct assumption
  gigaset: documentation update
  gigaset: in file ops, check for device disconnect before anything else
  bas_gigaset: use tasklet_hi_schedule for timing critical tasklets
  net/802/fddi.c: add MODULE_LICENSE
  smsc911x: remove unused #include <linux/version.h>
  axnet_cs: fix phy_id detection for bogus Asix chip.
  bnx2: Use request_firmware()
  b44: Fix sizes passed to b44_sync_dma_desc_for_{device,cpu}()
  socket: use percpu_add() while updating sockets_in_use
  virtio_net: Set the mac config only when VIRITO_NET_F_MAC
  myri_sbus: use request_firmware
  e1000: fix loss of multicast packets
  vxge: should include tcp.h

Conflict in firmware/WHENCE (SCSI vs net firmware)
...@@ -61,24 +61,28 @@ GigaSet 307x Device Driver ...@@ -61,24 +61,28 @@ GigaSet 307x Device Driver
--------------------- ---------------------
2.1. Modules 2.1. Modules
------- -------
To get the device working, you have to load the proper kernel module. You For the devices to work, the proper kernel modules have to be loaded.
can do this using This normally happens automatically when the system detects the USB
modprobe modulename device (base, M105) or when the line discipline is attached (M101). It
where modulename is ser_gigaset (M101), usb_gigaset (M105), or can also be triggered manually using the modprobe(8) command, for example
bas_gigaset (direct USB connection to the base). for troubleshooting or to pass module parameters.
The module ser_gigaset provides a serial line discipline N_GIGASET_M101 The module ser_gigaset provides a serial line discipline N_GIGASET_M101
which drives the device through the regular serial line driver. To use it, which drives the device through the regular serial line driver. It must
run the Gigaset M101 daemon "gigasetm101d" (also available from be attached to the serial line to which the M101 is connected with the
http://sourceforge.net/projects/gigaset307x/) with the device file of the ldattach(8) command (requires util-linux-ng release 2.14 or later), for
RS232 port to the M101 as an argument, for example: example:
gigasetm101d /dev/ttyS1 ldattach GIGASET_M101 /dev/ttyS1
This will open the device file, set its line discipline to N_GIGASET_M101, This will open the device file, attach the line discipline to it, and
and then sleep in the background, keeping the device open so that the then sleep in the background, keeping the device open so that the line
line discipline remains active. To deactivate it, kill the daemon, for discipline remains active. To deactivate it, kill the daemon, for example
example with with
killall gigasetm101d killall ldattach
before disconnecting the device. before disconnecting the device. To have this happen automatically at
system startup/shutdown on an LSB compatible system, create and activate
an appropriate LSB startup script /etc/init.d/gigaset. (The init name
'gigaset' is officially assigned to this project by LANANA.)
Alternatively, just add the 'ldattach' command line to /etc/rc.local.
2.2. Device nodes for user space programs 2.2. Device nodes for user space programs
------------------------------------ ------------------------------------
...@@ -194,10 +198,11 @@ GigaSet 307x Device Driver ...@@ -194,10 +198,11 @@ GigaSet 307x Device Driver
operation (for wireless access to the base), but are needed for access operation (for wireless access to the base), but are needed for access
to the M105's own configuration mode (registration to the base, baudrate to the M105's own configuration mode (registration to the base, baudrate
and line format settings, device status queries) via the gigacontr and line format settings, device status queries) via the gigacontr
utility. Their use is disabled in the driver by default for safety utility. Their use is controlled by the kernel configuration option
reasons but can be enabled by setting the kernel configuration option "Support for undocumented USB requests" (CONFIG_GIGASET_UNDOCREQ). If you
"Support for undocumented USB requests" (GIGASET_UNDOCREQ) to "Y" and encounter error code -ENOTTY when trying to use some features of the
recompiling. M105, try setting that option to "y" via 'make {x,menu}config' and
recompiling the driver.
3. Troubleshooting 3. Troubleshooting
...@@ -228,6 +233,13 @@ GigaSet 307x Device Driver ...@@ -228,6 +233,13 @@ GigaSet 307x Device Driver
Solution: Solution:
Select Unimodem mode for all DECT data adapters. (see section 2.4.) Select Unimodem mode for all DECT data adapters. (see section 2.4.)
Problem:
You want to configure your USB DECT data adapter (M105) but gigacontr
reports an error: "/dev/ttyGU0: Inappropriate ioctl for device".
Solution:
Recompile the usb_gigaset driver with the kernel configuration option
CONFIG_GIGASET_UNDOCREQ set to 'y'. (see section 2.6.)
3.2. Telling the driver to provide more information 3.2. Telling the driver to provide more information
---------------------------------------------- ----------------------------------------------
Building the driver with the "Gigaset debugging" kernel configuration Building the driver with the "Gigaset debugging" kernel configuration
......
...@@ -821,7 +821,7 @@ static void read_iso_callback(struct urb *urb) ...@@ -821,7 +821,7 @@ static void read_iso_callback(struct urb *urb)
/* pass URB to tasklet */ /* pass URB to tasklet */
ubc->isoindone = urb; ubc->isoindone = urb;
ubc->isoinstatus = status; ubc->isoinstatus = status;
tasklet_schedule(&ubc->rcvd_tasklet); tasklet_hi_schedule(&ubc->rcvd_tasklet);
} else { } else {
/* tasklet still busy, drop data and resubmit URB */ /* tasklet still busy, drop data and resubmit URB */
ubc->loststatus = status; ubc->loststatus = status;
...@@ -888,7 +888,7 @@ static void write_iso_callback(struct urb *urb) ...@@ -888,7 +888,7 @@ static void write_iso_callback(struct urb *urb)
ubc->isooutovfl = ubc->isooutdone; ubc->isooutovfl = ubc->isooutdone;
ubc->isooutdone = ucx; ubc->isooutdone = ucx;
spin_unlock_irqrestore(&ubc->isooutlock, flags); spin_unlock_irqrestore(&ubc->isooutlock, flags);
tasklet_schedule(&ubc->sent_tasklet); tasklet_hi_schedule(&ubc->sent_tasklet);
} }
/* starturbs /* starturbs
......
...@@ -193,7 +193,9 @@ static void if_close(struct tty_struct *tty, struct file *filp) ...@@ -193,7 +193,9 @@ static void if_close(struct tty_struct *tty, struct file *filp)
mutex_lock(&cs->mutex); mutex_lock(&cs->mutex);
if (!cs->open_count) if (!cs->connected)
gig_dbg(DEBUG_IF, "not connected"); /* nothing to do */
else if (!cs->open_count)
dev_warn(cs->dev, "%s: device not opened\n", __func__); dev_warn(cs->dev, "%s: device not opened\n", __func__);
else { else {
if (!--cs->open_count) { if (!--cs->open_count) {
...@@ -228,7 +230,10 @@ static int if_ioctl(struct tty_struct *tty, struct file *file, ...@@ -228,7 +230,10 @@ static int if_ioctl(struct tty_struct *tty, struct file *file,
if (mutex_lock_interruptible(&cs->mutex)) if (mutex_lock_interruptible(&cs->mutex))
return -ERESTARTSYS; // FIXME -EINTR? return -ERESTARTSYS; // FIXME -EINTR?
if (!cs->open_count) if (!cs->connected) {
gig_dbg(DEBUG_IF, "not connected");
retval = -ENODEV;
} else if (!cs->open_count)
dev_warn(cs->dev, "%s: device not opened\n", __func__); dev_warn(cs->dev, "%s: device not opened\n", __func__);
else { else {
retval = 0; retval = 0;
...@@ -248,13 +253,6 @@ static int if_ioctl(struct tty_struct *tty, struct file *file, ...@@ -248,13 +253,6 @@ static int if_ioctl(struct tty_struct *tty, struct file *file,
retval = put_user(int_arg, (int __user *) arg); retval = put_user(int_arg, (int __user *) arg);
break; break;
case GIGASET_BRKCHARS: case GIGASET_BRKCHARS:
//FIXME test if MS_LOCKED
if (!cs->connected) {
gig_dbg(DEBUG_ANY,
"can't communicate with unplugged device");
retval = -ENODEV;
break;
}
retval = copy_from_user(&buf, retval = copy_from_user(&buf,
(const unsigned char __user *) arg, 6) (const unsigned char __user *) arg, 6)
? -EFAULT : 0; ? -EFAULT : 0;
...@@ -331,7 +329,7 @@ static int if_tiocmset(struct tty_struct *tty, struct file *file, ...@@ -331,7 +329,7 @@ static int if_tiocmset(struct tty_struct *tty, struct file *file,
return -ERESTARTSYS; // FIXME -EINTR? return -ERESTARTSYS; // FIXME -EINTR?
if (!cs->connected) { if (!cs->connected) {
gig_dbg(DEBUG_ANY, "can't communicate with unplugged device"); gig_dbg(DEBUG_IF, "not connected");
retval = -ENODEV; retval = -ENODEV;
} else { } else {
mc = (cs->control_state | set) & ~clear & (TIOCM_RTS|TIOCM_DTR); mc = (cs->control_state | set) & ~clear & (TIOCM_RTS|TIOCM_DTR);
...@@ -360,14 +358,14 @@ static int if_write(struct tty_struct *tty, const unsigned char *buf, int count) ...@@ -360,14 +358,14 @@ static int if_write(struct tty_struct *tty, const unsigned char *buf, int count)
if (mutex_lock_interruptible(&cs->mutex)) if (mutex_lock_interruptible(&cs->mutex))
return -ERESTARTSYS; // FIXME -EINTR? return -ERESTARTSYS; // FIXME -EINTR?
if (!cs->open_count) if (!cs->connected) {
gig_dbg(DEBUG_IF, "not connected");
retval = -ENODEV;
} else if (!cs->open_count)
dev_warn(cs->dev, "%s: device not opened\n", __func__); dev_warn(cs->dev, "%s: device not opened\n", __func__);
else if (cs->mstate != MS_LOCKED) { else if (cs->mstate != MS_LOCKED) {
dev_warn(cs->dev, "can't write to unlocked device\n"); dev_warn(cs->dev, "can't write to unlocked device\n");
retval = -EBUSY; retval = -EBUSY;
} else if (!cs->connected) {
gig_dbg(DEBUG_ANY, "can't write to unplugged device");
retval = -EBUSY; //FIXME
} else { } else {
retval = cs->ops->write_cmd(cs, buf, count, retval = cs->ops->write_cmd(cs, buf, count,
&cs->if_wake_tasklet); &cs->if_wake_tasklet);
...@@ -394,14 +392,14 @@ static int if_write_room(struct tty_struct *tty) ...@@ -394,14 +392,14 @@ static int if_write_room(struct tty_struct *tty)
if (mutex_lock_interruptible(&cs->mutex)) if (mutex_lock_interruptible(&cs->mutex))
return -ERESTARTSYS; // FIXME -EINTR? return -ERESTARTSYS; // FIXME -EINTR?
if (!cs->open_count) if (!cs->connected) {
gig_dbg(DEBUG_IF, "not connected");
retval = -ENODEV;
} else if (!cs->open_count)
dev_warn(cs->dev, "%s: device not opened\n", __func__); dev_warn(cs->dev, "%s: device not opened\n", __func__);
else if (cs->mstate != MS_LOCKED) { else if (cs->mstate != MS_LOCKED) {
dev_warn(cs->dev, "can't write to unlocked device\n"); dev_warn(cs->dev, "can't write to unlocked device\n");
retval = -EBUSY; retval = -EBUSY;
} else if (!cs->connected) {
gig_dbg(DEBUG_ANY, "can't write to unplugged device");
retval = -EBUSY; //FIXME
} else } else
retval = cs->ops->write_room(cs); retval = cs->ops->write_room(cs);
...@@ -426,14 +424,14 @@ static int if_chars_in_buffer(struct tty_struct *tty) ...@@ -426,14 +424,14 @@ static int if_chars_in_buffer(struct tty_struct *tty)
if (mutex_lock_interruptible(&cs->mutex)) if (mutex_lock_interruptible(&cs->mutex))
return -ERESTARTSYS; // FIXME -EINTR? return -ERESTARTSYS; // FIXME -EINTR?
if (!cs->open_count) if (!cs->connected) {
gig_dbg(DEBUG_IF, "not connected");
retval = -ENODEV;
} else if (!cs->open_count)
dev_warn(cs->dev, "%s: device not opened\n", __func__); dev_warn(cs->dev, "%s: device not opened\n", __func__);
else if (cs->mstate != MS_LOCKED) { else if (cs->mstate != MS_LOCKED) {
dev_warn(cs->dev, "can't write to unlocked device\n"); dev_warn(cs->dev, "can't write to unlocked device\n");
retval = -EBUSY; retval = -EBUSY;
} else if (!cs->connected) {
gig_dbg(DEBUG_ANY, "can't write to unplugged device");
retval = -EBUSY; //FIXME
} else } else
retval = cs->ops->chars_in_buffer(cs); retval = cs->ops->chars_in_buffer(cs);
...@@ -456,7 +454,9 @@ static void if_throttle(struct tty_struct *tty) ...@@ -456,7 +454,9 @@ static void if_throttle(struct tty_struct *tty)
mutex_lock(&cs->mutex); mutex_lock(&cs->mutex);
if (!cs->open_count) if (!cs->connected)
gig_dbg(DEBUG_IF, "not connected"); /* nothing to do */
else if (!cs->open_count)
dev_warn(cs->dev, "%s: device not opened\n", __func__); dev_warn(cs->dev, "%s: device not opened\n", __func__);
else { else {
//FIXME //FIXME
...@@ -479,7 +479,9 @@ static void if_unthrottle(struct tty_struct *tty) ...@@ -479,7 +479,9 @@ static void if_unthrottle(struct tty_struct *tty)
mutex_lock(&cs->mutex); mutex_lock(&cs->mutex);
if (!cs->open_count) if (!cs->connected)
gig_dbg(DEBUG_IF, "not connected"); /* nothing to do */
else if (!cs->open_count)
dev_warn(cs->dev, "%s: device not opened\n", __func__); dev_warn(cs->dev, "%s: device not opened\n", __func__);
else { else {
//FIXME //FIXME
...@@ -506,13 +508,13 @@ static void if_set_termios(struct tty_struct *tty, struct ktermios *old) ...@@ -506,13 +508,13 @@ static void if_set_termios(struct tty_struct *tty, struct ktermios *old)
mutex_lock(&cs->mutex); mutex_lock(&cs->mutex);
if (!cs->open_count) { if (!cs->connected) {
dev_warn(cs->dev, "%s: device not opened\n", __func__); gig_dbg(DEBUG_IF, "not connected");
goto out; goto out;
} }
if (!cs->connected) { if (!cs->open_count) {
gig_dbg(DEBUG_ANY, "can't communicate with unplugged device"); dev_warn(cs->dev, "%s: device not opened\n", __func__);
goto out; goto out;
} }
......
...@@ -2234,7 +2234,7 @@ config BNX2 ...@@ -2234,7 +2234,7 @@ config BNX2
tristate "Broadcom NetXtremeII support" tristate "Broadcom NetXtremeII support"
depends on PCI depends on PCI
select CRC32 select CRC32
select ZLIB_INFLATE select FW_LOADER
help help
This driver supports Broadcom NetXtremeII gigabit Ethernet cards. This driver supports Broadcom NetXtremeII gigabit Ethernet cards.
......
...@@ -703,7 +703,7 @@ static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked) ...@@ -703,7 +703,7 @@ static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
if (bp->flags & B44_FLAG_RX_RING_HACK) if (bp->flags & B44_FLAG_RX_RING_HACK)
b44_sync_dma_desc_for_device(bp->sdev, bp->rx_ring_dma, b44_sync_dma_desc_for_device(bp->sdev, bp->rx_ring_dma,
dest_idx * sizeof(dp), dest_idx * sizeof(*dp),
DMA_BIDIRECTIONAL); DMA_BIDIRECTIONAL);
return RX_PKT_BUF_SZ; return RX_PKT_BUF_SZ;
...@@ -731,7 +731,7 @@ static void b44_recycle_rx(struct b44 *bp, int src_idx, u32 dest_idx_unmasked) ...@@ -731,7 +731,7 @@ static void b44_recycle_rx(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
if (bp->flags & B44_FLAG_RX_RING_HACK) if (bp->flags & B44_FLAG_RX_RING_HACK)
b44_sync_dma_desc_for_cpu(bp->sdev, bp->rx_ring_dma, b44_sync_dma_desc_for_cpu(bp->sdev, bp->rx_ring_dma,
src_idx * sizeof(src_desc), src_idx * sizeof(*src_desc),
DMA_BIDIRECTIONAL); DMA_BIDIRECTIONAL);
ctrl = src_desc->ctrl; ctrl = src_desc->ctrl;
...@@ -747,10 +747,10 @@ static void b44_recycle_rx(struct b44 *bp, int src_idx, u32 dest_idx_unmasked) ...@@ -747,10 +747,10 @@ static void b44_recycle_rx(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
if (bp->flags & B44_FLAG_RX_RING_HACK) if (bp->flags & B44_FLAG_RX_RING_HACK)
b44_sync_dma_desc_for_device(bp->sdev, bp->rx_ring_dma, b44_sync_dma_desc_for_device(bp->sdev, bp->rx_ring_dma,
dest_idx * sizeof(dest_desc), dest_idx * sizeof(*dest_desc),
DMA_BIDIRECTIONAL); DMA_BIDIRECTIONAL);
ssb_dma_sync_single_for_device(bp->sdev, le32_to_cpu(src_desc->addr), ssb_dma_sync_single_for_device(bp->sdev, dest_map->mapping,
RX_PKT_BUF_SZ, RX_PKT_BUF_SZ,
DMA_FROM_DEVICE); DMA_FROM_DEVICE);
} }
......
...@@ -46,19 +46,20 @@ ...@@ -46,19 +46,20 @@
#include <linux/crc32.h> #include <linux/crc32.h>
#include <linux/prefetch.h> #include <linux/prefetch.h>
#include <linux/cache.h> #include <linux/cache.h>
#include <linux/zlib.h> #include <linux/firmware.h>
#include <linux/log2.h> #include <linux/log2.h>
#include "bnx2.h" #include "bnx2.h"
#include "bnx2_fw.h" #include "bnx2_fw.h"
#include "bnx2_fw2.h"
#define FW_BUF_SIZE 0x10000
#define DRV_MODULE_NAME "bnx2" #define DRV_MODULE_NAME "bnx2"
#define PFX DRV_MODULE_NAME ": " #define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "1.9.3" #define DRV_MODULE_VERSION "2.0.0"
#define DRV_MODULE_RELDATE "March 17, 2009" #define DRV_MODULE_RELDATE "April 2, 2009"
#define FW_MIPS_FILE_06 "bnx2/bnx2-mips-06-4.6.16.fw"
#define FW_RV2P_FILE_06 "bnx2/bnx2-rv2p-06-4.6.16.fw"
#define FW_MIPS_FILE_09 "bnx2/bnx2-mips-09-4.6.17.fw"
#define FW_RV2P_FILE_09 "bnx2/bnx2-rv2p-09-4.6.15.fw"
#define RUN_AT(x) (jiffies + (x)) #define RUN_AT(x) (jiffies + (x))
...@@ -72,6 +73,10 @@ MODULE_AUTHOR("Michael Chan <mchan@broadcom.com>"); ...@@ -72,6 +73,10 @@ MODULE_AUTHOR("Michael Chan <mchan@broadcom.com>");
MODULE_DESCRIPTION("Broadcom NetXtreme II BCM5706/5708/5709/5716 Driver"); MODULE_DESCRIPTION("Broadcom NetXtreme II BCM5706/5708/5709/5716 Driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_MODULE_VERSION); MODULE_VERSION(DRV_MODULE_VERSION);
MODULE_FIRMWARE(FW_MIPS_FILE_06);
MODULE_FIRMWARE(FW_RV2P_FILE_06);
MODULE_FIRMWARE(FW_MIPS_FILE_09);
MODULE_FIRMWARE(FW_RV2P_FILE_09);
static int disable_msi = 0; static int disable_msi = 0;
...@@ -3391,33 +3396,143 @@ bnx2_set_rx_mode(struct net_device *dev) ...@@ -3391,33 +3396,143 @@ bnx2_set_rx_mode(struct net_device *dev)
spin_unlock_bh(&bp->phy_lock); spin_unlock_bh(&bp->phy_lock);
} }
static void static int __devinit
load_rv2p_fw(struct bnx2 *bp, __le32 *rv2p_code, u32 rv2p_code_len, check_fw_section(const struct firmware *fw,
u32 rv2p_proc) const struct bnx2_fw_file_section *section,
u32 alignment, bool non_empty)
{
u32 offset = be32_to_cpu(section->offset);
u32 len = be32_to_cpu(section->len);
if ((offset == 0 && len != 0) || offset >= fw->size || offset & 3)
return -EINVAL;
if ((non_empty && len == 0) || len > fw->size - offset ||
len & (alignment - 1))
return -EINVAL;
return 0;
}
static int __devinit
check_mips_fw_entry(const struct firmware *fw,
const struct bnx2_mips_fw_file_entry *entry)
{
if (check_fw_section(fw, &entry->text, 4, true) ||
check_fw_section(fw, &entry->data, 4, false) ||
check_fw_section(fw, &entry->rodata, 4, false))
return -EINVAL;
return 0;
}
static int __devinit
bnx2_request_firmware(struct bnx2 *bp)
{ {
const char *mips_fw_file, *rv2p_fw_file;
const struct bnx2_mips_fw_file *mips;
const struct bnx2_rv2p_fw_file *rv2p;
int rc;
if (CHIP_NUM(bp) == CHIP_NUM_5709) {
mips_fw_file = FW_MIPS_FILE_09;
rv2p_fw_file = FW_RV2P_FILE_09;
} else {
mips_fw_file = FW_MIPS_FILE_06;
rv2p_fw_file = FW_RV2P_FILE_06;
}
rc = request_firmware(&bp->mips_firmware, mips_fw_file, &bp->pdev->dev);
if (rc) {
printk(KERN_ERR PFX "Can't load firmware file \"%s\"\n",
mips_fw_file);
return rc;
}
rc = request_firmware(&bp->rv2p_firmware, rv2p_fw_file, &bp->pdev->dev);
if (rc) {
printk(KERN_ERR PFX "Can't load firmware file \"%s\"\n",
rv2p_fw_file);
return rc;
}
mips = (const struct bnx2_mips_fw_file *) bp->mips_firmware->data;
rv2p = (const struct bnx2_rv2p_fw_file *) bp->rv2p_firmware->data;
if (bp->mips_firmware->size < sizeof(*mips) ||
check_mips_fw_entry(bp->mips_firmware, &mips->com) ||
check_mips_fw_entry(bp->mips_firmware, &mips->cp) ||
check_mips_fw_entry(bp->mips_firmware, &mips->rxp) ||
check_mips_fw_entry(bp->mips_firmware, &mips->tpat) ||
check_mips_fw_entry(bp->mips_firmware, &mips->txp)) {
printk(KERN_ERR PFX "Firmware file \"%s\" is invalid\n",
mips_fw_file);
return -EINVAL;
}
if (bp->rv2p_firmware->size < sizeof(*rv2p) ||
check_fw_section(bp->rv2p_firmware, &rv2p->proc1.rv2p, 8, true) ||
check_fw_section(bp->rv2p_firmware, &rv2p->proc2.rv2p, 8, true)) {
printk(KERN_ERR PFX "Firmware file \"%s\" is invalid\n",
rv2p_fw_file);
return -EINVAL;
}
return 0;
}
static u32
rv2p_fw_fixup(u32 rv2p_proc, int idx, u32 loc, u32 rv2p_code)
{
switch (idx) {
case RV2P_P1_FIXUP_PAGE_SIZE_IDX:
rv2p_code &= ~RV2P_BD_PAGE_SIZE_MSK;
rv2p_code |= RV2P_BD_PAGE_SIZE;
break;
}
return rv2p_code;
}
static int
load_rv2p_fw(struct bnx2 *bp, u32 rv2p_proc,
const struct bnx2_rv2p_fw_file_entry *fw_entry)
{
u32 rv2p_code_len, file_offset;
__be32 *rv2p_code;
int i; int i;
u32 val; u32 val, cmd, addr;
rv2p_code_len = be32_to_cpu(fw_entry->rv2p.len);
file_offset = be32_to_cpu(fw_entry->rv2p.offset);
rv2p_code = (__be32 *)(bp->rv2p_firmware->data + file_offset);
if (rv2p_proc == RV2P_PROC2 && CHIP_NUM(bp) == CHIP_NUM_5709) { if (rv2p_proc == RV2P_PROC1) {
val = le32_to_cpu(rv2p_code[XI_RV2P_PROC2_MAX_BD_PAGE_LOC]); cmd = BNX2_RV2P_PROC1_ADDR_CMD_RDWR;
val &= ~XI_RV2P_PROC2_BD_PAGE_SIZE_MSK; addr = BNX2_RV2P_PROC1_ADDR_CMD;
val |= XI_RV2P_PROC2_BD_PAGE_SIZE; } else {
rv2p_code[XI_RV2P_PROC2_MAX_BD_PAGE_LOC] = cpu_to_le32(val); cmd = BNX2_RV2P_PROC2_ADDR_CMD_RDWR;
addr = BNX2_RV2P_PROC2_ADDR_CMD;
} }
for (i = 0; i < rv2p_code_len; i += 8) { for (i = 0; i < rv2p_code_len; i += 8) {
REG_WR(bp, BNX2_RV2P_INSTR_HIGH, le32_to_cpu(*rv2p_code)); REG_WR(bp, BNX2_RV2P_INSTR_HIGH, be32_to_cpu(*rv2p_code));
rv2p_code++; rv2p_code++;
REG_WR(bp, BNX2_RV2P_INSTR_LOW, le32_to_cpu(*rv2p_code)); REG_WR(bp, BNX2_RV2P_INSTR_LOW, be32_to_cpu(*rv2p_code));
rv2p_code++; rv2p_code++;
if (rv2p_proc == RV2P_PROC1) { val = (i / 8) | cmd;
val = (i / 8) | BNX2_RV2P_PROC1_ADDR_CMD_RDWR; REG_WR(bp, addr, val);
REG_WR(bp, BNX2_RV2P_PROC1_ADDR_CMD, val); }
}
else { rv2p_code = (__be32 *)(bp->rv2p_firmware->data + file_offset);
val = (i / 8) | BNX2_RV2P_PROC2_ADDR_CMD_RDWR; for (i = 0; i < 8; i++) {
REG_WR(bp, BNX2_RV2P_PROC2_ADDR_CMD, val); u32 loc, code;
loc = be32_to_cpu(fw_entry->fixup[i]);
if (loc && ((loc * 4) < rv2p_code_len)) {
code = be32_to_cpu(*(rv2p_code + loc - 1));
REG_WR(bp, BNX2_RV2P_INSTR_HIGH, code);
code = be32_to_cpu(*(rv2p_code + loc));
code = rv2p_fw_fixup(rv2p_proc, i, loc, code);
REG_WR(bp, BNX2_RV2P_INSTR_LOW, code);
val = (loc / 2) | cmd;
REG_WR(bp, addr, val);
} }
} }
...@@ -3428,14 +3543,18 @@ load_rv2p_fw(struct bnx2 *bp, __le32 *rv2p_code, u32 rv2p_code_len, ...@@ -3428,14 +3543,18 @@ load_rv2p_fw(struct bnx2 *bp, __le32 *rv2p_code, u32 rv2p_code_len,
else { else {
REG_WR(bp, BNX2_RV2P_COMMAND, BNX2_RV2P_COMMAND_PROC2_RESET); REG_WR(bp, BNX2_RV2P_COMMAND, BNX2_RV2P_COMMAND_PROC2_RESET);
} }
return 0;
} }
static int static int
load_cpu_fw(struct bnx2 *bp, const struct cpu_reg *cpu_reg, struct fw_info *fw) load_cpu_fw(struct bnx2 *bp, const struct cpu_reg *cpu_reg,
const struct bnx2_mips_fw_file_entry *fw_entry)
{ {
u32 addr, len, file_offset;
__be32 *data;
u32 offset; u32 offset;
u32 val; u32 val;
int rc;
/* Halt the CPU. */ /* Halt the CPU. */
val = bnx2_reg_rd_ind(bp, cpu_reg->mode); val = bnx2_reg_rd_ind(bp, cpu_reg->mode);
...@@ -3444,64 +3563,52 @@ load_cpu_fw(struct bnx2 *bp, const struct cpu_reg *cpu_reg, struct fw_info *fw) ...@@ -3444,64 +3563,52 @@ load_cpu_fw(struct bnx2 *bp, const struct cpu_reg *cpu_reg, struct fw_info *fw)
bnx2_reg_wr_ind(bp, cpu_reg->state, cpu_reg->state_value_clear); bnx2_reg_wr_ind(bp, cpu_reg->state, cpu_reg->state_value_clear);
/* Load the Text area. */ /* Load the Text area. */
offset = cpu_reg->spad_base + (fw->text_addr - cpu_reg->mips_view_base); addr = be32_to_cpu(fw_entry->text.addr);
if (fw->gz_text) { len = be32_to_cpu(fw_entry->text.len);
int j; file_offset = be32_to_cpu(fw_entry->text.offset);
data = (__be32 *)(bp->mips_firmware->data + file_offset);
rc = zlib_inflate_blob(fw->text, FW_BUF_SIZE, fw->gz_text,
fw->gz_text_len);
if (rc < 0)
return rc;
for (j = 0; j < (fw->text_len / 4); j++, offset += 4) { offset = cpu_reg->spad_base + (addr - cpu_reg->mips_view_base);
bnx2_reg_wr_ind(bp, offset, le32_to_cpu(fw->text[j])); if (len) {
}
}
/* Load the Data area. */
offset = cpu_reg->spad_base + (fw->data_addr - cpu_reg->mips_view_base);
if (fw->data) {
int j; int j;
for (j = 0; j < (fw->data_len / 4); j++, offset += 4) { for (j = 0; j < (len / 4); j++, offset += 4)
bnx2_reg_wr_ind(bp, offset, fw->data[j]); bnx2_reg_wr_ind(bp, offset, be32_to_cpu(data[j]));
}
} }
/* Load the SBSS area. */ /* Load the Data area. */
offset = cpu_reg->spad_base + (fw->sbss_addr - cpu_reg->mips_view_base); addr = be32_to_cpu(fw_entry->data.addr);
if (fw->sbss_len) { len = be32_to_cpu(fw_entry->data.len);
int j; file_offset = be32_to_cpu(fw_entry->data.offset);
data = (__be32 *)(bp->mips_firmware->data + file_offset);
for (j = 0; j < (fw->sbss_len / 4); j++, offset += 4) {
bnx2_reg_wr_ind(bp, offset, 0);
}
}
/* Load the BSS area. */ offset = cpu_reg->spad_base + (addr - cpu_reg->mips_view_base);
offset = cpu_reg->spad_base + (fw->bss_addr - cpu_reg->mips_view_base); if (len) {
if (fw->bss_len) {
int j; int j;
for (j = 0; j < (fw->bss_len/4); j++, offset += 4) { for (j = 0; j < (len / 4); j++, offset += 4)
bnx2_reg_wr_ind(bp, offset, 0); bnx2_reg_wr_ind(bp, offset, be32_to_cpu(data[j]));
}
} }
/* Load the Read-Only area. */ /* Load the Read-Only area. */
offset = cpu_reg->spad_base + addr = be32_to_cpu(fw_entry->rodata.addr);
(fw->rodata_addr - cpu_reg->mips_view_base); len = be32_to_cpu(fw_entry->rodata.len);
if (fw->rodata) { file_offset = be32_to_cpu(fw_entry->rodata.offset);
data = (__be32 *)(bp->mips_firmware->data + file_offset);
offset = cpu_reg->spad_base + (addr - cpu_reg->mips_view_base);
if (len) {
int j; int j;
for (j = 0; j < (fw->rodata_len / 4); j++, offset += 4) { for (j = 0; j < (len / 4); j++, offset += 4)
bnx2_reg_wr_ind(bp, offset, fw->rodata[j]); bnx2_reg_wr_ind(bp, offset, be32_to_cpu(data[j]));
}
} }
/* Clear the pre-fetch instruction. */ /* Clear the pre-fetch instruction. */
bnx2_reg_wr_ind(bp, cpu_reg->inst, 0); bnx2_reg_wr_ind(bp, cpu_reg->inst, 0);
bnx2_reg_wr_ind(bp, cpu_reg->pc, fw->start_addr);
val = be32_to_cpu(fw_entry->start_addr);
bnx2_reg_wr_ind(bp, cpu_reg->pc, val);
/* Start the CPU. */ /* Start the CPU. */
val = bnx2_reg_rd_ind(bp, cpu_reg->mode); val = bnx2_reg_rd_ind(bp, cpu_reg->mode);
...@@ -3515,95 +3622,40 @@ load_cpu_fw(struct bnx2 *bp, const struct cpu_reg *cpu_reg, struct fw_info *fw) ...@@ -3515,95 +3622,40 @@ load_cpu_fw(struct bnx2 *bp, const struct cpu_reg *cpu_reg, struct fw_info *fw)
static int static int
bnx2_init_cpus(struct bnx2 *bp) bnx2_init_cpus(struct bnx2 *bp)
{ {
struct fw_info *fw; const struct bnx2_mips_fw_file *mips_fw =
int rc, rv2p_len; (const struct bnx2_mips_fw_file *) bp->mips_firmware->data;
void *text, *rv2p; const struct bnx2_rv2p_fw_file *rv2p_fw =
(const struct bnx2_rv2p_fw_file *) bp->rv2p_firmware->data;
int rc;
/* Initialize the RV2P processor. */ /* Initialize the RV2P processor. */
text = vmalloc(FW_BUF_SIZE); load_rv2p_fw(bp, RV2P_PROC1, &rv2p_fw->proc1);
if (!text) load_rv2p_fw(bp, RV2P_PROC2, &rv2p_fw->proc2);
return -ENOMEM;
if (CHIP_NUM(bp) == CHIP_NUM_5709) {
rv2p = bnx2_xi_rv2p_proc1;
rv2p_len = sizeof(bnx2_xi_rv2p_proc1);
} else {
rv2p = bnx2_rv2p_proc1;
rv2p_len = sizeof(bnx2_rv2p_proc1);
}
rc = zlib_inflate_blob(text, FW_BUF_SIZE, rv2p, rv2p_len);
if (rc < 0)
goto init_cpu_err;
load_rv2p_fw(bp, text, rc /* == len */, RV2P_PROC1);
if (CHIP_NUM(bp) == CHIP_NUM_5709) {
rv2p = bnx2_xi_rv2p_proc2;
rv2p_len = sizeof(bnx2_xi_rv2p_proc2);
} else {
rv2p = bnx2_rv2p_proc2;
rv2p_len = sizeof(bnx2_rv2p_proc2);
}
rc = zlib_inflate_blob(text, FW_BUF_SIZE, rv2p, rv2p_len);
if (rc < 0)
goto init_cpu_err;
load_rv2p_fw(bp, text, rc /* == len */, RV2P_PROC2);
/* Initialize the RX Processor. */ /* Initialize the RX Processor. */
if (CHIP_NUM(bp) == CHIP_NUM_5709) rc = load_cpu_fw(bp, &cpu_reg_rxp, &mips_fw->rxp);
fw = &bnx2_rxp_fw_09;
else
fw = &bnx2_rxp_fw_06;
fw->text = text;
rc = load_cpu_fw(bp, &cpu_reg_rxp, fw);
if (rc) if (rc)
goto init_cpu_err; goto init_cpu_err;
/* Initialize the TX Processor. */ /* Initialize the TX Processor. */
if (CHIP_NUM(bp) == CHIP_NUM_5709) rc = load_cpu_fw(bp, &cpu_reg_txp, &mips_fw->txp);
fw = &bnx2_txp_fw_09;
else
fw = &bnx2_txp_fw_06;
fw->text = text;
rc = load_cpu_fw(bp, &cpu_reg_txp, fw);
if (rc) if (rc)
goto init_cpu_err; goto init_cpu_err;
/* Initialize the TX Patch-up Processor. */ /* Initialize the TX Patch-up Processor. */
if (CHIP_NUM(bp) == CHIP_NUM_5709) rc = load_cpu_fw(bp, &cpu_reg_tpat, &mips_fw->tpat);
fw = &bnx2_tpat_fw_09;
else
fw = &bnx2_tpat_fw_06;
fw->text = text;
rc = load_cpu_fw(bp, &cpu_reg_tpat, fw);
if (rc) if (rc)
goto init_cpu_err; goto init_cpu_err;
/* Initialize the Completion Processor. */ /* Initialize the Completion Processor. */
if (CHIP_NUM(bp) == CHIP_NUM_5709) rc = load_cpu_fw(bp, &cpu_reg_com, &mips_fw->com);
fw = &bnx2_com_fw_09;
else
fw = &bnx2_com_fw_06;
fw->text = text;
rc = load_cpu_fw(bp, &cpu_reg_com, fw);
if (rc) if (rc)
goto init_cpu_err; goto init_cpu_err;
/* Initialize the Command Processor. */ /* Initialize the Command Processor. */
if (CHIP_NUM(bp) == CHIP_NUM_5709) rc = load_cpu_fw(bp, &cpu_reg_cp, &mips_fw->cp);
fw = &bnx2_cp_fw_09;
else
fw = &bnx2_cp_fw_06;
fw->text = text;
rc = load_cpu_fw(bp, &cpu_reg_cp, fw);
init_cpu_err: init_cpu_err:
vfree(text);
return rc; return rc;
} }
...@@ -7807,6 +7859,10 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -7807,6 +7859,10 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
pci_set_drvdata(pdev, dev); pci_set_drvdata(pdev, dev);
rc = bnx2_request_firmware(bp);
if (rc)
goto error;
memcpy(dev->dev_addr, bp->mac_addr, 6); memcpy(dev->dev_addr, bp->mac_addr, 6);
memcpy(dev->perm_addr, bp->mac_addr, 6); memcpy(dev->perm_addr, bp->mac_addr, 6);
...@@ -7823,13 +7879,7 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -7823,13 +7879,7 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
if ((rc = register_netdev(dev))) { if ((rc = register_netdev(dev))) {
dev_err(&pdev->dev, "Cannot register net device\n"); dev_err(&pdev->dev, "Cannot register net device\n");
if (bp->regview) goto error;
iounmap(bp->regview);
pci_release_regions(pdev);
pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
free_netdev(dev);
return rc;
} }
printk(KERN_INFO "%s: %s (%c%d) %s found at mem %lx, " printk(KERN_INFO "%s: %s (%c%d) %s found at mem %lx, "
...@@ -7843,6 +7893,20 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -7843,6 +7893,20 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
bp->pdev->irq, dev->dev_addr); bp->pdev->irq, dev->dev_addr);
return 0; return 0;
error:
if (bp->mips_firmware)
release_firmware(bp->mips_firmware);
if (bp->rv2p_firmware)
release_firmware(bp->rv2p_firmware);
if (bp->regview)
iounmap(bp->regview);
pci_release_regions(pdev);
pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
free_netdev(dev);
return rc;
} }
static void __devexit static void __devexit
...@@ -7855,6 +7919,11 @@ bnx2_remove_one(struct pci_dev *pdev) ...@@ -7855,6 +7919,11 @@ bnx2_remove_one(struct pci_dev *pdev)
unregister_netdev(dev); unregister_netdev(dev);
if (bp->mips_firmware)
release_firmware(bp->mips_firmware);
if (bp->rv2p_firmware)
release_firmware(bp->rv2p_firmware);
if (bp->regview) if (bp->regview)
iounmap(bp->regview); iounmap(bp->regview);
......
...@@ -6885,6 +6885,8 @@ struct bnx2 { ...@@ -6885,6 +6885,8 @@ struct bnx2 {
u32 idle_chk_status_idx; u32 idle_chk_status_idx;
const struct firmware *mips_firmware;
const struct firmware *rv2p_firmware;
}; };
#define REG_RD(bp, offset) \ #define REG_RD(bp, offset) \
...@@ -6915,44 +6917,41 @@ struct cpu_reg { ...@@ -6915,44 +6917,41 @@ struct cpu_reg {
u32 mips_view_base; u32 mips_view_base;
}; };
struct fw_info { struct bnx2_fw_file_section {
const u32 ver_major; __be32 addr;
const u32 ver_minor; __be32 len;
const u32 ver_fix; __be32 offset;
const u32 start_addr;
/* Text section. */
const u32 text_addr;
const u32 text_len;
const u32 text_index;
__le32 *text;
u8 *gz_text;
const u32 gz_text_len;
/* Data section. */
const u32 data_addr;
const u32 data_len;
const u32 data_index;
const u32 *data;
/* SBSS section. */
const u32 sbss_addr;
const u32 sbss_len;
const u32 sbss_index;
/* BSS section. */
const u32 bss_addr;
const u32 bss_len;
const u32 bss_index;
/* Read-only section. */
const u32 rodata_addr;
const u32 rodata_len;
const u32 rodata_index;
const u32 *rodata;
}; };
struct bnx2_mips_fw_file_entry {
__be32 start_addr;
struct bnx2_fw_file_section text;
struct bnx2_fw_file_section data;
struct bnx2_fw_file_section rodata;
};
struct bnx2_rv2p_fw_file_entry {
struct bnx2_fw_file_section rv2p;
__be32 fixup[8];
};
struct bnx2_mips_fw_file {
struct bnx2_mips_fw_file_entry com;
struct bnx2_mips_fw_file_entry cp;
struct bnx2_mips_fw_file_entry rxp;
struct bnx2_mips_fw_file_entry tpat;
struct bnx2_mips_fw_file_entry txp;
};
struct bnx2_rv2p_fw_file {
struct bnx2_rv2p_fw_file_entry proc1;
struct bnx2_rv2p_fw_file_entry proc2;
};
#define RV2P_P1_FIXUP_PAGE_SIZE_IDX 0
#define RV2P_BD_PAGE_SIZE_MSK 0xffff
#define RV2P_BD_PAGE_SIZE ((BCM_PAGE_SIZE / 16) - 1)
#define RV2P_PROC1 0 #define RV2P_PROC1 0
#define RV2P_PROC2 1 #define RV2P_PROC2 1
......
此差异已折叠。
此差异已折叠。
...@@ -2335,6 +2335,12 @@ static void e1000_set_rx_mode(struct net_device *netdev) ...@@ -2335,6 +2335,12 @@ static void e1000_set_rx_mode(struct net_device *netdev)
int mta_reg_count = (hw->mac_type == e1000_ich8lan) ? int mta_reg_count = (hw->mac_type == e1000_ich8lan) ?
E1000_NUM_MTA_REGISTERS_ICH8LAN : E1000_NUM_MTA_REGISTERS_ICH8LAN :
E1000_NUM_MTA_REGISTERS; E1000_NUM_MTA_REGISTERS;
u32 *mcarray = kcalloc(mta_reg_count, sizeof(u32), GFP_ATOMIC);
if (!mcarray) {
DPRINTK(PROBE, ERR, "memory allocation failed\n");
return;
}
if (hw->mac_type == e1000_ich8lan) if (hw->mac_type == e1000_ich8lan)
rar_entries = E1000_RAR_ENTRIES_ICH8LAN; rar_entries = E1000_RAR_ENTRIES_ICH8LAN;
...@@ -2401,22 +2407,34 @@ static void e1000_set_rx_mode(struct net_device *netdev) ...@@ -2401,22 +2407,34 @@ static void e1000_set_rx_mode(struct net_device *netdev)
} }
WARN_ON(uc_ptr != NULL); WARN_ON(uc_ptr != NULL);
/* clear the old settings from the multicast hash table */
for (i = 0; i < mta_reg_count; i++) {
E1000_WRITE_REG_ARRAY(hw, MTA, i, 0);
E1000_WRITE_FLUSH();
}
/* load any remaining addresses into the hash table */ /* load any remaining addresses into the hash table */
for (; mc_ptr; mc_ptr = mc_ptr->next) { for (; mc_ptr; mc_ptr = mc_ptr->next) {
u32 hash_reg, hash_bit, mta;
hash_value = e1000_hash_mc_addr(hw, mc_ptr->da_addr); hash_value = e1000_hash_mc_addr(hw, mc_ptr->da_addr);
e1000_mta_set(hw, hash_value); hash_reg = (hash_value >> 5) & 0x7F;
hash_bit = hash_value & 0x1F;
mta = (1 << hash_bit);
mcarray[hash_reg] |= mta;
} }
/* write the hash table completely, write from bottom to avoid
* both stupid write combining chipsets, and flushing each write */
for (i = mta_reg_count - 1; i >= 0 ; i--) {
/*
* If we are on an 82544 has an errata where writing odd
* offsets overwrites the previous even offset, but writing
* backwards over the range solves the issue by always
* writing the odd offset first
*/
E1000_WRITE_REG_ARRAY(hw, MTA, i, mcarray[i]);
}
E1000_WRITE_FLUSH();
if (hw->mac_type == e1000_82542_rev2_0) if (hw->mac_type == e1000_82542_rev2_0)
e1000_leave_82542_rst(adapter); e1000_leave_82542_rst(adapter);
kfree(mcarray);
} }
/* Need to wait a few seconds after link up to get diagnostic information from /* Need to wait a few seconds after link up to get diagnostic information from
......
...@@ -6117,6 +6117,9 @@ static int nv_resume(struct pci_dev *pdev) ...@@ -6117,6 +6117,9 @@ static int nv_resume(struct pci_dev *pdev)
pci_write_config_dword(pdev, NV_MSI_PRIV_OFFSET, NV_MSI_PRIV_VALUE); pci_write_config_dword(pdev, NV_MSI_PRIV_OFFSET, NV_MSI_PRIV_VALUE);
/* restore phy state, including autoneg */
phy_init(dev);
netif_device_attach(dev); netif_device_attach(dev);
if (netif_running(dev)) { if (netif_running(dev)) {
rc = nv_open(dev); rc = nv_open(dev);
......
...@@ -1229,7 +1229,7 @@ static int emac_link_differs(struct emac_instance *dev) ...@@ -1229,7 +1229,7 @@ static int emac_link_differs(struct emac_instance *dev)
static void emac_link_timer(struct work_struct *work) static void emac_link_timer(struct work_struct *work)
{ {
struct emac_instance *dev = struct emac_instance *dev =
container_of((struct delayed_work *)work, container_of(to_delayed_work(work),
struct emac_instance, link_work); struct emac_instance, link_work);
int link_poll_interval; int link_poll_interval;
......
此差异已折叠。
...@@ -25,6 +25,7 @@ static char version[] = ...@@ -25,6 +25,7 @@ static char version[] =
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_device.h> #include <linux/of_device.h>
#include <linux/firmware.h>
#include <net/dst.h> #include <net/dst.h>
#include <net/arp.h> #include <net/arp.h>
...@@ -43,7 +44,6 @@ static char version[] = ...@@ -43,7 +44,6 @@ static char version[] =
#include <asm/irq.h> #include <asm/irq.h>
#include "myri_sbus.h" #include "myri_sbus.h"
#include "myri_code.h"
/* #define DEBUG_DETECT */ /* #define DEBUG_DETECT */
/* #define DEBUG_IRQ */ /* #define DEBUG_IRQ */
...@@ -81,6 +81,9 @@ static char version[] = ...@@ -81,6 +81,9 @@ static char version[] =
#define DHDR(x) #define DHDR(x)
#endif #endif
/* Firmware name */
#define FWNAME "myricom/lanai.bin"
static void myri_reset_off(void __iomem *lp, void __iomem *cregs) static void myri_reset_off(void __iomem *lp, void __iomem *cregs)
{ {
/* Clear IRQ mask. */ /* Clear IRQ mask. */
...@@ -171,10 +174,11 @@ static int myri_do_handshake(struct myri_eth *mp) ...@@ -171,10 +174,11 @@ static int myri_do_handshake(struct myri_eth *mp)
static int __devinit myri_load_lanai(struct myri_eth *mp) static int __devinit myri_load_lanai(struct myri_eth *mp)
{ {
const struct firmware *fw;
struct net_device *dev = mp->dev; struct net_device *dev = mp->dev;
struct myri_shmem __iomem *shmem = mp->shmem; struct myri_shmem __iomem *shmem = mp->shmem;
void __iomem *rptr; void __iomem *rptr;
int i; int i, lanai4_data_size;
myri_disable_irq(mp->lregs, mp->cregs); myri_disable_irq(mp->lregs, mp->cregs);
myri_reset_on(mp->cregs); myri_reset_on(mp->cregs);
...@@ -186,13 +190,27 @@ static int __devinit myri_load_lanai(struct myri_eth *mp) ...@@ -186,13 +190,27 @@ static int __devinit myri_load_lanai(struct myri_eth *mp)
if (mp->eeprom.cpuvers >= CPUVERS_3_0) if (mp->eeprom.cpuvers >= CPUVERS_3_0)
sbus_writel(mp->eeprom.cval, mp->lregs + LANAI_CVAL); sbus_writel(mp->eeprom.cval, mp->lregs + LANAI_CVAL);
i = request_firmware(&fw, FWNAME, &mp->myri_op->dev);
if (i) {
printk(KERN_ERR "Failed to load image \"%s\" err %d\n",
FWNAME, i);
return i;
}
if (fw->size < 2) {
printk(KERN_ERR "Bogus length %zu in image \"%s\"\n",
fw->size, FWNAME);
release_firmware(fw);
return -EINVAL;
}
lanai4_data_size = fw->data[0] << 8 | fw->data[1];
/* Load executable code. */ /* Load executable code. */
for (i = 0; i < sizeof(lanai4_code); i++) for (i = 2; i < fw->size; i++)
sbus_writeb(lanai4_code[i], rptr + (lanai4_code_off * 2) + i); sbus_writeb(fw->data[i], rptr++);
/* Load data segment. */ /* Load data segment. */
for (i = 0; i < sizeof(lanai4_data); i++) for (i = 0; i < lanai4_data_size; i++)
sbus_writeb(lanai4_data[i], rptr + (lanai4_data_off * 2) + i); sbus_writeb(0, rptr++);
/* Set device address. */ /* Set device address. */
sbus_writeb(0, &shmem->addr[0]); sbus_writeb(0, &shmem->addr[0]);
...@@ -228,6 +246,7 @@ static int __devinit myri_load_lanai(struct myri_eth *mp) ...@@ -228,6 +246,7 @@ static int __devinit myri_load_lanai(struct myri_eth *mp)
if (mp->eeprom.cpuvers == CPUVERS_4_0) if (mp->eeprom.cpuvers == CPUVERS_4_0)
sbus_writel(0, mp->lregs + LANAI_VERS); sbus_writel(0, mp->lregs + LANAI_VERS);
release_firmware(fw);
return i; return i;
} }
...@@ -1078,7 +1097,10 @@ static int __devinit myri_sbus_probe(struct of_device *op, const struct of_devic ...@@ -1078,7 +1097,10 @@ static int __devinit myri_sbus_probe(struct of_device *op, const struct of_devic
/* Load code onto the LANai. */ /* Load code onto the LANai. */
DET(("Loading LANAI firmware\n")); DET(("Loading LANAI firmware\n"));
myri_load_lanai(mp); if (myri_load_lanai(mp)) {
printk(KERN_ERR "MyriCOM: Cannot Load LANAI firmware.\n");
goto err_free_irq;
}
if (register_netdev(dev)) { if (register_netdev(dev)) {
printk("MyriCOM: Cannot register device.\n"); printk("MyriCOM: Cannot register device.\n");
...@@ -1159,3 +1181,4 @@ module_init(myri_sbus_init); ...@@ -1159,3 +1181,4 @@ module_init(myri_sbus_init);
module_exit(myri_sbus_exit); module_exit(myri_sbus_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_FIRMWARE(FWNAME);
...@@ -339,7 +339,7 @@ static int axnet_config(struct pcmcia_device *link) ...@@ -339,7 +339,7 @@ static int axnet_config(struct pcmcia_device *link)
{ {
struct net_device *dev = link->priv; struct net_device *dev = link->priv;
axnet_dev_t *info = PRIV(dev); axnet_dev_t *info = PRIV(dev);
int i, j, last_ret, last_fn; int i, j, j2, last_ret, last_fn;
DEBUG(0, "axnet_config(0x%p)\n", link); DEBUG(0, "axnet_config(0x%p)\n", link);
...@@ -388,6 +388,8 @@ static int axnet_config(struct pcmcia_device *link) ...@@ -388,6 +388,8 @@ static int axnet_config(struct pcmcia_device *link)
for (i = 0; i < 32; i++) { for (i = 0; i < 32; i++) {
j = mdio_read(dev->base_addr + AXNET_MII_EEP, i, 1); j = mdio_read(dev->base_addr + AXNET_MII_EEP, i, 1);
j2 = mdio_read(dev->base_addr + AXNET_MII_EEP, i, 2);
if (j == j2) continue;
if ((j != 0) && (j != 0xffff)) break; if ((j != 0) && (j != 0xffff)) break;
} }
...@@ -398,6 +400,8 @@ static int axnet_config(struct pcmcia_device *link) ...@@ -398,6 +400,8 @@ static int axnet_config(struct pcmcia_device *link)
pcmcia_access_configuration_register(link, &reg); pcmcia_access_configuration_register(link, &reg);
for (i = 0; i < 32; i++) { for (i = 0; i < 32; i++) {
j = mdio_read(dev->base_addr + AXNET_MII_EEP, i, 1); j = mdio_read(dev->base_addr + AXNET_MII_EEP, i, 1);
j2 = mdio_read(dev->base_addr + AXNET_MII_EEP, i, 2);
if (j == j2) continue;
if ((j != 0) && (j != 0xffff)) break; if ((j != 0) && (j != 0xffff)) break;
} }
} }
...@@ -1767,6 +1771,9 @@ static void AX88190_init(struct net_device *dev, int startp) ...@@ -1767,6 +1771,9 @@ static void AX88190_init(struct net_device *dev, int startp)
ei_local->tx1 = ei_local->tx2 = 0; ei_local->tx1 = ei_local->tx2 = 0;
ei_local->txing = 0; ei_local->txing = 0;
if (info->flags & IS_AX88790) /* select Internal PHY */
outb(0x10, e8390_base + AXNET_GPIO);
if (startp) if (startp)
{ {
outb_p(0xff, e8390_base + EN0_ISR); outb_p(0xff, e8390_base + EN0_ISR);
......
...@@ -43,7 +43,6 @@ ...@@ -43,7 +43,6 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/version.h>
#include <linux/bug.h> #include <linux/bug.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/irq.h> #include <linux/irq.h>
......
...@@ -575,8 +575,9 @@ static int virtnet_set_mac_address(struct net_device *dev, void *p) ...@@ -575,8 +575,9 @@ static int virtnet_set_mac_address(struct net_device *dev, void *p)
if (ret) if (ret)
return ret; return ret;
vdev->config->set(vdev, offsetof(struct virtio_net_config, mac), if (virtio_has_feature(vdev, VIRTIO_NET_F_MAC))
dev->dev_addr, dev->addr_len); vdev->config->set(vdev, offsetof(struct virtio_net_config, mac),
dev->dev_addr, dev->addr_len);
return 0; return 0;
} }
...@@ -876,11 +877,8 @@ static int virtnet_probe(struct virtio_device *vdev) ...@@ -876,11 +877,8 @@ static int virtnet_probe(struct virtio_device *vdev)
vdev->config->get(vdev, vdev->config->get(vdev,
offsetof(struct virtio_net_config, mac), offsetof(struct virtio_net_config, mac),
dev->dev_addr, dev->addr_len); dev->dev_addr, dev->addr_len);
} else { } else
random_ether_addr(dev->dev_addr); random_ether_addr(dev->dev_addr);
vdev->config->set(vdev, offsetof(struct virtio_net_config, mac),
dev->dev_addr, dev->addr_len);
}
/* Set up our device-specific information */ /* Set up our device-specific information */
vi = netdev_priv(dev); vi = netdev_priv(dev);
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include <linux/if_vlan.h> #include <linux/if_vlan.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/tcp.h>
#include <net/ip.h> #include <net/ip.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
......
...@@ -32,6 +32,10 @@ fw-shipped-$(CONFIG_ADAPTEC_STARFIRE) += adaptec/starfire_rx.bin \ ...@@ -32,6 +32,10 @@ fw-shipped-$(CONFIG_ADAPTEC_STARFIRE) += adaptec/starfire_rx.bin \
adaptec/starfire_tx.bin adaptec/starfire_tx.bin
fw-shipped-$(CONFIG_ATARI_DSP56K) += dsp56k/bootstrap.bin fw-shipped-$(CONFIG_ATARI_DSP56K) += dsp56k/bootstrap.bin
fw-shipped-$(CONFIG_ATM_AMBASSADOR) += atmsar11.fw fw-shipped-$(CONFIG_ATM_AMBASSADOR) += atmsar11.fw
fw-shipped-$(CONFIG_BNX2) += bnx2/bnx2-mips-09-4.6.17.fw \
bnx2/bnx2-rv2p-09-4.6.15.fw \
bnx2/bnx2-mips-06-4.6.16.fw \
bnx2/bnx2-rv2p-06-4.6.16.fw
fw-shipped-$(CONFIG_CASSINI) += sun/cassini.bin fw-shipped-$(CONFIG_CASSINI) += sun/cassini.bin
fw-shipped-$(CONFIG_COMPUTONE) += intelliport2.bin fw-shipped-$(CONFIG_COMPUTONE) += intelliport2.bin
fw-shipped-$(CONFIG_CHELSIO_T3) += cxgb3/t3b_psram-1.1.0.bin \ fw-shipped-$(CONFIG_CHELSIO_T3) += cxgb3/t3b_psram-1.1.0.bin \
...@@ -40,6 +44,7 @@ fw-shipped-$(CONFIG_CHELSIO_T3) += cxgb3/t3b_psram-1.1.0.bin \ ...@@ -40,6 +44,7 @@ fw-shipped-$(CONFIG_CHELSIO_T3) += cxgb3/t3b_psram-1.1.0.bin \
fw-shipped-$(CONFIG_DVB_TTUSB_BUDGET) += ttusb-budget/dspbootcode.bin fw-shipped-$(CONFIG_DVB_TTUSB_BUDGET) += ttusb-budget/dspbootcode.bin
fw-shipped-$(CONFIG_E100) += e100/d101m_ucode.bin e100/d101s_ucode.bin \ fw-shipped-$(CONFIG_E100) += e100/d101m_ucode.bin e100/d101s_ucode.bin \
e100/d102e_ucode.bin e100/d102e_ucode.bin
fw-shipped-$(CONFIG_MYRI_SBUS) += myricom/lanai.bin
fw-shipped-$(CONFIG_PCMCIA_SMC91C92) += ositech/Xilinx7OD.bin fw-shipped-$(CONFIG_PCMCIA_SMC91C92) += ositech/Xilinx7OD.bin
fw-shipped-$(CONFIG_SCSI_ADVANSYS) += advansys/mcode.bin advansys/38C1600.bin \ fw-shipped-$(CONFIG_SCSI_ADVANSYS) += advansys/mcode.bin advansys/38C1600.bin \
advansys/3550.bin advansys/38C0800.bin advansys/3550.bin advansys/38C0800.bin
......
...@@ -632,3 +632,33 @@ Licence: Unknown ...@@ -632,3 +632,33 @@ Licence: Unknown
Found in hex form in kernel source. Found in hex form in kernel source.
-------------------------------------------------------------------------- --------------------------------------------------------------------------
Driver: MYRI_SBUS - MyriCOM Gigabit Ethernet
File: myricom/lanai.bin
Licence: Unknown
Found in hex form in kernel source.
--------------------------------------------------------------------------
Driver: BNX2 - Broadcom NetXtremeII
File: bnx2/bnx2-mips-06-4.6.16.fw
File: bnx2/bnx2-rv2p-06-4.6.16.fw
File: bnx2/bnx2-mips-09-4.6.17.fw
File: bnx2/bnx2-rv2p-09-4.6.15.fw
Licence:
This file contains firmware data derived from proprietary unpublished
source code, Copyright (c) 2004 - 2009 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.
--------------------------------------------------------------------------
此差异已折叠。
此差异已折叠。
:100000000000000000000CA00000005800000000EC
:1000100000000000000000000000000000000000E0
:1000200000000000000000000000000000000000D0
:1000300000000DE000000CF80000000500000000CA
:1000400000000000000000000000000000000000B0
:080050000000000000000000A8
:0800580000000010B18000025D
:100060000000001F0103010000000008AC000001B7
:1000700000000000050000000000000C2F800001BF
:10008000000000002B000000000000002B8000009A
:1000900000000010203F006300000010213F00031B
:1000A0000000001020BF0032000000188000FFFD9B
:1000B00000000010B1B8B00D0000000B2FDF0002EF
:1000C0000000000003D80000000000002C380000F1
:1000D0000000001091D400000000000806005555F3
:1000E0000000001880000075000000188000010B5F
:1000F00000000008020000020000000F42E0001CA7
:100100000000001091840A11000000102C62000B06
:10011000000000188000001E00000008020000021D
:100120000000000F42E0001C0000001091840A183B
:10013000000000082C8000B1000000082D0000091C
:100140000000001091D40000000000082D8001077D
:10015000000000188000006F0000001880000015EB
:1001600000000008B1000001000000082C8000B071
:10017000000000082D000008000000082D8000018C
:1001800000000018800000690000000B2FDF000253
:100190000000000C1F800002000000002C0700007F
:1001A0000000001091DE00000000000005000000CB
:1001B000000000188000FFDC0000000B2FDF0002B1
:1001C0000000000C1F800000000000002C07000051
:1001D0000000001091DE000000000000050000009B
:1001E000000000188000FFD60000000C1F800002F5
:1001F0000000000005000000000000188000FFD390
:100200000000000C298000020000000C1F8000028A
:10021000000000002ADF0000000000082A0000059E
:100220000000000805005555000000188000FFCDB3
:10023000000000080224003C000000180004000038
:10024000000000188000001C000000188000001E44
:100250000000001880000052000000188000009E7E
:10026000000000188000009D0000001880000000C1
:10027000000000188000000000000018800000004E
:10028000000000188000000000000018800000003E
:10029000000000188000000000000018800000002E
:1002A000000000188000000000000018800000DF3F
:1002B000000000188000000000000018800000000E
:1002C0000000001880000015000000188000001BCE
:1002D000000000188000000000000018800000B43A
:1002E000000000188000002E00000018800000DFD1
:1002F000000000188000010A00000018800000D5EE
:10030000000000188000012E000000188000003B53
:10031000000000188000000000000018800000713C
:100320000000000C1F80000100000000050000001C
:10033000000000188000FFAC0000001091D4000005
:100340000000000C298000010000000C1F8000014B
:10035000000000082A000002000000000500000064
:10036000000000188000FFA60000001091D40000DB
:100370000000000C298000010000000C1F8000011B
:100380000000000029420000000000082A000002CE
:100390000000000005000000000000188000FF9F22
:1003A000000000188000FF9E00000010B1BCB00AE1
:1003B0000000000B2FDF00020000000003D8000047
:1003C000000000002C3C00000000001091D4000050
:1003D00000000008060055550000001880000016B7
:1003E00000000018800000AC000000102C6201BA70
:1003F0000000001880000005000000082C8000B1FB
:10040000000000082D0000090000001091D4000039
:10041000000000082D8001070000000C298000006A
:100420000000000C1F8000000000001091DE0000A2
:10043000000000002ADF0000000000082A0000067B
:100440000000000805005555000000188000FF89D5
:100450000000001091D400000000000C2980000171
:100460000000000C1F800001000000082A00000BA3
:100470000000000005000000000000188000FF835D
:1004800000000018000200000000000006820000CA
:1004900000000010B18A000600000000860C140065
:1004A00000000010B18C00040000000005000000F6
:1004B000000000082A0000010000001091D4000094
:1004C00000000018000D0000000000000502000000
:1004D0000000001091DE000000000018000A00007B
:1004E00000000010B1A0B0130000000B2FDF0002CD
:1004F000000000002C200000000000082C800000FC
:10050000000000082D0000000000001091D4000041
:100510000000000806005555000000188000FFEE9E
:10052000000000082D80011C00000010001F0000CA
:100530000000001091DE00000000000F476000087E
:100540000000000F060E0001000000000F58000020
:10055000000000000A640000000000000AE500003E
:10056000000000090B66FFFF000000000D610000A5
:1005700000000018800000130000000F4760000812
:100580000000000B2FDF0002000000082C8000009C
:10059000000000082D0000000000001091D40000B1
:1005A000000000082D80011C0000000F060E000155
:1005B00000000010001F0000000000000F580000A5
:1005C0000000001091DE0000000000000A6400003E
:1005D000000000000AE50000000000090B66FFFFB4
:1005E000000000000D610000000000000262000039
:1005F0000000000B2FDF00020000000031040000AB
:1006000000000000309A0000000000000C96180066
:10061000000000090C99FFFF00000004CC99340091
:1006200000000010B1963202000000080F800000A8
:100630000000000C298000010000001000220002D0
:100640000000000C295200010000000C295200009B
:10065000000000080200000E000000080280001ADE
:1006600000000010B1C40A020000000802000003EC
:1006700000000008220000010000000C1F800001A3
:10068000000000002ADF0000000000002A0008002F
:100690000000000805005555000000188000FF3FCD
:1006A0000000000B2FDF00020000001091D40000BA
:1006B000000000082A000001000000002C200000BB
:1006C000000000082C800000000000082D00000041
:1006D000000000082D80011C0000001091D40000D3
:1006E0000000001091DE0000000000082C800006D1
:1006F000000000082D00000600000000308000000F
:100700000000000031000000000000082D800006FD
:100710000000000C298000010000000C1F80000177
:100720000000001091DE0000000000002ADF000041
:10073000000000082A000010000000000500000072
:10074000000000188000FF2A0000001091A0B009EE
:10075000000000082C8000B1000000082D000009F6
:100760000000001091D40000000000082D80010757
:10077000000000188000FFAB00000018800000108F
:1007800000000008AC000001000000188000000B11
:10079000000000000380B0000000000B2FDF00020B
:1007A000000000002C0040000000001091D4000068
:1007B0000000000806005555000000188000FF9A50
:1007C00000000018800000300000001880000006C3
:1007D0000000000B2FDF0002000000002C000E00C4
:1007E000000000082A000007000000080500555519
:1007F000000000188000FF140000000006820000C6
:100800000000000C298000010000000C1F80000186
:10081000000000100CE70007000000090562FFFF60
:1008200000000010BA6C1405000000002ADF000070
:100830000000000021000000000000082A00000560
:100840000000001091D40000000000082C8000B0CF
:10085000000000082D0000080000000C31620018A4
:10086000000000082D800001000000188000FF8CAF
:1008700000000018000D000000000010B1A0B00E34
:100880000000000B2FDF00020000000003D8000072
:10089000000000002C2000000000001091D4000097
:1008A0000000001880000014000000102C620002FC
:1008B000000000188000000B0000000B2FDF00027A
:1008C000000000002C0700000000000C1F80000149
:1008D0000000001091DE0000000000000500000094
:1008E000000000188000FEF6000000082C8000B117
:1008F000000000082D0000090000001091D4000045
:10090000000000082D8001070000000C2980000174
:100910000000000C1F8000010000001091DE0000AC
:10092000000000002ADF0000000000082A00000A82
:100930000000000005000000000000188000FEEB31
:100940000000000005020000000000082C8000B03C
:10095000000000082D000008000000082D80015054
:10096000000000000000000000000010205F0000F8
:10097000000000082C800000000000082D0000008E
:10098000000000082D8001080000000000000000A9
:100990000000001091DE000000000018000A0000B6
:1009A0000000001091D40000000000080600AAAA70
:1009B000000000188000FF5B0000000C298000018F
:1009C0000000000C1F800001000000082A00000940
:1009D000000000080500AAAA000000188000FED749
:1009E0000000001091D400000000000806005555DA
:1009F000000000188000FF530000001091A03C028E
:100A000000000010B1E662070000000B2FDF0002BB
:100A1000000000002C310000000000092CB1007F14
:100A2000000000082CD90000000000082D00000084
:100A3000000000082D80010D00000010B1A8000684
:100A400000000010205F0000000000002C200000CB
:100A5000000000002CA70000000000082D0000107E
:100A6000000000082D800108000000188000FF4CE5
:100A700000000010B1A6001000000010001F0000D0
:100A80000000000F0F300007000000000A600000A7
:100A9000000000000AE100000000000F4B620008A7
:100AA000000000090B1600FF000000000D620000AE
:100AB000000000090D1A00FF0000001007300003BD
:100AC0000000000C0D1A00080000000C0B160008B6
:100AD0000000000F4CE30018000000000C992C00EF
:100AE00000000004CC993400000000080F800000D2
:100AF0000000000C298000010000000033310000DC
:100B00000000000822000016000000002ADF00009C
:100B1000000000082A00000C00000010009F0000E8
:100B2000000000000F2000000000000C1F800001EA
:100B30000000000805005555000000188000FEABBD
:100B40000000001091D40000000000080600AAAACE
:100B5000000000188000FF270000000F4722000857
:100B600000000009070E000F00000008070E000833
:100B700000000008028000010000000702851C0040
:100B800000000008828500010000000002854C0082
:100B90000000000742851C0000000003C3AA5200A9
:100BA0000000000003B10E00000000074B071C000E
:100BB0000000000F0F3000070000000F0A9600032E
:100BC000000000000A955C00000000004A005A0086
:100BD000000000000C960A00000000090C99FFFFBD
:100BE000000000080D00FFFF00000010B196320267
:100BF000000000080F80000500000010B1A80008E8
:100C000000000010205F00000000000B2FDF00023A
:100C1000000000002C200000000000002CA70000B5
:100C2000000000082D000010000000082D800108C1
:100C3000000000188000FF130000000C2980000154
:100C400000000010001F00000000000C1F800001C9
:100C5000000000002ADF0000000000082A00000D4C
:100C6000000000080500AAAA000000188000FE8508
:100C70000000001091D40000000000080600555547
:100C8000000000188000FF010000000C2980000116
:100C90000000000C1F800001000000082A0000076F
:100CA0000000000805005555000000188000FE7D7A
:100CB00000000008030500040000000683040C0087
:100CC00000000008028502000000000086050C00FC
:100CD00000000001860C0E00000000080204000461
:100CE00000000000020418000000000083871800C4
:080CF0000000001800020000E2
:080CF80000000010B1800004AF
:100D00000000001F0103010000000008050000FFB3
:100D10000000001800020000000000002A0000008F
:100D200000000010B1D400000000000C2980000178
:100D30000000000802540008000000180004000031
:100D40000000001880000010000000188000001152
:100D5000000000188000003A000000188000010424
:100D6000000000188000010300000018800001024C
:100D70000000001880000102000000188000000040
:100D8000000000188000011400000018800000FE20
:100D9000000000188000000C0000001880000118FE
:100DA000000000188000016A000000188000006741
:100DB00000000018800000DA00000018800000E742
:100DC000000000002A000000000000188000FFEB77
:100DD000000000002A0000000000000C2980000034
:100DE0000000001020530000000000188000FFE702
:100DF000000000002A000000000000188000FFE54D
:100E000000000018000200000000000005020000C1
:100E1000000000109196342100000010205F0000B7
:100E2000000000002C1E0000000000082C800006BE
:100E3000000000082D000006000000082D800102BF
:100E400000000000000000000000001091DE000023
:100E5000000000000D61000000000018000A000002
:100E600000000000050200000000001091963416FA
:100E700000000010205F00000000000009D8000002
:100E8000000000002C1E0000000000082C8000B2B2
:100E9000000000082D00000A000000082D8001025B
:100EA00000000000000000000000001091DE0000C3
:100EB000000000000D620000000000002C13000084
:100EC00000000018000A00000000000005020000F9
:100ED000000000109196340900000010205F00000F
:100EE000000000002C1E0000000000082C800006FE
:100EF000000000082D00006A000000082D8001029B
:100F000000000000000000000000001091DE000062
:100F1000000000000D7A000000000018000A000028
:100F20000000001091DE000000000010001F000013
:100F3000000000002F80AA00000000002A0000002E
:100F4000000000000D6100000000000003620000CE
:100F5000000000002C4000000000000002638C0034
:100F600000000000264600000000000802040012F5
:100F700000000010B9060827000000000F5800000C
:100F8000000000000A640000000000000AE5000004
:100F9000000000090B66FFFF000000000C000000CD
:100FA000000000000B800000000000080CC60012CA
:100FB000000000188000FFCB000000080F80000335
:100FC000000000000000000000000010009F000072
:100FD00000000008271100120000000066900000C9
:100FE00000000008A31B001200000010B1980003CD
:100FF00000000010001F0000000000080F80000427
:101000000000000822000003000000082C80000CF3
:10101000000000082D00000C00000010009F0000E0
:1010200000000000259600000000000C2980000050
:101030000000000006660000000000008661180045
:10104000000000090260000F0000000F020400020F
:1010500000000010B60C08030000000C1FBF0000C9
:101060000000000C33660010000000003214000085
:1010700000000000329500000000000573662C009F
:101080000000000031E32E00000000082D80001059
:1010900000000010205300000000001091DE00004E
:1010A000000000188000FF900000000023000000F6
:1010B0000000000925E6FFFF000000082200000BE9
:1010C0000000000C695200000000000C29800000A4
:1010D0000000001020530000000000188000FF896D
:1010E0000000001091DE000000000010001F000052
:1010F000000000002F80AA00000000002A0000006D
:10110000000000002C400000000000082C8000407F
:10111000000000082D000020000000082D80011CA8
:1011200000000000000000000000001091DE000040
:101130000000000F42EA001000000010004F000401
:1011400000000010B746920000000008024900129B
:1011500000000010B5840A00000000000D610000CE
:1011600000000010BA66345A00000000036200005C
:1011700000000010B8630C5800000008830500123E
:1011800000000010004F00020000000003490000B2
:101190000000000183068C000000000083C60C00E4
:1011A00000000010B1870010000000000B6E00006E
:1011B000000000188000FF6B0000000106691400A9
:1011C00000000010918C000200000008B4E900014A
:1011D00000000010B1E92C4C0000000086692C00D2
:1011E00000000000020000000000000902EAFFFF0A
:1011F00000000010000C00020000000002040A00C1
:101200000000000F460C00010000000F02850001E5
:1012100000000010918C01FC00000010B7040E4388
:10122000000000002C400000000000000F40000003
:10123000000000000D610000000000000A640000D2
:10124000000000000AE50000000000090B66FFFF37
:10125000000000000C000000000000000B800000F7
:10126000000000080C860012000000080F80000338
:101270000000000C2952000000000010009F000038
:101280000000000827110012000000006690000016
:1012900000000000264600000000000023060000B9
:1012A00000000010B198000500000010001F0000B1
:1012B000000000080F800004000000000000000093
:1012C00000000010001F00000000000032140000A9
:1012D00000000000329500000000000031E32E0005
:1012E0000000000573662C00000000002596000039
:1012F00000000010B18700160000000C29800000DB
:101300000000000F0F6B0007000000000D690000D7
:10131000000000000A6C0000000000000AED000060
:10132000000000000B6E0000000000000B800000B9
:10133000000000000C870000000000080F80000380
:1013400000000010205300000000000C6952000152
:1013500000000010001F00000000000022C58C00EB
:1013600000000000231B0000000000002711000007
:10137000000000002690000000000010B8170E03C7
:101380000000000C29800000000000188000FFF61B
:1013900000000010B1980002000000080F80000457
:1013A000000000082200001A000000082C80000C39
:1013B000000000082D00000C000000082D80001027
:1013C00000000010001F0000000000000D6E000073
:1013D00000000003E7CF34000000000C298000006B
:1013E0000000001091DE000000000010B18700072F
:1013F00000000000361400000000000036950000D8
:101400000000000037160000000000082C8000508B
:10141000000000082D000030000000082D80000CA6
:101420000000001020530000000000188000FF1F83
:10143000000000002646000000000000230000001D
:101440000000000925E6FFFF000000000B6E000011
:1014500000000003E7CF2C00000000082200001B62
:101460000000000C695200000000000C2980000000
:101470000000001020530000000000188000FF153D
:10148000000000002FD50000000000002A0000002E
:1014900000000010003F000B000000000666000086
:1014A000000000008661180000000009026000F0E2
:1014B00000000010B70C08070000000C7366001055
:1014C000000000082C800018000000082D00001803
:1014D000000000082D8000020000000C5FBF00002B
:1014E0000000001091DE0000000000188000FF07DF
:1014F000000000002FD50000000000002A000000BE
:10150000000000002C4000000000000C29800000BA
:101510000000001091DE0000000000082C80001A7E
:10152000000000082D00001A000000003300000039
:10153000000000082D800002000000003180000043
:101540000000001091DE0000000000082C80000C5C
:10155000000000082D00000C000000082D80000491
:1015600000000010205300000000001091DE000079
:10157000000000188000FEF6000000188000FEF554
:10158000000000002A00000000000010001F000002
:10159000000000000F008000000000080F8000071E
:1015A0000000001880000014000000000502000088
:1015B000000000082200000900000000286D000063
:1015C00000000000290000000000000F6568001006
:1015D00000000003F66C940000000010B972A00433
:1015E0000000000C73E700190000000C2142000409
:1015F000000000003BF600000000000C2980000005
:101600000000001020530000000000082200000825
:101610000000000C6142000400000018000A0000F5
:10162000000000002A00000000000010001F000061
:101630000000000F0F470007000000080F8000089F
:101640000000000C29800000000000102053000062
:10165000000000188000FEDA0000001091DE00009B
:10166000000000002FD5000000000010001F000047
:101670000000000033510000000000002A000000BC
:1016800000000010B1C600230000000F0F5000073B
:10169000000000000A600000000000000AE10000F5
:1016A0000000000F4B620008000000090B1600FF4D
:1016B0000000000F4C620010000000000D620000EE
:1016C000000000090D1A00FF000000100750000381
:1016D0000000000C0D1A00080000000C0B1600089A
:1016E000000000000CC60000000000000B8000009D
:1016F0000000000006980000000000080F800003B2
:101700000000001006C200040000000C29000002C6
:1017100000000010264200020000000C29520003C5
:10172000000000082200000100000010009F0000DF
:1017300000000000231B00000000000027111A0019
:1017400000000000669000000000000C295200001C
:1017500000000010B19732090000000C2980000041
:101760000000000006980000000000102053000058
:101770000000000C295200030000000022C58C006C
:1017800000000010001F0000000000080F80000390
:10179000000000188000FFF300000010B1C8001323
:1017A00000000010B1C600030000000C29800000FA
:1017B00000000010205300000000000C295200001F
:1017C0000000000C295200030000001006C20002B5
:1017D0000000000C295200020000000022C58C000D
:1017E00000000000276500000000000026E4000063
:1017F000000000082200001600000010B1C600031F
:10180000000000002348000000000010B180000527
:1018100000000000234800000000000C29800000A8
:101820000000000F0F500007000000188000001299
:1018300000000008220000160000000C29800000B3
:10184000000000003014000000000000309500008F
:101850000000001007500003000000090B1600FFF5
:10186000000000090D1A00FF0000000F31160008EB
:10187000000000003162340000000003F16230001B
:1018800000000010205F0000000000002C5100004C
:10189000000000092CD1007F000000082CD90000B6
:1018A000000000082D000000000000082D80000C42
:1018B00000000000000000000000001091DE0000A9
:1018C0000000001005C2000300000000330000000B
:1018D000000000080F8000070000001020530000E7
:1018E00000000010009F0000000000188000FE872C
:1018F000000000002FD50000000000002A000000BA
:101900000000000F0F50000700000010B1C6002DAE
:101910000000000F4742000800000009070E000FFA
:1019200000000008070E000800000010001F000063
:1019300000000008090000010000000709121C0057
:1019400000000003CBCA9200000000000B97A20029
:101950000000000742171C00000000000B040000FC
:101960000000000F0A840003000000000A959C009C
:10197000000000004A009A000000000882120001E6
:10198000000000010C170800000000000C978C00FC
:101990000000000002180000000000080D00FFFF1A
:1019A000000000080F8000060000000C2900000065
:1019B0000000001006C200040000000C29520002C2
:1019C00000000010264200020000000C2952000313
:1019D000000000082200000100000010009F00002D
:1019E00000000010B197320C00000000231B000023
:1019F00000000000271108000000000066900000B1
:101A00000000000C29800000000000000218000007
:101A100000000010205300000000000C29520003B9
:101A20000000000022C5360000000010001F00006A
:101A3000000000080F800006000000188000FFF47E
:101A400000000000231B0000000000002711080018
:101A5000000000006690000000000010B1C8000BFC
:101A60000000000C2980000000000010205300003E
:101A70000000000C295200000000000C2952000355
:101A80000000001006C200020000000C29520002F3
:101A90000000000022C58C00000000002765000047
:101AA0000000000026E400000000000023480000C1
:101AB00000000008220000170000000C2980000030
:101AC00000000010001F0000000000102053000064
:081AD000000000188000FE4A2E
:00000001FF
/*
* This file contains firmware data derived from proprietary unpublished
* source code, Copyright (c) 2004 - 2009 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.
*/
此差异已折叠。
此差异已折叠。
...@@ -215,3 +215,5 @@ struct net_device *alloc_fddidev(int sizeof_priv) ...@@ -215,3 +215,5 @@ struct net_device *alloc_fddidev(int sizeof_priv)
return alloc_netdev(sizeof_priv, "fddi%d", fddi_setup); return alloc_netdev(sizeof_priv, "fddi%d", fddi_setup);
} }
EXPORT_SYMBOL(alloc_fddidev); EXPORT_SYMBOL(alloc_fddidev);
MODULE_LICENSE("GPL");
...@@ -72,6 +72,7 @@ int xfrm6_prepare_output(struct xfrm_state *x, struct sk_buff *skb) ...@@ -72,6 +72,7 @@ int xfrm6_prepare_output(struct xfrm_state *x, struct sk_buff *skb)
#endif #endif
skb->protocol = htons(ETH_P_IPV6); skb->protocol = htons(ETH_P_IPV6);
skb->local_df = 1;
return x->outer_mode->output2(x, skb); return x->outer_mode->output2(x, skb);
} }
......
...@@ -493,8 +493,7 @@ static struct socket *sock_alloc(void) ...@@ -493,8 +493,7 @@ static struct socket *sock_alloc(void)
inode->i_uid = current_fsuid(); inode->i_uid = current_fsuid();
inode->i_gid = current_fsgid(); inode->i_gid = current_fsgid();
get_cpu_var(sockets_in_use)++; percpu_add(sockets_in_use, 1);
put_cpu_var(sockets_in_use);
return sock; return sock;
} }
...@@ -536,8 +535,7 @@ void sock_release(struct socket *sock) ...@@ -536,8 +535,7 @@ void sock_release(struct socket *sock)
if (sock->fasync_list) if (sock->fasync_list)
printk(KERN_ERR "sock_release: fasync list not empty!\n"); printk(KERN_ERR "sock_release: fasync list not empty!\n");
get_cpu_var(sockets_in_use)--; percpu_sub(sockets_in_use, 1);
put_cpu_var(sockets_in_use);
if (!sock->file) { if (!sock->file) {
iput(SOCK_INODE(sock)); iput(SOCK_INODE(sock));
return; return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册