<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/block/bsg.c, branch v3.4.73</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>bsg: fix sysfs link remove warning</title>
<updated>2012-02-08T19:02:03+00:00</updated>
<author>
<name>Stanislaw Gruszka</name>
<email>sgruszka@redhat.com</email>
</author>
<published>2012-02-08T19:02:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=37b40adf2d1b4a5e51323be73ccf8ddcf3f15dd3'/>
<id>37b40adf2d1b4a5e51323be73ccf8ddcf3f15dd3</id>
<content type='text'>
We create "bsg" link if q-&gt;kobj.sd is not NULL, so remove it only
when the same condition is true.

Fixes:

WARNING: at fs/sysfs/inode.c:323 sysfs_hash_and_remove+0x2b/0x77()
sysfs: can not remove 'bsg', no directory
Call Trace:
  [&lt;c0429683&gt;] warn_slowpath_common+0x6a/0x7f
  [&lt;c0537a68&gt;] ? sysfs_hash_and_remove+0x2b/0x77
  [&lt;c042970b&gt;] warn_slowpath_fmt+0x2b/0x2f
  [&lt;c0537a68&gt;] sysfs_hash_and_remove+0x2b/0x77
  [&lt;c053969a&gt;] sysfs_remove_link+0x20/0x23
  [&lt;c05d88f1&gt;] bsg_unregister_queue+0x40/0x6d
  [&lt;c0692263&gt;] __scsi_remove_device+0x31/0x9d
  [&lt;c069149f&gt;] scsi_forget_host+0x41/0x52
  [&lt;c0689fa9&gt;] scsi_remove_host+0x71/0xe0
  [&lt;f7de5945&gt;] quiesce_and_remove_host+0x51/0x83 [usb_storage]
  [&lt;f7de5a1e&gt;] usb_stor_disconnect+0x18/0x22 [usb_storage]
  [&lt;c06c29de&gt;] usb_unbind_interface+0x4e/0x109
  [&lt;c067a80f&gt;] __device_release_driver+0x6b/0xa6
  [&lt;c067a861&gt;] device_release_driver+0x17/0x22
  [&lt;c067a46a&gt;] bus_remove_device+0xd6/0xe6
  [&lt;c06785e2&gt;] device_del+0xf2/0x137
  [&lt;c06c101f&gt;] usb_disable_device+0x94/0x1a0

Signed-off-by: Stanislaw Gruszka &lt;sgruszka@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We create "bsg" link if q-&gt;kobj.sd is not NULL, so remove it only
when the same condition is true.

Fixes:

WARNING: at fs/sysfs/inode.c:323 sysfs_hash_and_remove+0x2b/0x77()
sysfs: can not remove 'bsg', no directory
Call Trace:
  [&lt;c0429683&gt;] warn_slowpath_common+0x6a/0x7f
  [&lt;c0537a68&gt;] ? sysfs_hash_and_remove+0x2b/0x77
  [&lt;c042970b&gt;] warn_slowpath_fmt+0x2b/0x2f
  [&lt;c0537a68&gt;] sysfs_hash_and_remove+0x2b/0x77
  [&lt;c053969a&gt;] sysfs_remove_link+0x20/0x23
  [&lt;c05d88f1&gt;] bsg_unregister_queue+0x40/0x6d
  [&lt;c0692263&gt;] __scsi_remove_device+0x31/0x9d
  [&lt;c069149f&gt;] scsi_forget_host+0x41/0x52
  [&lt;c0689fa9&gt;] scsi_remove_host+0x71/0xe0
  [&lt;f7de5945&gt;] quiesce_and_remove_host+0x51/0x83 [usb_storage]
  [&lt;f7de5a1e&gt;] usb_stor_disconnect+0x18/0x22 [usb_storage]
  [&lt;c06c29de&gt;] usb_unbind_interface+0x4e/0x109
  [&lt;c067a80f&gt;] __device_release_driver+0x6b/0xa6
  [&lt;c067a861&gt;] device_release_driver+0x17/0x22
  [&lt;c067a46a&gt;] bus_remove_device+0xd6/0xe6
  [&lt;c06785e2&gt;] device_del+0xf2/0x137
  [&lt;c06c101f&gt;] usb_disable_device+0x94/0x1a0

Signed-off-by: Stanislaw Gruszka &lt;sgruszka@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'for-3.3/core' of git://git.kernel.dk/linux-block</title>
<updated>2012-01-15T20:24:45+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-01-15T20:24:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b3c9dd182ed3bdcdaf0e42625a35924b0497afdc'/>
<id>b3c9dd182ed3bdcdaf0e42625a35924b0497afdc</id>
<content type='text'>
* 'for-3.3/core' of git://git.kernel.dk/linux-block: (37 commits)
  Revert "block: recursive merge requests"
  block: Stop using macro stubs for the bio data integrity calls
  blockdev: convert some macros to static inlines
  fs: remove unneeded plug in mpage_readpages()
  block: Add BLKROTATIONAL ioctl
  block: Introduce blk_set_stacking_limits function
  block: remove WARN_ON_ONCE() in exit_io_context()
  block: an exiting task should be allowed to create io_context
  block: ioc_cgroup_changed() needs to be exported
  block: recursive merge requests
  block, cfq: fix empty queue crash caused by request merge
  block, cfq: move icq creation and rq-&gt;elv.icq association to block core
  block, cfq: restructure io_cq creation path for io_context interface cleanup
  block, cfq: move io_cq exit/release to blk-ioc.c
  block, cfq: move icq cache management to block core
  block, cfq: move io_cq lookup to blk-ioc.c
  block, cfq: move cfqd-&gt;icq_list to request_queue and add request-&gt;elv.icq
  block, cfq: reorganize cfq_io_context into generic and cfq specific parts
  block: remove elevator_queue-&gt;ops
  block: reorder elevator switch sequence
  ...

Fix up conflicts in:
 - block/blk-cgroup.c
	Switch from can_attach_task to can_attach
 - block/cfq-iosched.c
	conflict with now removed cic index changes (we now use q-&gt;id instead)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 'for-3.3/core' of git://git.kernel.dk/linux-block: (37 commits)
  Revert "block: recursive merge requests"
  block: Stop using macro stubs for the bio data integrity calls
  blockdev: convert some macros to static inlines
  fs: remove unneeded plug in mpage_readpages()
  block: Add BLKROTATIONAL ioctl
  block: Introduce blk_set_stacking_limits function
  block: remove WARN_ON_ONCE() in exit_io_context()
  block: an exiting task should be allowed to create io_context
  block: ioc_cgroup_changed() needs to be exported
  block: recursive merge requests
  block, cfq: fix empty queue crash caused by request merge
  block, cfq: move icq creation and rq-&gt;elv.icq association to block core
  block, cfq: restructure io_cq creation path for io_context interface cleanup
  block, cfq: move io_cq exit/release to blk-ioc.c
  block, cfq: move icq cache management to block core
  block, cfq: move io_cq lookup to blk-ioc.c
  block, cfq: move cfqd-&gt;icq_list to request_queue and add request-&gt;elv.icq
  block, cfq: reorganize cfq_io_context into generic and cfq specific parts
  block: remove elevator_queue-&gt;ops
  block: reorder elevator switch sequence
  ...

Fix up conflicts in:
 - block/blk-cgroup.c
	Switch from can_attach_task to can_attach
 - block/cfq-iosched.c
	conflict with now removed cic index changes (we now use q-&gt;id instead)
</pre>
</div>
</content>
</entry>
<entry>
<title>switch device_get_devnode() and -&gt;devnode() to umode_t *</title>
<updated>2012-01-04T03:54:55+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2011-07-24T00:24:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2c9ede55ecec58099b72e4bb8eab719f32f72c31'/>
<id>2c9ede55ecec58099b72e4bb8eab719f32f72c31</id>
<content type='text'>
both callers of device_get_devnode() are only interested in lower 16bits
and nobody tries to return anything wider than 16bit anyway.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
both callers of device_get_devnode() are only interested in lower 16bits
and nobody tries to return anything wider than 16bit anyway.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block: misc updates to blk_get_queue()</title>
<updated>2011-12-13T23:33:38+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2011-12-13T23:33:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=09ac46c429464c919d04bb737b27edd84d944f02'/>
<id>09ac46c429464c919d04bb737b27edd84d944f02</id>
<content type='text'>
* blk_get_queue() is peculiar in that it returns 0 on success and 1 on
  failure instead of 0 / -errno or boolean.  Update it such that it
  returns %true on success and %false on failure.

* Make sure the caller checks for the return value.

* Separate out __blk_get_queue() which doesn't check whether @q is
  dead and put it in blk.h.  This will be used later.

This patch doesn't introduce any functional changes.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* blk_get_queue() is peculiar in that it returns 0 on success and 1 on
  failure instead of 0 / -errno or boolean.  Update it such that it
  returns %true on success and %false on failure.

* Make sure the caller checks for the return value.

* Separate out __blk_get_queue() which doesn't check whether @q is
  dead and put it in blk.h.  This will be used later.

This patch doesn't introduce any functional changes.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bsg: fix address space warning from sparse</title>
<updated>2011-06-20T11:27:45+00:00</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@gmail.com</email>
</author>
<published>2011-06-20T11:27:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2b727c6300b49352f80f63704bb50c256949e95e'/>
<id>2b727c6300b49352f80f63704bb50c256949e95e</id>
<content type='text'>
copy_from/to_user() and blk_rq_map_user() want __user pointer.
This patch fixes following warnings from sparse:

   CHECK   block/bsg.c
 block/bsg.c:185:38: warning: incorrect type in argument 2 (different address spaces)
 block/bsg.c:185:38:    expected void const [noderef] &lt;asn:1&gt;*from
 block/bsg.c:185:38:    got void *&lt;noident&gt;
 block/bsg.c:295:58: warning: incorrect type in argument 4 (different address spaces)
 block/bsg.c:295:58:    expected void [noderef] &lt;asn:1&gt;*&lt;noident&gt;
 block/bsg.c:295:58:    got void *[assigned] dxferp
 block/bsg.c:311:52: warning: incorrect type in argument 4 (different address spaces)
 block/bsg.c:311:52:    expected void [noderef] &lt;asn:1&gt;*&lt;noident&gt;
 block/bsg.c:311:52:    got void *[assigned] dxferp
 block/bsg.c:448:37: warning: incorrect type in argument 1 (different address spaces)
 block/bsg.c:448:37:    expected void [noderef] &lt;asn:1&gt;*dst
 block/bsg.c:448:37:    got void *&lt;noident&gt;

Signed-off-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Acked-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
copy_from/to_user() and blk_rq_map_user() want __user pointer.
This patch fixes following warnings from sparse:

   CHECK   block/bsg.c
 block/bsg.c:185:38: warning: incorrect type in argument 2 (different address spaces)
 block/bsg.c:185:38:    expected void const [noderef] &lt;asn:1&gt;*from
 block/bsg.c:185:38:    got void *&lt;noident&gt;
 block/bsg.c:295:58: warning: incorrect type in argument 4 (different address spaces)
 block/bsg.c:295:58:    expected void [noderef] &lt;asn:1&gt;*&lt;noident&gt;
 block/bsg.c:295:58:    got void *[assigned] dxferp
 block/bsg.c:311:52: warning: incorrect type in argument 4 (different address spaces)
 block/bsg.c:311:52:    expected void [noderef] &lt;asn:1&gt;*&lt;noident&gt;
 block/bsg.c:311:52:    got void *[assigned] dxferp
 block/bsg.c:448:37: warning: incorrect type in argument 1 (different address spaces)
 block/bsg.c:448:37:    expected void [noderef] &lt;asn:1&gt;*dst
 block/bsg.c:448:37:    got void *&lt;noident&gt;

Signed-off-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Acked-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bsg: remove unnecessary conditional expressions</title>
<updated>2011-06-20T11:27:44+00:00</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@gmail.com</email>
</author>
<published>2011-06-20T11:27:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=44194e3e88fcfe77a2a6e2333847d4f27816259a'/>
<id>44194e3e88fcfe77a2a6e2333847d4f27816259a</id>
<content type='text'>
Second condition in OR always implies first condition is false
thus bytes_read in the second is not needed. The same goes to
bytes_written.

Signed-off-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Acked-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Second condition in OR always implies first condition is false
thus bytes_read in the second is not needed. The same goes to
bytes_written.

Signed-off-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Acked-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>bsg: fix bsg_poll() to return POLLOUT properly</title>
<updated>2011-06-20T11:27:44+00:00</updated>
<author>
<name>Namhyung Kim</name>
<email>namhyung@gmail.com</email>
</author>
<published>2011-06-20T11:27:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=80ceb057135ad77f513277f3bcd04b885501877a'/>
<id>80ceb057135ad77f513277f3bcd04b885501877a</id>
<content type='text'>
POLLOUT should be returned only if bd-&gt;queued_cmds &lt; bd-&gt;max_queue
so that bsg_alloc_command() can proceed.

Signed-off-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Acked-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
POLLOUT should be returned only if bd-&gt;queued_cmds &lt; bd-&gt;max_queue
so that bsg_alloc_command() can proceed.

Signed-off-by: Namhyung Kim &lt;namhyung@gmail.com&gt;
Acked-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] bsg: correct fault if queue object removed while dev_t open</title>
<updated>2010-12-09T15:41:14+00:00</updated>
<author>
<name>James Smart</name>
<email>james.smart@emulex.com</email>
</author>
<published>2010-11-14T16:12:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c7a841f3aca469187db76842676951a672fd27d1'/>
<id>c7a841f3aca469187db76842676951a672fd27d1</id>
<content type='text'>
This patch corrects an issue in bsg that results in a general protection
fault if an LLD is removed while an application is using an open file
handle to a bsg device, and the application issues an ioctl. The fault
occurs because the class_dev is NULL, having been cleared in
bsg_unregister_queue() when the driver was removed.  With this
patch, a check is made for the class_dev, and the application
will receive ENXIO if the related object is gone.

Signed-off-by: Carl Lajeunesse &lt;carl.lajeunesse@emulex.com&gt;
Signed-off-by: James Smart &lt;james.smart@emulex.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch corrects an issue in bsg that results in a general protection
fault if an LLD is removed while an application is using an open file
handle to a bsg device, and the application issues an ioctl. The fault
occurs because the class_dev is NULL, having been cleared in
bsg_unregister_queue() when the driver was removed.  With this
patch, a check is made for the class_dev, and the application
will receive ENXIO if the related object is gone.

Signed-off-by: Carl Lajeunesse &lt;carl.lajeunesse@emulex.com&gt;
Signed-off-by: James Smart &lt;james.smart@emulex.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl</title>
<updated>2010-10-22T17:52:56+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-10-22T17:52:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=092e0e7e520a1fca03e13c9f2d157432a8657ff2'/>
<id>092e0e7e520a1fca03e13c9f2d157432a8657ff2</id>
<content type='text'>
* 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
  vfs: make no_llseek the default
  vfs: don't use BKL in default_llseek
  llseek: automatically add .llseek fop
  libfs: use generic_file_llseek for simple_attr
  mac80211: disallow seeks in minstrel debug code
  lirc: make chardev nonseekable
  viotape: use noop_llseek
  raw: use explicit llseek file operations
  ibmasmfs: use generic_file_llseek
  spufs: use llseek in all file operations
  arm/omap: use generic_file_llseek in iommu_debug
  lkdtm: use generic_file_llseek in debugfs
  net/wireless: use generic_file_llseek in debugfs
  drm: use noop_llseek
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
  vfs: make no_llseek the default
  vfs: don't use BKL in default_llseek
  llseek: automatically add .llseek fop
  libfs: use generic_file_llseek for simple_attr
  mac80211: disallow seeks in minstrel debug code
  lirc: make chardev nonseekable
  viotape: use noop_llseek
  raw: use explicit llseek file operations
  ibmasmfs: use generic_file_llseek
  spufs: use llseek in all file operations
  arm/omap: use generic_file_llseek in iommu_debug
  lkdtm: use generic_file_llseek in debugfs
  net/wireless: use generic_file_llseek in debugfs
  drm: use noop_llseek
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl</title>
<updated>2010-10-22T17:49:54+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2010-10-22T17:49:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c37927d4359e81b85de644f8fb08878717cf5f3f'/>
<id>c37927d4359e81b85de644f8fb08878717cf5f3f</id>
<content type='text'>
* 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
  block: autoconvert trivial BKL users to private mutex
  drivers: autoconvert trivial BKL users to private mutex
  ipmi: autoconvert trivial BKL users to private mutex
  mac: autoconvert trivial BKL users to private mutex
  mtd: autoconvert trivial BKL users to private mutex
  scsi: autoconvert trivial BKL users to private mutex

Fix up trivial conflicts (due to addition of private mutex right next to
deletion of a version string) in drivers/char/pcmcia/cm40[04]0_cs.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
  block: autoconvert trivial BKL users to private mutex
  drivers: autoconvert trivial BKL users to private mutex
  ipmi: autoconvert trivial BKL users to private mutex
  mac: autoconvert trivial BKL users to private mutex
  mtd: autoconvert trivial BKL users to private mutex
  scsi: autoconvert trivial BKL users to private mutex

Fix up trivial conflicts (due to addition of private mutex right next to
deletion of a version string) in drivers/char/pcmcia/cm40[04]0_cs.c
</pre>
</div>
</content>
</entry>
</feed>
