Commit ca07380f authored by Doug Ledford's avatar Doug Ledford

[PATCH] dpt_i2o TCQ update

This patch for dpt_i2o fixes TCQ stuff, but doesn't solve DMA mapping
issues (so it still doesn't work, but it's not because of TCQ).

Getting around to fixing DMA mapping API issues is much more work per
driver than the TCQ stuff, so I'm putting it off until later.

dpti.h:
  Update template
dpt_i2o.c:
  Update to new TCQ scheme
parent 1642bf82
...@@ -48,7 +48,6 @@ MODULE_DESCRIPTION("Adaptec I2O RAID Driver"); ...@@ -48,7 +48,6 @@ MODULE_DESCRIPTION("Adaptec I2O RAID Driver");
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <linux/blk.h> #include <linux/blk.h>
#include <linux/delay.h> /* for udelay */ #include <linux/delay.h> /* for udelay */
#include <linux/tqueue.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/kernel.h> /* for printk */ #include <linux/kernel.h> /* for printk */
#include <linux/sched.h> #include <linux/sched.h>
...@@ -356,23 +355,20 @@ static void adpt_inquiry(adpt_hba* pHba) ...@@ -356,23 +355,20 @@ static void adpt_inquiry(adpt_hba* pHba)
} }
static void adpt_select_queue_depths(struct Scsi_Host *host, Scsi_Device * devicelist) static int adpt_slave_attach(Scsi_Device * device)
{ {
Scsi_Device *device; /* scsi layer per device information */ struct Scsi_Host *host = device->host;
adpt_hba* pHba; adpt_hba* pHba;
pHba = (adpt_hba *) host->hostdata[0]; pHba = (adpt_hba *) host->hostdata[0];
for (device = devicelist; device != NULL; device = device->next) { if (host->can_queue && device->tagged_supported) {
if (device->host != host) { scsi_adjust_queue_depth(device, MSG_SIMPLE_TAG,
continue; host->can_queue - 1);
} } else {
if (host->can_queue) { scsi_adjust_queue_depth(device, 0, 1);
device->queue_depth = host->can_queue - 1;
} else {
device->queue_depth = 1;
}
} }
return 0;
} }
static int adpt_queue(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *)) static int adpt_queue(Scsi_Cmnd * cmd, void (*done) (Scsi_Cmnd *))
...@@ -2194,11 +2190,10 @@ static s32 adpt_scsi_register(adpt_hba* pHba,Scsi_Host_Template * sht) ...@@ -2194,11 +2190,10 @@ static s32 adpt_scsi_register(adpt_hba* pHba,Scsi_Host_Template * sht)
host->max_id = 16; host->max_id = 16;
host->max_lun = 256; host->max_lun = 256;
host->max_channel = pHba->top_scsi_channel + 1; host->max_channel = pHba->top_scsi_channel + 1;
host->cmd_per_lun = 256; host->cmd_per_lun = 1;
host->unique_id = (uint) pHba; host->unique_id = (uint) pHba;
host->sg_tablesize = pHba->sg_tablesize; host->sg_tablesize = pHba->sg_tablesize;
host->can_queue = pHba->post_fifo_size; host->can_queue = pHba->post_fifo_size;
host->select_queue_depths = adpt_select_queue_depths;
return 0; return 0;
} }
......
...@@ -43,6 +43,7 @@ static int adpt_queue(Scsi_Cmnd * cmd, void (*cmdcomplete) (Scsi_Cmnd *)); ...@@ -43,6 +43,7 @@ static int adpt_queue(Scsi_Cmnd * cmd, void (*cmdcomplete) (Scsi_Cmnd *));
static int adpt_abort(Scsi_Cmnd * cmd); static int adpt_abort(Scsi_Cmnd * cmd);
static int adpt_reset(Scsi_Cmnd* cmd); static int adpt_reset(Scsi_Cmnd* cmd);
static int adpt_release(struct Scsi_Host *host); static int adpt_release(struct Scsi_Host *host);
static int adpt_slave_attach(Scsi_Device *);
static const char *adpt_info(struct Scsi_Host *pSHost); static const char *adpt_info(struct Scsi_Host *pSHost);
static int adpt_bios_param(Disk * disk, struct block_device *dev, int geom[]); static int adpt_bios_param(Disk * disk, struct block_device *dev, int geom[]);
...@@ -90,10 +91,11 @@ static int adpt_device_reset(Scsi_Cmnd* cmd); ...@@ -90,10 +91,11 @@ static int adpt_device_reset(Scsi_Cmnd* cmd);
eh_bus_reset_handler: adpt_bus_reset, \ eh_bus_reset_handler: adpt_bus_reset, \
eh_host_reset_handler: adpt_reset, \ eh_host_reset_handler: adpt_reset, \
bios_param: adpt_bios_param, \ bios_param: adpt_bios_param, \
slave_attach: adpt_slave_attach, \
can_queue: MAX_TO_IOP_MESSAGES, /* max simultaneous cmds */\ can_queue: MAX_TO_IOP_MESSAGES, /* max simultaneous cmds */\
this_id: 7, /* scsi id of host adapter */\ this_id: 7, /* scsi id of host adapter */\
sg_tablesize: 0, /* max scatter-gather cmds */\ sg_tablesize: 0, /* max scatter-gather cmds */\
cmd_per_lun: 256, /* cmds per lun (linked cmds) */\ cmd_per_lun: 1, /* cmds per lun (linked cmds) */\
use_clustering: ENABLE_CLUSTERING, \ use_clustering: ENABLE_CLUSTERING, \
proc_name: "dpt_i2o" /* this is the name of our proc node*/ \ proc_name: "dpt_i2o" /* this is the name of our proc node*/ \
} }
...@@ -346,7 +348,6 @@ static s32 adpt_rescan(adpt_hba* pHba); ...@@ -346,7 +348,6 @@ static s32 adpt_rescan(adpt_hba* pHba);
static s32 adpt_i2o_reparse_lct(adpt_hba* pHba); static s32 adpt_i2o_reparse_lct(adpt_hba* pHba);
static s32 adpt_send_nop(adpt_hba*pHba,u32 m); static s32 adpt_send_nop(adpt_hba*pHba,u32 m);
static void adpt_i2o_delete_hba(adpt_hba* pHba); static void adpt_i2o_delete_hba(adpt_hba* pHba);
static void adpt_select_queue_depths(struct Scsi_Host *host, Scsi_Device * devicelist);
static void adpt_inquiry(adpt_hba* pHba); static void adpt_inquiry(adpt_hba* pHba);
static void adpt_fail_posted_scbs(adpt_hba* pHba); static void adpt_fail_posted_scbs(adpt_hba* pHba);
static struct adpt_device* adpt_find_device(adpt_hba* pHba, u32 chan, u32 id, u32 lun); static struct adpt_device* adpt_find_device(adpt_hba* pHba, u32 chan, u32 id, u32 lun);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment