<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/scsi/gdth_proc.c, branch linux-4.6.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.6.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.6.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-02-26T02:16:49Z</updated>
<entry>
<title>gdth: replace struct timeval with ktime_get_real_seconds()</title>
<updated>2016-02-26T02:16:49Z</updated>
<author>
<name>Alison Schofield</name>
</author>
<published>2016-02-18T05:29:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5a412c38bb5bb6fc6a5faaeac0d6d33d2c731b4c'/>
<id>urn:sha1:5a412c38bb5bb6fc6a5faaeac0d6d33d2c731b4c</id>
<content type='text'>
struct timeval will overflow on 32-bit systems in y2038 and is being
removed from the kernel. Replace the use of struct timeval and
do_gettimeofday() with ktime_get_real_seconds() which provides a 64-bit
seconds value and is y2038 safe.

gdth driver requires changes in two areas:

1) gdth_store_event() loads two u32 timestamp fields for ioctl GDTIOCTL_EVENT

   These timestamp fields are part of struct gdth_evt_str used for passing
   event data to userspace. At the first instance of an event we do
   (first_stamp=last_stamp="current time"). If that same event repeats,
   we do (last_stamp="current time") AND increment same_count to indicate
   how many times the event has repeated since first_stamp.

   This patch replaces the use of timeval and do_gettimeofday() with
   ktime_get_real_seconds() cast to u32 to extend the timestamp fields
   to y2106.

   Beyond y2106, the userspace tools (ie. RAID controller monitors) can
   work around the time rollover and this driver would still not need to
   change.

   Alternative: The alternative approach is to introduce a new ioctl in gdth
   with the u32 time fields defined as u64.  This would require userspace
   changes now, but not in y2106.

2)  gdth_show_info() calculates elapsed time using u32 first_stamp

    It is adding events with timestamps to a seq_file.  Timestamps are
    calculated as the "current time" minus the first_stamp.

    This patch replaces the use of timeval and do_gettimeofday() with
    ktime_get_real_seconds() cast to u32 to calculate the timestamp.

    This elapsed time calculation is safe even when the time wraps (beyond
    y2106) due to how unsigned subtraction works. A comment has been added
    to the code to indicate this safety.

    Alternative: This piece itself doesn't warrant an alternative, but
    if we do introduce a new structure &amp; ioctl with u64 timestamps, this
    would change accordingly.

Signed-off-by: Alison Schofield &lt;amsfield22@gmail.com&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: replace seq_printf with seq_puts</title>
<updated>2015-02-02T17:57:45Z</updated>
<author>
<name>Rasmus Villemoes</name>
</author>
<published>2014-12-02T23:10:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=91c40f24faadd977ee9209fee6a760e72a50d19c'/>
<id>urn:sha1:91c40f24faadd977ee9209fee6a760e72a50d19c</id>
<content type='text'>
Using seq_printf to print a simple string is a lot more expensive than
it needs to be, since seq_puts exists. Replace seq_printf with
seq_puts when possible.

Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Reviewed-by: Finn Thain &lt;fthain@telegraphics.com.au&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>gdth: switch to -&gt;show_info()</title>
<updated>2013-04-09T18:13:16Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2013-03-31T04:52:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3e0552eebdf621504eaec7786613ef94a63463a0'/>
<id>urn:sha1:3e0552eebdf621504eaec7786613ef94a63463a0</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>[SCSI] gdth: Add missing call to gdth_ioctl_free</title>
<updated>2010-12-31T15:50:09Z</updated>
<author>
<name>Julia Lawall</name>
</author>
<published>2010-12-29T14:57:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5c10007560589a2335a77cbc92347b1474518296'/>
<id>urn:sha1:5c10007560589a2335a77cbc92347b1474518296</id>
<content type='text'>
Add missing call to gdth_ioctl_free before aborting.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@@
expression buf,ha,len,addr,E;
@@

buf = gdth_ioctl_alloc(ha, len, FALSE, &amp;addr)
... when != false buf != NULL
    when != true buf == NULL
    when != \(E = buf\|buf = E\)
    when != gdth_ioctl_free(ha, len, buf, addr)
*return ...;
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</content>
</entry>
<entry>
<title>include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h</title>
<updated>2010-03-30T13:02:32Z</updated>
<author>
<name>Tejun Heo</name>
</author>
<published>2010-03-24T08:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5a0e3ad6af8660be21ca98a971cd00f331318c05'/>
<id>urn:sha1:5a0e3ad6af8660be21ca98a971cd00f331318c05</id>
<content type='text'>
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -&gt; slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Guess-its-ok-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Lee Schermerhorn &lt;Lee.Schermerhorn@hp.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] gdth: Convert to use regular kernel types.</title>
<updated>2010-01-18T16:48:16Z</updated>
<author>
<name>Dave Jones</name>
</author>
<published>2010-01-04T15:19:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1fe6dbf4d0afba52ad0249f398e6296a1433a004'/>
<id>urn:sha1:1fe6dbf4d0afba52ad0249f398e6296a1433a004</id>
<content type='text'>
converted using this script..

 perl -p -i -e 's|ulong32|u32|g' drivers/scsi/gdth*
 perl -p -i -e 's|ulong64|u64|g' drivers/scsi/gdth*
 perl -p -i -e 's|ushort|u16|g' drivers/scsi/gdth*
 perl -p -i -e 's|unchar|u8|g' drivers/scsi/gdth*
 perl -p -i -e 's|ulong|unsigned long|g' drivers/scsi/gdth*
 perl -p -i -e 's|PACKED|__attribute__((packed))|g' drivers/scsi/gdth*

sha1sum of the generated code was identical before and after.

Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</content>
</entry>
<entry>
<title>[SCSI] gdth: fix overlapping snprintf users</title>
<updated>2009-06-09T15:31:46Z</updated>
<author>
<name>Alan Cox</name>
</author>
<published>2009-06-09T12:44:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=238ddbb98c327a7392ced5ae65216c55969749ea'/>
<id>urn:sha1:238ddbb98c327a7392ced5ae65216c55969749ea</id>
<content type='text'>
Closes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=13438
Closes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=13437
Signed-off-by: Alan Cox &lt;alan@linux.intel.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
</entry>
<entry>
<title>block: unify request timeout handling</title>
<updated>2008-10-09T06:56:13Z</updated>
<author>
<name>Jens Axboe</name>
</author>
<published>2008-09-14T12:55:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=242f9dcb8ba6f68fcd217a119a7648a4f69290e9'/>
<id>urn:sha1:242f9dcb8ba6f68fcd217a119a7648a4f69290e9</id>
<content type='text'>
Right now SCSI and others do their own command timeout handling.
Move those bits to the block layer.

Instead of having a timer per command, we try to be a bit more clever
and simply have one per-queue. This avoids the overhead of having to
tear down and setup a timer for each command, so it will result in a lot
less timer fiddling.

Signed-off-by: Mike Anderson &lt;andmike@linux.vnet.ibm.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] gdth: don't call pci_free_consistent under spinlock</title>
<updated>2008-02-18T15:02:25Z</updated>
<author>
<name>James Bottomley</name>
</author>
<published>2008-02-17T17:24:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ff83efacf2b77a1fe8942db6613825a4b80ee5e2'/>
<id>urn:sha1:ff83efacf2b77a1fe8942db6613825a4b80ee5e2</id>
<content type='text'>
The spinlock is held over too large a region: pscratch is a permanent
address (it's allocated at boot time and never changes).  All you need
the smp lock for is mediating the scratch in use flag, so fix this by
moving the spinlock into the case where we set the pscratch_busy flag
to false.

Cc: Stable Tree &lt;stable@kernel.org&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] gdth: Move members from SCp to gdth_cmndinfo, stage 2</title>
<updated>2007-10-12T18:56:09Z</updated>
<author>
<name>Boaz Harrosh</name>
</author>
<published>2007-10-02T21:16:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f842b64e0ffbcc9ce48a3bf799d0b005094107c1'/>
<id>urn:sha1:f842b64e0ffbcc9ce48a3bf799d0b005094107c1</id>
<content type='text'>
  - Cleanup the rest of the scsi_cmnd-&gt;SCp members and move them
    to gdth_cmndinfo:
    SCp.this_residual 	 =&gt; priority
    SCp.buffers_residual =&gt; timeout
    SCp.Status 		 =&gt; status and dma_dir
    SCp.Message 	 =&gt; info
    SCp.have_data_in 	 =&gt; volatile wait_for_completion
    SCp.sent_command 	 =&gt; OpCode
    SCp.phase 		 =&gt; phase

  - Two more members will be naturally removed in the !use_sg cleanup

  TODO: What is the meaning of gdth_cmndinfo.phase? (rhetorically)

Signed-off-by Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@SteelEye.com&gt;
</content>
</entry>
</feed>
