Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21274
b: refs/heads/master
c: f71e130
h: refs/heads/master
v: v3
  • Loading branch information
Arjan van de Ven authored and Jeff Garzik committed Mar 4, 2006
1 parent 1e8b444 commit 03ad719
Show file tree
Hide file tree
Showing 201 changed files with 4,805 additions and 5,936 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f90fdc3cce3d8c8ed09615dc68cb789655078803
refs/heads/master: f71e130966ba429dbd24be08ddbcdf263df9a5ad
7 changes: 0 additions & 7 deletions trunk/Documentation/feature-removal-schedule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,6 @@ Who: Ralf Baechle <ralf@linux-mips.org>

---------------------------

What: eepro100 network driver
When: January 2007
Why: replaced by the e100 driver
Who: Adrian Bunk <bunk@stusta.de>

---------------------------

What: Legacy /proc/pci interface (PCI_LEGACY_PROC)
When: March 2006
Why: deprecated since 2.5.53 in favor of lspci(8)
Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/mips/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ void do_gettimeofday(struct timeval *tv)
unsigned long seq;
unsigned long lost;
unsigned long usec, sec;
unsigned long max_ntp_tick = tick_usec - tickadj;
unsigned long max_ntp_tick;

do {
seq = read_seqbegin(&xtime_lock);
Expand All @@ -178,12 +178,13 @@ void do_gettimeofday(struct timeval *tv)
* Better to lose some accuracy than have time go backwards..
*/
if (unlikely(time_adjust < 0)) {
max_ntp_tick = (USEC_PER_SEC / HZ) - tickadj;
usec = min(usec, max_ntp_tick);

if (lost)
usec += lost * max_ntp_tick;
} else if (unlikely(lost))
usec += lost * tick_usec;
usec += lost * (USEC_PER_SEC / HZ);

sec = xtime.tv_sec;
usec += (xtime.tv_nsec / 1000);
Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/ppc/platforms/hdpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,10 +319,11 @@ static void __init hdpu_fixup_eth_pdata(struct platform_device *pd)
struct mv643xx_eth_platform_data *eth_pd;
eth_pd = pd->dev.platform_data;

eth_pd->port_serial_control =
mv64x60_read(&bh, MV643XX_ETH_PORT_SERIAL_CONTROL_REG(pd->id) & ~1);

eth_pd->force_phy_addr = 1;
eth_pd->phy_addr = pd->id;
eth_pd->speed = SPEED_100;
eth_pd->duplex = DUPLEX_FULL;
eth_pd->tx_queue_size = 400;
eth_pd->rx_queue_size = 800;
}
Expand Down
24 changes: 21 additions & 3 deletions trunk/drivers/char/pcmcia/cm4000_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
*
* (C) 2000,2001,2002,2003,2004 Omnikey AG
*
* (C) 2005 Harald Welte <laforge@gnumonks.org>
* (C) 2005-2006 Harald Welte <laforge@gnumonks.org>
* - Adhere to Kernel CodingStyle
* - Port to 2.6.13 "new" style PCMCIA
* - Check for copy_{from,to}_user return values
* - Use nonseekable_open()
* - add class interface for udev device creation
*
* All rights reserved. Licensed under dual BSD/GPL license.
*/
Expand Down Expand Up @@ -56,7 +57,7 @@ module_param(pc_debug, int, 0600);
#else
#define DEBUGP(n, rdr, x, args...)
#endif
static char *version = "cm4000_cs.c v2.4.0gm5 - All bugs added by Harald Welte";
static char *version = "cm4000_cs.c v2.4.0gm6 - All bugs added by Harald Welte";

#define T_1SEC (HZ)
#define T_10MSEC msecs_to_jiffies(10)
Expand Down Expand Up @@ -156,6 +157,7 @@ struct cm4000_dev {
/*queue*/ 4*sizeof(wait_queue_head_t))

static dev_link_t *dev_table[CM4000_MAX_DEV];
static struct class *cmm_class;

