aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ata/libata-scsi.c6
-rw-r--r--drivers/ide/icside.c4
-rw-r--r--drivers/ide/rapide.c4
-rw-r--r--drivers/net/r8169.c88
-rw-r--r--fs/ext3/dir.c20
-rw-r--r--fs/ext4/dir.c20
-rw-r--r--init/main.c3
-rw-r--r--kernel/stop_machine.c2
-rw-r--r--scripts/kconfig/confdata.c3
9 files changed, 28 insertions, 122 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index d5b9b7266c8b..4b95c4387e9e 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -708,7 +708,11 @@ static struct ata_queued_cmd *ata_scsi_qc_new(struct ata_device *dev,
708{ 708{
709 struct ata_queued_cmd *qc; 709 struct ata_queued_cmd *qc;
710 710
711 qc = ata_qc_new_init(dev, cmd->request->tag); 711 if (cmd->request->tag != -1)
712 qc = ata_qc_new_init(dev, cmd->request->tag);
713 else
714 qc = ata_qc_new_init(dev, 0);
715
712 if (qc) { 716 if (qc) {
713 qc->scsicmd = cmd; 717 qc->scsicmd = cmd;
714 qc->scsidone = done; 718 qc->scsidone = done;
diff --git a/drivers/ide/icside.c b/drivers/ide/icside.c
index 76bdc9a27f6f..2d848010499d 100644
--- a/drivers/ide/icside.c
+++ b/drivers/ide/icside.c
@@ -690,9 +690,9 @@ static int __init icside_init(void)
690 return ecard_register_driver(&icside_driver); 690 return ecard_register_driver(&icside_driver);
691} 691}
692 692
693static void __exit icside_exit(void); 693static void __exit icside_exit(void)
694{ 694{
695 ecard_unregister_driver(&icside_driver); 695 ecard_remove_driver(&icside_driver);
696} 696}
697 697
698MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>"); 698MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>");
diff --git a/drivers/ide/rapide.c b/drivers/ide/rapide.c
index 78d27d9ae430..d5003ca69801 100644
--- a/drivers/ide/rapide.c
+++ b/drivers/ide/rapide.c
@@ -11,7 +11,7 @@
11 11
12#include <asm/ecard.h> 12#include <asm/ecard.h>
13 13
14static struct const ide_port_info rapide_port_info = { 14static const struct ide_port_info rapide_port_info = {
15 .host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA, 15 .host_flags = IDE_HFLAG_MMIO | IDE_HFLAG_NO_DMA,
16}; 16};
17 17
@@ -97,7 +97,7 @@ static int __init rapide_init(void)
97 97
98static void __exit rapide_exit(void) 98static void __exit rapide_exit(void)
99{ 99{
100 ecard_unregister_driver(&rapide_driver); 100 ecard_remove_driver(&rapide_driver);
101} 101}
102 102
103MODULE_LICENSE("GPL"); 103MODULE_LICENSE("GPL");
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 2b4e975770f3..4b7cb389dc49 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1915,92 +1915,6 @@ static void rtl_disable_msi(struct pci_dev *pdev, struct rtl8169_private *tp)
1915 } 1915 }
1916} 1916}
1917 1917
1918static int rtl_eeprom_read(struct pci_dev *pdev, int cap, int addr, __le32 *val)
1919{
1920 int ret, count = 100;
1921 u16 status = 0;
1922 u32 value;
1923
1924 ret = pci_write_config_word(pdev, cap + PCI_VPD_ADDR, addr);
1925 if (ret < 0)
1926 return ret;
1927
1928 do {
1929 udelay(10);
1930 ret = pci_read_config_word(pdev, cap + PCI_VPD_ADDR, &status);
1931 if (ret < 0)
1932 return ret;
1933 } while (!(status & PCI_VPD_ADDR_F) && --count);
1934
1935 if (!(status & PCI_VPD_ADDR_F))
1936 return -ETIMEDOUT;
1937
1938 ret = pci_read_config_dword(pdev, cap + PCI_VPD_DATA, &value);
1939 if (ret < 0)
1940 return ret;
1941
1942 *val = cpu_to_le32(value);
1943
1944 return 0;
1945}
1946
1947static void rtl_init_mac_address(struct rtl8169_private *tp,
1948 void __iomem *ioaddr)
1949{
1950 struct pci_dev *pdev = tp->pci_dev;
1951 int vpd_cap;
1952 __le32 sig;
1953 u8 mac[8];
1954 u8 cfg1;
1955
1956 cfg1 = RTL_R8(Config1);
1957 if (!(cfg1 & VPD)) {
1958 if (netif_msg_probe(tp))
1959 dev_info(&pdev->dev, "VPD access disabled, enabling\n");
1960 RTL_W8(Cfg9346, Cfg9346_Unlock);
1961 RTL_W8(Config1, cfg1 | VPD);
1962 RTL_W8(Cfg9346, Cfg9346_Lock);
1963 }
1964
1965 vpd_cap = pci_find_capability(pdev, PCI_CAP_ID_VPD);
1966 if (!vpd_cap)
1967 return;
1968
1969 if (rtl_eeprom_read(pdev, vpd_cap, RTL_EEPROM_SIG_ADDR, &sig) < 0)
1970 return;
1971
1972 if ((sig & RTL_EEPROM_SIG_MASK) != RTL_EEPROM_SIG) {
1973 dev_info(&pdev->dev, "Missing EEPROM signature: %08x\n", sig);
1974 return;
1975 }
1976
1977 /*
1978 * MAC address is stored in EEPROM at offset 0x0e
1979 * Realtek says: "The VPD address does not have to be a DWORD-aligned
1980 * address as defined in the PCI 2.2 Specifications, but the VPD data
1981 * is always consecutive 4-byte data starting from the VPD address
1982 * specified."
1983 */
1984 if (rtl_eeprom_read(pdev, vpd_cap, 0x000e, (__le32*)&mac[0]) < 0 ||
1985 rtl_eeprom_read(pdev, vpd_cap, 0x0012, (__le32*)&mac[4]) < 0) {
1986 if (netif_msg_probe(tp)) {
1987 dev_warn(&pdev->dev,
1988 "reading MAC address from EEPROM failed\n");
1989 }
1990 return;
1991 }
1992
1993 if (netif_msg_probe(tp)) {
1994 DECLARE_MAC_BUF(buf);
1995
1996 dev_info(&pdev->dev, "MAC address found in EEPROM: %s\n",
1997 print_mac(buf, mac));
1998 }
1999
2000 if (is_valid_ether_addr(mac))
2001 rtl_rar_set(tp, mac);
2002}
2003
2004static int __devinit 1918static int __devinit
2005rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) 1919rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2006{ 1920{
@@ -2178,8 +2092,6 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2178 2092
2179 tp->mmio_addr = ioaddr; 2093 tp->mmio_addr = ioaddr;
2180 2094
2181 rtl_init_mac_address(tp, ioaddr);
2182
2183 /* Get MAC address */ 2095 /* Get MAC address */
2184 for (i = 0; i < MAC_ADDR_LEN; i++) 2096 for (i = 0; i < MAC_ADDR_LEN; i++)
2185 dev->dev_addr[i] = RTL_R8(MAC0 + i); 2097 dev->dev_addr[i] = RTL_R8(MAC0 + i);
diff --git a/fs/ext3/dir.c b/fs/ext3/dir.c
index 4c82531ea0a8..5853f4440af4 100644
--- a/fs/ext3/dir.c
+++ b/fs/ext3/dir.c
@@ -456,17 +456,8 @@ static int ext3_dx_readdir(struct file * filp,
456 if (info->extra_fname) { 456 if (info->extra_fname) {
457 if (call_filldir(filp, dirent, filldir, info->extra_fname)) 457 if (call_filldir(filp, dirent, filldir, info->extra_fname))
458 goto finished; 458 goto finished;
459
460 info->extra_fname = NULL; 459 info->extra_fname = NULL;
461 info->curr_node = rb_next(info->curr_node); 460 goto next_node;
462 if (!info->curr_node) {
463 if (info->next_hash == ~0) {
464 filp->f_pos = EXT3_HTREE_EOF;
465 goto finished;
466 }
467 info->curr_hash = info->next_hash;
468 info->curr_minor_hash = 0;
469 }
470 } else if (!info->curr_node) 461 } else if (!info->curr_node)
471 info->curr_node = rb_first(&info->root); 462 info->curr_node = rb_first(&info->root);
472 463
@@ -498,9 +489,14 @@ static int ext3_dx_readdir(struct file * filp,
498 info->curr_minor_hash = fname->minor_hash; 489 info->curr_minor_hash = fname->minor_hash;
499 if (call_filldir(filp, dirent, filldir, fname)) 490 if (call_filldir(filp, dirent, filldir, fname))
500 break; 491 break;
501 492 next_node:
502 info->curr_node = rb_next(info->curr_node); 493 info->curr_node = rb_next(info->curr_node);
503 if (!info->curr_node) { 494 if (info->curr_node) {
495 fname = rb_entry(info->curr_node, struct fname,
496 rb_hash);
497 info->curr_hash = fname->hash;
498 info->curr_minor_hash = fname->minor_hash;
499 } else {
504 if (info->next_hash == ~0) { 500 if (info->next_hash == ~0) {
505 filp->f_pos = EXT3_HTREE_EOF; 501 filp->f_pos = EXT3_HTREE_EOF;
506 break; 502 break;
diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c
index 3ca6a2b7632d..fed5b610df5a 100644
--- a/fs/ext4/dir.c
+++ b/fs/ext4/dir.c
@@ -459,17 +459,8 @@ static int ext4_dx_readdir(struct file *filp,
459 if (info->extra_fname) { 459 if (info->extra_fname) {
460 if (call_filldir(filp, dirent, filldir, info->extra_fname)) 460 if (call_filldir(filp, dirent, filldir, info->extra_fname))
461 goto finished; 461 goto finished;
462
463 info->extra_fname = NULL; 462 info->extra_fname = NULL;
464 info->curr_node = rb_next(info->curr_node); 463 goto next_node;
465 if (!info->curr_node) {
466 if (info->next_hash == ~0) {
467 filp->f_pos = EXT4_HTREE_EOF;
468 goto finished;
469 }
470 info->curr_hash = info->next_hash;
471 info->curr_minor_hash = 0;
472 }
473 } else if (!info->curr_node) 464 } else if (!info->curr_node)
474 info->curr_node = rb_first(&info->root); 465 info->curr_node = rb_first(&info->root);
475 466
@@ -501,9 +492,14 @@ static int ext4_dx_readdir(struct file *filp,
501 info->curr_minor_hash = fname->minor_hash; 492 info->curr_minor_hash = fname->minor_hash;
502 if (call_filldir(filp, dirent, filldir, fname)) 493 if (call_filldir(filp, dirent, filldir, fname))
503 break; 494 break;
504 495 next_node:
505 info->curr_node = rb_next(info->curr_node); 496 info->curr_node = rb_next(info->curr_node);
506 if (!info->curr_node) { 497 if (info->curr_node) {
498 fname = rb_entry(info->curr_node, struct fname,
499 rb_hash);
500 info->curr_hash = fname->hash;
501 info->curr_minor_hash = fname->minor_hash;
502 } else {
507 if (info->next_hash == ~0) { 503 if (info->next_hash == ~0) {
508 filp->f_pos = EXT4_HTREE_EOF; 504 filp->f_pos = EXT4_HTREE_EOF;
509 break; 505 break;
diff --git a/init/main.c b/init/main.c
index 130d1a0eef11..7e117a231af1 100644
--- a/init/main.c
+++ b/init/main.c
@@ -768,6 +768,7 @@ static void __init do_initcalls(void)
768static void __init do_basic_setup(void) 768static void __init do_basic_setup(void)
769{ 769{
770 rcu_init_sched(); /* needed by module_init stage. */ 770 rcu_init_sched(); /* needed by module_init stage. */
771 init_workqueues();
771 usermodehelper_init(); 772 usermodehelper_init();
772 driver_init(); 773 driver_init();
773 init_irq_proc(); 774 init_irq_proc();
@@ -851,8 +852,6 @@ static int __init kernel_init(void * unused)
851 852
852 cad_pid = task_pid(current); 853 cad_pid = task_pid(current);
853 854
854 init_workqueues();
855
856 smp_prepare_cpus(setup_max_cpus); 855 smp_prepare_cpus(setup_max_cpus);
857 856
858 do_pre_smp_initcalls(); 857 do_pre_smp_initcalls();
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
index 8aff79d90ddc..9bc4c00872c9 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
@@ -160,4 +160,4 @@ static int __init stop_machine_init(void)
160 stop_machine_work = alloc_percpu(struct work_struct); 160 stop_machine_work = alloc_percpu(struct work_struct);
161 return 0; 161 return 0;
162} 162}
163early_initcall(stop_machine_init); 163core_initcall(stop_machine_init);
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index b91cf241a539..830d9eae11f9 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -852,8 +852,7 @@ void conf_set_all_new_symbols(enum conf_def_mode mode)
852 852
853 } 853 }
854 854
855 if (modules_sym) 855 sym_clear_all_valid();
856 sym_calc_value(modules_sym);
857 856
858 if (mode != def_random) 857 if (mode != def_random)
859 return; 858 return;