Re: First kernel patch (optimization)

2015-09-20 Thread Alexander Holler

Am 20.09.2015 um 04:21 schrieb Theodore Ts'o:

On Sat, Sep 19, 2015 at 07:47:22PM +0200, Alexander Holler wrote:



Perhaps not so surprisingly, over a decade later, it is not currently
at the top of the priority list of any of the current file system or
VFS developers, as far as I know.  One of the reasons for that is that
there are a number of other ways of achieving the same functionality.
These include using tmpfs, or using file system level encryption.
They require a bit more system administrator setup than just being
able to set the FS_SECR_FL flag, true, but just because it's more
convenient doesn't mean that it's worth doing.


Again, I don't think that encryption is an alternative. Besides that 
there is always the thread that strong encrytion will become regulated, 
there is also the very real thread that someone might end up in jail 
when using encryption and throwing away the key to delete stuff. E.g., 
as to my knowledge, in the UK you might end up in jail if you don't hand 
out a password. So what happens if you've deleted the key and are really 
unable to hand it out and the people which have an interest in what 
you've once stored don't believe you?



So this is a feature request.  It's a reasonable feature request,
in that if someone would like to pay $$$ for some consultant to
implement it in a way that is bug-free, I suspect it could go
upstream.  Someone who was very motivated and with the sufficient
skills could also invest their own effort to make a patch that can go
upstream too.  You've elected not, to because you believe it would
take you months of "unpaid time".  That's purely within your rights to
do.  But you don't have the right to try to tell other people what
work to do on their behalf --- not unless you are paying their salary.


First I haven't request that someone implements it for me. Besides that 
what you're describing is what maintainers do all the time. Of course, 
it's their job to request quality, but, in my humble opinion, very often 
they are requesting stuff just to request something.


And that "month of unpaid time" was for sure a cynical exaggeration I've 
done while having been angry. In fact I believe the way I've outlined 
with the ugly code (proof of concept) could be implemented by someone 
like you in a weekend. For me it needs quiet some more time because I 
had and still have almost zero knowledge about all locks and whatever 
else is used in the filesystem code. But nevertheless I was able to fix 
up a lot of stuff during another afternoon. E.g. I've added checks if a 
file is in use or if AT_WIPE was called on a directory and then returned 
errors in those cases. Unfortunately the code changed in 4.2 and that 
patch doesn't apply anymore and now, because I don't really need those 
implementation details (I'm aware of the problems of my patch), I've 
thrown the patch into the waste bin. Besides that my concept doesn't 
work on BTRFS what I'm currently using for various reasons (mainly 
compression) on most of my systems. And I have no idea if it ever will 
(because I don't know why discard on BTRFS doesn't really discard what I 
think it should discard. ;) ).




Seeing that the weight of the other file system developers are against
the patch, it's never gone into the mainline Linux kernel, even though
I could have forced the feature into ext4.  However, this patch is in
active use in practically every single data center kernel for Google,
and it's in use in at least one other very large publically traded
company that uses cluster file systems such as Hadoopfs.  And if
someone wants a copy of the FALLOC_FL_NO_HIDE_STALE patch for ext4,
I'm happy to give it to them.  But it hasn't gone upstream, and I'm OK
with that.


Sure, but please don't forget its quiet some difference if someone does 
stuff without being paid and all he earns are unfriendly comments. In 
fact I still don't care much about if any code from me ends up in 
mainline, but I dislike quiet a lot the tone used by many maintainers to 
refuse things someone offered in a good believe.


E.g. recently I've read that a maintainer requested that patch posters 
should be aware of his calendar (like conferences he visits, merge 
windows he has to care for and similar stuff. ?!?



As far as what you want to do next, you have a personal "proof of
concept" patch that seems to work well enough for you.  Great!  I'm
sure you can keep using it for your own purposes.  If you can convince
someone with the skills to get the patch to an upstreamable state, it
is my judgement that this is doable, so this puts your feature in a
much better state than the FALLOC_FL_NO_HIDE_STALE flag.  However,
there is still a non-trivial amount of work left to do to turn your
"proof of concept" patch into something that is upstremable, including
changing the interface to using the FS_SECRM_FL flag.  And your
whining that other people should change *their* priorities to match
*yours* is not likely to help.


Besides 

Re: [PATCH 00/16] usb: gadget: amd5536udc: fix memory leaks

2015-09-20 Thread Sudip Mukherjee
On Sat, Sep 19, 2015 at 09:24:38AM +0530, Sudip Mukherjee wrote:
> On Fri, Sep 18, 2015 at 01:39:54PM -0500, Felipe Balbi wrote:
> > On Mon, Sep 14, 2015 at 08:42:47PM +0530, Sudip Mukherjee wrote:
> > > This amd5536udc was a complete mess. The major problems that i could
> > > find are:
> > > 

> > 
> > run checkpatch.pl and try again

> Anyways, I will fix up all the warnings and send v2.

I guess v2 is not required any more. The main thing that this series was
trying to do has already been done by:
6527cc27761a ("usb: gadget: amd5536udc: fix error handling in udc_pci_probe()")

regards
sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v4 resend 0/2] power: Add an axp20x-usb-power driver

2015-09-20 Thread Hans de Goede
Hi,

This is a resend of v4 of the axp20x-usb-power power-supply driver,
after v4 there have been no further comments, so I assume that this
version is ready for merging, yet for some reason it has not been
merged yet.

Can we please get this driver merged (preferably into 4.3, but if
not at least lets get it into next / 4.4 asap).

Regards,

Hans

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v4 resend 1/2] ARM: dts: Add binding documentation for AXP20x pmic usb power supply

2015-09-20 Thread Hans de Goede
Add binding documentation for the usb power supply part of the AXP20x pmic.

Signed-off-by: Hans de Goede 
---
Changes in v2:
-Split out into a separate patch from the actual driver commit
Changes in v4:
-s/usb_power_supply/usb-power-supply/ in the dts example code
---
 .../bindings/power_supply/axp20x_usb_power.txt | 34 ++
 1 file changed, 34 insertions(+)
 create mode 100644 
Documentation/devicetree/bindings/power_supply/axp20x_usb_power.txt

diff --git 
a/Documentation/devicetree/bindings/power_supply/axp20x_usb_power.txt 
b/Documentation/devicetree/bindings/power_supply/axp20x_usb_power.txt
new file mode 100644
index 000..862f4a4
--- /dev/null
+++ b/Documentation/devicetree/bindings/power_supply/axp20x_usb_power.txt
@@ -0,0 +1,34 @@
+AXP20x USB power supply
+
+Required Properties:
+-compatible: "x-powers,axp202-usb-power-supply"
+
+This node is a subnode of the axp20x PMIC.
+
+Example:
+
+axp209: pmic@34 {
+   compatible = "x-powers,axp209";
+   reg = <0x34>;
+   interrupt-parent = <_intc>;
+   interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+   interrupt-controller;
+   #interrupt-cells = <1>;
+
+   regulators {
+   x-powers,dcdc-freq = <1500>;
+
+   vdd_cpu: dcdc2 {
+   regulator-always-on;
+   regulator-min-microvolt = <100>;
+   regulator-max-microvolt = <145>;
+   regulator-name = "vdd-cpu";
+   };
+
+   ...
+   };
+
+   usb-power-supply: usb-power-supply {
+   compatible = "x-powers,axp202-usb-power-supply";
+   };
+};
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v4 resend 2/2] power: Add an axp20x-usb-power driver

2015-09-20 Thread Hans de Goede
This adds a driver for the usb power_supply bits of the axp20x PMICs.

I initially started writing my own driver, before coming aware of
Bruno Prémont's excellent earlier RFC with a driver for this.

My driver was lacking CURRENT_MAX and VOLTAGE_MIN support Bruno's
drvier has, so I've copied the code for those from his driver.

Note that the AC-power-supply and battery charger bits will need separate
drivers. Each one needs its own devictree child-node so that other
devicetree nodes can reference the right power-supply, and thus each one
will get its own mfd-cell / platform_device and platform-driver.

Cc: Bruno Prémont 
Acked-by: Lee Jones 
Signed-off-by: Bruno Prémont 
Signed-off-by: Hans de Goede 
---
Changes in v2:
-Split out the dt-bindings documentation into a separate patch
-Renamed axp20x_read_16bit to axp20x_read_variable_width
-Use better local variable names inside axp20x_read_variable_width
Changes in v3:
-Add Bruno's S-o-b
Changes in v4:
-Check that parent drv data is not NULL
-Replace "r" local variable with a "ret" variable
---
 drivers/power/Kconfig|   7 ++
 drivers/power/Makefile   |   1 +
 drivers/power/axp20x_usb_power.c | 248 +++
 include/linux/mfd/axp20x.h   |  24 
 4 files changed, 280 insertions(+)
 create mode 100644 drivers/power/axp20x_usb_power.c

diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index f8758d6..914167e 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -472,6 +472,13 @@ config CHARGER_RT9455
help
  Say Y to enable support for Richtek RT9455 battery charger.
 
+config AXP20X_POWER
+   tristate "AXP20x power supply driver"
+   depends on MFD_AXP20X
+   help
+ This driver provides support for the power supply features of
+ AXP20x PMIC.
+
 source "drivers/power/reset/Kconfig"
 
 endif # POWER_SUPPLY
diff --git a/drivers/power/Makefile b/drivers/power/Makefile
index 5752ce8..fb4413e 100644
--- a/drivers/power/Makefile
+++ b/drivers/power/Makefile
@@ -9,6 +9,7 @@ obj-$(CONFIG_GENERIC_ADC_BATTERY)   += generic-adc-battery.o
 
 obj-$(CONFIG_PDA_POWER)+= pda_power.o
 obj-$(CONFIG_APM_POWER)+= apm_power.o
+obj-$(CONFIG_AXP20X_POWER) += axp20x_usb_power.o
 obj-$(CONFIG_MAX8925_POWER)+= max8925_power.o
 obj-$(CONFIG_WM831X_BACKUP)+= wm831x_backup.o
 obj-$(CONFIG_WM831X_POWER) += wm831x_power.o
