<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel about="http://blog.gmane.org/gmane.linux.scsi">
    <title>gmane.linux.scsi</title>
    <link>http://blog.gmane.org/gmane.linux.scsi</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.scsi/46428"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.scsi/46427"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.scsi/46426"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.scsi/46425"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.scsi/46424"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.scsi/46423"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.scsi/46422"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.scsi/46421"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.scsi/46420"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.scsi/46419"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.scsi/46418"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.scsi/46417"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.scsi/46416"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.scsi/46415"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.scsi/46414"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.scsi/46413"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.scsi/46412"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.scsi/46411"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.scsi/46410"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.linux.scsi/46409"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.scsi/46428">
    <title>Changes to Linux/SCSI target mode infrastructure for v2.6.28</title>
    <link>http://permalink.gmane.org/gmane.linux.scsi/46428</link>
    <description>Greetings Tomo-san and Co,

With the ongoing work in Linux/SCSI for v2.6.28 to map target mode
struct scatterlist memory directly down to struct scsi_cmnd without the
need for a intermediate struct bio as with the existing
scsi_execute_async(), I have started the porting process for the
Linux/SCSI subsystem plugin in generic target core v3.0
(lio-core-2.6.git) on v2.6.28-rc6.

So far, using struct request for ICF_SCSI_CONTROL_NONSG_IO_CDB is up
using blk_rq_map_kern(), as well as ICF_SCSI_NON_DATA_CDB ops using
struct request.  In order to get the first READ_10s of type
ICF_SCSI_DATA_SG_IO_CDB to work, I had to add a temporary
EXPORT_SYMBOL_GPL() for drivers/scsi/scsi_lib.c:scsi_req_map_sg() in
lio-core-2.6.git for v2.6.28-rc6 in order to get TYPE_DISK up using an
software emulated MPT-Fusion HBA driver with struct request.  I have
been looking at drivers/scsi/scsi_tgt_lib.c() (which currently uses
struct request), and I figure we need something similar for the generic
target infrastructure, although __scsi_get_command() and
__scsi_put_command() are currently used in that code.

Below is what my patch looks like so far, I will probably just end up
commiting an temporary ifdef to keep scsi_execute_async() until the
proper pieces are in place and the other issues are resolved below.
for struct scatterlist in
drivers/lio-core/target_core_pscsi.c:pscsi_map_task_SG() get rid of
scsi_req_map_sg() usage all together.

So far during my initial testing, I am running into a two different
exceptions.  One NULL pointer deference OOPS after half dozen Open/iSCSI
login/logouts in block/elevator.c:elv_dequeue_request().   Here is the
trace from SCSI softirq context:

http://linux-iscsi.org/builds/user/nab/2.6.28-rc6-oops-0.png
http://linux-iscsi.org/builds/user/nab/2.6.28-rc6-oops-1.png

The other one is a BUG_ON in blk/blk-timeout.c:177 in blk_add_timeout()
that happens after a few hundred MB of READ_10 traffic, which also
appears to pass through elv_dequeue_request() at some point:

http://linux-iscsi.org/builds/user/nab/2.6.28-rc6-oops-2.png
http://linux-iscsi.org/builds/user/nab/2.6.28-rc6-oops-4.png

Tomo, Boaz, Jens, any comments..?

--nab

diff --git a/drivers/lio-core/target_core_pscsi.c b/drivers/lio-core/target_core_pscsi.c
index ed9f588..5161483 100644
--- a/drivers/lio-core/target_core_pscsi.c
+++ b/drivers/lio-core/target_core_pscsi.c
&lt; at &gt;&lt; at &gt; -37,6 +37,7 &lt; at &gt;&lt; at &gt;
 #include &lt;linux/spinlock.h&gt;
 #include &lt;linux/smp_lock.h&gt;
 #include &lt;linux/genhd.h&gt;
+#include &lt;linux/cdrom.h&gt;
 #include &lt;linux/file.h&gt;
 
 #include &lt;scsi/scsi.h&gt;
&lt; at &gt;&lt; at &gt; -44,6 +45,7 &lt; at &gt;&lt; at &gt;
 #include &lt;scsi/scsi_cmnd.h&gt;
 #include &lt;scsi/scsi_host.h&gt;
 #include &lt;sd.h&gt;
+#include &lt;sr.h&gt;
 
 #include &lt;iscsi_linux_os.h&gt;
 #include &lt;iscsi_linux_defs.h&gt;
&lt; at &gt;&lt; at &gt; -763,11 +765,11 &lt; at &gt;&lt; at &gt; extern void *pscsi_allocate_request (
 se_device_t *dev)
 {
 pscsi_plugin_task_t *pt;
-if (!(pt = kmalloc(sizeof(pscsi_plugin_task_t), GFP_KERNEL))) {
-TRACE_ERROR("Unable to allocate pscsi_plugin_task_t\n");
+
+if (!(pt = kzalloc(sizeof(pscsi_plugin_task_t), GFP_KERNEL))) {
+printk(KERN_ERR "Unable to allocate pscsi_plugin_task_t\n");
 return(NULL);
 }
-memset(pt, 0, sizeof(pscsi_plugin_task_t));
 
 return(pt);
 }
&lt; at &gt;&lt; at &gt; -788,7 +790,44 &lt; at &gt;&lt; at &gt; extern void pscsi_get_evpd_sn (unsigned char *buf, u32 size, se_device_t *dev)
 return;
 }
 
-/*pscsi_do_task(): (Part of se_subsystem_api_t template)
+static int pscsi_blk_get_request (se_task_t *task)
+{
+pscsi_plugin_task_t *pt = (pscsi_plugin_task_t *) task-&gt;transport_req;
+pscsi_dev_virt_t *pdv = (pscsi_dev_virt_t *) task-&gt;iscsi_dev-&gt;dev_ptr;
+
+pt-&gt;pscsi_req = blk_get_request(pdv-&gt;pdv_sd-&gt;request_queue,
+(pt-&gt;pscsi_direction == DMA_TO_DEVICE), GFP_KERNEL);
+if (!(pt-&gt;pscsi_req) || IS_ERR(pt-&gt;pscsi_req)) {
+printk(KERN_ERR "PSCSI: blk_get_request() failed: %ld\n",
+IS_ERR(pt-&gt;pscsi_req));
+return(PYX_TRANSPORT_LOGICAL_UNIT_COMMUNICATION_FAILURE);
+}
+/*
+ * Defined as "scsi command" in include/linux/blkdev.h.
+ */
+pt-&gt;pscsi_req-&gt;cmd_type = REQ_TYPE_BLOCK_PC;
+/*
+ * Setup the done function pointer for struct request,
+ * also set the end_io_data pointer.to se_task_t.
+ */
+pt-&gt;pscsi_req-&gt;end_io = pscsi_req_done;
+pt-&gt;pscsi_req-&gt;end_io_data = (void *)task;
+/*
+ * Load the referenced se_task_t's SCSI CDB into
+ * include/linux/blkdev.h:struct request-&gt;cmd
+ */
+pt-&gt;pscsi_req-&gt;cmd_len = COMMAND_SIZE(pt-&gt;pscsi_cdb[0]);
+memcpy(pt-&gt;pscsi_req-&gt;cmd, pt-&gt;pscsi_cdb, pt-&gt;pscsi_req-&gt;cmd_len);
+/*
+ * Setup pointer for outgoing sense data.
+ */
+pt-&gt;pscsi_req-&gt;sense = (void *)&amp;pt-&gt;pscsi_sense[0];
+pt-&gt;pscsi_req-&gt;sense_len = 0;
+
+return(0);
+}
+
+/*      pscsi_do_task(): (Part of se_subsystem_api_t template)
  *
  *
  */
&lt; at &gt;&lt; at &gt; -796,17 +835,32 &lt; at &gt;&lt; at &gt; extern int pscsi_do_task (se_task_t *task)
 {
 pscsi_plugin_task_t *pt = (pscsi_plugin_task_t *) task-&gt;transport_req;
 pscsi_dev_virt_t *pdv = (pscsi_dev_virt_t *) task-&gt;iscsi_dev-&gt;dev_ptr;
-int ret;
-
-if ((ret = scsi_execute_async((struct scsi_device *)pdv-&gt;pdv_sd,
-   pt-&gt;pscsi_cdb, COMMAND_SIZE(pt-&gt;pscsi_cdb[0]), pt-&gt;pscsi_direction,
-   pt-&gt;pscsi_buf, task-&gt;task_size, task-&gt;task_sg_num,
-   (task-&gt;se_obj_api-&gt;get_device_type(task-&gt;se_obj_ptr) == 0) ?
-   PS_TIMEOUT_DISK : PS_TIMEOUT_OTHER, PS_RETRY,
-   (void *)task, pscsi_req_done, GFP_KERNEL)) != 0) {
-TRACE_ERROR("PSCSI Execute(): returned: %d\n", ret);
-return(PYX_TRANSPORT_LOGICAL_UNIT_COMMUNICATION_FAILURE);
-}
+struct gendisk *gd = NULL;
+/*
+ * Grab pointer to struct gendisk for TYPE_DISK and TYPE_ROM
+ * cases (eg: cases where struct scsi_device has a backing
+ * struct block_device.  Also set the struct request-&gt;timeout
+ * value based on peripheral device type (from SCSI).
+ */
+if (pdv-&gt;pdv_sd-&gt;type == TYPE_DISK) {
+struct scsi_disk *sdisk = dev_get_drvdata(
+&amp;pdv-&gt;pdv_sd-&gt;sdev_gendev);
+gd = sdisk-&gt;disk;
+pt-&gt;pscsi_req-&gt;timeout = PS_TIMEOUT_DISK;
+} else if (pdv-&gt;pdv_sd-&gt;type == TYPE_ROM) {
+struct scsi_cd *scd = dev_get_drvdata(
+&amp;pdv-&gt;pdv_sd-&gt;sdev_gendev);
+gd = scd-&gt;disk;
+pt-&gt;pscsi_req-&gt;timeout = PS_TIMEOUT_OTHER;
+} else
+pt-&gt;pscsi_req-&gt;timeout = PS_TIMEOUT_OTHER;
+
+pt-&gt;pscsi_req-&gt;retries = PS_RETRY;
+/*
+ * Queue the struct request into the struct scsi_device-&gt;request_queue.
+ */
+blk_execute_rq_nowait(pdv-&gt;pdv_sd-&gt;request_queue, gd,
+      pt-&gt;pscsi_req, 1, pscsi_req_done);
 
 return(PYX_TRANSPORT_SENT_TO_TRANSPORT);
 }
&lt; at &gt;&lt; at &gt; -817,7 +871,14 &lt; at &gt;&lt; at &gt; extern int pscsi_do_task (se_task_t *task)
  */
 extern void pscsi_free_task (se_task_t *task)
 {
-kfree(task-&gt;transport_req);
+pscsi_plugin_task_t *pt = (pscsi_plugin_task_t *) task-&gt;transport_req;
+
+if (pt-&gt;pscsi_req) {
+blk_put_request(pt-&gt;pscsi_req);
+pt-&gt;pscsi_req = NULL;
+}
+
+kfree(pt);
 return;
 }
 
&lt; at &gt;&lt; at &gt; -1099,31 +1160,65 &lt; at &gt;&lt; at &gt; extern void __pscsi_get_dev_info (pscsi_dev_virt_t *pdv, char *b, int *bl)
 return;
 }
 
-/*pscsi_map_task_SG(): 
+extern int scsi_req_map_sg(struct request *, struct scatterlist *, int,  unsigned , gfp_t );
+
+/*      pscsi_map_task_SG(): 
  *
  *
  */
-extern void pscsi_map_task_SG (se_task_t *task)
+extern int pscsi_map_task_SG (se_task_t *task)
 {
         pscsi_plugin_task_t *pt = (pscsi_plugin_task_t *) task-&gt;transport_req;
+int ret = 0;
+
 pt-&gt;pscsi_buf = (void *)task-&gt;task_buf;
 
-return;
+if (!task-&gt;task_size)
+return(0);
+#if 0
+if ((ret = blk_rq_map_sg(pdv-&gt;pdv_sd-&gt;request_queue,
+pt-&gt;pscsi_req,
+(struct scatterlist *)pt-&gt;pscsi_buf)) &lt; 0) {
+printk(KERN_ERR "PSCSI: blk_rq_map_sg() returned %d\n", ret);
+return(PYX_TRANSPORT_LOGICAL_UNIT_COMMUNICATION_FAILURE);
+}
+#else
+if ((ret = scsi_req_map_sg(pt-&gt;pscsi_req,
+(struct scatterlist *)pt-&gt;pscsi_buf,
+task-&gt;task_sg_num, task-&gt;task_size,
+GFP_KERNEL)) &lt; 0) {
+printk(KERN_ERR "PSCSI: scsi_req_map_sg() failed: %d\n", ret);
+return(PYX_TRANSPORT_LOGICAL_UNIT_COMMUNICATION_FAILURE);
+}
+#endif
+return(0);
 }
 
 /*pscsi_map_task_non_SG():
  *
  *
  */
