Re: [RFC PATCH v1 00/15] firmware loader: introduce cache/uncache firmware

2012-08-16 Thread Ming Lei
bove, what's the status of them? There is only one patch in the reference below which need to be merged, but it has nothing conflicted with these firmware loader 14 patches. http://marc.info/?l=linux-kernel&m=134323730805443&w=2 I think Linus will deal with it, :-) Thanks,

[PATCH -next 0/3] firmware loader: fix build failure

2012-08-16 Thread Ming Lei
Hi Greg, These 3 patches fix build failure reported by Fengguang aginst driver-core -next tree. The 2nd patch introduces dpm_for_each_dev in drivers/base/power to fix link failure if firmware loader is complied as moudle. Rafael, could you comment on the 2nd patch? Thanks, -- Ming Lei -- To

[PATCH 1/3] firmware loader: fix compile failure if !PM

2012-08-16 Thread Ming Lei
'return 0' should be added to fw_pm_notify if !PM because return value of the funcion is defined as 'int'. Reported-by: Fengguang Wu Signed-off-by: Ming Lei --- drivers/base/firmware_class.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/b

[RFC PATCH 2/3] PM / Sleep: introduce dpm_for_each_dev

2012-08-16 Thread Ming Lei
: Fengguang Wu Signed-off-by: Ming Lei --- drivers/base/power/main.c | 19 +++ include/linux/pm.h|5 + 2 files changed, 24 insertions(+) diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 57f5814..184bcb5 100644 --- a/drivers/base/power/main.c

[PATCH 3/3] firmware loader: fix compile failure if FW_LOADER is m

2012-08-16 Thread Ming Lei
device_cache_fw_images need to iterate devices in system, so this patch applies the introduced dpm_for_each_dev to avoid compile failure if CONFIG_FW_LOADER is m. Reported-by: Fengguang Wu Signed-off-by: Ming Lei --- drivers/base/firmware_class.c |9 ++--- 1 file changed, 2 insertions

Re: [RFC PATCH 2/3] PM / Sleep: introduce dpm_for_each_dev

2012-08-16 Thread Ming Lei
On Fri, Aug 17, 2012 at 9:45 AM, Ming Lei wrote: > diff --git a/include/linux/pm.h b/include/linux/pm.h > index 44d1f23..bf86f89 100644 > --- a/include/linux/pm.h > +++ b/include/linux/pm.h > @@ -640,6 +640,7 @@ extern void __suspend_report_result(const char *function, >

Re: show_uevent() and general protection fault

2012-08-16 Thread Ming Lei
random Maybe you can print out the device name by dev_err in show_uevent under the situation. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel

[PATCH 2/3] PM / Sleep: introduce dpm_for_each_dev

2012-08-16 Thread Ming Lei
: Fengguang Wu Signed-off-by: Ming Lei --- v1: - add 'static inline' if !PM_SLEEP - check 'fn' in dpm_for_each_dev drivers/base/power/main.c | 22 ++ include/linux/pm.h|5 + 2 files changed, 27 insertions(+) diff --git a/drivers

Re: BUG: unable to handle kernel paging request in usb_match_id()

2012-08-17 Thread Ming Lei
ly when HOTPLUG is not set. But, if HOTPLUG is not enabled, should device_add() trigger driver probe further after kernel init is completed? Or even devices should be allowed to add into system? Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel

[PATCH v1 0/3] firmware loader: fix build failure

2012-08-17 Thread Ming Lei
_SLEEP(2/3) - check 'fn' in dpm_for_each_dev(2/3) Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.htm

[PATCH v1 1/3] firmware loader: fix compile failure if !PM

2012-08-17 Thread Ming Lei
'return 0' should be added to fw_pm_notify if !PM because return value of the funcion is defined as 'int'. Reported-by: Fengguang Wu Signed-off-by: Ming Lei --- drivers/base/firmware_class.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/b

[PATCH v1 2/3] PM / Sleep: introduce dpm_for_each_dev

2012-08-17 Thread Ming Lei
: Fengguang Wu Signed-off-by: Ming Lei --- drivers/base/power/main.c | 22 ++ include/linux/pm.h|5 + 2 files changed, 27 insertions(+) diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 57f5814..23b417f 100644 --- a/drivers/base/power/main.c

[PATCH v1 3/3] firmware loader: fix build failure if FW_LOADER is m

2012-08-17 Thread Ming Lei
device_cache_fw_images need to iterate devices in system, so this patch applies the introduced dpm_for_each_dev to avoid link failure if CONFIG_FW_LOADER is m. Reported-by: Fengguang Wu Signed-off-by: Ming Lei --- drivers/base/firmware_class.c |9 ++--- 1 file changed, 2 insertions

Re: [PATCH v1 2/3] PM / Sleep: introduce dpm_for_each_dev

2012-08-17 Thread Ming Lei
On Sat, Aug 18, 2012 at 6:02 AM, Rafael J. Wysocki wrote: > On Friday, August 17, 2012, Ming Lei wrote: >> +void dpm_for_each_dev(void *data, void (*fn)(struct device *, void *)) > > Is this function actually used more than once? At least now, it is called each time before system

Re: BUG: unable to handle kernel paging request in usb_match_id()

2012-08-17 Thread Ming Lei
On Fri, Aug 17, 2012 at 10:42 PM, Greg Kroah-Hartman wrote: > On Fri, Aug 17, 2012 at 10:38:16AM -0400, Alan Stern wrote: >> On Fri, 17 Aug 2012, Ming Lei wrote: >> >> > But, if HOTPLUG is not enabled, should device_add() trigger driver probe >> > further after k

Re: [PATCH v1 2/3] PM / Sleep: introduce dpm_for_each_dev

2012-08-18 Thread Ming Lei
of this patch, but I guess it would require some > consderable juggling of #ifdefs to fix the build breakage in a different way. Firmware loader might be built as module, so without exporting something from device PM core, the problem can't be fixed. Thanks, -- Ming Lei -- To unsubscribe

Re: printks messed up in 3.6-rc2+git

2012-08-19 Thread Ming Lei
45] usb 1-1.2.3: Oops - undefined instructionProduct: USB2.0 WLAN [ 15.440643] usb 1-1.2.3: Oops - undefined instructionManufacturer: ATHEROS [ 15.447906] usb 1-1.2.3: Oops - undefined instructionSerialNumber: 12345 Thanks, -- Ming Lei -- To unsubscribe from this list: send the line

