On 11/19/22 03:24, Dinu Marius wrote: > I checked the cable and connections. Everything looks OK. The cable is ~ 40cm > long. > > I made these timeout changes: > > const unsigned long sata_deb_timing_normal[] = { 5, 1000, 20000 }; > const unsigned long sata_deb_timing_hotplug[] = { 25, 5000, 20000 }; > > And I have these results: > > [ 180.907460][ T104] hardreset, Online=>Offline > [ 180.912991][ T104] resume, do loop > [ 181.140866][ T104] resume, after do loop > [ 181.200866][ T104] debounce, SCR: 0x100 > [ 181.250866][ T104] debounce, SCR: 0x101 [...] > [ 190.960865][ T104] debounce, SCR: 0x101 > [ 190.964803][ T104] debounce, loop end with timeout > [ 190.968740][ T104] resume, sata_link_debounce check failed > [ 190.973640][ T104] hardreset, sata_link_resume check failed > [ 190.984916][ T104] ata2: COMRESET failed (errno=-32) > > Then it repeats... > Shorter timouts have mostly the same results. It never changes to anything other > than 0x100, 0x101 or 0x0. So the hardware is failing to detect the device presence. No clue why. Only an ATA bus trace could tell us more here (do you have an ATA bus analyzer around ?). So options are: 1) Involve the router vendor and/or SoC vendor to see if they can help. 2) Use UDB connection between your router & drive box ? (if you can) Another thing is: Did you try earlier kernel versions ? Any earlier kernel working ? (I forgot if that is the case). If yes, then we should be able to figure out the change that broke the driver (which may be something changed in the SoC support rather than the mvebu driver itself). gi-bisect will likely not be of any help given that you are not getting a crash. So you will need to try out different kernel versions, starting with LTS kernels, and refine (use Linus tags, including RCs, to find the last working kernel). That may take some time, but will likely narrow down the search for fixing this (if that is possible given the hardware setup you have). > When I connect the laptop HDD I get this: > > [ 453.239378][ T104] resume, do loop > [ 453.450866][ T104] resume, after do loop > [ 453.500866][ T104] debounce, SCR: 0x123 > [ 453.560866][ T104] debounce, SCR: 0x123 > ... same line repeats a lot ... > [ 458.450866][ T104] debounce, SCR: 0x123 > [ 458.510866][ T104] debounce, SCR: 0x123 > [ 458.514804][ T104] resume, return at end of function > [ 458.518741][ T104] hardreset, Offline=>Online > [ 458.528273][ T104] hardreset, sata_pmp_supported, before check_ready > [ 458.534747][ T104] [104] libata:ata_port_classify:344: ata2: found ata > device by sig > [ 458.720868][ T104] [104] libata:ata_port_classify:344: ata2: found ata > device by sig > [ 458.728734][ T104] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300) > [ 459.044097][ T104] [104] libata:ata_dev_configure:2596: ata2.00: > ata_dev_configure: cfg 49:2f00 82:346b 83:7d09 84:6123 85:3469 86:bc09 87:6123 > 88:007f > [ 459.057814][ T104] [104] libata:ata_dump_id:1363: ata2.00: 49==0x2f00 > 53==0x0007 63==0x0407 64==0x0003 75==0x001f > [ 459.057814][ T104] 80==0x01f0 81==0x0029 82==0x346b 83==0x7d09 > 84==0x6123 > [ 459.057814][ T104] 88==0x007f 93==0x0000 > [ 459.079904][ T104] ata2.00: ATA-8: ST9500325AS, 0001SDM1, max UDMA/133 > [ 459.086551][ T104] ata2.00: 976773168 sectors, multi 16: LBA48 NCQ (depth > 32) > [ 459.093816][ T104] [104] libata:ata_dev_set_xfermode:4305: ata2.00: set > features - xfer mode > [ 459.104657][ T104] [104] libata:ata_dev_configure:2596: ata2.00: > ata_dev_configure: cfg 49:2f00 82:346b 83:7d09 84:6123 85:3469 86:bc09 87:6123 > 88:407f > [ 459.118372][ T104] [104] libata:ata_dump_id:1363: ata2.00: 49==0x2f00 > 53==0x0007 63==0x0007 64==0x0003 75==0x001f > [ 459.118372][ T104] 80==0x01f0 81==0x0029 82==0x346b 83==0x7d09 > 84==0x6123 > [ 459.118372][ T104] 88==0x407f 93==0x0000 > [ 459.140464][ T104] [104] libata:ata_dev_set_mode:3344: ata2.00: > xfer_shift=12, xfer_mode=0x46 > [ 459.149116][ T104] ata2.00: configured for UDMA/133 > [ 459.154268][ T82] scsi 1:0:0:0: Direct-Access ATA ST9500325AS > SDM1 PQ: 0 ANSI: 5 > > Can it be a hardware init / setup problem? In the Armada 38x Functional > Specifications there is a chapter about "Amplitude and Pre-emphasize level" at > the end of SATA. It could be. See above about searching for a working kernel version, if there is one. > > Marius Dinu > > -- Damien Le Moal Western Digital Research