[SOLVED] Zotac CI327 and pfsense 2.3.4-p1



  • I've been running pfsense 2.3.4-p1 on a zotac ci327 sucessfully but not without some odd problems.

    One particularly annoying issue is that on the main console window I get the following sequence of messages every few seconds over and over.
    It doesn't affect the firewall's performance but it makes using the main console painfully difficult as the menu is constantly wiped out with these messages.
    I took the data below from the system log file, but it's identical except for the date and time.

    Sep 28 20:32:35 kernel da0: quirks=0x2 <no_6_byte>Sep 28 20:32:35 kernel da0: Attempt to query device size failed: NOT READY, Medium not present
    Sep 28 20:32:35 kernel da0: 40.000MB/s transfers
    Sep 28 20:32:35 kernel da0: Serial Number 20120926571200000
    Sep 28 20:32:35 kernel da0: <generic- sd="" mmc="" ms="" pro="" 1.00="">Removable Direct Access SPC-2 SCSI device
    Sep 28 20:32:35 kernel da0 at umass-sim0 bus 0 scbus2 target 0 lun 0
    Sep 28 20:32:35 kernel umass0: <bulk-in, bulk-out,="" interface="">on usbus0
    Sep 28 20:32:35 kernel ugen0.3: <generic>at usbus0
    Sep 28 20:32:35 kernel (da0:umass-sim0:0:0:0): Periph destroyed
    Sep 28 20:32:35 kernel da0: <generic- sd="" mmc="" ms="" pro="" 1.00="">s/n 20120926571200000 detached
    Sep 28 20:32:35 kernel da0 at umass-sim0 bus 0 scbus2 target 0 lun 0
    Sep 28 20:32:35 kernel umass0: at uhub0, port 6, addr 19 (disconnected)
    Sep 28 20:32:35 kernel ugen0.3: <generic>at usbus0 (disconnected)

    Anyone can help me with how to fix this so that it doesn't show up constantly.

    If this is a SD card reader issue I wouldn't mind shutting it off as it is not being used.

    I already tried to disable it from the BIOS but there was no such selection.

    I already put
    hint.sdhci_pci.0.disabled=1
    hint.sdhci_pci.1.disabled=1
    in /boot/loader.conf.local, which shortened the boot time but did not fix the above message issue.

    Thanks for any help.
    Halea</generic></generic-></generic></bulk-in,></generic-></no_6_byte>



  • That very much sounds like it's the SD card reader being polled, and it sounds like you didn't successfully disable the device yet.

    I haven't tried this at all yet, but what's the device path? Perhaps you can disable it via device hints:
    https://www.freebsd.org/doc/handbook/device-hints.html

    Can you disable the umass driver?



  • @ShutterBC:

    That very much sounds like it's the SD card reader being polled, and it sounds like you didn't successfully disable the device yet.

    I haven't tried this at all yet, but what's the device path? Perhaps you can disable it via device hints:
    https://www.freebsd.org/doc/handbook/device-hints.html

    Can you disable the umass driver?

    I had forgotten that I also had the following two lines in /boot/device.hints already (with a slightly different syntax as there are double-quotes around 1):
    hint.sdhci_pci.0.disabled="1"
    hint.sdhci_pci.1.disabled="1"

    I tried again with and without those lines in both places, one place at a time and not included at all.

    Without them the boot process is delayed by almost 2 mn as the machine keep dumping a series of device poll data too fast to follow.

    With these lines in one or both locations that clutter is definitely reduced and the boot process looks normal.
    Then the menu comes up and within a couple of seconds those lines start showing up with probably one or two seconds between iterations.

    I think you're right about not having shut down or disabled the SD card reader completely, but I can't figure out what device name on which bus to disable.

    Regarding the umass driver I am not sure how to do it either. I am not very familiar with the syntax, the above two lines were suggested by a colleague and I put them in with great hesitation by fear of messing up the router.
    As a side note our main router has failed and until we get a permanent replacement hardware I was hoping to use this machine in the interim.
    The funny thing is that, as it is, this little box works well. It's driving a 300 mbps symmetrical line which is loaded at 60%, with heavy two-way multimedia and voip.

    If you can suggest the syntax for the umass driver I'll try (as last night I did an image copy of the pfsense drive, which I could reload if I screw up things).

    Would umass also disable the main drive which is a sata ssd called ada0: ?



  • You could probably disable that specific port or hub, it might be the better option. umass is USB Mass Storage, if you disable that you can't use USB drives either.

    umass0: at uhub0, port 6, addr 19 means you can probably specifically disable port 6 on hub 0.

    Try for example running usbconfig to get all USB units, and then use something like:

    usbconfig -u <unit number="" here="">-a

    <address here="">power_off

    if that fixes it, you could probably find a way to persist that setting.</address></unit>



  • @johnkeates:

    You could probably disable that specific port or hub, it might be the better option. umass is USB Mass Storage, if you disable that you can't use USB drives either.

    umass0: at uhub0, port 6, addr 19 means you can probably specifically disable port 6 on hub 0.

    Try for example running usbconfig to get all USB units, and then use something like:

    usbconfig -u <unit number="" here="">-a

    <address here="">power_off

    if that fixes it, you could probably find a way to persist that setting.
    </address></unit>

    So, I ran usbconfig which resulted in the following:

    ugen0.1: <xhci root="" hub="" 0x8086="">at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
    ugen0.2: <product 0x0008="" vendor="" 0x1220="">at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA)
    ugen0.4: <u-blox 7="" -="" gpsgnss="" receiver="" u-blox="" ag="" www.u-blox.com="">at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
    ugen0.5: <back-ups 725="" es="" fw802.n2.d="" usb="" fwn2="" apc="">at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (2mA)
    ugen0.3: <usb2.0-crw generic="">at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

    Now, let's say I'd like to power off XHCI root HUB using the usbconfig command.

    The man page gives the following examples:
    "Program the device on USB bus 1 at address 2 to suspend, resume, power off, go into power save, or power on:
      usbconfig -u 1 -a 2 suspend
      usbconfig -u 1 -a 2 resume
      usbconfig -u 1 -a 2 power_off
      usbconfig -u 1 -a 2 power_save
      usbconfig -u 1 -a 2 power_on"

    In my case which one is the -u parameter and which one is -a ?
    Are the two numbers next to ugen (i.e ugen0.1) USB bus number (u) and port number (a)?

    Sorry for the novice questions here and thanks again for all the help.</usb2.0-crw></back-ups></u-blox></product></xhci>



  • @haleakalas:

    @johnkeates:

    You could probably disable that specific port or hub, it might be the better option. umass is USB Mass Storage, if you disable that you can't use USB drives either.

    umass0: at uhub0, port 6, addr 19 means you can probably specifically disable port 6 on hub 0.

    Try for example running usbconfig to get all USB units, and then use something like:

    usbconfig -u <unit number="" here="">-a

    <address here="">power_off

    if that fixes it, you could probably find a way to persist that setting.
    </address></unit>

    So, I ran usbconfig which resulted in the following:

    ugen0.1: <xhci root="" hub="" 0x8086="">at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
    ugen0.2: <product 0x0008="" vendor="" 0x1220="">at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA)
    ugen0.4: <u-blox 7="" -="" gpsgnss="" receiver="" u-blox="" ag="" www.u-blox.com="">at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
    ugen0.5: <back-ups 725="" es="" fw802.n2.d="" usb="" fwn2="" apc="">at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (2mA)
    ugen0.3: <usb2.0-crw generic="">at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

    Now, let's say I'd like to power off XHCI root HUB using the usbconfig command.

    The man page gives the following examples:
    "Program the device on USB bus 1 at address 2 to suspend, resume, power off, go into power save, or power on:
      usbconfig -u 1 -a 2 suspend
      usbconfig -u 1 -a 2 resume
      usbconfig -u 1 -a 2 power_off
      usbconfig -u 1 -a 2 power_save
      usbconfig -u 1 -a 2 power_on"

    In my case which one is the -u parameter and which one is -a ?
    Are the two numbers next to ugen (i.e ugen0.1) USB bus number (u) and port number (a)?

    Sorry for the novice questions here and thanks again for all the help.</usb2.0-crw></back-ups></u-blox></product></xhci>

    – follow up on my own post --

    Yeyy! We are getting somewhere now!

    I ran the command usbconfig -u 0 -a 3 power_off

    and ugen0.3 got turned off as evidenced by the following:
    ugen0.3: <usb2.0-crw generic="">at usbus0, cfg=255 md=HOST spd=HIGH (480Mbps) pwr=OFF (500mA)

    and most importantly the crazy lines popping up on the main console have now stopped!
    I hit <enter>the menu came up and almost a minute later still no clutter!

    It looks like this is my eureka moment. I hope this is not going to cause problems with the UPS and GPS interfaces.

    The next question is:
    How do I make this become permanent???

    Thanks folks for all your help and guidance.</enter></usb2.0-crw>



  • To make this persistent I created the following executable script file:
    /usr/local/etc/rc.d/MyCommands.sh

    Inside I put the command:
    /usr/sbin/usbconfig -u 0 -a 3 power_off

    Now when pfsense boots up, after loading the system, the packages etc, it also runs my single liner, et voila!

    So far so good.



  • Awesome! Hope that little box works well for you.


  • Netgate Administrator

    You may want to add that as a Shellcmd so it gets stored in the config file and survives updates.

    https://doc.pfsense.org/index.php/Executing_commands_at_boot_time

    Steve



  • @stephenw10:

    You may want to add that as a Shellcmd so it gets stored in the config file and survives updates.

    https://doc.pfsense.org/index.php/Executing_commands_at_boot_time

    Steve

    The fix that I put in has been working well for many days now, so I followed
    the instructions in the link above and found the line in the file /conf/config.xml
    and inserted the following line right above it:
    <shellcmd>/usr/sbin/usbconfig -u 0 -a 3 power_off</shellcmd>

    Then I saved the file and rebooted.

    Everything seems to be working fine.