[PATCH 1/3] firmware loader: fix firmware -ENOENT situations

2012-08-20 Thread Ming Lei
If the requested firmware image doesn't exist, firmware->priv should be set for the later concurrent requests, otherwise warning and oops will be triggered inside firmware_free_data(). Signed-off-by: Ming Lei --- drivers/base/firmware_class.c |1 + 1 file changed, 1 insertion(+) di

[PATCH 2/3] firmware loader: let caching firmware piggyback on loading firmware

2012-08-20 Thread Ming Lei
and before syscore_suspend() is called. Signed-off-by: Ming Lei --- drivers/base/firmware_class.c | 83 - 1 file changed, 74 insertions(+), 9 deletions(-) diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index edc88bc..95f6851 10

[PATCH 3/3] MAINTAINERS: update maintain status of FIRMWARE LOADER

2012-08-20 Thread Ming Lei
ntain the code and help on drivers' related problem, so update the item. Signed-off-by: Ming Lei --- MAINTAINERS |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index fb87989..cafa5e3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2858,7 +2

udev 182: response timeout for request_firmware in module_probe path

2012-08-20 Thread Ming Lei
iscussed before. Just grep under kernel root dir, there are about 360 request_firmware callers, and looks most of them are called in .probe path. [1], https://lkml.org/lkml/2012/2/19/57 Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

Re: [PATCH v1] block: partition: optimize memory allocation in check_partition

2013-02-16 Thread Ming Lei
On Sat, Feb 2, 2013 at 6:43 AM, Andrew Morton wrote: > On Fri, 1 Feb 2013 20:23:12 +0800 I just return from holiday, sorry for the delay, and thanks for the review. > Ming Lei wrote: > >> Currently, sizeof(struct parsed_partitions) may be 64KB in 32bit arch, >> so it is

Re: udev breakages - was: Re: Need of an ".async_probe()" type of callback at driver's core - Was: Re: [PATCH] [media] drxk: change it to use request_firmware_nowait()

2012-10-11 Thread Ming Lei
rnel parameter for customizing firmware search path will be added, so you use can pass your search path from kernel command too. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More

[RFC PATCH 0/3] mm/PM/USB: force memory allocation with no io in need

2012-10-14 Thread Ming Lei
+ include/linux/usb.h |1 + mm/page_alloc.c |2 ++ Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo

[RFC PATCH 1/3] mm: teach mm by current context info to not do I/O during memory allocation

2012-10-14 Thread Ming Lei
. Cc: Alan Stern Cc: Oliver Neukum Cc: Jiri Kosina Cc: Andrew Morton Cc: Mel Gorman Cc: Minchan Kim Cc: KAMEZAWA Hiroyuki Cc: Michal Hocko Cc: Ingo Molnar Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: linux-mm Signed-off-by: Ming Lei --- include/linux/sched.h |5 +

[RFC PATCH 2/3] PM / Runtime: force memory allocation with no I/O during runtime_resume callbcack

2012-10-14 Thread Ming Lei
This patch applies the introduces tsk_memalloc_forbid_io() and tsk_memalloc_allow_io() to force memory allocation with no I/O during runtime_resume callback. Cc: Alan Stern Cc: Oliver Neukum Cc: Rafael J. Wysocki Signed-off-by: Ming Lei --- drivers/base/power/runtime.c | 13

[RFC PATCH 3/3] USB: forbid memory allocation with I/O during bus reset if storage interface exits

2012-10-14 Thread Ming Lei
transfer when the reset is triggered by other interface, or the error handling can't be completed if the reset is triggered by mass storage itself(error handling path). Cc: Alan Stern Cc: Oliver Neukum Signed-off-by: Ming Lei --- drivers/usb/core/hub.c| 42

Re: [RFC PATCH 3/3] USB: forbid memory allocation with I/O during bus reset if storage interface exits

2012-10-15 Thread Ming Lei
in probe() path. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [RFC PATCH 3/3] USB: forbid memory allocation with I/O during bus reset if storage interface exits

2012-10-15 Thread Ming Lei
On Mon, Oct 15, 2012 at 8:30 PM, Oliver Neukum wrote: > > All network devices? Good point, but I am wondering if there are guys who would like to bring up iSCSI over usb network dongle, which should be very slow at least with high speed. For super speed device, looks there are few network dongl

Re: [RFC PATCH 2/3] PM / Runtime: force memory allocation with no I/O during runtime_resume callbcack

2012-10-15 Thread Ming Lei
On Mon, Oct 15, 2012 at 10:14 PM, Alan Stern wrote: > On Mon, 15 Oct 2012, Ming Lei wrote: > >> This patch applies the introduces tsk_memalloc_forbid_io() and >> tsk_memalloc_allow_io() to force memory allocation with no I/O >> during runtime_resume callback. >> &g

Re: [RFC PATCH 1/3] mm: teach mm by current context info to not do I/O during memory allocation

2012-10-15 Thread Ming Lei
to be > used with any task other than the current one. Yes, only 'current' can be passed now. I keep it because no performance effect with macro implementation. But that is not good since it may cause misuse. Will remove the 'p' argument. Thanks, -- Ming Lei -- To unsubscri

Re: [RFC PATCH 1/3] mm: teach mm by current context info to not do I/O during memory allocation

2012-10-15 Thread Ming Lei
On Mon, Oct 15, 2012 at 11:47 PM, Minchan Kim wrote: > On Mon, Oct 15, 2012 at 01:14:17PM +0800, Ming Lei wrote: >> This patch introduces PF_MEMALLOC_NOIO on process flag('flags' field of >> 'struct task_struct'), so that the flag can be set by one task

Re: [RFC PATCH 1/3] mm: teach mm by current context info to not do I/O during memory allocation

2012-10-16 Thread Ming Lei
, I will add the check into gfp_to_alloc_flags(). Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [RFC PATCH 3/3] USB: forbid memory allocation with I/O during bus reset if storage interface exits

2012-10-16 Thread Ming Lei
r > change needed), is not a good idea. > > So I agree with Oliver here, this isn't acceptable. OK, I will remove the limit in -v1 and add comments on the case. thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body

Re: [RFC PATCH 1/3] mm: teach mm by current context info to not do I/O during memory allocation

