Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 117820
b: refs/heads/master
c: dd56b63
h: refs/heads/master
v: v3
  • Loading branch information
Geert Uytterhoeven authored and Jean Delvare committed Oct 26, 2008
1 parent 9cfe047 commit 50f77cd
Show file tree
Hide file tree
Showing 11 changed files with 125 additions and 31 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: e383d56487062275e9971094f2efcca34227ee60
refs/heads/master: dd56b638951936cda945ba5641cc44927a5f1c6d
6 changes: 1 addition & 5 deletions trunk/drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,11 +708,7 @@ static struct ata_queued_cmd *ata_scsi_qc_new(struct ata_device *dev,
{
struct ata_queued_cmd *qc;

if (cmd->request->tag != -1)
qc = ata_qc_new_init(dev, cmd->request->tag);
else
qc = ata_qc_new_init(dev, 0);

qc = ata_qc_new_init(dev, cmd->request->tag);
if (qc) {
qc->scsicmd = cmd;
qc->scsidone = done;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/hwmon/w83781d.c
Original file line number Diff line number Diff line change
Expand Up @@ -1968,7 +1968,7 @@ w83781d_isa_register(void)
return res;
}

static void __exit
static void
w83781d_isa_unregister(void)
{
if (pdev) {
Expand Down Expand Up @@ -2017,7 +2017,7 @@ w83781d_isa_register(void)
return 0;
}

static void __exit
static void
w83781d_isa_unregister(void)
{
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/ide/icside.c
Original file line number Diff line number Diff line change
Expand Up @@ -690,9 +690,9 @@ static int __init icside_init(void)
return ecard_register_driver(&icside_driver);
}

static void __exit icside_exit(void)
static void __exit icside_exit(void);
{
ecard_remove_driver(&icside_driver);
ecard_unregister_driver(&icside_driver);
}

MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>");
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/ide/rapide.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include <asm/ecard.h>

static const struct ide_port_info rapide_port_info = {
static struct const ide_port_info rapide_port_info = {
.host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA,
};

Expand Down Expand Up @@ -97,7 +97,7 @@ static int __init rapide_init(void)

static void __exit rapide_exit(void)
{
ecard_remove_driver(&rapide_driver);
ecard_unregister_driver(&rapide_driver);
}

MODULE_LICENSE("GPL");
Expand Down
88 changes: 88 additions & 0 deletions trunk/drivers/net/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -1915,6 +1915,92 @@ static void rtl_disable_msi(struct pci_dev *pdev, struct rtl8169_private *tp)
}
}

static int rtl_eeprom_read(struct pci_dev *pdev, int cap, int addr, __le32 *val)
{
int ret, count = 100;
u16 status = 0;
u32 value;

ret = pci_write_config_word(pdev, cap + PCI_VPD_ADDR, addr);
if (ret < 0)
return ret;

do {
udelay(10);
ret = pci_read_config_word(pdev, cap + PCI_VPD_ADDR, &status);
if (ret < 0)
return ret;
} while (!(status & PCI_VPD_ADDR_F) && --count);

if (!(status & PCI_VPD_ADDR_F))
return -ETIMEDOUT;

ret = pci_read_config_dword(pdev, cap + PCI_VPD_DATA, &value);
if (ret < 0)
return ret;

*val = cpu_to_le32(value);

return 0;
}

static void rtl_init_mac_address(struct rtl8169_private *tp,
void __iomem *ioaddr)
{
struct pci_dev *pdev = tp->pci_dev;
int vpd_cap;
__le32 sig;
u8 mac[8];
u8 cfg1;

cfg1 = RTL_R8(Config1);
if (!(cfg1 & VPD)) {
if (netif_msg_probe(tp))
dev_info(&pdev->dev, "VPD access disabled, enabling\n");
RTL_W8(Cfg9346, Cfg9346_Unlock);
RTL_W8(Config1, cfg1 | VPD);
RTL_W8(Cfg9346, Cfg9346_Lock);
}

vpd_cap = pci_find_capability(pdev, PCI_CAP_ID_VPD);
if (!vpd_cap)
return;

if (rtl_eeprom_read(pdev, vpd_cap, RTL_EEPROM_SIG_ADDR, &sig) < 0)
return;

if ((sig & RTL_EEPROM_SIG_MASK) != RTL_EEPROM_SIG) {
dev_info(&pdev->dev, "Missing EEPROM signature: %08x\n", sig);
return;
}

/*
* MAC address is stored in EEPROM at offset 0x0e
* Realtek says: "The VPD address does not have to be a DWORD-aligned
* address as defined in the PCI 2.2 Specifications, but the VPD data
* is always consecutive 4-byte data starting from the VPD address
* specified."
*/
if (rtl_eeprom_read(pdev, vpd_cap, 0x000e, (__le32*)&mac[0]) < 0 ||
rtl_eeprom_read(pdev, vpd_cap, 0x0012, (__le32*)&mac[4]) < 0) {
if (netif_msg_probe(tp)) {
dev_warn(&pdev->dev,
"reading MAC address from EEPROM failed\n");
}
return;
}

if (netif_msg_probe(tp)) {
DECLARE_MAC_BUF(buf);

dev_info(&pdev->dev, "MAC address found in EEPROM: %s\n",
print_mac(buf, mac));
}

if (is_valid_ether_addr(mac))
rtl_rar_set(tp, mac);
}

static int __devinit
rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
Expand Down Expand Up @@ -2092,6 +2178,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)

tp->mmio_addr = ioaddr;

rtl_init_mac_address(tp, ioaddr);

/* Get MAC address */
for (i = 0; i < MAC_ADDR_LEN; i++)
dev->dev_addr[i] = RTL_R8(MAC0 + i);
Expand Down
20 changes: 12 additions & 8 deletions trunk/fs/ext3/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,17 @@ static int ext3_dx_readdir(struct file * filp,
if (info->extra_fname) {
if (call_filldir(filp, dirent, filldir, info->extra_fname))
goto finished;

info->extra_fname = NULL;
goto next_node;
info->curr_node = rb_next(info->curr_node);
if (!info->curr_node) {
if (info->next_hash == ~0) {
filp->f_pos = EXT3_HTREE_EOF;
goto finished;
}
info->curr_hash = info->next_hash;
info->curr_minor_hash = 0;
}
} else if (!info->curr_node)
info->curr_node = rb_first(&info->root);

Expand Down Expand Up @@ -489,14 +498,9 @@ static int ext3_dx_readdir(struct file * filp,
info->curr_minor_hash = fname->minor_hash;
if (call_filldir(filp, dirent, filldir, fname))
break;
next_node:

info->curr_node = rb_next(info->curr_node);
if (info->curr_node) {
fname = rb_entry(info->curr_node, struct fname,
rb_hash);
info->curr_hash = fname->hash;
info->curr_minor_hash = fname->minor_hash;
} else {
if (!info->curr_node) {
if (info->next_hash == ~0) {
filp->f_pos = EXT3_HTREE_EOF;
break;
Expand Down
20 changes: 12 additions & 8 deletions trunk/fs/ext4/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,17 @@ static int ext4_dx_readdir(struct file *filp,
if (info->extra_fname) {
if (call_filldir(filp, dirent, filldir, info->extra_fname))
goto finished;

info->extra_fname = NULL;
goto next_node;
info->curr_node = rb_next(info->curr_node);
if (!info->curr_node) {
if (info->next_hash == ~0) {
filp->f_pos = EXT4_HTREE_EOF;
goto finished;
}
info->curr_hash = info->next_hash;
info->curr_minor_hash = 0;
}
} else if (!info->curr_node)
info->curr_node = rb_first(&info->root);

Expand Down Expand Up @@ -492,14 +501,9 @@ static int ext4_dx_readdir(struct file *filp,
info->curr_minor_hash = fname->minor_hash;
if (call_filldir(filp, dirent, filldir, fname))
break;
next_node:

info->curr_node = rb_next(info->curr_node);
if (info->curr_node) {
fname = rb_entry(info->curr_node, struct fname,
rb_hash);
info->curr_hash = fname->hash;
info->curr_minor_hash = fname->minor_hash;
} else {
if (!info->curr_node) {
if (info->next_hash == ~0) {
filp->f_pos = EXT4_HTREE_EOF;
break;
Expand Down
3 changes: 2 additions & 1 deletion trunk/init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,6 @@ static void __init do_initcalls(void)
static void __init do_basic_setup(void)
{
rcu_init_sched(); /* needed by module_init stage. */
init_workqueues();
usermodehelper_init();
driver_init();
init_irq_proc();
Expand Down Expand Up @@ -852,6 +851,8 @@ static int __init kernel_init(void * unused)

cad_pid = task_pid(current);

init_workqueues();

smp_prepare_cpus(setup_max_cpus);

do_pre_smp_initcalls();
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/stop_machine.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,4 @@ static int __init stop_machine_init(void)
stop_machine_work = alloc_percpu(struct work_struct);
return 0;
}
core_initcall(stop_machine_init);
early_initcall(stop_machine_init);
3 changes: 2 additions & 1 deletion trunk/scripts/kconfig/confdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,8 @@ void conf_set_all_new_symbols(enum conf_def_mode mode)

}

sym_clear_all_valid();
if (modules_sym)
sym_calc_value(modules_sym);

if (mode != def_random)
return;
Expand Down

0 comments on commit 50f77cd

Please sign in to comment.