/* This table doesn't use spaces after the comma between fields and thus
* violates CodingStyle. However, I don't really think wrapping it around will
Expand Down Expand Up @@ -1937,6 +1939,9 @@ static int cm4000_attach(struct pcmcia_device *p_dev)
link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
cm4000_config(link, i);

class_device_create(cmm_class, NULL, MKDEV(major, i), NULL,
"cmm%d", i);

return 0;
}

Expand All @@ -1962,6 +1967,8 @@ static void cm4000_detach(struct pcmcia_device *p_dev)
dev_table[devno] = NULL;
kfree(dev);

class_device_destroy(cmm_class, MKDEV(major, devno));

return;
}

Expand Down Expand Up @@ -1995,8 +2002,18 @@ static struct pcmcia_driver cm4000_driver = {

static int __init cmm_init(void)
{
int rc;

printk(KERN_INFO "%s\n", version);
pcmcia_register_driver(&cm4000_driver);

cmm_class = class_create(THIS_MODULE, "cardman_4000");
if (!cmm_class)
return -1;

rc = pcmcia_register_driver(&cm4000_driver);
if (rc < 0)
return rc;

major = register_chrdev(0, DEVICE_NAME, &cm4000_fops);
if (major < 0) {
printk(KERN_WARNING MODULE_NAME
Expand All @@ -2012,6 +2029,7 @@ static void __exit cmm_exit(void)
printk(KERN_INFO MODULE_NAME ": unloading\n");
pcmcia_unregister_driver(&cm4000_driver);
unregister_chrdev(major, DEVICE_NAME);
class_destroy(cmm_class);
};

module_init(cmm_init);
Expand Down
23 changes: 20 additions & 3 deletions trunk/drivers/char/pcmcia/cm4040_cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
*
* (c) 2000-2004 Omnikey AG (http://www.omnikey.com/)
*
* (C) 2005 Harald Welte <laforge@gnumonks.org>
* (C) 2005-2006 Harald Welte <laforge@gnumonks.org>
* - add support for poll()
* - driver cleanup
* - add waitqueues
* - adhere to linux kernel coding style and policies
* - support 2.6.13 "new style" pcmcia interface
* - add class interface for udev device creation
*
* The device basically is a USB CCID compliant device that has been
* attached to an I/O-Mapped FIFO.
Expand Down Expand Up @@ -53,7 +54,7 @@ module_param(pc_debug, int, 0600);
#endif

static char *version =
"OMNIKEY CardMan 4040 v1.1.0gm4 - All bugs added by Harald Welte";
"OMNIKEY CardMan 4040 v1.1.0gm5 - All bugs added by Harald Welte";

#define CCID_DRIVER_BULK_DEFAULT_TIMEOUT (150*HZ)
#define CCID_DRIVER_ASYNC_POWERUP_TIMEOUT (35*HZ)
Expand All @@ -67,6 +68,7 @@ static char *version =
static void reader_release(dev_link_t *link);

static int major;
static struct class *cmx_class;

#define BS_READABLE 0x01
#define BS_WRITABLE 0x02
Expand Down Expand Up @@ -696,6 +698,9 @@ static int reader_attach(struct pcmcia_device *p_dev)
link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
reader_config(link, i);

class_device_create(cmx_class, NULL, MKDEV(major, i), NULL,
"cmx%d", i);

return 0;
}

Expand All @@ -721,6 +726,8 @@ static void reader_detach(struct pcmcia_device *p_dev)
dev_table[devno] = NULL;
kfree(dev);

class_device_destroy(cmx_class, MKDEV(major, devno));

return;
}

Expand Down Expand Up @@ -755,8 +762,17 @@ static struct pcmcia_driver reader_driver = {

static int __init cm4040_init(void)
{
int rc;

printk(KERN_INFO "%s\n", version);
pcmcia_register_driver(&reader_driver);
cmx_class = class_create(THIS_MODULE, "cardman_4040");
if (!cmx_class)
return -1;

rc = pcmcia_register_driver(&reader_driver);
if (rc < 0)
return rc;

major = register_chrdev(0, DEVICE_NAME, &reader_fops);
if (major < 0) {
printk(KERN_WARNING MODULE_NAME
Expand All @@ -771,6 +787,7 @@ static void __exit cm4040_exit(void)
printk(KERN_INFO MODULE_NAME ": unloading\n");
pcmcia_unregister_driver(&reader_driver);
unregister_chrdev(major, DEVICE_NAME);
class_destroy(cmx_class);
}

module_init(cm4040_init);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/ide/legacy/ide-cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ static struct pcmcia_device_id ide_ids[] = {
PCMCIA_DEVICE_PROD_ID12("PCMCIA", "PnPIDE", 0x281f1c5d, 0x0c694728),
PCMCIA_DEVICE_PROD_ID12("SHUTTLE TECHNOLOGY LTD.", "PCCARD-IDE/ATAPI Adapter", 0x4a3f0ba0, 0x322560e1),
PCMCIA_DEVICE_PROD_ID12("TOSHIBA", "MK2001MPL", 0xb4585a1a, 0x3489e003),
PCMCIA_DEVICE_PROD_ID1("TRANSCEND 512M ", 0xd0909443),
PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852),
PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209),
PCMCIA_DEVICE_PROD_ID12("STI", "Flash 5.0", 0xbf2df18d, 0x8cb57a0e),
Expand Down
22 changes: 10 additions & 12 deletions trunk/drivers/mtd/redboot.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* $Id: redboot.c,v 1.18 2005/11/07 11:14:21 gleixner Exp $
* $Id: redboot.c,v 1.19 2005/12/01 10:03:51 dwmw2 Exp $
*
* Parse RedBoot-style Flash Image System (FIS) tables and
* produce a Linux partition array to match.
Expand Down Expand Up @@ -92,10 +92,10 @@ static int parse_redboot_partitions(struct mtd_info *master,
if (!memcmp(buf[i].name, "FIS directory", 14)) {
/* This is apparently the FIS directory entry for the
* FIS directory itself. The FIS directory size is
* one erase block, if the buf[i].size field is
* one erase block; if the buf[i].size field is
* swab32(erasesize) then we know we are looking at
* a byte swapped FIS directory - swap all the entries!
* (NOTE: this is 'size' not 'data_length', size is
* (NOTE: this is 'size' not 'data_length'; size is
* the full size of the entry.)
*/
if (swab32(buf[i].size) == master->erasesize) {
Expand All @@ -104,15 +104,13 @@ static int parse_redboot_partitions(struct mtd_info *master,
/* The unsigned long fields were written with the
* wrong byte sex, name and pad have no byte sex.
*/
# define do_swab32(x) (x) = swab32(x)
do_swab32(buf[j].flash_base);
do_swab32(buf[j].mem_base);
do_swab32(buf[j].size);
do_swab32(buf[j].entry_point);
do_swab32(buf[j].data_length);
do_swab32(buf[j].desc_cksum);
do_swab32(buf[j].file_cksum);
# undef do_swab32
swab32s(&buf[j].flash_base);
swab32s(&buf[j].mem_base);
swab32s(&buf[j].size);
swab32s(&buf[j].entry_point);
swab32s(&buf[j].data_length);
swab32s(&buf[j].desc_cksum);
swab32s(&buf[j].file_cksum);
}
}
break;
Expand Down
9 changes: 4 additions & 5 deletions trunk/drivers/net/3c523.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@
#include <linux/mca-legacy.h>
#include <linux/ethtool.h>
#include <linux/bitops.h>
#include <linux/jiffies.h>