2012-10-16 Thread Ming Lei
TE mode > +* but this is really rare event and allocator can > * fallback to other zones. > +*/ > + sc.may_writepage = 0; > + sc.may_swap = 0; > + } > + > cond_resched(); > /* > * We n

[RFC PATCH v1 0/3] mm/PM/USB: memory allocation with no io in need

2012-10-16 Thread Ming Lei
1 deletion(-) Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[RFC PATCH v1 1/3] mm: teach mm by current context info to not do I/O during memory allocation

2012-10-16 Thread Ming Lei
iver Neukum Cc: Jiri Kosina Cc: Andrew Morton Cc: Mel Gorman Cc: KAMEZAWA Hiroyuki Cc: Michal Hocko Cc: Ingo Molnar Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Cc: linux-mm Signed-off-by: Minchan Kim Signed-off-by: Ming Lei --- include/linux/sched.h | 11 +++ mm

[RFC PATCH v1 2/3] PM / Runtime: force memory allocation with no I/O during runtime_resume callbcack

2012-10-16 Thread Ming Lei
This patch applies the introduced memalloc_noio_save() and memalloc_noio_restore() to force memory allocation with no I/O during runtime_resume callback. Cc: Alan Stern Cc: Oliver Neukum Cc: Rafael J. Wysocki Signed-off-by: Ming Lei --- drivers/base/power/runtime.c | 14 ++ 1

[RFC PATCH v1 3/3] USB: forbid memory allocation with I/O during bus reset

2012-10-16 Thread Ming Lei
set() and the storage interface can't do I/O transfer when the reset is triggered by other interface, or the error handling can't be completed if the reset is triggered by the storage itself(error handling path). Cc: Alan Stern Cc: Oliver Neukum Signed-off-by: Ming Lei --- driver

Re: [RFC PATCH v1 1/3] mm: teach mm by current context info to not do I/O during memory allocation

2012-10-16 Thread Ming Lei
OIO) | flags; > } > > (I think that's correct? It's probably more efficient this way). Yes, it is correct and more clean, and I will take it. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [RFC PATCH v1 1/3] mm: teach mm by current context info to not do I/O during memory allocation

2012-10-16 Thread Ming Lei
many examples in which GFP_KERNEL allocation is involved in runtime resume path of individual drivers. The above two examples just show how difficult to solve the problem by traditional way, :-) Also as pointed by Oliver, network driver need memory allocation with no io in iSCSI runtime resume

Re: [PATCH] [firmware_class] Fix compile with no builtin firmware

2012-11-20 Thread Ming Lei
will break this case. > > Perhaps the compile problem is solved in newer kernels (by always > generating an empty builtin firmware list?) but the #ifdef is still > incorrect. Looks the problem hasn't been reported before. Thanks, -- Ming Lei -- To unsubscribe from this list: send t

Re: [PATCH] [firmware_class] Fix compile with no builtin firmware

2012-11-22 Thread Ming Lei
On Wed, Nov 21, 2012 at 10:01 PM, Solomon Peachy wrote: > On Wed, Nov 21, 2012 at 09:35:28AM +0800, Ming Lei wrote: >> Solomon, I can't duplicate the build failure with your .config on >> 3.7-rc5-next. > > Okay, so it's since been fixed. > >> > * Th

Re: [PATCH] [firmware_class] Fix compile with no builtin firmware

2012-11-22 Thread Ming Lei
On Thu, Nov 22, 2012 at 10:15 AM, Solomon Peachy wrote: > On Thu, Nov 22, 2012 at 09:45:23AM +0800, Ming Lei wrote: >> No, it is not related closely, CONFIG_FIRMWARE_IN_KERNEL means >> that all in-kernel-tree firmware blobs should be included in kernel binary, >> but CONFI

[PATCH v6 0/6] solve deadlock caused by memory allocation with I/O

2012-11-24 Thread Ming Lei
/sched.h| 22 ++ mm/page_alloc.c |9 - mm/vmscan.c |4 +- net/core/net-sysfs.c |5 +++ 9 files changed, 154 insertions(+), 5 deletions(-) Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsub

[PATCH v6 1/6] mm: teach mm by current context info to not do I/O during memory allocation

2012-11-24 Thread Ming Lei
h(call tree) may allocate memory with GFP_KERNEL. Cc: Alan Stern Cc: Oliver Neukum Cc: Jiri Kosina Cc: Andrew Morton Cc: Mel Gorman Cc: KAMEZAWA Hiroyuki Cc: Michal Hocko Cc: Ingo Molnar Cc: Peter Zijlstra Cc: "Rafael J. Wysocki" Signed-off-by: Minchan Kim Signed-off-by: Ming Lei

[PATCH v6 2/6] PM / Runtime: introduce pm_runtime_set_memalloc_noio()

2012-11-24 Thread Ming Lei
device in the path from one block or network device to the root device in the device tree may cause deadlock, the introduced pm_runtime_set_memalloc_noio() sets or clears the flag on device in the path recursively. Cc: Alan Stern Cc: "Rafael J. Wysocki" Signed-off-by: Ming Lei --- v5

[PATCH v6 3/6] block/genhd.c: apply pm_runtime_set_memalloc_noio on block devices

2012-11-24 Thread Ming Lei
This patch applyes the introduced pm_runtime_set_memalloc_noio on block device so that PM core will teach mm to not allocate memory with GFP_IOFS when calling the runtime_resume and runtime_suspend callback for block devices and its ancestors. Cc: Jens Axboe Signed-off-by: Ming Lei --- v5

[PATCH v6 4/6] net/core: apply pm_runtime_set_memalloc_noio on network devices

2012-11-24 Thread Ming Lei
ller" Cc: Eric Dumazet Cc: David Decotigny Cc: Tom Herbert Cc: Ingo Molnar Signed-off-by: Ming Lei --- v4: - call pm_runtime_set_memalloc_noio(ddev, true) after device_add --- net/core/net-sysfs.c |5 + 1 file changed, 5 insertions(+) diff --git a/net/core/net-sy

[PATCH v6 5/6] PM / Runtime: force memory allocation with no I/O during Runtime PM callbcack

2012-11-24 Thread Ming Lei
This patch applies the introduced memalloc_noio_save() and memalloc_noio_restore() to force memory allocation with no I/O during runtime_resume/runtime_suspend callback on device with the flag of 'memalloc_noio' set. Cc: Alan Stern Cc: Oliver Neukum Cc: Rafael J. Wysocki Signed-of

[PATCH v6 6/6] USB: forbid memory allocation with I/O during bus reset

2012-11-24 Thread Ming Lei
set() and the storage interface can't do I/O transfer when the reset is triggered by other interface, or the error handling can't be completed if the reset is triggered by the storage itself(error handling path). Cc: Alan Stern Cc: Oliver Neukum Signed-off-by: Ming Lei --- v

Re: [PATCH] firmware: Add Lattice ECP3 FPGA configuration via SPI

2012-11-25 Thread Ming Lei
e FPGA... > lattice-ecp3 spi32766.0: FPGA succesfully configured! > > Signed-off-by: Stefan Roese > Cc: Ming Lei > --- > arch/powerpc/Kconfig | 2 + > drivers/firmware/Kconfig | 11 ++ > drivers/firmware/

Re: [PATCH] ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver

2013-01-10 Thread Ming Lei
Cc netdev and usb lists. On Fri, Jan 11, 2013 at 9:17 AM, wrote: > From: Freddy Xin > > This patch adds a driver for ASIX's AX88179 family of USB 3.0/2.0 > to gigabit ethernet adapters. It's based on the AX88xxx driver but > the usb commands used to access registers for AX88179 are completely

Re: USB device cannot be reconnected and khubd "blocked for more than 120 seconds"

2013-01-13 Thread Ming Lei
271.182373] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 271.190826] modprobeD c04f1920 0 2462 2461 0x [ 271.190887] [] (__schedule+0x5fc/0x6d4) from [] (async_synchronize_cookie_domain+0xdc/0x 168) [ 271.190917] [] (async_synchro

Re: USB device cannot be reconnected and khubd "blocked for more than 120 seconds"

2013-01-13 Thread Ming Lei
On Mon, Jan 14, 2013 at 11:47 AM, Ming Lei wrote: > On Mon, Jan 14, 2013 at 1:42 AM, Alex Riesen wrote: > [ 86.901367] io scheduler deadline registered (default) > [ 181.168487] INFO: task modprobe:2462 blocked for more than 90 seconds. > [ 181.175323] "echo 0 &

Re: USB device cannot be reconnected and khubd "blocked for more than 120 seconds"

2013-01-14 Thread Ming Lei
can be triggered too, so it should be one same problem. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: USB device cannot be reconnected and khubd "blocked for more than 120 seconds"

2013-01-14 Thread Ming Lei
On Tue, Jan 15, 2013 at 1:30 AM, Linus Torvalds wrote: > On Sun, Jan 13, 2013 at 11:15 PM, Ming Lei wrote: >> >> The deadlock problem is caused by calling request_module() inside >> async function of do_scan_async(), and it was introduced by Linus's >

Re: USB device cannot be reconnected and khubd "blocked for more than 120 seconds"

2013-01-14 Thread Ming Lei
On Tue, Jan 15, 2013 at 9:53 AM, Ming Lei wrote: > > I will try to figure out one patch to address the scsi block async probe > issue first, and see if it can fix the problem by moving add_disk() > into sd_probe() > and calling async_synchronize_full_domain(&scsi_sd_probe_dom

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-26 Thread Ming Lei
On Thu, Sep 27, 2012 at 4:23 AM, Russell King - ARM Linux wrote: > On Wed, Sep 26, 2012 at 01:08:33PM -0700, Greg Kroah-Hartman wrote: >> On Sun, Sep 16, 2012 at 09:24:43PM +0800, Ming Lei wrote: >> > diff --git a/drivers/base/bus.c b/drivers/base/bus.c >> > in

Re: Question on irq autoprobe

2012-09-26 Thread Ming Lei
On Fri, Sep 14, 2012 at 10:02 AM, Ming Lei wrote: > Hi, > > I see the below comments on probe_irq_off: > > * BUGS: When used in a module (which arguably shouldn't happen) > * nothing prevents two IRQ probe callers from overlapping. The > * resul

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-27 Thread Ming Lei
On Thu, Sep 27, 2012 at 10:03 PM, Russell King - ARM Linux wrote: > On Thu, Sep 27, 2012 at 02:58:09PM +0100, Russell King - ARM Linux wrote: >> On Thu, Sep 27, 2012 at 07:47:46AM +0800, Ming Lei wrote: >> > On Thu, Sep 27, 2012 at 4:23 AM, Russell King - ARM Linux >>

Re: [BUG] Deferred probing in driver model is racy, resulting in lost probes

2012-09-27 Thread Ming Lei
probably caused by calling atmel_ssc_set_audio more than one time. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH] driver core: fix possible missing of device probe

2012-09-27 Thread Ming Lei
ist' according to 'VARIETIES OF MEMORY BARRIER' part of Documentation/memory-barriers.txt. Reported-and-Tested-by: Russell King Cc: Signed-off-by: Ming Lei --- drivers/base/bus.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/bus.c b/drivers

Re: [PATCH] driver core: fix possible missing of device probe

2012-09-28 Thread Ming Lei
described in the commit log, and avoid the problem. > the driver model code. All in all, what with the error path issue, and > now the blatently wrong description, I'm not gaining much confidence in > Ming Lei. > > The below is actually what's happening, according to

Re: [PATCH] driver core: fix possible missing of device probe

2012-09-28 Thread Ming Lei
On Fri, Sep 28, 2012 at 11:31 AM, anish singh wrote: > Hello Ming, > Though I am not an expert in this driver core area but > I have been following this fix.So have some queries below: > > On Fri, Sep 28, 2012 at 6:22 AM, Ming Lei wrote: >> Inside bus_add_driver(), one devic

Re: [PATCH] driver core: fix possible missing of device probe

2012-09-28 Thread Ming Lei
tach because driver_attach didn't see the device in the bus. So the 'devb' will be missed to be probed in the bus, won't it? Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.ker

Re: [PATCH] driver core: fix possible missing of device probe

2012-09-28 Thread Ming Lei
On Fri, Sep 28, 2012 at 10:13 PM, Russell King - ARM Linux wrote: > On Fri, Sep 28, 2012 at 10:07:22PM +0800, Ming Lei wrote: >> On Fri, Sep 28, 2012 at 9:55 PM, Russell King - ARM Linux >> wrote: >> >> I do not mention threads case in one CPU because the context in

Re: [PATCH] driver core: fix possible missing of device probe

2012-09-28 Thread Ming Lei
ssell's nice explanation. Sorry, how do you know I didn't look at Russell's explanation? Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http:

Re: [PATCH] driver core: fix possible missing of device probe

2012-09-28 Thread Ming Lei
On Fri, Sep 28, 2012 at 11:05 PM, Russell King - ARM Linux wrote: > On Fri, Sep 28, 2012 at 10:44:13PM +0800, Ming Lei wrote: >> On Fri, Sep 28, 2012 at 10:31 PM, anish kumar >> wrote: >> >> > Ming, >> > Somehow I feel here that the problem reported by Russ

Re: USB device cannot be reconnected and khubd "blocked for more than 120 seconds"

2013-01-15 Thread Ming Lei
need to add that sync for all async things inside loading module? So looks only sd.c and floppy.c are to be synchronized suppose some sync interfaces are introduced, doesn't it? Thanks -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" i

Re: [PATCH] module, async: async_synchronize_full() on module init iff async is used

2013-01-15 Thread Ming Lei
he > best of bad options. > > For more details, please refer to the following thread. > > http://thread.gmane.org/gmane.linux.kernel/1420814 > > Signed-off-by: Tejun Heo > Reported-by: Alex Riesen > Cc: Linus Torvalds > --- Looks it does fix the deadlock problem on my P

Re: [PATCH] firmware: make sure the fw file size is not 0

2013-01-15 Thread Ming Lei
hing is that if we should return false on zero size firmware? If we think zero size firmware file as a good fw image, we should handle the case and return true. Otherwise, false should be returned. But that is not a big deal, so looks fine for me. Acked-by: Ming Lei Thanks, -- Ming Lei -- To unsubscr

Re: [PATCH v7 0/6] solve deadlock caused by memory allocation with I/O

2013-01-16 Thread Ming Lei
On Thu, Jan 17, 2013 at 7:37 AM, Andrew Morton wrote: > On Sat, 5 Jan 2013 10:25:38 +0800 > Ming Lei wrote: > >> This patchset try to solve one deadlock problem which might be caused >> by memory allocation with block I/O during runtime PM and block device >> error

Re: [PATCH v7 0/6] solve deadlock caused by memory allocation with I/O

2013-01-18 Thread Ming Lei
Minchan, Rafael, Greg and other guys who reviewed and gave suggestions on this patch set. Thanks, -- Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org

[PATCH] USB: remove unnecessary type casting of urb->context

2008-02-24 Thread Ming Lei
urb->context code cleanup Signed-off-by: Ming Lei <[EMAIL PROTECTED]> --- drivers/usb/atm/cxacru.c |2 +- drivers/usb/class/cdc-acm.c |2 +- drivers/usb/misc/auerswald.c | 12 ++-- drivers/usb/misc/ftdi-elan.c |2 +- drivers

Re: USB autosuspend vs. URB submission

2013-01-09 Thread Ming Lei
com/show_bug.cgi?id=879462 but usbmon only shows URBs > that are successfully submitted. I'm not sure what useful information I could > get from the trace. It might be useful to post the relevant 'dmesg' and the usbmon together. Thanks, -- Ming Lei -- To unsubscribe from t

[RFC][PATCH] fix bus error when trying to access anon & shared page created by mremap()[BUG:8691]

2007-12-13 Thread Ming Lei
s:%d\n",__FILE__,__LINE__);/* can't reach here*/ return 0; } Signed-off-by: Ming Lei <[EMAIL PROTECTED]> --- diff --git a/mm/shmem.c b/mm/shmem.c index 51b3d6c..7e14bce 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -1327,15 +1327,23 @@ failed: return error; } +s

Re: void* arithmnetic

2007-11-28 Thread Ming Lei
2007/11/29, Jan Engelhardt <[EMAIL PROTECTED]>: > > On Nov 29 2007 01:05, J.A. Magallón wrote: > > > >Since begin of the ages the build of the nvidia driver says things like > >this: > > > > Explicitly adding -Wpointer-arith to ones own Makefile is like > admitting the code might be problematic. :-

Re: Small System Paging Problem - OOM-killer goes nuts

2007-11-26 Thread ming lei
It seems oom happenes when VM(page frame reclaim) try to reclaim much more memory by writing back dirty pages, but there is not enough ram for usb disk related driver to finish the writeback operation. (usb disk related driver: scsi_mod, usb mass storage, usbcore and uhci or ehci ) You can try

Re: [RFC] Arm64 boot fail with numa enable in BIOS

2016-09-19 Thread Ming Lei
4 > 0009 > [2.345648] 7ac0: 0009 0026 0003 > 08ca8000 > [2.353559] 7ae0: 03010066 > [2.358483] [] try_to_wake_up+0x148/0x300 > [2.364110] [] wake_up_process+0x14/0x1c > [2.369649] [] create_worker+0x108/0x194 > [2.375189] [] alloc_unbound_pwq+0x1e4/0x398 > [2.381080] [] wq_update_unbound_numa+0xdc/0x190 > [2.387322] [] workqueue_online_cpu+0x254/0x2a8 > [2.393477] [] cpuhp_up_callbacks+0x54/0x100 > [2.399368] [] cpuhp_thread_fun+0x12c/0x13c > [2.405171] [] smpboot_thread_fn+0x1a8/0x1cc > [2.411061] [] kthread+0xd4/0xe8 > [2.415897] [] ret_from_fork+0x10/0x40 > [2.421261] Code: f877db21 90005cd8 f8627b23 91180318 (b8616802) > [2.427426] ---[ end trace b58e70f3295a8cd9 ]--- -- Ming Lei

Re: [PATCH v5 1/5] firmware: document user mode helper lock usage

2016-09-21 Thread Ming Lei
On Sat, Sep 10, 2016 at 6:14 AM, Luis R. Rodriguez wrote: > On Fri, Sep 09, 2016 at 02:12:20PM +0200, Daniel Wagner wrote: >> From: Daniel Wagner >> >> The lock is also used to generate warnings when a direct >> firmware load is requested too early. > > I've determined the firmware cache lets us

Re: [PATCH v4 2/4] firmware: encapsulate firmware loading status

2016-09-08 Thread Ming Lei
as such we can > encapsulate all this data into its own data structure. > > Signed-off-by: Daniel Wagner > Cc: Ming Lei > Cc: Luis R. Rodriguez > Cc: Greg Kroah-Hartman > --- > drivers/base/firmware_class.c | 123 > ++ > 1 file change

Re: [PATCH v4 1/5] MAINTAINERS: extend firmware_class maintainer list

2016-09-08 Thread Ming Lei
; +++ b/MAINTAINERS >> @@ -4891,6 +4891,7 @@ F: tools/firewire/ >> >> FIRMWARE LOADER (request_firmware) >> M: Ming Lei >> +M: Luis R. Rodriguez > > What does Ming think of this? :) Acked-by: Ming Lei Thanks,