diff --git a/drivers/power/axp20x_usb_power.c b/drivers/power/axp20x_usb_power.c
new file mode 100644
index 000..421a90b
--- /dev/null
+++ b/drivers/power/axp20x_usb_power.c
@@ -0,0 +1,248 @@
+/*
+ * AXP20x PMIC USB power supply status driver
+ *
+ * Copyright (C) 2015 Hans de Goede 
+ * Copyright (C) 2014 Bruno Prémont 
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under  the terms of the GNU General  Public License as published by the
+ * Free Software Foundation;  either version 2 of the License, or (at your
+ * option) any later version.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define DRVNAME "axp20x-usb-power-supply"
+
+#define AXP20X_PWR_STATUS_VBUS_PRESENT BIT(5)
+#define AXP20X_PWR_STATUS_VBUS_USEDBIT(4)
+
+#define AXP20X_USB_STATUS_VBUS_VALID   BIT(2)
+
+#define AXP20X_VBUS_VHOLD_uV(b)(400 + (((b) >> 3) & 7) * 
10)
+#define AXP20X_VBUS_CLIMIT_MASK3
+#define AXP20X_VBUC_CLIMIT_900mA   0
+#define AXP20X_VBUC_CLIMIT_500mA   1
+#define AXP20X_VBUC_CLIMIT_100mA   2
+#define AXP20X_VBUC_CLIMIT_NONE3
+
+#define AXP20X_ADC_EN1_VBUS_CURR   BIT(2)
+#define AXP20X_ADC_EN1_VBUS_VOLT   BIT(3)
+
+#define AXP20X_VBUS_MON_VBUS_VALID BIT(3)
+
+struct axp20x_usb_power {
+   struct regmap *regmap;
+   struct power_supply *supply;
+};
+
+static irqreturn_t axp20x_usb_power_irq(int irq, void *devid)
+{
+   struct axp20x_usb_power *power = devid;
+
+   power_supply_changed(power->supply);
+
+   return IRQ_HANDLED;
+}
+
+static int axp20x_usb_power_get_property(struct power_supply *psy,
+   enum power_supply_property psp, union power_supply_propval *val)
+{
+   struct axp20x_usb_power *power = power_supply_get_drvdata(psy);
+   unsigned int input, v;
+   int ret;
+
+   switch (psp) {
+   case POWER_SUPPLY_PROP_VOLTAGE_MIN:
+   ret = regmap_read(power->regmap, AXP20X_VBUS_IPSOUT_MGMT, );
+   if (ret)
+   return ret;
+
+   val->intval = AXP20X_VBUS_VHOLD_uV(v);
+   return 0;
+   case POWER_SUPPLY_PROP_VOLTAGE_NOW:
+   ret = axp20x_read_variable_width(power->regmap,
+AXP20X_VBUS_V_ADC_H, 12);

Re: [PATCH 2/3] usb: gadget: at91_udc: mention proper dependency

2015-09-20 Thread Felipe Balbi
On Sat, Sep 19, 2015 at 10:42:58PM +0530, Sudip Mukherjee wrote:
> While building allmodconfig on avr32 the build failed with the error:
> "at91_pmc_base" [drivers/usb/gadget/udc/atmel_usba_udc.ko] undefined!
> 
> On checking the code it turned out that if CONFIG_OF is defined then it
> is using at91_pmc_read() which is using at91_pmc_base. And unless
> COMMON_CLK_AT91 is defined we donot have at91_pmc_base. And
> COMMON_CLK_AT91 is available with AT91 architecture.
> Mention the dependency such that this driver builds with avr32 only if
> OF is not enabled.
> 
> Signed-off-by: Sudip Mukherjee 
> ---
> 
> Tested build with at91_dt_defconfig and allmodconfig of avr32. Build log
> at:
> https://travis-ci.org/sudipm-mukherjee/parport/builds/81168845
> 
>  drivers/usb/gadget/udc/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/udc/Kconfig b/drivers/usb/gadget/udc/Kconfig
> index 9a3a6b0..cdbff54 100644
> --- a/drivers/usb/gadget/udc/Kconfig
> +++ b/drivers/usb/gadget/udc/Kconfig
> @@ -55,7 +55,7 @@ config USB_LPC32XX
>  
>  config USB_ATMEL_USBA
>   tristate "Atmel USBA"
> - depends on AVR32 || ARCH_AT91
> + depends on ((AVR32 && !OF) || ARCH_AT91)

any chance you can add || COMPILE_TEST here ? I'd like to make
sure this builds on my end too.

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH 00/16] usb: gadget: amd5536udc: fix memory leaks

2015-09-20 Thread Felipe Balbi
Hi,

On Sat, Sep 19, 2015 at 09:24:38AM +0530, Sudip Mukherjee wrote:
> On Fri, Sep 18, 2015 at 01:39:54PM -0500, Felipe Balbi wrote:
> > On Mon, Sep 14, 2015 at 08:42:47PM +0530, Sudip Mukherjee wrote:
> > > This amd5536udc was a complete mess. The major problems that i could
> > > find are:
> > > 
> > > 1) if udc_pci_probe() fails in any stage then it just calls the
> > > udc_pci_remove() to handle error. And udc_pci_remove() works with
> > > struct udc *dev which we get from pci_get_drvdata(pdev). But we do the
> > > pci_set_drvdata(pdev, dev) almost at the end of probe. So basically
> > > incase of error we are handling the error by dereferencing a NULL
> > > pointer.
> > > 
> > > 2) udc_pci_remove() does a BUG_ON(dev->driver != NULL) and dev->driver
> > > will be set only if probe is success. So that means if probe fails then
> > > probe will call udc_pci_remove() for error handling and udc_pci_remove()
> > > will inturn halts the kernel by calling BUG().
> > > 
> > > And apart from these numerous memory leaks and not releasing of
> > > resources. Here comes a rewrite of few of the functions in an
> > > attempt to fix these.
> > 
> > run checkpatch.pl and try again
> I know checkpatch gives warning on some of my patches but as the warning
> was not related to the part I have modified so I have not done any thing
> with them as they will become unrelated changes than what is mentioned
> in the commit log.
> Anyways, I will fix up all the warnings and send v2. But do you want me
> to also fix the checkpatch warnings in those patch where functions are
> rearranged? Because in those patches functions were just moved and there
> was no change in the body of the function.

sure, just add a note "while at that, also fix checkpatch warnings"

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH v2 0/7] usb: usbtest misc changes

2015-09-20 Thread Felipe Balbi
On Fri, Sep 18, 2015 at 08:05:39PM -0700, Greg KH wrote:
> On Fri, Sep 18, 2015 at 02:30:09PM -0500, Felipe Balbi wrote:
> > Hi Greg,
> > 
> > On Tue, Sep 01, 2015 at 09:47:57AM +0800, Peter Chen wrote:
> > > Alan Stern (1):
> > >   usb: misc: usbtest: format the data pattern according to max packet
> > > size
> > > 
> > > Peter Chen (6):
> > >   usb: misc: usbtest: allocate size of urb array according to user
> > > parameter
> > >   usb: misc: usbtest: delete useless memset for urbs array
> > >   usb: misc: usbtest: using the same data format among
> > > write/compare/output
> > >   usb: gadget: f_sourcesink: format data pattern according to max packet
> > > size
> > >   tools: usb: testusb: change the help text
> > >   tools: usb: testusb: change the default value for length from 512 to
> > > 1024
> > 
> > I'm adding this series to my queue, if you want to take any patches
> > yourself, just let me know and I'll drop them at my end.
> 
> That's fine with me, you can take them.

all right, thanks

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH 00/16] usb: gadget: amd5536udc: fix memory leaks

2015-09-20 Thread Felipe Balbi
On Sun, Sep 20, 2015 at 01:42:42PM +0530, Sudip Mukherjee wrote:
> On Sat, Sep 19, 2015 at 09:24:38AM +0530, Sudip Mukherjee wrote:
> > On Fri, Sep 18, 2015 at 01:39:54PM -0500, Felipe Balbi wrote:
> > > On Mon, Sep 14, 2015 at 08:42:47PM +0530, Sudip Mukherjee wrote:
> > > > This amd5536udc was a complete mess. The major problems that i could
> > > > find are:
> > > > 
> 
> > > 
> > > run checkpatch.pl and try again
> 
> > Anyways, I will fix up all the warnings and send v2.
> 
> I guess v2 is not required any more. The main thing that this series was
> trying to do has already been done by:
> 6527cc27761a ("usb: gadget: amd5536udc: fix error handling in 
> udc_pci_probe()")

all right, see if there's anything missing, please.

-- 
balbi


signature.asc
Description: Digital signature


Re: [PATCH] USB: EHCI: fix dereference of ERR_PTR

2015-09-20 Thread Lu, Baolu



On 09/16/2015 10:08 PM, Sudip Mukherjee wrote:

On error find_tt() returns either a NULL pointer or the error value in
ERR_PTR. But we were dereferencing it directly without even checking if
find_tt() returned a valid pointer or not.

Signed-off-by: Sudip Mukherjee 
---
  drivers/usb/host/ehci-sched.c | 4 
  1 file changed, 4 insertions(+)

diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
index f9a3327..27bced7 100644
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -257,6 +257,8 @@ static void reserve_release_intr_bandwidth(struct ehci_hcd 
*ehci,
/* FS/LS bus bandwidth */
if (tt_usecs) {
tt = find_tt(qh->ps.udev);
+   if (!tt || IS_ERR(tt))


Why not IS_ERR_OR_NULL()?


+   return;
if (sign > 0)
list_add_tail(>ps.ps_list, >ps_list);
else
@@ -1373,6 +1375,8 @@ static void reserve_release_iso_bandwidth(struct ehci_hcd 
*ehci,
}
  
  		tt = find_tt(stream->ps.udev);

+   if (!tt || IS_ERR(tt))
+   return;
if (sign > 0)
list_add_tail(>ps.ps_list, >ps_list);
else


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/7] usb: usbtest misc changes

