Merge remote branch 'origin' into secretlab/next-devicetree
Merging in current state of Linus' tree to deal with merge conflicts and build failures in vio.c after merge. Conflicts: drivers/i2c/busses/i2c-cpm.c drivers/i2c/busses/i2c-mpc.c drivers/net/gianfar.c Also fixed up one line in arch/powerpc/kernel/vio.c to use the correct node pointer. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
@@ -276,11 +276,19 @@ config N_HDLC
|
||||
Allows synchronous HDLC communications with tty device drivers that
|
||||
support synchronous HDLC such as the Microgate SyncLink adapter.
|
||||
|
||||
This driver can only be built as a module ( = code which can be
|
||||
This driver can be built as a module ( = code which can be
|
||||
inserted in and removed from the running kernel whenever you want).
|
||||
The module will be called n_hdlc. If you want to do that, say M
|
||||
here.
|
||||
|
||||
config N_GSM
|
||||
tristate "GSM MUX line discipline support (EXPERIMENTAL)"
|
||||
depends on EXPERIMENTAL
|
||||
depends on NET
|
||||
help
|
||||
This line discipline provides support for the GSM MUX protocol and
|
||||
presents the mux as a set of 61 individual tty devices.
|
||||
|
||||
config RISCOM8
|
||||
tristate "SDL RISCom/8 card support"
|
||||
depends on SERIAL_NONSTANDARD
|
||||
|
||||
@@ -40,6 +40,7 @@ obj-$(CONFIG_SYNCLINK) += synclink.o
|
||||
obj-$(CONFIG_SYNCLINKMP) += synclinkmp.o
|
||||
obj-$(CONFIG_SYNCLINK_GT) += synclink_gt.o
|
||||
obj-$(CONFIG_N_HDLC) += n_hdlc.o
|
||||
obj-$(CONFIG_N_GSM) += n_gsm.o
|
||||
obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o
|
||||
obj-$(CONFIG_SX) += sx.o generic_serial.o
|
||||
obj-$(CONFIG_RIO) += rio/ generic_serial.o
|
||||
|
||||
@@ -178,86 +178,6 @@ struct agp_bridge_data {
|
||||
#define PGE_EMPTY(b, p) (!(p) || (p) == (unsigned long) (b)->scratch_page)
|
||||
|
||||
|
||||
/* Intel registers */
|
||||
#define INTEL_APSIZE 0xb4
|
||||
#define INTEL_ATTBASE 0xb8
|
||||
#define INTEL_AGPCTRL 0xb0
|
||||
#define INTEL_NBXCFG 0x50
|
||||
#define INTEL_ERRSTS 0x91
|
||||
|
||||
/* Intel i830 registers */
|
||||
#define I830_GMCH_CTRL 0x52
|
||||
#define I830_GMCH_ENABLED 0x4
|
||||
#define I830_GMCH_MEM_MASK 0x1
|
||||
#define I830_GMCH_MEM_64M 0x1
|
||||
#define I830_GMCH_MEM_128M 0
|
||||
#define I830_GMCH_GMS_MASK 0x70
|
||||
#define I830_GMCH_GMS_DISABLED 0x00
|
||||
#define I830_GMCH_GMS_LOCAL 0x10
|
||||
#define I830_GMCH_GMS_STOLEN_512 0x20
|
||||
#define I830_GMCH_GMS_STOLEN_1024 0x30
|
||||
#define I830_GMCH_GMS_STOLEN_8192 0x40
|
||||
#define I830_RDRAM_CHANNEL_TYPE 0x03010
|
||||
#define I830_RDRAM_ND(x) (((x) & 0x20) >> 5)
|
||||
#define I830_RDRAM_DDT(x) (((x) & 0x18) >> 3)
|
||||
|
||||
/* This one is for I830MP w. an external graphic card */
|
||||
#define INTEL_I830_ERRSTS 0x92
|
||||
|
||||
/* Intel 855GM/852GM registers */
|
||||
#define I855_GMCH_GMS_MASK 0xF0
|
||||
#define I855_GMCH_GMS_STOLEN_0M 0x0
|
||||
#define I855_GMCH_GMS_STOLEN_1M (0x1 << 4)
|
||||
#define I855_GMCH_GMS_STOLEN_4M (0x2 << 4)
|
||||
#define I855_GMCH_GMS_STOLEN_8M (0x3 << 4)
|
||||
#define I855_GMCH_GMS_STOLEN_16M (0x4 << 4)
|
||||
#define I855_GMCH_GMS_STOLEN_32M (0x5 << 4)
|
||||
#define I85X_CAPID 0x44
|
||||
#define I85X_VARIANT_MASK 0x7
|
||||
#define I85X_VARIANT_SHIFT 5
|
||||
#define I855_GME 0x0
|
||||
#define I855_GM 0x4
|
||||
#define I852_GME 0x2
|
||||
#define I852_GM 0x5
|
||||
|
||||
/* Intel i845 registers */
|
||||
#define INTEL_I845_AGPM 0x51
|
||||
#define INTEL_I845_ERRSTS 0xc8
|
||||
|
||||
/* Intel i860 registers */
|
||||
#define INTEL_I860_MCHCFG 0x50
|
||||
#define INTEL_I860_ERRSTS 0xc8
|
||||
|
||||
/* Intel i810 registers */
|
||||
#define I810_GMADDR 0x10
|
||||
#define I810_MMADDR 0x14
|
||||
#define I810_PTE_BASE 0x10000
|
||||
#define I810_PTE_MAIN_UNCACHED 0x00000000
|
||||
#define I810_PTE_LOCAL 0x00000002
|
||||
#define I810_PTE_VALID 0x00000001
|
||||
#define I830_PTE_SYSTEM_CACHED 0x00000006
|
||||
#define I810_SMRAM_MISCC 0x70
|
||||
#define I810_GFX_MEM_WIN_SIZE 0x00010000
|
||||
#define I810_GFX_MEM_WIN_32M 0x00010000
|
||||
#define I810_GMS 0x000000c0
|
||||
#define I810_GMS_DISABLE 0x00000000
|
||||
#define I810_PGETBL_CTL 0x2020
|
||||
#define I810_PGETBL_ENABLED 0x00000001
|
||||
#define I965_PGETBL_SIZE_MASK 0x0000000e
|
||||
#define I965_PGETBL_SIZE_512KB (0 << 1)
|
||||
#define I965_PGETBL_SIZE_256KB (1 << 1)
|
||||
#define I965_PGETBL_SIZE_128KB (2 << 1)
|
||||
#define I965_PGETBL_SIZE_1MB (3 << 1)
|
||||
#define I965_PGETBL_SIZE_2MB (4 << 1)
|
||||
#define I965_PGETBL_SIZE_1_5MB (5 << 1)
|
||||
#define G33_PGETBL_SIZE_MASK (3 << 8)
|
||||
#define G33_PGETBL_SIZE_1M (1 << 8)
|
||||
#define G33_PGETBL_SIZE_2M (2 << 8)
|
||||
|
||||
#define I810_DRAM_CTL 0x3000
|
||||
#define I810_DRAM_ROW_0 0x00000001
|
||||
#define I810_DRAM_ROW_0_SDRAM 0x00000001
|
||||
|
||||
struct agp_device_ids {
|
||||
unsigned short device_id; /* first, to make table easier to read */
|
||||
enum chipset_type chipset;
|
||||
|
||||
@@ -204,6 +204,7 @@ static const struct agp_bridge_driver ali_generic_bridge = {
|
||||
.aperture_sizes = ali_generic_sizes,
|
||||
.size_type = U32_APER_SIZE,
|
||||
.num_aperture_sizes = 7,
|
||||
.needs_scratch_page = true,
|
||||
.configure = ali_configure,
|
||||
.fetch_size = ali_fetch_size,
|
||||
.cleanup = ali_cleanup,
|
||||
|
||||
@@ -142,6 +142,7 @@ static int amd_create_gatt_table(struct agp_bridge_data *bridge)
|
||||
{
|
||||
struct aper_size_info_lvl2 *value;
|
||||
struct amd_page_map page_dir;
|
||||
unsigned long __iomem *cur_gatt;
|
||||
unsigned long addr;
|
||||
int retval;
|
||||
u32 temp;
|
||||
@@ -178,6 +179,13 @@ static int amd_create_gatt_table(struct agp_bridge_data *bridge)
|
||||
readl(page_dir.remapped+GET_PAGE_DIR_OFF(addr)); /* PCI Posting. */
|
||||
}
|
||||
|
||||
for (i = 0; i < value->num_entries; i++) {
|
||||
addr = (i * PAGE_SIZE) + agp_bridge->gart_bus_addr;
|
||||
cur_gatt = GET_GATT(addr);
|
||||
writel(agp_bridge->scratch_page, cur_gatt+GET_GATT_OFF(addr));
|
||||
readl(cur_gatt+GET_GATT_OFF(addr)); /* PCI Posting. */
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -375,6 +383,7 @@ static const struct agp_bridge_driver amd_irongate_driver = {
|
||||
.aperture_sizes = amd_irongate_sizes,
|
||||
.size_type = LVL2_APER_SIZE,
|
||||
.num_aperture_sizes = 7,
|
||||
.needs_scratch_page = true,
|
||||
.configure = amd_irongate_configure,
|
||||
.fetch_size = amd_irongate_fetch_size,
|
||||
.cleanup = amd_irongate_cleanup,
|
||||
|
||||
@@ -210,6 +210,7 @@ static const struct agp_bridge_driver amd_8151_driver = {
|
||||
.aperture_sizes = amd_8151_sizes,
|
||||
.size_type = U32_APER_SIZE,
|
||||
.num_aperture_sizes = 7,
|
||||
.needs_scratch_page = true,
|
||||
.configure = amd_8151_configure,
|
||||
.fetch_size = amd64_fetch_size,
|
||||
.cleanup = amd64_cleanup,
|
||||
@@ -499,6 +500,10 @@ static int __devinit agp_amd64_probe(struct pci_dev *pdev,
|
||||
u8 cap_ptr;
|
||||
int err;
|
||||
|
||||
/* The Highlander principle */
|
||||
if (agp_bridges_found)
|
||||
return -ENODEV;
|
||||
|
||||
cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP);
|
||||
if (!cap_ptr)
|
||||
return -ENODEV;
|
||||
@@ -562,6 +567,8 @@ static void __devexit agp_amd64_remove(struct pci_dev *pdev)
|
||||
amd64_aperture_sizes[bridge->aperture_size_idx].size);
|
||||
agp_remove_bridge(bridge);
|
||||
agp_put_bridge(bridge);
|
||||
|
||||
agp_bridges_found--;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
@@ -709,6 +716,11 @@ static struct pci_device_id agp_amd64_pci_table[] = {
|
||||
|
||||
MODULE_DEVICE_TABLE(pci, agp_amd64_pci_table);
|
||||
|
||||
static DEFINE_PCI_DEVICE_TABLE(agp_amd64_pci_promisc_table) = {
|
||||
{ PCI_DEVICE_CLASS(0, 0) },
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct pci_driver agp_amd64_pci_driver = {
|
||||
.name = "agpgart-amd64",
|
||||
.id_table = agp_amd64_pci_table,
|
||||
@@ -734,7 +746,6 @@ int __init agp_amd64_init(void)
|
||||
return err;
|
||||
|
||||
if (agp_bridges_found == 0) {
|
||||
struct pci_dev *dev;
|
||||
if (!agp_try_unsupported && !agp_try_unsupported_boot) {
|
||||
printk(KERN_INFO PFX "No supported AGP bridge found.\n");
|
||||
#ifdef MODULE
|
||||
@@ -750,17 +761,10 @@ int __init agp_amd64_init(void)
|
||||
return -ENODEV;
|
||||
|
||||
/* Look for any AGP bridge */
|
||||
dev = NULL;
|
||||
err = -ENODEV;
|
||||
for_each_pci_dev(dev) {
|
||||
if (!pci_find_capability(dev, PCI_CAP_ID_AGP))
|
||||
continue;
|
||||
/* Only one bridge supported right now */
|
||||
if (agp_amd64_probe(dev, NULL) == 0) {
|
||||
err = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
agp_amd64_pci_driver.id_table = agp_amd64_pci_promisc_table;
|
||||
err = driver_attach(&agp_amd64_pci_driver.driver);
|
||||
if (err == 0 && agp_bridges_found == 0)
|
||||
err = -ENODEV;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -341,6 +341,7 @@ static int ati_create_gatt_table(struct agp_bridge_data *bridge)
|
||||
{
|
||||
struct aper_size_info_lvl2 *value;
|
||||
struct ati_page_map page_dir;
|
||||
unsigned long __iomem *cur_gatt;
|
||||
unsigned long addr;
|
||||
int retval;
|
||||
u32 temp;
|
||||
@@ -395,6 +396,12 @@ static int ati_create_gatt_table(struct agp_bridge_data *bridge)
|
||||
readl(page_dir.remapped+GET_PAGE_DIR_OFF(addr)); /* PCI Posting. */
|
||||
}
|
||||
|
||||
for (i = 0; i < value->num_entries; i++) {
|
||||
addr = (i * PAGE_SIZE) + agp_bridge->gart_bus_addr;
|
||||
cur_gatt = GET_GATT(addr);
|
||||
writel(agp_bridge->scratch_page, cur_gatt+GET_GATT_OFF(addr));
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -415,6 +422,7 @@ static const struct agp_bridge_driver ati_generic_bridge = {
|
||||
.aperture_sizes = ati_generic_sizes,
|
||||
.size_type = LVL2_APER_SIZE,
|
||||
.num_aperture_sizes = 7,
|
||||
.needs_scratch_page = true,
|
||||
.configure = ati_configure,
|
||||
.fetch_size = ati_fetch_size,
|
||||
.cleanup = ati_cleanup,
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <linux/page-flags.h>
|
||||
#include <linux/mm.h>
|
||||
#include "agp.h"
|
||||
#include "intel-agp.h"
|
||||
|
||||
/*
|
||||
* The real differences to the generic AGP code is
|
||||
|
||||
@@ -1214,7 +1214,7 @@ struct agp_memory *agp_generic_alloc_user(size_t page_count, int type)
|
||||
return NULL;
|
||||
|
||||
for (i = 0; i < page_count; i++)
|
||||
new->pages[i] = 0;
|
||||
new->pages[i] = NULL;
|
||||
new->page_count = 0;
|
||||
new->type = type;
|
||||
new->num_scratch_pages = pages;
|
||||
|
||||
+111
-1772
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,239 @@
|
||||
/*
|
||||
* Common Intel AGPGART and GTT definitions.
|
||||
*/
|
||||
|
||||
/* Intel registers */
|
||||
#define INTEL_APSIZE 0xb4
|
||||
#define INTEL_ATTBASE 0xb8
|
||||
#define INTEL_AGPCTRL 0xb0
|
||||
#define INTEL_NBXCFG 0x50
|
||||
#define INTEL_ERRSTS 0x91
|
||||
|
||||
/* Intel i830 registers */
|
||||
#define I830_GMCH_CTRL 0x52
|
||||
#define I830_GMCH_ENABLED 0x4
|
||||
#define I830_GMCH_MEM_MASK 0x1
|
||||
#define I830_GMCH_MEM_64M 0x1
|
||||
#define I830_GMCH_MEM_128M 0
|
||||
#define I830_GMCH_GMS_MASK 0x70
|
||||
#define I830_GMCH_GMS_DISABLED 0x00
|
||||
#define I830_GMCH_GMS_LOCAL 0x10
|
||||
#define I830_GMCH_GMS_STOLEN_512 0x20
|
||||
#define I830_GMCH_GMS_STOLEN_1024 0x30
|
||||
#define I830_GMCH_GMS_STOLEN_8192 0x40
|
||||
#define I830_RDRAM_CHANNEL_TYPE 0x03010
|
||||
#define I830_RDRAM_ND(x) (((x) & 0x20) >> 5)
|
||||
#define I830_RDRAM_DDT(x) (((x) & 0x18) >> 3)
|
||||
|
||||
/* This one is for I830MP w. an external graphic card */
|
||||
#define INTEL_I830_ERRSTS 0x92
|
||||
|
||||
/* Intel 855GM/852GM registers */
|
||||
#define I855_GMCH_GMS_MASK 0xF0
|
||||
#define I855_GMCH_GMS_STOLEN_0M 0x0
|
||||
#define I855_GMCH_GMS_STOLEN_1M (0x1 << 4)
|
||||
#define I855_GMCH_GMS_STOLEN_4M (0x2 << 4)
|
||||
#define I855_GMCH_GMS_STOLEN_8M (0x3 << 4)
|
||||
#define I855_GMCH_GMS_STOLEN_16M (0x4 << 4)
|
||||
#define I855_GMCH_GMS_STOLEN_32M (0x5 << 4)
|
||||
#define I85X_CAPID 0x44
|
||||
#define I85X_VARIANT_MASK 0x7
|
||||
#define I85X_VARIANT_SHIFT 5
|
||||
#define I855_GME 0x0
|
||||
#define I855_GM 0x4
|
||||
#define I852_GME 0x2
|
||||
#define I852_GM 0x5
|
||||
|
||||
/* Intel i845 registers */
|
||||
#define INTEL_I845_AGPM 0x51
|
||||
#define INTEL_I845_ERRSTS 0xc8
|
||||
|
||||
/* Intel i860 registers */
|
||||
#define INTEL_I860_MCHCFG 0x50
|
||||
#define INTEL_I860_ERRSTS 0xc8
|
||||
|
||||
/* Intel i810 registers */
|
||||
#define I810_GMADDR 0x10
|
||||
#define I810_MMADDR 0x14
|
||||
#define I810_PTE_BASE 0x10000
|
||||
#define I810_PTE_MAIN_UNCACHED 0x00000000
|
||||
#define I810_PTE_LOCAL 0x00000002
|
||||
#define I810_PTE_VALID 0x00000001
|
||||
#define I830_PTE_SYSTEM_CACHED 0x00000006
|
||||
#define I810_SMRAM_MISCC 0x70
|
||||
#define I810_GFX_MEM_WIN_SIZE 0x00010000
|
||||
#define I810_GFX_MEM_WIN_32M 0x00010000
|
||||
#define I810_GMS 0x000000c0
|
||||
#define I810_GMS_DISABLE 0x00000000
|
||||
#define I810_PGETBL_CTL 0x2020
|
||||
#define I810_PGETBL_ENABLED 0x00000001
|
||||
#define I965_PGETBL_SIZE_MASK 0x0000000e
|
||||
#define I965_PGETBL_SIZE_512KB (0 << 1)
|
||||
#define I965_PGETBL_SIZE_256KB (1 << 1)
|
||||
#define I965_PGETBL_SIZE_128KB (2 << 1)
|
||||
#define I965_PGETBL_SIZE_1MB (3 << 1)
|
||||
#define I965_PGETBL_SIZE_2MB (4 << 1)
|
||||
#define I965_PGETBL_SIZE_1_5MB (5 << 1)
|
||||
#define G33_PGETBL_SIZE_MASK (3 << 8)
|
||||
#define G33_PGETBL_SIZE_1M (1 << 8)
|
||||
#define G33_PGETBL_SIZE_2M (2 << 8)
|
||||
|
||||
#define I810_DRAM_CTL 0x3000
|
||||
#define I810_DRAM_ROW_0 0x00000001
|
||||
#define I810_DRAM_ROW_0_SDRAM 0x00000001
|
||||
|
||||
/* Intel 815 register */
|
||||
#define INTEL_815_APCONT 0x51
|
||||
#define INTEL_815_ATTBASE_MASK ~0x1FFFFFFF
|
||||
|
||||
/* Intel i820 registers */
|
||||
#define INTEL_I820_RDCR 0x51
|
||||
#define INTEL_I820_ERRSTS 0xc8
|
||||
|
||||
/* Intel i840 registers */
|
||||
#define INTEL_I840_MCHCFG 0x50
|
||||
#define INTEL_I840_ERRSTS 0xc8
|
||||
|
||||
/* Intel i850 registers */
|
||||
#define INTEL_I850_MCHCFG 0x50
|
||||
#define INTEL_I850_ERRSTS 0xc8
|
||||
|
||||
/* intel 915G registers */
|
||||
#define I915_GMADDR 0x18
|
||||
#define I915_MMADDR 0x10
|
||||
#define I915_PTEADDR 0x1C
|
||||
#define I915_GMCH_GMS_STOLEN_48M (0x6 << 4)
|
||||
#define I915_GMCH_GMS_STOLEN_64M (0x7 << 4)
|
||||
#define G33_GMCH_GMS_STOLEN_128M (0x8 << 4)
|
||||
#define G33_GMCH_GMS_STOLEN_256M (0x9 << 4)
|
||||
#define INTEL_GMCH_GMS_STOLEN_96M (0xa << 4)
|
||||
#define INTEL_GMCH_GMS_STOLEN_160M (0xb << 4)
|
||||
#define INTEL_GMCH_GMS_STOLEN_224M (0xc << 4)
|
||||
#define INTEL_GMCH_GMS_STOLEN_352M (0xd << 4)
|
||||
|
||||
#define I915_IFPADDR 0x60
|
||||
|
||||
/* Intel 965G registers */
|
||||
#define I965_MSAC 0x62
|
||||
#define I965_IFPADDR 0x70
|
||||
|
||||
/* Intel 7505 registers */
|
||||
#define INTEL_I7505_APSIZE 0x74
|
||||
#define INTEL_I7505_NCAPID 0x60
|
||||
#define INTEL_I7505_NISTAT 0x6c
|
||||
#define INTEL_I7505_ATTBASE 0x78
|
||||
#define INTEL_I7505_ERRSTS 0x42
|
||||
#define INTEL_I7505_AGPCTRL 0x70
|
||||
#define INTEL_I7505_MCHCFG 0x50
|
||||
|
||||
#define SNB_GMCH_CTRL 0x50
|
||||
#define SNB_GMCH_GMS_STOLEN_MASK 0xF8
|
||||
#define SNB_GMCH_GMS_STOLEN_32M (1 << 3)
|
||||
#define SNB_GMCH_GMS_STOLEN_64M (2 << 3)
|
||||
#define SNB_GMCH_GMS_STOLEN_96M (3 << 3)
|
||||
#define SNB_GMCH_GMS_STOLEN_128M (4 << 3)
|
||||
#define SNB_GMCH_GMS_STOLEN_160M (5 << 3)
|
||||
#define SNB_GMCH_GMS_STOLEN_192M (6 << 3)
|
||||
#define SNB_GMCH_GMS_STOLEN_224M (7 << 3)
|
||||
#define SNB_GMCH_GMS_STOLEN_256M (8 << 3)
|
||||
#define SNB_GMCH_GMS_STOLEN_288M (9 << 3)
|
||||
#define SNB_GMCH_GMS_STOLEN_320M (0xa << 3)
|
||||
#define SNB_GMCH_GMS_STOLEN_352M (0xb << 3)
|
||||
#define SNB_GMCH_GMS_STOLEN_384M (0xc << 3)
|
||||
#define SNB_GMCH_GMS_STOLEN_416M (0xd << 3)
|
||||
#define SNB_GMCH_GMS_STOLEN_448M (0xe << 3)
|
||||
#define SNB_GMCH_GMS_STOLEN_480M (0xf << 3)
|
||||
#define SNB_GMCH_GMS_STOLEN_512M (0x10 << 3)
|
||||
#define SNB_GTT_SIZE_0M (0 << 8)
|
||||
#define SNB_GTT_SIZE_1M (1 << 8)
|
||||
#define SNB_GTT_SIZE_2M (2 << 8)
|
||||
#define SNB_GTT_SIZE_MASK (3 << 8)
|
||||
|
||||
/* pci devices ids */
|
||||
#define PCI_DEVICE_ID_INTEL_E7221_HB 0x2588
|
||||
#define PCI_DEVICE_ID_INTEL_E7221_IG 0x258a
|
||||
#define PCI_DEVICE_ID_INTEL_82946GZ_HB 0x2970
|
||||
#define PCI_DEVICE_ID_INTEL_82946GZ_IG 0x2972
|
||||
#define PCI_DEVICE_ID_INTEL_82G35_HB 0x2980
|
||||
#define PCI_DEVICE_ID_INTEL_82G35_IG 0x2982
|
||||
#define PCI_DEVICE_ID_INTEL_82965Q_HB 0x2990
|
||||
#define PCI_DEVICE_ID_INTEL_82965Q_IG 0x2992
|
||||
#define PCI_DEVICE_ID_INTEL_82965G_HB 0x29A0
|
||||
#define PCI_DEVICE_ID_INTEL_82965G_IG 0x29A2
|
||||
#define PCI_DEVICE_ID_INTEL_82965GM_HB 0x2A00
|
||||
#define PCI_DEVICE_ID_INTEL_82965GM_IG 0x2A02
|
||||
#define PCI_DEVICE_ID_INTEL_82965GME_HB 0x2A10
|
||||
#define PCI_DEVICE_ID_INTEL_82965GME_IG 0x2A12
|
||||
#define PCI_DEVICE_ID_INTEL_82945GME_HB 0x27AC
|
||||
#define PCI_DEVICE_ID_INTEL_82945GME_IG 0x27AE
|
||||
#define PCI_DEVICE_ID_INTEL_PINEVIEW_M_HB 0xA010
|
||||
#define PCI_DEVICE_ID_INTEL_PINEVIEW_M_IG 0xA011
|
||||
#define PCI_DEVICE_ID_INTEL_PINEVIEW_HB 0xA000
|
||||
#define PCI_DEVICE_ID_INTEL_PINEVIEW_IG 0xA001
|
||||
#define PCI_DEVICE_ID_INTEL_G33_HB 0x29C0
|
||||
#define PCI_DEVICE_ID_INTEL_G33_IG 0x29C2
|
||||
#define PCI_DEVICE_ID_INTEL_Q35_HB 0x29B0
|
||||
#define PCI_DEVICE_ID_INTEL_Q35_IG 0x29B2
|
||||
#define PCI_DEVICE_ID_INTEL_Q33_HB 0x29D0
|
||||
#define PCI_DEVICE_ID_INTEL_Q33_IG 0x29D2
|
||||
#define PCI_DEVICE_ID_INTEL_B43_HB 0x2E40
|
||||
#define PCI_DEVICE_ID_INTEL_B43_IG 0x2E42
|
||||
#define PCI_DEVICE_ID_INTEL_GM45_HB 0x2A40
|
||||
#define PCI_DEVICE_ID_INTEL_GM45_IG 0x2A42
|
||||
#define PCI_DEVICE_ID_INTEL_EAGLELAKE_HB 0x2E00
|
||||
#define PCI_DEVICE_ID_INTEL_EAGLELAKE_IG 0x2E02
|
||||
#define PCI_DEVICE_ID_INTEL_Q45_HB 0x2E10
|
||||
#define PCI_DEVICE_ID_INTEL_Q45_IG 0x2E12
|
||||
#define PCI_DEVICE_ID_INTEL_G45_HB 0x2E20
|
||||
#define PCI_DEVICE_ID_INTEL_G45_IG 0x2E22
|
||||
#define PCI_DEVICE_ID_INTEL_G41_HB 0x2E30
|
||||
#define PCI_DEVICE_ID_INTEL_G41_IG 0x2E32
|
||||
#define PCI_DEVICE_ID_INTEL_IRONLAKE_D_HB 0x0040
|
||||
#define PCI_DEVICE_ID_INTEL_IRONLAKE_D_IG 0x0042
|
||||
#define PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB 0x0044
|
||||
#define PCI_DEVICE_ID_INTEL_IRONLAKE_MA_HB 0x0062
|
||||
#define PCI_DEVICE_ID_INTEL_IRONLAKE_MC2_HB 0x006a
|
||||
#define PCI_DEVICE_ID_INTEL_IRONLAKE_M_IG 0x0046
|
||||
#define PCI_DEVICE_ID_INTEL_SANDYBRIDGE_HB 0x0100
|
||||
#define PCI_DEVICE_ID_INTEL_SANDYBRIDGE_IG 0x0102
|
||||
#define PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_HB 0x0104
|
||||
#define PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_IG 0x0106
|
||||
|
||||
/* cover 915 and 945 variants */
|
||||
#define IS_I915 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_E7221_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915G_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82915GM_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945G_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945GM_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82945GME_HB)
|
||||
|
||||
#define IS_I965 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82946GZ_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82G35_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965Q_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GM_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GME_HB)
|
||||
|
||||
#define IS_G33 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G33_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q35_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q33_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_PINEVIEW_M_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_PINEVIEW_HB)
|
||||
|
||||
#define IS_PINEVIEW (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_PINEVIEW_M_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_PINEVIEW_HB)
|
||||
|
||||
#define IS_SNB (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_SANDYBRIDGE_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_HB)
|
||||
|
||||
#define IS_G4X (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_EAGLELAKE_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q45_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G45_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_GM45_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G41_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_B43_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_D_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_MA_HB || \
|
||||
agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_MC2_HB || \
|
||||
IS_SNB)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -310,6 +310,7 @@ static const struct agp_bridge_driver nvidia_driver = {
|
||||
.aperture_sizes = nvidia_generic_sizes,
|
||||
.size_type = U8_APER_SIZE,
|
||||
.num_aperture_sizes = 5,
|
||||
.needs_scratch_page = true,
|
||||
.configure = nvidia_configure,
|
||||
.fetch_size = nvidia_fetch_size,
|
||||
.cleanup = nvidia_cleanup,
|
||||
|
||||
@@ -125,6 +125,7 @@ static struct agp_bridge_driver sis_driver = {
|
||||
.aperture_sizes = sis_generic_sizes,
|
||||
.size_type = U8_APER_SIZE,
|
||||
.num_aperture_sizes = 7,
|
||||
.needs_scratch_page = true,
|
||||
.configure = sis_configure,
|
||||
.fetch_size = sis_fetch_size,
|
||||
.cleanup = sis_cleanup,
|
||||
@@ -415,14 +416,6 @@ static struct pci_device_id agp_sis_pci_table[] = {
|
||||
.subvendor = PCI_ANY_ID,
|
||||
.subdevice = PCI_ANY_ID,
|
||||
},
|
||||
{
|
||||
.class = (PCI_CLASS_BRIDGE_HOST << 8),
|
||||
.class_mask = ~0,
|
||||
.vendor = PCI_VENDOR_ID_SI,
|
||||
.device = PCI_DEVICE_ID_SI_760,
|
||||
.subvendor = PCI_ANY_ID,
|
||||
.subdevice = PCI_ANY_ID,
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
*/
|
||||
static int uninorth_rev;
|
||||
static int is_u3;
|
||||
static u32 scratch_value;
|
||||
|
||||
#define DEFAULT_APERTURE_SIZE 256
|
||||
#define DEFAULT_APERTURE_STRING "256"
|
||||
@@ -172,7 +173,7 @@ static int uninorth_insert_memory(struct agp_memory *mem, off_t pg_start, int ty
|
||||
|
||||
gp = (u32 *) &agp_bridge->gatt_table[pg_start];
|
||||
for (i = 0; i < mem->page_count; ++i) {
|
||||
if (gp[i]) {
|
||||
if (gp[i] != scratch_value) {
|
||||
dev_info(&agp_bridge->dev->dev,
|
||||
"uninorth_insert_memory: entry 0x%x occupied (%x)\n",
|
||||
i, gp[i]);
|
||||
@@ -214,8 +215,9 @@ int uninorth_remove_memory(struct agp_memory *mem, off_t pg_start, int type)
|
||||
return 0;
|
||||
|
||||
gp = (u32 *) &agp_bridge->gatt_table[pg_start];
|
||||
for (i = 0; i < mem->page_count; ++i)
|
||||
gp[i] = 0;
|
||||
for (i = 0; i < mem->page_count; ++i) {
|
||||
gp[i] = scratch_value;
|
||||
}
|
||||
mb();
|
||||
uninorth_tlbflush(mem);
|
||||
|
||||
@@ -421,8 +423,13 @@ static int uninorth_create_gatt_table(struct agp_bridge_data *bridge)
|
||||
|
||||
bridge->gatt_bus_addr = virt_to_phys(table);
|
||||
|
||||
if (is_u3)
|
||||
scratch_value = (page_to_phys(agp_bridge->scratch_page_page) >> PAGE_SHIFT) | 0x80000000UL;
|
||||
else
|
||||
scratch_value = cpu_to_le32((page_to_phys(agp_bridge->scratch_page_page) & 0xFFFFF000UL) |
|
||||
0x1UL);
|
||||
for (i = 0; i < num_entries; i++)
|
||||
bridge->gatt_table[i] = 0;
|
||||
bridge->gatt_table[i] = scratch_value;
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -519,6 +526,7 @@ const struct agp_bridge_driver uninorth_agp_driver = {
|
||||
.agp_destroy_pages = agp_generic_destroy_pages,
|
||||
.agp_type_to_mask_type = agp_generic_type_to_mask_type,
|
||||
.cant_use_aperture = true,
|
||||
.needs_scratch_page = true,
|
||||
};
|
||||
|
||||
const struct agp_bridge_driver u3_agp_driver = {
|
||||
|
||||
@@ -175,6 +175,7 @@ static const struct agp_bridge_driver via_agp3_driver = {
|
||||
.aperture_sizes = agp3_generic_sizes,
|
||||
.size_type = U8_APER_SIZE,
|
||||
.num_aperture_sizes = 10,
|
||||
.needs_scratch_page = true,
|
||||
.configure = via_configure_agp3,
|
||||
.fetch_size = via_fetch_size_agp3,
|
||||
.cleanup = via_cleanup_agp3,
|
||||
@@ -201,6 +202,7 @@ static const struct agp_bridge_driver via_driver = {
|
||||
.aperture_sizes = via_generic_sizes,
|
||||
.size_type = U8_APER_SIZE,
|
||||
.num_aperture_sizes = 9,
|
||||
.needs_scratch_page = true,
|
||||
.configure = via_configure,
|
||||
.fetch_size = via_fetch_size,
|
||||
.cleanup = via_cleanup,
|
||||
|
||||
+1
-1
@@ -253,7 +253,7 @@ static int bsr_add_node(struct device_node *bn)
|
||||
|
||||
cur->bsr_device = device_create(bsr_class, NULL, cur->bsr_dev,
|
||||
cur, cur->bsr_name);
|
||||
if (!cur->bsr_device) {
|
||||
if (IS_ERR(cur->bsr_device)) {
|
||||
printk(KERN_ERR "device_create failed for %s\n",
|
||||
cur->bsr_name);
|
||||
cdev_del(&cur->bsr_cdev);
|
||||
|
||||
@@ -32,7 +32,7 @@ static bool busy;
|
||||
static void random_recv_done(struct virtqueue *vq)
|
||||
{
|
||||
/* We can get spurious callbacks, e.g. shared IRQs + virtio_pci. */
|
||||
if (!vq->vq_ops->get_buf(vq, &data_avail))
|
||||
if (!virtqueue_get_buf(vq, &data_avail))
|
||||
return;
|
||||
|
||||
complete(&have_data);
|
||||
@@ -46,10 +46,10 @@ static void register_buffer(u8 *buf, size_t size)
|
||||
sg_init_one(&sg, buf, size);
|
||||
|
||||
/* There should always be room for one buffer. */
|
||||
if (vq->vq_ops->add_buf(vq, &sg, 0, 1, buf) < 0)
|
||||
if (virtqueue_add_buf(vq, &sg, 0, 1, buf) < 0)
|
||||
BUG();
|
||||
|
||||
vq->vq_ops->kick(vq);
|
||||
virtqueue_kick(vq);
|
||||
}
|
||||
|
||||
static int virtio_read(struct hwrng *rng, void *buf, size_t size, bool wait)
|
||||
|
||||
+16
-5
@@ -23,6 +23,7 @@
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/capability.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
@@ -82,8 +83,7 @@ module_param(fan_mult, int, 0);
|
||||
MODULE_PARM_DESC(fan_mult, "Factor to multiply fan speed with");
|
||||
|
||||
static int i8k_open_fs(struct inode *inode, struct file *file);
|
||||
static int i8k_ioctl(struct inode *, struct file *, unsigned int,
|
||||
unsigned long);
|
||||
static long i8k_ioctl(struct file *, unsigned int, unsigned long);
|
||||
|
||||
static const struct file_operations i8k_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
@@ -91,7 +91,7 @@ static const struct file_operations i8k_fops = {
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = single_release,
|
||||
.ioctl = i8k_ioctl,
|
||||
.unlocked_ioctl = i8k_ioctl,
|
||||
};
|
||||
|
||||
struct smm_regs {
|
||||
@@ -307,8 +307,8 @@ static int i8k_get_dell_signature(int req_fn)
|
||||
return regs.eax == 1145651527 && regs.edx == 1145392204 ? 0 : -1;
|
||||
}
|
||||
|
||||
static int i8k_ioctl(struct inode *ip, struct file *fp, unsigned int cmd,
|
||||
unsigned long arg)
|
||||
static int
|
||||
i8k_ioctl_unlocked(struct file *fp, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
int val = 0;
|
||||
int speed;
|
||||
@@ -395,6 +395,17 @@ static int i8k_ioctl(struct inode *ip, struct file *fp, unsigned int cmd,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long i8k_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
long ret;
|
||||
|
||||
lock_kernel();
|
||||
ret = i8k_ioctl_unlocked(fp, cmd, arg);
|
||||
unlock_kernel();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Print the information for /proc/i8k.
|
||||
*/
|
||||
|
||||
+14
-3
@@ -879,8 +879,8 @@ static int isicom_open(struct tty_struct *tty, struct file *filp)
|
||||
if (tport == NULL)
|
||||
return -ENODEV;
|
||||
port = container_of(tport, struct isi_port, port);
|
||||
card = &isi_card[BOARD(tty->index)];
|
||||
|
||||
tty->driver_data = port;
|
||||
return tty_port_open(tport, tty, filp);
|
||||
}
|
||||
|
||||
@@ -936,7 +936,12 @@ static void isicom_shutdown(struct tty_port *port)
|
||||
static void isicom_close(struct tty_struct *tty, struct file *filp)
|
||||
{
|
||||
struct isi_port *ip = tty->driver_data;
|
||||
struct tty_port *port = &ip->port;
|
||||
struct tty_port *port;
|
||||
|
||||
if (ip == NULL)
|
||||
return;
|
||||
|
||||
port = &ip->port;
|
||||
if (isicom_paranoia_check(ip, tty->name, "isicom_close"))
|
||||
return;
|
||||
tty_port_close(port, tty, filp);
|
||||
@@ -1568,11 +1573,16 @@ static int __devinit isicom_probe(struct pci_dev *pdev,
|
||||
dev_info(&pdev->dev, "ISI PCI Card(Device ID 0x%x)\n", ent->device);
|
||||
|
||||
/* allot the first empty slot in the array */
|
||||
for (index = 0; index < BOARD_COUNT; index++)
|
||||
for (index = 0; index < BOARD_COUNT; index++) {
|
||||
if (isi_card[index].base == 0) {
|
||||
board = &isi_card[index];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (index == BOARD_COUNT) {
|
||||
retval = -ENODEV;
|
||||
goto err_disable;
|
||||
}
|
||||
|
||||
board->index = index;
|
||||
board->base = pci_resource_start(pdev, 3);
|
||||
@@ -1619,6 +1629,7 @@ errunrr:
|
||||
errdec:
|
||||
board->base = 0;
|
||||
card_count--;
|
||||
err_disable:
|
||||
pci_disable_device(pdev);
|
||||
err:
|
||||
return retval;
|
||||
|
||||
@@ -827,6 +827,8 @@ static int stli_open(struct tty_struct *tty, struct file *filp)
|
||||
return -ENODEV;
|
||||
if (portp->devnr < 1)
|
||||
return -ENODEV;
|
||||
|
||||
tty->driver_data = portp;
|
||||
return tty_port_open(&portp->port, tty, filp);
|
||||
}
|
||||
|
||||
|
||||
+155
-170
@@ -24,6 +24,8 @@
|
||||
* 21-08-02: Converted to input API, major cleanup. (Vojtech Pavlik)
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/consolemap.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/sched.h>
|
||||
@@ -38,7 +40,6 @@
|
||||
#include <linux/kbd_kern.h>
|
||||
#include <linux/kbd_diacr.h>
|
||||
#include <linux/vt_kern.h>
|
||||
#include <linux/sysrq.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/reboot.h>
|
||||
#include <linux/notifier.h>
|
||||
@@ -82,8 +83,7 @@ void compute_shiftstate(void);
|
||||
typedef void (k_handler_fn)(struct vc_data *vc, unsigned char value,
|
||||
char up_flag);
|
||||
static k_handler_fn K_HANDLERS;
|
||||
k_handler_fn *k_handler[16] = { K_HANDLERS };
|
||||
EXPORT_SYMBOL_GPL(k_handler);
|
||||
static k_handler_fn *k_handler[16] = { K_HANDLERS };
|
||||
|
||||
#define FN_HANDLERS\
|
||||
fn_null, fn_enter, fn_show_ptregs, fn_show_mem,\
|
||||
@@ -133,7 +133,7 @@ static struct input_handler kbd_handler;
|
||||
static DEFINE_SPINLOCK(kbd_event_lock);
|
||||
static unsigned long key_down[BITS_TO_LONGS(KEY_CNT)]; /* keyboard key bitmap */
|
||||
static unsigned char shift_down[NR_SHIFT]; /* shift state counters.. */
|
||||
static int dead_key_next;
|
||||
static bool dead_key_next;
|
||||
static int npadch = -1; /* -1 or number assembled on pad */
|
||||
static unsigned int diacr;
|
||||
static char rep; /* flag telling character repeat */
|
||||
@@ -147,22 +147,6 @@ static struct ledptr {
|
||||
unsigned char valid:1;
|
||||
} ledptrs[3];
|
||||
|
||||
/* Simple translation table for the SysRq keys */
|
||||
|
||||
#ifdef CONFIG_MAGIC_SYSRQ
|
||||
unsigned char kbd_sysrq_xlate[KEY_MAX + 1] =
|
||||
"\000\0331234567890-=\177\t" /* 0x00 - 0x0f */
|
||||
"qwertyuiop[]\r\000as" /* 0x10 - 0x1f */
|
||||
"dfghjkl;'`\000\\zxcv" /* 0x20 - 0x2f */
|
||||
"bnm,./\000*\000 \000\201\202\203\204\205" /* 0x30 - 0x3f */
|
||||
"\206\207\210\211\212\000\000789-456+1" /* 0x40 - 0x4f */
|
||||
"230\177\000\000\213\214\000\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */
|
||||
"\r\000/"; /* 0x60 - 0x6f */
|
||||
static int sysrq_down;
|
||||
static int sysrq_alt_use;
|
||||
#endif
|
||||
static int sysrq_alt;
|
||||
|
||||
/*
|
||||
* Notifier list for console keyboard events
|
||||
*/
|
||||
@@ -361,8 +345,8 @@ static void to_utf8(struct vc_data *vc, uint c)
|
||||
/* 110***** 10****** */
|
||||
put_queue(vc, 0xc0 | (c >> 6));
|
||||
put_queue(vc, 0x80 | (c & 0x3f));
|
||||
} else if (c < 0x10000) {
|
||||
if (c >= 0xD800 && c < 0xE000)
|
||||
} else if (c < 0x10000) {
|
||||
if (c >= 0xD800 && c < 0xE000)
|
||||
return;
|
||||
if (c == 0xFFFF)
|
||||
return;
|
||||
@@ -370,7 +354,7 @@ static void to_utf8(struct vc_data *vc, uint c)
|
||||
put_queue(vc, 0xe0 | (c >> 12));
|
||||
put_queue(vc, 0x80 | ((c >> 6) & 0x3f));
|
||||
put_queue(vc, 0x80 | (c & 0x3f));
|
||||
} else if (c < 0x110000) {
|
||||
} else if (c < 0x110000) {
|
||||
/* 11110*** 10****** 10****** 10****** */
|
||||
put_queue(vc, 0xf0 | (c >> 18));
|
||||
put_queue(vc, 0x80 | ((c >> 12) & 0x3f));
|
||||
@@ -469,6 +453,7 @@ static void fn_enter(struct vc_data *vc)
|
||||
}
|
||||
diacr = 0;
|
||||
}
|
||||
|
||||
put_queue(vc, 13);
|
||||
if (vc_kbd_mode(kbd, VC_CRLF))
|
||||
put_queue(vc, 10);
|
||||
@@ -478,6 +463,7 @@ static void fn_caps_toggle(struct vc_data *vc)
|
||||
{
|
||||
if (rep)
|
||||
return;
|
||||
|
||||
chg_vc_kbd_led(kbd, VC_CAPSLOCK);
|
||||
}
|
||||
|
||||
@@ -485,12 +471,14 @@ static void fn_caps_on(struct vc_data *vc)
|
||||
{
|
||||
if (rep)
|
||||
return;
|
||||
|
||||
set_vc_kbd_led(kbd, VC_CAPSLOCK);
|
||||
}
|
||||
|
||||
static void fn_show_ptregs(struct vc_data *vc)
|
||||
{
|
||||
struct pt_regs *regs = get_irq_regs();
|
||||
|
||||
if (regs)
|
||||
show_regs(regs);
|
||||
}
|
||||
@@ -515,7 +503,7 @@ static void fn_hold(struct vc_data *vc)
|
||||
|
||||
static void fn_num(struct vc_data *vc)
|
||||
{
|
||||
if (vc_kbd_mode(kbd,VC_APPLIC))
|
||||
if (vc_kbd_mode(kbd, VC_APPLIC))
|
||||
applkey(vc, 'P', 1);
|
||||
else
|
||||
fn_bare_num(vc);
|
||||
@@ -610,7 +598,7 @@ static void fn_boot_it(struct vc_data *vc)
|
||||
|
||||
static void fn_compose(struct vc_data *vc)
|
||||
{
|
||||
dead_key_next = 1;
|
||||
dead_key_next = true;
|
||||
}
|
||||
|
||||
static void fn_spawn_con(struct vc_data *vc)
|
||||
@@ -657,7 +645,7 @@ static void k_spec(struct vc_data *vc, unsigned char value, char up_flag)
|
||||
|
||||
static void k_lowercase(struct vc_data *vc, unsigned char value, char up_flag)
|
||||
{
|
||||
printk(KERN_ERR "keyboard.c: k_lowercase was called - impossible\n");
|
||||
pr_err("k_lowercase was called - impossible\n");
|
||||
}
|
||||
|
||||
static void k_unicode(struct vc_data *vc, unsigned int value, char up_flag)
|
||||
@@ -669,7 +657,7 @@ static void k_unicode(struct vc_data *vc, unsigned int value, char up_flag)
|
||||
value = handle_diacr(vc, value);
|
||||
|
||||
if (dead_key_next) {
|
||||
dead_key_next = 0;
|
||||
dead_key_next = false;
|
||||
diacr = value;
|
||||
return;
|
||||
}
|
||||
@@ -691,6 +679,7 @@ static void k_deadunicode(struct vc_data *vc, unsigned int value, char up_flag)
|
||||
{
|
||||
if (up_flag)
|
||||
return;
|
||||
|
||||
diacr = (diacr ? handle_diacr(vc, value) : value);
|
||||
}
|
||||
|
||||
@@ -710,29 +699,28 @@ static void k_dead2(struct vc_data *vc, unsigned char value, char up_flag)
|
||||
static void k_dead(struct vc_data *vc, unsigned char value, char up_flag)
|
||||
{
|
||||
static const unsigned char ret_diacr[NR_DEAD] = {'`', '\'', '^', '~', '"', ',' };
|
||||
value = ret_diacr[value];
|
||||
k_deadunicode(vc, value, up_flag);
|
||||
|
||||
k_deadunicode(vc, ret_diacr[value], up_flag);
|
||||
}
|
||||
|
||||
static void k_cons(struct vc_data *vc, unsigned char value, char up_flag)
|
||||
{
|
||||
if (up_flag)
|
||||
return;
|
||||
|
||||
set_console(value);
|
||||
}
|
||||
|
||||
static void k_fn(struct vc_data *vc, unsigned char value, char up_flag)
|
||||
{
|
||||
unsigned v;
|
||||
|
||||
if (up_flag)
|
||||
return;
|
||||
v = value;
|
||||
if (v < ARRAY_SIZE(func_table)) {
|
||||
|
||||
if ((unsigned)value < ARRAY_SIZE(func_table)) {
|
||||
if (func_table[value])
|
||||
puts_queue(vc, func_table[value]);
|
||||
} else
|
||||
printk(KERN_ERR "k_fn called with value=%d\n", value);
|
||||
pr_err("k_fn called with value=%d\n", value);
|
||||
}
|
||||
|
||||
static void k_cur(struct vc_data *vc, unsigned char value, char up_flag)
|
||||
@@ -741,6 +729,7 @@ static void k_cur(struct vc_data *vc, unsigned char value, char up_flag)
|
||||
|
||||
if (up_flag)
|
||||
return;
|
||||
|
||||
applkey(vc, cur_chars[value], vc_kbd_mode(kbd, VC_CKMODE));
|
||||
}
|
||||
|
||||
@@ -758,43 +747,45 @@ static void k_pad(struct vc_data *vc, unsigned char value, char up_flag)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!vc_kbd_led(kbd, VC_NUMLOCK))
|
||||
if (!vc_kbd_led(kbd, VC_NUMLOCK)) {
|
||||
|
||||
switch (value) {
|
||||
case KVAL(K_PCOMMA):
|
||||
case KVAL(K_PDOT):
|
||||
k_fn(vc, KVAL(K_REMOVE), 0);
|
||||
return;
|
||||
case KVAL(K_P0):
|
||||
k_fn(vc, KVAL(K_INSERT), 0);
|
||||
return;
|
||||
case KVAL(K_P1):
|
||||
k_fn(vc, KVAL(K_SELECT), 0);
|
||||
return;
|
||||
case KVAL(K_P2):
|
||||
k_cur(vc, KVAL(K_DOWN), 0);
|
||||
return;
|
||||
case KVAL(K_P3):
|
||||
k_fn(vc, KVAL(K_PGDN), 0);
|
||||
return;
|
||||
case KVAL(K_P4):
|
||||
k_cur(vc, KVAL(K_LEFT), 0);
|
||||
return;
|
||||
case KVAL(K_P6):
|
||||
k_cur(vc, KVAL(K_RIGHT), 0);
|
||||
return;
|
||||
case KVAL(K_P7):
|
||||
k_fn(vc, KVAL(K_FIND), 0);
|
||||
return;
|
||||
case KVAL(K_P8):
|
||||
k_cur(vc, KVAL(K_UP), 0);
|
||||
return;
|
||||
case KVAL(K_P9):
|
||||
k_fn(vc, KVAL(K_PGUP), 0);
|
||||
return;
|
||||
case KVAL(K_P5):
|
||||
applkey(vc, 'G', vc_kbd_mode(kbd, VC_APPLIC));
|
||||
return;
|
||||
case KVAL(K_PCOMMA):
|
||||
case KVAL(K_PDOT):
|
||||
k_fn(vc, KVAL(K_REMOVE), 0);
|
||||
return;
|
||||
case KVAL(K_P0):
|
||||
k_fn(vc, KVAL(K_INSERT), 0);
|
||||
return;
|
||||
case KVAL(K_P1):
|
||||
k_fn(vc, KVAL(K_SELECT), 0);
|
||||
return;
|
||||
case KVAL(K_P2):
|
||||
k_cur(vc, KVAL(K_DOWN), 0);
|
||||
return;
|
||||
case KVAL(K_P3):
|
||||
k_fn(vc, KVAL(K_PGDN), 0);
|
||||
return;
|
||||
case KVAL(K_P4):
|
||||
k_cur(vc, KVAL(K_LEFT), 0);
|
||||
return;
|
||||
case KVAL(K_P6):
|
||||
k_cur(vc, KVAL(K_RIGHT), 0);
|
||||
return;
|
||||
case KVAL(K_P7):
|
||||
k_fn(vc, KVAL(K_FIND), 0);
|
||||
return;
|
||||
case KVAL(K_P8):
|
||||
k_cur(vc, KVAL(K_UP), 0);
|
||||
return;
|
||||
case KVAL(K_P9):
|
||||
k_fn(vc, KVAL(K_PGUP), 0);
|
||||
return;
|
||||
case KVAL(K_P5):
|
||||
applkey(vc, 'G', vc_kbd_mode(kbd, VC_APPLIC));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
put_queue(vc, pad_chars[value]);
|
||||
if (value == KVAL(K_PENTER) && vc_kbd_mode(kbd, VC_CRLF))
|
||||
@@ -880,6 +871,7 @@ static void k_lock(struct vc_data *vc, unsigned char value, char up_flag)
|
||||
{
|
||||
if (up_flag || rep)
|
||||
return;
|
||||
|
||||
chg_vc_kbd_lock(kbd, value);
|
||||
}
|
||||
|
||||
@@ -888,6 +880,7 @@ static void k_slock(struct vc_data *vc, unsigned char value, char up_flag)
|
||||
k_shift(vc, value, up_flag);
|
||||
if (up_flag || rep)
|
||||
return;
|
||||
|
||||
chg_vc_kbd_slock(kbd, value);
|
||||
/* try to make Alt, oops, AltGr and such work */
|
||||
if (!key_maps[kbd->lockstate ^ kbd->slockstate]) {
|
||||
@@ -925,12 +918,12 @@ static void k_brlcommit(struct vc_data *vc, unsigned int pattern, char up_flag)
|
||||
|
||||
static void k_brl(struct vc_data *vc, unsigned char value, char up_flag)
|
||||
{
|
||||
static unsigned pressed,committing;
|
||||
static unsigned pressed, committing;
|
||||
static unsigned long releasestart;
|
||||
|
||||
if (kbd->kbdmode != VC_UNICODE) {
|
||||
if (!up_flag)
|
||||
printk("keyboard mode must be unicode for braille patterns\n");
|
||||
pr_warning("keyboard mode must be unicode for braille patterns\n");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -942,32 +935,28 @@ static void k_brl(struct vc_data *vc, unsigned char value, char up_flag)
|
||||
if (value > 8)
|
||||
return;
|
||||
|
||||
if (up_flag) {
|
||||
if (brl_timeout) {
|
||||
if (!committing ||
|
||||
time_after(jiffies,
|
||||
releasestart + msecs_to_jiffies(brl_timeout))) {
|
||||
committing = pressed;
|
||||
releasestart = jiffies;
|
||||
}
|
||||
pressed &= ~(1 << (value - 1));
|
||||
if (!pressed) {
|
||||
if (committing) {
|
||||
k_brlcommit(vc, committing, 0);
|
||||
committing = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (committing) {
|
||||
k_brlcommit(vc, committing, 0);
|
||||
committing = 0;
|
||||
}
|
||||
pressed &= ~(1 << (value - 1));
|
||||
}
|
||||
} else {
|
||||
if (!up_flag) {
|
||||
pressed |= 1 << (value - 1);
|
||||
if (!brl_timeout)
|
||||
committing = pressed;
|
||||
} else if (brl_timeout) {
|
||||
if (!committing ||
|
||||
time_after(jiffies,
|
||||
releasestart + msecs_to_jiffies(brl_timeout))) {
|
||||
committing = pressed;
|
||||
releasestart = jiffies;
|
||||
}
|
||||
pressed &= ~(1 << (value - 1));
|
||||
if (!pressed && committing) {
|
||||
k_brlcommit(vc, committing, 0);
|
||||
committing = 0;
|
||||
}
|
||||
} else {
|
||||
if (committing) {
|
||||
k_brlcommit(vc, committing, 0);
|
||||
committing = 0;
|
||||
}
|
||||
pressed &= ~(1 << (value - 1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -988,6 +977,7 @@ void setledstate(struct kbd_struct *kbd, unsigned int led)
|
||||
kbd->ledmode = LED_SHOW_IOCTL;
|
||||
} else
|
||||
kbd->ledmode = LED_SHOW_FLAGS;
|
||||
|
||||
set_leds();
|
||||
}
|
||||
|
||||
@@ -1075,7 +1065,7 @@ static const unsigned short x86_keycodes[256] =
|
||||
332,340,365,342,343,344,345,346,356,270,341,368,369,370,371,372 };
|
||||
|
||||
#ifdef CONFIG_SPARC
|
||||
static int sparc_l1_a_state = 0;
|
||||
static int sparc_l1_a_state;
|
||||
extern void sun_do_break(void);
|
||||
#endif
|
||||
|
||||
@@ -1085,52 +1075,54 @@ static int emulate_raw(struct vc_data *vc, unsigned int keycode,
|
||||
int code;
|
||||
|
||||
switch (keycode) {
|
||||
case KEY_PAUSE:
|
||||
put_queue(vc, 0xe1);
|
||||
put_queue(vc, 0x1d | up_flag);
|
||||
put_queue(vc, 0x45 | up_flag);
|
||||
break;
|
||||
|
||||
case KEY_HANGEUL:
|
||||
if (!up_flag)
|
||||
put_queue(vc, 0xf2);
|
||||
break;
|
||||
case KEY_PAUSE:
|
||||
put_queue(vc, 0xe1);
|
||||
put_queue(vc, 0x1d | up_flag);
|
||||
put_queue(vc, 0x45 | up_flag);
|
||||
break;
|
||||
|
||||
case KEY_HANJA:
|
||||
if (!up_flag)
|
||||
put_queue(vc, 0xf1);
|
||||
break;
|
||||
case KEY_HANGEUL:
|
||||
if (!up_flag)
|
||||
put_queue(vc, 0xf2);
|
||||
break;
|
||||
|
||||
case KEY_SYSRQ:
|
||||
/*
|
||||
* Real AT keyboards (that's what we're trying
|
||||
* to emulate here emit 0xe0 0x2a 0xe0 0x37 when
|
||||
* pressing PrtSc/SysRq alone, but simply 0x54
|
||||
* when pressing Alt+PrtSc/SysRq.
|
||||
*/
|
||||
if (sysrq_alt) {
|
||||
put_queue(vc, 0x54 | up_flag);
|
||||
} else {
|
||||
put_queue(vc, 0xe0);
|
||||
put_queue(vc, 0x2a | up_flag);
|
||||
put_queue(vc, 0xe0);
|
||||
put_queue(vc, 0x37 | up_flag);
|
||||
}
|
||||
break;
|
||||
case KEY_HANJA:
|
||||
if (!up_flag)
|
||||
put_queue(vc, 0xf1);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (keycode > 255)
|
||||
return -1;
|
||||
case KEY_SYSRQ:
|
||||
/*
|
||||
* Real AT keyboards (that's what we're trying
|
||||
* to emulate here emit 0xe0 0x2a 0xe0 0x37 when
|
||||
* pressing PrtSc/SysRq alone, but simply 0x54
|
||||
* when pressing Alt+PrtSc/SysRq.
|
||||
*/
|
||||
if (test_bit(KEY_LEFTALT, key_down) ||
|
||||
test_bit(KEY_RIGHTALT, key_down)) {
|
||||
put_queue(vc, 0x54 | up_flag);
|
||||
} else {
|
||||
put_queue(vc, 0xe0);
|
||||
put_queue(vc, 0x2a | up_flag);
|
||||
put_queue(vc, 0xe0);
|
||||
put_queue(vc, 0x37 | up_flag);
|
||||
}
|
||||
break;
|
||||
|
||||
code = x86_keycodes[keycode];
|
||||
if (!code)
|
||||
return -1;
|
||||
default:
|
||||
if (keycode > 255)
|
||||
return -1;
|
||||
|
||||
if (code & 0x100)
|
||||
put_queue(vc, 0xe0);
|
||||
put_queue(vc, (code & 0x7f) | up_flag);
|
||||
code = x86_keycodes[keycode];
|
||||
if (!code)
|
||||
return -1;
|
||||
|
||||
break;
|
||||
if (code & 0x100)
|
||||
put_queue(vc, 0xe0);
|
||||
put_queue(vc, (code & 0x7f) | up_flag);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -1153,6 +1145,7 @@ static int emulate_raw(struct vc_data *vc, unsigned int keycode, unsigned char u
|
||||
static void kbd_rawcode(unsigned char data)
|
||||
{
|
||||
struct vc_data *vc = vc_cons[fg_console].d;
|
||||
|
||||
kbd = kbd_table + vc->vc_num;
|
||||
if (kbd->kbdmode == VC_RAW)
|
||||
put_queue(vc, data);
|
||||
@@ -1162,10 +1155,12 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)
|
||||
{
|
||||
struct vc_data *vc = vc_cons[fg_console].d;
|
||||
unsigned short keysym, *key_map;
|
||||
unsigned char type, raw_mode;
|
||||
unsigned char type;
|
||||
bool raw_mode;
|
||||
struct tty_struct *tty;
|
||||
int shift_final;
|
||||
struct keyboard_notifier_param param = { .vc = vc, .value = keycode, .down = down };
|
||||
int rc;
|
||||
|
||||
tty = vc->vc_tty;
|
||||
|
||||
@@ -1176,8 +1171,6 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)
|
||||
|
||||
kbd = kbd_table + vc->vc_num;
|
||||
|
||||
if (keycode == KEY_LEFTALT || keycode == KEY_RIGHTALT)
|
||||
sysrq_alt = down ? keycode : 0;
|
||||
#ifdef CONFIG_SPARC
|
||||
if (keycode == KEY_STOP)
|
||||
sparc_l1_a_state = down;
|
||||
@@ -1185,29 +1178,16 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)
|
||||
|
||||
rep = (down == 2);
|
||||
|
||||
if ((raw_mode = (kbd->kbdmode == VC_RAW)) && !hw_raw)
|
||||
raw_mode = (kbd->kbdmode == VC_RAW);
|
||||
if (raw_mode && !hw_raw)
|
||||
if (emulate_raw(vc, keycode, !down << 7))
|
||||
if (keycode < BTN_MISC && printk_ratelimit())
|
||||
printk(KERN_WARNING "keyboard.c: can't emulate rawmode for keycode %d\n", keycode);
|
||||
pr_warning("can't emulate rawmode for keycode %d\n",
|
||||
keycode);
|
||||
|
||||
#ifdef CONFIG_MAGIC_SYSRQ /* Handle the SysRq Hack */
|
||||
if (keycode == KEY_SYSRQ && (sysrq_down || (down == 1 && sysrq_alt))) {
|
||||
if (!sysrq_down) {
|
||||
sysrq_down = down;
|
||||
sysrq_alt_use = sysrq_alt;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (sysrq_down && !down && keycode == sysrq_alt_use)
|
||||
sysrq_down = 0;
|
||||
if (sysrq_down && down && !rep) {
|
||||
handle_sysrq(kbd_sysrq_xlate[keycode], tty);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_SPARC
|
||||
if (keycode == KEY_A && sparc_l1_a_state) {
|
||||
sparc_l1_a_state = 0;
|
||||
sparc_l1_a_state = false;
|
||||
sun_do_break();
|
||||
}
|
||||
#endif
|
||||
@@ -1229,7 +1209,7 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)
|
||||
put_queue(vc, (keycode >> 7) | 0x80);
|
||||
put_queue(vc, keycode | 0x80);
|
||||
}
|
||||
raw_mode = 1;
|
||||
raw_mode = true;
|
||||
}
|
||||
|
||||
if (down)
|
||||
@@ -1252,29 +1232,32 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)
|
||||
param.ledstate = kbd->ledflagstate;
|
||||
key_map = key_maps[shift_final];
|
||||
|
||||
if (atomic_notifier_call_chain(&keyboard_notifier_list, KBD_KEYCODE, ¶m) == NOTIFY_STOP || !key_map) {
|
||||
atomic_notifier_call_chain(&keyboard_notifier_list, KBD_UNBOUND_KEYCODE, ¶m);
|
||||
rc = atomic_notifier_call_chain(&keyboard_notifier_list,
|
||||
KBD_KEYCODE, ¶m);
|
||||
if (rc == NOTIFY_STOP || !key_map) {
|
||||
atomic_notifier_call_chain(&keyboard_notifier_list,
|
||||
KBD_UNBOUND_KEYCODE, ¶m);
|
||||
compute_shiftstate();
|
||||
kbd->slockstate = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (keycode >= NR_KEYS)
|
||||
if (keycode >= KEY_BRL_DOT1 && keycode <= KEY_BRL_DOT8)
|
||||
keysym = U(K(KT_BRL, keycode - KEY_BRL_DOT1 + 1));
|
||||
else
|
||||
return;
|
||||
else
|
||||
if (keycode < NR_KEYS)
|
||||
keysym = key_map[keycode];
|
||||
else if (keycode >= KEY_BRL_DOT1 && keycode <= KEY_BRL_DOT8)
|
||||
keysym = U(K(KT_BRL, keycode - KEY_BRL_DOT1 + 1));
|
||||
else
|
||||
return;
|
||||
|
||||
type = KTYP(keysym);
|
||||
|
||||
if (type < 0xf0) {
|
||||
param.value = keysym;
|
||||
if (atomic_notifier_call_chain(&keyboard_notifier_list, KBD_UNICODE, ¶m) == NOTIFY_STOP)
|
||||
return;
|
||||
if (down && !raw_mode)
|
||||
to_utf8(vc, keysym);
|
||||
rc = atomic_notifier_call_chain(&keyboard_notifier_list,
|
||||
KBD_UNICODE, ¶m);
|
||||
if (rc != NOTIFY_STOP)
|
||||
if (down && !raw_mode)
|
||||
to_utf8(vc, keysym);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1288,9 +1271,11 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw)
|
||||
keysym = key_map[keycode];
|
||||
}
|
||||
}
|
||||
param.value = keysym;
|
||||
|
||||
if (atomic_notifier_call_chain(&keyboard_notifier_list, KBD_KEYSYM, ¶m) == NOTIFY_STOP)
|
||||
param.value = keysym;
|
||||
rc = atomic_notifier_call_chain(&keyboard_notifier_list,
|
||||
KBD_KEYSYM, ¶m);
|
||||
if (rc == NOTIFY_STOP)
|
||||
return;
|
||||
|
||||
if (raw_mode && type != KT_SPEC && type != KT_SHIFT)
|
||||
|
||||
@@ -1011,6 +1011,7 @@ static int mxser_open(struct tty_struct *tty, struct file *filp)
|
||||
if (!info->ioaddr)
|
||||
return -ENODEV;
|
||||
|
||||
tty->driver_data = info;
|
||||
return tty_port_open(&info->port, tty, filp);
|
||||
}
|
||||
|
||||
@@ -1074,7 +1075,7 @@ static void mxser_close(struct tty_struct *tty, struct file *filp)
|
||||
struct mxser_port *info = tty->driver_data;
|
||||
struct tty_port *port = &info->port;
|
||||
|
||||
if (tty->index == MXSER_PORTS)
|
||||
if (tty->index == MXSER_PORTS || info == NULL)
|
||||
return;
|
||||
if (tty_port_close_start(port, tty, filp) == 0)
|
||||
return;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -106,7 +106,6 @@ static int major; /* major number we get from the kernel */
|
||||
|
||||
struct cm4000_dev {
|
||||
struct pcmcia_device *p_dev;
|
||||
dev_node_t node; /* OS node (major,minor) */
|
||||
|
||||
unsigned char atr[MAX_ATR];
|
||||
unsigned char rbuf[512];
|
||||
@@ -884,8 +883,7 @@ static void monitor_card(unsigned long p)
|
||||
/* slow down warning, but prompt immediately after insertion */
|
||||
if (dev->cwarn == 0 || dev->cwarn == 10) {
|
||||
set_bit(IS_BAD_CARD, &dev->flags);
|
||||
printk(KERN_WARNING MODULE_NAME ": device %s: ",
|
||||
dev->node.dev_name);
|
||||
dev_warn(&dev->p_dev->dev, MODULE_NAME ": ");
|
||||
if (test_bit(IS_BAD_CSUM, &dev->flags)) {
|
||||
DEBUGP(4, dev, "ATR checksum (0x%.2x, should "
|
||||
"be zero) failed\n", dev->atr_csum);
|
||||
@@ -1026,14 +1024,16 @@ static ssize_t cmm_read(struct file *filp, __user char *buf, size_t count,
|
||||
|
||||
xoutb(0, REG_FLAGS1(iobase)); /* clear detectCMM */
|
||||
/* last check before exit */
|
||||
if (!io_detect_cm4000(iobase, dev))
|
||||
count = -ENODEV;
|
||||
if (!io_detect_cm4000(iobase, dev)) {
|
||||
rc = -ENODEV;
|
||||
goto release_io;
|
||||
}
|
||||
|
||||
if (test_bit(IS_INVREV, &dev->flags) && count > 0)
|
||||
str_invert_revert(dev->rbuf, count);
|
||||
|
||||
if (copy_to_user(buf, dev->rbuf, count))
|
||||
return -EFAULT;
|
||||
rc = -EFAULT;
|
||||
|
||||
release_io:
|
||||
clear_bit(LOCK_IO, &dev->flags);
|
||||
@@ -1779,11 +1779,6 @@ static int cm4000_config(struct pcmcia_device * link, int devno)
|
||||
goto cs_release;
|
||||
|
||||
dev = link->priv;
|
||||
sprintf(dev->node.dev_name, DEVICE_NAME "%d", devno);
|
||||
dev->node.major = major;
|
||||
dev->node.minor = devno;
|
||||
dev->node.next = NULL;
|
||||
link->dev_node = &dev->node;
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -72,7 +72,6 @@ static struct class *cmx_class;
|
||||
|
||||
struct reader_dev {
|
||||
struct pcmcia_device *p_dev;
|
||||
dev_node_t node;
|
||||
wait_queue_head_t devq;
|
||||
wait_queue_head_t poll_wait;
|
||||
wait_queue_head_t read_wait;
|
||||
@@ -568,10 +567,6 @@ static int reader_config(struct pcmcia_device *link, int devno)
|
||||
}
|
||||
|
||||
dev = link->priv;
|
||||
sprintf(dev->node.dev_name, DEVICE_NAME "%d", devno);
|
||||
dev->node.major = major;
|
||||
dev->node.minor = devno;
|
||||
dev->node.next = &dev->node;
|
||||
|
||||
DEBUGP(2, dev, "device " DEVICE_NAME "%d at 0x%.4x-0x%.4x\n", devno,
|
||||
link->io.BasePort1, link->io.BasePort1+link->io.NumPorts1);
|
||||
|
||||
@@ -195,9 +195,6 @@ static int config_ipwireless(struct ipw_dev *ipw)
|
||||
link->conf.Attributes = CONF_ENABLE_IRQ;
|
||||
link->conf.IntType = INT_MEMORY_AND_IO;
|
||||
|
||||
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
|
||||
link->irq.Handler = ipwireless_interrupt;
|
||||
|
||||
INIT_WORK(&ipw->work_reboot, signalled_reboot_work);
|
||||
|
||||
ipwireless_init_hardware_v1(ipw->hardware, link->io.BasePort1,
|
||||
@@ -205,8 +202,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
|
||||
ipw->is_v2_card, signalled_reboot_callback,
|
||||
ipw);
|
||||
|
||||
ret = pcmcia_request_irq(link, &link->irq);
|
||||
|
||||
ret = pcmcia_request_irq(link, ipwireless_interrupt);
|
||||
if (ret != 0)
|
||||
goto exit;
|
||||
|
||||
@@ -217,7 +213,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
|
||||
(unsigned int) link->io.BasePort1,
|
||||
(unsigned int) (link->io.BasePort1 +
|
||||
link->io.NumPorts1 - 1),
|
||||
(unsigned int) link->irq.AssignedIRQ);
|
||||
(unsigned int) link->irq);
|
||||
if (ipw->attr_memory && ipw->common_memory)
|
||||
printk(KERN_INFO IPWIRELESS_PCCARD_NAME
|
||||
": attr memory 0x%08lx-0x%08lx, common memory 0x%08lx-0x%08lx\n",
|
||||
@@ -232,8 +228,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
|
||||
if (!ipw->network)
|
||||
goto exit;
|
||||
|
||||
ipw->tty = ipwireless_tty_create(ipw->hardware, ipw->network,
|
||||
ipw->nodes);
|
||||
ipw->tty = ipwireless_tty_create(ipw->hardware, ipw->network);
|
||||
if (!ipw->tty)
|
||||
goto exit;
|
||||
|
||||
@@ -248,8 +243,6 @@ static int config_ipwireless(struct ipw_dev *ipw)
|
||||
if (ret != 0)
|
||||
goto exit;
|
||||
|
||||
link->dev_node = &ipw->nodes[0];
|
||||
|
||||
return 0;
|
||||
|
||||
exit:
|
||||
@@ -271,8 +264,6 @@ exit:
|
||||
|
||||
static void release_ipwireless(struct ipw_dev *ipw)
|
||||
{
|
||||
pcmcia_disable_device(ipw->link);
|
||||
|
||||
if (ipw->common_memory) {
|
||||
release_mem_region(ipw->request_common_memory.Base,
|
||||
ipw->request_common_memory.Size);
|
||||
@@ -288,7 +279,6 @@ static void release_ipwireless(struct ipw_dev *ipw)
|
||||
if (ipw->attr_memory)
|
||||
pcmcia_release_window(ipw->link, ipw->handle_attr_memory);
|
||||
|
||||
/* Break the link with Card Services */
|
||||
pcmcia_disable_device(ipw->link);
|
||||
}
|
||||
|
||||
@@ -313,9 +303,6 @@ static int ipwireless_attach(struct pcmcia_device *link)
|
||||
ipw->link = link;
|
||||
link->priv = ipw;
|
||||
|
||||
/* Link this device into our device list. */
|
||||
link->dev_node = &ipw->nodes[0];
|
||||
|
||||
ipw->hardware = ipwireless_hardware_create();
|
||||
if (!ipw->hardware) {
|
||||
kfree(ipw);
|
||||
|
||||
@@ -54,7 +54,6 @@ struct ipw_dev {
|
||||
void __iomem *common_memory;
|
||||
win_req_t request_common_memory;
|
||||
|
||||
dev_node_t nodes[2];
|
||||
/* Reference to attribute memory, containing CIS data */
|
||||
void *attribute_memory;
|
||||
|
||||
|
||||
@@ -487,7 +487,7 @@ static int ipw_ioctl(struct tty_struct *linux_tty, struct file *file,
|
||||
return tty_mode_ioctl(linux_tty, file, cmd , arg);
|
||||
}
|
||||
|
||||
static int add_tty(dev_node_t *nodesp, int j,
|
||||
static int add_tty(int j,
|
||||
struct ipw_hardware *hardware,
|
||||
struct ipw_network *network, int channel_idx,
|
||||
int secondary_channel_idx, int tty_type)
|
||||
@@ -510,19 +510,13 @@ static int add_tty(dev_node_t *nodesp, int j,
|
||||
ipwireless_associate_network_tty(network,
|
||||
secondary_channel_idx,
|
||||
ttys[j]);
|
||||
if (nodesp != NULL) {
|
||||
sprintf(nodesp->dev_name, "ttyIPWp%d", j);
|
||||
nodesp->major = ipw_tty_driver->major;
|
||||
nodesp->minor = j + ipw_tty_driver->minor_start;
|
||||
}
|
||||
if (get_tty(j + ipw_tty_driver->minor_start) == ttys[j])
|
||||
report_registering(ttys[j]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct ipw_tty *ipwireless_tty_create(struct ipw_hardware *hardware,
|
||||
struct ipw_network *network,
|
||||
dev_node_t *nodes)
|
||||
struct ipw_network *network)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
@@ -539,26 +533,23 @@ struct ipw_tty *ipwireless_tty_create(struct ipw_hardware *hardware,
|
||||
if (allfree) {
|
||||
j = i;
|
||||
|
||||
if (add_tty(&nodes[0], j, hardware, network,
|
||||
if (add_tty(j, hardware, network,
|
||||
IPW_CHANNEL_DIALLER, IPW_CHANNEL_RAS,
|
||||
TTYTYPE_MODEM))
|
||||
return NULL;
|
||||
|
||||
j += IPWIRELESS_PCMCIA_MINOR_RANGE;
|
||||
if (add_tty(&nodes[1], j, hardware, network,
|
||||
if (add_tty(j, hardware, network,
|
||||
IPW_CHANNEL_DIALLER, -1,
|
||||
TTYTYPE_MONITOR))
|
||||
return NULL;
|
||||
|
||||
j += IPWIRELESS_PCMCIA_MINOR_RANGE;
|
||||
if (add_tty(NULL, j, hardware, network,
|
||||
if (add_tty(j, hardware, network,
|
||||
IPW_CHANNEL_RAS, -1,
|
||||
TTYTYPE_RAS_RAW))
|
||||
return NULL;
|
||||
|
||||
nodes[0].next = &nodes[1];
|
||||
nodes[1].next = NULL;
|
||||
|
||||
return ttys[i];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,8 +34,7 @@ int ipwireless_tty_init(void);
|
||||
void ipwireless_tty_release(void);
|
||||
|
||||
struct ipw_tty *ipwireless_tty_create(struct ipw_hardware *hw,
|
||||
struct ipw_network *net,
|
||||
dev_node_t *nodes);
|
||||
struct ipw_network *net);
|
||||
void ipwireless_tty_free(struct ipw_tty *tty);
|
||||
void ipwireless_tty_received(struct ipw_tty *tty, unsigned char *data,
|
||||
unsigned int length);
|
||||
|
||||
@@ -220,7 +220,6 @@ typedef struct _mgslpc_info {
|
||||
|
||||
/* PCMCIA support */
|
||||
struct pcmcia_device *p_dev;
|
||||
dev_node_t node;
|
||||
int stop;
|
||||
|
||||
/* SPPP/Cisco HDLC device parts */
|
||||
@@ -552,10 +551,6 @@ static int mgslpc_probe(struct pcmcia_device *link)
|
||||
|
||||
/* Initialize the struct pcmcia_device structure */
|
||||
|
||||
/* Interrupt setup */
|
||||
link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
|
||||
link->irq.Handler = NULL;
|
||||
|
||||
link->conf.Attributes = 0;
|
||||
link->conf.IntType = INT_MEMORY_AND_IO;
|
||||
|
||||
@@ -608,9 +603,7 @@ static int mgslpc_config(struct pcmcia_device *link)
|
||||
link->conf.ConfigIndex = 8;
|
||||
link->conf.Present = PRESENT_OPTION;
|
||||
|
||||
link->irq.Handler = mgslpc_isr;
|
||||
|
||||
ret = pcmcia_request_irq(link, &link->irq);
|
||||
ret = pcmcia_request_irq(link, mgslpc_isr);
|
||||
if (ret)
|
||||
goto failed;
|
||||
ret = pcmcia_request_configuration(link, &link->conf);
|
||||
@@ -618,17 +611,12 @@ static int mgslpc_config(struct pcmcia_device *link)
|
||||
goto failed;
|
||||
|
||||
info->io_base = link->io.BasePort1;
|
||||
info->irq_level = link->irq.AssignedIRQ;
|
||||
info->irq_level = link->irq;
|
||||
|
||||
/* add to linked list of devices */
|
||||
sprintf(info->node.dev_name, "mgslpc0");
|
||||
info->node.major = info->node.minor = 0;
|
||||
link->dev_node = &info->node;
|
||||
|
||||
printk(KERN_INFO "%s: index 0x%02x:",
|
||||
info->node.dev_name, link->conf.ConfigIndex);
|
||||
dev_info(&link->dev, "index 0x%02x:",
|
||||
link->conf.ConfigIndex);
|
||||
if (link->conf.Attributes & CONF_ENABLE_IRQ)
|
||||
printk(", irq %d", link->irq.AssignedIRQ);
|
||||
printk(", irq %d", link->irq);
|
||||
if (link->io.NumPorts1)
|
||||
printk(", io 0x%04x-0x%04x", link->io.BasePort1,
|
||||
link->io.BasePort1+link->io.NumPorts1-1);
|
||||
|
||||
@@ -257,6 +257,7 @@
|
||||
#define INPUT_POOL_WORDS 128
|
||||
#define OUTPUT_POOL_WORDS 32
|
||||
#define SEC_XFER_SIZE 512
|
||||
#define EXTRACT_SIZE 10
|
||||
|
||||
/*
|
||||
* The minimum number of bits of entropy before we wake up a read on
|
||||
@@ -414,7 +415,7 @@ struct entropy_store {
|
||||
unsigned add_ptr;
|
||||
int entropy_count;
|
||||
int input_rotate;
|
||||
__u8 *last_data;
|
||||
__u8 last_data[EXTRACT_SIZE];
|
||||
};
|
||||
|
||||
static __u32 input_pool_data[INPUT_POOL_WORDS];
|
||||
@@ -714,8 +715,6 @@ void add_disk_randomness(struct gendisk *disk)
|
||||
}
|
||||
#endif
|
||||
|
||||
#define EXTRACT_SIZE 10
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
* Entropy extraction routines
|
||||
@@ -862,7 +861,7 @@ static ssize_t extract_entropy(struct entropy_store *r, void *buf,
|
||||
while (nbytes) {
|
||||
extract_buf(r, tmp);
|
||||
|
||||
if (r->last_data) {
|
||||
if (fips_enabled) {
|
||||
spin_lock_irqsave(&r->lock, flags);
|
||||
if (!memcmp(tmp, r->last_data, EXTRACT_SIZE))
|
||||
panic("Hardware RNG duplicated output!\n");
|
||||
@@ -951,9 +950,6 @@ static void init_std_data(struct entropy_store *r)
|
||||
now = ktime_get_real();
|
||||
mix_pool_bytes(r, &now, sizeof(now));
|
||||
mix_pool_bytes(r, utsname(), sizeof(*(utsname())));
|
||||
/* Enable continuous test in fips mode */
|
||||
if (fips_enabled)
|
||||
r->last_data = kmalloc(EXTRACT_SIZE, GFP_KERNEL);
|
||||
}
|
||||
|
||||
static int rand_initialize(void)
|
||||
|
||||
@@ -909,6 +909,7 @@ static int rc_open(struct tty_struct *tty, struct file *filp)
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
tty->driver_data = port;
|
||||
return tty_port_open(&port->port, tty, filp);
|
||||
}
|
||||
|
||||
|
||||
+1
-224
@@ -176,23 +176,6 @@ static void config_setup(struct cyclades_port *);
|
||||
static void show_status(int);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_REMOTE_DEBUG
|
||||
static void debug_setup(void);
|
||||
void queueDebugChar(int c);
|
||||
int getDebugChar(void);
|
||||
|
||||
#define DEBUG_PORT 1
|
||||
#define DEBUG_LEN 256
|
||||
|
||||
typedef struct {
|
||||
int in;
|
||||
int out;
|
||||
unsigned char buf[DEBUG_LEN];
|
||||
} debugq;
|
||||
|
||||
debugq debugiq;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* I have my own version of udelay(), as it is needed when initialising
|
||||
* the chip, before the delay loop has been calibrated. Should probably
|
||||
@@ -515,11 +498,6 @@ static irqreturn_t cd2401_tx_interrupt(int irq, void *dev_id)
|
||||
/* determine the channel and change to that context */
|
||||
channel = (u_short) (base_addr[CyLICR] >> 2);
|
||||
|
||||
#ifdef CONFIG_REMOTE_DEBUG
|
||||
if (channel == DEBUG_PORT) {
|
||||
panic("TxInt on debug port!!!");
|
||||
}
|
||||
#endif
|
||||
/* validate the port number (as configured and open) */
|
||||
if ((channel < 0) || (NR_PORTS <= channel)) {
|
||||
base_addr[CyIER] &= ~(CyTxMpty | CyTxRdy);
|
||||
@@ -627,7 +605,6 @@ static irqreturn_t cd2401_rx_interrupt(int irq, void *dev_id)
|
||||
char data;
|
||||
int char_count;
|
||||
int save_cnt;
|
||||
int len;
|
||||
|
||||
/* determine the channel and change to that context */
|
||||
channel = (u_short) (base_addr[CyLICR] >> 2);
|
||||
@@ -635,14 +612,6 @@ static irqreturn_t cd2401_rx_interrupt(int irq, void *dev_id)
|
||||
info->last_active = jiffies;
|
||||
save_cnt = char_count = base_addr[CyRFOC];
|
||||
|
||||
#ifdef CONFIG_REMOTE_DEBUG
|
||||
if (channel == DEBUG_PORT) {
|
||||
while (char_count--) {
|
||||
data = base_addr[CyRDR];
|
||||
queueDebugChar(data);
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
/* if there is nowhere to put the data, discard it */
|
||||
if (info->tty == 0) {
|
||||
while (char_count--) {
|
||||
@@ -1528,7 +1497,6 @@ static int
|
||||
cy_ioctl(struct tty_struct *tty, struct file *file,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
unsigned long val;
|
||||
struct cyclades_port *info = tty->driver_data;
|
||||
int ret_val = 0;
|
||||
void __user *argp = (void __user *)arg;
|
||||
@@ -2197,9 +2165,7 @@ static int __init serial167_init(void)
|
||||
port_num++;
|
||||
info++;
|
||||
}
|
||||
#ifdef CONFIG_REMOTE_DEBUG
|
||||
debug_setup();
|
||||
#endif
|
||||
|
||||
ret = request_irq(MVME167_IRQ_SER_ERR, cd2401_rxerr_interrupt, 0,
|
||||
"cd2401_errors", cd2401_rxerr_interrupt);
|
||||
if (ret) {
|
||||
@@ -2520,193 +2486,4 @@ static int __init serial167_console_init(void)
|
||||
|
||||
console_initcall(serial167_console_init);
|
||||
|
||||
#ifdef CONFIG_REMOTE_DEBUG
|
||||
void putDebugChar(int c)
|
||||
{
|
||||
volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
|
||||
unsigned long flags;
|
||||
volatile u_char sink;
|
||||
u_char ier;
|
||||
int port;
|
||||
|
||||
local_irq_save(flags);
|
||||
|
||||
/* Ensure transmitter is enabled! */
|
||||
|
||||
port = DEBUG_PORT;
|
||||
base_addr[CyCAR] = (u_char) port;
|
||||
while (base_addr[CyCCR])
|
||||
;
|
||||
base_addr[CyCCR] = CyENB_XMTR;
|
||||
|
||||
ier = base_addr[CyIER];
|
||||
base_addr[CyIER] = CyTxMpty;
|
||||
|
||||
while (1) {
|
||||
if (pcc2chip[PccSCCTICR] & 0x20) {
|
||||
/* We have a Tx int. Acknowledge it */
|
||||
sink = pcc2chip[PccTPIACKR];
|
||||
if ((base_addr[CyLICR] >> 2) == port) {
|
||||
base_addr[CyTDR] = c;
|
||||
base_addr[CyTEOIR] = 0;
|
||||
break;
|
||||
} else
|
||||
base_addr[CyTEOIR] = CyNOTRANS;
|
||||
}
|
||||
}
|
||||
|
||||
base_addr[CyIER] = ier;
|
||||
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
int getDebugChar()
|
||||
{
|
||||
volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
|
||||
unsigned long flags;
|
||||
volatile u_char sink;
|
||||
u_char ier;
|
||||
int port;
|
||||
int i, c;
|
||||
|
||||
i = debugiq.out;
|
||||
if (i != debugiq.in) {
|
||||
c = debugiq.buf[i];
|
||||
if (++i == DEBUG_LEN)
|
||||
i = 0;
|
||||
debugiq.out = i;
|
||||
return c;
|
||||
}
|
||||
/* OK, nothing in queue, wait in poll loop */
|
||||
|
||||
local_irq_save(flags);
|
||||
|
||||
/* Ensure receiver is enabled! */
|
||||
|
||||
port = DEBUG_PORT;
|
||||
base_addr[CyCAR] = (u_char) port;
|
||||
#if 0
|
||||
while (base_addr[CyCCR])
|
||||
;
|
||||
base_addr[CyCCR] = CyENB_RCVR;
|
||||
#endif
|
||||
ier = base_addr[CyIER];
|
||||
base_addr[CyIER] = CyRxData;
|
||||
|
||||
while (1) {
|
||||
if (pcc2chip[PccSCCRICR] & 0x20) {
|
||||
/* We have a Rx int. Acknowledge it */
|
||||
sink = pcc2chip[PccRPIACKR];
|
||||
if ((base_addr[CyLICR] >> 2) == port) {
|
||||
int cnt = base_addr[CyRFOC];
|
||||
while (cnt-- > 0) {
|
||||
c = base_addr[CyRDR];
|
||||
if (c == 0)
|
||||
printk
|
||||
("!! debug char is null (cnt=%d) !!",
|
||||
cnt);
|
||||
else
|
||||
queueDebugChar(c);
|
||||
}
|
||||
base_addr[CyREOIR] = 0;
|
||||
i = debugiq.out;
|
||||
if (i == debugiq.in)
|
||||
panic("Debug input queue empty!");
|
||||
c = debugiq.buf[i];
|
||||
if (++i == DEBUG_LEN)
|
||||
i = 0;
|
||||
debugiq.out = i;
|
||||
break;
|
||||
} else
|
||||
base_addr[CyREOIR] = CyNOTRANS;
|
||||
}
|
||||
}
|
||||
|
||||
base_addr[CyIER] = ier;
|
||||
|
||||
local_irq_restore(flags);
|
||||
|
||||
return (c);
|
||||
}
|
||||
|
||||
void queueDebugChar(int c)
|
||||
{
|
||||
int i;
|
||||
|
||||
i = debugiq.in;
|
||||
debugiq.buf[i] = c;
|
||||
if (++i == DEBUG_LEN)
|
||||
i = 0;
|
||||
if (i != debugiq.out)
|
||||
debugiq.in = i;
|
||||
}
|
||||
|
||||
static void debug_setup()
|
||||
{
|
||||
unsigned long flags;
|
||||
volatile unsigned char *base_addr = (u_char *) BASE_ADDR;
|
||||
int i, cflag;
|
||||
|
||||
cflag = B19200;
|
||||
|
||||
local_irq_save(flags);
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
base_addr[CyCAR] = i;
|
||||
base_addr[CyLICR] = i << 2;
|
||||
}
|
||||
|
||||
debugiq.in = debugiq.out = 0;
|
||||
|
||||
base_addr[CyCAR] = DEBUG_PORT;
|
||||
|
||||
/* baud rate */
|
||||
i = cflag & CBAUD;
|
||||
|
||||
base_addr[CyIER] = 0;
|
||||
|
||||
base_addr[CyCMR] = CyASYNC;
|
||||
base_addr[CyLICR] = DEBUG_PORT << 2;
|
||||
base_addr[CyLIVR] = 0x5c;
|
||||
|
||||
/* tx and rx baud rate */
|
||||
|
||||
base_addr[CyTCOR] = baud_co[i];
|
||||
base_addr[CyTBPR] = baud_bpr[i];
|
||||
base_addr[CyRCOR] = baud_co[i] >> 5;
|
||||
base_addr[CyRBPR] = baud_bpr[i];
|
||||
|
||||
/* set line characteristics according configuration */
|
||||
|
||||
base_addr[CySCHR1] = 0;
|
||||
base_addr[CySCHR2] = 0;
|
||||
base_addr[CySCRL] = 0;
|
||||
base_addr[CySCRH] = 0;
|
||||
base_addr[CyCOR1] = Cy_8_BITS | CyPARITY_NONE;
|
||||
base_addr[CyCOR2] = 0;
|
||||
base_addr[CyCOR3] = Cy_1_STOP;
|
||||
base_addr[CyCOR4] = baud_cor4[i];
|
||||
base_addr[CyCOR5] = 0;
|
||||
base_addr[CyCOR6] = 0;
|
||||
base_addr[CyCOR7] = 0;
|
||||
|
||||
write_cy_cmd(base_addr, CyINIT_CHAN);
|
||||
write_cy_cmd(base_addr, CyENB_RCVR);
|
||||
|
||||
base_addr[CyCAR] = DEBUG_PORT; /* !!! Is this needed? */
|
||||
|
||||
base_addr[CyRTPRL] = 2;
|
||||
base_addr[CyRTPRH] = 0;
|
||||
|
||||
base_addr[CyMSVR1] = CyRTS;
|
||||
base_addr[CyMSVR2] = CyDTR;
|
||||
|
||||
base_addr[CyIER] = CyRxData;
|
||||
|
||||
local_irq_restore(flags);
|
||||
|
||||
} /* debug_setup */
|
||||
|
||||
#endif
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
@@ -724,7 +724,6 @@ static int stl_open(struct tty_struct *tty, struct file *filp)
|
||||
{
|
||||
struct stlport *portp;
|
||||
struct stlbrd *brdp;
|
||||
struct tty_port *port;
|
||||
unsigned int minordev, brdnr, panelnr;
|
||||
int portnr;
|
||||
|
||||
@@ -754,7 +753,8 @@ static int stl_open(struct tty_struct *tty, struct file *filp)
|
||||
portp = brdp->panels[panelnr]->ports[portnr];
|
||||
if (portp == NULL)
|
||||
return -ENODEV;
|
||||
port = &portp->port;
|
||||
|
||||
tty->driver_data = portp;
|
||||
return tty_port_open(&portp->port, tty, filp);
|
||||
|
||||
}
|
||||
@@ -841,7 +841,8 @@ static void stl_close(struct tty_struct *tty, struct file *filp)
|
||||
pr_debug("stl_close(tty=%p,filp=%p)\n", tty, filp);
|
||||
|
||||
portp = tty->driver_data;
|
||||
BUG_ON(portp == NULL);
|
||||
if(portp == NULL)
|
||||
return;
|
||||
tty_port_close(&portp->port, tty, filp);
|
||||
}
|
||||
|
||||
|
||||
+214
-31
@@ -1,7 +1,4 @@
|
||||
/* -*- linux-c -*-
|
||||
*
|
||||
* $Id: sysrq.c,v 1.15 1998/08/23 14:56:41 mj Exp $
|
||||
*
|
||||
/*
|
||||
* Linux Magic System Request Key Hacks
|
||||
*
|
||||
* (c) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
|
||||
@@ -10,8 +7,13 @@
|
||||
* (c) 2000 Crutcher Dunnavant <crutcher+kernel@datastacks.com>
|
||||
* overhauled to use key registration
|
||||
* based upon discusions in irc://irc.openprojects.net/#kernelnewbies
|
||||
*
|
||||
* Copyright (c) 2010 Dmitry Torokhov
|
||||
* Input handler conversion
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
||||
|
||||
#include <linux/sched.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/mm.h>
|
||||
@@ -39,33 +41,34 @@
|
||||
#include <linux/hrtimer.h>
|
||||
#include <linux/oom.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/input.h>
|
||||
|
||||
#include <asm/ptrace.h>
|
||||
#include <asm/irq_regs.h>
|
||||
|
||||
/* Whether we react on sysrq keys or just ignore them */
|
||||
int __read_mostly __sysrq_enabled = 1;
|
||||
static int __read_mostly sysrq_enabled = 1;
|
||||
static bool __read_mostly sysrq_always_enabled;
|
||||
|
||||
static int __read_mostly sysrq_always_enabled;
|
||||
|
||||
int sysrq_on(void)
|
||||
static bool sysrq_on(void)
|
||||
{
|
||||
return __sysrq_enabled || sysrq_always_enabled;
|
||||
return sysrq_enabled || sysrq_always_enabled;
|
||||
}
|
||||
|
||||
/*
|
||||
* A value of 1 means 'all', other nonzero values are an op mask:
|
||||
*/
|
||||
static inline int sysrq_on_mask(int mask)
|
||||
static bool sysrq_on_mask(int mask)
|
||||
{
|
||||
return sysrq_always_enabled || __sysrq_enabled == 1 ||
|
||||
(__sysrq_enabled & mask);
|
||||
return sysrq_always_enabled ||
|
||||
sysrq_enabled == 1 ||
|
||||
(sysrq_enabled & mask);
|
||||
}
|
||||
|
||||
static int __init sysrq_always_enabled_setup(char *str)
|
||||
{
|
||||
sysrq_always_enabled = 1;
|
||||
printk(KERN_INFO "debug: sysrq always enabled.\n");
|
||||
sysrq_always_enabled = true;
|
||||
pr_info("sysrq always enabled.\n");
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -76,6 +79,7 @@ __setup("sysrq_always_enabled", sysrq_always_enabled_setup);
|
||||
static void sysrq_handle_loglevel(int key, struct tty_struct *tty)
|
||||
{
|
||||
int i;
|
||||
|
||||
i = key - '0';
|
||||
console_loglevel = 7;
|
||||
printk("Loglevel set to %d\n", i);
|
||||
@@ -101,7 +105,7 @@ static struct sysrq_key_op sysrq_SAK_op = {
|
||||
.enable_mask = SYSRQ_ENABLE_KEYBOARD,
|
||||
};
|
||||
#else
|
||||
#define sysrq_SAK_op (*(struct sysrq_key_op *)0)
|
||||
#define sysrq_SAK_op (*(struct sysrq_key_op *)NULL)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_VT
|
||||
@@ -119,7 +123,7 @@ static struct sysrq_key_op sysrq_unraw_op = {
|
||||
.enable_mask = SYSRQ_ENABLE_KEYBOARD,
|
||||
};
|
||||
#else
|
||||
#define sysrq_unraw_op (*(struct sysrq_key_op *)0)
|
||||
#define sysrq_unraw_op (*(struct sysrq_key_op *)NULL)
|
||||
#endif /* CONFIG_VT */
|
||||
|
||||
static void sysrq_handle_crash(int key, struct tty_struct *tty)
|
||||
@@ -195,7 +199,7 @@ static struct sysrq_key_op sysrq_showlocks_op = {
|
||||
.action_msg = "Show Locks Held",
|
||||
};
|
||||
#else
|
||||
#define sysrq_showlocks_op (*(struct sysrq_key_op *)0)
|
||||
#define sysrq_showlocks_op (*(struct sysrq_key_op *)NULL)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
@@ -289,7 +293,7 @@ static struct sysrq_key_op sysrq_showstate_blocked_op = {
|
||||
|
||||
static void sysrq_ftrace_dump(int key, struct tty_struct *tty)
|
||||
{
|
||||
ftrace_dump();
|
||||
ftrace_dump(DUMP_ALL);
|
||||
}
|
||||
static struct sysrq_key_op sysrq_ftrace_dump_op = {
|
||||
.handler = sysrq_ftrace_dump,
|
||||
@@ -298,7 +302,7 @@ static struct sysrq_key_op sysrq_ftrace_dump_op = {
|
||||
.enable_mask = SYSRQ_ENABLE_DUMP,
|
||||
};
|
||||
#else
|
||||
#define sysrq_ftrace_dump_op (*(struct sysrq_key_op *)0)
|
||||
#define sysrq_ftrace_dump_op (*(struct sysrq_key_op *)NULL)
|
||||
#endif
|
||||
|
||||
static void sysrq_handle_showmem(int key, struct tty_struct *tty)
|
||||
@@ -477,6 +481,7 @@ struct sysrq_key_op *__sysrq_get_key_op(int key)
|
||||
i = sysrq_key_table_key2index(key);
|
||||
if (i != -1)
|
||||
op_p = sysrq_key_table[i];
|
||||
|
||||
return op_p;
|
||||
}
|
||||
|
||||
@@ -488,11 +493,7 @@ static void __sysrq_put_key_op(int key, struct sysrq_key_op *op_p)
|
||||
sysrq_key_table[i] = op_p;
|
||||
}
|
||||
|
||||
/*
|
||||
* This is the non-locking version of handle_sysrq. It must/can only be called
|
||||
* by sysrq key handlers, as they are inside of the lock
|
||||
*/
|
||||
void __handle_sysrq(int key, struct tty_struct *tty, int check_mask)
|
||||
static void __handle_sysrq(int key, struct tty_struct *tty, int check_mask)
|
||||
{
|
||||
struct sysrq_key_op *op_p;
|
||||
int orig_log_level;
|
||||
@@ -544,10 +545,6 @@ void __handle_sysrq(int key, struct tty_struct *tty, int check_mask)
|
||||
spin_unlock_irqrestore(&sysrq_key_table_lock, flags);
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is called by the keyboard handler when SysRq is pressed
|
||||
* and any other keycode arrives.
|
||||
*/
|
||||
void handle_sysrq(int key, struct tty_struct *tty)
|
||||
{
|
||||
if (sysrq_on())
|
||||
@@ -555,10 +552,177 @@ void handle_sysrq(int key, struct tty_struct *tty)
|
||||
}
|
||||
EXPORT_SYMBOL(handle_sysrq);
|
||||
|
||||
#ifdef CONFIG_INPUT
|
||||
|
||||
/* Simple translation table for the SysRq keys */
|
||||
static const unsigned char sysrq_xlate[KEY_MAX + 1] =
|
||||
"\000\0331234567890-=\177\t" /* 0x00 - 0x0f */
|
||||
"qwertyuiop[]\r\000as" /* 0x10 - 0x1f */
|
||||
"dfghjkl;'`\000\\zxcv" /* 0x20 - 0x2f */
|
||||
"bnm,./\000*\000 \000\201\202\203\204\205" /* 0x30 - 0x3f */
|
||||
"\206\207\210\211\212\000\000789-456+1" /* 0x40 - 0x4f */
|
||||
"230\177\000\000\213\214\000\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */
|
||||
"\r\000/"; /* 0x60 - 0x6f */
|
||||
|
||||
static bool sysrq_down;
|
||||
static int sysrq_alt_use;
|
||||
static int sysrq_alt;
|
||||
|
||||
static bool sysrq_filter(struct input_handle *handle, unsigned int type,
|
||||
unsigned int code, int value)
|
||||
{
|
||||
if (type != EV_KEY)
|
||||
goto out;
|
||||
|
||||
switch (code) {
|
||||
|
||||
case KEY_LEFTALT:
|
||||
case KEY_RIGHTALT:
|
||||
if (value)
|
||||
sysrq_alt = code;
|
||||
else if (sysrq_down && code == sysrq_alt_use)
|
||||
sysrq_down = false;
|
||||
break;
|
||||
|
||||
case KEY_SYSRQ:
|
||||
if (value == 1 && sysrq_alt) {
|
||||
sysrq_down = true;
|
||||
sysrq_alt_use = sysrq_alt;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (sysrq_down && value && value != 2)
|
||||
__handle_sysrq(sysrq_xlate[code], NULL, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
out:
|
||||
return sysrq_down;
|
||||
}
|
||||
|
||||
static int sysrq_connect(struct input_handler *handler,
|
||||
struct input_dev *dev,
|
||||
const struct input_device_id *id)
|
||||
{
|
||||
struct input_handle *handle;
|
||||
int error;
|
||||
|
||||
sysrq_down = false;
|
||||
sysrq_alt = 0;
|
||||
|
||||
handle = kzalloc(sizeof(struct input_handle), GFP_KERNEL);
|
||||
if (!handle)
|
||||
return -ENOMEM;
|
||||
|
||||
handle->dev = dev;
|
||||
handle->handler = handler;
|
||||
handle->name = "sysrq";
|
||||
|
||||
error = input_register_handle(handle);
|
||||
if (error) {
|
||||
pr_err("Failed to register input sysrq handler, error %d\n",
|
||||
error);
|
||||
goto err_free;
|
||||
}
|
||||
|
||||
error = input_open_device(handle);
|
||||
if (error) {
|
||||
pr_err("Failed to open input device, error %d\n", error);
|
||||
goto err_unregister;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_unregister:
|
||||
input_unregister_handle(handle);
|
||||
err_free:
|
||||
kfree(handle);
|
||||
return error;
|
||||
}
|
||||
|
||||
static void sysrq_disconnect(struct input_handle *handle)
|
||||
{
|
||||
input_close_device(handle);
|
||||
input_unregister_handle(handle);
|
||||
kfree(handle);
|
||||
}
|
||||
|
||||
/*
|
||||
* We are matching on KEY_LEFTALT insteard of KEY_SYSRQ because not all
|
||||
* keyboards have SysRq ikey predefined and so user may add it to keymap
|
||||
* later, but we expect all such keyboards to have left alt.
|
||||
*/
|
||||
static const struct input_device_id sysrq_ids[] = {
|
||||
{
|
||||
.flags = INPUT_DEVICE_ID_MATCH_EVBIT |
|
||||
INPUT_DEVICE_ID_MATCH_KEYBIT,
|
||||
.evbit = { BIT_MASK(EV_KEY) },
|
||||
.keybit = { BIT_MASK(KEY_LEFTALT) },
|
||||
},
|
||||
{ },
|
||||
};
|
||||
|
||||
static struct input_handler sysrq_handler = {
|
||||
.filter = sysrq_filter,
|
||||
.connect = sysrq_connect,
|
||||
.disconnect = sysrq_disconnect,
|
||||
.name = "sysrq",
|
||||
.id_table = sysrq_ids,
|
||||
};
|
||||
|
||||
static bool sysrq_handler_registered;
|
||||
|
||||
static inline void sysrq_register_handler(void)
|
||||
{
|
||||
int error;
|
||||
|
||||
error = input_register_handler(&sysrq_handler);
|
||||
if (error)
|
||||
pr_err("Failed to register input handler, error %d", error);
|
||||
else
|
||||
sysrq_handler_registered = true;
|
||||
}
|
||||
|
||||
static inline void sysrq_unregister_handler(void)
|
||||
{
|
||||
if (sysrq_handler_registered) {
|
||||
input_unregister_handler(&sysrq_handler);
|
||||
sysrq_handler_registered = false;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static inline void sysrq_register_handler(void)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void sysrq_unregister_handler(void)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* CONFIG_INPUT */
|
||||
|
||||
int sysrq_toggle_support(int enable_mask)
|
||||
{
|
||||
bool was_enabled = sysrq_on();
|
||||
|
||||
sysrq_enabled = enable_mask;
|
||||
|
||||
if (was_enabled != sysrq_on()) {
|
||||
if (sysrq_on())
|
||||
sysrq_register_handler();
|
||||
else
|
||||
sysrq_unregister_handler();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __sysrq_swap_key_ops(int key, struct sysrq_key_op *insert_op_p,
|
||||
struct sysrq_key_op *remove_op_p)
|
||||
{
|
||||
|
||||
int retval;
|
||||
unsigned long flags;
|
||||
|
||||
@@ -599,6 +763,7 @@ static ssize_t write_sysrq_trigger(struct file *file, const char __user *buf,
|
||||
return -EFAULT;
|
||||
__handle_sysrq(c, NULL, 0);
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -606,10 +771,28 @@ static const struct file_operations proc_sysrq_trigger_operations = {
|
||||
.write = write_sysrq_trigger,
|
||||
};
|
||||
|
||||
static void sysrq_init_procfs(void)
|
||||
{
|
||||
if (!proc_create("sysrq-trigger", S_IWUSR, NULL,
|
||||
&proc_sysrq_trigger_operations))
|
||||
pr_err("Failed to register proc interface\n");
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static inline void sysrq_init_procfs(void)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
|
||||
static int __init sysrq_init(void)
|
||||
{
|
||||
proc_create("sysrq-trigger", S_IWUSR, NULL, &proc_sysrq_trigger_operations);
|
||||
sysrq_init_procfs();
|
||||
|
||||
if (sysrq_on())
|
||||
sysrq_register_handler();
|
||||
|
||||
return 0;
|
||||
}
|
||||
module_init(sysrq_init);
|
||||
#endif
|
||||
|
||||
@@ -17,14 +17,16 @@ menuconfig TCG_TPM
|
||||
obtained at: <http://sourceforge.net/projects/trousers>. To
|
||||
compile this driver as a module, choose M here; the module
|
||||
will be called tpm. If unsure, say N.
|
||||
Note: For more TPM drivers enable CONFIG_PNP, CONFIG_ACPI
|
||||
Notes:
|
||||
1) For more TPM drivers enable CONFIG_PNP, CONFIG_ACPI
|
||||
and CONFIG_PNPACPI.
|
||||
2) Without ACPI enabled, the BIOS event log won't be accessible,
|
||||
which is required to validate the PCR 0-7 values.
|
||||
|
||||
if TCG_TPM
|
||||
|
||||
config TCG_TIS
|
||||
tristate "TPM Interface Specification 1.2 Interface"
|
||||
depends on PNP
|
||||
---help---
|
||||
If you have a TPM security chip that is compliant with the
|
||||
TCG TIS 1.2 TPM specification say Yes and it will be accessible
|
||||
|
||||
+40
-7
@@ -1068,6 +1068,27 @@ void tpm_remove_hardware(struct device *dev)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tpm_remove_hardware);
|
||||
|
||||
#define TPM_ORD_SAVESTATE cpu_to_be32(152)
|
||||
#define SAVESTATE_RESULT_SIZE 10
|
||||
|
||||
static struct tpm_input_header savestate_header = {
|
||||
.tag = TPM_TAG_RQU_COMMAND,
|
||||
.length = cpu_to_be32(10),
|
||||
.ordinal = TPM_ORD_SAVESTATE
|
||||
};
|
||||
|
||||
/* Bug workaround - some TPM's don't flush the most
|
||||
* recently changed pcr on suspend, so force the flush
|
||||
* with an extend to the selected _unused_ non-volatile pcr.
|
||||
*/
|
||||
static int tpm_suspend_pcr;
|
||||
static int __init tpm_suspend_setup(char *str)
|
||||
{
|
||||
get_option(&str, &tpm_suspend_pcr);
|
||||
return 1;
|
||||
}
|
||||
__setup("tpm_suspend_pcr=", tpm_suspend_setup);
|
||||
|
||||
/*
|
||||
* We are about to suspend. Save the TPM state
|
||||
* so that it can be restored.
|
||||
@@ -1075,17 +1096,29 @@ EXPORT_SYMBOL_GPL(tpm_remove_hardware);
|
||||
int tpm_pm_suspend(struct device *dev, pm_message_t pm_state)
|
||||
{
|
||||
struct tpm_chip *chip = dev_get_drvdata(dev);
|
||||
u8 savestate[] = {
|
||||
0, 193, /* TPM_TAG_RQU_COMMAND */
|
||||
0, 0, 0, 10, /* blob length (in bytes) */
|
||||
0, 0, 0, 152 /* TPM_ORD_SaveState */
|
||||
};
|
||||
struct tpm_cmd_t cmd;
|
||||
int rc;
|
||||
|
||||
u8 dummy_hash[TPM_DIGEST_SIZE] = { 0 };
|
||||
|
||||
if (chip == NULL)
|
||||
return -ENODEV;
|
||||
|
||||
tpm_transmit(chip, savestate, sizeof(savestate));
|
||||
return 0;
|
||||
/* for buggy tpm, flush pcrs with extend to selected dummy */
|
||||
if (tpm_suspend_pcr) {
|
||||
cmd.header.in = pcrextend_header;
|
||||
cmd.params.pcrextend_in.pcr_idx = cpu_to_be32(tpm_suspend_pcr);
|
||||
memcpy(cmd.params.pcrextend_in.hash, dummy_hash,
|
||||
TPM_DIGEST_SIZE);
|
||||
rc = transmit_cmd(chip, &cmd, EXTEND_PCR_RESULT_SIZE,
|
||||
"extending dummy pcr before suspend");
|
||||
}
|
||||
|
||||
/* now do the actual savestate */
|
||||
cmd.header.in = savestate_header;
|
||||
rc = transmit_cmd(chip, &cmd, SAVESTATE_RESULT_SIZE,
|
||||
"sending savestate before suspend");
|
||||
return rc;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(tpm_pm_suspend);
|
||||
|
||||
|
||||
+21
-19
@@ -598,7 +598,7 @@ out_err:
|
||||
tpm_remove_hardware(chip->dev);
|
||||
return rc;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PNP
|
||||
static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev,
|
||||
const struct pnp_device_id *pnp_id)
|
||||
{
|
||||
@@ -663,7 +663,7 @@ static struct pnp_driver tis_pnp_driver = {
|
||||
module_param_string(hid, tpm_pnp_tbl[TIS_HID_USR_IDX].id,
|
||||
sizeof(tpm_pnp_tbl[TIS_HID_USR_IDX].id), 0444);
|
||||
MODULE_PARM_DESC(hid, "Set additional specific HID for this driver to probe");
|
||||
|
||||
#endif
|
||||
static int tpm_tis_suspend(struct platform_device *dev, pm_message_t msg)
|
||||
{
|
||||
return tpm_pm_suspend(&dev->dev, msg);
|
||||
@@ -690,21 +690,21 @@ MODULE_PARM_DESC(force, "Force device probe rather than using ACPI entry");
|
||||
static int __init init_tis(void)
|
||||
{
|
||||
int rc;
|
||||
#ifdef CONFIG_PNP
|
||||
if (!force)
|
||||
return pnp_register_driver(&tis_pnp_driver);
|
||||
#endif
|
||||
|
||||
if (force) {
|
||||
rc = platform_driver_register(&tis_drv);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
if (IS_ERR(pdev=platform_device_register_simple("tpm_tis", -1, NULL, 0)))
|
||||
return PTR_ERR(pdev);
|
||||
if((rc=tpm_tis_init(&pdev->dev, TIS_MEM_BASE, TIS_MEM_LEN, 0)) != 0) {
|
||||
platform_device_unregister(pdev);
|
||||
platform_driver_unregister(&tis_drv);
|
||||
}
|
||||
rc = platform_driver_register(&tis_drv);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
if (IS_ERR(pdev=platform_device_register_simple("tpm_tis", -1, NULL, 0)))
|
||||
return PTR_ERR(pdev);
|
||||
if((rc=tpm_tis_init(&pdev->dev, TIS_MEM_BASE, TIS_MEM_LEN, 0)) != 0) {
|
||||
platform_device_unregister(pdev);
|
||||
platform_driver_unregister(&tis_drv);
|
||||
}
|
||||
|
||||
return pnp_register_driver(&tis_pnp_driver);
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void __exit cleanup_tis(void)
|
||||
@@ -728,12 +728,14 @@ static void __exit cleanup_tis(void)
|
||||
list_del(&i->list);
|
||||
}
|
||||
spin_unlock(&tis_lock);
|
||||
|
||||
if (force) {
|
||||
platform_device_unregister(pdev);
|
||||
platform_driver_unregister(&tis_drv);
|
||||
} else
|
||||
#ifdef CONFIG_PNP
|
||||
if (!force) {
|
||||
pnp_unregister_driver(&tis_pnp_driver);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
platform_device_unregister(pdev);
|
||||
platform_driver_unregister(&tis_drv);
|
||||
}
|
||||
|
||||
module_init(init_tis);
|
||||
|
||||
@@ -238,7 +238,7 @@ EXPORT_SYMBOL_GPL(tty_buffer_request_room);
|
||||
* @size: size
|
||||
*
|
||||
* Queue a series of bytes to the tty buffering. All the characters
|
||||
* passed are marked as without error. Returns the number added.
|
||||
* passed are marked with the supplied flag. Returns the number added.
|
||||
*
|
||||
* Locking: Called functions may take tty->buf.lock
|
||||
*/
|
||||
|
||||
@@ -1875,6 +1875,7 @@ got_driver:
|
||||
*/
|
||||
if (filp->f_op == &hung_up_tty_fops)
|
||||
filp->f_op = &tty_fops;
|
||||
unlock_kernel();
|
||||
goto retry_open;
|
||||
}
|
||||
unlock_kernel();
|
||||
|
||||
+378
-324
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user