lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2b178a0e-da00-8639-7779-ac5545f8e317@linux.intel.com>
Date:   Tue, 30 Nov 2021 22:04:18 -0800
From:   "Martinez, Ricardo" <ricardo.martinez@...ux.intel.com>
To:     Sergey Ryazanov <ryazanov.s.a@...il.com>
Cc:     netdev@...r.kernel.org, linux-wireless@...r.kernel.org,
        Jakub Kicinski <kuba@...nel.org>,
        David Miller <davem@...emloft.net>,
        Johannes Berg <johannes@...solutions.net>,
        Loic Poulain <loic.poulain@...aro.org>,
        M Chetan Kumar <m.chetan.kumar@...el.com>,
        chandrashekar.devegowda@...el.com,
        Intel Corporation <linuxwwan@...el.com>,
        chiranjeevi.rapolu@...ux.intel.com, haijun.liu@...iatek.com,
        amir.hanania@...el.com,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        dinesh.sharma@...el.com, eliot.lee@...el.com,
        mika.westerberg@...ux.intel.com, moises.veleta@...el.com,
        pierre-louis.bossart@...el.com, muralidharan.sethuraman@...el.com,
        Soumya.Prakash.Mishra@...el.com, sreehari.kancharla@...el.com,
        suresh.nagaraj@...el.com
Subject: Re: [PATCH v2 04/14] net: wwan: t7xx: Add port proxy infrastructure


On 11/6/2021 11:06 AM, Sergey Ryazanov wrote:
> On Mon, Nov 1, 2021 at 6:57 AM Ricardo Martinez
> <ricardo.martinez@...ux.intel.com> wrote:
>> Port-proxy provides a common interface to interact with different types
>> of ports. Ports export their configuration via `struct t7xx_port` and
>> operate as defined by `struct port_ops`.
[skipped]
>
>> +       enum ccci_ch            tx_ch;
>> +       enum ccci_ch            rx_ch;
>> +       unsigned char           txq_index;
>> +       unsigned char           rxq_index;
>> +       unsigned char           txq_exp_index;
>> +       unsigned char           rxq_exp_index;
>> +       enum cldma_id           path_id;
>> +       unsigned int            flags;
>> +       struct port_ops         *ops;
>> +       unsigned int            minor;
>> +       char                    *name;
> Why did you need these two fields with the port name and minor number?
> The WWAN subsystem will care about these data for you. It is its
> purpose.

This port proxy structure can abstract different types of ports. 'minor' 
field is used for

tty and char ports but it will be removed since the next iteration will 
contain only

WWAN ports and one control port.

'name' is currently used when printing error logs,  in the future it can 
be used

to define the name in the file system for test and debug ports.


[skipped]

>> +static int proxy_register_char_dev(void)
>> +{
>> +       dev_t dev = 0;
>> +       int ret;
>> +
>> +       if (port_prox->major) {
>> +               dev = MKDEV(port_prox->major, port_prox->minor_base);
>> +               ret = register_chrdev_region(dev, TTY_IPC_MINOR_BASE, MTK_DEV_NAME);
>> +       } else {
>> +               ret = alloc_chrdev_region(&dev, port_prox->minor_base,
>> +                                         TTY_IPC_MINOR_BASE, MTK_DEV_NAME);
>> +               if (ret)
>> +                       dev_err(port_prox->dev, "failed to alloc chrdev region, ret=%d\n", ret);
>> +
>> +               port_prox->major = MAJOR(dev);
>> +       }
> For what do you need these character devices? The WWAN subsystem
> already handle all these tasks.
This infrastructure is not going to be included in the next iteration, 
it is used for debug and test ports.
>> +       return ret;
>> +}
>> ...
>> +static int proxy_alloc(struct mtk_modem *md)
>> +{
>> +       int ret;
>> +
>> +       port_prox = devm_kzalloc(&md->mtk_dev->pdev->dev, sizeof(*port_prox), GFP_KERNEL);
>> +       if (!port_prox)
>> +               return -ENOMEM;
>
[skipped]


Ricardo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