Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Any solve to the SR9700 problem

  1. #1
    Join Date
    Aug 2024
    Beans
    18

    Any solve to the SR9700 problem

    So I have this SR9700, it does not support Linux.
    After installing Linux, I found that this device is not compatible. I tried various methods, such as running it in bottles and entering commands in the terminal, but none of them worked.
    The problem is that Linux only recognizes this device as a CD drive. I don't want that-I just want the device to work with Linux.
    Could you help me with this?
    I contacted the company that manufactured this device, but they didn't provide a helpful response. They simply mentioned that the driver was added in Linux 3.12. I messaged them again about it; they informed me that the device is too old and only support windows, hence it does not support the Linux apps.
    Here source;
    https://www.kernelconfig.io/config_usb_net_sr9700
    https://git.kernel.org/pub/scm/linux...00.c?h=v6.10.6
    Question: how to install this kernel code?

  2. #2
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    3,565
    Distro
    Ubuntu Development Release

    Re: Any solve to the SR9700 problem

    That kernel code is included in the kernel by default. The driver is a module, which is normal. The crc stuff is built in.

    Code:
    doug@s19:~/kernel/linux$ grep CONFIG_USB_NET_SR9700 /boot/config-6.8.0-35-generic
    CONFIG_USB_NET_SR9700=m
    doug@s19:~/kernel/linux$ grep CONFIG_CRC32= /boot/config-6.8.0-35-generic
    CONFIG_CRC32=y
    I wonder if the module is getting loaded when required. You could check after trying your device and/or force load it:

    Code:
    doug@s19:~/kernel/linux$ lsmod | grep sr97
    doug@s19:~/kernel/linux$ sudo modprobe sr9700
    [sudo] password for doug:
    doug@s19:~/kernel/linux$ lsmod | grep sr97
    sr9700                 20480  0
    usbnet                 61440  1 sr9700
    mii                    20480  2 sr9700,usbnet
    Last edited by Doug S; August 24th, 2024 at 03:29 PM.
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

  3. #3
    Join Date
    Aug 2024
    Beans
    18

    Re: Any solve to the SR9700 problem

    Must i try the second code in terminal or the first one? I've unplug the device and plug it again-But it didnt work (Ubuntu detected it as a CD drive). What do i do now?
    1-EDIT: is there a way to load the driver from the kernel itself? Maybe install the driver from the kernel.
    Last edited by 123nbom; August 24th, 2024 at 11:49 PM.

  4. #4
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    3,565
    Distro
    Ubuntu Development Release

    Re: Any solve to the SR9700 problem

    Quote Originally Posted by 123nbom View Post
    is there a way to load the driver from the kernel itself?
    Yes, you can force load the driver module via the command I posted before:

    Code:
    doug@s19:~/kernel/linux$ sudo modprobe sr9700
    And then you can check that it is a loaded module via the subsequent command I posted earlier:

    Code:
    doug@s19:~/kernel/linux$ lsmod | grep sr97
    sr9700                 20480  0
    usbnet                 61440  1 sr9700
    mii                    20480  2 sr9700,usbnet
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

  5. #5
    Join Date
    Aug 2024
    Beans
    18

    Re: Any solve to the SR9700 problem

    The device didnt work
    Last edited by 123nbom; August 28th, 2024 at 02:15 AM. Reason: The answer

  6. #6
    Join Date
    Aug 2024
    Beans
    10

    Re: Any solve to the SR9700 problem

    bump

  7. #7
    Join Date
    Aug 2024
    Beans
    18

    Re: Any solve to the SR9700 problem

    Can anyone make the driver for me.
    I have the .c file, its done - its need just need the other things that i dont know
    Ubuntu 20.04.4 LTS
    https://git.kernel.org/pub/scm/linux...00.c?h=v6.10.6
    Last edited by 123nbom; August 30th, 2024 at 07:42 AM.

  8. #8
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    3,565
    Distro
    Ubuntu Development Release

    Re: Any solve to the SR9700 problem

    As explained in my previous posts on this thread, you have the driver. As far as I know, there is nothing for us to do to help you further.

    What kernel version are you using now?

    EDIT 3: If I understand correctly, you think you need the latest version of the driver that include this commit from July 25th and that has been back-ported to kernel 6.10.6:
    Code:
    doug@s19:~/kernel/linux$ git show 08f3a5c38087
    commit 08f3a5c38087d1569e982a121aad1e6acbf145ce
    Author: Ma Ke <make24@iscas.ac.cn>
    Date:   Thu Jul 25 10:29:42 2024 +0800
    
        net: usb: sr9700: fix uninitialized variable use in sr_mdio_read
    
        It could lead to error happen because the variable res is not updated if
        the call to sr_share_read_word returns an error. In this particular case
        error code was returned and res stayed uninitialized. Same issue also
        applies to sr_read_reg.
    
        This can be avoided by checking the return value of sr_share_read_word
        and sr_read_reg, and propagating the error if the read operation failed.
    
        Found by code review.
    
        Cc: stable@vger.kernel.org
        Fixes: c9b37458e956 ("USB2NET : SR9700 : One chip USB 1.1 USB2NET SR9700Device Driver Support")
        Signed-off-by: Ma Ke <make24@iscas.ac.cn>
        Reviewed-by: Shigeru Yoshida <syoshida@redhat.com>
        Reviewed-by: Hariprasad Kelam <hkelam@marvell.com>
        Signed-off-by: David S. Miller <davem@davemloft.net>
    
    diff --git a/drivers/net/usb/sr9700.c b/drivers/net/usb/sr9700.c
    index 0a662e42ed96..cb7d2f798fb4 100644
    --- a/drivers/net/usb/sr9700.c
    +++ b/drivers/net/usb/sr9700.c
    @@ -179,6 +179,7 @@ static int sr_mdio_read(struct net_device *netdev, int phy_id, int loc)
            struct usbnet *dev = netdev_priv(netdev);
            __le16 res;
            int rc = 0;
    +       int err;
    
            if (phy_id) {
                    netdev_dbg(netdev, "Only internal phy supported\n");
    @@ -189,11 +190,17 @@ static int sr_mdio_read(struct net_device *netdev, int phy_id, int loc)
            if (loc == MII_BMSR) {
                    u8 value;
    
    -               sr_read_reg(dev, SR_NSR, &value);
    +               err = sr_read_reg(dev, SR_NSR, &value);
    +               if (err < 0)
    +                       return err;
    +
                    if (value & NSR_LINKST)
                            rc = 1;
            }
    -       sr_share_read_word(dev, 1, loc, &res);
    +       err = sr_share_read_word(dev, 1, loc, &res);
    +       if (err < 0)
    +               return err;
    +
            if (rc == 1)
                    res = le16_to_cpu(res) | BMSR_LSTATUS;
            else
    doug@s19:~/kernel/linux$
    EDIT: If you need some of the most recent driver edits, you will have to use a mainline kernel.

    Code:
    doug@s19:~/kernel/linux$ git log --oneline drivers/net/usb/sr9700.c
    08f3a5c38087 net: usb: sr9700: fix uninitialized variable use in sr_mdio_read
    05417aa9c0c0 net: usb: sr9700: stop lying about skb->truesize
    ecf7cf8efb59 net: usb: sr9700: Handle negative len
    e9da0b56fe27 sr9700: sanity check for packet length
    2674e7ea22ba net: usb: don't write directly to netdev->dev_addr
    766607570bec ethernet: constify references to netdev->dev_addr in drivers
    49ed8dde3715 net: usb: use eth_hw_addr_set() for dev->addr_len cases
    a76053707dbf dev_ioctl: split out ndo_eth_ioctl
    77651900cede usbnet: add _mii suffix to usbnet_set/get_link_ksettings
    323955a0498c net: usb: switch to dev_get_tstats64 and remove usbnet_get_stats64 alias
    f819cd926ca7 drivers: net: Remove unnecessary semicolon
    ba23dc642dff net: usb: sr9700: Replace mdelay() with msleep() in sr9700_bind()
    fb796707d7a6 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
    d532c1082f68 sr9700: use skb_cow_head() to deal with cloned skbs
    c8b5d129ee29 net: usbnet: support 64bit stats
    39f49eadc3e5 net: usb: sr9700: use new api ethtool_{get|set}_link_ksettings
    06b19b1b1785 net: usb: sr9700: Use 'SR_' prefix for the common register macros
    a81ab36bf52d drivers/net: delete non-required instances of include <linux/init.h>
    c9b37458e956 USB2NET : SR9700 : One chip USB 1.1 USB2NET SR9700Device Driver Support
    doug@s19:~/kernel/linux$ git tag --contains 08f3a5c38087
    v6.11-rc2
    doug@s19:~/kernel/linux$ git tag --contains 05417aa9c0c0
    v6.10
    v6.10-rc1
    v6.10-rc2
    v6.10-rc3
    v6.10-rc4
    v6.10-rc5
    v6.10-rc6
    v6.10-rc7
    v6.11-rc1
    v6.11-rc2
    Note that at this time of writing mainline is up to 6.11-rc5, I am just behind a few weeks.

    EDIT 2: after catching up:
    Code:
    doug@s19:~/kernel/linux$ git tag --contains 08f3a5c38087
    v6.11-rc2
    v6.11-rc3
    v6.11-rc4
    v6.11-rc5
    doug@s19:~/kernel/linux$
    Last edited by Doug S; August 30th, 2024 at 04:51 PM.
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

  9. #9
    Join Date
    Aug 2024
    Beans
    18

    Re: Any solve to the SR9700 problem

    I will be using Ubuntu 20.04.4 LTS based on Linux kernel versions 5.4 and 5.8. Will the updated drivers make my device work as intended? I think that i need the latest driver to ensure my device functions properly. Initially, my priority was to simply make the device work, regardless of whether it functions perfectly or not. At the very least, I want it to work.
    Is there a way to update or install the driver online? For example, can I use a command like 'sudo update sr9700' to do this?

  10. #10
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    3,565
    Distro
    Ubuntu Development Release

    Re: Any solve to the SR9700 problem

    Quote Originally Posted by 123nbom View Post
    Is there a way to update or install the driver online? For example, can I use a command like 'sudo update sr9700' to do this?
    No.
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •