aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* Merge git://git.infradead.org/~dedekind/ubi-2.6David Woodhouse2008-02-03
|\
| * UBI: do not flush queue on each vtbl changeArtem Bityutskiy2008-02-01
| | | | | | | | | | | | | | | | This is just not necessary. We re-write whole layout copy, so the old contents cannot show up again sice scan process will drop it. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: implement atomic LEB change ioctlArtem Bityutskiy2008-01-25
| | | | | | | | Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: introduce atomic LEB change ioctlArtem Bityutskiy2008-01-25
| | | | | | | | | | | | | | | | | | We have to be able to change individual LEBs for utilities like ubifsck, ubifstune. For example, ubifsck has to be able to fix errors on the media, ubifstune has to be able to change the the superblock, hence this ioctl. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: handle zero-length caseArtem Bityutskiy2008-01-25
| | | | | | | | | | | | | | ubi_eba_atomic_leb_change() has to just map the LEB to a free PEB if data length is zero. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: simplify internal interfacesArtem Bityutskiy2008-01-25
| | | | | | | | | | | | | | Instead of passing vol_id to all functions and then find struct ubi_volume, pass struct ubi_volume pointer. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: do not change file pointer while updatingArtem Bityutskiy2008-01-25
| | | | | | | | | | | | | | Since we do not change semantics of seek(), changing the file pointer while updating does not make much sense. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: add layout volume informationArtem Bityutskiy2008-01-25
| | | | | | | | | | | | | | | | Add more information about layout volume to make userspace tools use the macros instead of constants. Also rename UBI_LAYOUT_VOL_ID to make it consistent with other macros. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix warningsArtem Bityutskiy2008-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Old gcc complains: CC drivers/mtd/ubi/wl.o drivers/mtd/ubi/wl.c: In function 'wear_leveling_worker': drivers/mtd/ubi/wl.c:746: warning: 'pe' may be used uninitialized in this function CC drivers/mtd/ubi/scan.o drivers/mtd/ubi/scan.c: In function 'ubi_scan': drivers/mtd/ubi/scan.c:772: warning: 'ec' may be used uninitialized in this function drivers/mtd/ubi/scan.c:772: note: 'ec' was declared here Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: add sanity checkArtem Bityutskiy2008-01-25
| | | | | | | | Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: remove bogus assertionArtem Bityutskiy2008-01-25
| | | | | | | | Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: bugfix: calculate data offset properlyArtem Bityutskiy2008-01-25
| | | | | | | | | | | | | | Data offset is VID header offset + VID header size aligned to the min. I/O unit size up. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: amend array sizeArtem Bityutskiy2008-01-25
| | | | | | | | | | | | | | Since the data offset parameter was removed, the size of the parameters array is now 2, not 3. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: add auto-resize featureArtem Bityutskiy2008-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem: NAND flashes have different amount of initial bad physical eraseblocks (marked as bad by the manufacturer). For example, for 256MiB Samsung OneNAND flash there might be from 0 to 40 bad initial eraseblocks, which is about 2%. When UBI is used as the base system, one needs to know the exact amount of good physical eraseblocks, because this number is needed to create the UBI image which is put to the devices during production. But this number is not know, which forces us to use the minimum number of good physical eraseblocks. And UBI additionally reserves some percentage of physical eraseblocks for bad block handling (default is 1%), so we have 1-3% of PEBs reserved at the end, depending on the amount of initial bad PEBs. But it is desired to always have 1% (or more, depending on the configuration). Solution: this patch adds an "auto-resize" flag to the volume table. The volume which has the "auto-resize" flag will automatically be re-sized (enlarged) on the first UBI initialization. UBI clears the flag when the volume is re-sized. Only one volume may have the "auto-resize" flag. So, the production UBI image may have one volume with "auto-resize" flag set, and its size is automatically adjusted on the first boot of the device. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: use bit-fieldsArtem Bityutskiy2008-01-25
| | | | | | | | | | | | Save 12 bytes of RAM per volume by using bit-fields instead of integers. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: fix warningsArtem Bityutskiy2008-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | drivers/mtd/ubi/cdev.c: In function ‘vol_cdev_read’: drivers/mtd/ubi/cdev.c:187: warning: unused variable ‘vol_id’ CC [M] drivers/mtd/ubi/kapi.o drivers/mtd/ubi/kapi.c: In function ‘ubi_leb_erase’: drivers/mtd/ubi/kapi.c:483: warning: unused variable ‘vol_id’ drivers/mtd/ubi/kapi.c: In function ‘ubi_leb_unmap’: drivers/mtd/ubi/kapi.c:544: warning: unused variable ‘vol_id’ drivers/mtd/ubi/kapi.c: In function ‘ubi_leb_map’: drivers/mtd/ubi/kapi.c:582: warning: unused variable ‘vol_id’ Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
| * UBI: get rid of ubi_ltree_slabArtem Bityutskiy2008-01-25
| | | | | | | | | | | | | | | | | | This slab cache is not really needed since the number of objects is low and the constructor does not make much sense because we allocate oblects when doint I/O, which is way slower then allocation. Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
* | [MTD] [NAND] Fix Blackfin NFC ECC calculating bug with page size 512 bytesBryan Wu2008-02-03
| | | | | | | | | | Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] [NAND] Remove wrong operation in PM function of the BF54x NFC driverBryan Wu2008-02-03
| | | | | | | | | | | | | | There is no suspend/resume operation in NFC driver at all, currently. Signed-off-by: Bryan Wu <bryan.wu@analog.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | [MTD] [NAND] Remove unused variable in plat_nand_removeLi Zefan2008-02-03
| | | | | | | | | | | | | | | | With CONFIG_MTD_PARTITIONS not set, got this: drivers/mtd/nand/plat_nand.c:113: warning: unused variable 'pdata' Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | Merge git://git.infradead.org/~kmpark/onenand-mtd-2.6David Woodhouse2008-02-03
|\ \
| * | [MTD] [OneNAND] Use pre-alloced oob buffer instead of local bufferKyungmin Park2008-01-29
| | | | | | | | | | | | Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * | [MTD] [OneNAND] Use the u_char instead of char in oobbufSheng Yongjie (Sam2008-01-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | In function onenand_verify_oob, local variable oobbuf shall be unsigned char. In the case of a value is >= 0x80, it's unequal in comparing the value in an unsigned char and signed char. Signed-off-by: Sheng Yongjie (Sam) <samsheng@trident.com.cn> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * | [MTD] [OneNAND] Check the initial bad block using ONENAND_CTRL_ERRORKyungmin Park2008-01-29
| | | | | | | | | | | | | | | | | | Some chips don't set the ONENAND_CTRL_LOAD bit. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * | [MTD] [OneNAND] Get correct density from device IDKyungmin Park2008-01-29
| | | | | | | | | | | | | | | | | | Use the higher bits for other purpose. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * | [MTD] [OneNAND] Consolidate OneNAND operation orderKyungmin Park2008-01-29
| | | | | | | | | | | | | | | | | | | | | Consolidate OneNAND operation order as OneNAND Spec. It also doesn't break previous operation order. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * | [MTD] [OneNAND] fix call to onenand_verify when writing subpagesAdrian Hunter2008-01-29
| | | | | | | | | | | | | | | Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * | [MTD] [OneNAND] Do not release chip twiceAdrian Hunter2008-01-29
| | | | | | | | | | | | | | | Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* | | Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.gitDavid Woodhouse2008-02-03
|\ \ \
| * \ \ Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6Linus Torvalds2008-02-02
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (95 commits) ide-tape: remove idetape_config_t typedef ide-tape: remove mtio.h related comments ide-tape: make function name more accurate ide-tape: remove unused sense packet commands. ide-tape: use generic byteorder macros ide-tape: remove EXPERIMENTAL driver status ide-tape: use generic scsi commands ide-tape: remove struct idetape_block_size_page_t ide-tape: remove structs os_partition_t, os_dat_entry_t, os_dat_t ide-tape: remove struct idetape_parameter_block_descriptor_t ide-tape: remove struct idetape_medium_partition_page_t ide-tape: remove struct idetape_data_compression_page_t ide-tape: remove struct idetape_inquiry_result_t ide-tape: remove struct idetape_capabilities_page_t ide-tape: remove IDETAPE_DEBUG_BUGS ide-tape: remove IDETAPE_DEBUG_INFO ide-tape: dump gcw fields on error in idetape_identify_device() ide-tape: remove struct idetape_mode_parameter_header_t ide-tape: remove struct idetape_request_sense_result_t ide-tape: remove dead code ...
| | * | | ide-tape: remove idetape_config_t typedefBorislav Petkov2008-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since this is used only in idetape_blkdev_ioctl(), remove the typedef and make the struct function-local. Bart: - s/sizeof(struct idetape_config)/sizeof(config)/ Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| | * | | ide-tape: remove mtio.h related commentsBorislav Petkov2008-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Those are already in mtio.h. Bart: - undo 'unsigned int/unsigned long' -> 'uint/ulong' conversion Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| | * | | ide-tape: make function name more accurateBorislav Petkov2008-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | idetape_active_next_stage() was rather ambiguous wrt its purpose. Make that more explicit and remove superfluous comment. Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| | * | | ide-tape: remove unused sense packet commands.Borislav Petkov2008-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| | * | | ide-tape: use generic byteorder macrosBorislav Petkov2008-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is not a network driver. Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| | * | | ide-tape: remove EXPERIMENTAL driver statusBorislav Petkov2008-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ide-tape has depended on EXPERIMENTAL for ages. Change that since the driver is being only maintained now. Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| | * | | ide-tape: use generic scsi commandsBorislav Petkov2008-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, remove those which weren't used. Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| | * | | ide-tape: remove struct idetape_block_size_page_tBorislav Petkov2008-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| | * | | ide-tape: remove structs os_partition_t, os_dat_entry_t, os_dat_tBorislav Petkov2008-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They seem just to sit there completely unused. Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| | * | | ide-tape: remove struct idetape_parameter_block_descriptor_tBorislav Petkov2008-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, shorten function name idetape_get_blocksize_from_block_descriptor() and move its definition up thereby getting rid of its forward declaration. Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| | * | | ide-tape: remove struct idetape_medium_partition_page_tBorislav Petkov2008-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There should be no functional changes resulting from this patch. Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| | * | | ide-tape: remove struct idetape_data_compression_page_tBorislav Petkov2008-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There should be no functional changes resulting from this patch. Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| | * | | ide-tape: remove struct idetape_inquiry_result_tBorislav Petkov2008-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There should be no functional changes resulting from this patch. Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| | * | | ide-tape: remove struct idetape_capabilities_page_tBorislav Petkov2008-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All those 2-byte values denoting the different capabilities are being written to the local copy of the caps buffer without being converted to big endian for simplicity of usage and shorter code later. Also, we add some comments stating which are the fields of the caps page in question in order to alleviate the cryptic pointer casting exercises as in e.g. idetape_get_mode_sense_results(). There should be no functional changes resulting from this patch. Bart: - remove two needless "!!" Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| | * | | ide-tape: remove IDETAPE_DEBUG_BUGSBorislav Petkov2008-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| | * | | ide-tape: remove IDETAPE_DEBUG_INFOBorislav Petkov2008-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The device capabilities are probed for during device initialization so this info is available through proc/ioctl() und it is redundant here. Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| | * | | ide-tape: dump gcw fields on error in idetape_identify_device()Bartlomiej Zolnierkiewicz2008-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | Cc: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| | * | | ide-tape: remove struct idetape_mode_parameter_header_tBorislav Petkov2008-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bart: - remove 'capabilities->speed' chunk - re-add brackets to block_descrp assignment Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| | * | | ide-tape: remove struct idetape_request_sense_result_tBorislav Petkov2008-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bart: - remove unnecessary comment change - remove two needless "!!" Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| | * | | ide-tape: remove dead codeBorislav Petkov2008-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>