2015-09-20 Thread Peter Chen
On Sun, Sep 20, 2015 at 11:13:25AM -0500, Felipe Balbi wrote:
> On Fri, Sep 18, 2015 at 08:05:39PM -0700, Greg KH wrote:
> > On Fri, Sep 18, 2015 at 02:30:09PM -0500, Felipe Balbi wrote:
> > > Hi Greg,
> > > 
> > > On Tue, Sep 01, 2015 at 09:47:57AM +0800, Peter Chen wrote:
> > > > Alan Stern (1):
> > > >   usb: misc: usbtest: format the data pattern according to max packet
> > > > size
> > > > 
> > > > Peter Chen (6):
> > > >   usb: misc: usbtest: allocate size of urb array according to user
> > > > parameter
> > > >   usb: misc: usbtest: delete useless memset for urbs array
> > > >   usb: misc: usbtest: using the same data format among
> > > > write/compare/output
> > > >   usb: gadget: f_sourcesink: format data pattern according to max packet
> > > > size
> > > >   tools: usb: testusb: change the help text
> > > >   tools: usb: testusb: change the default value for length from 512 to
> > > > 1024
> > > 
> > > I'm adding this series to my queue, if you want to take any patches
> > > yourself, just let me know and I'll drop them at my end.
> > 
> > That's fine with me, you can take them.
> 
> all right, thanks

Felipe, I have another patch based on this, would you help on
queueing it if you think it is ok?

http://www.spinics.net/lists/linux-usb/msg129346.html

Alan has a review on:

http://www.spinics.net/lists/linux-usb/msg129257.html

-- 

Best Regards,
Peter Chen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 3/5] ARM: dts: imx25.dtsi: change the clock information for usb

2015-09-20 Thread Peter Chen
For imx25, it needs three clocks to let the controller work,
the old code is wrong, and usbmisc has not included clock
handling code any more.

Signed-off-by: Peter Chen 
---
 arch/arm/boot/dts/imx25.dtsi | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi
index 677f81d..ab843bd 100644
--- a/arch/arm/boot/dts/imx25.dtsi
+++ b/arch/arm/boot/dts/imx25.dtsi
@@ -493,7 +493,8 @@
compatible = "fsl,imx25-usb", "fsl,imx27-usb";
reg = <0x53ff4000 0x0200>;
interrupts = <37>;
-   clocks = < 70>;
+   clocks = < 9>, < 70>, < 8>;
+   clock-names = "ipg", "ahb", "per";
fsl,usbmisc = < 0>;
fsl,usbphy = <>;
status = "disabled";
@@ -503,7 +504,8 @@
compatible = "fsl,imx25-usb", "fsl,imx27-usb";
reg = <0x53ff4400 0x0200>;
interrupts = <35>;
-   clocks = < 70>;
+   clocks = < 9>, < 70>, < 8>;
+   clock-names = "ipg", "ahb", "per";
fsl,usbmisc = < 1>;
fsl,usbphy = <>;
status = "disabled";
@@ -512,8 +514,6 @@
usbmisc: usbmisc@53ff4600 {
#index-cells = <1>;
compatible = "fsl,imx25-usbmisc";
-   clocks = < 9>, < 70>, < 8>;
-   clock-names = "ipg", "ahb", "per";
reg = <0x53ff4600 0x00f>;
};
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 5/5] usb: chipidea: imx: refine clock operations to adapt for all platforms

2015-09-20 Thread Peter Chen
Some i.mx platforms need three clocks to let controller work, but
others only need one, refine clock operation to adapt for all
platforms, it fixes a regression found at i.mx27.

