Re: MNT Reform2 USB LCP flash

2024-02-09 Thread Paul Ripke
On Sun, Feb 04, 2024 at 10:37:59AM +0200, Staffan Thomen wrote: > According to this random website I found[1]... > > [1] https://www.stix.id.au/wiki/SCSI_Sense_Data Hardly random - and thanks for the reminder, I hadn't updated that for 4 years. Cheers, -- Paul Ripke "Great minds discuss ideas,

Re: MNT Reform2 USB LCP flash

2024-02-05 Thread Jarle Greipsland
Staffan Thomen writes: > Right, with this information is was very easy to put together a patch, > and I can now mount the LPC fake umass device on my netbsd laptop. I > didn't try writing the firmware yet but I'm sure that'll work too. > > Patch follows for anyone who might have need. I assume a

Re: MNT Reform2 USB LCP flash

2024-02-04 Thread Staffan Thomen
On 2/4/24 19:36, Michael van Elst wrote: There seems to be nothing yet for NO_START_STOP. There is PQUIRK_START that forces a start at attach time. But at open time when the unit still does not report ready, we issue the comamnd again (and fail if it doesn't succeed). We probably need

Re: MNT Reform2 USB LCP flash

2024-02-04 Thread Michael van Elst
staf...@shangtai.net (=?UTF-8?B?U3RhZmZhbiBUaG9tw6lu?=) writes: >While I was fiddling around with it, I booted a FreeBSD-14 thumbdrive >and there it does work as well, and their driver helpfully tells you >what quirks it uses. This is what I found: >umass quirks: 0xc104 >0x0004 -

Re: MNT Reform2 USB LCP flash

2024-02-04 Thread Staffan Thomén
Michael van Elst wrote: On Sun, Feb 04, 2024 at 10:37:59AM +0200, Staffan Thomen wrote: [ 214.0188739] umass0: NXP (0x1fc9) LPC1XXX IFLASH (0x000b), rev 2.00/7.04, [ 214.0288745] sd0(umass0:0:0:0): sense debug information: [ 214.0288745] code 0x70 valid 0 [ 214.0288745] seg 0x0 key

Re: MNT Reform2 USB LCP flash

2024-02-04 Thread Michael van Elst
On Sun, Feb 04, 2024 at 10:37:59AM +0200, Staffan Thomen wrote: > [ 214.0188739] umass0: NXP (0x1fc9) LPC1XXX IFLASH (0x000b), rev 2.00/7.04, > [ 214.0288745] sd0(umass0:0:0:0): sense debug information: > [ 214.0288745] code 0x70 valid 0 > [ 214.0288745] seg 0x0 key 0x2 ili 0x0 eom 0x0

Re: MNT Reform2 USB LCP flash

2024-02-04 Thread Staffan Thomen
On 2/4/24 10:12, Michael van Elst wrote: On Sun, Feb 04, 2024 at 09:58:39AM +0200, Staffan Thomén wrote: The man page for scsictl(8) says that SCSIPI_DEBUG is the required option... SCSIPI_DEBUG is it. It should also set the default debug flags (that the ioctl may change). Yep, I just

Re: MNT Reform2 USB LCP flash

2024-02-04 Thread Staffan Thomén
Michael van Elst wrote: On Sat, Feb 03, 2024 at 09:55:47PM +0200, Staffan Thomén wrote: Staffan Thomen wrote: [ 188.679957] sd0: 34816, 1 cyl, 64 head, 32 sec, 512 bytes/sect x 68 sectors [ 188.689958] autoconfiguration error: sd0: unable to open device, error = 5 Any thoughts of how to

Re: MNT Reform2 USB LCP flash

2024-02-04 Thread Michael van Elst
On Sun, Feb 04, 2024 at 09:58:39AM +0200, Staffan Thomén wrote: > > The man page for scsictl(8) says that SCSIPI_DEBUG is the required option... SCSIPI_DEBUG is it. It should also set the default debug flags (that the ioctl may change). Greetings, -- Michael

Re: MNT Reform2 USB LCP flash

2024-02-03 Thread Staffan Thomén
Staffan Thomen wrote: [ 188.679957] sd0: 34816, 1 cyl, 64 head, 32 sec, 512 bytes/sect x 68 sectors [ 188.689958] autoconfiguration error: sd0: unable to open device, error = 5 Any thoughts of how to continue debugging this? Staffan

Re: MNT Reform2 USB LCP flash

2024-02-03 Thread Michael van Elst
On Sat, Feb 03, 2024 at 09:55:47PM +0200, Staffan Thomén wrote: > Staffan Thomen wrote: > > [ 188.679957] sd0: 34816, 1 cyl, 64 head, 32 sec, 512 bytes/sect x 68 > > sectors > > [ 188.689958] autoconfiguration error: sd0: unable to open device, > > error = 5 > > Any thoughts of how to continue

Re: MNT Reform2 USB LCP flash

2024-01-26 Thread Staffan Thomen
Thanks for the suggestions! I tried to do the modification (just manually since it's two lines) and it does show up as 1 in the dmesg, but no dice. dmesg from my laptop since it was easier, this uhub2 is on an ehci bus: [ 188.679957] umass0 at uhub2 port 2 configuration 1 interface 0 [

Re: MNT Reform2 USB LCP flash

2024-01-26 Thread Jason Thorpe
> On Jan 26, 2024, at 2:41 AM, Robert Elz wrote: > >Date:Fri, 26 Jan 2024 09:26:38 - (UTC) >From:mlel...@serpens.de (Michael van Elst) >Message-ID: > > | Fortunately the drive geometry isn't really used anywhere. All > | accesses just use the logical block

Re: MNT Reform2 USB LCP flash

2024-01-26 Thread Michael van Elst
k...@munnari.oz.au (Robert Elz) writes: >I have been meaning to suggest for ages that we remove all the >geometry nonsense from everywhere in the kernel, except those >drivers that actually need it. We use that nonsense without actually knowing. The "cylinder" value is used to sort disk

Re: MNT Reform2 USB LCP flash

2024-01-26 Thread Michael van Elst
k...@munnari.oz.au (Robert Elz) writes: >If you are able, try building a kernel with the patch below. >I suspect this should probably apply without too many problems >to any reasonably modern NetBSD kernel version, patch is to >src/sys/dev/scsipi/sd.c >+ if (dp->cyls == 0) /*

Re: MNT Reform2 USB LCP flash

2024-01-26 Thread Robert Elz
Date:Fri, 26 Jan 2024 09:26:38 - (UTC) From:mlel...@serpens.de (Michael van Elst) Message-ID: | Fortunately the drive geometry isn't really used anywhere. All | accesses just use the logical block addresses. I have been meaning to suggest for ages that we

Re: MNT Reform2 USB LCP flash

2024-01-26 Thread Michael van Elst
staf...@shangtai.net (=?UTF-8?B?U3RhZmZhbiBUaG9tw6lu?=) writes: >[21.611880] scsibus1 at umass1: 2 targets, 1 lun per target >[21.611880] sd1 at scsibus1 target 0 lun 0: 1.0> disk removable >[21.611880] sd1: fabricating a geometry >[21.611880] sd1: 34816, 0 cyl, 64 head, 32 sec,

Re: MNT Reform2 USB LCP flash

2024-01-26 Thread Robert Elz
If you are able, try building a kernel with the patch below. I suspect this should probably apply without too many problems to any reasonably modern NetBSD kernel version, patch is to src/sys/dev/scsipi/sd.c If patch(1) won't just work on your kernel sources, just edit that fike, search for

MNT Reform2 USB LCP flash

2024-01-25 Thread Staffan Thomén
Hey! I asked this first on netbsd-users, but since there were no takers, I decided to try this crowd. I have an MNT Reform2 laptop, and it has something called an LCP (It's a Cortex M0 I think) whose firmware can be updated by turning a switch on the board that enables an internal USB port