<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/memstick, branch v4.9.139</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.139</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.139'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2016-10-17T13:43:05Z</updated>
<entry>
<title>memstick: rtsx_usb_ms: Manage runtime PM when accessing the device</title>
<updated>2016-10-17T13:43:05Z</updated>
<author>
<name>Ulf Hansson</name>
<email>ulf.hansson@linaro.org</email>
</author>
<published>2016-09-28T18:33:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9158cb29e7c2f10dd325eb1589f0fe745a271257'/>
<id>urn:sha1:9158cb29e7c2f10dd325eb1589f0fe745a271257</id>
<content type='text'>
Accesses to the rtsx usb device, which is the parent of the rtsx memstick
device, must not be done unless it's runtime resumed. This is currently not
the case and it could trigger various errors.

Fix this by properly deal with runtime PM in this regards. This means
making sure the device is runtime resumed, when serving requests via the
-&gt;request() callback or changing settings via the -&gt;set_param() callbacks.

Cc: &lt;stable@vger.kernel.org&gt;
Cc: Ritesh Raj Sarraf &lt;rrs@researchut.com&gt;
Cc: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>memstick: rtsx_usb_ms: Runtime resume the device when polling for cards</title>
<updated>2016-10-17T13:43:04Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2016-09-26T22:45:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=796aa46adf1d90eab36ae06a42e6d3f10b28a75c'/>
<id>urn:sha1:796aa46adf1d90eab36ae06a42e6d3f10b28a75c</id>
<content type='text'>
Accesses to the rtsx usb device, which is the parent of the rtsx memstick
device, must not be done unless it's runtime resumed.

Therefore when the rtsx_usb_ms driver polls for inserted memstick cards,
let's add pm_runtime_get|put*() to make sure accesses is done when the
rtsx usb device is runtime resumed.

Reported-by: Ritesh Raj Sarraf &lt;rrs@researchut.com&gt;
Tested-by: Ritesh Raj Sarraf &lt;rrs@researchut.com&gt;
Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>memstick: don't allocate unused major for ms_block</title>
<updated>2016-08-02T21:31:41Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.com</email>
</author>
<published>2016-08-02T21:03:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ca945e71529c69f71b773b31f03a681876872117'/>
<id>urn:sha1:ca945e71529c69f71b773b31f03a681876872117</id>
<content type='text'>
When alloc_disk(0) is used the -&gt;major number is completely ignored.
All devices are allocated with a major of BLOCK_EXT_MAJOR.

So remove registration and deregistration of 'major'.

Link: http://lkml.kernel.org/r/20160602064318.4403.49955.stgit@noble
Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
Cc: Keith Busch &lt;keith.busch@intel.com&gt;
Cc: Jens Axboe &lt;axboe@fb.com&gt;
Cc: Maxim Levitsky &lt;maximlevitsky@gmail.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>memstick: don't allow REQ_TYPE_BLOCK_PC requests</title>
<updated>2016-07-20T23:38:27Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2016-07-19T09:31:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4eef39c90665fe73689b176dcd8cdff4a9a91274'/>
<id>urn:sha1:4eef39c90665fe73689b176dcd8cdff4a9a91274</id>
<content type='text'>
There is no code to issue or handle REQ_TYPE_BLOCK_PC request in the
memstick drivers, so remove the bogus conditional.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>block: convert to device_add_disk()</title>
<updated>2016-06-27T19:26:08Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2016-06-16T02:44:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0d52c756a665adc032c791307bc55e392b0186b3'/>
<id>urn:sha1:0d52c756a665adc032c791307bc55e392b0186b3</id>
<content type='text'>
For block drivers that specify a parent device, convert them to use
device_add_disk().

This conversion was done with the following semantic patch:

    @@
    struct gendisk *disk;
    expression E;
    @@

    - disk-&gt;driverfs_dev = E;
    ...
    - add_disk(disk);
    + device_add_disk(E, disk);

    @@
    struct gendisk *disk;
    expression E1, E2;
    @@

    - disk-&gt;driverfs_dev = E1;
    ...
    E2 = disk;
    ...
    - add_disk(E2);
    + device_add_disk(E1, E2);

...plus some manual fixups for a few missed conversions.

Cc: Jens Axboe &lt;axboe@fb.com&gt;
Cc: Keith Busch &lt;keith.busch@intel.com&gt;
Cc: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Cc: David Woodhouse &lt;dwmw2@infradead.org&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: James Bottomley &lt;James.Bottomley@hansenpartnership.com&gt;
Cc: Ross Zwisler &lt;ross.zwisler@linux.intel.com&gt;
Cc: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Cc: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>drivers/memstick/core/mspro_block: use kmemdup</title>
<updated>2016-05-24T00:04:14Z</updated>
<author>
<name>Muhammad Falak R Wani</name>
<email>falakreyaz@gmail.com</email>
</author>
<published>2016-05-23T23:24:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=de6cdcb5ce504c9d346858569e4ad2ca3ac2fe45'/>
<id>urn:sha1:de6cdcb5ce504c9d346858569e4ad2ca3ac2fe45</id>
<content type='text'>
Use kmemdup when some other buffer is immediately copied into allocated
region.  It replaces call to allocation followed by memcpy, by a single
call to kmemdup.

[akpm@linux-foundation.org: remove unneeded cast to void*]
Link: http://lkml.kernel.org/r/1463665743-16269-1-git-send-email-falakreyaz@gmail.com
Signed-off-by: Muhammad Falak R Wani &lt;falakreyaz@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>rtsx_usb_ms: use schedule_timeout_idle() in polling loop</title>
<updated>2016-05-24T00:04:14Z</updated>
<author>
<name>Oleksandr Natalenko</name>
<email>oleksandr@natalenko.name</email>
</author>
<published>2016-05-23T23:24:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a831979f855f1a19db1b3b194c5fab5e04ad26ff'/>
<id>urn:sha1:a831979f855f1a19db1b3b194c5fab5e04ad26ff</id>
<content type='text'>
First version of this patch has already been posted to LKML by Ben
Hutchings ~6 months ago, but no further action were performed.

Ben's original message:

: rtsx_usb_ms creates a task that mostly sleeps, but tasks in
: uninterruptible sleep still contribute to the load average (for
: bug-compatibility with Unix).  A load average of ~1 on a system that
: should be idle is somewhat alarming.
:
: Change the sleep to be interruptible, but still ignore signals.

References: https://bugs.debian.org/765717
Link: http://lkml.kernel.org/r/b49f95ae83057efa5d96f532803cba47@natalenko.name
Signed-off-by: Oleksandr Natalenko &lt;oleksandr@natalenko.name&gt;
Cc: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Cc: Lee Jones &lt;lee.jones@linaro.org&gt;
Cc: Wolfram Sang &lt;wsa@the-dreams.de&gt;
Cc: Roger Tseng &lt;rogerable@realtek.com&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>memstick: trivial fix of spelling mistake on management</title>
<updated>2016-04-28T08:58:33Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2016-04-24T22:28:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6951c585228112a299e8d2b023ee4953831bd6b4'/>
<id>urn:sha1:6951c585228112a299e8d2b023ee4953831bd6b4</id>
<content type='text'>
fix spelling mistake, managment -&gt; management in literal
strings, in a variable and a macro.

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>drivers/memstick/host/r592.c: avoid gcc-6 warning</title>
<updated>2016-03-25T23:37:42Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2016-03-25T21:21:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f419a08fb329e235df0cb8e329cff770e02d171a'/>
<id>urn:sha1:f419a08fb329e235df0cb8e329cff770e02d171a</id>
<content type='text'>
The r592 driver relies on behavior of the DMA mapping API that is
normally observed but not guaranteed by the API.  Instead it uses a
runtime check to fail transfers if the API ever behaves

When CONFIG_NEED_SG_DMA_LENGTH is not set, one of the checks turns into a
comparison of a variable with itself, which gcc-6.0 now warns about:

drivers/memstick/host/r592.c: In function 'r592_transfer_fifo_dma':
drivers/memstick/host/r592.c:302:31: error: self-comparison always evaluates to false [-Werror=tautological-compare]
    (sg_dma_len(&amp;dev-&gt;req-&gt;sg) &lt; dev-&gt;req-&gt;sg.length)) {
                               ^

The check itself is not a problem, so this patch just rephrases the
condition in a way that gcc does not consider an indication of a mistake.
We already know that dev-&gt;req-&gt;sg.length was initially R592_LFIFO_SIZE, so
we can compare it to that constant again.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Maxim Levitsky &lt;maximlevitsky@gmail.com&gt;
Cc: Quentin Lambert &lt;lambert.quentin@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>memstick: use sector_div instead of do_div</title>
<updated>2016-01-21T01:09:18Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2016-01-20T23:02:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=545b5e2ad4771d23d4c67d0bcc18babd2070df13'/>
<id>urn:sha1:545b5e2ad4771d23d4c67d0bcc18babd2070df13</id>
<content type='text'>
do_div is the wrong way to divide a sector_t, as it is less efficient
when sector_t is 32-bit wide.  With the upcoming do_div optimizations,
the kernel starts warning about this:

  drivers/memstick/core/ms_block.c: In function 'msb_io_work':
  include/asm-generic/div64.h:207:28: warning: comparison of distinct pointer types lacks a cast

This changes the code to use sector_div instead, which always produces
optimal code.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Maxim Levitsky &lt;maximlevitsky@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