-extern void pscsi_map_task_non_SG (se_task_t *task)
+extern int pscsi_map_task_non_SG (se_task_t *task)
 {
 iscsi_cmd_t *cmd = task-&gt;iscsi_cmd;
+pscsi_plugin_task_t *pt = (pscsi_plugin_task_t *) task-&gt;transport_req;
+pscsi_dev_virt_t *pdv = (pscsi_dev_virt_t *) task-&gt;iscsi_dev-&gt;dev_ptr;
 unsigned char *buf = (unsigned char *) T_TASK(cmd)-&gt;t_task_buf;
+int ret = 0;
 
-pscsi_plugin_task_t *pt = (pscsi_plugin_task_t *) task-&gt;transport_req;
 pt-&gt;pscsi_buf = (void *)buf;
 
-return;
+if (!task-&gt;task_size)
+return(0);
+
+if ((ret = blk_rq_map_kern(pdv-&gt;pdv_sd-&gt;request_queue,
+pt-&gt;pscsi_req, pt-&gt;pscsi_buf,
+task-&gt;task_size, GFP_KERNEL)) &lt; 0) {
+printk(KERN_ERR "PSCSI: blk_rq_map_kern() failed: %d\n", ret);
+return(PYX_TRANSPORT_LOGICAL_UNIT_COMMUNICATION_FAILURE);
+}
+
+return(0);
 }
 
 /*pscsi_CDB_inquiry():
&lt; at &gt;&lt; at &gt; -1135,9 +1230,11 &lt; at &gt;&lt; at &gt; extern int pscsi_CDB_inquiry (se_task_t *task, u32 size)
 pscsi_plugin_task_t *pt = (pscsi_plugin_task_t *) task-&gt;transport_req;
 
 pt-&gt;pscsi_direction = DMA_FROM_DEVICE;
-pscsi_map_task_non_SG(task);
+
+if (pscsi_blk_get_request(task) &lt; 0)
+return(-1);
 
-return(0);
+return(pscsi_map_task_non_SG(task));
 }
 
 extern int pscsi_CDB_none (se_task_t *task, u32 size)
&lt; at &gt;&lt; at &gt; -1146,7 +1243,7 &lt; at &gt;&lt; at &gt; extern int pscsi_CDB_none (se_task_t *task, u32 size)
 
 pt-&gt;pscsi_direction = DMA_NONE;
 
-return(0);
+return(pscsi_blk_get_request(task));
 }
 
 /*pscsi_CDB_read_non_SG():
&lt; at &gt;&lt; at &gt; -1158,9 +1255,11 &lt; at &gt;&lt; at &gt; extern int pscsi_CDB_read_non_SG (se_task_t *task, u32 size)
 pscsi_plugin_task_t *pt = (pscsi_plugin_task_t *) task-&gt;transport_req;
 
 pt-&gt;pscsi_direction = DMA_FROM_DEVICE;
-pscsi_map_task_non_SG(task);
 
-return(0);
+if (pscsi_blk_get_request(task) &lt; 0)
+return(PYX_TRANSPORT_LOGICAL_UNIT_COMMUNICATION_FAILURE);
+
+return(pscsi_map_task_non_SG(task));
 }
 
 /*pscsi_CDB_read_SG():
&lt; at &gt;&lt; at &gt; -1172,7 +1271,12 &lt; at &gt;&lt; at &gt; extern int pscsi_CDB_read_SG (se_task_t *task, u32 size)
 pscsi_plugin_task_t *pt = (pscsi_plugin_task_t *) task-&gt;transport_req;
 
 pt-&gt;pscsi_direction = DMA_FROM_DEVICE;
-pscsi_map_task_SG(task);
+
+if (pscsi_blk_get_request(task) &lt; 0)
+return(PYX_TRANSPORT_LOGICAL_UNIT_COMMUNICATION_FAILURE);
+
+if (pscsi_map_task_SG(task) &lt; 0)
+return(PYX_TRANSPORT_LOGICAL_UNIT_COMMUNICATION_FAILURE);
 
 return(task-&gt;task_sg_num);
 }
&lt; at &gt;&lt; at &gt; -1186,9 +1290,11 &lt; at &gt;&lt; at &gt; extern int pscsi_CDB_write_non_SG (se_task_t *task, u32 size)
 pscsi_plugin_task_t *pt = (pscsi_plugin_task_t *) task-&gt;transport_req;
 
 pt-&gt;pscsi_direction = DMA_TO_DEVICE;
-pscsi_map_task_non_SG(task);
 
-return(0);
+if (pscsi_blk_get_request(task) &lt; 0)
+return(PYX_TRANSPORT_LOGICAL_UNIT_COMMUNICATION_FAILURE);
+
+return(pscsi_map_task_non_SG(task));
 }
 
 /*pscsi_CDB_write_SG():
&lt; at &gt;&lt; at &gt; -1200,7 +1306,12 &lt; at &gt;&lt; at &gt; extern int pscsi_CDB_write_SG (se_task_t *task, u32 size)
 pscsi_plugin_task_t *pt = (pscsi_plugin_task_t *) task-&gt;transport_req;
 
 pt-&gt;pscsi_direction = DMA_TO_DEVICE;
-pscsi_map_task_SG(task);
+
+if (pscsi_blk_get_request(task) &lt; 0)
+return(PYX_TRANSPORT_LOGICAL_UNIT_COMMUNICATION_FAILURE);
+
+if (pscsi_map_task_SG(task) &lt; 0)
+return(PYX_TRANSPORT_LOGICAL_UNIT_COMMUNICATION_FAILURE);
 
 return(task-&gt;task_sg_num);
 }
&lt; at &gt;&lt; at &gt; -1386,22 +1497,25 &lt; at &gt;&lt; at &gt; extern void pscsi_shutdown_hba (se_hba_t *hba)
  *
  *
  */
