<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/parport/share.c, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/parport/share.c?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/parport/share.c?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2021-01-21T21:06:00Z</updated>
<entry>
<title>parport: fix a kernel-doc markup</title>
<updated>2021-01-21T21:06:00Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+huawei@kernel.org</email>
</author>
<published>2021-01-14T08:04:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=4c9a3a6c9c5478ce6b4b9db6c964244474676bcb'/>
<id>urn:sha1:4c9a3a6c9c5478ce6b4b9db6c964244474676bcb</id>
<content type='text'>
The kernel-doc markup inside share.c is actually for
__parport_register_driver. The actual goal seems to be
to document parport_register_driver().

So, fix the existing markup and add a new one.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+huawei@kernel.org&gt;
Link: https://lore.kernel.org/r/dc0778af8c466cc667409ead05876a5cfd3cbece.1610610937.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>parport: remove use of devmodel</title>
<updated>2020-04-23T15:05:40Z</updated>
<author>
<name>Sudip Mukherjee</name>
<email>sudipm.mukherjee@gmail.com</email>
</author>
<published>2020-04-03T13:43:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=3275158fa52ad2a795f7f52ba4565ea92660c296'/>
<id>urn:sha1:3275158fa52ad2a795f7f52ba4565ea92660c296</id>
<content type='text'>
Now that all the drivers using parallel port has been converted to use
device model, there is no driver left which has devmodel as false.
Remove the part of the code which expects devmodel can be false.

Signed-off-by: Sudip Mukherjee &lt;sudipm.mukherjee@gmail.com&gt;
Link: https://lore.kernel.org/r/20200403134325.11523-11-sudipm.mukherjee@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>parport: remove unused parport_register_device()</title>
<updated>2020-04-23T15:05:39Z</updated>
<author>
<name>Sudip Mukherjee</name>
<email>sudipm.mukherjee@gmail.com</email>
</author>
<published>2020-04-03T13:43:24Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=bae9defb06a781083844cafd0a359f423cd98388'/>
<id>urn:sha1:bae9defb06a781083844cafd0a359f423cd98388</id>
<content type='text'>
All the drivers that are using parallel port has been converted to use
the new device model api, and parport_register_device() is no longer
used.

Signed-off-by: Sudip Mukherjee &lt;sudipm.mukherjee@gmail.com&gt;
Link: https://lore.kernel.org/r/20200403134325.11523-10-sudipm.mukherjee@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>parport: Add comments for parport_register_dev_model()</title>
<updated>2020-04-23T15:05:39Z</updated>
<author>
<name>Sudip Mukherjee</name>
<email>sudipm.mukherjee@gmail.com</email>
</author>
<published>2020-04-03T13:43:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=6824f0ce38cb4b903a3cbf00dd528861f6c2ea7c'/>
<id>urn:sha1:6824f0ce38cb4b903a3cbf00dd528861f6c2ea7c</id>
<content type='text'>
In preparation to remove parport_register_device(), copy the comments
to parport_register_dev_model() and modify the parameters according to
what parport_register_dev_model() has.

Signed-off-by: Sudip Mukherjee &lt;sudipm.mukherjee@gmail.com&gt;
Link: https://lore.kernel.org/r/20200403134325.11523-9-sudipm.mukherjee@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>parport: Use more comon logging styles</title>
<updated>2020-04-23T15:05:37Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2020-04-03T13:43:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=aa3d6e7c49e3b480aa9db0e9924736726a6f75aa'/>
<id>urn:sha1:aa3d6e7c49e3b480aa9db0e9924736726a6f75aa</id>
<content type='text'>
Some of the logging can be poorly formatted because of unexpected
line breaks given printks without KERN_CONT that should be pr_cont.

Miscellanea:

o Remove unnecessary spaces between function name and open parenthesis
o Convert bare printks to pr_&lt;level&gt; where appropriate
o Convert embedded function names to use %s, __func__
o Coalesce formats
o Realign arguments
o Use do {} while (0) in a macro and not a bare if

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reviewed-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Sudip Mukherjee &lt;sudipm.mukherjee@gmail.com&gt;
Link: https://lore.kernel.org/r/20200403134325.11523-3-sudipm.mukherjee@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>parport: Convert printk(KERN_&lt;LEVEL&gt; to pr_&lt;level&gt;(</title>
<updated>2020-04-23T15:05:37Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2020-04-03T13:43:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=decf26f6ec25dac868782dc1751623a87d147831'/>
<id>urn:sha1:decf26f6ec25dac868782dc1751623a87d147831</id>
<content type='text'>
Use the more common kernel style.

Miscellanea:

o Coalesce formats
o Realign arguments

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Reviewed-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Signed-off-by: Sudip Mukherjee &lt;sudipm.mukherjee@gmail.com&gt;
Link: https://lore.kernel.org/r/20200403134325.11523-2-sudipm.mukherjee@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>parport: load lowlevel driver if ports not found</title>
<updated>2019-11-13T11:09:48Z</updated>
<author>
<name>Sudip Mukherjee</name>
<email>sudipm.mukherjee@gmail.com</email>
</author>
<published>2019-10-16T14:45:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=231ec2f24dad18d021b361045bbd618ba62a274e'/>
<id>urn:sha1:231ec2f24dad18d021b361045bbd618ba62a274e</id>
<content type='text'>
Usually all the distro will load the parport low level driver as part
of their initialization. But we can get into a situation where all the
parallel port drivers are built as module and we unload all the modules
at a later time. Then if we just do "modprobe parport" it will only
load the parport module and will not load the low level driver which
will actually register the ports. So, check the bus if there is any
parport registered, if not, load the low level driver.

We can get into the above situation with all distro but only Suse has
setup the alias for "parport_lowlevel" and so it only works in Suse.
Users of Debian based distro will need to load the lowlevel module
manually.

Signed-off-by: Sudip Mukherjee &lt;sudipm.mukherjee@gmail.com&gt;
Link: https://lore.kernel.org/r/20191016144540.18810-3-sudipm.mukherjee@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>parport: do not check portlist when using device-model</title>
<updated>2019-11-13T11:09:48Z</updated>
<author>
<name>Sudip Mukherjee</name>
<email>sudipm.mukherjee@gmail.com</email>
</author>
<published>2019-10-16T14:45:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e962cd9cf9cfb1f5db6bbad6a6470e5ccf56e290'/>
<id>urn:sha1:e962cd9cf9cfb1f5db6bbad6a6470e5ccf56e290</id>
<content type='text'>
We do not need to maintain a list of ports when we are using the
device-model. The base layer is going to maintain the list for us and
we can get the list of ports just using bus_for_each_dev().

Signed-off-by: Sudip Mukherjee &lt;sudipm.mukherjee@gmail.com&gt;
Link: https://lore.kernel.org/r/20191016144540.18810-2-sudipm.mukherjee@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>parport: Fix mem leak in parport_register_dev_model</title>
<updated>2019-05-24T18:39:23Z</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2019-05-14T15:24:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1c7ebeabc9e5ee12e42075a597de40fdb9059530'/>
<id>urn:sha1:1c7ebeabc9e5ee12e42075a597de40fdb9059530</id>
<content type='text'>
BUG: memory leak
unreferenced object 0xffff8881df48cda0 (size 16):
  comm "syz-executor.0", pid 5077, jiffies 4295994670 (age 22.280s)
  hex dump (first 16 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;00000000d2d0d5fe&gt;] parport_register_dev_model+0x141/0x6e0 [parport]
    [&lt;00000000782f6dab&gt;] 0xffffffffc15d1196
    [&lt;00000000d2ca6ae4&gt;] platform_drv_probe+0x7e/0x100
    [&lt;00000000628c2a94&gt;] really_probe+0x342/0x4d0
    [&lt;000000006874f5da&gt;] driver_probe_device+0x8c/0x170
    [&lt;00000000424de37a&gt;] __device_attach_driver+0xda/0x100
    [&lt;000000002acab09a&gt;] bus_for_each_drv+0xfe/0x170
    [&lt;000000003d9e5f31&gt;] __device_attach+0x190/0x230
    [&lt;0000000035d32f80&gt;] bus_probe_device+0x123/0x140
    [&lt;00000000a05ba627&gt;] device_add+0x7cc/0xce0
    [&lt;000000003f7560bf&gt;] platform_device_add+0x230/0x3c0
    [&lt;000000002a0be07d&gt;] 0xffffffffc15d0949
    [&lt;000000007361d8d2&gt;] port_check+0x3b/0x50 [parport]
    [&lt;000000004d67200f&gt;] bus_for_each_dev+0x115/0x180
    [&lt;000000003ccfd11c&gt;] __parport_register_driver+0x1f0/0x210 [parport]
    [&lt;00000000987f06fc&gt;] 0xffffffffc15d803e

After commit 4e5a74f1db8d ("parport: Revert "parport: fix
memory leak""), free_pardevice do not free par_dev-&gt;state,
we should free it in error path of parport_register_dev_model
before return.

Reported-by: Hulk Robot &lt;hulkci@huawei.com&gt;
Fixes: 4e5a74f1db8d ("parport: Revert "parport: fix memory leak"")
Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "parport: daisy: use new parport device model"</title>
<updated>2019-03-25T21:49:00Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-03-25T21:49:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a3ac7917b73070010c05b4485b8582a6c9cd69b6'/>
<id>urn:sha1:a3ac7917b73070010c05b4485b8582a6c9cd69b6</id>
<content type='text'>
This reverts commit 1aec4211204d9463d1fd209eb50453de16254599.

Steven Rostedt reports that it causes a hang at bootup and bisected it
to this commit.

The troigger is apparently a module alias for "parport_lowlevel" that
points to "parport_pc", which causes a hang with

    modprobe -q -- parport_lowlevel

blocking forever with a backtrace like this:

    wait_for_completion_killable+0x1c/0x28
    call_usermodehelper_exec+0xa7/0x108
    __request_module+0x351/0x3d8
    get_lowlevel_driver+0x28/0x41 [parport]
    __parport_register_driver+0x39/0x1f4 [parport]
    daisy_drv_init+0x31/0x4f [parport]
    parport_bus_init+0x5d/0x7b [parport]
    parport_default_proc_register+0x26/0x1000 [parport]
    do_one_initcall+0xc2/0x1e0
    do_init_module+0x50/0x1d4
    load_module+0x1c2e/0x21b3
    sys_init_module+0xef/0x117

Supid says:
 "Due to the new device model daisy driver will now try to find the
  parallel ports while trying to register its driver so that it can bind
  with them. Now, since daisy driver is loaded while parport bus is
  initialising the list of parport is still empty and it tries to load
  the lowlevel driver, which has an alias set to parport_pc, now causes
  a deadlock"

But I don't think the daisy driver should be loaded by the parport
initialization in the first place, so let's revert the whole change.

If the daisy driver can just initialize separately on its own (like a
driver should), instead of hooking into the parport init sequence
directly, this issue probably would go away.

Reported-and-bisected-by: Steven Rostedt (VMware) &lt;rostedt@goodmis.org&gt;
Reported-by: Michal Kubecek &lt;mkubecek@suse.cz&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Sudip Mukherjee &lt;sudipm.mukherjee@gmail.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