#include <asm/uaccess.h>
#include <asm/processor.h>
Expand Down Expand Up @@ -659,7 +658,7 @@ static int init586(struct net_device *dev)

s = jiffies; /* warning: only active with interrupts on !! */
while (!(cfg_cmd->cmd_status & STAT_COMPL)) {
if (time_after(jiffies, s + 30*HZ/100))
if (jiffies - s > 30*HZ/100)
break;
}

Expand All @@ -685,7 +684,7 @@ static int init586(struct net_device *dev)

s = jiffies;
while (!(ias_cmd->cmd_status & STAT_COMPL)) {
if (time_after(jiffies, s + 30*HZ/100))
if (jiffies - s > 30*HZ/100)
break;
}

Expand All @@ -710,7 +709,7 @@ static int init586(struct net_device *dev)

s = jiffies;
while (!(tdr_cmd->cmd_status & STAT_COMPL)) {
if (time_after(jiffies, s + 30*HZ/100)) {
if (jiffies - s > 30*HZ/100) {
printk(KERN_WARNING "%s: %d Problems while running the TDR.\n", dev->name, __LINE__);
result = 1;
break;
Expand Down Expand Up @@ -799,7 +798,7 @@ static int init586(struct net_device *dev)
elmc_id_attn586();
s = jiffies;
while (!(mc_cmd->cmd_status & STAT_COMPL)) {
if (time_after(jiffies, s + 30*HZ/100))
if (jiffies - s > 30*HZ/100)
break;
}
if (!(mc_cmd->cmd_status & STAT_COMPL)) {
Expand Down
7 changes: 3 additions & 4 deletions trunk/drivers/net/3c59x.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ static int vortex_debug = 1;
#include <linux/highmem.h>
#include <linux/eisa.h>
#include <linux/bitops.h>
#include <linux/jiffies.h>
#include <asm/irq.h> /* For NR_IRQS only. */
#include <asm/io.h>
#include <asm/uaccess.h>
Expand Down Expand Up @@ -842,7 +841,7 @@ enum xcvr_types {
XCVR_100baseFx, XCVR_MII=6, XCVR_NWAY=8, XCVR_ExtMII=9, XCVR_Default=10,
};

static struct media_table {
static const struct media_table {
char *name;
unsigned int media_bits:16, /* Bits to set in Wn4_Media register. */
mask:8, /* The transceiver-present bit in Wn3_Config.*/
Expand Down Expand Up @@ -1446,7 +1445,7 @@ static int __devinit vortex_probe1(struct device *gendev,
}

{
static const char * ram_split[] = {"5:3", "3:1", "1:1", "3:5"};
static const char * const ram_split[] = {"5:3", "3:1", "1:1", "3:5"};
unsigned int config;
EL3WINDOW(3);
vp->available_media = ioread16(ioaddr + Wn3_Options);
Expand Down Expand Up @@ -2725,7 +2724,7 @@ boomerang_rx(struct net_device *dev)
skb = dev_alloc_skb(PKT_BUF_SZ);
if (skb == NULL) {
static unsigned long last_jif;
if (time_after(jiffies, last_jif + 10 * HZ)) {
if ((jiffies - last_jif) > 10 * HZ) {
printk(KERN_WARNING "%s: memory shortage\n", dev->name);
last_jif = jiffies;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/7990.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/skbuff.h>
#include <asm/irq.h>
#include <linux/irq.h>
/* Used for the temporal inet entries and routing */
#include <linux/socket.h>
#include <linux/bitops.h>
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/8139cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,7 @@ static int cp_change_mtu(struct net_device *dev, int new_mtu)
}
#endif /* BROKEN */

static char mii_2_8139_map[8] = {
static const char mii_2_8139_map[8] = {
BasicModeCtrl,
BasicModeStatus,
0,
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/8139too.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ typedef enum {


/* indexed by board_t, above */
static struct {
static const struct {
const char *name;
u32 hw_flags;
} board_info[] __devinitdata = {
Expand Down Expand Up @@ -1192,7 +1192,7 @@ static int __devinit read_eeprom (void __iomem *ioaddr, int location, int addr_l
#define mdio_delay() RTL_R8(Config4)


static char mii_2_8139_map[8] = {
static const char mii_2_8139_map[8] = {
BasicModeCtrl,
BasicModeStatus,
0,
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/82596.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ static void rebuild_rx_bufs(struct net_device *dev)
static int init_i596_mem(struct net_device *dev)
{
struct i596_private *lp = dev->priv;
#if !defined(ENABLE_MVME16x_NET) && !defined(ENABLE_BVME6000_NET) || defined(ENABLE_APRICOT)
#if !defined(ENABLE_MVME16x_NET) && !defined(ENABLE_BVME6000_NET)
short ioaddr = dev->base_addr;
#endif
unsigned long flags;
Expand Down
Loading

0 comments on commit 03ad719

Please sign in to comment.