-//#warning FIXME: We can do some custom handling of HBA fuckups here.
-extern inline void pscsi_process_SAM_status (se_task_t *task, unsigned char *cdb, int result)
+static inline void pscsi_process_SAM_status (
+se_task_t *task,
+pscsi_plugin_task_t *pt)
 {
-if ((task-&gt;task_scsi_status = status_byte(result))) {
+if ((task-&gt;task_scsi_status = status_byte(pt-&gt;pscsi_result))) {
 task-&gt;task_scsi_status &lt;&lt;= 1;
-PYXPRINT("Parallel SCSI Status Byte exception - ITT: 0x%08x Task: %p CDB: 0x%02x"
-" Result: 0x%08x\n", task-&gt;iscsi_cmd-&gt;init_task_tag, task, cdb[0], result);
+PYXPRINT("PSCSI Status Byte exception at task: %p CDB: 0x%02x"
+" Result: 0x%08x\n", task, pt-&gt;pscsi_cdb[0],
+pt-&gt;pscsi_result);
 }
 
-switch (host_byte(result)) {
+switch (host_byte(pt-&gt;pscsi_result)) {
 case DID_OK:
 transport_complete_task(task, (!task-&gt;task_scsi_status));
 break;
 default:
-PYXPRINT("Parallel SCSI Host Byte exception - ITT: 0x%08x Task: %p CDB: 0x%02x"
-" Result: 0x%08x\n", task-&gt;iscsi_cmd-&gt;init_task_tag, task, cdb[0], result);
+PYXPRINT("PSCSI Host Byte exception at task: %p CDB: 0x%02x"
+" Result: 0x%08x\n", task, pt-&gt;pscsi_cdb[0],
+pt-&gt;pscsi_result);
 task-&gt;task_scsi_status = SAM_STAT_CHECK_CONDITION;
 task-&gt;task_error_status = PYX_TRANSPORT_UNKNOWN_SAM_OPCODE;
 task-&gt;iscsi_cmd-&gt;transport_error_status = PYX_TRANSPORT_UNKNOWN_SAM_OPCODE;
&lt; at &gt;&lt; at &gt; -1412,21 +1526,17 &lt; at &gt;&lt; at &gt; extern inline void pscsi_process_SAM_status (se_task_t *task, unsigned char *cdb
 return;
 }
 
-extern void pscsi_req_done (void *data, char *sense, int result, int data_len)
+extern void pscsi_req_done (struct request *req, int uptodate)
 {
-se_task_t *task = (se_task_t *)data;
+se_task_t *task = (se_task_t *)req-&gt;end_io_data;
 pscsi_plugin_task_t *pt = (pscsi_plugin_task_t *)task-&gt;transport_req;
-#if 0
-printk("pscsi_req_done(): result: %08x, sense: %p data_len: %d\n",
-result, sense, data_len);
-#endif
-pt-&gt;pscsi_result = result;
-pt-&gt;pscsi_data_len = data_len;
-
-if (result != 0)
-memcpy(pt-&gt;pscsi_sense, sense, SCSI_SENSE_BUFFERSIZE);
+
+pt-&gt;pscsi_result = req-&gt;errors;
+pt-&gt;pscsi_resid = req-&gt;data_len;
 
-pscsi_process_SAM_status(task, &amp;pt-&gt;pscsi_cdb[0], result);
+pscsi_process_SAM_status(task, pt);
+
+__blk_put_request(req-&gt;q, req);
+
 return;
 }
-
diff --git a/drivers/lio-core/target_core_pscsi.h b/drivers/lio-core/target_core_pscsi.h
index 980587d..090f0d2 100644
--- a/drivers/lio-core/target_core_pscsi.h
+++ b/drivers/lio-core/target_core_pscsi.h
&lt; at &gt;&lt; at &gt; -90,7 +90,7 &lt; at &gt;&lt; at &gt; extern struct scatterlist *pscsi_get_SG (se_task_t *);
 extern u32 pscsi_get_SG_count (se_task_t *);
 extern int pscsi_set_non_SG_buf (unsigned char *, se_task_t *);
 extern void pscsi_shutdown_hba (struct se_hba_s *);
-extern void pscsi_req_done (void *, char *, int, int);
+extern void pscsi_req_done (struct request *, int);
 #endif
 
 #include &lt;linux/device.h&gt;
&lt; at &gt;&lt; at &gt; -104,8 +104,9 &lt; at &gt;&lt; at &gt; typedef struct pscsi_plugin_task_s {
 unsigned char pscsi_sense[SCSI_SENSE_BUFFERSIZE];
 intpscsi_direction;
 intpscsi_result;
-u32pscsi_data_len;
+u32pscsi_resid;
 void*pscsi_buf;
+struct request *pscsi_req;
 } pscsi_plugin_task_t;
 
 #define PDF_HAS_CHANNEL_ID0x01
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index f5d3b96..9e03a02 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
&lt; at &gt;&lt; at &gt; -303,8 +303,8 &lt; at &gt;&lt; at &gt; static void scsi_bi_endio(struct bio *bio, int error)
  * request can be sent to the block layer. We do not trust the scatterlist
  * sent to use, as some ULDs use that struct to only organize the pages.
  */
-static int scsi_req_map_sg(struct request *rq, struct scatterlist *sgl,
-   int nsegs, unsigned bufflen, gfp_t gfp)
+int scsi_req_map_sg(struct request *rq, struct scatterlist *sgl,
+    int nsegs, unsigned bufflen, gfp_t gfp)
 {
 struct request_queue *q = rq-&gt;q;
 int nr_pages = (bufflen + sgl[0].offset + PAGE_SIZE - 1) &gt;&gt; PAGE_SHIFT;
&lt; at &gt;&lt; at &gt; -379,6 +379,8 &lt; at &gt;&lt; at &gt; free_bios:
 return err;
 }
 
+EXPORT_SYMBOL_GPL(scsi_req_map_sg);
+
 /**
  * scsi_execute_async - insert request
  * &lt; at &gt;sdev:scsi device


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&lt; at &gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

</description>
    <dc:creator>Nicholas A. Bellinger</dc:creator>
    <dc:date>2008-12-02T01:52:07</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.scsi/46427">
    <title>Linux SCSI programming</title>
    <link>http://permalink.gmane.org/gmane.linux.scsi/46427</link>
    <description>Hi,

I'm trying to port a Windows SCSI API over to Linux. The API has
several functions, most of them using ATA_PASS_THROUGH_EX to send a
vendor specific command over to the device. I've managed to port 1 of
the API function that is a modified INQUIRY command. However, I'm very
confused as to how ATA passthrough is done in Linux. I've looked at
the sg3_utils source code to get some inspiration but it's too
complicated for me to understand what's going on.

Does anyone know how to port this?

In Windows a ATA_PASS_THROUGH_EX pointer is declared and memory
allocated for it. It's fields are then initialized(Length, AtaFlags,
DataTransferLength, TimeOutValue, DataBufferOffset, CurrentTaskFile[],
PreviousTaskFile[], etc) and then a DeviceIoControl() is called.

Now I know Linux's version of DeviceIoControl is ioctl() and I've used
it successfully for the INQUIRY command, but what's Linux's version of
ATA_PASS_THROUGH_EX?

Any help would be appreciated. Thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&lt; at &gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

</description>
    <dc:creator>Sihan Goi</dc:creator>
    <dc:date>2008-12-02T01:50:00</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.scsi/46426">
    <title>Re: [PATCH 2.6.28-rc6] block: internal dequeue shouldn't starttimer</title>
    <link>http://permalink.gmane.org/gmane.linux.scsi/46426</link>
    <description>
Yes this fixed the "w/o REQ_STARTED" error I was seeing on a distro kernel
and a mainline system. 

Thanks,

-andmike
--
Michael Anderson
andmike&lt; at &gt;linux.vnet.ibm.com
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&lt; at &gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

</description>
    <dc:creator>Mike Anderson</dc:creator>
    <dc:date>2008-12-01T23:45:29</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.scsi/46425">
    <title>[patch 08/10] scsi: annotate gdth_rdcap_data, gdth_rdcap16_data endianness</title>
    <link>http://permalink.gmane.org/gmane.linux.scsi/46425</link>
    <description>From: Harvey Harrison &lt;harvey.harrison&lt; at &gt;gmail.com&gt;

It would be easy to get rid of the typedefs too, but I kept this
minimal.

Noticed by sparse:
drivers/scsi/gdth.c:2395:31: warning: incorrect type in assignment (different base types)
drivers/scsi/gdth.c:2395:31:    expected unsigned int [unsigned] [assigned] [usertype] last_block_no
drivers/scsi/gdth.c:2395:31:    got restricted __be32 [usertype] &lt;noident&gt;
drivers/scsi/gdth.c:2396:27: warning: incorrect type in assignment (different base types)
drivers/scsi/gdth.c:2396:27:    expected unsigned int [unsigned] [assigned] [usertype] block_length
drivers/scsi/gdth.c:2396:27:    got restricted __be32 [usertype] &lt;noident&gt;
drivers/scsi/gdth.c:2406:33: warning: incorrect type in assignment (different base types)
drivers/scsi/gdth.c:2406:33:    expected unsigned long long [unsigned] [usertype] last_block_no
drivers/scsi/gdth.c:2406:33:    got restricted __be64 [usertype] &lt;noident&gt;
drivers/scsi/gdth.c:2407:33: warning: incorrect type in assignment (different base types)
drivers/scsi/gdth.c:2407:33:    expected unsigned int [unsigned] [usertype] block_length
drivers/scsi/gdth.c:2407:33:    got restricted __be32 [usertype] &lt;noident&gt;

Signed-off-by: Harvey Harrison &lt;harvey.harrison&lt; at &gt;gmail.com&gt;
Cc: Boaz Harrosh &lt;bharrosh&lt; at &gt;panasas.com&gt;
Cc: James Bottomley &lt;James.Bottomley&lt; at &gt;HansenPartnership.com&gt;
Signed-off-by: Andrew Morton &lt;akpm&lt; at &gt;linux-foundation.org&gt;
---

 drivers/scsi/gdth.c |    2 +-
 drivers/scsi/gdth.h |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff -puN drivers/scsi/gdth.c~scsi-annotate-gdth_rdcap_data-gdth_rdcap16_data-endianness drivers/scsi/gdth.c
--- a/drivers/scsi/gdth.c~scsi-annotate-gdth_rdcap_data-gdth_rdcap16_data-endianness
+++ a/drivers/scsi/gdth.c
&lt; at &gt;&lt; at &gt; -2391,7 +2391,7 &lt; at &gt;&lt; at &gt; static int gdth_internal_cache_cmd(gdth_
       case READ_CAPACITY:
         TRACE2(("Read capacity hdrive %d\n",t));
         if (ha-&gt;hdr[t].size &gt; (ulong64)0xffffffff)
-            rdc.last_block_no = 0xffffffff;
+            rdc.last_block_no = cpu_to_be32(0xffffffff);
         else
             rdc.last_block_no = cpu_to_be32(ha-&gt;hdr[t].size-1);
         rdc.block_length  = cpu_to_be32(SECTOR_SIZE);
diff -puN drivers/scsi/gdth.h~scsi-annotate-gdth_rdcap_data-gdth_rdcap16_data-endianness drivers/scsi/gdth.h
--- a/drivers/scsi/gdth.h~scsi-annotate-gdth_rdcap_data-gdth_rdcap16_data-endianness
+++ a/drivers/scsi/gdth.h
&lt; at &gt;&lt; at &gt; -968,14 +968,14 &lt; at &gt;&lt; at &gt; typedef struct {
 
 /* READ_CAPACITY data format */
 typedef struct {
-    ulong32     last_block_no;
-    ulong32     block_length;
+__be32 last_block_no;
+__be32 block_length;
 } PACKED gdth_rdcap_data;
 
 /* READ_CAPACITY (16) data format */
 typedef struct {
-    ulong64     last_block_no;
-    ulong32     block_length;
+__be64 last_block_no;
+__be32 block_length;
 } PACKED gdth_rdcap16_data;
 
 /* REQUEST_SENSE data format */
_
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&lt; at &gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

</description>
    <dc:creator>akpm&lt; at &gt;linux-foundation.org</dc:creator>
    <dc:date>2008-12-01T22:32:14</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.scsi/46424">
    <title>[patch 09/10] esp: fix section mismatch warning</title>
    <link>http://permalink.gmane.org/gmane.linux.scsi/46424</link>
    <description>From: Randy Dunlap &lt;randy.dunlap&lt; at &gt;oracle.com&gt;

Not critical.

WARNING: drivers/char/esp.o(.text+0x278): Section mismatch in reference from the function show_serial_version() to the variable .init.data:serial_version
The function show_serial_version() references
the variable __initdata serial_version.
This is often because show_serial_version lacks a __initdata
annotation or the annotation of serial_version is wrong.

WARNING: drivers/char/esp.o(.text+0x27d): Section mismatch in reference from the function show_serial_version() to the variable .init.data:serial_name
The function show_serial_version() references
the variable __initdata serial_name.
This is often because show_serial_version lacks a __initdata
annotation or the annotation of serial_name is wrong.

Signed-off-by: Randy Dunlap &lt;randy.dunlap&lt; at &gt;oracle.com&gt;
Cc: Andrew J. Robinson &lt;arobinso&lt; at &gt;nyx.net&gt;
Signed-off-by: Andrew Morton &lt;akpm&lt; at &gt;linux-foundation.org&gt;
---

 drivers/char/esp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/char/esp.c~esp-fix-section-mismatch-warning drivers/char/esp.c
--- a/drivers/char/esp.c~esp-fix-section-mismatch-warning
+++ a/drivers/char/esp.c
&lt; at &gt;&lt; at &gt; -2258,7 +2258,7 &lt; at &gt;&lt; at &gt; static int esp_open(struct tty_struct *t
  * driver.
  */
 
-static void show_serial_version(void)
+static void __init show_serial_version(void)
 {
 printk(KERN_INFO "%s version %s (DMA %u)\n",
 serial_name, serial_version, dma);
_
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&lt; at &gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

</description>
    <dc:creator>akpm&lt; at &gt;linux-foundation.org</dc:creator>
    <dc:date>2008-12-01T22:32:15</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.scsi/46423">
    <title>[patch 07/10] scsi: gdth.c use unaligned access helpers</title>
    <link>http://permalink.gmane.org/gmane.linux.scsi/46423</link>
    <description>From: Harvey Harrison &lt;harvey.harrison&lt; at &gt;gmail.com&gt;

Remove two now unnecessary local vars.

Signed-off-by: Harvey Harrison &lt;harvey.harrison&lt; at &gt;gmail.com&gt;
Cc: Boaz Harrosh &lt;bharrosh&lt; at &gt;panasas.com&gt;
Cc: James Bottomley &lt;James.Bottomley&lt; at &gt;HansenPartnership.com&gt;
Signed-off-by: Andrew Morton &lt;akpm&lt; at &gt;linux-foundation.org&gt;
---

 drivers/scsi/gdth.c |   23 ++++++++++-------------
 1 file changed, 10 insertions(+), 13 deletions(-)

diff -puN drivers/scsi/gdth.c~scsi-gdthc-use-unaligned-access-helpers drivers/scsi/gdth.c
--- a/drivers/scsi/gdth.c~scsi-gdthc-use-unaligned-access-helpers
+++ a/drivers/scsi/gdth.c
&lt; at &gt;&lt; at &gt; -131,6 +131,7 &lt; at &gt;&lt; at &gt;
 #include &lt;asm/system.h&gt;
 #include &lt;asm/io.h&gt;
 #include &lt;asm/uaccess.h&gt;
+#include &lt;asm/unaligned.h&gt;
 #include &lt;linux/spinlock.h&gt;
 #include &lt;linux/blkdev.h&gt;
 #include &lt;linux/scatterlist.h&gt;
&lt; at &gt;&lt; at &gt; -2429,8 +2430,8 &lt; at &gt;&lt; at &gt; static int gdth_fill_cache_cmd(gdth_ha_s
 {
     register gdth_cmd_str *cmdp;
     struct gdth_cmndinfo *cmndinfo = gdth_cmnd_priv(scp);
-    ulong32 cnt, blockcnt;
-    ulong64 no, blockno;
+    ulong32 blockcnt;
+    ulong64 blockno;
     int i, cmd_index, read_write, sgcnt, mode64;
 
     cmdp = ha-&gt;pccb;
&lt; at &gt;&lt; at &gt; -2498,19 +2499,15 &lt; at &gt;&lt; at &gt; static int gdth_fill_cache_cmd(gdth_ha_s
 
     if (read_write) {
         if (scp-&gt;cmd_len == 16) {
-            memcpy(&amp;no, &amp;scp-&gt;cmnd[2], sizeof(ulong64));
-            blockno = be64_to_cpu(no);
-            memcpy(&amp;cnt, &amp;scp-&gt;cmnd[10], sizeof(ulong32));
-            blockcnt = be32_to_cpu(cnt);
+blockno = get_unaligned_be64(&amp;scp-&gt;cmnd[2]);
+blockcnt = get_unaligned_be32(&amp;scp-&gt;cmnd[10]);
         } else if (scp-&gt;cmd_len == 10) {
-            memcpy(&amp;no, &amp;scp-&gt;cmnd[2], sizeof(ulong32));
-            blockno = be32_to_cpu(no);
-            memcpy(&amp;cnt, &amp;scp-&gt;cmnd[7], sizeof(ushort));
-            blockcnt = be16_to_cpu(cnt);
+blockno = get_unaligned_be32(&amp;scp-&gt;cmnd[2]);
+blockcnt = get_unaligned_be16(&amp;scp-&gt;cmnd[7]);
         } else {
-            memcpy(&amp;no, &amp;scp-&gt;cmnd[0], sizeof(ulong32));
-            blockno = be32_to_cpu(no) &amp; 0x001fffffUL;
-            blockcnt= scp-&gt;cmnd[4]==0 ? 0x100 : scp-&gt;cmnd[4];
+blockno = get_unaligned_be32(&amp;scp-&gt;cmnd[2]);
+blockno &amp;= 0x001fffffUL;
+blockcnt = scp-&gt;cmnd[4] == 0 ? 0x100 : scp-&gt;cmnd[4];
         }
         if (mode64) {
             cmdp-&gt;u.cache64.BlockNo = blockno;
_
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&lt; at &gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

</description>
    <dc:creator>akpm&lt; at &gt;linux-foundation.org</dc:creator>
    <dc:date>2008-12-01T22:32:13</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.scsi/46422">
    <title>[patch 10/10] scsi: fix bad use of udelay in atp870u.c</title>
    <link>http://permalink.gmane.org/gmane.linux.scsi/46422</link>
    <description>From: Martin Michlmayr &lt;tbm&lt; at &gt;cyrius.com&gt;

The ACARD driver calls udelay() with a value &gt; 2000, which leads to
to the following compilation error on ARM:
  ERROR: "__bad_udelay" [drivers/scsi/atp870u.ko] undefined!
  make[1]: *** [__modpost] Error 1
Fix this by using a combination of mdelay and udelay.

Signed-off-by: Martin Michlmayr &lt;tbm&lt; at &gt;cyrius.com&gt;
Cc: James Bottomley &lt;James.Bottomley&lt; at &gt;HansenPartnership.com&gt;
Signed-off-by: Andrew Morton &lt;akpm&lt; at &gt;linux-foundation.org&gt;
---

 drivers/scsi/atp870u.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff -puN drivers/scsi/atp870u.c~scsi-fix-bad-use-of-udelay-in-atp870uc drivers/scsi/atp870u.c
--- a/drivers/scsi/atp870u.c~scsi-fix-bad-use-of-udelay-in-atp870uc
+++ a/drivers/scsi/atp870u.c
&lt; at &gt;&lt; at &gt; -1171,7 +1171,8 &lt; at &gt;&lt; at &gt; wait_io1:
 outw(val, tmport);
 outb(2, 0x80);
 TCM_SYNC:
-udelay(0x800);
+mdelay(2);
+udelay(48);
 if ((inb(tmport) &amp; 0x80) == 0x00) {/* bsy ? */
 outw(0, tmport--);
 outb(0, tmport);
_
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&lt; at &gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

</description>
    <dc:creator>akpm&lt; at &gt;linux-foundation.org</dc:creator>
    <dc:date>2008-12-01T22:32:16</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.scsi/46421">
    <title>[patch 02/10] scsi: replace __inline with inline</title>
    <link>http://permalink.gmane.org/gmane.linux.scsi/46421</link>
    <description>From: Harvey Harrison &lt;harvey.harrison&lt; at &gt;gmail.com&gt;

Signed-off-by: Harvey Harrison &lt;harvey.harrison&lt; at &gt;gmail.com&gt;
Cc: James Bottomley &lt;James.Bottomley&lt; at &gt;HansenPartnership.com&gt;
Acked-by: Jeff Garzik &lt;jgarzik&lt; at &gt;redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm&lt; at &gt;linux-foundation.org&gt;
---

 drivers/scsi/aic7xxx/aic79xx_core.c   |   12 +-
 drivers/scsi/aic7xxx/aic79xx_inline.h |   32 +++----
 drivers/scsi/aic7xxx/aic79xx_osm.h    |  102 +++++++++++------------
 drivers/scsi/aic7xxx/aic79xx_pci.c    |    2 
 drivers/scsi/aic7xxx/aic7xxx_inline.h |    5 -
 drivers/scsi/aic7xxx/aic7xxx_osm.h    |  104 ++++++++++++------------
 drivers/scsi/aic7xxx/aic7xxx_pci.c    |    2 
 drivers/scsi/aic7xxx/aiclib.h         |    4 
 drivers/scsi/sym53c8xx_2/sym_glue.h   |    6 -
 drivers/scsi/sym53c8xx_2/sym_hipd.c   |    2 
 drivers/scsi/sym53c8xx_2/sym_hipd.h   |    6 -
 drivers/scsi/sym53c8xx_2/sym_malloc.c |    2 
 drivers/scsi/sym53c8xx_2/sym_misc.h   |   18 ++--
 13 files changed, 146 insertions(+), 151 deletions(-)

diff -puN drivers/scsi/aic7xxx/aic79xx_core.c~scsi-replace-__inline-with-inline drivers/scsi/aic7xxx/aic79xx_core.c
--- a/drivers/scsi/aic7xxx/aic79xx_core.c~scsi-replace-__inline-with-inline
+++ a/drivers/scsi/aic7xxx/aic79xx_core.c
&lt; at &gt;&lt; at &gt; -1034,7 +1034,7 &lt; at &gt;&lt; at &gt; ahd_intr(struct ahd_softc *ahd)
 }
 
 /******************************** Private Inlines *****************************/
-static __inline void
+static inline void
 ahd_assert_atn(struct ahd_softc *ahd)
 {
 ahd_outb(ahd, SCSISIGO, ATNO);
&lt; at &gt;&lt; at &gt; -1069,7 +1069,7 &lt; at &gt;&lt; at &gt; ahd_currently_packetized(struct ahd_soft
 return (packetized);
 }
 
-static __inline int
+static inline int
 ahd_set_active_fifo(struct ahd_softc *ahd)
 {
 u_int active_fifo;
&lt; at &gt;&lt; at &gt; -1086,7 +1086,7 &lt; at &gt;&lt; at &gt; ahd_set_active_fifo(struct ahd_softc *ah
 }
 }
 
-static __inline void
+static inline void
 ahd_unbusy_tcl(struct ahd_softc *ahd, u_int tcl)
 {
 ahd_busy_tcl(ahd, tcl, SCB_LIST_NULL);
&lt; at &gt;&lt; at &gt; -1096,7 +1096,7 &lt; at &gt;&lt; at &gt; ahd_unbusy_tcl(struct ahd_softc *ahd, u_
  * Determine whether the sequencer reported a residual
  * for this SCB/transaction.
  */
-static __inline void
+static inline void
 ahd_update_residual(struct ahd_softc *ahd, struct scb *scb)
 {
 uint32_t sgptr;
&lt; at &gt;&lt; at &gt; -1106,7 +1106,7 &lt; at &gt;&lt; at &gt; ahd_update_residual(struct ahd_softc *ah
 ahd_calc_residual(ahd, scb);
 }
 
-static __inline void
+static inline void
 ahd_complete_scb(struct ahd_softc *ahd, struct scb *scb)
 {
 uint32_t sgptr;
&lt; at &gt;&lt; at &gt; -7987,7 +7987,7 &lt; at &gt;&lt; at &gt; ahd_resume(struct ahd_softc *ahd)
  * scbid that should be restored once manipualtion
  * of the TCL entry is complete.
  */
-static __inline u_int
+static inline u_int
 ahd_index_busy_tcl(struct ahd_softc *ahd, u_int *saved_scbid, u_int tcl)
 {
 /*
diff -puN drivers/scsi/aic7xxx/aic79xx_inline.h~scsi-replace-__inline-with-inline drivers/scsi/aic7xxx/aic79xx_inline.h
--- a/drivers/scsi/aic7xxx/aic79xx_inline.h~scsi-replace-__inline-with-inline
+++ a/drivers/scsi/aic7xxx/aic79xx_inline.h
&lt; at &gt;&lt; at &gt; -46,21 +46,20 &lt; at &gt;&lt; at &gt;
 #define _AIC79XX_INLINE_H_
 
 /******************************** Debugging ***********************************/
-static __inline char *ahd_name(struct ahd_softc *ahd);
+static inline char *ahd_name(struct ahd_softc *ahd);
 
-static __inline char *
-ahd_name(struct ahd_softc *ahd)
+static inline char *ahd_name(struct ahd_softc *ahd)
 {
 return (ahd-&gt;name);
 }
 
 /************************ Sequencer Execution Control *************************/
-static __inline void ahd_known_modes(struct ahd_softc *ahd,
+static inline void ahd_known_modes(struct ahd_softc *ahd,
      ahd_mode src, ahd_mode dst);
-static __inline ahd_mode_state ahd_build_mode_state(struct ahd_softc *ahd,
+static inline ahd_mode_state ahd_build_mode_state(struct ahd_softc *ahd,
     ahd_mode src,
     ahd_mode dst);
-static __inline void ahd_extract_mode_state(struct ahd_softc *ahd,
+static inline void ahd_extract_mode_state(struct ahd_softc *ahd,
     ahd_mode_state state,
     ahd_mode *src, ahd_mode *dst);
 
&lt; at &gt;&lt; at &gt; -73,7 +72,7 &lt; at &gt;&lt; at &gt; int  ahd_is_paused(struct ahd_softc *ahd
 void ahd_pause(struct ahd_softc *ahd);
 void ahd_unpause(struct ahd_softc *ahd);
 
-static __inline void
+static inline void
 ahd_known_modes(struct ahd_softc *ahd, ahd_mode src, ahd_mode dst)
 {
 ahd-&gt;src_mode = src;
&lt; at &gt;&lt; at &gt; -82,13 +81,13 &lt; at &gt;&lt; at &gt; ahd_known_modes(struct ahd_softc *ahd, a
 ahd-&gt;saved_dst_mode = dst;
 }
 
-static __inline ahd_mode_state
+static inline ahd_mode_state
 ahd_build_mode_state(struct ahd_softc *ahd, ahd_mode src, ahd_mode dst)
 {
 return ((src &lt;&lt; SRC_MODE_SHIFT) | (dst &lt;&lt; DST_MODE_SHIFT));
 }
 
-static __inline void
+static inline void
 ahd_extract_mode_state(struct ahd_softc *ahd, ahd_mode_state state,
        ahd_mode *src, ahd_mode *dst)
 {
&lt; at &gt;&lt; at &gt; -102,13 +101,12 &lt; at &gt;&lt; at &gt; void*ahd_sg_setup(struct ahd_softc *ahd
       bus_size_t len, int last);
 
 /************************** Memory mapping routines ***************************/
-static __inline size_tahd_sg_size(struct ahd_softc *ahd);
+static inline size_tahd_sg_size(struct ahd_softc *ahd);
 
 voidahd_sync_sglist(struct ahd_softc *ahd,
 struct scb *scb, int op);
 
-static __inline size_t
-ahd_sg_size(struct ahd_softc *ahd)
+static inline size_t ahd_sg_size(struct ahd_softc *ahd)
 {
 if ((ahd-&gt;flags &amp; AHD_64BIT_ADDRESSING) != 0)
 return (sizeof(struct ahd_dma64_seg));
&lt; at &gt;&lt; at &gt; -141,11 +139,9 &lt; at &gt;&lt; at &gt; struct scb *
 ahd_lookup_scb(struct ahd_softc *ahd, u_int tag);
 voidahd_queue_scb(struct ahd_softc *ahd, struct scb *scb);
 
-static __inline uint8_t *
-ahd_get_sense_buf(struct ahd_softc *ahd,
+static inline uint8_t *ahd_get_sense_buf(struct ahd_softc *ahd,
   struct scb *scb);
-static __inline uint32_t
-ahd_get_sense_bufaddr(struct ahd_softc *ahd,
+static inline uint32_t ahd_get_sense_bufaddr(struct ahd_softc *ahd,
       struct scb *scb);
 
 #if 0 /* unused */
&lt; at &gt;&lt; at &gt; -158,13 +154,13 &lt; at &gt;&lt; at &gt; do {\
 
 #endif
 
-static __inline uint8_t *
+static inline uint8_t *
 ahd_get_sense_buf(struct ahd_softc *ahd, struct scb *scb)
 {
 return (scb-&gt;sense_data);
 }
 
-static __inline uint32_t
+static inline uint32_t
 ahd_get_sense_bufaddr(struct ahd_softc *ahd, struct scb *scb)
 {
 return (scb-&gt;sense_busaddr);
diff -puN drivers/scsi/aic7xxx/aic79xx_osm.h~scsi-replace-__inline-with-inline drivers/scsi/aic7xxx/aic79xx_osm.h
--- a/drivers/scsi/aic7xxx/aic79xx_osm.h~scsi-replace-__inline-with-inline
+++ a/drivers/scsi/aic7xxx/aic79xx_osm.h
&lt; at &gt;&lt; at &gt; -395,19 +395,19 &lt; at &gt;&lt; at &gt; struct info_str {
 };
 
 /******************************** Locking *************************************/
-static __inline void
+static inline void
 ahd_lockinit(struct ahd_softc *ahd)
 {
 spin_lock_init(&amp;ahd-&gt;platform_data-&gt;spin_lock);
 }
 
-static __inline void
+static inline void
 ahd_lock(struct ahd_softc *ahd, unsigned long *flags)
 {
 spin_lock_irqsave(&amp;ahd-&gt;platform_data-&gt;spin_lock, *flags);
 }
 
-static __inline void
+static inline void
 ahd_unlock(struct ahd_softc *ahd, unsigned long *flags)
 {
 spin_unlock_irqrestore(&amp;ahd-&gt;platform_data-&gt;spin_lock, *flags);
&lt; at &gt;&lt; at &gt; -490,29 +490,29 &lt; at &gt;&lt; at &gt; void ahd_pci_write_config(ahd_dev_sof
   int reg, uint32_t value,
   int width);
 
-static __inline int ahd_get_pci_function(ahd_dev_softc_t);
-static __inline int
+static inline int ahd_get_pci_function(ahd_dev_softc_t);
+static inline int
 ahd_get_pci_function(ahd_dev_softc_t pci)
 {
 return (PCI_FUNC(pci-&gt;devfn));
 }
 
-static __inline int ahd_get_pci_slot(ahd_dev_softc_t);
-static __inline int
+static inline int ahd_get_pci_slot(ahd_dev_softc_t);
+static inline int
 ahd_get_pci_slot(ahd_dev_softc_t pci)
 {
 return (PCI_SLOT(pci-&gt;devfn));
 }
 
-static __inline int ahd_get_pci_bus(ahd_dev_softc_t);
-static __inline int
+static inline int ahd_get_pci_bus(ahd_dev_softc_t);
+static inline int
 ahd_get_pci_bus(ahd_dev_softc_t pci)
 {
 return (pci-&gt;bus-&gt;number);
 }
 
-static __inline void ahd_flush_device_writes(struct ahd_softc *);
-static __inline void
+static inline void ahd_flush_device_writes(struct ahd_softc *);
+static inline void
 ahd_flush_device_writes(struct ahd_softc *ahd)
 {
 /* XXX Is this sufficient for all architectures??? */
&lt; at &gt;&lt; at &gt; -524,81 +524,81 &lt; at &gt;&lt; at &gt; intahd_linux_proc_info(struct Scsi_Host
     off_t, int, int);
 
 /*********************** Transaction Access Wrappers **************************/
-static __inline void ahd_cmd_set_transaction_status(struct scsi_cmnd *, uint32_t);
-static __inline void ahd_set_transaction_status(struct scb *, uint32_t);
-static __inline void ahd_cmd_set_scsi_status(struct scsi_cmnd *, uint32_t);
-static __inline void ahd_set_scsi_status(struct scb *, uint32_t);
-static __inline uint32_t ahd_cmd_get_transaction_status(struct scsi_cmnd *cmd);
-static __inline uint32_t ahd_get_transaction_status(struct scb *);
-static __inline uint32_t ahd_cmd_get_scsi_status(struct scsi_cmnd *cmd);
-static __inline uint32_t ahd_get_scsi_status(struct scb *);
-static __inline void ahd_set_transaction_tag(struct scb *, int, u_int);
-static __inline u_long ahd_get_transfer_length(struct scb *);
-static __inline int ahd_get_transfer_dir(struct scb *);
-static __inline void ahd_set_residual(struct scb *, u_long);
-static __inline void ahd_set_sense_residual(struct scb *scb, u_long resid);
-static __inline u_long ahd_get_residual(struct scb *);
-static __inline u_long ahd_get_sense_residual(struct scb *);
-static __inline int ahd_perform_autosense(struct scb *);
-static __inline uint32_t ahd_get_sense_bufsize(struct ahd_softc *,
+static inline void ahd_cmd_set_transaction_status(struct scsi_cmnd *, uint32_t);
+static inline void ahd_set_transaction_status(struct scb *, uint32_t);
+static inline void ahd_cmd_set_scsi_status(struct scsi_cmnd *, uint32_t);
+static inline void ahd_set_scsi_status(struct scb *, uint32_t);
+static inline uint32_t ahd_cmd_get_transaction_status(struct scsi_cmnd *cmd);
+static inline uint32_t ahd_get_transaction_status(struct scb *);
+static inline uint32_t ahd_cmd_get_scsi_status(struct scsi_cmnd *cmd);
+static inline uint32_t ahd_get_scsi_status(struct scb *);
+static inline void ahd_set_transaction_tag(struct scb *, int, u_int);
+static inline u_long ahd_get_transfer_length(struct scb *);
+static inline int ahd_get_transfer_dir(struct scb *);
+static inline void ahd_set_residual(struct scb *, u_long);
+static inline void ahd_set_sense_residual(struct scb *scb, u_long resid);
+static inline u_long ahd_get_residual(struct scb *);
+static inline u_long ahd_get_sense_residual(struct scb *);
+static inline int ahd_perform_autosense(struct scb *);
+static inline uint32_t ahd_get_sense_bufsize(struct ahd_softc *,
        struct scb *);
-static __inline void ahd_notify_xfer_settings_change(struct ahd_softc *,
+static inline void ahd_notify_xfer_settings_change(struct ahd_softc *,
      struct ahd_devinfo *);
-static __inline void ahd_platform_scb_free(struct ahd_softc *ahd,
+static inline void ahd_platform_scb_free(struct ahd_softc *ahd,
    struct scb *scb);
-static __inline void ahd_freeze_scb(struct scb *scb);
+static inline void ahd_freeze_scb(struct scb *scb);
 
-static __inline
+static inline
 void ahd_cmd_set_transaction_status(struct scsi_cmnd *cmd, uint32_t status)
 {
 cmd-&gt;result &amp;= ~(CAM_STATUS_MASK &lt;&lt; 16);
 cmd-&gt;result |= status &lt;&lt; 16;
 }
 
-static __inline
+static inline
 void ahd_set_transaction_status(struct scb *scb, uint32_t status)
 {
 ahd_cmd_set_transaction_status(scb-&gt;io_ctx,status);
 }
 
-static __inline
+static inline
 void ahd_cmd_set_scsi_status(struct scsi_cmnd *cmd, uint32_t status)
 {
 cmd-&gt;result &amp;= ~0xFFFF;
 cmd-&gt;result |= status;
 }
 
-static __inline
+static inline
 void ahd_set_scsi_status(struct scb *scb, uint32_t status)
 {
 ahd_cmd_set_scsi_status(scb-&gt;io_ctx, status);
 }
 
-static __inline
+static inline
 uint32_t ahd_cmd_get_transaction_status(struct scsi_cmnd *cmd)
 {
 return ((cmd-&gt;result &gt;&gt; 16) &amp; CAM_STATUS_MASK);
 }
 
-static __inline
+static inline
 uint32_t ahd_get_transaction_status(struct scb *scb)
 {
 return (ahd_cmd_get_transaction_status(scb-&gt;io_ctx));
 }
 
-static __inline
+static inline
 uint32_t ahd_cmd_get_scsi_status(struct scsi_cmnd *cmd)
 {
 return (cmd-&gt;result &amp; 0xFFFF);
 }
 
-static __inline
+static inline
 uint32_t ahd_get_scsi_status(struct scb *scb)
 {
 return (ahd_cmd_get_scsi_status(scb-&gt;io_ctx));
 }
 
-static __inline
+static inline
 void ahd_set_transaction_tag(struct scb *scb, int enabled, u_int type)
 {
 /*
&lt; at &gt;&lt; at &gt; -607,43 +607,43 &lt; at &gt;&lt; at &gt; void ahd_set_transaction_tag(struct scb 
  */
 }
 
-static __inline
+static inline
 u_long ahd_get_transfer_length(struct scb *scb)
 {
 return (scb-&gt;platform_data-&gt;xfer_len);
 }
 
-static __inline
+static inline
 int ahd_get_transfer_dir(struct scb *scb)
 {
 return (scb-&gt;io_ctx-&gt;sc_data_direction);
 }
 
-static __inline
+static inline
 void ahd_set_residual(struct scb *scb, u_long resid)
 {
 scsi_set_resid(scb-&gt;io_ctx, resid);
 }
 
-static __inline
+static inline
 void ahd_set_sense_residual(struct scb *scb, u_long resid)
 {
 scb-&gt;platform_data-&gt;sense_resid = resid;
 }
 
-static __inline
+static inline
 u_long ahd_get_residual(struct scb *scb)
 {
 return scsi_get_resid(scb-&gt;io_ctx);
 }
 
-static __inline
+static inline
 u_long ahd_get_sense_residual(struct scb *scb)
 {
 return (scb-&gt;platform_data-&gt;sense_resid);
 }
 
-static __inline
+static inline
 int ahd_perform_autosense(struct scb *scb)
 {
 /*
&lt; at &gt;&lt; at &gt; -654,20 +654,20 &lt; at &gt;&lt; at &gt; int ahd_perform_autosense(struct scb *sc
 return (1);
 }
 
-static __inline uint32_t
+static inline uint32_t
 ahd_get_sense_bufsize(struct ahd_softc *ahd, struct scb *scb)
 {
 return (sizeof(struct scsi_sense_data));
 }
 
-static __inline void
+static inline void
 ahd_notify_xfer_settings_change(struct ahd_softc *ahd,
 struct ahd_devinfo *devinfo)
 {
 /* Nothing to do here for linux */
 }
 
-static __inline void
+static inline void
 ahd_platform_scb_free(struct ahd_softc *ahd, struct scb *scb)
 {
 ahd-&gt;flags &amp;= ~AHD_RESOURCE_SHORTAGE;
&lt; at &gt;&lt; at &gt; -678,7 +678,7 &lt; at &gt;&lt; at &gt; voidahd_platform_free(struct ahd_softc 
 voidahd_platform_init(struct ahd_softc *ahd);
 voidahd_platform_freeze_devq(struct ahd_softc *ahd, struct scb *scb);
 
-static __inline void
+static inline void
 ahd_freeze_scb(struct scb *scb)
 {
 if ((scb-&gt;io_ctx-&gt;result &amp; (CAM_DEV_QFRZN &lt;&lt; 16)) == 0) {
diff -puN drivers/scsi/aic7xxx/aic79xx_pci.c~scsi-replace-__inline-with-inline drivers/scsi/aic7xxx/aic79xx_pci.c
--- a/drivers/scsi/aic7xxx/aic79xx_pci.c~scsi-replace-__inline-with-inline
+++ a/drivers/scsi/aic7xxx/aic79xx_pci.c
&lt; at &gt;&lt; at &gt; -51,7 +51,7 &lt; at &gt;&lt; at &gt;
 
 #include "aic79xx_pci.h"
 
-static __inline uint64_t
+static inline uint64_t
 ahd_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor)
 {
 uint64_t id;
diff -puN drivers/scsi/aic7xxx/aic7xxx_inline.h~scsi-replace-__inline-with-inline drivers/scsi/aic7xxx/aic7xxx_inline.h
--- a/drivers/scsi/aic7xxx/aic7xxx_inline.h~scsi-replace-__inline-with-inline
+++ a/drivers/scsi/aic7xxx/aic7xxx_inline.h
&lt; at &gt;&lt; at &gt; -55,10 +55,9 &lt; at &gt;&lt; at &gt; voidahc_sync_sglist(struct ahc_softc *a
 struct scb *scb, int op);
 
 /******************************** Debugging ***********************************/
-static __inline char *ahc_name(struct ahc_softc *ahc);
+static inline char *ahc_name(struct ahc_softc *ahc);
 
-static __inline char *
-ahc_name(struct ahc_softc *ahc)
+static inline char *ahc_name(struct ahc_softc *ahc)
 {
 return (ahc-&gt;name);
 }
diff -puN drivers/scsi/aic7xxx/aic7xxx_osm.h~scsi-replace-__inline-with-inline drivers/scsi/aic7xxx/aic7xxx_osm.h
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.h~scsi-replace-__inline-with-inline
+++ a/drivers/scsi/aic7xxx/aic7xxx_osm.h
&lt; at &gt;&lt; at &gt; -230,7 +230,7 &lt; at &gt;&lt; at &gt; intahc_dmamap_unload(struct ahc_softc *
 #include "aic7xxx.h"
 
 /***************************** Timer Facilities *******************************/
-static __inline void
+static inline void
 ahc_scb_timer_reset(struct scb *scb, u_int usec)
 {
 }
&lt; at &gt;&lt; at &gt; -401,19 +401,19 &lt; at &gt;&lt; at &gt; struct info_str {
 /******************************** Locking *************************************/
 /* Lock protecting internal data structures */
 
-static __inline void
+static inline void
 ahc_lockinit(struct ahc_softc *ahc)
 {
 spin_lock_init(&amp;ahc-&gt;platform_data-&gt;spin_lock);
 }
 
-static __inline void
+static inline void
 ahc_lock(struct ahc_softc *ahc, unsigned long *flags)
 {
 spin_lock_irqsave(&amp;ahc-&gt;platform_data-&gt;spin_lock, *flags);
 }
 
-static __inline void
+static inline void
 ahc_unlock(struct ahc_softc *ahc, unsigned long *flags)
 {
 spin_unlock_irqrestore(&amp;ahc-&gt;platform_data-&gt;spin_lock, *flags);
&lt; at &gt;&lt; at &gt; -493,22 +493,22 &lt; at &gt;&lt; at &gt; void ahc_pci_write_config(ahc_dev_sof
       int reg, uint32_t value,
       int width);
 
-static __inline int ahc_get_pci_function(ahc_dev_softc_t);
-static __inline int
+static inline int ahc_get_pci_function(ahc_dev_softc_t);
+static inline int
 ahc_get_pci_function(ahc_dev_softc_t pci)
 {
 return (PCI_FUNC(pci-&gt;devfn));
 }
 
-static __inline int ahc_get_pci_slot(ahc_dev_softc_t);
-static __inline int
+static inline int ahc_get_pci_slot(ahc_dev_softc_t);
+static inline int
 ahc_get_pci_slot(ahc_dev_softc_t pci)
 {
 return (PCI_SLOT(pci-&gt;devfn));
 }
 
-static __inline int ahc_get_pci_bus(ahc_dev_softc_t);
-static __inline int
+static inline int ahc_get_pci_bus(ahc_dev_softc_t);
+static inline int
 ahc_get_pci_bus(ahc_dev_softc_t pci)
 {
 return (pci-&gt;bus-&gt;number);
&lt; at &gt;&lt; at &gt; -521,8 +521,8 &lt; at &gt;&lt; at &gt; static inline void ahc_linux_pci_exit(vo
 }
 #endif
 
-static __inline void ahc_flush_device_writes(struct ahc_softc *);
-static __inline void
+static inline void ahc_flush_device_writes(struct ahc_softc *);
+static inline void
 ahc_flush_device_writes(struct ahc_softc *ahc)
 {
 /* XXX Is this sufficient for all architectures??? */
&lt; at &gt;&lt; at &gt; -535,81 +535,81 &lt; at &gt;&lt; at &gt; intahc_linux_proc_info(struct Scsi_Host
 
 /*************************** Domain Validation ********************************/
 /*********************** Transaction Access Wrappers *************************/
-static __inline void ahc_cmd_set_transaction_status(struct scsi_cmnd *, uint32_t);
-static __inline void ahc_set_transaction_status(struct scb *, uint32_t);
-static __inline void ahc_cmd_set_scsi_status(struct scsi_cmnd *, uint32_t);
-static __inline void ahc_set_scsi_status(struct scb *, uint32_t);
-static __inline uint32_t ahc_cmd_get_transaction_status(struct scsi_cmnd *cmd);
-static __inline uint32_t ahc_get_transaction_status(struct scb *);
-static __inline uint32_t ahc_cmd_get_scsi_status(struct scsi_cmnd *cmd);
-static __inline uint32_t ahc_get_scsi_status(struct scb *);
-static __inline void ahc_set_transaction_tag(struct scb *, int, u_int);
-static __inline u_long ahc_get_transfer_length(struct scb *);
-static __inline int ahc_get_transfer_dir(struct scb *);
-static __inline void ahc_set_residual(struct scb *, u_long);
-static __inline void ahc_set_sense_residual(struct scb *scb, u_long resid);
-static __inline u_long ahc_get_residual(struct scb *);
-static __inline u_long ahc_get_sense_residual(struct scb *);
-static __inline int ahc_perform_autosense(struct scb *);
-static __inline uint32_t ahc_get_sense_bufsize(struct ahc_softc *,
+static inline void ahc_cmd_set_transaction_status(struct scsi_cmnd *, uint32_t);
+static inline void ahc_set_transaction_status(struct scb *, uint32_t);
+static inline void ahc_cmd_set_scsi_status(struct scsi_cmnd *, uint32_t);
+static inline void ahc_set_scsi_status(struct scb *, uint32_t);
+static inline uint32_t ahc_cmd_get_transaction_status(struct scsi_cmnd *cmd);
+static inline uint32_t ahc_get_transaction_status(struct scb *);
+static inline uint32_t ahc_cmd_get_scsi_status(struct scsi_cmnd *cmd);
+static inline uint32_t ahc_get_scsi_status(struct scb *);
+static inline void ahc_set_transaction_tag(struct scb *, int, u_int);
+static inline u_long ahc_get_transfer_length(struct scb *);
+static inline int ahc_get_transfer_dir(struct scb *);
+static inline void ahc_set_residual(struct scb *, u_long);
+static inline void ahc_set_sense_residual(struct scb *scb, u_long resid);
+static inline u_long ahc_get_residual(struct scb *);
+static inline u_long ahc_get_sense_residual(struct scb *);
+static inline int ahc_perform_autosense(struct scb *);
+static inline uint32_t ahc_get_sense_bufsize(struct ahc_softc *,
        struct scb *);
-static __inline void ahc_notify_xfer_settings_change(struct ahc_softc *,
+static inline void ahc_notify_xfer_settings_change(struct ahc_softc *,
      struct ahc_devinfo *);
-static __inline void ahc_platform_scb_free(struct ahc_softc *ahc,
+static inline void ahc_platform_scb_free(struct ahc_softc *ahc,
    struct scb *scb);
-static __inline void ahc_freeze_scb(struct scb *scb);
+static inline void ahc_freeze_scb(struct scb *scb);
 
-static __inline
+static inline
 void ahc_cmd_set_transaction_status(struct scsi_cmnd *cmd, uint32_t status)
 {
 cmd-&gt;result &amp;= ~(CAM_STATUS_MASK &lt;&lt; 16);
 cmd-&gt;result |= status &lt;&lt; 16;
 }
 
-static __inline
+static inline
 void ahc_set_transaction_status(struct scb *scb, uint32_t status)
 {
 ahc_cmd_set_transaction_status(scb-&gt;io_ctx,status);
 }
 
-static __inline
+static inline
 void ahc_cmd_set_scsi_status(struct scsi_cmnd *cmd, uint32_t status)
 {
 cmd-&gt;result &amp;= ~0xFFFF;
 cmd-&gt;result |= status;
 }
 
-static __inline
+static inline
 void ahc_set_scsi_status(struct scb *scb, uint32_t status)
 {
 ahc_cmd_set_scsi_status(scb-&gt;io_ctx, status);
 }
 
-static __inline
+static inline
 uint32_t ahc_cmd_get_transaction_status(struct scsi_cmnd *cmd)
 {
 return ((cmd-&gt;result &gt;&gt; 16) &amp; CAM_STATUS_MASK);
 }
 
-static __inline
+static inline
 uint32_t ahc_get_transaction_status(struct scb *scb)
 {
 return (ahc_cmd_get_transaction_status(scb-&gt;io_ctx));
 }
 
-static __inline
+static inline
 uint32_t ahc_cmd_get_scsi_status(struct scsi_cmnd *cmd)
 {
 return (cmd-&gt;result &amp; 0xFFFF);
 }
 
-static __inline
+static inline
 uint32_t ahc_get_scsi_status(struct scb *scb)
 {
 return (ahc_cmd_get_scsi_status(scb-&gt;io_ctx));
 }
 
-static __inline
+static inline
 void ahc_set_transaction_tag(struct scb *scb, int enabled, u_int type)
 {
 /*
&lt; at &gt;&lt; at &gt; -618,43 +618,43 &lt; at &gt;&lt; at &gt; void ahc_set_transaction_tag(struct scb 
  */
 }
 
-static __inline
+static inline
 u_long ahc_get_transfer_length(struct scb *scb)
 {
 return (scb-&gt;platform_data-&gt;xfer_len);
 }
 
-static __inline
+static inline
 int ahc_get_transfer_dir(struct scb *scb)
 {
 return (scb-&gt;io_ctx-&gt;sc_data_direction);
 }
 
-static __inline
+static inline
 void ahc_set_residual(struct scb *scb, u_long resid)
 {
 scsi_set_resid(scb-&gt;io_ctx, resid);
 }
 
-static __inline
+static inline
 void ahc_set_sense_residual(struct scb *scb, u_long resid)
 {
 scb-&gt;platform_data-&gt;sense_resid = resid;
 }
 
-static __inline
+static inline
 u_long ahc_get_residual(struct scb *scb)
 {
 return scsi_get_resid(scb-&gt;io_ctx);
 }
 
-static __inline
+static inline
 u_long ahc_get_sense_residual(struct scb *scb)
 {
 return (scb-&gt;platform_data-&gt;sense_resid);
 }
 
-static __inline
+static inline
 int ahc_perform_autosense(struct scb *scb)
 {
 /*
&lt; at &gt;&lt; at &gt; -665,20 +665,20 &lt; at &gt;&lt; at &gt; int ahc_perform_autosense(struct scb *sc
 return (1);
 }
 
-static __inline uint32_t
+static inline uint32_t
 ahc_get_sense_bufsize(struct ahc_softc *ahc, struct scb *scb)
 {
 return (sizeof(struct scsi_sense_data));
 }
 
-static __inline void
+static inline void
 ahc_notify_xfer_settings_change(struct ahc_softc *ahc,
 struct ahc_devinfo *devinfo)
 {
 /* Nothing to do here for linux */
 }
 
-static __inline void
+static inline void
 ahc_platform_scb_free(struct ahc_softc *ahc, struct scb *scb)
 {
 }
&lt; at &gt;&lt; at &gt; -687,7 +687,7 &lt; at &gt;&lt; at &gt; intahc_platform_alloc(struct ahc_softc 
 voidahc_platform_free(struct ahc_softc *ahc);
 voidahc_platform_freeze_devq(struct ahc_softc *ahc, struct scb *scb);
 
-static __inline void
+static inline void
 ahc_freeze_scb(struct scb *scb)
 {
 if ((scb-&gt;io_ctx-&gt;result &amp; (CAM_DEV_QFRZN &lt;&lt; 16)) == 0) {
diff -puN drivers/scsi/aic7xxx/aic7xxx_pci.c~scsi-replace-__inline-with-inline drivers/scsi/aic7xxx/aic7xxx_pci.c
--- a/drivers/scsi/aic7xxx/aic7xxx_pci.c~scsi-replace-__inline-with-inline
+++ a/drivers/scsi/aic7xxx/aic7xxx_pci.c
&lt; at &gt;&lt; at &gt; -54,7 +54,7 &lt; at &gt;&lt; at &gt;
 
 #include "aic7xxx_pci.h"
 
-static __inline uint64_t
+static inline uint64_t
 ahc_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor)
 {
 uint64_t id;
diff -puN drivers/scsi/aic7xxx/aiclib.h~scsi-replace-__inline-with-inline drivers/scsi/aic7xxx/aiclib.h
--- a/drivers/scsi/aic7xxx/aiclib.h~scsi-replace-__inline-with-inline
+++ a/drivers/scsi/aic7xxx/aiclib.h
&lt; at &gt;&lt; at &gt; -133,7 +133,7 &lt; at &gt;&lt; at &gt; struct scsi_sense_data
 #define SCSI_STATUS_TASK_ABORTED0x40
 
 /************************* Large Disk Handling ********************************/
-static __inline int
+static inline int
 aic_sector_div(sector_t capacity, int heads, int sectors)
 {
 /* ugly, ugly sector_div calling convention.. */
&lt; at &gt;&lt; at &gt; -141,7 +141,7 &lt; at &gt;&lt; at &gt; aic_sector_div(sector_t capacity, int he
 return (int)capacity;
 }
 
-static __inline uint32_t
+static inline uint32_t
 scsi_4btoul(uint8_t *bytes)
 {
 uint32_t rv;
diff -puN drivers/scsi/sym53c8xx_2/sym_glue.h~scsi-replace-__inline-with-inline drivers/scsi/sym53c8xx_2/sym_glue.h
--- a/drivers/scsi/sym53c8xx_2/sym_glue.h~scsi-replace-__inline-with-inline
+++ a/drivers/scsi/sym53c8xx_2/sym_glue.h
&lt; at &gt;&lt; at &gt; -234,7 +234,7 &lt; at &gt;&lt; at &gt; static inline struct sym_hcb * sym_get_h
 /*
  *  Set the status field of a CAM CCB.
  */
-static __inline void 
+static inline void
 sym_set_cam_status(struct scsi_cmnd *cmd, int status)
 {
 cmd-&gt;result &amp;= ~(0xff  &lt;&lt; 16);
&lt; at &gt;&lt; at &gt; -244,7 +244,7 &lt; at &gt;&lt; at &gt; sym_set_cam_status(struct scsi_cmnd *cmd
 /*
  *  Get the status field of a CAM CCB.
  */
-static __inline int 
+static inline int
 sym_get_cam_status(struct scsi_cmnd *cmd)
 {
 return host_byte(cmd-&gt;result);
&lt; at &gt;&lt; at &gt; -253,7 +253,7 &lt; at &gt;&lt; at &gt; sym_get_cam_status(struct scsi_cmnd *cmd
 /*
  *  Build CAM result for a successful IO and for a failed IO.
  */
-static __inline void sym_set_cam_result_ok(struct sym_ccb *cp, struct scsi_cmnd *cmd, int resid)
+static inline void sym_set_cam_result_ok(struct sym_ccb *cp, struct scsi_cmnd *cmd, int resid)
 {
 scsi_set_resid(cmd, resid);
 cmd-&gt;result = (((DID_OK) &lt;&lt; 16) + ((cp-&gt;ssss_status) &amp; 0x7f));
diff -puN drivers/scsi/sym53c8xx_2/sym_hipd.c~scsi-replace-__inline-with-inline drivers/scsi/sym53c8xx_2/sym_hipd.c
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c~scsi-replace-__inline-with-inline
+++ a/drivers/scsi/sym53c8xx_2/sym_hipd.c
&lt; at &gt;&lt; at &gt; -602,7 +602,7 &lt; at &gt;&lt; at &gt; sym_getsync(struct sym_hcb *np, u_char d
 /*
  *  Set initial io register bits from burst code.
  */
-static __inline void sym_init_burst(struct sym_hcb *np, u_char bc)
+static inline void sym_init_burst(struct sym_hcb *np, u_char bc)
 {
 np-&gt;rv_ctest4&amp;= ~0x80;
 np-&gt;rv_dmode&amp;= ~(0x3 &lt;&lt; 6);
diff -puN drivers/scsi/sym53c8xx_2/sym_hipd.h~scsi-replace-__inline-with-inline drivers/scsi/sym53c8xx_2/sym_hipd.h
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.h~scsi-replace-__inline-with-inline
+++ a/drivers/scsi/sym53c8xx_2/sym_hipd.h
&lt; at &gt;&lt; at &gt; -1092,7 +1092,7 &lt; at &gt;&lt; at &gt; do {\
 #elif SYM_CONF_DMA_ADDRESSING_MODE == 2
 #define DMA_DAC_MASKDMA_64BIT_MASK
 int sym_lookup_dmap(struct sym_hcb *np, u32 h, int s);
-static __inline void 
+static inline void
 sym_build_sge(struct sym_hcb *np, struct sym_tblmove *data, u64 badd, int len)
 {
 u32 h = (badd&gt;&gt;32);
&lt; at &gt;&lt; at &gt; -1197,7 +1197,7 &lt; at &gt;&lt; at &gt; dma_addr_t __vtobus(m_pool_ident_t dev_d
 
 #define sym_m_pool_match(mp_id1, mp_id2)(mp_id1 == mp_id2)
 
-static __inline void *sym_m_get_dma_mem_cluster(m_pool_p mp, m_vtob_p vbp)
+static inline void *sym_m_get_dma_mem_cluster(m_pool_p mp, m_vtob_p vbp)
 {
 void *vaddr = NULL;
 dma_addr_t baddr = 0;
&lt; at &gt;&lt; at &gt; -1211,7 +1211,7 &lt; at &gt;&lt; at &gt; static __inline void *sym_m_get_dma_mem_
 return vaddr;
 }
 
-static __inline void sym_m_free_dma_mem_cluster(m_pool_p mp, m_vtob_p vbp)
+static inline void sym_m_free_dma_mem_cluster(m_pool_p mp, m_vtob_p vbp)
 {
 dma_free_coherent(mp-&gt;dev_dmat, SYM_MEM_CLUSTER_SIZE, vbp-&gt;vaddr,
 vbp-&gt;baddr);
diff -puN drivers/scsi/sym53c8xx_2/sym_malloc.c~scsi-replace-__inline-with-inline drivers/scsi/sym53c8xx_2/sym_malloc.c
--- a/drivers/scsi/sym53c8xx_2/sym_malloc.c~scsi-replace-__inline-with-inline
+++ a/drivers/scsi/sym53c8xx_2/sym_malloc.c
&lt; at &gt;&lt; at &gt; -262,7 +262,7 &lt; at &gt;&lt; at &gt; static void ___free_dma_mem_cluster(m_po
 #endif
 
 /* Fetch the memory pool for a given pool id (i.e. DMA constraints) */
-static __inline m_pool_p ___get_dma_pool(m_pool_ident_t dev_dmat)
+static inline m_pool_p ___get_dma_pool(m_pool_ident_t dev_dmat)
 {
 m_pool_p mp;
 for (mp = mp0.next;
diff -puN drivers/scsi/sym53c8xx_2/sym_misc.h~scsi-replace-__inline-with-inline drivers/scsi/sym53c8xx_2/sym_misc.h
--- a/drivers/scsi/sym53c8xx_2/sym_misc.h~scsi-replace-__inline-with-inline
+++ a/drivers/scsi/sym53c8xx_2/sym_misc.h
&lt; at &gt;&lt; at &gt; -52,17 +52,17 &lt; at &gt;&lt; at &gt; typedef struct sym_quehead {
 (ptr)-&gt;flink = (ptr); (ptr)-&gt;blink = (ptr); \
 } while (0)
 
-static __inline struct sym_quehead *sym_que_first(struct sym_quehead *head)
+static inline struct sym_quehead *sym_que_first(struct sym_quehead *head)
 {
 return (head-&gt;flink == head) ? 0 : head-&gt;flink;
 }
 
-static __inline struct sym_quehead *sym_que_last(struct sym_quehead *head)
+static inline struct sym_quehead *sym_que_last(struct sym_quehead *head)
 {
 return (head-&gt;blink == head) ? 0 : head-&gt;blink;
 }
 
-static __inline void __sym_que_add(struct sym_quehead * new,
+static inline void __sym_que_add(struct sym_quehead * new,
 struct sym_quehead * blink,
 struct sym_quehead * flink)
 {
&lt; at &gt;&lt; at &gt; -72,19 +72,19 &lt; at &gt;&lt; at &gt; static __inline void __sym_que_add(struc
 blink-&gt;flink= new;
 }
 
-static __inline void __sym_que_del(struct sym_quehead * blink,
+static inline void __sym_que_del(struct sym_quehead * blink,
 struct sym_quehead * flink)
 {
 flink-&gt;blink = blink;
 blink-&gt;flink = flink;
 }
 
-static __inline int sym_que_empty(struct sym_quehead *head)
+static inline int sym_que_empty(struct sym_quehead *head)
 {
 return head-&gt;flink == head;
 }
 
-static __inline void sym_que_splice(struct sym_quehead *list,
+static inline void sym_que_splice(struct sym_quehead *list,
 struct sym_quehead *head)
 {
 struct sym_quehead *first = list-&gt;flink;
&lt; at &gt;&lt; at &gt; -101,7 +101,7 &lt; at &gt;&lt; at &gt; static __inline void sym_que_splice(stru
 }
 }
 
-static __inline void sym_que_move(struct sym_quehead *orig,
+static inline void sym_que_move(struct sym_quehead *orig,
 struct sym_quehead *dest)
 {
 struct sym_quehead *first, *last;
&lt; at &gt;&lt; at &gt; -129,7 +129,7 &lt; at &gt;&lt; at &gt; static __inline void sym_que_move(struct
 
 #define sym_insque_head(new, head)__sym_que_add(new, head, (head)-&gt;flink)
 
-static __inline struct sym_quehead *sym_remque_head(struct sym_quehead *head)
+static inline struct sym_quehead *sym_remque_head(struct sym_quehead *head)
 {
 struct sym_quehead *elem = head-&gt;flink;
 
&lt; at &gt;&lt; at &gt; -142,7 +142,7 &lt; at &gt;&lt; at &gt; static __inline struct sym_quehead *sym_
 
 #define sym_insque_tail(new, head)__sym_que_add(new, (head)-&gt;blink, head)
 
-static __inline struct sym_quehead *sym_remque_tail(struct sym_quehead *head)
+static inline struct sym_quehead *sym_remque_tail(struct sym_quehead *head)
 {
 struct sym_quehead *elem = head-&gt;blink;
 
_
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&lt; at &gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

</description>
    <dc:creator>akpm&lt; at &gt;linux-foundation.org</dc:creator>
    <dc:date>2008-12-01T22:32:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.scsi/46420">
    <title>[patch 06/10] drivers/scsi/a3000.c: make 2 functions static</title>
    <link>http://permalink.gmane.org/gmane.linux.scsi/46420</link>
    <description>From: Adrian Bunk &lt;bunk&lt; at &gt;kernel.org&gt;

a3000_{detect,release}() can become static.

Signed-off-by: Adrian Bunk &lt;bunk&lt; at &gt;kernel.org&gt;
Cc: James Bottomley &lt;James.Bottomley&lt; at &gt;HansenPartnership.com&gt;
Signed-off-by: Andrew Morton &lt;akpm&lt; at &gt;linux-foundation.org&gt;
---

 drivers/scsi/a3000.c |    6 ++++--
 drivers/scsi/a3000.h |    3 ---
 2 files changed, 4 insertions(+), 5 deletions(-)

diff -puN drivers/scsi/a3000.c~drivers-scsi-a3000c-make-2-functions-static drivers/scsi/a3000.c
--- a/drivers/scsi/a3000.c~drivers-scsi-a3000c-make-2-functions-static
+++ a/drivers/scsi/a3000.c
&lt; at &gt;&lt; at &gt; -25,6 +25,8 &lt; at &gt;&lt; at &gt;
 
 static struct Scsi_Host *a3000_host = NULL;
 
+static int a3000_release(struct Scsi_Host *instance);
+
 static irqreturn_t a3000_intr (int irq, void *dummy)
 {
 unsigned long flags;
&lt; at &gt;&lt; at &gt; -157,7 +159,7 &lt; at &gt;&lt; at &gt; static void dma_stop(struct Scsi_Host *i
     }
 }
 
-int __init a3000_detect(struct scsi_host_template *tpnt)
+static int __init a3000_detect(struct scsi_host_template *tpnt)
 {
     wd33c93_regs regs;
 
&lt; at &gt;&lt; at &gt; -232,7 +234,7 &lt; at &gt;&lt; at &gt; static struct scsi_host_template driver_
 
 #include "scsi_module.c"
 
-int a3000_release(struct Scsi_Host *instance)
+static int a3000_release(struct Scsi_Host *instance)
 {
     wd33c93_release();
     DMA(instance)-&gt;CNTR = 0;
diff -puN drivers/scsi/a3000.h~drivers-scsi-a3000c-make-2-functions-static drivers/scsi/a3000.h
--- a/drivers/scsi/a3000.h~drivers-scsi-a3000c-make-2-functions-static
+++ a/drivers/scsi/a3000.h
&lt; at &gt;&lt; at &gt; -11,9 +11,6 &lt; at &gt;&lt; at &gt;
 
 #include &lt;linux/types.h&gt;
 
-int a3000_detect(struct scsi_host_template *);
-int a3000_release(struct Scsi_Host *);
-
 #ifndef CMD_PER_LUN
 #define CMD_PER_LUN 2
 #endif
_
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&lt; at &gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

</description>
    <dc:creator>akpm&lt; at &gt;linux-foundation.org</dc:creator>
    <dc:date>2008-12-01T22:32:12</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.scsi/46419">
    <title>[patch 05/10] drivers/scsi/a2091.c: make 2 functions static</title>
    <link>http://permalink.gmane.org/gmane.linux.scsi/46419</link>
    <description>From: Adrian Bunk &lt;bunk&lt; at &gt;kernel.org&gt;

a2091_{detect,release}() can become static.

Signed-off-by: Adrian Bunk &lt;bunk&lt; at &gt;kernel.org&gt;
Cc: James Bottomley &lt;James.Bottomley&lt; at &gt;HansenPartnership.com&gt;
Signed-off-by: Andrew Morton &lt;akpm&lt; at &gt;linux-foundation.org&gt;
---

 drivers/scsi/a2091.c |    6 ++++--
 drivers/scsi/a2091.h |    3 ---
 2 files changed, 4 insertions(+), 5 deletions(-)

diff -puN drivers/scsi/a2091.c~drivers-scsi-a2091c-make-2-functions-static drivers/scsi/a2091.c
--- a/drivers/scsi/a2091.c~drivers-scsi-a2091c-make-2-functions-static
+++ a/drivers/scsi/a2091.c
&lt; at &gt;&lt; at &gt; -23,6 +23,8 &lt; at &gt;&lt; at &gt;
 #define DMA(ptr) ((a2091_scsiregs *)((ptr)-&gt;base))
 #define HDATA(ptr) ((struct WD33C93_hostdata *)((ptr)-&gt;hostdata))
 
+static int a2091_release(struct Scsi_Host *instance);
+
 static irqreturn_t a2091_intr (int irq, void *_instance)
 {
     unsigned long flags;
&lt; at &gt;&lt; at &gt; -144,7 +146,7 &lt; at &gt;&lt; at &gt; static void dma_stop(struct Scsi_Host *i
     }
 }
 
-int __init a2091_detect(struct scsi_host_template *tpnt)
+static int __init a2091_detect(struct scsi_host_template *tpnt)
 {
     static unsigned char called = 0;
     struct Scsi_Host *instance;
&lt; at &gt;&lt; at &gt; -227,7 +229,7 &lt; at &gt;&lt; at &gt; static struct scsi_host_template driver_
 
 #include "scsi_module.c"
 
-int a2091_release(struct Scsi_Host *instance)
+static int a2091_release(struct Scsi_Host *instance)
 {
 #ifdef MODULE
 DMA(instance)-&gt;CNTR = 0;
diff -puN drivers/scsi/a2091.h~drivers-scsi-a2091c-make-2-functions-static drivers/scsi/a2091.h
--- a/drivers/scsi/a2091.h~drivers-scsi-a2091c-make-2-functions-static
+++ a/drivers/scsi/a2091.h
&lt; at &gt;&lt; at &gt; -11,9 +11,6 &lt; at &gt;&lt; at &gt;
 
 #include &lt;linux/types.h&gt;
 
-int a2091_detect(struct scsi_host_template *);
-int a2091_release(struct Scsi_Host *);
-
 #ifndef CMD_PER_LUN
 #define CMD_PER_LUN 2
 #endif
_
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&lt; at &gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

</description>
    <dc:creator>akpm&lt; at &gt;linux-foundation.org</dc:creator>
    <dc:date>2008-12-01T22:32:11</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.scsi/46418">
    <title>[patch 04/10] scsi: use the common hex_asc array rather than a private one</title>
    <link>http://permalink.gmane.org/gmane.linux.scsi/46418</link>
    <description>From: Harvey Harrison &lt;harvey.harrison&lt; at &gt;gmail.com&gt;

Also use the hi/lo helpers.

Signed-off-by: Harvey Harrison &lt;harvey.harrison&lt; at &gt;gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm&lt; at &gt;linux-foundation.org&gt;
---

 drivers/scsi/ibmmca.c    |    3 +--
 drivers/scsi/ultrastor.c |    4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff -puN drivers/scsi/ibmmca.c~scsi-use-the-common-hex_asc-array-rather-than-a-private-one drivers/scsi/ibmmca.c
--- a/drivers/scsi/ibmmca.c~scsi-use-the-common-hex_asc-array-rather-than-a-private-one
+++ a/drivers/scsi/ibmmca.c
&lt; at &gt;&lt; at &gt; -1002,12 +1002,11 &lt; at &gt;&lt; at &gt; static char *ti_p(int dev)
 /* interpreter for logical device numbers (ldn) */
 static char *ti_l(int val)
 {
-const char hex[16] = "0123456789abcdef";
 static char answer[2];
 
 answer[1] = (char) (0x0);
 if (val &lt;= MAX_LOG_DEV)
-answer[0] = hex[val];
+answer[0] = hex_asc[val];
 else
 answer[0] = '-';
 return (char *) &amp;answer;
diff -puN drivers/scsi/ultrastor.c~scsi-use-the-common-hex_asc-array-rather-than-a-private-one drivers/scsi/ultrastor.c
--- a/drivers/scsi/ultrastor.c~scsi-use-the-common-hex_asc-array-rather-than-a-private-one
+++ a/drivers/scsi/ultrastor.c
&lt; at &gt;&lt; at &gt; -876,8 +876,8 &lt; at &gt;&lt; at &gt; static int ultrastor_abort(struct scsi_c
 for (i = 0; i &lt; 16; i++)
   {
     unsigned char p = inb(port0 + i);
-    out[28 + i * 3] = "0123456789abcdef"[p &gt;&gt; 4];
-    out[29 + i * 3] = "0123456789abcdef"[p &amp; 15];
+    out[28 + i * 3] = hex_asc_hi(p);
+    out[29 + i * 3] = hex_asc_lo(p);
     out[30 + i * 3] = ' ';
   }
 out[28 + i * 3] = '\n';
_
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&lt; at &gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

</description>
    <dc:creator>akpm&lt; at &gt;linux-foundation.org</dc:creator>
    <dc:date>2008-12-01T22:32:11</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.scsi/46417">
    <title>[patch 03/10] MPT: remove unused struct -- mpt_proc_entry_t</title>
    <link>http://permalink.gmane.org/gmane.linux.scsi/46417</link>
    <description>From: Alexey Dobriyan &lt;adobriyan&lt; at &gt;gmail.com&gt;

Signed-off-by: Alexey Dobriyan &lt;adobriyan&lt; at &gt;gmail.com&gt;
Cc: "Moore, Eric Dean" &lt;Eric.Moore&lt; at &gt;lsi.com&gt;
Cc: James Bottomley &lt;James.Bottomley&lt; at &gt;HansenPartnership.com&gt;
Signed-off-by: Andrew Morton &lt;akpm&lt; at &gt;linux-foundation.org&gt;
---

 drivers/message/fusion/mptbase.h |   11 -----------
 1 file changed, 11 deletions(-)

diff -puN drivers/message/fusion/mptbase.h~mpt-remove-unused-struct-mpt_proc_entry_t drivers/message/fusion/mptbase.h
--- a/drivers/message/fusion/mptbase.h~mpt-remove-unused-struct-mpt_proc_entry_t
+++ a/drivers/message/fusion/mptbase.h
&lt; at &gt;&lt; at &gt; -402,17 +402,6 &lt; at &gt;&lt; at &gt; typedef struct _VirtDevice {
 #define MPT_TARGET_FLAGS_RAID_COMPONENT0x40
 #define MPT_TARGET_FLAGS_LED_ON0x80
 
-/*
- */proc/mpt interface
- */
-typedef struct {
-const char*name;
-mode_t mode;
-int pad;
-read_proc_t*read_proc;
-write_proc_t*write_proc;
-} mpt_proc_entry_t;
-
 #define MPT_PROC_READ_RETURN(buf,start,offset,request,eof,len) \
 do { \
 len -= offset;\
_
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&lt; at &gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

</description>
    <dc:creator>akpm&lt; at &gt;linux-foundation.org</dc:creator>
    <dc:date>2008-12-01T22:32:10</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.scsi/46416">
    <title>[patch 01/10] #if 0 ses_match_host()</title>
    <link>http://permalink.gmane.org/gmane.linux.scsi/46416</link>
    <description>From: Adrian Bunk &lt;bunk&lt; at &gt;kernel.org&gt;

#if 0 the unused ses_match_host()

Signed-off-by: Adrian Bunk &lt;bunk&lt; at &gt;kernel.org&gt;
Cc: James Bottomley &lt;James.Bottomley&lt; at &gt;steeleye.com&gt;
Signed-off-by: Andrew Morton &lt;akpm&lt; at &gt;linux-foundation.org&gt;
---

 drivers/scsi/ses.c |    2 ++
 1 file changed, 2 insertions(+)

diff -puN drivers/scsi/ses.c~if-0-ses_match_host drivers/scsi/ses.c
--- a/drivers/scsi/ses.c~if-0-ses_match_host
+++ a/drivers/scsi/ses.c
&lt; at &gt;&lt; at &gt; -264,6 +264,7 &lt; at &gt;&lt; at &gt; struct ses_host_edev {
 struct enclosure_device *edev;
 };
 
+#if 0
 int ses_match_host(struct enclosure_device *edev, void *data)
 {
 struct ses_host_edev *sed = data;
&lt; at &gt;&lt; at &gt; -280,6 +281,7 &lt; at &gt;&lt; at &gt; int ses_match_host(struct enclosure_devi
 sed-&gt;edev = edev;
 return 1;
 }
+#endif  /*  0  */
 
 static void ses_process_descriptor(struct enclosure_component *ecomp,
    unsigned char *desc)
_
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&lt; at &gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

</description>
    <dc:creator>akpm&lt; at &gt;linux-foundation.org</dc:creator>
    <dc:date>2008-12-01T22:32:08</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.scsi/46415">
    <title>Re: [RFC] FC pass thru - Rev IV</title>
    <link>http://permalink.gmane.org/gmane.linux.scsi/46415</link>
    <description>
Seokmann Ju wrote:

I didn't think we needed to mandate this. So, I've left it in the 
position where the transport allows it to be more than one, but the 
driver is free to reject it if it desires.  That said, I wouldn't expect 
an ELS to be more than 1 buffer.  If everyone feels strongly enough 
about it - we can make this restriction.

However, we can't do this on CT operations.

</description>
    <dc:creator>James Smart</dc:creator>
    <dc:date>2008-12-01T22:09:48</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.scsi/46414">
    <title>[patch for 2.6.28? 1/1] aacraid: disable Dell Percraid quirk on Adaptec 2200S and 2120S</title>
    <link>http://permalink.gmane.org/gmane.linux.scsi/46414</link>
    <description>From: Tomas Henzl &lt;thenzl&lt; at &gt;redhat.com&gt;

A lot of 64bit machines with Adaptec 2200S and 2120S controllers don't
recognize SCSI disks any more with the patch "fix driver failure with Dell
PowerEdge Expandable RAID Controller 3/Di", but fail with tons of "aac_srb:
aac_fib_send failed with status: 8195" instead. This patch disables the
quirk introduced in the change cited above for those two controllers again.

Signed-off-by: Gernot Hillier &lt;gernot.hillier&lt; at &gt;siemens.com&gt;
Signed-off-by: Tomas Henzl &lt;thenzl&lt; at &gt;redhat.com&gt;
Cc: &lt;aacraid&lt; at &gt;adaptec.com&gt;
Cc: James Bottomley &lt;James.Bottomley&lt; at &gt;HansenPartnership.com&gt;
Tested-by: Thomas Guyot-Sionnest &lt;dermoth&lt; at &gt;aei.ca&gt;
Cc: "Leubner, Achim" &lt;Achim_Leubner&lt; at &gt;adaptec.com&gt;
Cc: &lt;stable&lt; at &gt;kernel.org&gt;[2.6.27.x, 2.6.26.x, 2.6.25.x]
Signed-off-by: Andrew Morton &lt;akpm&lt; at &gt;linux-foundation.org&gt;
---

 drivers/scsi/aacraid/linit.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -puN drivers/scsi/aacraid/linit.c~aacraid-disable-dell-percraid-quirk-on-adaptec-2200s-and-2120s drivers/scsi/aacraid/linit.c
--- a/drivers/scsi/aacraid/linit.c~aacraid-disable-dell-percraid-quirk-on-adaptec-2200s-and-2120s
+++ a/drivers/scsi/aacraid/linit.c
&lt; at &gt;&lt; at &gt; -175,8 +175,8 &lt; at &gt;&lt; at &gt; static struct aac_driver_ident aac_drive
 { aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* PERC 3/Di (Boxster/PERC3DiB) */
 { aac_rx_init, "aacraid",  "ADAPTEC ", "catapult        ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* catapult */
 { aac_rx_init, "aacraid",  "ADAPTEC ", "tomcat          ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* tomcat */
-{ aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2120S   ", 1, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Adaptec 2120S (Crusader) */
-{ aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2200S   ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Adaptec 2200S (Vulcan) */
+{ aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2120S   ", 1, AAC_QUIRK_31BIT | AAC_QUIRK_34SG },      /* Adaptec 2120S (Crusader) */
+{ aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2200S   ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG },      /* Adaptec 2200S (Vulcan) */
 { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2200S   ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Adaptec 2200S (Vulcan-2m) */
 { aac_rx_init, "aacraid",  "Legend  ", "Legend S220     ", 1, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Legend S220 (Legend Crusader) */
 { aac_rx_init, "aacraid",  "Legend  ", "Legend S230     ", 2, AAC_QUIRK_31BIT | AAC_QUIRK_34SG | AAC_QUIRK_SCSI_32 }, /* Legend S230 (Legend Vulcan) */
_
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&lt; at &gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

</description>
    <dc:creator>akpm&lt; at &gt;linux-foundation.org</dc:creator>
    <dc:date>2008-12-01T22:04:12</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.scsi/46413">
    <title>Re: [RFC] FC pass thru - Rev IV</title>
    <link>http://permalink.gmane.org/gmane.linux.scsi/46413</link>
    <description>Hi James,

On Nov 25, 2008, at 6:38 AM, Seokmann Ju wrote:
[snip]
One minor questions/clarification.
If I understood correctly, ELS only supports single sg. If this is  
true, shouldn't it checked somewhere before the transport layer calls  
LLD?

Thank you,
Seokmann
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&lt; at &gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

</description>
    <dc:creator>Seokmann Ju</dc:creator>
    <dc:date>2008-12-01T21:49:31</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.scsi/46412">
    <title>Re: [PATCH 00/11] st: remove scsi_execute_async usage (the first half)</title>
    <link>http://permalink.gmane.org/gmane.linux.scsi/46412</link>
    <description>
Boaz Harrosh wrote:

I see. If it's about performance, it should be done, no doubts. But I 
have another likely stupid question, answer for which I have been going 
to find out for long time, but always have no time. Maybe, you can help 
me, BTW, please? Why is block layer involved in SCSI commands execution 
for non-block cases, like st and sg? Sg isn't intended to be actively 
used for data transfers with block devices, for them there are sd and 
bsg interfaces, right? Wouldn't for them path memory=&gt;sg-lists=&gt;driver 
via SCSI mid-layer be simpler and all those alignment, draining, sizes, 
etc. issues can't be handled by some library, which both SCSI and block 
subsystems use? I have feeling, maybe wrong, that currently performance 
for non-block cases is sacrificed for block case.

Thanks,
Vlad

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&lt; at &gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

</description>
    <dc:creator>Vladislav Bolkhovitin</dc:creator>
    <dc:date>2008-12-01T18:17:29</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.scsi/46411">
    <title>[PATCH] libiscsi REGRESSION: fix passthrough support with older iscsi tools</title>
    <link>http://permalink.gmane.org/gmane.linux.scsi/46411</link>
    <description>From: Mike Christie &lt;michaelc&lt; at &gt;cs.wisc.edu&gt;

This regression was added in 2.6.27, when the mtask and ctask were
merged into the the common task struct. The patch applies to
scsi-rc-fixes, but also applies to 2.6.27 with some offsets.

The problem is that __iscsi_conn_send_pdu assumes that userspace was
not sending nops with the format it is checking for in the "if" below.
It turns out that older userspace tools are. This patch moves the
setting of the internal ping_task tracker (it tracks libiscsi current
outstanding nop) to iscsi_send_nopout which is only used by kernel callers.

Signed-off-by: Mike Christie &lt;michaelc&lt; at &gt;cs.wisc.edu&gt;
---
 drivers/scsi/libiscsi.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 801c7cf..3fdee73 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
&lt; at &gt;&lt; at &gt; -489,12 +489,6 &lt; at &gt;&lt; at &gt; __iscsi_conn_send_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
 if (!__kfifo_get(session-&gt;cmdpool.queue,
  (void*)&amp;task, sizeof(void*)))
 return NULL;
-
-if ((hdr-&gt;opcode == (ISCSI_OP_NOOP_OUT | ISCSI_OP_IMMEDIATE)) &amp;&amp;
-     hdr-&gt;ttt == RESERVED_ITT) {
-conn-&gt;ping_task = task;
-conn-&gt;last_ping = jiffies;
-}
 }
 /*
  * released in complete pdu for task we expect a response for, and
&lt; at &gt;&lt; at &gt; -703,6 +697,11 &lt; at &gt;&lt; at &gt; static void iscsi_send_nopout(struct iscsi_conn *conn, struct iscsi_nopin *rhdr)
 task = __iscsi_conn_send_pdu(conn, (struct iscsi_hdr *)&amp;hdr, NULL, 0);
 if (!task)
 iscsi_conn_printk(KERN_ERR, conn, "Could not send nopout\n");
+else if (!rhdr) {
+/* only track our nops */
+conn-&gt;ping_task = task;
+conn-&gt;last_ping = jiffies;
+}
 }
 
 static int iscsi_handle_reject(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
</description>
    <dc:creator>michaelc&lt; at &gt;cs.wisc.edu</dc:creator>
    <dc:date>2008-12-01T18:13:00</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.scsi/46410">
    <title>[Bug 12119] iscsi repeatedly times out</title>
    <link>http://permalink.gmane.org/gmane.linux.scsi/46410</link>
    <description>http://bugzilla.kernel.org/show_bug.cgi?id=12119





------- Comment #4 from anonymous&lt; at &gt;kernel-bugs.osdl.org  2008-12-01 08:20 -------
Reply-To: michaelc&lt; at &gt;cs.wisc.edu

bugme-daemon&lt; at &gt;bugzilla.kernel.org wrote:

Ok. I will submit a patch. Thanks for the report and testing.



I did not mean to upgrade to all F10 or F9 - just the iscsi package in 
there. The code across them is the same more or less. F9 and F8 were the 
same for iscsi, so if you use:

http://mirrors.kernel.org/fedora/updates/9/x86_64.newkey/iscsi-initiator-utils-6.2.0.870-1.0.fc9.x86_64.rpm

(for i386 or ppc then swap the x86_64 refs for your arch) on F8 then you 
should be ok.


</description>
    <dc:creator>bugme-daemon&lt; at &gt;bugzilla.kernel.org</dc:creator>
    <dc:date>2008-12-01T16:20:11</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.scsi/46409">
    <title>Re: [Bug 12119] iscsi repeatedly times out</title>
    <link>http://permalink.gmane.org/gmane.linux.scsi/46409</link>
    <description>
Ok. I will submit a patch. Thanks for the report and testing.



I did not mean to upgrade to all F10 or F9 - just the iscsi package in 
there. The code across them is the same more or less. F9 and F8 were the 
same for iscsi, so if you use:

http://mirrors.kernel.org/fedora/updates/9/x86_64.newkey/iscsi-initiator-utils-6.2.0.870-1.0.fc9.x86_64.rpm

(for i386 or ppc then swap the x86_64 refs for your arch) on F8 then you 
should be ok.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&lt; at &gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

</description>
    <dc:creator>Mike Christie</dc:creator>
    <dc:date>2008-12-01T16:19:56</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.linux.scsi/46408">
    <title>Re: [PATCH] SCSI: fix /proc memory leak in the SCSI core</title>
    <link>http://permalink.gmane.org/gmane.linux.scsi/46408</link>
    <description>

I'm not so sure about that...  There's still a window in which the
directory is visible but empty; it's just smaller than before.

Besides, the window that really matters is between sending out the
uevent notification (during device_add) and populating the directory.
The patch doesn't address that problem.  Should it?

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo&lt; at &gt;vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

</description>
    <dc:creator>Alan Stern</dc:creator>
    <dc:date>2008-12-01T15:51:42</dc:date>
  </item>
  <textinput about="http://search.gmane.org/?group=$group=gmane.linux.scsi">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.linux.scsi</link>
  </textinput>
</rdf:RDF>
