El jue, 23 mar 2023 a las 13:47, Tudor Ambarus (<tudor.ambarus@xxxxxxxxxx>) escribió: > > Hi, > > On 3/23/23 12:45, Álvaro Fernández Rojas wrote: > > Some devices hang when block protection is enabled, so let's add a boolean > > property to allow disabling it. > > > > Why do they hang? At first I thought it would be due to the low level op not being supported on BCM63268 brcmnand controllers, but after debugging it seemed to be working... This is the log with block protection disabled: [ 0.495831] bcm6368_nand 10000200.nand: there is not valid maps for state default [ 0.504995] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xf1 [ 0.511526] nand: Macronix MX30LF1G18AC [ 0.515586] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 [ 0.523516] bcm6368_nand 10000200.nand: detected 128MiB total, 128KiB blocks, 2KiB pages, 16B OOB, 8-bit, BCH-4 [ 0.535912] Bad block table found at page 65472, version 0x01 [ 0.544268] Bad block table found at page 65408, version 0x01 [ 0.954329] 9 fixed-partitions partitions found on MTD device brcmnand.0 ... This is the log with block protection enabled: [ 0.495095] bcm6368_nand 10000200.nand: there is not valid maps for state default [ 0.504249] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xf1 [ 0.510772] nand: Macronix MX30LF1G18AC [ 0.514874] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64 [ 0.522780] bcm6368_nand 10000200.nand: detected 128MiB total, 128KiB blocks, 2KiB pages, 16B OOB, 8-bit, BCH-4 [ 0.539687] Bad block table not found for chip 0 [ 0.550153] Bad block table not found for chip 0 [ 0.555069] Scanning device for bad blocks [ 0.601213] CPU 1 Unable to handle kernel paging request at virtual address 10277f00, epc == 8039ce70, ra == 8016ad50 *** Device hangs *** As you can see, when block protection is enabled, the bad block table isn't found and when the device is scanned for bad blocks it just hangs... If you want me to debug something I would be happy to do it, but I need some guidance here... Best regards, Álvaro.