Re: [PATCH v4 1/4] firmware: Move umh locking code into fw_load_from_user_helper()

2016-09-08 Thread Ming Lei
> > This avoids a dependency on firmware_loading_timeout() even when > !CONFIG_FW_LOADER_UER_HELPER. > > The usermodehelper locking code was added by b298d289c792 ("PM / Sleep: > Fix freezer failures due to racy usermodehelper_is_disabled()"). > > Signed-off-by: Dani

Re: [PATCH v4 2/4] firmware: encapsulate firmware loading status

2016-09-08 Thread Ming Lei
On Thu, Sep 8, 2016 at 8:26 PM, Daniel Wagner wrote: > Hi Ming, > > On 09/08/2016 01:26 PM, Ming Lei wrote: >> >> On Wed, Sep 7, 2016 at 4:45 PM, Daniel Wagner wrote: >>> >>> From: Daniel Wagner >>> +static int fw_status_wait_timeout(struct fw_sta

Re: [PATCH v4 1/4] firmware: Move umh locking code into fw_load_from_user_helper()

2016-09-08 Thread Ming Lei
On Fri, Sep 9, 2016 at 4:11 AM, Luis R. Rodriguez wrote: > On Thu, Sep 08, 2016 at 11:37:54PM +0800, Ming Lei wrote: >> On Wed, Sep 7, 2016 at 4:45 PM, Daniel Wagner wrote: >> > From: Daniel Wagner >> > >> > When we load the firmware directly we don't n

Re: [PATCH v4 1/4] firmware: Move umh locking code into fw_load_from_user_helper()

2016-09-08 Thread Ming Lei
On Fri, Sep 9, 2016 at 11:39 AM, Luis R. Rodriguez wrote: > On Sep 8, 2016 6:22 PM, "Ming Lei" wrote: >> >> On Fri, Sep 9, 2016 at 4:11 AM, Luis R. Rodriguez >> wrote: >> > On Thu, Sep 08, 2016 at 11:37:54PM +0800, Ming Lei wrote: >> >>

Re: [bisected] "sched: Allow per-cpu kernel threads to run on online && !active" causes warning

2016-08-08 Thread Ming Lei
s simply empty. > > Just had some time to look into this a bit more. Looks like we initialize > the cpu_to_node_masks (way) too late on s390 for fake numa. So Peter's > patch just revealed that problem. > > I'll see if initializing the masks earlier will fix this, but I think it > will. Hello, Is there any fix for this issue? I can see the issue on arm64 running v4.7 kernel too. And the oops can be avoided by reverting commit e9d867a(sched: Allow per-cpu kernel threads to run on online && !active). Thanks, Ming Lei

Re: [PATCH V9 0/7] blk-mq-sched: improve sequential I/O performance

2017-10-13 Thread Ming Lei
On Fri, Oct 13, 2017 at 02:23:07PM -0600, Jens Axboe wrote: > On 10/13/2017 01:21 PM, Jens Axboe wrote: > > On 10/13/2017 01:08 PM, Jens Axboe wrote: > >> On 10/13/2017 12:05 PM, Ming Lei wrote: > >>> Hi Jens, > >>> > >>> In Red Hat internal

Re: [PATCH V9 0/7] blk-mq-sched: improve sequential I/O performance

2017-10-14 Thread Ming Lei
On Fri, Oct 13, 2017 at 02:23:07PM -0600, Jens Axboe wrote: > On 10/13/2017 01:21 PM, Jens Axboe wrote: > > On 10/13/2017 01:08 PM, Jens Axboe wrote: > >> On 10/13/2017 12:05 PM, Ming Lei wrote: > >>> Hi Jens, > >>> > >>> In Red Hat internal

Re: [PATCH V9 4/7] blk-mq: introduce .get_budget and .put_budget in blk_mq_ops

2017-10-14 Thread Ming Lei
On Fri, Oct 13, 2017 at 11:43:44PM +, Bart Van Assche wrote: > On Sat, 2017-10-14 at 02:05 +0800, Ming Lei wrote: > > @@ -89,19 +89,36 @@ static bool blk_mq_sched_restart_hctx(struct > > blk_mq_hw_ctx *hctx) > > return false; > > } > > > > -stat

Re: [PATCH V9 6/7] SCSI: allow to pass null rq to scsi_prep_state_check()

2017-10-14 Thread Ming Lei
On Fri, Oct 13, 2017 at 11:16:12PM +, Bart Van Assche wrote: > On Sat, 2017-10-14 at 02:05 +0800, Ming Lei wrote: > > In the following patch, we will implement scsi_get_budget() > > which need to call scsi_prep_state_check() when rq isn't > > dequeued yet. > &g

[PATCH V10 0/8] blk-mq-sched: improve sequential I/O performance

2017-10-14 Thread Ming Lei
as suggested by Bart, and introduces one helper in sbitmap for this purpose - improve bio merge via hash table from sw queue - add comments about using DISPATCH_BUSY state in lockless way, simplifying handling on busy state, - hold ctx->lock when cleari

[PATCH V10 1/8] blk-mq-sched: dispatch from scheduler only after progress is made on ->dispatch

2017-10-14 Thread Ming Lei
ed-by: Omar Sandoval Reviewed-by: Bart Van Assche Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei --- block/blk-mq-sched.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c index 4ab69435708c..eca011fdfa0e 100644

[PATCH V10 2/8] blk-mq-sched: move actual dispatching into one helper

2017-10-14 Thread Ming Lei
So that it becomes easy to support to dispatch from sw queue in the following patch. No functional change. Reviewed-by: Bart Van Assche Reviewed-by: Omar Sandoval Suggested-by: Christoph Hellwig # for simplifying dispatch logic Signed-off-by: Ming Lei --- block/blk-mq-sched.c | 43

[PATCH V10 4/8] block: kyber: check if there is request in ctx in kyber_has_work()

2017-10-14 Thread Ming Lei
There may be request in sw queue, and not fetched to domain queue yet, so check it in kyber_has_work(). Signed-off-by: Ming Lei --- block/kyber-iosched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/kyber-iosched.c b/block/kyber-iosched.c index f58cab82105b

[PATCH V10 8/8] SCSI: implement .get_budget and .put_budget for blk-mq

2017-10-14 Thread Ming Lei
We need to tell blk-mq for reserving resource before queuing one request, so implement these two callbacks. Then blk-mq can avoid to dequeue request earlier, and IO merge can be improved a lot. Signed-off-by: Ming Lei --- drivers/scsi/scsi_lib.c | 75

[PATCH V10 6/8] blk-mq-sched: improve dispatching from sw queue

2017-10-14 Thread Ming Lei
ng from sw queue by using the callback of .get_budget and .put_budget Reviewed-by: Omar Sandoval Signed-off-by: Ming Lei --- block/blk-mq-sched.c | 74 -- block/blk-mq.c | 39 ++ block/blk-mq.h | 2 ++ i

[PATCH V10 5/8] blk-mq: introduce .get_budget and .put_budget in blk_mq_ops

2017-10-14 Thread Ming Lei
y to get reserved budget first before dequeuing request. Once the budget for queueing I/O can't be satisfied, we don't need to dequeue request at all, then I/O merge can get improved a lot. Signed-off-by: Ming Lei --- block/blk-mq-sched.c | 55 +-

[PATCH V10 7/8] SCSI: allow to pass null rq to scsi_prep_state_check()

2017-10-14 Thread Ming Lei
In the following patch, we will implement scsi_get_budget() which need to call scsi_prep_state_check() when rq isn't dequeued yet. Signed-off-by: Ming Lei --- drivers/scsi/scsi_lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers

<    1   2   3   4   5   6   7   8   9   10   >