{"action":"created","issue":{"url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/11680","repository_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr","labels_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/11680/labels{/name}","comments_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/11680/comments","events_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/11680/events","html_url":"https://github.com/zephyrproject-rtos/zephyr/pull/11680","id":384746041,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzODcyMzI0","number":11680,"title":"[DNM][early WIP] drivers: ethernet: smsc9118 driver (as used by mps2_an385)","user":{"login":"pfalcon","id":500451,"node_id":"MDQ6VXNlcjUwMDQ1MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/500451?v=4","gravatar_id":"","url":"https://api.github.com/users/pfalcon","html_url":"https://github.com/pfalcon","followers_url":"https://api.github.com/users/pfalcon/followers","following_url":"https://api.github.com/users/pfalcon/following{/other_user}","gists_url":"https://api.github.com/users/pfalcon/gists{/gist_id}","starred_url":"https://api.github.com/users/pfalcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfalcon/subscriptions","organizations_url":"https://api.github.com/users/pfalcon/orgs","repos_url":"https://api.github.com/users/pfalcon/repos","events_url":"https://api.github.com/users/pfalcon/events{/privacy}","received_events_url":"https://api.github.com/users/pfalcon/received_events","type":"User","site_admin":false},"labels":[{"id":845160834,"node_id":"MDU6TGFiZWw4NDUxNjA4MzQ=","url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/labels/area:%20Ethernet","name":"area: Ethernet","color":"ededed","default":false},{"id":700751655,"node_id":"MDU6TGFiZWw3MDA3NTE2NTU=","url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/labels/area:%20Networking","name":"area: Networking","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-27T11:19:05Z","updated_at":"2018-11-27T11:40:37Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls/11680","html_url":"https://github.com/zephyrproject-rtos/zephyr/pull/11680","diff_url":"https://github.com/zephyrproject-rtos/zephyr/pull/11680.diff","patch_url":"https://github.com/zephyrproject-rtos/zephyr/pull/11680.patch"},"body":"This is initial WIP on implementing driver for SMSC9220/SMSC9118/LAN9118 Ethernet chips, as available in ARM MPS2 board (BOARD=mps2_an385). The main purpose of this driver is to be used with QEMU emulation however, it's not tested on a real hardware (so less attention is paid to matters like cable detection, etc.)\r\n\r\nNOTE to reviewers: as it stands now, this is very dirty code, you probably want to skip looking at it for now. This is posted to reference it in other tickets and discuss ways to brush up the code with @galak, the primary requester of this driver.\r\n"},"comment":{"url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/comments/442028704","html_url":"https://github.com/zephyrproject-rtos/zephyr/pull/11680#issuecomment-442028704","issue_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/11680","id":442028704,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjAyODcwNA==","user":{"login":"pfalcon","id":500451,"node_id":"MDQ6VXNlcjUwMDQ1MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/500451?v=4","gravatar_id":"","url":"https://api.github.com/users/pfalcon","html_url":"https://github.com/pfalcon","followers_url":"https://api.github.com/users/pfalcon/followers","following_url":"https://api.github.com/users/pfalcon/following{/other_user}","gists_url":"https://api.github.com/users/pfalcon/gists{/gist_id}","starred_url":"https://api.github.com/users/pfalcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfalcon/subscriptions","organizations_url":"https://api.github.com/users/pfalcon/orgs","repos_url":"https://api.github.com/users/pfalcon/repos","events_url":"https://api.github.com/users/pfalcon/events{/privacy}","received_events_url":"https://api.github.com/users/pfalcon/received_events","type":"User","site_admin":false},"created_at":"2018-11-27T11:40:37Z","updated_at":"2018-11-27T11:40:37Z","author_association":"MEMBER","body":"@galak: So, this now basically works, at least on the level of pings. There's a lot to do both re: functionality, and of course re: cleanup. I'd like to discuss high-level matter regarding the latter:\r\n\r\n1. Use of code imported from mbed. The API of the C file (smsc9220_eth.c) is more or less adhoc, I already work it around. I would plan to get rid of it, and access hardware registers directly in the driver. It thus would be more like eth_enc28j60.c than those which use HALs. The header would stay, but would be patched.\r\n2. Naming. The chips are apparently due to the company \"SMSC\" and where called SMSC9220, etc. It apparently was bought by Microchip, which renamed them to LAN9220, etc. Also, while MPS2 uses SMSC9220, QEMU actually emulated SMSC9118. The difference is in the things like checksum offloading, etc., something which we won't use. So I guess, it's more faithful to call the driver eth_smsc9118.c. For reference, in Linux it's called smsc911x.c IIRC.\r\n\r\n@galak, so please let me know if you see something terribly wrong with the above, otherwise I'll gradually move it in that direction. Thanks.\r\n  "}}
{"actor":{"display_login":"pfalcon"}}