Supermicro 6027R-N3RF+head, usb trouble

Bryan Drewery bdrewery at FreeBSD.org
Sun Jun 2 13:34:00 UTC 2013


On 6/1/2013 12:00 PM, Konstantin Belousov wrote:
> On Thu, May 30, 2013 at 07:15:39AM -0500, Bryan Drewery wrote:
>> On 5/30/2013 12:07 AM, Konstantin Belousov wrote:
>>> On Wed, May 29, 2013 at 07:45:39AM -0500, Bryan Drewery wrote:
>>>> On 5/29/2013 7:16 AM, Bryan Drewery wrote:
>>>>> On 5/29/2013 12:33 AM, Sergey V. Dyatko wrote:
>>>>>> On Tue, 28 May 2013 13:20:53 -0500
>>>>>> Bryan Drewery <bdrewery at FreeBSD.org> wrote:
>>>>>>
>>>>>>> On 4/21/2013 2:38 PM, Sergey V. Dyatko wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Can anybody explain why USB keyboard (and keyboard from
>>>>>>>> integrated IPKVM) doesn't work when I boot with   'C606
>>>>>>>> chipset Dual 4-Port SATA/SAS Storage Control Unit' enabled in bios?
>>>>>>>> Also I can't boot that box from usb memstick and
>>>>>>>> FreeBSD-10.0-CURRENT-amd64-20130413-r249439-release.iso They both
>>>>>>>> loose(?) device and can't find root If I disable controller in bios
>>>>>>>> system can't see any sata hdd connected to it:(
>>>>>>>> booting with hw.usb.ehci.no_hs=1, kern.cam.boot_delay="10000"
>>>>>>>> and debug.acpi.disabled="hostres" without success. I setup dhcpd,
>>>>>>>> tftp, nfs on my laptop and finally I install fbsd on that box, but
>>>>>>>> question with kbd is open - It doesn't work..
>>>>>>>> dmesg:
>>>>>>>> http://svn.freebsd.by/files/dmesg_N3RF.txt
>>>>>>>> pciconf -lv:
>>>>>>>> http://svn.freebsd.by/files/pciconf_N3RF.txt
>>>>>>>>
>>>>>>>> I would appreciate any hints
>>>>>>>>
>>>>>>>
>>>>>>> I'm having this exact problem on HEAD r250991 as well. 9.1-RELEASE
>>>>>>> (disc1) seems ok though.
>>>>>>>
>>>>>>> Did you get this figured out?
>>>>>>>
>>>>>>
>>>>>> I added to loader.conf
>>>>>> kern.maxbcache="128M"
>>>>
>>>> ^ This setting is all that was needed. The VFS change was not needed.
>>>>
>>>>
>>>>>> vfs.maxbufspace=134217728
>>>>>> also I create /boot.config with '-v'
>>>>>> I don't know what exactly help, but now usb kbd (ipkvm) works fine
>>>>>> for me.
>>>>>> p.s. It is smbios.system.product="X9DRW"
>>>>>>
>>>>>
>>>>> Yes! This fix of limiting the size worked for me. USB worked on boot, kb
>>>>> works remotely in the IP KVM and locally as well now.
>>>>>
>>>>> For the record, this is a DELL C1100 with 72GB of ram. The symptoms
>>>>> match the previous posts though and the delay settings did not help.
>>>>>
>>>>> This was working on 9.1-R, something must have changed on HEAD.
>>>>>
>>>>> This is not a production system, I'm willing to try any patches or
>>>>> settings to help get this fixed by default.
>>>>>
>>>
>>> Could you get the values of sysctl kern.nbuf, kern.bio_transient_maxcnt
>>> from the boot without any tuning of the KVA usage ?
>>>
>>
>> # sysctl kern.nbuf kern.bio_transient_maxcnt kern.maxbcache
>> kern.nbuf: 472300
>> kern.bio_transient_maxcnt: 1024
>> kern.maxbcache: 0
>>
>> For reference, with limiting maxbcache:
>>
>> # sysctl kern.nbuf kern.bio_transient_maxcnt kern.maxbcache
>> kern.nbuf: 7372
>> kern.bio_transient_maxcnt: 102
>> kern.maxbcache: 134217728
> 
> You did not tuned BKVASIZE nor MAXPHYS ?

No.

> 
> This is somewhat unexpected, but indeed reasonable.  The buffer cache
> dutifully tried to allocate 1/10 of the RAM size for the buffer KVA.
> 
> Please try the following tweak.

With patch, and leaving kern.maxbcache to default, USB works as expected.

Result with patch:

# sysctl kern.nbuf kern.bio_transient_maxcnt kern.maxbcache
kern.nbuf: 105931
kern.bio_transient_maxcnt: 1024
kern.maxbcache: 0

# cat /boot/loader.conf
zfs_load="YES"
vfs.root.mountfrom="zfs:zroot/ROOT/head-r251224"

USB on boot:

uhub0: 2 ports with 2 removable, self powered
uhub2: 2 ports with 2 removable, self powered
uhub1: 2 ports with 2 removable, self powered
uhub3: 2 ports with 2 removable, self powered
uhub5: 2 ports with 2 removable, self powered
uhub6: 2 ports with 2 removable, self powered
Root mount waiting for: usbus7 usbus3
Root mount waiting for: usbus7 usbus3
Root mount waiting for: usbus7 usbus3
uhub4: 6 ports with 6 removable, self powered
uhub7: 6 ports with 6 removable, self powered
ugen3.2: <Avocent> at usbus3
ukbd0: <Keyboard> on usbus3
kbd2 at ukbd0
Trying to mount root from zfs:zroot/ROOT/head-r251224 []...
ums0: <Mouse> on usbus3
ums0: 3 buttons and [Z] coordinates ID=0
ums1: <Mouse REL> on usbus3
ums1: 3 buttons and [XYZ] coordinates ID=0


> 
> diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
> index 7bd8d7e..2f92cde 100644
> --- a/sys/kern/vfs_bio.c
> +++ b/sys/kern/vfs_bio.c
> @@ -560,7 +560,8 @@ kern_vfs_bio_buffer_alloc(caddr_t v, long physmem_est)
>  			nbuf += min((physmem_est - 4096) / factor,
>  			    65536 / factor);
>  		if (physmem_est > 65536)
> -			nbuf += (physmem_est - 65536) * 2 / (factor * 5);
> +			nbuf += min((physmem_est - 65536) * 2 / (factor * 5),
> +			    32 * 1024 * 1024 / (factor * 5));
>  
>  		if (maxbcache && nbuf > maxbcache / BKVASIZE)
>  			nbuf = maxbcache / BKVASIZE;
> 


-- 
Regards,
Bryan Drewery

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20130602/8ecc352c/attachment.sig>


More information about the freebsd-current mailing list