<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/scsi/scsi_debug.c, branch v4.5</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>Merge branch 'jejb-scsi' into misc</title>
<updated>2016-01-07T23:51:13+00:00</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@HansenPartnership.com</email>
</author>
<published>2016-01-07T23:51:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=abaee091a18c19ccd86feb1c8374585d82e96777'/>
<id>abaee091a18c19ccd86feb1c8374585d82e96777</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi_debug: Increase the reported optimal transfer length</title>
<updated>2015-12-22T03:14:47+00:00</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2015-12-16T22:53:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=32c5844abb302e3fb1637ba6afe3d8132c64e57f'/>
<id>32c5844abb302e3fb1637ba6afe3d8132c64e57f</id>
<content type='text'>
The OPTIMAL TRANSFER LENGTH reported by scsi_debug is 64 blocks which
translates to 32KB with the default logical block size. That's much
lower than what real storage devices typically report (256KB to 1MB).

Bump the optimal transfer length to 1024 blocks.

Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Reviewed-by: Ewan Milne &lt;emilne@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The OPTIMAL TRANSFER LENGTH reported by scsi_debug is 64 blocks which
translates to 32KB with the default logical block size. That's much
lower than what real storage devices typically report (256KB to 1MB).

Bump the optimal transfer length to 1024 blocks.

Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Reviewed-by: Ewan Milne &lt;emilne@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi_debug: check for bigger value first</title>
<updated>2015-11-30T17:12:19+00:00</updated>
<author>
<name>Andy Shevchenko</name>
<email>andy.shevchenko@gmail.com</email>
</author>
<published>2015-11-26T18:22:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=fa785f0a984d863a24d2f288b68757188a50261b'/>
<id>fa785f0a984d863a24d2f288b68757188a50261b</id>
<content type='text'>
Even for signed types we have to check for bigger positive value first.
Otherwise it will be never happened.

Signed-off-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Reviewed-by: Ewan Milne &lt;emilne@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Even for signed types we have to check for bigger positive value first.
Otherwise it will be never happened.

Signed-off-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Reviewed-by: Ewan Milne &lt;emilne@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: use sector_div instead of do_div</title>
<updated>2015-11-26T03:17:02+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2015-11-20T16:38:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=494131124f04252bb3f91c0801bfe796d49971ef'/>
<id>494131124f04252bb3f91c0801bfe796d49971ef</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/scsi/scsi_debug.c: In function 'dif_store':
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;
Reviewed-by: Hannes Reinicke &lt;hare@suse.de&gt;
Reviewed-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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/scsi/scsi_debug.c: In function 'dif_store':
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;
Reviewed-by: Hannes Reinicke &lt;hare@suse.de&gt;
Reviewed-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi_debug: fix prevent_allow+verify regressions</title>
<updated>2015-11-26T02:38:53+00:00</updated>
<author>
<name>Douglas Gilbert</name>
<email>dgilbert@interlog.com</email>
</author>
<published>2015-11-22T17:11:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f7f9f26b139e53d798ea76465223a5f237d90fd3'/>
<id>f7f9f26b139e53d798ea76465223a5f237d90fd3</id>
<content type='text'>
Ruediger Meier observed a regression with the PREVENT ALLOW MEDIUM
REMOVAL command in lk 3.19:

	http://www.spinics.net/lists/util-linux-ng/msg11448.html

Inspection indicated the same regression with VERIFY(10).

The patch is against lk 3.19.3 and also works with lk 4.3.0 .  With this
patch both commands are accepted and do nothing.

ChangeLog:

 - fix the lk 3.19 regression so that the PREVENT ALLOW MEDIUM REMOVAL
   command is supported once again

 - same fix for VERIFY(10)

Signed-off-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Reviewed-by: Hannes Reinicke &lt;hare@suse.de&gt;
Reviewed-by: Ewan Milne &lt;emilne@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ruediger Meier observed a regression with the PREVENT ALLOW MEDIUM
REMOVAL command in lk 3.19:

	http://www.spinics.net/lists/util-linux-ng/msg11448.html

Inspection indicated the same regression with VERIFY(10).

The patch is against lk 3.19.3 and also works with lk 4.3.0 .  With this
patch both commands are accepted and do nothing.

ChangeLog:

 - fix the lk 3.19 regression so that the PREVENT ALLOW MEDIUM REMOVAL
   command is supported once again

 - same fix for VERIFY(10)

Signed-off-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Reviewed-by: Hannes Reinicke &lt;hare@suse.de&gt;
Reviewed-by: Ewan Milne &lt;emilne@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi_debug: resp_request: remove unused variable</title>
<updated>2015-09-06T18:03:14+00:00</updated>
<author>
<name>Tomas Winkler</name>
<email>tomas.winkler@intel.com</email>
</author>
<published>2015-07-28T13:54:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2492fc09f0b90cd69cd9788d12c5c79d673adef3'/>
<id>2492fc09f0b90cd69cd9788d12c5c79d673adef3</id>
<content type='text'>
Fixes the following warning

In function ‘resp_requests’:
drivers/scsi//scsi_debug.c:1432:15: warning: variable ‘want_dsense’ set
but not used [-Wunused-but-set-variable]
  bool dsense, want_dsense;

Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Reviewed-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes the following warning

In function ‘resp_requests’:
drivers/scsi//scsi_debug.c:1432:15: warning: variable ‘want_dsense’ set
but not used [-Wunused-but-set-variable]
  bool dsense, want_dsense;

Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Reviewed-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi_debug: fix REPORT LUNS Well Known LU</title>
<updated>2015-09-06T18:02:41+00:00</updated>
<author>
<name>Tomas Winkler</name>
<email>tomas.winkler@intel.com</email>
</author>
<published>2015-07-28T13:54:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f2d3fd29ba6226218533ad3fbba2312ae122663f'/>
<id>f2d3fd29ba6226218533ad3fbba2312ae122663f</id>
<content type='text'>
The use case to report 'REPORT LUNS WLUN' described
in scsi_debug documentation didn't work because:
scsi_scan_host_selected() checks for:
	 lun &lt; shost-&gt;max_lun

To fix this we set:
	max_lun = SCSI_W_LUN_REPORT_LUNS + 1;

Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Reviewed-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The use case to report 'REPORT LUNS WLUN' described
in scsi_debug documentation didn't work because:
scsi_scan_host_selected() checks for:
	 lun &lt; shost-&gt;max_lun

To fix this we set:
	max_lun = SCSI_W_LUN_REPORT_LUNS + 1;

Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Reviewed-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi_debug: schedule_resp fix input variable check</title>
<updated>2015-09-06T18:02:04+00:00</updated>
<author>
<name>Tomas Winkler</name>
<email>tomas.winkler@intel.com</email>
</author>
<published>2015-07-28T13:54:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=299b6c07ea134d4f9d7cb743194bf9c1941585b2'/>
<id>299b6c07ea134d4f9d7cb743194bf9c1941585b2</id>
<content type='text'>
The function should never be called with cmnd NULL so
put a fat WARN there.
Fix also smatch wraning:
schedule_resp() warn: variable dereferenced before check 'cmnd'

Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Reviewed-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function should never be called with cmnd NULL so
put a fat WARN there.
Fix also smatch wraning:
schedule_resp() warn: variable dereferenced before check 'cmnd'

Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Reviewed-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi_debug: make dump_sector static</title>
<updated>2015-09-06T18:01:18+00:00</updated>
<author>
<name>Tomas Winkler</name>
<email>tomas.winkler@intel.com</email>
</author>
<published>2015-07-28T13:54:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=58a8635d5a1b49c4b87fb48969319e1ce77d3f03'/>
<id>58a8635d5a1b49c4b87fb48969319e1ce77d3f03</id>
<content type='text'>
fixes warning:
warning: no previous prototype for ‘dump_sector’

Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Reviewed-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fixes warning:
warning: no previous prototype for ‘dump_sector’

Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Reviewed-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi_debug: vfree is null safe so drop the check</title>
<updated>2015-09-06T18:00:16+00:00</updated>
<author>
<name>Tomas Winkler</name>
<email>tomas.winkler@intel.com</email>
</author>
<published>2015-07-28T13:54:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=de232af6703ff8e283559016c14a3273ea932878'/>
<id>de232af6703ff8e283559016c14a3273ea932878</id>
<content type='text'>
Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Reviewed-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Reviewed-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Odin.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