Signed-off-by: Peter Chen 
Tested-by: Fabio Estevam 
Cc:  #v4.1+
---
 drivers/usb/chipidea/ci_hdrc_imx.c | 156 -
 1 file changed, 138 insertions(+), 18 deletions(-)

diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c 
b/drivers/usb/chipidea/ci_hdrc_imx.c
index 6ccbf60..6ec0fbc 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -32,6 +32,10 @@ static const struct ci_hdrc_imx_platform_flag imx27_usb_data 
= {
CI_HDRC_DISABLE_STREAMING,
 };
 
+static const struct ci_hdrc_imx_platform_flag imx31_usb_data = {
+   CI_HDRC_DISABLE_STREAMING,
+};
+
 static const struct ci_hdrc_imx_platform_flag imx28_usb_data = {
.flags = CI_HDRC_IMX28_WRITE_FIX |
CI_HDRC_TURN_VBUS_EARLY_ON |
@@ -68,6 +72,13 @@ static const struct ci_hdrc_imx_platform_flag imx7d_usb_data 
= {
 static const struct of_device_id ci_hdrc_imx_dt_ids[] = {
{ .compatible = "fsl,imx28-usb", .data = _usb_data},
{ .compatible = "fsl,imx27-usb", .data = _usb_data},
+   { .compatible = "fsl,imx25-usb", .data = _usb_data},
+   { .compatible = "fsl,imx35-usb", .data = _usb_data},
+   { .compatible = "fsl,imx23-usb", .data = _usb_data},
+   { .compatible = "fsl,imx31-usb", .data = _usb_data},
+   { .compatible = "fsl,imx50-usb", .data = _usb_data},
+   { .compatible = "fsl,imx51-usb", .data = _usb_data},
+   { .compatible = "fsl,imx53-usb", .data = _usb_data},
{ .compatible = "fsl,imx6q-usb", .data = _usb_data},
{ .compatible = "fsl,imx6sl-usb", .data = _usb_data},
{ .compatible = "fsl,imx6sx-usb", .data = _usb_data},
@@ -77,6 +88,15 @@ static const struct of_device_id ci_hdrc_imx_dt_ids[] = {
 };
 MODULE_DEVICE_TABLE(of, ci_hdrc_imx_dt_ids);
 
+static inline bool imx_needs_three_clocks
+   (const struct ci_hdrc_imx_platform_flag *imx_platform_flag)
+{
+   if (imx_platform_flag == _usb_data)
+   return true;
+
+   return false;
+}
+
 struct ci_hdrc_imx_data {
struct usb_phy *phy;
struct platform_device *ci_pdev;
@@ -84,6 +104,12 @@ struct ci_hdrc_imx_data {
struct imx_usbmisc_data *usbmisc_data;
bool supports_runtime_pm;
bool in_lpm;
+   /* SoC before i.mx6 (except imx23/imx28) needs three clks */
+   bool need_three_clks;
+   struct clk *clk_ipg;
+   struct clk *clk_ahb;
+   struct clk *clk_per;
+   /* - */
 };
 
 /* Common functions shared by usbmisc drivers */
@@ -135,6 +161,105 @@ static struct imx_usbmisc_data 
*usbmisc_get_init_data(struct device *dev)
 }
 
 /* End of common functions shared by usbmisc drivers*/
+static int imx_get_clks(struct device *dev)
+{
+   struct ci_hdrc_imx_data *data = dev_get_drvdata(dev);
+   int ret = 0;
+
+   if (data->need_three_clks) {
+   data->clk_ipg = devm_clk_get(dev, "ipg");
+   if (IS_ERR(data->clk_ipg)) {
+   ret = PTR_ERR(data->clk_ipg);
+   dev_err(dev,
+   "Failed to get ipg clock, err=%d\n", ret);
+   return ret;
+   }
+
+   data->clk_ahb = devm_clk_get(dev, "ahb");
+   if (IS_ERR(data->clk_ahb)) {
+   ret = PTR_ERR(data->clk_ahb);
+   dev_err(dev,
+   "Failed to get ahb clock, err=%d\n", ret);
+   return ret;
+   }
+
+   data->clk_per = devm_clk_get(dev, "per");
+   if (IS_ERR(data->clk_per)) {
+   ret = PTR_ERR(data->clk_per);
+   dev_err(dev,
+   "Failed to get per clock, err=%d\n", ret);
+   return ret;
+   }
+   } else {
+   data->clk = devm_clk_get(dev, NULL);
+   if (IS_ERR(data->clk)) {
+   ret = PTR_ERR(data->clk);
+   dev_err(dev,
+   "Failed to get clock, err=%d\n", ret);
+   return ret;
+   }
+   }
+
+   return ret;
+}
+
+static int imx_prepare_enable_clks(struct device *dev)
+{
+   struct ci_hdrc_imx_data *data = dev_get_drvdata(dev);
+   int ret = 0;
+
+   if (data->need_three_clks) {
+   ret = clk_prepare_enable(data->clk_ipg);
+   if (ret) {
+   dev_err(dev,
+   "Failed to prepare/enable ipg clk, err=%d\n",
+   ret);
+   return ret;
+   }
+
+   ret = 

[PATCH v3 2/5] ARM: dts: imx27.dtsi: change the clock information for usb

2015-09-20 Thread Peter Chen
For imx27, it needs three clocks to let the controller work,
the old code is wrong, and usbmisc has not included clock handling
code any more. Without this patch, it will cause below data
abort when accessing usbmisc registers.

usbcore: registered new interface driver usb-storage
Unhandled fault: external abort on non-linefetch (0x008) at 0xf4424600
pgd = c0004000
[f4424600] *pgd=1452(bad)
Internal error: : 8 [#1] PREEMPT ARM
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Not tainted 4.1.0-next-20150701-dirty #3089
Hardware name: Freescale i.MX27 (Device Tree Support)
task: c7832b60 ti: c783e000 task.ti: c783e000
PC is at usbmisc_imx27_init+0x4c/0xbc
LR is at usbmisc_imx27_init+0x40/0xbc
pc : []lr : []psr: 6093
sp : c783fe08  ip :   fp : 
r10: c0576434  r9 : 009c  r8 : c7a773a0
r7 : 0100  r6 : 6013  r5 : c7a776f0  r4 : c7a773f0
r3 : f4424600  r2 :   r1 : 0001  r0 : 0001
Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 0005317f  Table: a0004000  DAC: 0017
Process swapper (pid: 1, stack limit = 0xc783e190)
Stack: (0xc783fe08 to 0xc784)

Signed-off-by: Peter Chen 
Reported-by: Fabio Estevam 
Tested-by: Fabio Estevam 
Cc:  #v4.1+
---
 arch/arm/boot/dts/imx27.dtsi | 16 
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi
index feb9d34..f818ea4 100644
--- a/arch/arm/boot/dts/imx27.dtsi
+++ b/arch/arm/boot/dts/imx27.dtsi
@@ -486,7 +486,10 @@
compatible = "fsl,imx27-usb";
reg = <0x10024000 0x200>;
interrupts = <56>;
-   clocks = < IMX27_CLK_USB_IPG_GATE>;
+   clocks = < IMX27_CLK_USB_IPG_GATE>,
+   < IMX27_CLK_USB_AHB_GATE>,
+   < IMX27_CLK_USB_DIV>;
+   clock-names = "ipg", "ahb", "per";
fsl,usbmisc = < 0>;
status = "disabled";
};
@@ -495,7 +498,10 @@
compatible = "fsl,imx27-usb";
reg = <0x10024200 0x200>;
interrupts = <54>;
-   clocks = < IMX27_CLK_USB_IPG_GATE>;
+   clocks = < IMX27_CLK_USB_IPG_GATE>,
+   < IMX27_CLK_USB_AHB_GATE>,
+   < IMX27_CLK_USB_DIV>;
+   clock-names = "ipg", "ahb", "per";
fsl,usbmisc = < 1>;
dr_mode = "host";
status = "disabled";
@@ -505,7 +511,10 @@
compatible = "fsl,imx27-usb";
reg = <0x10024400 0x200>;
interrupts = <55>;
-   clocks = < IMX27_CLK_USB_IPG_GATE>;
+   clocks = < IMX27_CLK_USB_IPG_GATE>,
+   < IMX27_CLK_USB_AHB_GATE>,
+   < IMX27_CLK_USB_DIV>;
+   clock-names = "ipg", "ahb", "per";
fsl,usbmisc = < 2>;
dr_mode = "host";
status = "disabled";
@@ -515,7 +524,6 @@
#index-cells = <1>;
compatible = "fsl,imx27-usbmisc";
reg = <0x10024600 0x200>;
-   clocks = < IMX27_CLK_USB_AHB_GATE>;
};
 
sahara2: sahara@10025000 {
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 0/5] usb: change clock information for chipidea

2015-09-20 Thread Peter Chen
This patch set changes usb clock information for legacy i.mx platforms.
At these platforms, they needs three clocks to let controller work.

Hi Fabio,

Would you please have a test at imx27 and imx25 boards, thanks.

Changes for v3:
- Delete property "needs-three-clocks", and using of_device_id->data
  to differentiate platforms
- change  #v3.19+ to  #v4.1+

Changes for v2:
- Add imx25 & imx27 dts change
- Add Fabio's tested-by and Cc:  #v3.19+
- Some typo and commit description

Peter Chen (5):
  doc: dt-binding: ci-hdrc-usb2: split vendor specific properties
  ARM: dts: imx27.dtsi: change the clock information for usb
  ARM: dts: imx25.dtsi: change the clock information for usb
  ARM: dts: imx35.dtsi: change the clock information for usb
  usb: chipidea: imx: refine clock operations to adapt for all platforms

 .../devicetree/bindings/usb/ci-hdrc-usb2.txt   |  10 +-
 arch/arm/boot/dts/imx25.dtsi   |   8 +-
 arch/arm/boot/dts/imx27.dtsi   |  16 ++-
 arch/arm/boot/dts/imx35.dtsi   |   8 +-
 drivers/usb/chipidea/ci_hdrc_imx.c | 156 ++---
 5 files changed, 164 insertions(+), 34 deletions(-)

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 1/5] doc: dt-binding: ci-hdrc-usb2: split vendor specific properties

2015-09-20 Thread Peter Chen
Each vendor may have its specific properties, they are not belonged
to common optional properties, split them from common's.

Signed-off-by: Peter Chen 
---
 Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt 
b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
index 77946f5..27dc705 100644
--- a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
+++ b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
@@ -27,10 +27,6 @@ Optional properties:
 - vbus-supply: reference to the VBUS regulator
 - maximum-speed: limit the maximum connection speed to "full-speed".
 - tpl-support: TPL (Targeted Peripheral List) feature for targeted hosts
-- fsl,usbmisc: (FSL only) phandler of non-core register device, with one
-  argument that indicate usb controller index
-- disable-over-current: (FSL only) disable over current detect
-- external-vbus-divider: (FSL only) enables off-chip resistor divider for Vbus
 - itc-setting: interrupt threshold control register control, the setting
   should be aligned with ITC bits at register USBCMD.
 - ahb-burst-config: it is vendor dependent, the required value should be
@@ -54,6 +50,12 @@ Optional properties:
 - phy-clkgate-delay-us: the delay time (us) between putting the PHY into
   low power mode and gating the PHY clock.
 
+i.mx specific properties
+- fsl,usbmisc: phandler of non-core register device, with one
+  argument that indicate usb controller index
+- disable-over-current: disable over current detect
+- external-vbus-divider: enables off-chip resistor divider for Vbus
+
 Example:
 
usb@f7ed {
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v3 4/5] ARM: dts: imx35.dtsi: change the clock information for usb

2015-09-20 Thread Peter Chen
For imx35, it needs three clocks to let the controller work,
the old code is wrong, and the usbmisc does not include
clock handling code any more.

Signed-off-by: Peter Chen 
---
 arch/arm/boot/dts/imx35.dtsi | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/imx35.dtsi b/arch/arm/boot/dts/imx35.dtsi
index e6540b5..5b887d0 100644
--- a/arch/arm/boot/dts/imx35.dtsi
+++ b/arch/arm/boot/dts/imx35.dtsi
@@ -305,7 +305,8 @@
compatible = "fsl,imx35-usb", "fsl,imx27-usb";
reg = <0x53ff4000 0x0200>;
interrupts = <37>;
-   clocks = < 73>;
+   clocks = < 9>, < 73>, < 28>;
+   clock-names = "ipg", "ahb", "per";
fsl,usbmisc = < 0>;
fsl,usbphy = <>;
status = "disabled";
@@ -315,7 +316,8 @@
compatible = "fsl,imx35-usb", "fsl,imx27-usb";
reg = <0x53ff4400 0x0200>;
interrupts = <35>;
-   clocks = < 73>;
+   clocks = < 9>, < 73>, < 28>;
+   clock-names = "ipg", "ahb", "per";
fsl,usbmisc = < 1>;
fsl,usbphy = <>;
dr_mode = "host";
@@ -325,8 +327,6 @@
usbmisc: usbmisc@53ff4600 {
#index-cells = <1>;
compatible = "fsl,imx35-usbmisc";
-   clocks = < 9>, < 73>, < 28>;
-   clock-names = "ipg", "ahb", "per";
reg = <0x53ff4600 0x00f>;
};
};
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] USB: EHCI: fix dereference of ERR_PTR

2015-09-20 Thread Sudip Mukherjee
On Mon, Sep 21, 2015 at 10:48:52AM +0800, Lu, Baolu wrote:
> 
> 
> On 09/16/2015 10:08 PM, Sudip Mukherjee wrote:
> >On error find_tt() returns either a NULL pointer or the error value in
> >ERR_PTR. But we were dereferencing it directly without even checking if
> >find_tt() returned a valid pointer or not.
> >
> >Signed-off-by: Sudip Mukherjee 
> >---
> >  drivers/usb/host/ehci-sched.c | 4 
> >  1 file changed, 4 insertions(+)
> >
> >diff --git a/drivers/usb/host/ehci-sched.c b/drivers/usb/host/ehci-sched.c
> >index f9a3327..27bced7 100644
> >--- a/drivers/usb/host/ehci-sched.c
> >+++ b/drivers/usb/host/ehci-sched.c
> >@@ -257,6 +257,8 @@ static void reserve_release_intr_bandwidth(struct 
> >ehci_hcd *ehci,
> > /* FS/LS bus bandwidth */
> > if (tt_usecs) {
> > tt = find_tt(qh->ps.udev);
> >+if (!tt || IS_ERR(tt))
> 
> Why not IS_ERR_OR_NULL()?
This was v1, corrected in v2. And Alan has already explained why this
patch is not required.

regards
sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: CH340/341: cannot open twice

2015-09-20 Thread Johan Hovold
[ Please keep everyone on CC including the usb list when responding. ]

On Sun, Sep 20, 2015 at 02:52:14AM +0200, C. SB wrote:

> > device. The reported problems have looked like hardware issues,
> Probably not my case - the device works OK on a winXP box

That's good to know.

> > Could you try the vendor driver and see if that makes the device work so
> > that we'd know for sure?
> Well, it was quite a job to get the driver to compile on linux 4.1.6, and
> I had to kludge a replacement for the deprecated interruptible_sleep_on()
> mechanism. I still can't believe it works (I have no kernel/module experience)
> but apart from an inexplicable 1-2 second delay when close()-ing
> the port, it works in my application (write+read with timeout; TXD-RXD
> connected together in a loopback)
> 
> The mfg driver I used was downloaded from WCH at some point. A copy is visible
> on 
> https://github.com/karlp/ch341-linux/blob/master/drivers/CH341SER_LINUX/ch34x.c
> And my patch to get it to compile is quite simple:
> http://pastebin.ca/3167353
> (not sure what the diff/patch guidelines are on this list, I preferred to 
> link)
> 
> Note : I probably violate many rules of kernel coding with my use of
> wait_event_interruptible(). Consider this a highly unstable, incompetent 
> patch.

Thanks for verifying that. I've added Karl on CC that I think has some
preliminary code for adding support for newer ch341 devices, and Peter
who has also run into some similar issues.

Hopefully someone with access to these devices can figure out what is
missing in the mainline driver so that they get proper support.

Thanks,
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 0/1] musb: sunxi: Make sunxi musb glue work without MUSB_PIO_ONLY

2015-09-20 Thread Hans de Goede
Hi,

Here is a patch to fix the sunxi musb glue not working when MUSB_PIO_ONLY
is not set in the kernel config.

Since the sunxi musb glue was just merged for 4.3, it would be nice if
this bugfix could be added to 4.3 too, without this distro's will be
unable to enable dma with musb and have working sunxi musb support.

Thanks & Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] musb: sunxi: Make sunxi musb glue work without MUSB_PIO_ONLY

2015-09-20 Thread Hans de Goede
Now that it is possible to build in multiple dma engines, we can no longer
require MUSB_PIO_ONLY to be set when using the sunxi musb glue.

This patch adds dummy dma hooks to make the musb glue work without
MUSB_PIO_ONLY. This hooks are fake because we do not support dma with
musb on sunxi. The Allwinnner Android kernels have some dma code, but it
is disabled as Allwinner never managed to get it to work.

Signed-off-by: Hans de Goede 
---
 drivers/usb/musb/sunxi.c | 12 
 1 file changed, 12 insertions(+)

diff --git a/drivers/usb/musb/sunxi.c b/drivers/usb/musb/sunxi.c
index 34ce5df..7b572f9 100644
--- a/drivers/usb/musb/sunxi.c
+++ b/drivers/usb/musb/sunxi.c
@@ -345,6 +345,16 @@ static void sunxi_musb_disable(struct musb *musb)
clear_bit(SUNXI_MUSB_FL_ENABLED, >flags);
 }
 
