Commit 39892032 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:
  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)
parents d508afb4 37efa239
...@@ -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);
} }
......
This diff is collapsed.
...@@ -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
......
This diff is collapsed.
This diff is collapsed.
...@@ -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;
......
This diff is collapsed.
...@@ -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,6 +575,7 @@ static int virtnet_set_mac_address(struct net_device *dev, void *p) ...@@ -575,6 +575,7 @@ static int virtnet_set_mac_address(struct net_device *dev, void *p)
if (ret) if (ret)
return ret; return ret;
if (virtio_has_feature(vdev, VIRTIO_NET_F_MAC))
vdev->config->set(vdev, offsetof(struct virtio_net_config, mac), vdev->config->set(vdev, offsetof(struct virtio_net_config, mac),
dev->dev_addr, dev->addr_len); dev->dev_addr, dev->addr_len);
...@@ -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.
--------------------------------------------------------------------------
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment