aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-07-19spi/s3c64xx: Fix handling of errors in gpio_request()Mark Brown1-4/+5
When gpio_request() fails the driver logged the failure but while it'd try to print an error code in the non-DT case it didn't pass the error code in so garbage would be logged and in the DT case the error wasn't logged. Further, in the non-DT case the error code was then overwritten with -EBUSY depriving the caller of information and breaking automatic probe deferral pushing back from the GPIO level. Also reformat the non-DT log message so it's not word wrapped and we can grep for it. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Kukjin Kim <[email protected]>
2012-07-19ARM: S3C64XX: Clean up after SPI driver platform data updatesMark Brown1-1/+0
Commit 1c20c2 (spi: s3c64xx: Remove the 'set_level' callback from controller data) didn't update all the users, breaking the build. Fix that. Signed-off-by: Mark Brown <[email protected]> Signed-off-by: Kukjin Kim <[email protected]>
2012-07-19ARM: SAMSUNG: no need to set the value for clk_xusbxti when it is 24MhzKukjin Kim7-15/+6
Since clk_xusbxti.rate is 24Mhz as a default, so we don't need to set that when it is 24Mhz. Signed-off-by: Kukjin Kim <[email protected]>
2012-07-19Merge branch 'next/board-samsung-2' into next/board-samsung-3Kukjin Kim12-10/+107
2012-07-19Merge branch 'next/dt-samsung' into next/devel-samsung-spiKukjin Kim35-406/+1057
2012-07-18Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pendingLinus Torvalds3-4/+7
Pull target fixes from Nicholas Bellinger: "This includes a bugfix from MDR to address a NULL pointer OOPs with FCoE aborts, along with a WRITE_SAME emulation bugfix for NOLB=0 cases, and persistent reservation return cleanups from Roland. All three patches are CC'ed to stable." * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: target: Fix range calculation in WRITE SAME emulation when num blocks == 0 target: Clean up returning errors in PR handling code tcm_fc: Fix crash seen with aborts and large reads
2012-07-18kexec: update URL of kexec homepageOlaf Hering1-1/+1
The referenced html file does not exist anymore. Replace the URL with the current project homepage. Signed-off-by: Olaf Hering <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-07-18mips: fix bug.h build regressionYoichi Yuasa2-1/+1
Commit 377780887 ("bug.h: need linux/kernel.h for TAINT_WARN.") broke all MIPS builds: CC arch/mips/kernel/machine_kexec.o include/linux/log2.h: In function '__ilog2_u32': include/linux/log2.h:34:2: error: implicit declaration of function 'fls' [-Werror=implicit-function-declaration] include/linux/log2.h: In function '__ilog2_u64': include/linux/log2.h:42:2: error: implicit declaration of function 'fls64' [-Werror=implicit-function-declaration] ... Signed-off-by: Yoichi Yuasa <[email protected]> Tested-by: John Crispin <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: David Daney <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-07-18Make wait_for_device_probe() also do scsi_complete_async_scans()Linus Torvalds5-17/+2
Commit a7a20d103994 ("sd: limit the scope of the async probe domain") make the SCSI device probing run device discovery in it's own async domain. However, as a result, the partition detection was no longer synchronized by async_synchronize_full() (which, despite the name, only synchronizes the global async space, not all of them). Which in turn meant that "wait_for_device_probe()" would not wait for the SCSI partitions to be parsed. And "wait_for_device_probe()" was what the boot time init code relied on for mounting the root filesystem. Now, most people never noticed this, because not only is it timing-dependent, but modern distributions all use initrd. So the root filesystem isn't actually on a disk at all. And then before they actually mount the final disk filesystem, they will have loaded the scsi-wait-scan module, which not only does the expected wait_for_device_probe(), but also does scsi_complete_async_scans(). [ Side note: scsi_complete_async_scans() had also been partially broken, but that was fixed in commit 43a8d39d0137 ("fix async probe regression"), so that same commit a7a20d103994 had actually broken setups even if you used scsi-wait-scan explicitly ] Solve this problem by just moving the scsi_complete_async_scans() call into wait_for_device_probe(). Everybody who wants to wait for device probing to finish really wants the SCSI probing to complete, so there's no reason not to do this. So now "wait_for_device_probe()" really does what the name implies, and properly waits for device probing to finish. This also removes the now unnecessary extra calls to scsi_complete_async_scans(). Reported-and-tested-by: Artem S. Tashkinov <[email protected]> Cc: Dan Williams <[email protected]> Cc: Alan Stern <[email protected]> Cc: James Bottomley <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: linux-scsi <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2012-07-19Merge branch 'pm-qos'Rafael J. Wysocki2-2/+2
* pm-qos: PM / QoS: Use NULL pointer instead of plain integer in qos.c PM / QoS: Use NULL pointer instead of plain integer in pm_qos.h
2012-07-19Merge branch 'pm-doc'Rafael J. Wysocki1-4/+5
* pm-doc: PM / Documentation: fix typos in power management description
2012-07-19Merge branch 'pm-drivers'Rafael J. Wysocki18-150/+104
* pm-drivers: rtc-cmos: report wakeups from interrupt handler PM / crypto / ux500: Use struct dev_pm_ops for power management PM / IPMI: Remove empty legacy PCI PM callbacks tpm_nsc: Use struct dev_pm_ops for power management tpm_tis: Use struct dev_pm_ops for power management tpm_atmel: Use struct dev_pm_ops for power management PM / TPM: Drop unused pm_message_t argument from tpm_pm_suspend() omap-rng: Use struct dev_pm_ops for power management mg_disk: Use struct dev_pm_ops for power management msi-laptop: Use struct dev_pm_ops for power management hdaps: Use struct dev_pm_ops for power management sonypi: Use struct dev_pm_ops for power management intel_mid_thermal: Use struct dev_pm_ops for power management acer-wmi: Use struct dev_pm_ops for power management intel_ips: Remove empty legacy PM callbacks thinkpad_acpi: Use struct dev_pm_ops instead of legacy PM routines thinkpad_acpi: Drop pm_message_t arguments from suspend routines
2012-07-19Merge branch 'pm-acpi'Rafael J. Wysocki22-118/+148
* pm-acpi: (24 commits) olpc-xo15-sci: Use struct dev_pm_ops for power management ACPI / PM: Drop PM callbacks from the ACPI bus type ACPI / PM: Drop legacy driver PM callbacks that are not used any more ACPI / PM: Do not execute legacy driver PM callbacks acpi_power_meter: Use struct dev_pm_ops for power management fujitsu-tablet: Use struct dev_pm_ops for power management classmate-laptop: Use struct dev_pm_ops for power management xo15-ebook: Use struct dev_pm_ops for power management toshiba_bluetooth: Use struct dev_pm_ops for power management panasonic-laptop: Use struct dev_pm_ops for power management sony-laptop: Use struct dev_pm_ops for power management hp_accel: Use struct dev_pm_ops for power management toshiba_acpi: Use struct dev_pm_ops for power management ACPI: Use struct dev_pm_ops for power management in the SBS driver ACPI: Use struct dev_pm_ops for power management in the power driver ACPI: Use struct dev_pm_ops for power management in the button driver ACPI: Use struct dev_pm_ops for power management in the battery driver ACPI: Use struct dev_pm_ops for power management in the AC driver ACPI: Use struct dev_pm_ops for power management in processor driver ACPI: Use struct dev_pm_ops for power management in the thermal driver ...
2012-07-19Merge branch 'pm-sleep'Rafael J. Wysocki12-35/+191
* pm-sleep: PM / Sleep: Require CAP_BLOCK_SUSPEND to use wake_lock/wake_unlock PM / Sleep: Add missing static storage class specifiers in main.c PM / Sleep: Fix build warning in sysfs.c for CONFIG_PM_SLEEP unset PM / Hibernate: Print hibernation/thaw progress indicator one line at a time. PM / Sleep: Separate printing suspend times from initcall_debug PM / Sleep: add knob for printing device resume times ftrace: Disable function tracing during suspend/resume and hibernation, again PM / Hibernate: Enable suspend to both for in-kernel hibernation.
2012-07-19Merge branch 'pm-domains'Rafael J. Wysocki5-75/+290
* pm-domains: PM / Domains: Fix build warning for CONFIG_PM_RUNTIME unset PM / Domains: Replace plain integer with NULL pointer in domain.c file PM / Domains: Add missing static storage class specifier in domain.c file PM / Domains: Allow device callbacks to be added at any time PM / Domains: Add device domain data reference counter PM / Domains: Add preliminary support for cpuidle, v2 PM / Domains: Do not stop devices after restoring their states PM / Domains: Use subsystem runtime suspend/resume callbacks by default
2012-07-19Merge branch 'pm-cpuidle'Rafael J. Wysocki10-85/+100
2012-07-19PM / QoS: Use NULL pointer instead of plain integer in qos.cSachin Kamat1-1/+1
Fix the following sparse warning: drivers/base/power/qos.c:465:29: warning: Using plain integer as NULL pointer Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2012-07-19PM / QoS: Use NULL pointer instead of plain integer in pm_qos.hSachin Kamat1-1/+1
Fix the following sparse warning: include/linux/pm_qos.h:69:28: warning: Using plain integer as NULL pointer Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2012-07-19PM / Sleep: Require CAP_BLOCK_SUSPEND to use wake_lock/wake_unlockRafael J. Wysocki1-0/+7
Require processes wanting to use the wake_lock/wake_unlock sysfs files to have the CAP_BLOCK_SUSPEND capability, which also is required for the eventpoll EPOLLWAKEUP flag to be effective, so that all interfaces related to blocking autosleep depend on the same capability. Signed-off-by: Rafael J. Wysocki <[email protected]> Cc: [email protected] Acked-by: Michael Kerrisk <[email protected]>
2012-07-18Merge branch 'fixes' into pm-sleepRafael J. Wysocki354-2061/+3390
The 'fixes' branch contains material the next commit depends on.
2012-07-18PM / Sleep: Add missing static storage class specifiers in main.cSachin Kamat1-4/+4
Fix the following sparse warnings: drivers/base/power/main.c:48:1: warning: symbol 'dpm_prepared_list' was not declared. Should it be static? drivers/base/power/main.c:49:1: warning: symbol 'dpm_suspended_list' was not declared. Should it be static? drivers/base/power/main.c:50:1: warning: symbol 'dpm_late_early_list' was not declared. Should it be static? drivers/base/power/main.c:51:1: warning: symbol 'dpm_noirq_list' was not declared. Should it be static? Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2012-07-18regmap: Fix incorrect arguments to kzalloc() callDimitris Papastamos1-1/+1
Signed-off-by: Dimitris Papastamos <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2012-07-18tile: updates to pci root complex from community feedbackChris Metcalf3-64/+47
Reviewed-by: Bjorn Helgaas <[email protected]> Signed-off-by: Chris Metcalf <[email protected]>
2012-07-18Merge branch 'for-linus' of ↵Linus Torvalds2-2/+4
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull SELinux regression fixes from James Morris. Andrew Morton has a box that hit that open perms problem. I also renamed the "epollwakeup" selinux name for the new capability to be "block_suspend", to match the rename done by commit d9914cf66181 ("PM: Rename CAP_EPOLLWAKEUP to CAP_BLOCK_SUSPEND"). * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: SELinux: do not check open perms if they are not known to policy SELinux: include definition of new capabilities
2012-07-18bounce: allow use of bounce pool via config optionChris Metcalf2-3/+11
The tilegx USB OHCI support needs the bounce pool since we're not using the IOMMU to handle 32-bit addresses. Signed-off-by: Chris Metcalf <[email protected]>
2012-07-18usb: add host support for the tilegx architectureChris Metcalf8-0/+541
This change adds OHCI and EHCI support for the tilegx's on-chip USB hardware. Signed-off-by: Chris Metcalf <[email protected]>
2012-07-18arch/tile: provide kernel support for the tilegx USB shimChris Metcalf9-0/+413
This change adds support for accessing the USB shim from within the kernel. Note that this change by itself does not allow the kernel to act as a host or as a device; it merely exposes the built-in on-chip hardware to the kernel. The <arch/usb_host.h> and <arch/usb_host_def.h> headers are empty at the moment because the kernel does not require any types or definitions specific to the tilegx USB shim; the generic USB core code is all we need. The headers are left in as stubs so that we don't need to modify the hypervisor header (drv_usb_host_intf.h) from upstream. Signed-off-by: Chris Metcalf <[email protected]>
2012-07-18tile pci: enable IOMMU to support DMA for legacy devicesChris Metcalf8-203/+588
This change uses the TRIO IOMMU to map the PCI DMA space and physical memory at different addresses. We also now use the dma_mapping_ops to provide support for non-PCI DMA, PCIe DMA (64-bit) and legacy PCI DMA (32-bit). We use the kernel's software I/O TLB framework (i.e. bounce buffers) for the legacy 32-bit PCI device support since there are a limited number of TLB entries in the IOMMU and it is non-trivial to handle indexing, searching, matching, etc. For 32-bit devices the performance impact of bounce buffers should not be a concern. Signed-off-by: Chris Metcalf <[email protected]>
2012-07-18arch/tile: enable ZONE_DMA for tilegxChris Metcalf4-13/+28
This is required for PCI root complex legacy support and USB OHCI root complex support. With this change tilegx now supports allocating memory whose PA fits in 32 bits. Signed-off-by: Chris Metcalf <[email protected]>
2012-07-18tilegx pci: support I/O to arbitrarily-cached pagesChris Metcalf7-171/+278
The tilegx PCI root complex support (currently only in linux-next) is limited to pages that are homed on cached in the default manner, i.e. "hash-for-home". This change supports delivery of I/O data to pages that are cached in other ways (locally on a particular core, uncached, user-managed incoherent, etc.). A large part of the change is supporting flushing pages from cache on particular homes so that we can transition the data that we are delivering to or from the device appropriately. The new homecache_finv* routines handle this. Some changes to page_table_range_init() were also required to make the fixmap code work correctly on tilegx; it hadn't been used there before. We also remove some stub mark_caches_evicted_*() routines that were just no-ops anyway. Signed-off-by: Chris Metcalf <[email protected]>
2012-07-18tile: remove unused headerPaul Bolle1-33/+0
Nothing includes memprof.h. Nothing uses the macros it defines. It seems it is just a remnant of the proposed memprof functionality, which got dropped before the Tilera architecture got added to the tree. This header can safely be removed. Signed-off-by: Paul Bolle <[email protected]> Signed-off-by: Chris Metcalf <[email protected]>
2012-07-18arch/tile: tilegx PCI root complex supportChris Metcalf7-20/+1648
This change implements PCIe root complex support for tilegx using the kernel support layer for accessing the TRIO hardware shim. Reviewed-by: Bjorn Helgaas <[email protected]> [changes in 07487f3] Signed-off-by: Chris Metcalf <[email protected]>
2012-07-18net: Statically initialize init_net.dev_base_headRustad, Mark D2-2/+5
This change eliminates an initialization-order hazard most recently seen when netprio_cgroup is built into the kernel. With thanks to Eric Dumazet for catching a bug. Signed-off-by: Mark Rustad <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-07-18Merge branch 'timers-urgent-for-linus' of ↵Linus Torvalds1-2/+6
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip One more time/ntp fix pulled from Ingo Molnar. * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: ntp: Fix STA_INS/DEL clearing bug
2012-07-18v4l2-dev: forgot to add VIDIOC_DV_TIMINGS_CAP.Hans Verkuil1-0/+1
The VIDIOC_DV_TIMINGS_CAP ioctl check wasn't added to determine_valid_ioctls(). This caused this ioctl to always return -ENOTTY. The cause for this was that for 3.5 two patch series were merged, one changing V4L2 core ioctl handling and one adding new functionality, and some of the new functionality wasn't handled by the new V4L2 core code. Signed-off-by: Hans Verkuil <[email protected]> [ Taking it directly due to vacations - Linus ] Signed-off-by: Linus Torvalds <[email protected]>
2012-07-18Merge tag 'fixes-for-linus' of ↵Linus Torvalds9-464/+451
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes for SPEAr from Olof Johansson: "These are arriving very late in the release cycle, but there has been a change of maintainers on the SPEAr platform and they have needed a while to get going. The patch count is higher than I would like at this point, but they're all relevant fixes and well-contained in their own platform code. I still think it's suitable 3.5 material and I don't think it should increase the need for a -rc8 since they are so contained." * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: SPEAr600: Fix timer interrupt definition in spear600.dtsi ARM: dts: SPEAr320: Boot the board in EXTENDED_MODE ARM: dts: SPEAr320: Fix compatible string Clk: SPEAr1340: Update sys clock parent array clk: SPEAr1340: Fix clk enable register for uart1 and i2c1. ARM: SPEAr13xx: Fix Interrupt bindings Clk:spear6xx:Fix: Rename clk ids within predefined limit Clk:spear3xx:Fix: Rename clk ids within predefined limit clk:spear1310:Fix: Rename clk ids within predefined limit clk:spear1340:Fix: Rename clk ids within predefined limit
2012-07-18Merge tag 'ep93xx-devel-for-3.6' of git://github.com/RyanMallon/linux-ep93xx ↵Arnd Bergmann4-0/+124
into next/soc From Ryan Mallon <[email protected]>: * tag 'ep93xx-devel-for-3.6' of git://github.com/RyanMallon/linux-ep93xx: ep93xx: Add IDE support to edb93xx boards ep93xx: IDE driver platform support code Signed-off-by: Arnd Bergmann <[email protected]>
2012-07-18Merge tag 'ep93xx-fixes-for-3.6' of git://github.com/RyanMallon/linux-ep93xx ↵Arnd Bergmann1-2/+2
into next/fixes-non-critical From Ryan Mallon <[email protected]>: * tag 'ep93xx-fixes-for-3.6' of git://github.com/RyanMallon/linux-ep93xx: arm: ep93xx: Enable i2c support for ep9302 Signed-off-by: Arnd Bergmann <[email protected]>
2012-07-18ARM:vt8500: Convert to use .restart and remove arch_reset()Tony Prisk6-15/+78
Removed system.h as it only contained an inline for arch_reset() Changed the existing board files to use .restart in there machine descriptions. Added device tree support for the restart controller. Device tree support for mach-vt8500 is still a work-in-progress. Signed-off-by: Tony Prisk <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
2012-07-18MAINTAINERS: Changes in qlcnic and qlge maintainers listAnirban Chakraborty1-2/+1
Please apply. Thanks. Signed-off-by: Anirban Chakraborty <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-07-18Merge git://git.samba.org/sfrench/cifs-2.6Linus Torvalds4-15/+66
Pull CIFS fixes from Steve French. * git://git.samba.org/sfrench/cifs-2.6: cifs: always update the inode cache with the results from a FIND_* cifs: when CONFIG_HIGHMEM is set, serialize the read/write kmaps cifs: on CONFIG_HIGHMEM machines, limit the rsize/wsize to the kmap space Initialise mid_q_entry before putting it on the pending queue
2012-07-18cipso: don't follow a NULL pointer when setsockopt() is calledPaul Moore1-2/+4
As reported by Alan Cox, and verified by Lin Ming, when a user attempts to add a CIPSO option to a socket using the CIPSO_V4_TAG_LOCAL tag the kernel dies a terrible death when it attempts to follow a NULL pointer (the skb argument to cipso_v4_validate() is NULL when called via the setsockopt() syscall). This patch fixes this by first checking to ensure that the skb is non-NULL before using it to find the incoming network interface. In the unlikely case where the skb is NULL and the user attempts to add a CIPSO option with the _TAG_LOCAL tag we return an error as this is not something we want to allow. A simple reproducer, kindly supplied by Lin Ming, although you must have the CIPSO DOI #3 configure on the system first or you will be caught early in cipso_v4_validate(): #include <sys/types.h> #include <sys/socket.h> #include <linux/ip.h> #include <linux/in.h> #include <string.h> struct local_tag { char type; char length; char info[4]; }; struct cipso { char type; char length; char doi[4]; struct local_tag local; }; int main(int argc, char **argv) { int sockfd; struct cipso cipso = { .type = IPOPT_CIPSO, .length = sizeof(struct cipso), .local = { .type = 128, .length = sizeof(struct local_tag), }, }; memset(cipso.doi, 0, 4); cipso.doi[3] = 3; sockfd = socket(AF_INET, SOCK_DGRAM, 0); #define SOL_IP 0 setsockopt(sockfd, SOL_IP, IP_OPTIONS, &cipso, sizeof(struct cipso)); return 0; } CC: Lin Ming <[email protected]> Reported-by: Alan Cox <[email protected]> Signed-off-by: Paul Moore <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-07-18ext4: fix duplicated mnt_drop_write call in EXT4_IOC_MOVE_EXTAl Viro1-1/+0
Caused, AFAICS, by mismerge in commit ff9cb1c4eead ("Merge branch 'for_linus' into for_linus_merged") Signed-off-by: Al Viro <[email protected]> Cc: Theodore Ts'o <[email protected]> Cc: [email protected] # 3.3+ Signed-off-by: Linus Torvalds <[email protected]>
2012-07-18UBI: harmonize the update of ubi->beb_rsvd_pebsShmulik Ladkani3-18/+26
Currently, there are several locations where an attempt to reserve more PEBs for bad PEB handling is made, with the same code being duplicated. Harmonize it by introducing 'ubi_update_reserved()'. Also, improve the debug message issued, making it more descriptive. Artem: amended the patch a little. Signed-off-by: Shmulik Ladkani <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]>
2012-07-18UBI: trivial: fix comment of ubi_calculate_reserved functionShmulik Ladkani1-1/+1
The function name within the comment was not aligned with the actual function name. Signed-off-by: Shmulik Ladkani <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]>
2012-07-18Merge branch 'linus' into timers/coreIngo Molnar66-270/+461
Resolve semantic conflict in kernel/time/timekeeping.c. Signed-off-by: Ingo Molnar <[email protected]>
2012-07-18Merge branch 'tip/perf/core' of ↵Ingo Molnar1-0/+4
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace into perf/core Pull tracing fix from Steve Rostedt. Signed-off-by: Ingo Molnar <[email protected]>
2012-07-18Merge branch 'linus' into perf/coreIngo Molnar331-1775/+2887
Pick up the latest ring-buffer fixes, before applying a new fix. Signed-off-by: Ingo Molnar <[email protected]>
2012-07-18UBI: fix spelling of detach in debug outputPeter Meerwald1-1/+1
Signed-off-by: Peter Meerwald <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]>
2012-07-18UBI: Change the default percentage of reserved PEBRichard Genoud1-1/+1
The actual value (1%) is too low for actual NAND devices, a huge majority of device has 2% maximum bad blocks (SLC or MLC). (Actually it's 20 blocks on a 1024 blocks device, 40/2048...) Signed-off-by: Richard Genoud <[email protected]>