+struct dma_controller *sunxi_musb_dma_controller_create(struct musb *musb,
+   void __iomem *base)
+{
+   return NULL;
+}
+
+void sunxi_musb_dma_controller_destroy(struct dma_controller *c)
+{
+}
+
 /*
  * sunxi musb register layout
  * 0x00 - 0x17 fifo regs, 1 long per fifo
@@ -570,6 +580,8 @@ static const struct musb_platform_ops sunxi_musb_ops = {
.writeb = sunxi_musb_writeb,
.readw  = sunxi_musb_readw,
.writew = sunxi_musb_writew,
+   .dma_init   = sunxi_musb_dma_controller_create,
+   .dma_exit   = sunxi_musb_dma_controller_destroy,
.set_vbus   = sunxi_musb_set_vbus,
.pre_root_reset_end = sunxi_musb_pre_root_reset_end,
.post_root_reset_end = sunxi_musb_post_root_reset_end,
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: PROBLEM: lsusb -v freezes kernel on Acer ES1-111M

2015-09-20 Thread Roland Weber
Hi Alan, hi all,

in my previous mail, I wrote:
> With "make menuconfig", I haven't been able to switch off the
> setting, because CONFIG_PM_SLEEP and something else forces it on

For the records, there are no menu entries for CONFIG_PM_SLEEP
and CONFIG_HIBERNATE_CALLBACKS. Those are enabled implicitly.
I had to disable "Linux guest support" within section
"Processor types and features" to switch off CONFIG_PM.

I've now compiled two 4.2 kernels with extra debug output:
-f: CONFIG_PM enabled, the kernel freezes on unbind
-g: CONFIG_PM disabled, the kernel does not freeze
I also compiled two other 4.2 kernels where I replaced the
alloc_workqueue with alloc_ordered_workqueue. That undoes
the change from 3.17 to 3.18 which unearthed the problem.
However, those two kernels behave no differently from the
two above. Apparently, there have been other changes since
3.18 which also result in the revised order of initialization.
I don't plan to pursue that legacy route any longer.

I've put ehci_info statements in ehci_suspend and ehci_resume,
but there's no output from them. See below for details. Next,
I'll try to remove the usb_enable_autosuspend(hdev) calls.

cheers and thanks,
  Roland

= kernel -f, the one which freezes =

[0.00] Initializing cgroup subsys cpuset
[0.00] Initializing cgroup subsys cpu
[0.00] Initializing cgroup subsys cpuacct
[0.00] Linux version 4.2.0-f (rweber@Nightwing) (gcc version 4.9.2 
(Ubuntu 4.9.2-10ubuntu13) ) #37 SMP Sat Sep 19 01:53:51 CEST 2015
[0.00] Command line: BOOT_IMAGE=/boot/vmlinuz-4.2.0-f 
root=UUID=b8872e03-7295-4cbd-ac86-06b9be2f112f ro debug systemd.log_target=null 
quiet splash crashkernel=384M-:128M vt.handoff=7
[0.00] KERNEL supported cpus:
[0.00]   Intel GenuineIntel
[0.00] x86/fpu: Legacy x87 FPU detected.
[0.00] x86/fpu: Using 'lazy' FPU context switches.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009e7ff] usable
[0.00] BIOS-e820: [mem 0x0009e800-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000e-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x1eff] usable
[0.00] BIOS-e820: [mem 0x1f00-0x1f0f] reserved
[0.00] BIOS-e820: [mem 0x1f10-0x1fff] usable
[0.00] BIOS-e820: [mem 0x2000-0x200f] reserved
[0.00] BIOS-e820: [mem 0x2010-0x781acfff] usable
[0.00] BIOS-e820: [mem 0x781ad000-0x787acfff] reserved
[0.00] BIOS-e820: [mem 0x787ad000-0x788acfff] ACPI NVS
[0.00] BIOS-e820: [mem 0x788ad000-0x788ecfff] ACPI data
[0.00] BIOS-e820: [mem 0x788ed000-0x794c5fff] usable
[0.00] BIOS-e820: [mem 0x794c6000-0x79dc5fff] ACPI NVS
[0.00] BIOS-e820: [mem 0x79dc6000-0x79ff] usable
[0.00] BIOS-e820: [mem 0x7a00-0x7a7f] reserved
[0.00] BIOS-e820: [mem 0x7ae0-0x7fff] reserved
[0.00] BIOS-e820: [mem 0xe000-0xe3ff] reserved
[0.00] BIOS-e820: [mem 0xfec0-0xfec00fff] reserved
[0.00] BIOS-e820: [mem 0xfed01000-0xfed01fff] reserved
[0.00] BIOS-e820: [mem 0xfed03000-0xfed03fff] reserved
[0.00] BIOS-e820: [mem 0xfed08000-0xfed08fff] reserved
[0.00] BIOS-e820: [mem 0xfed0c000-0xfed0] reserved
[0.00] BIOS-e820: [mem 0xfed1c000-0xfed1cfff] reserved
[0.00] BIOS-e820: [mem 0xfee0-0xfee00fff] reserved
[0.00] BIOS-e820: [mem 0xfef0-0xfeff] reserved
[0.00] BIOS-e820: [mem 0xffc0-0x] reserved
[0.00] NX (Execute Disable) protection: active
[0.00] SMBIOS 2.7 present.
[0.00] DMI: Acer Aspire ES1-111M/R2, BIOS V1.08 08/20/2014
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x7a000 max_arch_pfn = 0x4
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-B uncachable
[0.00]   C-F write-protect
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0FFC0 mask FFFC0 write-protect
[0.00]   1 base 0 mask F8000 write-back
[0.00]   2 base 07C00 mask FFC00 uncachable
[0.00]   3 base 07B00 mask FFF00 uncachable
[0.00]   4 base 07AE0 mask FFFE0 uncachable
[0.00]   5 disabled
[0.00]   6 disabled
[0.00]   7