RE: USB ports on Lenovo T400 do not work after a suspend/resume

2013-07-07 Thread Hans Petter Selasky
Hi,

FYI: The USB stack will currently run a complete controller reset upon resume, 
like during boot.

--HPS 

 
-Original message-
> From:Ian Smith mailto:smi...@nimnet.asn.au> >
> Sent: Sunday 7th July 2013 7:52
> To: Adrian Chadd mailto:adr...@freebsd.org> >
> Cc: freebsd-acpi@freebsd.org  ; 
> freebsd-sta...@freebsd.org  ; 
> freebsd-...@freebsd.org  
> Subject: Re: USB ports on Lenovo T400 do not work after a suspend/resume
> 
> On Sun, 30 Jun 2013 15:02:57 -0700, Adrian Chadd wrote:
>  > On 30 June 2013 07:22, Ian Smith   > wrote:
> [..]
>  > > Nothing of note that I can see, if that usb hub-to-bus remapping is
>  > > normal.  As you said, 'CPU0: local APIC error 0x40' looks maybe sus.
>  > > Maybe someone who knows might comment on that?
> 
> Does noone know what that signifies?  Maybe it's not relevant to this.
> 
>  > > Just checking: you've tried other USB devices apart from uftdi0?
>  > 
>  > Yup, there's no 5v on the port.
> 
> I was rather taken aback to hear this.  Would not this indicate a 
> failure to reinitialise the basic underlying USB hardware on resume?
> 
> More than a bit bemused, Ian
> ___
> freebsd-acpi@freebsd.org   mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-acpi 
>  
> To unsubscribe, send any mail to "freebsd-acpi-unsubscr...@freebsd.org 
>  "
> 

___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to "freebsd-acpi-unsubscr...@freebsd.org"


Re: USB ports on Lenovo T400 do not work after a suspend/resume

2013-07-07 Thread Jeremy Chadwick
On Sun, Jul 07, 2013 at 03:51:12PM +1000, Ian Smith wrote:
> On Sun, 30 Jun 2013 15:02:57 -0700, Adrian Chadd wrote:
>  > On 30 June 2013 07:22, Ian Smith  wrote:
> [..]
>  > > Nothing of note that I can see, if that usb hub-to-bus remapping is
>  > > normal.  As you said, 'CPU0: local APIC error 0x40' looks maybe sus.
>  > > Maybe someone who knows might comment on that?
> 
> Does noone know what that signifies?  Maybe it's not relevant to this.

