Coder Social home page Coder Social logo

smsc95xx patch unnecessary about linux HOT 8 CLOSED

raspberrypi avatar raspberrypi commented on May 18, 2024
smsc95xx patch unnecessary

from linux.

Comments (8)

popcornmix avatar popcornmix commented on May 18, 2024

OTP bits are connected to the GPU. The ARM currently can't see the OTP bits.
The serial number is stored in the OTP bits. The MAC adress is the OUI + serial number.

The command line is a convenient way of passing information from GPU to ARM.

I agree this is better done from userspace.

I'll try and get an ARM driver in that exposes the serial/OTP bits, so this is no longer necessary in smsc95xx driver.

from linux.

asb avatar asb commented on May 18, 2024

Alan: how about having smsc95xx use system_serial_low and system_serial_high to generate the MAC?

from linux.

huceke avatar huceke commented on May 18, 2024

Setting the mac adress makes perfect sense. Take the szenario where you have a nfs root without an initial ramdisk.

from linux.

Alan-Cox avatar Alan-Cox commented on May 18, 2024

huceke: so use an initrd (you need to anyway in reality to do the dhcp and the like properly given the usb ethernet will appear at some point during the boot as its asynchronously discovered

asb: if the bits are exposed so the kernel can get at them that sounds ideal - the driver can then just pick them up if its a PI (or better yet if the device usb id is unique to the PI). The problem though if you don't have a unique id is you need to be careful of the case where someone plugs the same device on a dongle into a PI..

from linux.

Alan-Cox avatar Alan-Cox commented on May 18, 2024

(as a PS - the mac= is broken for this case too...)

from linux.

nomis avatar nomis commented on May 18, 2024

The information for the device is almost completely blank:

Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass         0 
  bDeviceProtocol         1 
  bMaxPacketSize0        64
  idVendor           0x0424 Standard Microsystems Corp.
  idProduct          0xec00 
  bcdDevice            2.00
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           39
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol    255 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               4
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass         0 
  bDeviceProtocol         1 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

If some part of it could be filled in with something unique to the model (e.g. idVendor/idProduct or "Raspberry Pi" in the iProduct) then the driver could safely use the system serial to calculate the MAC.

from linux.

jsarenik avatar jsarenik commented on May 18, 2024
#3 testing if pre-formatted text makes a link to issue

from linux.

jsarenik avatar jsarenik commented on May 18, 2024

@popcornmix @davet321 @ollllivier @giraldeau @ffeldbauer @syntheticpp and others...

Please see https://help.github.com/articles/basic-writing-and-formatting-syntax/#quoting-code and use quotes to mark everything (at least what could contain #3) - i.e. three back-ticks on a line by themselves before and after the quoted text.

I understand this is an extra effort when the console output is just pasted. On the other hand it allows some processing (which GitHub does in order to cross-reference issues for example).

from linux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.