aboutsummaryrefslogtreecommitdiffstats
diff options
-rw-r--r--d01.patch563
-rw-r--r--driver-core-remove-struct-bus_type.dev_attrs.patch8
-rw-r--r--p20.patch4
-rw-r--r--pci-msi-fix.patch298
-rw-r--r--series8
-rw-r--r--simulate-fake-fn-key-on-ps-2-keyboards-w-o-one-eg.-chromebook-pixel.patch (renamed from 0001-Simulate-fake-Fn-key-on-PS-2-keyboards-w-o-one-eg.-C.patch)5
-rw-r--r--staging-rtl8821ae-add-todo-file.patch27
-rw-r--r--staging-rtl8821ae-rc.c-fix-up-function-prototypes.patch33
-rw-r--r--staging-rtl8821ae-removed-unused-functions-and-variables.patch491
-rw-r--r--usb-c67x00-remove-config_usb_debug-dependancy.patch72
-rw-r--r--usb-core-remove-config_usb_debug-usage.patch99
-rw-r--r--usb-gadget-fix-up-some-comments-about-config_usb_debug.patch40
-rw-r--r--watchdog-pcwd_usb-remove-config_usb_debug-usage.patch110
13 files changed, 583 insertions, 1175 deletions
diff --git a/d01.patch b/d01.patch
index d47deca4903090..db705b84391c4b 100644
--- a/d01.patch
+++ b/d01.patch
@@ -1,18 +1,17 @@
---
- drivers/hid/hid-core.c | 24 +-
- drivers/infiniband/hw/nes/nes.c | 80 +++-----
- drivers/pci/pci-driver.c | 8
- drivers/scsi/aic94xx/aic94xx_init.c | 4
- drivers/scsi/megaraid/megaraid_sas_base.c | 32 +--
- drivers/scsi/osst.c | 4
- drivers/scsi/scsi_debug.c | 270 ++++++++++++------------------
- drivers/scsi/st.c | 74 ++------
- drivers/tty/hvc/hvcs.c | 7
- 9 files changed, 190 insertions(+), 313 deletions(-)
+ drivers/hid/hid-core.c | 24 +++------
+ drivers/infiniband/hw/nes/nes.c | 80 +++++++++++-------------------
+ drivers/pci/pci-driver.c | 8 +--
+ drivers/scsi/aic94xx/aic94xx_init.c | 4 -
+ drivers/scsi/megaraid/megaraid_sas_base.c | 32 ++++--------
+ drivers/scsi/osst.c | 4 -
+ drivers/scsi/st.c | 74 ++++++---------------------
+ drivers/tty/hvc/hvcs.c | 7 +-
+ 8 files changed, 82 insertions(+), 151 deletions(-)
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
-@@ -1898,7 +1898,7 @@ struct hid_dynid {
+@@ -1899,7 +1899,7 @@ struct hid_dynid {
* Adds a new dynamic hid device ID to this driver,
* and causes the driver to probe for all devices again.
*/
@@ -21,7 +20,7 @@
size_t count)
{
struct hid_driver *hdrv = container_of(drv, struct hid_driver, driver);
-@@ -1930,7 +1930,13 @@ static ssize_t store_new_id(struct devic
+@@ -1931,7 +1931,13 @@ static ssize_t store_new_id(struct devic
return ret ? : count;
}
@@ -36,7 +35,7 @@
static void hid_free_dynids(struct hid_driver *hdrv)
{
-@@ -2090,6 +2096,7 @@ static int hid_uevent(struct device *dev
+@@ -2091,6 +2097,7 @@ static int hid_uevent(struct device *dev
static struct bus_type hid_bus_type = {
.name = "hid",
.dev_groups = hid_dev_groups,
@@ -44,7 +43,7 @@
.match = hid_bus_match,
.probe = hid_device_probe,
.remove = hid_device_remove,
-@@ -2527,8 +2534,6 @@ EXPORT_SYMBOL_GPL(hid_destroy_device);
+@@ -2528,8 +2535,6 @@ EXPORT_SYMBOL_GPL(hid_destroy_device);
int __hid_register_driver(struct hid_driver *hdrv, struct module *owner,
const char *mod_name)
{
@@ -53,7 +52,7 @@
hdrv->driver.name = hdrv->name;
hdrv->driver.bus = &hid_bus_type;
hdrv->driver.owner = owner;
-@@ -2537,21 +2542,12 @@ int __hid_register_driver(struct hid_dri
+@@ -2538,21 +2543,12 @@ int __hid_register_driver(struct hid_dri
INIT_LIST_HEAD(&hdrv->dyn_list);
spin_lock_init(&hdrv->dyn_lock);
@@ -301,7 +300,7 @@
{
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
-@@ -98,7 +98,7 @@ static void pci_free_dynids(struct pci_d
+@@ -99,7 +99,7 @@ static void pci_free_dynids(struct pci_d
* Allow PCI IDs to be added to an existing driver via sysfs.
*/
static ssize_t
@@ -310,7 +309,7 @@
{
struct pci_driver *pdrv = to_pci_driver(driver);
const struct pci_device_id *ids = pdrv->id_table;
-@@ -135,7 +135,7 @@ store_new_id(struct device_driver *drive
+@@ -136,7 +136,7 @@ store_new_id(struct device_driver *drive
return retval;
return count;
}
@@ -319,7 +318,7 @@
/**
* store_remove_id - remove a PCI device ID from this driver
-@@ -146,7 +146,7 @@ static DRIVER_ATTR(new_id, S_IWUSR, NULL
+@@ -147,7 +147,7 @@ static DRIVER_ATTR(new_id, S_IWUSR, NULL
* Removes a dynamic pci device ID to this driver.
*/
static ssize_t
@@ -328,7 +327,7 @@
{
struct pci_dynid *dynid, *n;
struct pci_driver *pdrv = to_pci_driver(driver);
-@@ -181,7 +181,7 @@ store_remove_id(struct device_driver *dr
+@@ -182,7 +182,7 @@ store_remove_id(struct device_driver *dr
return retval;
return count;
}
@@ -355,7 +354,7 @@
{
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
-@@ -5371,50 +5371,43 @@ static struct pci_driver megasas_pci_dri
+@@ -5373,50 +5373,43 @@ static struct pci_driver megasas_pci_dri
/*
* Sysfs driver attributes
*/
@@ -417,7 +416,7 @@
{
int retval = count;
if(sscanf(buf,"%u",&megasas_dbg_lvl)<1){
-@@ -5424,8 +5417,7 @@ megasas_sysfs_set_dbg_lvl(struct device_
+@@ -5426,8 +5419,7 @@ megasas_sysfs_set_dbg_lvl(struct device_
return retval;
}
@@ -444,522 +443,6 @@
static int osst_create_sysfs_files(struct device_driver *sysfs)
{
---- a/drivers/scsi/scsi_debug.c
-+++ b/drivers/scsi/scsi_debug.c
-@@ -276,10 +276,12 @@ static DEFINE_RWLOCK(atomic_rw);
- static char sdebug_proc_name[] = "scsi_debug";
-
- static struct bus_type pseudo_lld_bus;
-+static const struct attribute_group *sdebug_drv_groups[];
-
- static struct device_driver sdebug_driverfs_driver = {
- .name = sdebug_proc_name,
- .bus = &pseudo_lld_bus,
-+ .groups = sdebug_drv_groups,
- };
-
- static const int check_condition_result =
-@@ -2873,13 +2875,13 @@ static int scsi_debug_show_info(struct s
- return 0;
- }
-
--static ssize_t sdebug_delay_show(struct device_driver * ddp, char * buf)
-+static ssize_t delay_show(struct device_driver * ddp, char * buf)
- {
- return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_delay);
- }
-
--static ssize_t sdebug_delay_store(struct device_driver * ddp,
-- const char * buf, size_t count)
-+static ssize_t delay_store(struct device_driver * ddp, const char * buf,
-+ size_t count)
- {
- int delay;
- char work[20];
-@@ -2892,16 +2894,15 @@ static ssize_t sdebug_delay_store(struct
- }
- return -EINVAL;
- }
--DRIVER_ATTR(delay, S_IRUGO | S_IWUSR, sdebug_delay_show,
-- sdebug_delay_store);
-+static DRIVER_ATTR_RW(delay);
-
--static ssize_t sdebug_opts_show(struct device_driver * ddp, char * buf)
-+static ssize_t opts_show(struct device_driver * ddp, char * buf)
- {
- return scnprintf(buf, PAGE_SIZE, "0x%x\n", scsi_debug_opts);
- }
-
--static ssize_t sdebug_opts_store(struct device_driver * ddp,
-- const char * buf, size_t count)
-+static ssize_t opts_store(struct device_driver * ddp, const char * buf,
-+ size_t count)
- {
- int opts;
- char work[20];
-@@ -2921,15 +2922,14 @@ opts_done:
- scsi_debug_cmnd_count = 0;
- return count;
- }
--DRIVER_ATTR(opts, S_IRUGO | S_IWUSR, sdebug_opts_show,
-- sdebug_opts_store);
-+static DRIVER_ATTR_RW(opts);
-
--static ssize_t sdebug_ptype_show(struct device_driver * ddp, char * buf)
-+static ssize_t ptype_show(struct device_driver * ddp, char * buf)
- {
- return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_ptype);
- }
--static ssize_t sdebug_ptype_store(struct device_driver * ddp,
-- const char * buf, size_t count)
-+static ssize_t ptype_store(struct device_driver * ddp, const char * buf,
-+ size_t count)
- {
- int n;
-
-@@ -2939,14 +2939,14 @@ static ssize_t sdebug_ptype_store(struct
- }
- return -EINVAL;
- }
--DRIVER_ATTR(ptype, S_IRUGO | S_IWUSR, sdebug_ptype_show, sdebug_ptype_store);
-+static DRIVER_ATTR_RW(ptype);
-
--static ssize_t sdebug_dsense_show(struct device_driver * ddp, char * buf)
-+static ssize_t dsense_show(struct device_driver * ddp, char * buf)
- {
- return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_dsense);
- }
--static ssize_t sdebug_dsense_store(struct device_driver * ddp,
-- const char * buf, size_t count)
-+static ssize_t dsense_store(struct device_driver * ddp, const char * buf,
-+ size_t count)
- {
- int n;
-
-@@ -2956,15 +2956,14 @@ static ssize_t sdebug_dsense_store(struc
- }
- return -EINVAL;
- }
--DRIVER_ATTR(dsense, S_IRUGO | S_IWUSR, sdebug_dsense_show,
-- sdebug_dsense_store);
-+static DRIVER_ATTR_RW(dsense);
-
--static ssize_t sdebug_fake_rw_show(struct device_driver * ddp, char * buf)
-+static ssize_t fake_rw_show(struct device_driver * ddp, char * buf)
- {
- return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_fake_rw);
- }
--static ssize_t sdebug_fake_rw_store(struct device_driver * ddp,
-- const char * buf, size_t count)
-+static ssize_t fake_rw_store(struct device_driver * ddp, const char * buf,
-+ size_t count)
- {
- int n;
-
-@@ -2974,15 +2973,14 @@ static ssize_t sdebug_fake_rw_store(stru
- }
- return -EINVAL;
- }
--DRIVER_ATTR(fake_rw, S_IRUGO | S_IWUSR, sdebug_fake_rw_show,
-- sdebug_fake_rw_store);
-+static DRIVER_ATTR_RW(fake_rw);
-
--static ssize_t sdebug_no_lun_0_show(struct device_driver * ddp, char * buf)
-+static ssize_t no_lun_0_show(struct device_driver * ddp, char * buf)
- {
- return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_no_lun_0);
- }
--static ssize_t sdebug_no_lun_0_store(struct device_driver * ddp,
-- const char * buf, size_t count)
-+static ssize_t no_lun_0_store(struct device_driver * ddp, const char * buf,
-+ size_t count)
- {
- int n;
-
-@@ -2992,15 +2990,14 @@ static ssize_t sdebug_no_lun_0_store(str
- }
- return -EINVAL;
- }
--DRIVER_ATTR(no_lun_0, S_IRUGO | S_IWUSR, sdebug_no_lun_0_show,
-- sdebug_no_lun_0_store);
-+static DRIVER_ATTR_RW(no_lun_0);
-
--static ssize_t sdebug_num_tgts_show(struct device_driver * ddp, char * buf)
-+static ssize_t num_tgts_show(struct device_driver * ddp, char * buf)
- {
- return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_num_tgts);
- }
--static ssize_t sdebug_num_tgts_store(struct device_driver * ddp,
-- const char * buf, size_t count)
-+static ssize_t num_tgts_store(struct device_driver * ddp, const char * buf,
-+ size_t count)
- {
- int n;
-
-@@ -3011,27 +3008,26 @@ static ssize_t sdebug_num_tgts_store(str
- }
- return -EINVAL;
- }
--DRIVER_ATTR(num_tgts, S_IRUGO | S_IWUSR, sdebug_num_tgts_show,
-- sdebug_num_tgts_store);
-+static DRIVER_ATTR_RW(num_tgts);
-
--static ssize_t sdebug_dev_size_mb_show(struct device_driver * ddp, char * buf)
-+static ssize_t dev_size_mb_show(struct device_driver * ddp, char * buf)
- {
- return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_dev_size_mb);
- }
--DRIVER_ATTR(dev_size_mb, S_IRUGO, sdebug_dev_size_mb_show, NULL);
-+static DRIVER_ATTR_RO(dev_size_mb);
-
--static ssize_t sdebug_num_parts_show(struct device_driver * ddp, char * buf)
-+static ssize_t num_parts_show(struct device_driver * ddp, char * buf)
- {
- return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_num_parts);
- }
--DRIVER_ATTR(num_parts, S_IRUGO, sdebug_num_parts_show, NULL);
-+static DRIVER_ATTR_RO(num_parts);
-
--static ssize_t sdebug_every_nth_show(struct device_driver * ddp, char * buf)
-+static ssize_t every_nth_show(struct device_driver * ddp, char * buf)
- {
- return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_every_nth);
- }
--static ssize_t sdebug_every_nth_store(struct device_driver * ddp,
-- const char * buf, size_t count)
-+static ssize_t every_nth_store(struct device_driver * ddp, const char * buf,
-+ size_t count)
- {
- int nth;
-
-@@ -3042,15 +3038,14 @@ static ssize_t sdebug_every_nth_store(st
- }
- return -EINVAL;
- }
--DRIVER_ATTR(every_nth, S_IRUGO | S_IWUSR, sdebug_every_nth_show,
-- sdebug_every_nth_store);
-+static DRIVER_ATTR_RW(every_nth);
-
--static ssize_t sdebug_max_luns_show(struct device_driver * ddp, char * buf)
-+static ssize_t max_luns_show(struct device_driver * ddp, char * buf)
- {
- return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_max_luns);
- }
--static ssize_t sdebug_max_luns_store(struct device_driver * ddp,
-- const char * buf, size_t count)
-+static ssize_t max_luns_store(struct device_driver * ddp, const char * buf,
-+ size_t count)
- {
- int n;
-
-@@ -3061,15 +3056,14 @@ static ssize_t sdebug_max_luns_store(str
- }
- return -EINVAL;
- }
--DRIVER_ATTR(max_luns, S_IRUGO | S_IWUSR, sdebug_max_luns_show,
-- sdebug_max_luns_store);
-+static DRIVER_ATTR_RW(max_luns);
-
--static ssize_t sdebug_max_queue_show(struct device_driver * ddp, char * buf)
-+static ssize_t max_queue_show(struct device_driver * ddp, char * buf)
- {
- return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_max_queue);
- }
--static ssize_t sdebug_max_queue_store(struct device_driver * ddp,
-- const char * buf, size_t count)
-+static ssize_t max_queue_store(struct device_driver * ddp, const char * buf,
-+ size_t count)
- {
- int n;
-
-@@ -3080,27 +3074,26 @@ static ssize_t sdebug_max_queue_store(st
- }
- return -EINVAL;
- }
--DRIVER_ATTR(max_queue, S_IRUGO | S_IWUSR, sdebug_max_queue_show,
-- sdebug_max_queue_store);
-+static DRIVER_ATTR_RW(max_queue);
-
--static ssize_t sdebug_no_uld_show(struct device_driver * ddp, char * buf)
-+static ssize_t no_uld_show(struct device_driver * ddp, char * buf)
- {
- return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_no_uld);
- }
--DRIVER_ATTR(no_uld, S_IRUGO, sdebug_no_uld_show, NULL);
-+static DRIVER_ATTR_RO(no_uld);
-
--static ssize_t sdebug_scsi_level_show(struct device_driver * ddp, char * buf)
-+static ssize_t scsi_level_show(struct device_driver * ddp, char * buf)
- {
- return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_scsi_level);
- }
--DRIVER_ATTR(scsi_level, S_IRUGO, sdebug_scsi_level_show, NULL);
-+static DRIVER_ATTR_RO(scsi_level);
-
--static ssize_t sdebug_virtual_gb_show(struct device_driver * ddp, char * buf)
-+static ssize_t virtual_gb_show(struct device_driver * ddp, char * buf)
- {
- return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_virtual_gb);
- }
--static ssize_t sdebug_virtual_gb_store(struct device_driver * ddp,
-- const char * buf, size_t count)
-+static ssize_t virtual_gb_store(struct device_driver * ddp, const char * buf,
-+ size_t count)
- {
- int n;
-
-@@ -3113,16 +3106,15 @@ static ssize_t sdebug_virtual_gb_store(s
- }
- return -EINVAL;
- }
--DRIVER_ATTR(virtual_gb, S_IRUGO | S_IWUSR, sdebug_virtual_gb_show,
-- sdebug_virtual_gb_store);
-+static DRIVER_ATTR_RW(virtual_gb);
-
--static ssize_t sdebug_add_host_show(struct device_driver * ddp, char * buf)
-+static ssize_t add_host_show(struct device_driver * ddp, char * buf)
- {
- return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_add_host);
- }
-
--static ssize_t sdebug_add_host_store(struct device_driver * ddp,
-- const char * buf, size_t count)
-+static ssize_t add_host_store(struct device_driver * ddp, const char * buf,
-+ size_t count)
- {
- int delta_hosts;
-
-@@ -3139,16 +3131,14 @@ static ssize_t sdebug_add_host_store(str
- }
- return count;
- }
--DRIVER_ATTR(add_host, S_IRUGO | S_IWUSR, sdebug_add_host_show,
-- sdebug_add_host_store);
-+static DRIVER_ATTR_RW(add_host);
-
--static ssize_t sdebug_vpd_use_hostno_show(struct device_driver * ddp,
-- char * buf)
-+static ssize_t vpd_use_hostno_show(struct device_driver * ddp, char * buf)
- {
- return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_vpd_use_hostno);
- }
--static ssize_t sdebug_vpd_use_hostno_store(struct device_driver * ddp,
-- const char * buf, size_t count)
-+static ssize_t vpd_use_hostno_store(struct device_driver * ddp,
-+ const char * buf, size_t count)
- {
- int n;
-
-@@ -3158,40 +3148,39 @@ static ssize_t sdebug_vpd_use_hostno_sto
- }
- return -EINVAL;
- }
--DRIVER_ATTR(vpd_use_hostno, S_IRUGO | S_IWUSR, sdebug_vpd_use_hostno_show,
-- sdebug_vpd_use_hostno_store);
-+static DRIVER_ATTR_RW(vpd_use_hostno);
-
--static ssize_t sdebug_sector_size_show(struct device_driver * ddp, char * buf)
-+static ssize_t sector_size_show(struct device_driver * ddp, char * buf)
- {
- return scnprintf(buf, PAGE_SIZE, "%u\n", scsi_debug_sector_size);
- }
--DRIVER_ATTR(sector_size, S_IRUGO, sdebug_sector_size_show, NULL);
-+static DRIVER_ATTR_RO(sector_size);
-
--static ssize_t sdebug_dix_show(struct device_driver *ddp, char *buf)
-+static ssize_t dix_show(struct device_driver *ddp, char *buf)
- {
- return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_dix);
- }
--DRIVER_ATTR(dix, S_IRUGO, sdebug_dix_show, NULL);
-+static DRIVER_ATTR_RO(dix);
-
--static ssize_t sdebug_dif_show(struct device_driver *ddp, char *buf)
-+static ssize_t dif_show(struct device_driver *ddp, char *buf)
- {
- return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_dif);
- }
--DRIVER_ATTR(dif, S_IRUGO, sdebug_dif_show, NULL);
-+static DRIVER_ATTR_RO(dif);
-
--static ssize_t sdebug_guard_show(struct device_driver *ddp, char *buf)
-+static ssize_t guard_show(struct device_driver *ddp, char *buf)
- {
- return scnprintf(buf, PAGE_SIZE, "%u\n", scsi_debug_guard);
- }
--DRIVER_ATTR(guard, S_IRUGO, sdebug_guard_show, NULL);
-+static DRIVER_ATTR_RO(guard);
-
--static ssize_t sdebug_ato_show(struct device_driver *ddp, char *buf)
-+static ssize_t ato_show(struct device_driver *ddp, char *buf)
- {
- return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_ato);
- }
--DRIVER_ATTR(ato, S_IRUGO, sdebug_ato_show, NULL);
-+static DRIVER_ATTR_RO(ato);
-
--static ssize_t sdebug_map_show(struct device_driver *ddp, char *buf)
-+static ssize_t map_show(struct device_driver *ddp, char *buf)
- {
- ssize_t count;
-
-@@ -3206,15 +3195,14 @@ static ssize_t sdebug_map_show(struct de
-
- return count;
- }
--DRIVER_ATTR(map, S_IRUGO, sdebug_map_show, NULL);
-+static DRIVER_ATTR_RO(map);
-
--static ssize_t sdebug_removable_show(struct device_driver *ddp,
-- char *buf)
-+static ssize_t removable_show(struct device_driver *ddp, char *buf)
- {
- return scnprintf(buf, PAGE_SIZE, "%d\n", scsi_debug_removable ? 1 : 0);
- }
--static ssize_t sdebug_removable_store(struct device_driver *ddp,
-- const char *buf, size_t count)
-+static ssize_t removable_store(struct device_driver *ddp, const char *buf,
-+ size_t count)
- {
- int n;
-
-@@ -3224,74 +3212,42 @@ static ssize_t sdebug_removable_store(st
- }
- return -EINVAL;
- }
--DRIVER_ATTR(removable, S_IRUGO | S_IWUSR, sdebug_removable_show,
-- sdebug_removable_store);
-+static DRIVER_ATTR_RW(removable);
-
--
--/* Note: The following function creates attribute files in the
-+/* Note: The following function attribute files are located in the
- /sys/bus/pseudo/drivers/scsi_debug directory. The advantage of these
- files (over those found in the /sys/module/scsi_debug/parameters
- directory) is that auxiliary actions can be triggered when an attribute
-- is changed. For example see: sdebug_add_host_store() above.
-+ is changed. For example see: add_host_store() above.
- */
--static int do_create_driverfs_files(void)
--{
-- int ret;
--
-- ret = driver_create_file(&sdebug_driverfs_driver, &driver_attr_add_host);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_delay);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_dev_size_mb);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_dsense);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_every_nth);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_fake_rw);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_max_luns);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_max_queue);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_no_lun_0);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_no_uld);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_num_parts);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_num_tgts);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_ptype);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_opts);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_removable);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_scsi_level);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_virtual_gb);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_vpd_use_hostno);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_sector_size);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_dix);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_dif);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_guard);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_ato);
-- ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_map);
-- return ret;
--}
--
--static void do_remove_driverfs_files(void)
--{
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_map);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_ato);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_guard);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_dif);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_dix);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_sector_size);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_vpd_use_hostno);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_virtual_gb);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_scsi_level);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_opts);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_ptype);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_removable);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_num_tgts);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_num_parts);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_no_uld);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_no_lun_0);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_max_queue);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_max_luns);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_fake_rw);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_every_nth);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_dsense);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_dev_size_mb);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_delay);
-- driver_remove_file(&sdebug_driverfs_driver, &driver_attr_add_host);
--}
-+static struct attribute *sdebug_drv_attrs[] = {
-+ &driver_attr_add_host.attr,
-+ &driver_attr_delay.attr,
-+ &driver_attr_dev_size_mb.attr,
-+ &driver_attr_dsense.attr,
-+ &driver_attr_every_nth.attr,
-+ &driver_attr_fake_rw.attr,
-+ &driver_attr_max_luns.attr,
-+ &driver_attr_max_queue.attr,
-+ &driver_attr_no_lun_0.attr,
-+ &driver_attr_no_uld.attr,
-+ &driver_attr_num_parts.attr,
-+ &driver_attr_num_tgts.attr,
-+ &driver_attr_ptype.attr,
-+ &driver_attr_opts.attr,
-+ &driver_attr_removable.attr,
-+ &driver_attr_scsi_level.attr,
-+ &driver_attr_virtual_gb.attr,
-+ &driver_attr_vpd_use_hostno.attr,
-+ &driver_attr_sector_size.attr,
-+ &driver_attr_dix.attr,
-+ &driver_attr_dif.attr,
-+ &driver_attr_guard.attr,
-+ &driver_attr_ato.attr,
-+ &driver_attr_map.attr,
-+ NULL,
-+};
-+ATTRIBUTE_GROUPS(sdebug_drv);
-
- struct device *pseudo_primary;
-
-@@ -3456,12 +3412,6 @@ static int __init scsi_debug_init(void)
- ret);
- goto bus_unreg;
- }
-- ret = do_create_driverfs_files();
-- if (ret < 0) {
-- printk(KERN_WARNING "scsi_debug: driver_create_file error: %d\n",
-- ret);
-- goto del_files;
-- }
-
- init_all_queued();
-
-@@ -3482,9 +3432,6 @@ static int __init scsi_debug_init(void)
- }
- return 0;
-
--del_files:
-- do_remove_driverfs_files();
-- driver_unregister(&sdebug_driverfs_driver);
- bus_unreg:
- bus_unregister(&pseudo_lld_bus);
- dev_unreg:
-@@ -3506,7 +3453,6 @@ static void __exit scsi_debug_exit(void)
- stop_all_queued();
- for (; k; k--)
- sdebug_remove_adapter();
-- do_remove_driverfs_files();
- driver_unregister(&sdebug_driverfs_driver);
- bus_unregister(&pseudo_lld_bus);
- root_device_unregister(pseudo_primary);
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -83,6 +83,7 @@ static int try_wdio = 1;
@@ -987,7 +470,7 @@
},
};
-@@ -4304,14 +4303,8 @@ static int __init init_st(void)
+@@ -4301,14 +4300,8 @@ static int __init init_st(void)
if (err)
goto err_chrdev;
@@ -1002,7 +485,7 @@
err_chrdev:
unregister_chrdev_region(MKDEV(SCSI_TAPE_MAJOR, 0),
ST_MAX_TAPE_ENTRIES);
-@@ -4322,7 +4315,6 @@ err_class:
+@@ -4319,7 +4312,6 @@ err_class:
static void __exit exit_st(void)
{
@@ -1010,7 +493,7 @@
scsi_unregister_driver(&st_template.gendrv);
unregister_chrdev_region(MKDEV(SCSI_TAPE_MAJOR, 0),
ST_MAX_TAPE_ENTRIES);
-@@ -4335,68 +4327,38 @@ module_exit(exit_st);
+@@ -4332,68 +4324,38 @@ module_exit(exit_st);
/* The sysfs driver interface. Read-only at the moment */
diff --git a/driver-core-remove-struct-bus_type.dev_attrs.patch b/driver-core-remove-struct-bus_type.dev_attrs.patch
index f98852c60b9f97..d86ed6c71a195e 100644
--- a/driver-core-remove-struct-bus_type.dev_attrs.patch
+++ b/driver-core-remove-struct-bus_type.dev_attrs.patch
@@ -16,7 +16,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
-@@ -453,35 +453,6 @@ int bus_for_each_drv(struct bus_type *bu
+@@ -464,35 +464,6 @@ int bus_for_each_drv(struct bus_type *bu
}
EXPORT_SYMBOL_GPL(bus_for_each_drv);
@@ -52,7 +52,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/**
* bus_add_device - add device to bus
* @dev: device being added
-@@ -497,16 +468,13 @@ int bus_add_device(struct device *dev)
+@@ -508,16 +479,13 @@ int bus_add_device(struct device *dev)
if (bus) {
pr_debug("bus: '%s': add device %s\n", bus->name, dev_name(dev));
@@ -71,7 +71,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
error = sysfs_create_link(&dev->kobj,
&dev->bus->p->subsys.kobj, "subsystem");
if (error)
-@@ -519,8 +487,6 @@ out_subsys:
+@@ -530,8 +498,6 @@ out_subsys:
sysfs_remove_link(&bus->p->devices_kset->kobj, dev_name(dev));
out_groups:
device_remove_groups(dev, bus->dev_groups);
@@ -80,7 +80,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
out_put:
bus_put(dev->bus);
return error;
-@@ -580,7 +546,6 @@ void bus_remove_device(struct device *de
+@@ -591,7 +557,6 @@ void bus_remove_device(struct device *de
sysfs_remove_link(&dev->kobj, "subsystem");
sysfs_remove_link(&dev->bus->p->devices_kset->kobj,
dev_name(dev));
diff --git a/p20.patch b/p20.patch
index f78b06b95aa3fc..d432c0b05d6376 100644
--- a/p20.patch
+++ b/p20.patch
@@ -4,7 +4,7 @@
--- a/arch/parisc/kernel/drivers.c
+++ b/arch/parisc/kernel/drivers.c
-@@ -587,7 +587,8 @@ static ssize_t name##_show(struct device
+@@ -575,7 +575,8 @@ static ssize_t name##_show(struct device
{ \
struct parisc_device *padev = to_parisc_device(dev); \
return sprintf(buf, format_string, padev->field); \
@@ -14,7 +14,7 @@
#define pa_dev_attr_id(field, format) pa_dev_attr(field, id.field, format)
-@@ -601,22 +602,24 @@ static ssize_t modalias_show(struct devi
+@@ -589,22 +590,24 @@ static ssize_t modalias_show(struct devi
{
return make_modalias(dev, buf);
}
diff --git a/pci-msi-fix.patch b/pci-msi-fix.patch
deleted file mode 100644
index 374ad388cfd0bf..00000000000000
--- a/pci-msi-fix.patch
+++ /dev/null
@@ -1,298 +0,0 @@
-From foo@baz Wed Nov 27 10:33:53 PST 2013
-Date: Wed, 27 Nov 2013 10:33:53 -0800
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: [PATCH] PCI: export MSI mode using attributes, not kobjects
-
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
-The PCI MSI sysfs code is a mess with kobjects for things that don't
-really need to be kobjects. This patch creates attributes dynamically
-for the MSI interrupts instead of using kobjects.
-
-Note, this removes a directory from the current MSI interrupt sysfs
-code:
-
-old MSI kobjects:
-pci_device
- └── msi_irqs
-    └── 40
-    └── mode
-
-new MSI attributes:
-pci_device
- └── msi_irqs
-    └── 40
-
-As there was only one file "mode" with the kobject model, the interrupt
-number is now a file that returns the "mode" of the interrupt (msi vs.
-msix).
-
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- Documentation/ABI/testing/sysfs-bus-pci | 11 --
- drivers/pci/msi.c | 166 +++++++++++++++++---------------
- include/linux/pci.h | 2
- 3 files changed, 96 insertions(+), 83 deletions(-)
-
-v3: attribute creation properly tagged for lockdep.
- error handling if creation of attributes fails.
-
-v2: add documentation for sysfs attributes.
---- a/Documentation/ABI/testing/sysfs-bus-pci
-+++ b/Documentation/ABI/testing/sysfs-bus-pci
-@@ -70,18 +70,15 @@ Date: September, 2011
- Contact: Neil Horman <nhorman@tuxdriver.com>
- Description:
- The /sys/devices/.../msi_irqs directory contains a variable set
-- of sub-directories, with each sub-directory being named after a
-- corresponding msi irq vector allocated to that device. Each
-- numbered sub-directory N contains attributes of that irq.
-- Note that this directory is not created for device drivers which
-- do not support msi irqs
-+ of files, with each file being named after a corresponding msi
-+ irq vector allocated to that device.
-
--What: /sys/bus/pci/devices/.../msi_irqs/<N>/mode
-+What: /sys/bus/pci/devices/.../msi_irqs/<N>
- Date: September 2011
- Contact: Neil Horman <nhorman@tuxdriver.com>
- Description:
- This attribute indicates the mode that the irq vector named by
-- the parent directory is in (msi vs. msix)
-+ the file is in (msi vs. msix)
-
- What: /sys/bus/pci/devices/.../remove
- Date: January 2009
---- a/drivers/pci/msi.c
-+++ b/drivers/pci/msi.c
-@@ -363,6 +363,9 @@ void write_msi_msg(unsigned int irq, str
- static void free_msi_irqs(struct pci_dev *dev)
- {
- struct msi_desc *entry, *tmp;
-+ struct attribute **msi_attrs;
-+ struct device_attribute *dev_attr;
-+ int count = 0;
-
- list_for_each_entry(entry, &dev->msi_list, list) {
- int i, nvec;
-@@ -398,6 +401,22 @@ static void free_msi_irqs(struct pci_dev
- list_del(&entry->list);
- kfree(entry);
- }
-+
-+ if (dev->msi_irq_groups) {
-+ sysfs_remove_groups(&dev->dev.kobj, dev->msi_irq_groups);
-+ msi_attrs = dev->msi_irq_groups[0]->attrs;
-+ list_for_each_entry(entry, &dev->msi_list, list) {
-+ dev_attr = container_of(msi_attrs[count],
-+ struct device_attribute, attr);
-+ kfree(dev_attr->attr.name);
-+ kfree(dev_attr);
-+ ++count;
-+ }
-+ kfree(msi_attrs);
-+ kfree(dev->msi_irq_groups[0]);
-+ kfree(dev->msi_irq_groups);
-+ dev->msi_irq_groups = NULL;
-+ }
- }
-
- static struct msi_desc *alloc_msi_entry(struct pci_dev *dev)
-@@ -471,94 +490,95 @@ void pci_restore_msi_state(struct pci_de
- }
- EXPORT_SYMBOL_GPL(pci_restore_msi_state);
-
--
--#define to_msi_attr(obj) container_of(obj, struct msi_attribute, attr)
--#define to_msi_desc(obj) container_of(obj, struct msi_desc, kobj)
--
--struct msi_attribute {
-- struct attribute attr;
-- ssize_t (*show)(struct msi_desc *entry, struct msi_attribute *attr,
-- char *buf);
-- ssize_t (*store)(struct msi_desc *entry, struct msi_attribute *attr,
-- const char *buf, size_t count);
--};
--
--static ssize_t show_msi_mode(struct msi_desc *entry, struct msi_attribute *atr,
-+static ssize_t msi_mode_show(struct device *dev, struct device_attribute *attr,
- char *buf)
- {
-- return sprintf(buf, "%s\n", entry->msi_attrib.is_msix ? "msix" : "msi");
--}
--
--static ssize_t msi_irq_attr_show(struct kobject *kobj,
-- struct attribute *attr, char *buf)
--{
-- struct msi_attribute *attribute = to_msi_attr(attr);
-- struct msi_desc *entry = to_msi_desc(kobj);
--
-- if (!attribute->show)
-- return -EIO;
--
-- return attribute->show(entry, attribute, buf);
--}
--
--static const struct sysfs_ops msi_irq_sysfs_ops = {
-- .show = msi_irq_attr_show,
--};
--
--static struct msi_attribute mode_attribute =
-- __ATTR(mode, S_IRUGO, show_msi_mode, NULL);
--
--
--static struct attribute *msi_irq_default_attrs[] = {
-- &mode_attribute.attr,
-- NULL
--};
-+ struct pci_dev *pdev = to_pci_dev(dev);
-+ struct msi_desc *entry;
-+ unsigned long irq;
-+ int retval;
-
--static void msi_kobj_release(struct kobject *kobj)
--{
-- struct msi_desc *entry = to_msi_desc(kobj);
-+ retval = kstrtoul(attr->attr.name, 10, &irq);
-+ if (retval)
-+ return retval;
-
-- pci_dev_put(entry->dev);
-+ list_for_each_entry(entry, &pdev->msi_list, list) {
-+ if (entry->irq == irq) {
-+ return sprintf(buf, "%s\n",
-+ entry->msi_attrib.is_msix ? "msix" : "msi");
-+ }
-+ }
-+ return -ENODEV;
- }
-
--static struct kobj_type msi_irq_ktype = {
-- .release = msi_kobj_release,
-- .sysfs_ops = &msi_irq_sysfs_ops,
-- .default_attrs = msi_irq_default_attrs,
--};
--
- static int populate_msi_sysfs(struct pci_dev *pdev)
- {
-+ struct attribute **msi_attrs;
-+ struct attribute *msi_attr;
-+ struct device_attribute *msi_dev_attr;
-+ struct attribute_group *msi_irq_group;
-+ const struct attribute_group **msi_irq_groups;
- struct msi_desc *entry;
-- struct kobject *kobj;
-- int ret;
-+ int ret = -ENOMEM;
-+ int num_msi = 0;
- int count = 0;
-
-- pdev->msi_kset = kset_create_and_add("msi_irqs", NULL, &pdev->dev.kobj);
-- if (!pdev->msi_kset)
-- return -ENOMEM;
-+ /* Determine how many msi entries we have */
-+ list_for_each_entry(entry, &pdev->msi_list, list) {
-+ ++num_msi;
-+ }
-+ if (!num_msi)
-+ return 0;
-
-+ /* Dynamically create the MSI attributes for the PCI device */
-+ msi_attrs = kzalloc(sizeof(void *) * (num_msi + 1), GFP_KERNEL);
-+ if (!msi_attrs)
-+ return -ENOMEM;
- list_for_each_entry(entry, &pdev->msi_list, list) {
-- kobj = &entry->kobj;
-- kobj->kset = pdev->msi_kset;
-- pci_dev_get(pdev);
-- ret = kobject_init_and_add(kobj, &msi_irq_ktype, NULL,
-- "%u", entry->irq);
-- if (ret)
-- goto out_unroll;
-+ char *name = kmalloc(20, GFP_KERNEL);
-+ msi_dev_attr = kzalloc(sizeof(*msi_dev_attr), GFP_KERNEL);
-+ if (!msi_dev_attr)
-+ goto error_attrs;
-+ sprintf(name, "%d", entry->irq);
-+ sysfs_attr_init(&msi_dev_attr->attr);
-+ msi_dev_attr->attr.name = name;
-+ msi_dev_attr->attr.mode = S_IRUGO;
-+ msi_dev_attr->show = msi_mode_show;
-+ msi_attrs[count] = &msi_dev_attr->attr;
-+ ++count;
-+ }
-+
-+ msi_irq_group = kzalloc(sizeof(*msi_irq_group), GFP_KERNEL);
-+ if (!msi_irq_group)
-+ goto error_attrs;
-+ msi_irq_group->name = "msi_irqs";
-+ msi_irq_group->attrs = msi_attrs;
-+
-+ msi_irq_groups = kzalloc(sizeof(void *) * 2, GFP_KERNEL);
-+ if (!msi_irq_groups)
-+ goto error_irq_group;
-+ msi_irq_groups[0] = msi_irq_group;
-
-- count++;
-- }
-+ ret = sysfs_create_groups(&pdev->dev.kobj, msi_irq_groups);
-+ if (ret)
-+ goto error_irq_groups;
-+ pdev->msi_irq_groups = msi_irq_groups;
-
- return 0;
-
--out_unroll:
-- list_for_each_entry(entry, &pdev->msi_list, list) {
-- if (!count)
-- break;
-- kobject_del(&entry->kobj);
-- kobject_put(&entry->kobj);
-- count--;
-+error_irq_groups:
-+ kfree(msi_irq_groups);
-+error_irq_group:
-+ kfree(msi_irq_group);
-+error_attrs:
-+ count = 0;
-+ msi_attr = msi_attrs[count];
-+ while (msi_attr) {
-+ msi_dev_attr = container_of(msi_attr, struct device_attribute, attr);
-+ kfree(msi_attr->name);
-+ kfree(msi_dev_attr);
-+ ++count;
-+ msi_attr = msi_attrs[count];
- }
- return ret;
- }
-@@ -925,8 +945,6 @@ void pci_disable_msi(struct pci_dev *dev
-
- pci_msi_shutdown(dev);
- free_msi_irqs(dev);
-- kset_unregister(dev->msi_kset);
-- dev->msi_kset = NULL;
- }
- EXPORT_SYMBOL(pci_disable_msi);
-
-@@ -1023,8 +1041,6 @@ void pci_disable_msix(struct pci_dev *de
-
- pci_msix_shutdown(dev);
- free_msi_irqs(dev);
-- kset_unregister(dev->msi_kset);
-- dev->msi_kset = NULL;
- }
- EXPORT_SYMBOL(pci_disable_msix);
-
---- a/include/linux/pci.h
-+++ b/include/linux/pci.h
-@@ -351,7 +351,7 @@ struct pci_dev {
- struct bin_attribute *res_attr_wc[DEVICE_COUNT_RESOURCE]; /* sysfs file for WC mapping of resources */
- #ifdef CONFIG_PCI_MSI
- struct list_head msi_list;
-- struct kset *msi_kset;
-+ const struct attribute_group **msi_irq_groups;
- #endif
- struct pci_vpd *vpd;
- #ifdef CONFIG_PCI_ATS
diff --git a/series b/series
index 4ea145cd7e8ddd..bf7a2c07db01db 100644
--- a/series
+++ b/series
@@ -2,12 +2,7 @@ staging-rtl8812ae-add-realtek-8821-pci-wifi-driver.patch
staging-rtl8821ae-rc.c-fix-up-function-prototypes.patch
staging-rtl8821ae-removed-unused-functions-and-variables.patch
staging-rtl8821ae-add-todo-file.patch
-pci-msi-fix.patch
-usb-c67x00-remove-config_usb_debug-dependancy.patch
-usb-gadget-fix-up-some-comments-about-config_usb_debug.patch
-usb-core-remove-config_usb_debug-usage.patch
-watchdog-pcwd_usb-remove-config_usb_debug-usage.patch
staging-exfat-add-filesystem-to-drivers-staging-exfat.patch
staging-exfat-add-filesystem-to-the-build.patch
@@ -34,8 +29,7 @@ xen-disable-clock-timer-when-shutting-down.patch
# dev_groups to struct class work
-0001-Simulate-fake-Fn-key-on-PS-2-keyboards-w-o-one-eg.-C.patch
-
+simulate-fake-fn-key-on-ps-2-keyboards-w-o-one-eg.-chromebook-pixel.patch
#gregkh/gkh-version.patch
diff --git a/0001-Simulate-fake-Fn-key-on-PS-2-keyboards-w-o-one-eg.-C.patch b/simulate-fake-fn-key-on-ps-2-keyboards-w-o-one-eg.-chromebook-pixel.patch
index 8f3b191874c7d4..d9eb686afe021e 100644
--- a/0001-Simulate-fake-Fn-key-on-PS-2-keyboards-w-o-one-eg.-C.patch
+++ b/simulate-fake-fn-key-on-ps-2-keyboards-w-o-one-eg.-chromebook-pixel.patch
@@ -1,8 +1,7 @@
->From 2b68920c417303e3adb90631ed9a9cbf864c0a94 Mon Sep 17 00:00:00 2001
+From 2b68920c417303e3adb90631ed9a9cbf864c0a94 Mon Sep 17 00:00:00 2001
From: Dirk Hohndel <dirk@hohndel.org>
Date: Wed, 1 May 2013 11:23:28 -0700
-Subject: [PATCH 1/1] Simulate fake Fn key on PS/2 keyboards w/o one (eg.
- Chromebook Pixel)
+Subject: [PATCH 1/1] Simulate fake Fn key on PS/2 keyboards w/o one (eg. Chromebook Pixel)
This establishes a somewhat generic way to do this and implements a
specific solution for the Pixel where the right ALT key is redefined
diff --git a/staging-rtl8821ae-add-todo-file.patch b/staging-rtl8821ae-add-todo-file.patch
new file mode 100644
index 00000000000000..3128737db561f6
--- /dev/null
+++ b/staging-rtl8821ae-add-todo-file.patch
@@ -0,0 +1,27 @@
+From foo@baz Thu Jan 23 09:13:16 PST 2014
+Date: Thu, 23 Jan 2014 09:13:16 -0800
+To: Greg KH <gregkh@linuxfoundation.org>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: Staging: rtl8821ae: add TODO file
+
+List what needs to be done to this driver to get it merged to the
+"proper" part of the kernel tree.
+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/staging/rtl8821ae/TODO | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+--- /dev/null
++++ b/drivers/staging/rtl8821ae/TODO
+@@ -0,0 +1,10 @@
++Realtek 8821AE PCI wifi driver TODO:
++ - remove built-in btcoexist module when the "real" one gets upstream
++ - remove built-in rtlwifi code by porting driver to use the "real" one
++ in the drivers/net/ directory.
++ - fix up coding style issues
++
++Please send any patches for this driver to:
++ Greg Kroah-Hartman <gregkh@linuxfoundation.org>
++and the <devel@driverdev.osuosl.org> mailing list.
++
diff --git a/staging-rtl8821ae-rc.c-fix-up-function-prototypes.patch b/staging-rtl8821ae-rc.c-fix-up-function-prototypes.patch
new file mode 100644
index 00000000000000..4934c03d611360
--- /dev/null
+++ b/staging-rtl8821ae-rc.c-fix-up-function-prototypes.patch
@@ -0,0 +1,33 @@
+From foo@baz Thu Jan 23 09:08:14 PST 2014
+Date: Thu, 23 Jan 2014 09:08:14 -0800
+To: Greg KH <gregkh@linuxfoundation.org>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: [PATCH] Staging: rtl8821ae: rc.c: fix up function prototypes
+
+These function parameters are incorrect for the callbacks. Luckily the
+functions don't actually do anything, so the code still "works" just
+fine...
+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/staging/rtl8821ae/rc.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/staging/rtl8821ae/rc.c
++++ b/drivers/staging/rtl8821ae/rc.c
+@@ -228,6 +228,7 @@ static void rtl_tx_status(void *ppriv,
+
+ static void rtl_rate_init(void *ppriv,
+ struct ieee80211_supported_band *sband,
++ struct cfg80211_chan_def *chandef,
+ struct ieee80211_sta *sta, void *priv_sta)
+ {
+ }
+@@ -242,6 +243,7 @@ static void rtl_rate_update(void *ppriv,
+ #else
+ static void rtl_rate_update(void *ppriv,
+ struct ieee80211_supported_band *sband,
++ struct cfg80211_chan_def *chandef,
+ struct ieee80211_sta *sta, void *priv_sta,
+ u32 changed)
+ {
diff --git a/staging-rtl8821ae-removed-unused-functions-and-variables.patch b/staging-rtl8821ae-removed-unused-functions-and-variables.patch
new file mode 100644
index 00000000000000..6cdef8f293d5c4
--- /dev/null
+++ b/staging-rtl8821ae-removed-unused-functions-and-variables.patch
@@ -0,0 +1,491 @@
+From foo@baz Thu Jan 23 09:09:10 PST 2014
+Date: Thu, 23 Jan 2014 09:09:10 -0800
+To: Greg KH <gregkh@linuxfoundation.org>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: [PATCH] Staging: rtl8821ae: removed unused functions and variables
+
+Clean up a bunch of build warnings by removing functions and variables that
+aren't being used.
+
+
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/rtl8821ae/rtl8821ae/dm.c | 123 ----------------
+ drivers/staging/rtl8821ae/rtl8821ae/fw.c | 5
+ drivers/staging/rtl8821ae/rtl8821ae/phy.c | 228 ------------------------------
+ drivers/staging/rtl8821ae/rtl8821ae/trx.c | 1
+ 4 files changed, 3 insertions(+), 354 deletions(-)
+
+--- a/drivers/staging/rtl8821ae/rtl8821ae/dm.c
++++ b/drivers/staging/rtl8821ae/rtl8821ae/dm.c
+@@ -556,11 +556,6 @@ void rtl8821ae_dm_initialize_txpower_tra
+ }
+ }
+
+-static void rtl8821ae_dm_initialize_txpower_tracking(struct ieee80211_hw *hw)
+-{
+- rtl8821ae_dm_initialize_txpower_tracking_thermalmeter(hw);
+-}
+-
+ static void rtl8821ae_dm_init_dynamic_bb_powersaving(struct ieee80211_hw *hw)
+ {
+ dm_pstable.pre_ccastate = CCA_MAX;
+@@ -775,7 +770,6 @@ void rtl8812ae_dm_rssi_dump_to_register
+ static void rtl8821ae_dm_check_rssi_monitor(struct ieee80211_hw *hw)
+ {
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
+- struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
+ struct rtl_sta_info *drv_priv;
+ u8 h2c_parameter[3] = { 0 };
+ long tmp_entry_max_pwdb = 0, tmp_entry_min_pwdb = 0xff;
+@@ -1131,12 +1125,6 @@ void rtl8812ae_dm_check_txpower_tracking
+ }
+ }
+
+-static void rtl8821ae_dm_dynamic_txpower(struct ieee80211_hw *hw)
+-{
+- /* 8723BE does not support ODM_BB_DYNAMIC_TXPWR*/
+- return;
+-}
+-
+ static void rtl8821ae_dm_iq_calibrate(struct ieee80211_hw *hw)
+ {
+ struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
+@@ -1166,107 +1154,6 @@ static void rtl8821ae_dm_iq_calibrate(st
+ }
+
+
+-static void rtl8821ae_set_iqk_matrix(struct ieee80211_hw *hw,
+- u8 ofdm_index,
+- u8 rfpath,
+- long iqk_result_x,
+- long iqk_result_y)
+-{
+- long ele_a = 0, ele_d, ele_c = 0, value32;
+-
+- if (ofdm_index >= OFDM_TABLE_SIZE)
+- ofdm_index = OFDM_TABLE_SIZE - 1;
+- else if (ofdm_index < 0)
+- ofdm_index = 0;
+-
+- ele_d = (ofdmswing_table[ofdm_index] & 0xFFC00000)>>22;
+-
+- if (iqk_result_x != 0){
+- if ((iqk_result_x & 0x00000200) != 0)
+- iqk_result_x = iqk_result_x | 0xFFFFFC00;
+- ele_a = ((iqk_result_x * ele_d)>>8)&0x000003FF;
+-
+- if ((iqk_result_y & 0x00000200) != 0)
+- iqk_result_y = iqk_result_y | 0xFFFFFC00;
+- ele_c = ((iqk_result_y * ele_d)>>8)&0x000003FF;
+-
+- switch (rfpath){
+- case RF90_PATH_A:
+- value32 = (ele_d << 22)|((ele_c & 0x3F)<<16) | ele_a;
+- rtl_set_bbreg(hw, ROFDM0_XATXIQIMBALANCE, MASKDWORD, value32);
+- value32 = (ele_c & 0x000003C0) >> 6;
+- rtl_set_bbreg(hw, ROFDM0_XCTXAFE, MASKH4BITS, value32);
+- value32 = ((iqk_result_x * ele_d) >> 7) & 0x01;
+- rtl_set_bbreg(hw, ROFDM0_ECCATHRESHOLD, BIT(24), value32);
+- break;
+- default:
+- break;
+- }
+- } else {
+- switch (rfpath){
+- case RF90_PATH_A:
+- rtl_set_bbreg(hw, ROFDM0_XATXIQIMBALANCE, MASKDWORD, ofdmswing_table[ofdm_index]);
+- rtl_set_bbreg(hw, ROFDM0_XCTXAFE, MASKH4BITS, 0x00);
+- rtl_set_bbreg(hw, ROFDM0_ECCATHRESHOLD, BIT(24), 0x00);
+- break;
+- default:
+- break;
+- }
+- }
+-}
+-
+-
+-static void rtl8821ae_dm_tx_power_track_set_power(struct ieee80211_hw *hw,
+- enum pwr_track_control_method method,
+- u8 rfpath,
+- u8 channel_mapped_index)
+-{
+- struct rtl_priv *rtlpriv = rtl_priv(hw);
+- struct rtl_phy *rtlphy = &(rtlpriv->phy);
+- struct rtl_dm *rtldm = rtl_dm(rtl_priv(hw));
+-
+- if (method == TXAGC) {
+- rtl8821ae_phy_set_txpower_level(hw,rtlphy->current_channel);
+- } else if (method == BBSWING) {
+- if (rtldm->bb_swing_idx_cck >= CCK_TABLE_SIZE)
+- rtldm->bb_swing_idx_cck = CCK_TABLE_SIZE-1;
+- else if (rtldm->bb_swing_idx_cck < 0)
+- rtldm->bb_swing_idx_cck = 0;
+-
+- if (!rtldm->b_cck_inch14) {
+- rtl_write_byte(rtlpriv, 0xa22, cckswing_table_ch1ch13[rtldm->bb_swing_idx_cck][0]);
+- rtl_write_byte(rtlpriv, 0xa23, cckswing_table_ch1ch13[rtldm->bb_swing_idx_cck][1]);
+- rtl_write_byte(rtlpriv, 0xa24, cckswing_table_ch1ch13[rtldm->bb_swing_idx_cck][2]);
+- rtl_write_byte(rtlpriv, 0xa25, cckswing_table_ch1ch13[rtldm->bb_swing_idx_cck][3]);
+- rtl_write_byte(rtlpriv, 0xa26, cckswing_table_ch1ch13[rtldm->bb_swing_idx_cck][4]);
+- rtl_write_byte(rtlpriv, 0xa27, cckswing_table_ch1ch13[rtldm->bb_swing_idx_cck][5]);
+- rtl_write_byte(rtlpriv, 0xa28, cckswing_table_ch1ch13[rtldm->bb_swing_idx_cck][6]);
+- rtl_write_byte(rtlpriv, 0xa29, cckswing_table_ch1ch13[rtldm->bb_swing_idx_cck][7]);
+- } else{
+- rtl_write_byte(rtlpriv, 0xa22, cckswing_table_ch14[rtldm->bb_swing_idx_cck][0]);
+- rtl_write_byte(rtlpriv, 0xa23, cckswing_table_ch14[rtldm->bb_swing_idx_cck][1]);
+- rtl_write_byte(rtlpriv, 0xa24, cckswing_table_ch14[rtldm->bb_swing_idx_cck][2]);
+- rtl_write_byte(rtlpriv, 0xa25, cckswing_table_ch14[rtldm->bb_swing_idx_cck][3]);
+- rtl_write_byte(rtlpriv, 0xa26, cckswing_table_ch14[rtldm->bb_swing_idx_cck][4]);
+- rtl_write_byte(rtlpriv, 0xa27, cckswing_table_ch14[rtldm->bb_swing_idx_cck][5]);
+- rtl_write_byte(rtlpriv, 0xa28, cckswing_table_ch14[rtldm->bb_swing_idx_cck][6]);
+- rtl_write_byte(rtlpriv, 0xa29, cckswing_table_ch14[rtldm->bb_swing_idx_cck][7]);
+- }
+-
+- if (rfpath == RF90_PATH_A){
+- rtl8821ae_set_iqk_matrix(hw, rtldm->bb_swing_idx_ofdm[rfpath], rfpath,
+- rtlphy->iqk_matrix_regsetting[channel_mapped_index].value[0][0],
+- rtlphy->iqk_matrix_regsetting[channel_mapped_index].value[0][1]);
+- } else if (rfpath == RF90_PATH_B) {
+- rtl8821ae_set_iqk_matrix(hw, rtldm->bb_swing_idx_ofdm[rfpath], rfpath,
+- rtlphy->iqk_matrix_regsetting[channel_mapped_index].value[0][4],
+- rtlphy->iqk_matrix_regsetting[channel_mapped_index].value[0][5]);
+- }
+- } else {
+- return;
+- }
+-}
+-
+ void rtl8812ae_get_delta_swing_table(
+ struct ieee80211_hw *hw,
+ u8 **temperature_up_a,
+@@ -1323,8 +1210,6 @@ void rtl8812ae_phy_lccalibrate(
+ struct ieee80211_hw *hw)
+ {
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
+- bool b_start_cont_tx = false, b_single_tone = false, b_carrier_suppression = false;
+-
+
+ RT_TRACE(COMP_POWER_TRACKING, DBG_LOUD, ("===> rtl8812ae_phy_lccalibrate\n"));
+
+@@ -1455,8 +1340,6 @@ void rtl8812ae_dm_txpwr_track_set_pwr(st
+ u8 pwr_tracking_limit = 26; /*+1.0dB*/
+ u8 tx_rate = 0xFF;
+ char final_ofdm_swing_index = 0;
+- char final_cck_swing_index = 0;
+- u8 i = 0;
+
+ if(rtldm->tx_rate != 0xFF)
+ tx_rate = rtl8812ae_hw_rate_to_mrate(hw, rtldm->tx_rate);
+@@ -2083,8 +1966,6 @@ void rtl8821ae_phy_lccalibrate(
+ struct ieee80211_hw *hw)
+ {
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
+- bool b_start_cont_tx = false, b_single_tone = false, b_carrier_suppression = false;
+-
+
+ RT_TRACE(COMP_POWER_TRACKING, DBG_LOUD, ("===> rtl8812ae_phy_lccalibrate\n"));
+
+@@ -2119,8 +2000,6 @@ void rtl8821ae_dm_txpwr_track_set_pwr(st
+ u8 pwr_tracking_limit = 26; /*+1.0dB*/
+ u8 tx_rate = 0xFF;
+ char final_ofdm_swing_index = 0;
+- char final_cck_swing_index = 0;
+- u8 i = 0;
+
+ if(rtldm->tx_rate != 0xFF)
+ tx_rate = rtl8812ae_hw_rate_to_mrate(hw, rtldm->tx_rate);
+@@ -2806,7 +2685,7 @@ static void rtl8821ae_dm_check_edca_turb
+ rtlpriv->dm.bcurrent_turbo_edca = false;
+ }
+
+-dm_CheckEdcaTurbo_EXIT:
++/* dm_CheckEdcaTurbo_EXIT: */
+ rtlpriv->dm.bis_any_nonbepkts = false;
+ rtldm->last_tx_ok_cnt = rtlpriv->stats.txbytesunicast;
+ rtldm->last_rx_ok_cnt = rtlpriv->stats.rxbytesunicast;
+--- a/drivers/staging/rtl8821ae/rtl8821ae/fw.c
++++ b/drivers/staging/rtl8821ae/rtl8821ae/fw.c
+@@ -1289,13 +1289,8 @@ void rtl8812ae_c2h_ra_report_handler(
+ u8 cmd_len
+ )
+ {
+- struct rtl_priv *rtlpriv = rtl_priv(hw);
+ struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
+-
+ u8 rate = cmd_buf[0] & 0x3F;
+- u8 mac_id = cmd_buf[1];
+- bool b_ldpc = cmd_buf[2] & BIT(0);
+- bool b_tx_bf = (cmd_buf[2] & BIT(1)) >> 1;
+
+ rtlhal->current_ra_rate= rtl8812ae_hw_rate_to_mrate(hw, rate);
+
+--- a/drivers/staging/rtl8821ae/rtl8821ae/phy.c
++++ b/drivers/staging/rtl8821ae/rtl8821ae/phy.c
+@@ -3088,40 +3088,6 @@ u8 rtl8821ae_phy_sw_chnl(struct ieee8021
+ return 1;
+ }
+
+-static u8 _rtl8821ae_phy_path_a_iqk(struct ieee80211_hw *hw, bool config_pathb)
+-{
+- u32 reg_eac, reg_e94, reg_e9c, reg_ea4;
+- u8 result = 0x00;
+-
+- rtl_set_bbreg(hw, 0xe30, MASKDWORD, 0x10008c1c);
+- rtl_set_bbreg(hw, 0xe34, MASKDWORD, 0x30008c1c);
+- rtl_set_bbreg(hw, 0xe38, MASKDWORD, 0x8214032a);
+- rtl_set_bbreg(hw, 0xe3c, MASKDWORD, 0x28160000);
+-
+- rtl_set_bbreg(hw, 0xe4c, MASKDWORD, 0x00462911);
+- rtl_set_bbreg(hw, 0xe48, MASKDWORD, 0xf9000000);
+- rtl_set_bbreg(hw, 0xe48, MASKDWORD, 0xf8000000);
+-
+- mdelay(IQK_DELAY_TIME);
+-
+- reg_eac = rtl_get_bbreg(hw, 0xeac, MASKDWORD);
+- reg_e94 = rtl_get_bbreg(hw, 0xe94, MASKDWORD);
+- reg_e9c = rtl_get_bbreg(hw, 0xe9c, MASKDWORD);
+- reg_ea4 = rtl_get_bbreg(hw, 0xea4, MASKDWORD);
+-
+- if (!(reg_eac & BIT(28)) &&
+- (((reg_e94 & 0x03FF0000) >> 16) != 0x142) &&
+- (((reg_e9c & 0x03FF0000) >> 16) != 0x42))
+- result |= 0x01;
+- else
+- return result;
+-/*
+- if (!(reg_eac & BIT(27)) &&
+- (((reg_ea4 & 0x03FF0000) >> 16) != 0x132) &&
+- (((reg_eac & 0x03FF0000) >> 16) != 0x36))
+- result |= 0x02;*/
+- return result;
+-}
+ #if 0
+ static u8 _rtl8821ae_phy_path_b_iqk(struct ieee80211_hw *hw)
+ {
+@@ -3234,196 +3200,6 @@ static u8 _rtl8821ae_phy_path_a_rx_iqk(s
+ return result;
+ }
+ #endif
+-static void _rtl8821ae_phy_path_a_fill_iqk_matrix(struct ieee80211_hw *hw,
+- bool b_iqk_ok, long result[][8],
+- u8 final_candidate, bool btxonly)
+-{
+- u32 oldval_0, x, tx0_a, reg;
+- long y, tx0_c;
+-
+- if (final_candidate == 0xFF) {
+- return;
+- } else if (b_iqk_ok) {
+- oldval_0 = (rtl_get_bbreg(hw, ROFDM0_XATXIQIMBALANCE,
+- MASKDWORD) >> 22) & 0x3FF;
+- x = result[final_candidate][0];
+- if ((x & 0x00000200) != 0)
+- x = x | 0xFFFFFC00;
+- tx0_a = (x * oldval_0) >> 8;
+- rtl_set_bbreg(hw, ROFDM0_XATXIQIMBALANCE, 0x3FF, tx0_a);
+- rtl_set_bbreg(hw, ROFDM0_ECCATHRESHOLD, BIT(31),
+- ((x * oldval_0 >> 7) & 0x1));
+- y = result[final_candidate][1];
+- if ((y & 0x00000200) != 0)
+- y = y | 0xFFFFFC00;
+- tx0_c = (y * oldval_0) >> 8;
+- rtl_set_bbreg(hw, ROFDM0_XCTXAFE, 0xF0000000,
+- ((tx0_c & 0x3C0) >> 6));
+- rtl_set_bbreg(hw, ROFDM0_XATXIQIMBALANCE, 0x003F0000,
+- (tx0_c & 0x3F));
+- rtl_set_bbreg(hw, ROFDM0_ECCATHRESHOLD, BIT(29),
+- ((y * oldval_0 >> 7) & 0x1));
+- if (btxonly)
+- return;
+- reg = result[final_candidate][2];
+- rtl_set_bbreg(hw, ROFDM0_XARXIQIMBALANCE, 0x3FF, reg);
+- reg = result[final_candidate][3] & 0x3F;
+- rtl_set_bbreg(hw, ROFDM0_XARXIQIMBALANCE, 0xFC00, reg);
+- reg = (result[final_candidate][3] >> 6) & 0xF;
+- rtl_set_bbreg(hw, 0xca0, 0xF0000000, reg);
+- }
+-}
+-
+-
+-static void _rtl8821ae_phy_save_adda_registers(struct ieee80211_hw *hw,
+- u32 *addareg, u32 *addabackup,
+- u32 registernum)
+-{
+- u32 i;
+-
+- for (i = 0; i < registernum; i++)
+- addabackup[i] = rtl_get_bbreg(hw, addareg[i], MASKDWORD);
+-}
+-
+-static void _rtl8821ae_phy_save_mac_registers(struct ieee80211_hw *hw,
+- u32 *macreg, u32 *macbackup)
+-{
+- struct rtl_priv *rtlpriv = rtl_priv(hw);
+- u32 i;
+-
+- for (i = 0; i < (IQK_MAC_REG_NUM - 1); i++)
+- macbackup[i] = rtl_read_byte(rtlpriv, macreg[i]);
+- macbackup[i] = rtl_read_dword(rtlpriv, macreg[i]);
+-}
+-
+-static void _rtl8821ae_phy_reload_adda_registers(struct ieee80211_hw *hw,
+- u32 *addareg, u32 *addabackup,
+- u32 regiesternum)
+-{
+- u32 i;
+-
+- for (i = 0; i < regiesternum; i++)
+- rtl_set_bbreg(hw, addareg[i], MASKDWORD, addabackup[i]);
+-}
+-
+-static void _rtl8821ae_phy_reload_mac_registers(struct ieee80211_hw *hw,
+- u32 *macreg, u32 *macbackup)
+-{
+- struct rtl_priv *rtlpriv = rtl_priv(hw);
+- u32 i;
+-
+- for (i = 0; i < (IQK_MAC_REG_NUM - 1); i++)
+- rtl_write_byte(rtlpriv, macreg[i], (u8) macbackup[i]);
+- rtl_write_dword(rtlpriv, macreg[i], macbackup[i]);
+-}
+-
+-static void _rtl8821ae_phy_path_adda_on(struct ieee80211_hw *hw,
+- u32 *addareg, bool is_patha_on, bool is2t)
+-{
+- u32 pathOn;
+- u32 i;
+-
+- pathOn = is_patha_on ? 0x04db25a4 : 0x0b1b25a4;
+- if (false == is2t) {
+- pathOn = 0x0bdb25a0;
+- rtl_set_bbreg(hw, addareg[0], MASKDWORD, 0x0b1b25a0);
+- } else {
+- rtl_set_bbreg(hw, addareg[0], MASKDWORD, pathOn);
+- }
+-
+- for (i = 1; i < IQK_ADDA_REG_NUM; i++)
+- rtl_set_bbreg(hw, addareg[i], MASKDWORD, pathOn);
+-}
+-
+-static void _rtl8821ae_phy_mac_setting_calibration(struct ieee80211_hw *hw,
+- u32 *macreg, u32 *macbackup)
+-{
+- struct rtl_priv *rtlpriv = rtl_priv(hw);
+- u32 i = 0;
+-
+- rtl_write_byte(rtlpriv, macreg[i], 0x3F);
+-
+- for (i = 1; i < (IQK_MAC_REG_NUM - 1); i++)
+- rtl_write_byte(rtlpriv, macreg[i],
+- (u8) (macbackup[i] & (~BIT(3))));
+- rtl_write_byte(rtlpriv, macreg[i], (u8) (macbackup[i] & (~BIT(5))));
+-}
+-
+-static void _rtl8821ae_phy_path_a_standby(struct ieee80211_hw *hw)
+-{
+- rtl_set_bbreg(hw, 0xe28, MASKDWORD, 0x0);
+- rtl_set_bbreg(hw, 0x840, MASKDWORD, 0x00010000);
+- rtl_set_bbreg(hw, 0xe28, MASKDWORD, 0x80800000);
+-}
+-
+-static void _rtl8821ae_phy_pi_mode_switch(struct ieee80211_hw *hw, bool pi_mode)
+-{
+- u32 mode;
+-
+- mode = pi_mode ? 0x01000100 : 0x01000000;
+- rtl_set_bbreg(hw, 0x820, MASKDWORD, mode);
+- rtl_set_bbreg(hw, 0x828, MASKDWORD, mode);
+-}
+-
+-static bool _rtl8821ae_phy_simularity_compare(struct ieee80211_hw *hw,
+- long result[][8], u8 c1, u8 c2)
+-{
+- u32 i, j, diff, simularity_bitmap, bound;
+- //struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
+-
+- u8 final_candidate[2] = { 0xFF, 0xFF };
+- bool bresult = true, is2t = true;//= IS_92C_SERIAL(rtlhal->version);
+-
+- if (is2t)
+- bound = 8;
+- else
+- bound = 4;
+-
+- simularity_bitmap = 0;
+-
+- for (i = 0; i < bound; i++) {
+- diff = (result[c1][i] > result[c2][i]) ?
+- (result[c1][i] - result[c2][i]) :
+- (result[c2][i] - result[c1][i]);
+-
+- if (diff > MAX_TOLERANCE) {
+- if ((i == 2 || i == 6) && !simularity_bitmap) {
+- if (result[c1][i] + result[c1][i + 1] == 0)
+- final_candidate[(i / 4)] = c2;
+- else if (result[c2][i] + result[c2][i + 1] == 0)
+- final_candidate[(i / 4)] = c1;
+- else
+- simularity_bitmap = simularity_bitmap |
+- (1 << i);
+- } else
+- simularity_bitmap =
+- simularity_bitmap | (1 << i);
+- }
+- }
+-
+- if (simularity_bitmap == 0) {
+- for (i = 0; i < (bound / 4); i++) {
+- if (final_candidate[i] != 0xFF) {
+- for (j = i * 4; j < (i + 1) * 4 - 2; j++)
+- result[3][j] =
+- result[final_candidate[i]][j];
+- bresult = false;
+- }
+- }
+- return bresult;
+- } else if (!(simularity_bitmap & 0x0F)) {
+- for (i = 0; i < 4; i++)
+- result[3][i] = result[c1][i];
+- return false;
+- } else if (!(simularity_bitmap & 0xF0) && is2t) {
+- for (i = 4; i < 8; i++)
+- result[3][i] = result[c1][i];
+- return false;
+- } else {
+- return false;
+- }
+-
+-}
+
+ u8 _rtl8812ae_get_right_chnl_place_for_iqk(u8 chnl)
+ {
+@@ -3640,7 +3416,7 @@ void _rtl8812ae_iqk_tx(
+ struct rtl_phy *rtlphy = &(rtlpriv->phy);
+ struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
+
+- u8 delay_count, cal = 0;
++ u8 delay_count;
+ u8 cal0_retry, cal1_retry;
+ u8 tx0_average = 0, tx1_average = 0, rx0_average = 0, rx1_average = 0;
+ int tx0_x = 0, tx0_y = 0, rx0_x = 0, rx0_y = 0;
+@@ -3651,7 +3427,7 @@ void _rtl8812ae_iqk_tx(
+ bool iqk0_ready = false, tx0_finish = false, rx0_finish = false;
+ bool tx1iqkok = false, rx1iqkok = false, tx1_fail = true, rx1_fail;
+ bool iqk1_ready = false, tx1_finish = false, rx1_finish = false, vdf_enable = false;
+- int i, k, vdf_y[3], vdf_x[3], tx_dt[3], rx_dt[3], ii, dx = 0, dy = 0, dt = 0;
++ int i, tx_dt[3], rx_dt[3], ii, dx = 0, dy = 0;
+
+ RT_TRACE(COMP_IQK, DBG_LOUD,
+ ("BandWidth = %d.\n",
+--- a/drivers/staging/rtl8821ae/rtl8821ae/trx.c
++++ b/drivers/staging/rtl8821ae/rtl8821ae/trx.c
+@@ -538,7 +538,6 @@ bool rtl8821ae_rx_query_desc(struct ieee
+ u8 *pdesc, struct sk_buff *skb)
+ {
+ struct rtl_priv *rtlpriv = rtl_priv(hw);
+- struct rtl_dm *rtldm = rtl_dm(rtl_priv(hw));
+ struct rx_fwinfo_8821ae *p_drvinfo;
+ struct ieee80211_hdr *hdr;
+
diff --git a/usb-c67x00-remove-config_usb_debug-dependancy.patch b/usb-c67x00-remove-config_usb_debug-dependancy.patch
deleted file mode 100644
index 362e6af2c6b5cb..00000000000000
--- a/usb-c67x00-remove-config_usb_debug-dependancy.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From foo@baz Thu Dec 19 15:32:59 PST 2013
-Date: Thu, 19 Dec 2013 15:32:59 -0800
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: [PATCH] USB: c67x00: remove CONFIG_USB_DEBUG dependancy
-
-This removes the usage of CONFIG_USB_DEBUG in the c67x00 driver. There
-was only one place, where the TD was dumped to the kernel log, and that
-was using the dynamic debug infrastructure already, with the exception
-of the call to print_hex_dump(). So move everything to the dynamic
-debug infrastructure, including one odd printk(KERN_DEBUG...) line that
-looks like it was forgotten about a long time ago.
-
-
-Cc: Peter Korsgaard <jacmet@sunsite.dk>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- drivers/usb/c67x00/Makefile | 2 --
- drivers/usb/c67x00/c67x00-sched.c | 15 +++------------
- 2 files changed, 3 insertions(+), 14 deletions(-)
-
---- a/drivers/usb/c67x00/Makefile
-+++ b/drivers/usb/c67x00/Makefile
-@@ -2,8 +2,6 @@
- # Makefile for Cypress C67X00 USB Controller
- #
-
--ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG
--
- obj-$(CONFIG_USB_C67X00_HCD) += c67x00.o
-
- c67x00-y := c67x00-drv.o c67x00-ll-hpi.o c67x00-hcd.o c67x00-sched.o
---- a/drivers/usb/c67x00/c67x00-sched.c
-+++ b/drivers/usb/c67x00/c67x00-sched.c
-@@ -144,8 +144,6 @@ struct c67x00_urb_priv {
-
- /* -------------------------------------------------------------------------- */
-
--#ifdef DEBUG
--
- /**
- * dbg_td - Dump the contents of the TD
- */
-@@ -166,16 +164,8 @@ static void dbg_td(struct c67x00_hcd *c6
- dev_dbg(dev, "retry_cnt: 0x%02x\n", td->retry_cnt);
- dev_dbg(dev, "residue: 0x%02x\n", td->residue);
- dev_dbg(dev, "next_td_addr: 0x%04x\n", td_next_td_addr(td));
-- dev_dbg(dev, "data:");
-- print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 16, 1,
-- td->data, td_length(td), 1);
-+ dev_dbg(dev, "data: %*ph\n", td_length(td), td->data);
- }
--#else /* DEBUG */
--
--static inline void
--dbg_td(struct c67x00_hcd *c67x00, struct c67x00_td *td, char *msg) { }
--
--#endif /* DEBUG */
-
- /* -------------------------------------------------------------------------- */
- /* Helper functions */
-@@ -780,7 +770,8 @@ static int c67x00_add_iso_urb(struct c67
- ret = c67x00_create_td(c67x00, urb, td_buf, len, pid, 0,
- urbp->cnt);
- if (ret) {
-- printk(KERN_DEBUG "create failed: %d\n", ret);
-+ dev_dbg(c67x00_hcd_dev(c67x00), "create failed: %d\n",
-+ ret);
- urb->iso_frame_desc[urbp->cnt].actual_length = 0;
- urb->iso_frame_desc[urbp->cnt].status = ret;
- if (urbp->cnt + 1 == urb->number_of_packets)
diff --git a/usb-core-remove-config_usb_debug-usage.patch b/usb-core-remove-config_usb_debug-usage.patch
deleted file mode 100644
index bebe95f9bdbf0c..00000000000000
--- a/usb-core-remove-config_usb_debug-usage.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From foo@baz Thu Dec 19 15:37:51 PST 2013
-Date: Thu, 19 Dec 2013 15:37:51 -0800
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: [PATCH] USB: core: remove CONFIG_USB_DEBUG usage
-
-CONFIG_USB_DEBUG is going away, so remove the few places in the USB core
-that relied on them.
-
-This means that we always now do the "debug" checks for every urb
-submitted, which is a good idea, as who knows how many driver bugs we
-have been ignoring when people forget to enable this option. Also, with
-the overall speed of USB, doing these extra checks should not cause any
-additional overhead.
-
-Also, no longer announce all devices being added to the system if
-CONFIG_USB_DEBUG is enabled, as it's not going to be around much longer.
-
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
-
----
- drivers/usb/core/Makefile | 2 --
- drivers/usb/core/hub.c | 7 -------
- drivers/usb/core/urb.c | 16 +++++++---------
- 3 files changed, 7 insertions(+), 18 deletions(-)
-
---- a/drivers/usb/core/Makefile
-+++ b/drivers/usb/core/Makefile
-@@ -2,8 +2,6 @@
- # Makefile for USB Core files and filesystem
- #
-
--ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG
--
- usbcore-y := usb.o hub.o hcd.o urb.o message.o driver.o
- usbcore-y += config.o file.o buffer.o sysfs.o endpoint.o
- usbcore-y += devio.o notify.o generic.o quirks.o devices.o
---- a/drivers/usb/core/hub.c
-+++ b/drivers/usb/core/hub.c
-@@ -33,13 +33,6 @@
-
- #include "hub.h"
-
--/* if we are in debug mode, always announce new devices */
--#ifdef DEBUG
--#ifndef CONFIG_USB_ANNOUNCE_NEW_DEVICES
--#define CONFIG_USB_ANNOUNCE_NEW_DEVICES
--#endif
--#endif
--
- #define USB_VENDOR_GENESYS_LOGIC 0x05e3
- #define HUB_QUIRK_CHECK_PORT_AUTOSUSPEND 0x01
-
---- a/drivers/usb/core/urb.c
-+++ b/drivers/usb/core/urb.c
-@@ -325,10 +325,14 @@ EXPORT_SYMBOL_GPL(usb_unanchor_urb);
- */
- int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
- {
-+ static int pipetypes[4] = {
-+ PIPE_CONTROL, PIPE_ISOCHRONOUS, PIPE_BULK, PIPE_INTERRUPT
-+ };
- int xfertype, max;
- struct usb_device *dev;
- struct usb_host_endpoint *ep;
- int is_out;
-+ unsigned int allowed;
-
- if (!urb || !urb->complete)
- return -EINVAL;
-@@ -436,15 +440,10 @@ int usb_submit_urb(struct urb *urb, gfp_
- if (urb->transfer_buffer_length > INT_MAX)
- return -EMSGSIZE;
-
--#ifdef DEBUG
-- /* stuff that drivers shouldn't do, but which shouldn't
-+ /*
-+ * stuff that drivers shouldn't do, but which shouldn't
- * cause problems in HCDs if they get it wrong.
- */
-- {
-- unsigned int allowed;
-- static int pipetypes[4] = {
-- PIPE_CONTROL, PIPE_ISOCHRONOUS, PIPE_BULK, PIPE_INTERRUPT
-- };
-
- /* Check that the pipe's type matches the endpoint's type */
- if (usb_pipetype(urb->pipe) != pipetypes[xfertype])
-@@ -476,8 +475,7 @@ int usb_submit_urb(struct urb *urb, gfp_
- if (allowed != urb->transfer_flags)
- dev_WARN(&dev->dev, "BOGUS urb flags, %x --> %x\n",
- urb->transfer_flags, allowed);
-- }
--#endif
-+
- /*
- * Force periodic transfer intervals to be legal values that are
- * a power of two (so HCDs don't need to).
diff --git a/usb-gadget-fix-up-some-comments-about-config_usb_debug.patch b/usb-gadget-fix-up-some-comments-about-config_usb_debug.patch
deleted file mode 100644
index fdc75251c067b3..00000000000000
--- a/usb-gadget-fix-up-some-comments-about-config_usb_debug.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From foo@baz Thu Dec 19 15:36:20 PST 2013
-Date: Thu, 19 Dec 2013 15:36:20 -0800
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: [PATCH] USB: gadget: fix up some comments about CONFIG_USB_DEBUG
-
-These two gadget drivers said that their #endif was for
-CONFIG_USB_DEBUG, but they really were not, so fix them up to be
-correct.
-
-Cc: Felipe Balbi <balbi@ti.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- drivers/usb/gadget/acm_ms.c | 2 +-
- drivers/usb/gadget/multi.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/usb/gadget/acm_ms.c
-+++ b/drivers/usb/gadget/acm_ms.c
-@@ -107,7 +107,7 @@ static unsigned int fsg_num_buffers = CO
- */
- #define fsg_num_buffers CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS
-
--#endif /* CONFIG_USB_DEBUG */
-+#endif /* CONFIG_USB_GADGET_DEBUG_FILES */
-
- FSG_MODULE_PARAMETERS(/* no prefix */, fsg_mod_data);
-
---- a/drivers/usb/gadget/multi.c
-+++ b/drivers/usb/gadget/multi.c
-@@ -134,7 +134,7 @@ static unsigned int fsg_num_buffers = CO
- */
- #define fsg_num_buffers CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS
-
--#endif /* CONFIG_USB_DEBUG */
-+#endif /* CONFIG_USB_GADGET_DEBUG_FILES */
-
- FSG_MODULE_PARAMETERS(/* no prefix */, fsg_mod_data);
-
diff --git a/watchdog-pcwd_usb-remove-config_usb_debug-usage.patch b/watchdog-pcwd_usb-remove-config_usb_debug-usage.patch
deleted file mode 100644
index 334dd23d2c4156..00000000000000
--- a/watchdog-pcwd_usb-remove-config_usb_debug-usage.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From foo@baz Thu Dec 19 15:30:19 PST 2013
-Date: Thu, 19 Dec 2013 15:30:19 -0800
-To: Greg KH <gregkh@linuxfoundation.org>
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Subject: [PATCH] Watchdog: pcwd_usb: remove CONFIG_USB_DEBUG usage
-
-CONFIG_USB_DEBUG is going away, and all of the other USB drivers no
-longer rely on "debug" module parameters for debugging lines, so move
-the pcwd_usb driver to use the dynamic debug infrastructure to be more
-in line with the rest of the kernel.
-
-
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Cc: Wim Van Sebroeck <wim@iguana.be>
-Cc: <linux-watchdog@vger.kernel.org>
-
----
- drivers/watchdog/pcwd_usb.c | 40 +++++++++++-----------------------------
- 1 file changed, 11 insertions(+), 29 deletions(-)
-
---- a/drivers/watchdog/pcwd_usb.c
-+++ b/drivers/watchdog/pcwd_usb.c
-@@ -44,23 +44,6 @@
- #include <linux/hid.h> /* For HID_REQ_SET_REPORT & HID_DT_REPORT */
- #include <linux/uaccess.h> /* For copy_to_user/put_user/... */
-
--#ifdef CONFIG_USB_DEBUG
--static int debug = 1;
--#else
--static int debug;
--#endif
--
--/* Use our own dbg macro */
--
--#undef dbg
--#ifndef DEBUG
--#define DEBUG
--#endif
--#define dbg(format, ...) \
--do { \
-- if (debug) \
-- pr_debug(format "\n", ##__VA_ARGS__); \
--} while (0)
-
- /* Module and Version Information */
- #define DRIVER_VERSION "1.02"
-@@ -73,10 +56,6 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
- MODULE_DESCRIPTION(DRIVER_DESC);
- MODULE_LICENSE(DRIVER_LICENSE);
-
--/* Module Parameters */
--module_param(debug, int, 0);
--MODULE_PARM_DESC(debug, "Debug enabled or not");
--
- #define WATCHDOG_HEARTBEAT 0 /* default heartbeat =
- delay-time from dip-switches */
- static int heartbeat = WATCHDOG_HEARTBEAT;
-@@ -193,6 +172,7 @@ static void usb_pcwd_intr_done(struct ur
- struct usb_pcwd_private *usb_pcwd =
- (struct usb_pcwd_private *)urb->context;
- unsigned char *data = usb_pcwd->intr_buffer;
-+ struct device *dev = &usb_pcwd->interface->dev;
- int retval;
-
- switch (urb->status) {
-@@ -202,17 +182,17 @@ static void usb_pcwd_intr_done(struct ur
- case -ENOENT:
- case -ESHUTDOWN:
- /* this urb is terminated, clean up */
-- dbg("%s - urb shutting down with status: %d", __func__,
-- urb->status);
-+ dev_dbg(dev, "%s - urb shutting down with status: %d",
-+ __func__, urb->status);
- return;
- /* -EPIPE: should clear the halt */
- default: /* error */
-- dbg("%s - nonzero urb status received: %d", __func__,
-- urb->status);
-+ dev_dbg(dev, "%s - nonzero urb status received: %d",
-+ __func__, urb->status);
- goto resubmit;
- }
-
-- dbg("received following data cmd=0x%02x msb=0x%02x lsb=0x%02x",
-+ dev_dbg(dev, "received following data cmd=0x%02x msb=0x%02x lsb=0x%02x",
- data[0], data[1], data[2]);
-
- usb_pcwd->cmd_command = data[0];
-@@ -251,7 +231,8 @@ static int usb_pcwd_send_command(struct
- buf[2] = *lsb; /* Byte 2 = Data LSB */
- buf[3] = buf[4] = buf[5] = 0; /* All other bytes not used */
-
-- dbg("sending following data cmd=0x%02x msb=0x%02x lsb=0x%02x",
-+ dev_dbg(&usb_pcwd->interface->dev,
-+ "sending following data cmd=0x%02x msb=0x%02x lsb=0x%02x",
- buf[0], buf[1], buf[2]);
-
- atomic_set(&usb_pcwd->cmd_received, 0);
-@@ -260,8 +241,9 @@ static int usb_pcwd_send_command(struct
- HID_REQ_SET_REPORT, HID_DT_REPORT,
- 0x0200, usb_pcwd->interface_number, buf, 6,
- USB_COMMAND_TIMEOUT) != 6) {
-- dbg("usb_pcwd_send_command: error in usb_control_msg for "
-- "cmd 0x%x 0x%x 0x%x\n", cmd, *msb, *lsb);
-+ dev_dbg(&usb_pcwd->interface->dev,
-+ "usb_pcwd_send_command: error in usb_control_msg for cmd 0x%x 0x%x 0x%x\n",
-+ cmd, *msb, *lsb);
- }
- /* wait till the usb card processed the command,
- * with a max. timeout of USB_COMMAND_TIMEOUT */