It's too vague to know.  The error comes from lapic_handle_error(),
which is a generic/small routine which pulls the local APIC error status
register.  (Note I'm saying APIC, not ACPI -- two different things)

apic_vector.S sets this up/makes use of this function, and its done as
an interrupt handler.

I think this is one of those situations where you have to know *what* is
being set up/done at that moment in time for the error code to mean
something.  Maybe booting verbose would give more information as to what
was being done that lead up to the line.

I've CC'd John Baldwin who might have some ideas.

-- 
| Jeremy Chadwick   j...@koitsu.org |
| UNIX Systems Administratorhttp://jdc.koitsu.org/ |
| Making life hard for others since 1977. PGP 4BD6C0CB |

___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to "freebsd-acpi-unsubscr...@freebsd.org"


Re: USB ports on Lenovo T400 do not work after a suspend/resume

2013-07-07 Thread Ian Smith
On Sun, 7 Jul 2013 03:26:24 -0700, Jeremy Chadwick wrote:
 > On Sun, Jul 07, 2013 at 03:51:12PM +1000, Ian Smith wrote:
 > > On Sun, 30 Jun 2013 15:02:57 -0700, Adrian Chadd wrote:
 > >  > On 30 June 2013 07:22, Ian Smith  wrote:
 > > [..]
 > >  > > Nothing of note that I can see, if that usb hub-to-bus remapping is
 > >  > > normal.  As you said, 'CPU0: local APIC error 0x40' looks maybe sus.
 > >  > > Maybe someone who knows might comment on that?
 > > 
 > > Does noone know what that signifies?  Maybe it's not relevant to this.
 > 
 > It's too vague to know.  The error comes from lapic_handle_error(),
 > which is a generic/small routine which pulls the local APIC error status
 > register.  (Note I'm saying APIC, not ACPI -- two different things)

Indeed; I've been familiar with PICs since c.'79.  Googling to check 
what the 'A' stood for I found this .. from '97 but usefully descriptive 
perhaps: http://people.freebsd.org/~fsmp/SMP/papers/apicsubsystem.txt

I also found this from March 2011 involving Mike Tancsa, you and jhb@ :)
http://freebsd.1045724.n5.nabble.com/CPU0-local-APIC-error-0x40-CPU1-local-APIC-error-0x40-td3961805.html

 > apic_vector.S sets this up/makes use of this function, and its done as
 > an interrupt handler.

Whether an (unserviced?) interrupt error is related to Adrian's symptom 
- apparent total failure of USB reinitialisation on resume, but only if 
no USB devices exist in the external slots - remains to be seen.  hps@ 
has just confirmed that it should work the same as on boot, but then 
this error was flagged on boot - perhaps it also manifests on resume?

 > I think this is one of those situations where you have to know *what* is
 > being set up/done at that moment in time for the error code to mean
 > something.  Maybe booting verbose would give more information as to what
 > was being done that lead up to the line.
 > 
 > I've CC'd John Baldwin who might have some ideas.

Thanks.  We have verbose dmesg already.  Thread starts (in -stable) at
http://lists.freebsd.org/pipermail/freebsd-stable/2013-June/073917.html
and amidst some wild goose chases, pointer to verbose dmesg etc is at
http://lists.freebsd.org/pipermail/freebsd-stable/2013-June/074018.html

cheers, Ian
___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to "freebsd-acpi-unsubscr...@freebsd.org"


Re: USB ports on Lenovo T400 do not work after a suspend/resume

2013-07-07 Thread Adrian Chadd
I don't think it's a USB controller issue.

Those ports are connected to USB hubs, right? I wonder if there's some
ACPI nonsense that's resulting in the hubs not being powered up on
resume.



-adrian

On 7 July 2013 00:32, Hans Petter Selasky
 wrote:
> Hi,
>
> FYI: The USB stack will currently run a complete controller reset upon
> resume, like during boot.
>
> --HPS
>
>
>
> -Original message-
>> From:Ian Smith 
>> Sent: Sunday 7th July 2013 7:52
>> To: Adrian Chadd 
>> Cc: freebsd-acpi@freebsd.org; freebsd-sta...@freebsd.org;
>> freebsd-...@freebsd.org
>> Subject: Re: USB ports on Lenovo T400 do not work after a suspend/resume
>>
>> On Sun, 30 Jun 2013 15:02:57 -0700, Adrian Chadd wrote:
>>  > On 30 June 2013 07:22, Ian Smith  wrote:
>> [..]
>>  > > Nothing of note that I can see, if that usb hub-to-bus remapping is
>>  > > normal.  As you said, 'CPU0: local APIC error 0x40' looks maybe sus.
>>  > > Maybe someone who knows might comment on that?
>>
>> Does noone know what that signifies?  Maybe it's not relevant to this.
>>
>>  > > Just checking: you've tried other USB devices apart from uftdi0?
>>  >
>>  > Yup, there's no 5v on the port.
>>
>> I was rather taken aback to hear this.  Would not this indicate a
>> failure to reinitialise the basic underlying USB hardware on resume?
>>
>> More than a bit bemused, Ian
>> ___
>> freebsd-acpi@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
>> To unsubscribe, send any mail to "freebsd-acpi-unsubscr...@freebsd.org"
>>
___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to "freebsd-acpi-unsubscr...@freebsd.org"


RE: USB ports on Lenovo T400 do not work after a suspend/resume

2013-07-07 Thread Hans Petter Selasky
Hi,

The USB code should re-attach the uhub driver to the root HUB and any other 
HUBs after resume. Part of the attach code is to set the  power on.

See /sys/dev/usb/usb_hub.c

And:

grep -r UHF_PORT_POWER /sys/dev/usb/

--HPS
 
 
-Original message-
> From:Adrian Chadd mailto:adr...@freebsd.org> >
> Sent: Sunday 7th July 2013 18:43
> To: Hans Petter Selasky   >
> Cc: freebsd-acpi@freebsd.org  ; 
> freebsd-sta...@freebsd.org  ; Ian Smith 
> mailto:smi...@nimnet.asn.au> >; 
> freebsd-...@freebsd.org  
> Subject: Re: USB ports on Lenovo T400 do not work after a suspend/resume
> 
> I don't think it's a USB controller issue.
> 
> Those ports are connected to USB hubs, right? I wonder if there's some
> ACPI nonsense that's resulting in the hubs not being powered up on
> resume.
> 
> 
> 
> -adrian
> 
> On 7 July 2013 00:32, Hans Petter Selasky
> mailto:hans.petter.sela...@bitfrost.no> > 
> wrote:
> > Hi,
> >
> > FYI: The USB stack will currently run a complete controller reset upon
> > resume, like during boot.
> >
> > --HPS
> >
> >
> >
> > -Original message-
> >> From:Ian Smith mailto:smi...@nimnet.asn.au> >
> >> Sent: Sunday 7th July 2013 7:52
> >> To: Adrian Chadd mailto:adr...@freebsd.org> >
> >> Cc: freebsd-acpi@freebsd.org  ; 
> >> freebsd-sta...@freebsd.org  ;
> >> freebsd-...@freebsd.org  
> >> Subject: Re: USB ports on Lenovo T400 do not work after a suspend/resume
> >>
> >> On Sun, 30 Jun 2013 15:02:57 -0700, Adrian Chadd wrote:
> >>  > On 30 June 2013 07:22, Ian Smith  >>  > wrote:
> >> [..]
> >>  > > Nothing of note that I can see, if that usb hub-to-bus remapping is
> >>  > > normal.  As you said, 'CPU0: local APIC error 0x40' looks maybe sus.
> >>  > > Maybe someone who knows might comment on that?
> >>
> >> Does noone know what that signifies?  Maybe it's not relevant to this.
> >>
> >>  > > Just checking: you've tried other USB devices apart from uftdi0?
> >>  >
> >>  > Yup, there's no 5v on the port.
> >>
> >> I was rather taken aback to hear this.  Would not this indicate a
> >> failure to reinitialise the basic underlying USB hardware on resume?
> >>
> >> More than a bit bemused, Ian
> >> ___
> >> freebsd-acpi@freebsd.org   mailing list
> >> http://lists.freebsd.org/mailman/listinfo/freebsd-acpi 
> >>  
> >> To unsubscribe, send any mail to "freebsd-acpi-unsubscr...@freebsd.org 
> >>  "
> >>
> ___
> freebsd-acpi@freebsd.org   mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-acpi 
>  
> To unsubscribe, send any mail to "freebsd-acpi-unsubscr...@freebsd.org 
>  "
> 

___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to "freebsd-acpi-unsubscr...@freebsd.org"


Re: USB ports on Lenovo T400 do not work after a suspend/resume

2013-07-07 Thread Lars Engels
On Sun, Jun 30, 2013 at 03:02:57PM -0700, Adrian Chadd wrote:
> On 30 June 2013 07:22, Ian Smith  wrote:
> 
> > After removing [numbers] (for WITNESS?), diff started making sense.
> > The below is between the first and second suspend/resume cycles in
> > dmesg-3.txt, encompassing the others.
> 
> Cool!
> 
> > Nothing of note that I can see, if that usb hub-to-bus remapping is
> > normal.  As you said, 'CPU0: local APIC error 0x40' looks maybe sus.
> > Maybe someone who knows might comment on that?
> >
> > Just checking: you've tried other USB devices apart from uftdi0?
> 
> Yup, there's no 5v on the port.

Oh, BTW: can you check if you have power on the ports after the first
resume and no power after all next resumes until you reboot your
notebook?
That's the situation I had and maybe it can lead to something. ;)


pgpCA1xYBSPLc.pgp
Description: PGP signature


Re: USB ports on Lenovo T400 do not work after a suspend/resume

2013-07-07 Thread Adrian Chadd
Nope, no power after first resume if i have nothing plugged in.

Why?



-adrian

On 7 July 2013 13:49, Lars Engels  wrote:
> On Sun, Jun 30, 2013 at 03:02:57PM -0700, Adrian Chadd wrote:
>> On 30 June 2013 07:22, Ian Smith  wrote:
>>
>> > After removing [numbers] (for WITNESS?), diff started making sense.
>> > The below is between the first and second suspend/resume cycles in
>> > dmesg-3.txt, encompassing the others.
>>
>> Cool!
>>
>> > Nothing of note that I can see, if that usb hub-to-bus remapping is
>> > normal.  As you said, 'CPU0: local APIC error 0x40' looks maybe sus.
>> > Maybe someone who knows might comment on that?
>> >
>> > Just checking: you've tried other USB devices apart from uftdi0?
>>
>> Yup, there's no 5v on the port.
>
> Oh, BTW: can you check if you have power on the ports after the first
> resume and no power after all next resumes until you reboot your
> notebook?
> That's the situation I had and maybe it can lead to something. ;)
___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to "freebsd-acpi-unsubscr...@freebsd.org"


Re: USB ports on Lenovo T400 do not work after a suspend/resume

2013-07-07 Thread Ian Smith
On Sun, 7 Jul 2013 18:47:03 -0700, Adrian Chadd wrote:
 > On 7 July 2013 13:49, Lars Engels  wrote:
 > > On Sun, Jun 30, 2013 at 03:02:57PM -0700, Adrian Chadd wrote:
 > >> On 30 June 2013 07:22, Ian Smith  wrote:
 > >>
 > >> > After removing [numbers] (for WITNESS?), diff started making sense.
 > >> > The below is between the first and second suspend/resume cycles in
 > >> > dmesg-3.txt, encompassing the others.
 > >>
 > >> Cool!
 > >>
 > >> > Nothing of note that I can see, if that usb hub-to-bus remapping is
 > >> > normal.  As you said, 'CPU0: local APIC error 0x40' looks maybe sus.
 > >> > Maybe someone who knows might comment on that?
 > >> >
 > >> > Just checking: you've tried other USB devices apart from uftdi0?
 > >>
 > >> Yup, there's no 5v on the port.
 > >
 > > Oh, BTW: can you check if you have power on the ports after the first
 > > resume and no power after all next resumes until you reboot your
 > > notebook?
 > > That's the situation I had and maybe it can lead to something. ;)

 > Nope, no power after first resume if i have nothing plugged in.
 > 
 > Why?

Checking one more point .. do the USB ports come up ok if you originally 
boot with nothing plugged in?  If so (or if not), does that local APIC 
error message appear the same then too?

cheers, Ian

PS OT: finally found a USB keyboard but I'd forgotten that my friend's 
machine is an SL500, not T500.  Moreover, because its keyboard+trackpad 
etc is non-working (internally disconnected), I have no way to resume it 
without the kbd (and the 9.1-R memstick) plugged in.  Even with kbd and 
memstick left in and using acpiconf -s3 it suspends ok but is hung after 
resume by dabbing power button; no screen and kbd is dead too - sorry, 
no help there.  OTOH my son just bought a refurb T430 ('doze 7, beats 8 
anyway) which I should get to play with a bit this week.
___
freebsd-acpi@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-acpi
To unsubscribe, send any mail to "freebsd-acpi-unsubscr...@freebsd.org"